[SCM] OCE packaging branch, debian, updated. debian/0.11-1

tpaviot tpaviot at gmail.com
Thu Dec 13 19:16:33 UTC 2012


The following commit has been merged in the debian branch:
commit 85928fe8b9398c4739477a49f04957d04201e828
Author: Denis Barbier <bouzim at gmail.com>
Date:   Fri Nov 16 22:18:28 2012 +0100

    Upgrade to OCCT 6.5.4
    
    Apply patches from 99ae871 on official/6.5.4.

diff --git a/adm/UDLIST b/adm/UDLIST
index de3547f..7c0edd6 100644
--- a/adm/UDLIST
+++ b/adm/UDLIST
@@ -39,7 +39,6 @@ p UnitsAPI
 p gp
 p math
 r OS
-r UnitsAPI
 t TKAdvTools
 t TKMath
 t TKernel
@@ -208,7 +207,6 @@ t TKShHealing
 t TKTopAlgo
 t TKXMesh
 n InterfaceGraphic
-n VoxelClient
 p AIS
 p AIS2D
 p AlienImage
@@ -355,6 +353,7 @@ t TKXml
 t TKXmlL
 t TKXmlTObj
 n IGESFile
+n StepFile
 p APIHeaderSection
 p BRepToIGES
 p BRepToIGESBRep
@@ -410,7 +409,6 @@ p StepData
 p StepDimTol
 p StepElement
 p StepFEA
-p StepFile
 p StepGeom
 p StepRepr
 p StepSelect
@@ -463,7 +461,6 @@ p DDataStd
 p DDocStd
 p DNaming
 p DPrsStd
-p DebugTools
 p Draw
 p DrawDim
 p DrawFairCurve
@@ -472,13 +469,6 @@ p GeometryTest
 p GeomliteTest
 p HLRTest
 p MeshTest
-p QABugs
-p QADNaming
-p QADraw
-p QANCollection
-p QANewBRepNaming
-p QANewDBRepNaming
-p QANewModTopOpe
 p SWDRAW
 p TObjDRAW
 p TestTopOpe
@@ -494,10 +484,21 @@ p XSDRAWSTLVRML
 r DrawResources
 t TKDCAF
 t TKDraw
-t TKQADraw
 t TKTObjDRAW
 t TKTopTest
 t TKViewerTest
 t TKXDEDRAW
 t TKXSDRAW
 x DRAWEXE
+p DebugTools
+p QADraw
+p QANCollection
+p QANewBRepNaming
+p QANewDBRepNaming
+p QANewModTopOpe
+p QAViewer2dTest
+r QAResources
+t TKQADraw
+p QADNaming
+p QABugs
+p Font
diff --git a/custom.bat b/custom.bat
index 5fcc4db..4b41f87 100755
--- a/custom.bat
+++ b/custom.bat
@@ -2,7 +2,7 @@
 
 set VCVER=vc9
 set ARCH=32
-
+set "VCVARS=%VS90COMNTOOLS%..\..\VC\vcvarsall.bat"
 set "PRODUCTS_PATH=%~dp0..\3rdparty"
 
 rem Optional 3rd-parties switches
@@ -13,16 +13,16 @@ set CHECK_QT4=true
 set CHECK_JDK=true
 
 rem Additional headers search paths
-set "CSF_OPT_INC=%PRODUCTS_PATH%\tcltk-85-32\include;%PRODUCTS_PATH%\freetype-2.3.7-vc9-32\include;%PRODUCTS_PATH%\ftgl-2.1.2-vc9-32\include;%PRODUCTS_PATH%\freeimage-vc9-32\include;%PRODUCTS_PATH%\gl2ps-1.3.5-vc9-32\include;%PRODUCTS_PATH%\tbb30_018oss\include;%PRODUCTS_PATH%\qt462-vc9-32\include;%PRODUCTS_PATH%\qt462-vc9-32\include\Qt;%PRODUCTS_PATH%\qt462-vc9-32\include\QtGui;%PRODUCTS_PATH%\qt462-vc9-32\include\QtCore;%PRODUCTS_PATH%\jdk1.6.0-32\include;%PRODUCTS_PATH%\jdk1.6.0-32\include\win32"
+set "CSF_OPT_INC=%PRODUCTS_PATH%\tcltk-85-32\include;%PRODUCTS_PATH%\freetype-2.4.10-vc9-32\include;%PRODUCTS_PATH%\ftgl-2.1.3-vc9-32\include;%PRODUCTS_PATH%\freeimage-vc9-32\include;%PRODUCTS_PATH%\gl2ps-1.3.5-vc9-32\include;%PRODUCTS_PATH%\tbb30_018oss\include;%PRODUCTS_PATH%\qt462-vc9-32\include;%PRODUCTS_PATH%\qt462-vc9-32\include\Qt;%PRODUCTS_PATH%\qt462-vc9-32\include\QtGui;%PRODUCTS_PATH%\qt462-vc9-32\include\QtCore;%PRODUCTS_PATH%\jdk1.6.0-32\include;%PRODUCTS_PATH%\jdk1.6.0-32\include\win32"
 
 rem Additional libraries (32-bit) search paths
-set "CSF_OPT_LIB32=%PRODUCTS_PATH%\tcltk-85-32\lib;%PRODUCTS_PATH%\ftgl-2.1.2-vc9-32\lib;%PRODUCTS_PATH%\freeimage-vc9-32\lib;%PRODUCTS_PATH%\gl2ps-1.3.5-vc9-32\lib;%PRODUCTS_PATH%\tbb30_018oss\lib\ia32\vc9;%PRODUCTS_PATH%\qt462-vc9-32\lib"
+set "CSF_OPT_LIB32=%PRODUCTS_PATH%\tcltk-85-32\lib;%PRODUCTS_PATH%\freetype-2.4.10-vc9-32\lib;%PRODUCTS_PATH%\ftgl-2.1.3-vc9-32\lib;%PRODUCTS_PATH%\freeimage-vc9-32\lib;%PRODUCTS_PATH%\gl2ps-1.3.5-vc9-32\lib;%PRODUCTS_PATH%\tbb30_018oss\lib\ia32\vc9;%PRODUCTS_PATH%\qt462-vc9-32\lib"
 
 rem Additional libraries (64-bit) search paths
-set "CSF_OPT_LIB64=%PRODUCTS_PATH%\tcltk-85-64\lib;%PRODUCTS_PATH%\ftgl-2.1.2-vc9-64\lib;%PRODUCTS_PATH%\freeimage-vc9-64\lib;%PRODUCTS_PATH%\gl2ps-1.3.5-vc9-64\lib;%PRODUCTS_PATH%\tbb30_018oss\lib\intel64\vc9;%PRODUCTS_PATH%\qt462-vc9-64\lib"
+set "CSF_OPT_LIB64=%PRODUCTS_PATH%\tcltk-85-64\lib;%PRODUCTS_PATH%\freetype-2.4.10-vc9-64\lib;%PRODUCTS_PATH%\ftgl-2.1.3-vc9-64\lib;%PRODUCTS_PATH%\freeimage-vc9-64\lib;%PRODUCTS_PATH%\gl2ps-1.3.5-vc9-64\lib;%PRODUCTS_PATH%\tbb30_018oss\lib\intel64\vc9;%PRODUCTS_PATH%\qt462-vc9-64\lib"
 
 rem Additional (32-bit) search paths
-set "CSF_OPT_BIN32=%PRODUCTS_PATH%\tcltk-85-32\bin;%PRODUCTS_PATH%\ftgl-2.1.2-vc9-32\bin;%PRODUCTS_PATH%\freeimage-vc9-32\bin;%PRODUCTS_PATH%\gl2ps-1.3.5-vc9-32\bin;%PRODUCTS_PATH%\tbb30_018oss\bin\ia32\vc9;%PRODUCTS_PATH%\qt462-vc9-32\bin;%PRODUCTS_PATH%\jdk1.6.0-32\bin"
+set "CSF_OPT_BIN32=%PRODUCTS_PATH%\tcltk-85-32\bin;%PRODUCTS_PATH%\freetype-2.4.10-vc9-32\bin;%PRODUCTS_PATH%\ftgl-2.1.3-vc9-32\bin;%PRODUCTS_PATH%\freeimage-vc9-32\bin;%PRODUCTS_PATH%\gl2ps-1.3.5-vc9-32\bin;%PRODUCTS_PATH%\tbb30_018oss\bin\ia32\vc9;%PRODUCTS_PATH%\qt462-vc9-32\bin;%PRODUCTS_PATH%\jdk1.6.0-32\bin"
 
 rem Additional (64-bit) search paths
-set "CSF_OPT_BIN64=%PRODUCTS_PATH%\tcltk-85-64\bin;%PRODUCTS_PATH%\ftgl-2.1.2-vc9-64\bin;%PRODUCTS_PATH%\freeimage-vc9-64\bin;%PRODUCTS_PATH%\gl2ps-1.3.5-vc9-64\bin;%PRODUCTS_PATH%\tbb30_018oss\bin\intel64\vc9;%PRODUCTS_PATH%\qt462-vc9-64\bin;%PRODUCTS_PATH%\jdk1.6.0-64\bin"
+set "CSF_OPT_BIN64=%PRODUCTS_PATH%\tcltk-85-64\bin;%PRODUCTS_PATH%\freetype-2.4.10-vc9-64\bin;%PRODUCTS_PATH%\ftgl-2.1.3-vc9-64\bin;%PRODUCTS_PATH%\freeimage-vc9-64\bin;%PRODUCTS_PATH%\gl2ps-1.3.5-vc9-64\bin;%PRODUCTS_PATH%\tbb30_018oss\bin\intel64\vc9;%PRODUCTS_PATH%\qt462-vc9-64\bin;%PRODUCTS_PATH%\jdk1.6.0-64\bin"
diff --git a/custom.sh b/custom.sh
deleted file mode 100755
index c3accd7..0000000
--- a/custom.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-# This environment file was generated by wok_depsgui.tcl script at 2012.04.04 13:57
-
-export PRODUCTS_PATH="/dn43/OCCtests/vtn/WOK/wok/site/../3rdparty/lin"
-
-# Optional 3rd-parties switches
-export HAVE_FREEIMAGE=false
-export HAVE_GL2PS=false
-export HAVE_TBB=false
-export CHECK_QT4=true
-export CHECK_JDK=true
-
-# Additional headers search paths
-export CSF_OPT_INC="/PRODUCTS/maintenance/Mandriva2010/freetype-2.3.7/include/freetype2:/PRODUCTS/maintenance/Mandriva2010/tcltk-85/include:/PRODUCTS/maintenance/Mandriva2010/ftgl-2.1.2/include/FTGL:/PRODUCTS/maintenance/Mandriva2010/qt-4.6.2/include:/PRODUCTS/maintenance/Mandriva2010/jdk1.6.0/include/linux:/PRODUCTS/maintenance/Mandriva2010/jdk1.6.0/include"
-
-# Additional libraries (32-bit) search paths
-export CSF_OPT_LIB32="/PRODUCTS/maintenance/Mandriva2010/tcltk-85/lib:/PRODUCTS/maintenance/Mandriva2010/ftgl-2.1.2/lib"
-
-# Additional (32-bit) search paths
-export CSF_OPT_BIN32=""
diff --git a/custom.sh.in b/custom.sh.in
old mode 100644
new mode 100755
diff --git a/draw.bat b/draw.bat
index b5c66c9..157a082 100755
--- a/draw.bat
+++ b/draw.bat
@@ -1,7 +1,7 @@
- at echo off
-
-rem Setup environment and launch DRAWEXE
-call "%~dp0env.bat" %1 %2 %3
-
-echo Hint: use "pload ALL" command to load standard commands
-DRAWEXE.exe
+ at echo off
+
+rem Setup environment and launch DRAWEXE
+call "%~dp0env.bat" %1 %2 %3
+
+echo Hint: use "pload ALL" command to load standard commands
+DRAWEXE.exe
diff --git a/drv/AIS/AIS_InteractiveObject.jxx b/drv/AIS/AIS_InteractiveObject.jxx
index a0e4d96..2cb3c57 100644
--- a/drv/AIS/AIS_InteractiveObject.jxx
+++ b/drv/AIS/AIS_InteractiveObject.jxx
@@ -19,12 +19,6 @@
 #ifndef _TColStd_ListOfInteger_HeaderFile
 #include <TColStd_ListOfInteger.hxx>
 #endif
-#ifndef _PrsMgr_PresentationManager_HeaderFile
-#include <PrsMgr_PresentationManager.hxx>
-#endif
-#ifndef _PrsMgr_Presentation_HeaderFile
-#include <PrsMgr_Presentation.hxx>
-#endif
 #ifndef _Geom_Transformation_HeaderFile
 #include <Geom_Transformation.hxx>
 #endif
diff --git a/drv/Aspect/Aspect_PixMap.ixx b/drv/Aspect/Aspect_PixMap.ixx
deleted file mode 100644
index 4c06c78..0000000
--- a/drv/Aspect/Aspect_PixMap.ixx
+++ /dev/null
@@ -1,29 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#include <Aspect_PixMap.jxx>
-
-#ifndef _Standard_Type_HeaderFile
-#include <Standard_Type.hxx>
-#endif
-
-
- 
-
-
-IMPLEMENT_STANDARD_TYPE(Aspect_PixMap)
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
-  STANDARD_TYPE(MMgt_TShared),
-  STANDARD_TYPE(Standard_Transient),
-
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-IMPLEMENT_STANDARD_TYPE_END(Aspect_PixMap)
-
-
-IMPLEMENT_DOWNCAST(Aspect_PixMap,Standard_Transient)
-IMPLEMENT_STANDARD_RTTI(Aspect_PixMap)
-
-
-
diff --git a/drv/Aspect/Aspect_PixMap.jxx b/drv/Aspect/Aspect_PixMap.jxx
deleted file mode 100644
index 3a328d3..0000000
--- a/drv/Aspect/Aspect_PixMap.jxx
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _Aspect_PixmapDefinitionError_HeaderFile
-#include <Aspect_PixmapDefinitionError.hxx>
-#endif
-#ifndef _Aspect_PixmapError_HeaderFile
-#include <Aspect_PixmapError.hxx>
-#endif
-#ifndef _Quantity_Color_HeaderFile
-#include <Quantity_Color.hxx>
-#endif
-#ifndef _Aspect_PixMap_HeaderFile
-#include <Aspect_PixMap.hxx>
-#endif
diff --git a/drv/Aspect/Aspect_Window.jxx b/drv/Aspect/Aspect_Window.jxx
index 4c22582..9a047a3 100644
--- a/drv/Aspect/Aspect_Window.jxx
+++ b/drv/Aspect/Aspect_Window.jxx
@@ -16,9 +16,6 @@
 #ifndef _Aspect_GradientBackground_HeaderFile
 #include <Aspect_GradientBackground.hxx>
 #endif
-#ifndef _Aspect_PixMap_HeaderFile
-#include <Aspect_PixMap.hxx>
-#endif
 #ifndef _Aspect_Window_HeaderFile
 #include <Aspect_Window.hxx>
 #endif
diff --git a/drv/BRepClass3d/BRepClass3d.ixx b/drv/BRepClass3d/BRepClass3d.ixx
new file mode 100644
index 0000000..aa7db92
--- /dev/null
+++ b/drv/BRepClass3d/BRepClass3d.ixx
@@ -0,0 +1,10 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#include <BRepClass3d.jxx>
+
+ 
+
+
diff --git a/drv/BRepClass3d/BRepClass3d.jxx b/drv/BRepClass3d/BRepClass3d.jxx
new file mode 100644
index 0000000..1467926
--- /dev/null
+++ b/drv/BRepClass3d/BRepClass3d.jxx
@@ -0,0 +1,9 @@
+#ifndef _TopoDS_Shell_HeaderFile
+#include <TopoDS_Shell.hxx>
+#endif
+#ifndef _TopoDS_Solid_HeaderFile
+#include <TopoDS_Solid.hxx>
+#endif
+#ifndef _BRepClass3d_HeaderFile
+#include <BRepClass3d.hxx>
+#endif
diff --git a/drv/BRepMesh/BRepMesh_Delaun.jxx b/drv/BRepMesh/BRepMesh_Delaun.jxx
index 0c704a8..f53dbc9 100644
--- a/drv/BRepMesh/BRepMesh_Delaun.jxx
+++ b/drv/BRepMesh/BRepMesh_Delaun.jxx
@@ -22,6 +22,9 @@
 #ifndef _TColStd_SequenceOfInteger_HeaderFile
 #include <TColStd_SequenceOfInteger.hxx>
 #endif
+#ifndef _TColStd_MapOfInteger_HeaderFile
+#include <TColStd_MapOfInteger.hxx>
+#endif
 #ifndef _BRepMesh_Delaun_HeaderFile
 #include <BRepMesh_Delaun.hxx>
 #endif
diff --git a/drv/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.jxx b/drv/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.jxx
index cabb217..a3c9f20 100644
--- a/drv/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.jxx
+++ b/drv/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.jxx
@@ -1,5 +1,5 @@
-#ifndef _Standard_ConstructionError_HeaderFile
-#include <Standard_ConstructionError.hxx>
+#ifndef _StdFail_NotDone_HeaderFile
+#include <StdFail_NotDone.hxx>
 #endif
 #ifndef _TopoDS_Face_HeaderFile
 #include <TopoDS_Face.hxx>
diff --git a/drv/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.ixx b/drv/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.ixx
new file mode 100644
index 0000000..ab22eb0
--- /dev/null
+++ b/drv/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.ixx
@@ -0,0 +1,10 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#include <BRepOffsetAPI_MiddlePath.jxx>
+
+ 
+
+
diff --git a/drv/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.jxx b/drv/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.jxx
new file mode 100644
index 0000000..ae1bf44
--- /dev/null
+++ b/drv/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.jxx
@@ -0,0 +1,6 @@
+#ifndef _TopoDS_Shape_HeaderFile
+#include <TopoDS_Shape.hxx>
+#endif
+#ifndef _BRepOffsetAPI_MiddlePath_HeaderFile
+#include <BRepOffsetAPI_MiddlePath.hxx>
+#endif
diff --git a/drv/ExprIntrp/lex.ExprIntrp.c b/drv/ExprIntrp/lex.ExprIntrp.c
index c83a517..1453541 100644
--- a/drv/ExprIntrp/lex.ExprIntrp.c
+++ b/drv/ExprIntrp/lex.ExprIntrp.c
@@ -24,7 +24,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.89 96/05/25 21:02:21 vern Exp $
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
  */
 
 #define FLEX_SCANNER
@@ -259,7 +259,7 @@ void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
 
 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
 
 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
@@ -2084,6 +2084,7 @@ void ExprIntrp_start_string(char* str)
 void ExprIntrp_stop_string()
 {
   ExprIntrp_delete_buffer(ExprIntrp_bufstring);
+  ExprIntrp_bufstring = (YY_BUFFER_STATE) 0;
 }
 
 int yywrap()
@@ -2582,7 +2583,7 @@ static int yy_get_next_buffer()
 		/* don't do the read, it's not guaranteed to return an EOF,
 		 * just force an EOF
 		 */
-		yy_n_chars = 0;
+		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
 
 	else
 		{
@@ -2637,6 +2638,8 @@ static int yy_get_next_buffer()
 		/* Read in more data. */
 		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
 			yy_n_chars, num_to_read );
+
+		yy_current_buffer->yy_n_chars = yy_n_chars;
 		}
 
 	if ( yy_n_chars == 0 )
@@ -2728,7 +2731,6 @@ yy_state_type yy_current_state;
 	}
 
 
-
 #ifdef __cplusplus
 static int yyinput()
 #else
@@ -2756,13 +2758,26 @@ static int input()
 
 			switch ( yy_get_next_buffer() )
 				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					yyrestart( yyin );
+
+					/* fall through */
+
 				case EOB_ACT_END_OF_FILE:
 					{
 					if ( yywrap() )
-						{
-						yy_c_buf_p = yytext_ptr + offset;
 						return EOF;
-						}
 
 					if ( ! yy_did_buffer_switch_on_eof )
 						YY_NEW_FILE;
@@ -2776,15 +2791,6 @@ static int input()
 				case EOB_ACT_CONTINUE_SCAN:
 					yy_c_buf_p = yytext_ptr + offset;
 					break;
-
-				case EOB_ACT_LAST_MATCH:
-#ifdef __cplusplus
-					YY_FATAL_ERROR(
-					"unexpected last match in yyinput()" );
-#else
-					YY_FATAL_ERROR(
-					"unexpected last match in input()" );
-#endif
 				}
 			}
 		}
@@ -2948,6 +2954,9 @@ YY_BUFFER_STATE b;
 #endif
 
 	{
+	if ( ! b )
+		return;
+
 	b->yy_n_chars = 0;
 
 	/* We always need two end-of-buffer characters.  The first causes
@@ -3007,17 +3016,17 @@ yy_size_t size;
 
 #ifndef YY_NO_SCAN_STRING
 #ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *str )
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
 #else
-YY_BUFFER_STATE yy_scan_string( str )
-yyconst char *str;
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
 #endif
 	{
 	int len;
-	for ( len = 0; str[len]; ++len )
+	for ( len = 0; yy_str[len]; ++len )
 		;
 
-	return yy_scan_bytes( str, len );
+	return yy_scan_bytes( yy_str, len );
 	}
 #endif
 
diff --git a/drv/Extrema/Extrema_GenExtPS.jxx b/drv/Extrema/Extrema_GenExtPS.jxx
index afa36da..cab7dcf 100644
--- a/drv/Extrema/Extrema_GenExtPS.jxx
+++ b/drv/Extrema/Extrema_GenExtPS.jxx
@@ -4,6 +4,9 @@
 #ifndef _Bnd_HArray1OfSphere_HeaderFile
 #include <Bnd_HArray1OfSphere.hxx>
 #endif
+#ifndef _TColStd_HArray1OfReal_HeaderFile
+#include <TColStd_HArray1OfReal.hxx>
+#endif
 #ifndef _StdFail_NotDone_HeaderFile
 #include <StdFail_NotDone.hxx>
 #endif
diff --git a/drv/Font/Font_FontMgr.ixx b/drv/Font/Font_FontMgr.ixx
new file mode 100644
index 0000000..6ec4bd2
--- /dev/null
+++ b/drv/Font/Font_FontMgr.ixx
@@ -0,0 +1,29 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#include <Font_FontMgr.jxx>
+
+#ifndef _Standard_Type_HeaderFile
+#include <Standard_Type.hxx>
+#endif
+
+
+ 
+
+
+IMPLEMENT_STANDARD_TYPE(Font_FontMgr)
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
+  STANDARD_TYPE(MMgt_TShared),
+  STANDARD_TYPE(Standard_Transient),
+
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
+IMPLEMENT_STANDARD_TYPE_END(Font_FontMgr)
+
+
+IMPLEMENT_DOWNCAST(Font_FontMgr,Standard_Transient)
+IMPLEMENT_STANDARD_RTTI(Font_FontMgr)
+
+
+
diff --git a/drv/Font/Font_FontMgr.jxx b/drv/Font/Font_FontMgr.jxx
new file mode 100644
index 0000000..101d813
--- /dev/null
+++ b/drv/Font/Font_FontMgr.jxx
@@ -0,0 +1,3 @@
+#ifndef _Font_FontMgr_HeaderFile
+#include <Font_FontMgr.hxx>
+#endif
diff --git a/drv/Font/Font_SystemFont.ixx b/drv/Font/Font_SystemFont.ixx
new file mode 100644
index 0000000..2ab9199
--- /dev/null
+++ b/drv/Font/Font_SystemFont.ixx
@@ -0,0 +1,29 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#include <Font_SystemFont.jxx>
+
+#ifndef _Standard_Type_HeaderFile
+#include <Standard_Type.hxx>
+#endif
+
+
+ 
+
+
+IMPLEMENT_STANDARD_TYPE(Font_SystemFont)
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
+  STANDARD_TYPE(MMgt_TShared),
+  STANDARD_TYPE(Standard_Transient),
+
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
+IMPLEMENT_STANDARD_TYPE_END(Font_SystemFont)
+
+
+IMPLEMENT_DOWNCAST(Font_SystemFont,Standard_Transient)
+IMPLEMENT_STANDARD_RTTI(Font_SystemFont)
+
+
+
diff --git a/drv/Font/Font_SystemFont.jxx b/drv/Font/Font_SystemFont.jxx
new file mode 100644
index 0000000..bf0d605
--- /dev/null
+++ b/drv/Font/Font_SystemFont.jxx
@@ -0,0 +1,6 @@
+#ifndef _TCollection_HAsciiString_HeaderFile
+#include <TCollection_HAsciiString.hxx>
+#endif
+#ifndef _Font_SystemFont_HeaderFile
+#include <Font_SystemFont.hxx>
+#endif
diff --git a/drv/Geom2dHatch/Geom2dHatch_Hatcher_0.cxx b/drv/Geom2dHatch/Geom2dHatch_Hatcher_0.cxx
index 86c89f9..32512ad 100644
--- a/drv/Geom2dHatch/Geom2dHatch_Hatcher_0.cxx
+++ b/drv/Geom2dHatch/Geom2dHatch_Hatcher_0.cxx
@@ -20,15 +20,6 @@
 #ifndef _Geom2dHatch_Intersector_HeaderFile
 #include <Geom2dHatch_Intersector.hxx>
 #endif
-#ifndef _Geom2dHatch_ElementOfHatcher_HeaderFile
-#include <Geom2dHatch_ElementOfHatcher.hxx>
-#endif
-#ifndef _Geom2dHatch_ElementsOfHatcher_HeaderFile
-#include <Geom2dHatch_ElementsOfHatcher.hxx>
-#endif
-#ifndef _Geom2dHatch_MapOfElementsOfElementsOfHatcher_HeaderFile
-#include <Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx>
-#endif
 #ifndef _Geom2dHatch_HatchingOfHatcher_HeaderFile
 #include <Geom2dHatch_HatchingOfHatcher.hxx>
 #endif
@@ -41,6 +32,15 @@
 #ifndef _Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher_HeaderFile
 #include <Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher.hxx>
 #endif
+#ifndef _Geom2dHatch_ElementOfHatcher_HeaderFile
+#include <Geom2dHatch_ElementOfHatcher.hxx>
+#endif
+#ifndef _Geom2dHatch_ElementsOfHatcher_HeaderFile
+#include <Geom2dHatch_ElementsOfHatcher.hxx>
+#endif
+#ifndef _Geom2dHatch_MapOfElementsOfElementsOfHatcher_HeaderFile
+#include <Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx>
+#endif
 #ifndef _Geom2dHatch_ClassifierOfHatcher_HeaderFile
 #include <Geom2dHatch_ClassifierOfHatcher.hxx>
 #endif
@@ -61,14 +61,6 @@
 #define TheCurveH_hxx <Geom2dAdaptor_Curve.hxx>
 #define TheIntersector Geom2dHatch_Intersector
 #define TheIntersector_hxx <Geom2dHatch_Intersector.hxx>
-#define HatchGen_Element Geom2dHatch_ElementOfHatcher
-#define HatchGen_Element_hxx <Geom2dHatch_ElementOfHatcher.hxx>
-#define HatchGen_Elements Geom2dHatch_ElementsOfHatcher
-#define HatchGen_Elements_hxx <Geom2dHatch_ElementsOfHatcher.hxx>
-#define HatchGen_MapOfElementsOfElements Geom2dHatch_MapOfElementsOfElementsOfHatcher
-#define HatchGen_MapOfElementsOfElements_hxx <Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx>
-#define HatchGen_MapOfElementsOfElements Geom2dHatch_MapOfElementsOfElementsOfHatcher
-#define HatchGen_MapOfElementsOfElements_hxx <Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx>
 #define HatchGen_Hatching Geom2dHatch_HatchingOfHatcher
 #define HatchGen_Hatching_hxx <Geom2dHatch_HatchingOfHatcher.hxx>
 #define HatchGen_Hatchings Geom2dHatch_HatchingsOfHatcher
@@ -81,6 +73,14 @@
 #define HatchGen_DataMapNodeOfHatchings_hxx <Geom2dHatch_DataMapNodeOfHatchingsOfHatcher.hxx>
 #define HatchGen_DataMapIteratorOfHatchings Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher
 #define HatchGen_DataMapIteratorOfHatchings_hxx <Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher.hxx>
+#define HatchGen_Element Geom2dHatch_ElementOfHatcher
+#define HatchGen_Element_hxx <Geom2dHatch_ElementOfHatcher.hxx>
+#define HatchGen_Elements Geom2dHatch_ElementsOfHatcher
+#define HatchGen_Elements_hxx <Geom2dHatch_ElementsOfHatcher.hxx>
+#define HatchGen_MapOfElementsOfElements Geom2dHatch_MapOfElementsOfElementsOfHatcher
+#define HatchGen_MapOfElementsOfElements_hxx <Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx>
+#define HatchGen_MapOfElementsOfElements Geom2dHatch_MapOfElementsOfElementsOfHatcher
+#define HatchGen_MapOfElementsOfElements_hxx <Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx>
 #define HatchGen_Classifier Geom2dHatch_ClassifierOfHatcher
 #define HatchGen_Classifier_hxx <Geom2dHatch_ClassifierOfHatcher.hxx>
 #define HatchGen_FClass2dOfClassifier Geom2dHatch_FClass2dOfClassifierOfHatcher
diff --git a/drv/Image/Image_PixMap.ixx b/drv/Image/Image_PixMap.ixx
deleted file mode 100644
index 21fcb8f..0000000
--- a/drv/Image/Image_PixMap.ixx
+++ /dev/null
@@ -1,29 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#include <Image_PixMap.jxx>
-
-#ifndef _Standard_Type_HeaderFile
-#include <Standard_Type.hxx>
-#endif
-
- 
-
-
-IMPLEMENT_STANDARD_TYPE(Image_PixMap)
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
-  STANDARD_TYPE(Aspect_PixMap),
-  STANDARD_TYPE(MMgt_TShared),
-  STANDARD_TYPE(Standard_Transient),
-
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-IMPLEMENT_STANDARD_TYPE_END(Image_PixMap)
-
-
-IMPLEMENT_DOWNCAST(Image_PixMap,Standard_Transient)
-IMPLEMENT_STANDARD_RTTI(Image_PixMap)
-
-
-
diff --git a/drv/Image/Image_PixMap.jxx b/drv/Image/Image_PixMap.jxx
deleted file mode 100644
index 6fba57b..0000000
--- a/drv/Image/Image_PixMap.jxx
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _Aspect_PixmapDefinitionError_HeaderFile
-#include <Aspect_PixmapDefinitionError.hxx>
-#endif
-#ifndef _Aspect_PixmapError_HeaderFile
-#include <Aspect_PixmapError.hxx>
-#endif
-#ifndef _Quantity_Color_HeaderFile
-#include <Quantity_Color.hxx>
-#endif
-#ifndef _Image_PixMap_HeaderFile
-#include <Image_PixMap.hxx>
-#endif
diff --git a/drv/IntTools/IntTools_Context.jxx b/drv/IntTools/IntTools_Context.jxx
index 5c6f48d..e42e33a 100644
--- a/drv/IntTools/IntTools_Context.jxx
+++ b/drv/IntTools/IntTools_Context.jxx
@@ -25,6 +25,9 @@
 #ifndef _TopoDS_Solid_HeaderFile
 #include <TopoDS_Solid.hxx>
 #endif
+#ifndef _Geom2dHatch_Hatcher_HeaderFile
+#include <Geom2dHatch_Hatcher.hxx>
+#endif
 #ifndef _TopoDS_Vertex_HeaderFile
 #include <TopoDS_Vertex.hxx>
 #endif
diff --git a/drv/OSD/OSD_FontMgr.ixx b/drv/OSD/OSD_FontMgr.ixx
deleted file mode 100644
index 6a79eb3..0000000
--- a/drv/OSD/OSD_FontMgr.ixx
+++ /dev/null
@@ -1,29 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#include <OSD_FontMgr.jxx>
-
-#ifndef _Standard_Type_HeaderFile
-#include <Standard_Type.hxx>
-#endif
-
-
- 
-
-
-IMPLEMENT_STANDARD_TYPE(OSD_FontMgr)
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
-  STANDARD_TYPE(MMgt_TShared),
-  STANDARD_TYPE(Standard_Transient),
-
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-IMPLEMENT_STANDARD_TYPE_END(OSD_FontMgr)
-
-
-IMPLEMENT_DOWNCAST(OSD_FontMgr,Standard_Transient)
-IMPLEMENT_STANDARD_RTTI(OSD_FontMgr)
-
-
-
diff --git a/drv/OSD/OSD_FontMgr.jxx b/drv/OSD/OSD_FontMgr.jxx
deleted file mode 100644
index 5120a58..0000000
--- a/drv/OSD/OSD_FontMgr.jxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef _OSD_FontMgr_HeaderFile
-#include <OSD_FontMgr.hxx>
-#endif
diff --git a/drv/OSD/OSD_SystemFont.ixx b/drv/OSD/OSD_SystemFont.ixx
deleted file mode 100644
index 1b33dbc..0000000
--- a/drv/OSD/OSD_SystemFont.ixx
+++ /dev/null
@@ -1,29 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#include <OSD_SystemFont.jxx>
-
-#ifndef _Standard_Type_HeaderFile
-#include <Standard_Type.hxx>
-#endif
-
-
- 
-
-
-IMPLEMENT_STANDARD_TYPE(OSD_SystemFont)
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
-  STANDARD_TYPE(MMgt_TShared),
-  STANDARD_TYPE(Standard_Transient),
-
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-IMPLEMENT_STANDARD_TYPE_END(OSD_SystemFont)
-
-
-IMPLEMENT_DOWNCAST(OSD_SystemFont,Standard_Transient)
-IMPLEMENT_STANDARD_RTTI(OSD_SystemFont)
-
-
-
diff --git a/drv/OSD/OSD_SystemFont.jxx b/drv/OSD/OSD_SystemFont.jxx
deleted file mode 100644
index a6ae071..0000000
--- a/drv/OSD/OSD_SystemFont.jxx
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _TCollection_HAsciiString_HeaderFile
-#include <TCollection_HAsciiString.hxx>
-#endif
-#ifndef _OSD_SystemFont_HeaderFile
-#include <OSD_SystemFont.hxx>
-#endif
diff --git a/drv/QAViewer2dTest/QAViewer2dTest.ixx b/drv/QAViewer2dTest/QAViewer2dTest.ixx
new file mode 100644
index 0000000..4f11c7a
--- /dev/null
+++ b/drv/QAViewer2dTest/QAViewer2dTest.ixx
@@ -0,0 +1,10 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#include <QAViewer2dTest.jxx>
+
+ 
+
+
diff --git a/drv/QAViewer2dTest/QAViewer2dTest.jxx b/drv/QAViewer2dTest/QAViewer2dTest.jxx
new file mode 100644
index 0000000..da03c78
--- /dev/null
+++ b/drv/QAViewer2dTest/QAViewer2dTest.jxx
@@ -0,0 +1,6 @@
+#ifndef _Draw_Interpretor_HeaderFile
+#include <Draw_Interpretor.hxx>
+#endif
+#ifndef _QAViewer2dTest_HeaderFile
+#include <QAViewer2dTest.hxx>
+#endif
diff --git a/drv/STEPCAFControl/STEPCAFControl_Reader.jxx b/drv/STEPCAFControl/STEPCAFControl_Reader.jxx
index cfaf5f9..9389dae 100644
--- a/drv/STEPCAFControl/STEPCAFControl_Reader.jxx
+++ b/drv/STEPCAFControl/STEPCAFControl_Reader.jxx
@@ -43,6 +43,15 @@
 #ifndef _TColStd_HSequenceOfTransient_HeaderFile
 #include <TColStd_HSequenceOfTransient.hxx>
 #endif
+#ifndef _StepRepr_RepresentationItem_HeaderFile
+#include <StepRepr_RepresentationItem.hxx>
+#endif
+#ifndef _Transfer_TransientProcess_HeaderFile
+#include <Transfer_TransientProcess.hxx>
+#endif
+#ifndef _StepShape_ConnectedFaceSet_HeaderFile
+#include <StepShape_ConnectedFaceSet.hxx>
+#endif
 #ifndef _StepRepr_NextAssemblyUsageOccurrence_HeaderFile
 #include <StepRepr_NextAssemblyUsageOccurrence.hxx>
 #endif
diff --git a/drv/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.ixx b/drv/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.ixx
new file mode 100644
index 0000000..3496080
--- /dev/null
+++ b/drv/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.ixx
@@ -0,0 +1,29 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#include <ShapeUpgrade_UnifySameDomain.jxx>
+
+#ifndef _Standard_Type_HeaderFile
+#include <Standard_Type.hxx>
+#endif
+
+
+ 
+
+
+IMPLEMENT_STANDARD_TYPE(ShapeUpgrade_UnifySameDomain)
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
+  STANDARD_TYPE(MMgt_TShared),
+  STANDARD_TYPE(Standard_Transient),
+
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
+IMPLEMENT_STANDARD_TYPE_END(ShapeUpgrade_UnifySameDomain)
+
+
+IMPLEMENT_DOWNCAST(ShapeUpgrade_UnifySameDomain,Standard_Transient)
+IMPLEMENT_STANDARD_RTTI(ShapeUpgrade_UnifySameDomain)
+
+
+
diff --git a/drv/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.jxx b/drv/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.jxx
new file mode 100644
index 0000000..bd4bb86
--- /dev/null
+++ b/drv/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.jxx
@@ -0,0 +1,9 @@
+#ifndef _ShapeBuild_ReShape_HeaderFile
+#include <ShapeBuild_ReShape.hxx>
+#endif
+#ifndef _TopoDS_Shape_HeaderFile
+#include <TopoDS_Shape.hxx>
+#endif
+#ifndef _ShapeUpgrade_UnifySameDomain_HeaderFile
+#include <ShapeUpgrade_UnifySameDomain.hxx>
+#endif
diff --git a/drv/StepFile/lex.step.c b/drv/StepFile/lex.step.c
index 0431fa2..d63c2e8 100644
--- a/drv/StepFile/lex.step.c
+++ b/drv/StepFile/lex.step.c
@@ -24,7 +24,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.89 96/05/25 21:02:21 vern Exp $
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
  */
 
 #define FLEX_SCANNER
@@ -259,7 +259,7 @@ void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
 
 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
 
 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
@@ -1131,7 +1131,7 @@ static int yy_get_next_buffer()
 		/* don't do the read, it's not guaranteed to return an EOF,
 		 * just force an EOF
 		 */
-		yy_n_chars = 0;
+		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
 
 	else
 		{
@@ -1186,6 +1186,8 @@ static int yy_get_next_buffer()
 		/* Read in more data. */
 		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
 			yy_n_chars, num_to_read );
+
+		yy_current_buffer->yy_n_chars = yy_n_chars;
 		}
 
 	if ( yy_n_chars == 0 )
@@ -1303,13 +1305,26 @@ static int input()
 
 			switch ( yy_get_next_buffer() )
 				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					yyrestart( yyin );
+
+					/* fall through */
+
 				case EOB_ACT_END_OF_FILE:
 					{
 					if ( yywrap() )
-						{
-						yy_c_buf_p = yytext_ptr + offset;
 						return EOF;
-						}
 
 					if ( ! yy_did_buffer_switch_on_eof )
 						YY_NEW_FILE;
@@ -1323,15 +1338,6 @@ static int input()
 				case EOB_ACT_CONTINUE_SCAN:
 					yy_c_buf_p = yytext_ptr + offset;
 					break;
-
-				case EOB_ACT_LAST_MATCH:
-#ifdef __cplusplus
-					YY_FATAL_ERROR(
-					"unexpected last match in yyinput()" );
-#else
-					YY_FATAL_ERROR(
-					"unexpected last match in input()" );
-#endif
 				}
 			}
 		}
@@ -1495,6 +1501,9 @@ YY_BUFFER_STATE b;
 #endif
 
 	{
+	if ( ! b )
+		return;
+
 	b->yy_n_chars = 0;
 
 	/* We always need two end-of-buffer characters.  The first causes
@@ -1554,17 +1563,17 @@ yy_size_t size;
 
 #ifndef YY_NO_SCAN_STRING
 #ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *str )
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
 #else
-YY_BUFFER_STATE yy_scan_string( str )
-yyconst char *str;
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
 #endif
 	{
 	int len;
-	for ( len = 0; str[len]; ++len )
+	for ( len = 0; yy_str[len]; ++len )
 		;
 
-	return yy_scan_bytes( str, len );
+	return yy_scan_bytes( yy_str, len );
 	}
 #endif
 
diff --git a/drv/StepFile/step.tab.c b/drv/StepFile/step.tab.c
index 806e8b9..4998b9a 100644
--- a/drv/StepFile/step.tab.c
+++ b/drv/StepFile/step.tab.c
@@ -1,5 +1,5 @@
 
-/*  A Bison parser, made from /dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc
+/*  A Bison parser, made from /misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc
  by  GNU Bison version 1.25
   */
 
@@ -30,7 +30,7 @@
 #define	HEXA	273
 #define	QUID	274
 
-#line 23 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 23 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 
 #include "recfile.ph"		/* definitions des types d'arguments */
 #include "recfile.pc"		/* la-dedans, tout y est */
@@ -253,775 +253,716 @@ static const short yycheck[] = {    11,
      0,     0,    14,    21,    21,    20,     9,    14,    34,    43,
     79,    58
 };
-/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
-#line 3 "/dn29/PRODUCTS/maintenance/Mandriva2008/bison-1.25/share/bison.simple"
-
-/* Skeleton output parser for bison,
-   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
-
-   This program 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; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   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., 675 Mass Ave, Cambridge, MA 02139, USA.  */
-
-/* As a special exception, when this file is copied by Bison into a
-   Bison output file, you may use that output file without restriction.
-   This special exception was added by the Free Software Foundation
-   in version 1.24 of Bison.  */
-
-#ifndef alloca
-#ifdef __GNUC__
-#define alloca __builtin_alloca
-#else /* not GNU C.  */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
-#include <alloca.h>
-#else /* not sparc */
-#if defined (MSDOS) && !defined (__TURBOC__)
-#include <malloc.h>
-#else /* not MSDOS, or __TURBOC__ */
-#if defined(_AIX)
-#include <malloc.h>
- #pragma alloca
-#else /* not MSDOS, __TURBOC__, or _AIX */
-#ifdef __hpux
-#ifdef __cplusplus
-extern "C" {
-void *alloca (unsigned int);
-};
-#else /* not __cplusplus */
-void *alloca ();
-#endif /* not __cplusplus */
-#endif /* __hpux */
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc.  */
-#endif /* not GNU C.  */
-#endif /* alloca not defined.  */
-
-/* This is the parser code that is written into each bison parser
-  when the %semantic_parser declaration is not specified in the grammar.
-  It was written by Richard Stallman by simplifying the hairy parser
-  used when %semantic_parser is specified.  */
-
-/* Note: there must be only one dollar sign in this file.
-   It is replaced by the list of actions, each action
-   as one case of the switch.  */
-
-#define yyerrok		(yyerrstatus = 0)
-#define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		-2
-#define YYEOF		0
-#define YYACCEPT	return(0)
-#define YYABORT 	return(1)
-#define YYERROR		goto yyerrlab1
-/* Like YYERROR except do call yyerror.
-   This remains here temporarily to ease the
-   transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
-#define YYFAIL		goto yyerrlab
-#define YYRECOVERING()  (!!yyerrstatus)
-#define YYBACKUP(token, value) \
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    { yychar = (token), yylval = (value);			\
-      yychar1 = YYTRANSLATE (yychar);				\
-      YYPOPSTACK;						\
-      goto yybackup;						\
-    }								\
-  else								\
-    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
-while (0)
-
-#define YYTERROR	1
-#define YYERRCODE	256
-
-#ifndef YYPURE
-#define YYLEX		yylex()
-#endif
-
-#ifdef YYPURE
-#ifdef YYLSP_NEEDED
-#ifdef YYLEX_PARAM
-#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
-#else
-#define YYLEX		yylex(&yylval, &yylloc)
-#endif
-#else /* not YYLSP_NEEDED */
-#ifdef YYLEX_PARAM
-#define YYLEX		yylex(&yylval, YYLEX_PARAM)
-#else
-#define YYLEX		yylex(&yylval)
-#endif
-#endif /* not YYLSP_NEEDED */
-#endif
-
-/* If nonreentrant, generate the variables here */
-
-#ifndef YYPURE
-
-int	yychar;			/*  the lookahead symbol		*/
-YYSTYPE	yylval;			/*  the semantic value of the		*/
-				/*  lookahead symbol			*/
-
-#ifdef YYLSP_NEEDED
-YYLTYPE yylloc;			/*  location data for the lookahead	*/
-				/*  symbol				*/
-#endif
-
-int yynerrs;			/*  number of parse errors so far       */
-#endif  /* not YYPURE */
-
-#if YYDEBUG != 0
-int yydebug;			/*  nonzero means print parse trace	*/
-/* Since this is uninitialized, it does not stop multiple parsers
-   from coexisting.  */
-#endif
-
-/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/
-
-#ifndef	YYINITDEPTH
-#define YYINITDEPTH 200
-#endif
-
-/*  YYMAXDEPTH is the maximum size the stacks can grow to
-    (effective only if the built-in stack extension method is used).  */
-
-#if YYMAXDEPTH == 0
-#undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 10000
-#endif
-
-/* Prevent warning if -Wstrict-prototypes.  */
-#ifdef __GNUC__
-int yyparse (void);
-#endif
-
-#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
-#define __yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
-#else				/* not GNU C or C++ */
-#ifndef __cplusplus
-
-/* This is the most reliable way to avoid incompatibilities
-   in available built-in functions on various systems.  */
-static void
-__yy_memcpy (to, from, count)
-     char *to;
-     char *from;
-     int count;
-{
-  register char *f = from;
-  register char *t = to;
-  register int i = count;
-
-  while (i-- > 0)
-    *t++ = *f++;
-}
-
-#else /* __cplusplus */
-
-/* This is the most reliable way to avoid incompatibilities
-   in available built-in functions on various systems.  */
-static void
-__yy_memcpy (char *to, char *from, int count)
-{
-  register char *f = from;
-  register char *t = to;
-  register int i = count;
-
-  while (i-- > 0)
-    *t++ = *f++;
-}
-
-#endif
-#endif
-
-#line 196 "/dn29/PRODUCTS/maintenance/Mandriva2008/bison-1.25/share/bison.simple"
-
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
-   into yyparse.  The argument should have type void *.
-   It should actually point to an object.
-   Grammar actions can access the variable by casting it
-   to the proper pointer type.  */
-
-#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
-#else /* not YYPARSE_PARAM */
-#define YYPARSE_PARAM_ARG
-#define YYPARSE_PARAM_DECL
-#endif /* not YYPARSE_PARAM */
-
-int
-yyparse(YYPARSE_PARAM_ARG)
-     YYPARSE_PARAM_DECL
-{
-  register int yystate;
-  register int yyn;
-  register short *yyssp;
-  register YYSTYPE *yyvsp;
-  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
-  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */
-
-  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
-  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/
-
-  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
-  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */
-
-#ifdef YYLSP_NEEDED
-  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
-  YYLTYPE *yyls = yylsa;
-  YYLTYPE *yylsp;
-
-#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
-#else
-#define YYPOPSTACK   (yyvsp--, yyssp--)
-#endif
-
-  int yystacksize = YYINITDEPTH;
-
-#ifdef YYPURE
-  int yychar;
-  YYSTYPE yylval;
-  int yynerrs;
-#ifdef YYLSP_NEEDED
-  YYLTYPE yylloc;
-#endif
-#endif
-
-  YYSTYPE yyval;		/*  the variable used to return		*/
-				/*  semantic values from the action	*/
-				/*  routines				*/
-
-  int yylen;
-
-#if YYDEBUG != 0
-  if (yydebug)
-    fprintf(stderr, "Starting parse\n");
-#endif
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-
-  yyssp = yyss - 1;
-  yyvsp = yyvs;
-#ifdef YYLSP_NEEDED
-  yylsp = yyls;
-#endif
-
-/* Push a new state, which is found in  yystate  .  */
-/* In all cases, when you get here, the value and location stacks
-   have just been pushed. so pushing a state here evens the stacks.  */
-yynewstate:
-
-  *++yyssp = yystate;
-
-  if (yyssp >= yyss + yystacksize - 1)
-    {
-      /* Give user a chance to reallocate the stack */
-      /* Use copies of these so that the &'s don't force the real ones into memory. */
-      YYSTYPE *yyvs1 = yyvs;
-      short *yyss1 = yyss;
-#ifdef YYLSP_NEEDED
-      YYLTYPE *yyls1 = yyls;
-#endif
-
-      /* Get the current used size of the three stacks, in elements.  */
-      int size = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      /* Each stack pointer address is followed by the size of
-	 the data in use in that stack, in bytes.  */
-#ifdef YYLSP_NEEDED
-      /* This used to be a conditional around just the two extra args,
-	 but that might be undefined if yyoverflow is a macro.  */
-      yyoverflow("parser stack overflow",
-		 &yyss1, size * sizeof (*yyssp),
-		 &yyvs1, size * sizeof (*yyvsp),
-		 &yyls1, size * sizeof (*yylsp),
-		 &yystacksize);
-#else
-      yyoverflow("parser stack overflow",
-		 &yyss1, size * sizeof (*yyssp),
-		 &yyvs1, size * sizeof (*yyvsp),
-		 &yystacksize);
-#endif
-
-      yyss = yyss1; yyvs = yyvs1;
-#ifdef YYLSP_NEEDED
-      yyls = yyls1;
-#endif
-#else /* no yyoverflow */
-      /* Extend the stack our own way.  */
-      if (yystacksize >= YYMAXDEPTH)
-	{
-	  yyerror("parser stack overflow");
-	  return 2;
-	}
-      yystacksize *= 2;
-      if (yystacksize > YYMAXDEPTH)
-	yystacksize = YYMAXDEPTH;
-      yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
-      __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
-      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
-      __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
-#ifdef YYLSP_NEEDED
-      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
-      __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
-#endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + size - 1;
-      yyvsp = yyvs + size - 1;
-#ifdef YYLSP_NEEDED
-      yylsp = yyls + size - 1;
-#endif
-
-#if YYDEBUG != 0
-      if (yydebug)
-	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
-#endif
-
-      if (yyssp >= yyss + yystacksize - 1)
-	YYABORT;
-    }
-
-#if YYDEBUG != 0
-  if (yydebug)
-    fprintf(stderr, "Entering state %d\n", yystate);
-#endif
-
-  goto yybackup;
- yybackup:
-
-/* Do appropriate processing given the current state.  */
-/* Read a lookahead token if we need one and don't already have one.  */
-/* yyresume: */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-
-  yyn = yypact[yystate];
-  if (yyn == YYFLAG)
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* yychar is either YYEMPTY or YYEOF
-     or a valid token in external form.  */
-
-  if (yychar == YYEMPTY)
-    {
-#if YYDEBUG != 0
-      if (yydebug)
-	fprintf(stderr, "Reading a token: ");
-#endif
-      yychar = YYLEX;
-    }
-
-  /* Convert token to internal form (in yychar1) for indexing tables with */
-
-  if (yychar <= 0)		/* This means end of input. */
-    {
-      yychar1 = 0;
-      yychar = YYEOF;		/* Don't call YYLEX any more */
-
-#if YYDEBUG != 0
-      if (yydebug)
-	fprintf(stderr, "Now at end of input.\n");
-#endif
-    }
-  else
-    {
-      yychar1 = YYTRANSLATE(yychar);
-
-#if YYDEBUG != 0
-      if (yydebug)
-	{
-	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
-	  /* Give the individual parser a way to print the precise meaning
-	     of a token, for further debugging info.  */
-#ifdef YYPRINT
-	  YYPRINT (stderr, yychar, yylval);
-#endif
-	  fprintf (stderr, ")\n");
-	}
-#endif
-    }
-
-  yyn += yychar1;
-  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
-    goto yydefault;
-
-  yyn = yytable[yyn];
-
-  /* yyn is what to do for this token type in this state.
-     Negative => reduce, -yyn is rule number.
-     Positive => shift, yyn is new state.
-       New state is final state => don't bother to shift,
-       just return success.
-     0, or most negative number => error.  */
-
-  if (yyn < 0)
-    {
-      if (yyn == YYFLAG)
-	goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-  else if (yyn == 0)
-    goto yyerrlab;
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  /* Shift the lookahead token.  */
-
-#if YYDEBUG != 0
-  if (yydebug)
-    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
-#endif
-
-  /* Discard the token being shifted unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
-
-  *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
-  *++yylsp = yylloc;
-#endif
-
-  /* count tokens shifted since error; after three, turn off error status.  */
-  if (yyerrstatus) yyerrstatus--;
-
-  yystate = yyn;
-  goto yynewstate;
-
-/* Do the default action for the current state.  */
-yydefault:
-
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-
-/* Do a reduction.  yyn is the number of a rule to reduce with.  */
-yyreduce:
-  yylen = yyr2[yyn];
-  if (yylen > 0)
-    yyval = yyvsp[1-yylen]; /* implement default value of the action */
-
-#if YYDEBUG != 0
-  if (yydebug)
-    {
-      int i;
-
-      fprintf (stderr, "Reducing via rule %d (line %d), ",
-	       yyn, yyrline[yyn]);
-
-      /* Print the symbols being reduced, and their result.  */
-      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
-	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
-      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
-    }
-#endif
-
+/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
+#line 3 "bison.simple"
+
+/* Skeleton output parser for bison,
+   Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
+
+   This program 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; either version 1, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   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., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+
+
+#ifndef alloca
+#ifdef __GNUC__
+#define alloca __builtin_alloca
+#else /* not GNU C.  */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc)
+#include <alloca.h>
+#else /* not sparc */
+#if (  defined( MSDOS ) || defined( WNT )  ) && !defined (__TURBOC__)
+#include <malloc.h>
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+#include <malloc.h>
+ #pragma alloca
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc.  */
+#endif /* not GNU C.  */
+#endif /* alloca not defined.  */
+
+/* This is the parser code that is written into each bison parser
+  when the %semantic_parser declaration is not specified in the grammar.
+  It was written by Richard Stallman by simplifying the hairy parser
+  used when %semantic_parser is specified.  */
+
+/* Note: there must be only one dollar sign in this file.
+   It is replaced by the list of actions, each action
+   as one case of the switch.  */
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		-2
+#define YYEOF		0
+#define YYACCEPT	return(0)
+#define YYABORT 	return(1)
+#define YYERROR		goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+   This remains here temporarily to ease the
+   transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+#define YYFAIL		goto yyerrlab
+#define YYRECOVERING()  (!!yyerrstatus)
+#define YYBACKUP(token, value) \
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    { yychar = (token), yylval = (value);			\
+      yychar1 = YYTRANSLATE (yychar);				\
+      YYPOPSTACK;						\
+      goto yybackup;						\
+    }								\
+  else								\
+    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
+while (0)
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+#ifndef YYPURE
+#define YYLEX		yylex()
+#endif
+
+#ifdef YYPURE
+#ifdef YYLSP_NEEDED
+#define YYLEX		yylex(&yylval, &yylloc)
+#else
+#define YYLEX		yylex(&yylval)
+#endif
+#endif
+
+/* If nonreentrant, generate the variables here */
+
+#ifndef YYPURE
+
+int	yychar;			/*  the lookahead symbol		*/
+YYSTYPE	yylval;			/*  the semantic value of the		*/
+				/*  lookahead symbol			*/
+
+#ifdef YYLSP_NEEDED
+YYLTYPE yylloc;			/*  location data for the lookahead	*/
+				/*  symbol				*/
+#endif
+
+int yynerrs;			/*  number of parse errors so far       */
+#endif  /* not YYPURE */
+
+#if YYDEBUG != 0
+int yydebug;			/*  nonzero means print parse trace	*/
+/* Since this is uninitialized, it does not stop multiple parsers
+   from coexisting.  */
+#endif
+
+/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/
+
+#ifndef	YYINITDEPTH
+#define YYINITDEPTH 200
+#endif
+
+/*  YYMAXDEPTH is the maximum size the stacks can grow to
+    (effective only if the built-in stack extension method is used).  */
+
+#if YYMAXDEPTH == 0
+#undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 10000
+#endif
+
+#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
+#define __yy_bcopy(FROM,TO,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
+#else				/* not GNU C or C++ */
+#ifndef __cplusplus
+
+/* This is the most reliable way to avoid incompatibilities
+   in available built-in functions on various systems.  */
+static void
+__yy_bcopy (__from, __to, __count)
+     char *__from;
+     char *__to;
+     int __count;
+{
+  register char *f = __from;
+  register char *t = __to;
+  register int i = __count;
+
+  while (i-- > 0)
+    *t++ = *f++;
+}
+
+#else /* __cplusplus */
+
+/* This is the most reliable way to avoid incompatibilities
+   in available built-in functions on various systems.  */
+static void
+__yy_bcopy (char *__from, char *__to, int __count)
+{
+  register char *f = __from;
+  register char *t = __to;
+  register int i = __count;
+
+  while (i-- > 0)
+    *t++ = *f++;
+}
+
+#endif
+#endif
+
+#line 169 "bison.simple"
+int
+yyparse()
+{
+  register int yystate;
+  register int yyn;
+  register short *yyssp;
+  register YYSTYPE *yyvsp;
+  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
+  int yychar1;		/*  lookahead token as an internal (translated) token number */
+
+  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
+  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/
+
+  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
+  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */
+
+#ifdef YYLSP_NEEDED
+  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
+  YYLTYPE *yyls = yylsa;
+  YYLTYPE *yylsp;
+
+#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
+#else
+#define YYPOPSTACK   (yyvsp--, yyssp--)
+#endif
+
+  int yystacksize = YYINITDEPTH;
+
+#ifdef YYPURE
+  int yychar;
+  YYSTYPE yylval;
+  int yynerrs;
+#ifdef YYLSP_NEEDED
+  YYLTYPE yylloc;
+#endif
+#endif
+
+  YYSTYPE yyval;		/*  the variable used to return		*/
+				/*  semantic values from the action	*/
+				/*  routines				*/
+
+  int yylen;
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Starting parse\n");
+#endif
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss - 1;
+  yyvsp = yyvs;
+#ifdef YYLSP_NEEDED
+  yylsp = yyls;
+#endif
+
+/* Push a new state, which is found in  yystate  .  */
+/* In all cases, when you get here, the value and location stacks
+   have just been pushed. so pushing a state here evens the stacks.  */
+yynewstate:
+
+  *++yyssp = yystate;
+
+  if (yyssp >= yyss + yystacksize - 1)
+    {
+      /* Give user a chance to reallocate the stack */
+      /* Use copies of these so that the &'s don't force the real ones into memory. */
+      YYSTYPE *yyvs1 = yyvs;
+      short *yyss1 = yyss;
+#ifdef YYLSP_NEEDED
+      YYLTYPE *yyls1 = yyls;
+#endif
+
+      /* Get the current used size of the three stacks, in elements.  */
+      int size = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      /* Each stack pointer address is followed by the size of
+	 the data in use in that stack, in bytes.  */
+      yyoverflow("parser stack overflow",
+		 &yyss1, size * sizeof (*yyssp),
+		 &yyvs1, size * sizeof (*yyvsp),
+#ifdef YYLSP_NEEDED
+		 &yyls1, size * sizeof (*yylsp),
+#endif
+		 &yystacksize);
+
+      yyss = yyss1; yyvs = yyvs1;
+#ifdef YYLSP_NEEDED
+      yyls = yyls1;
+#endif
+#else /* no yyoverflow */
+      /* Extend the stack our own way.  */
+      if (yystacksize >= YYMAXDEPTH)
+	{
+	  yyerror("parser stack overflow");
+	  return 2;
+	}
+      yystacksize *= 2;
+      if (yystacksize > YYMAXDEPTH)
+	yystacksize = YYMAXDEPTH;
+      yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
+      __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
+      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
+      __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
+      __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
+#endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + size - 1;
+      yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+      yylsp = yyls + size - 1;
+#endif
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
+
+      if (yyssp >= yyss + yystacksize - 1)
+	YYABORT;
+    }
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Entering state %d\n", yystate);
+#endif
+
+  goto yybackup;
+ yybackup:
+
+/* Do appropriate processing given the current state.  */
+/* Read a lookahead token if we need one and don't already have one.  */
+/* yyresume: */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* yychar is either YYEMPTY or YYEOF
+     or a valid token in external form.  */
+
+  if (yychar == YYEMPTY)
+    {
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Reading a token: ");
+#endif
+      yychar = YYLEX;
+    }
+
+  /* Convert token to internal form (in yychar1) for indexing tables with */
+
+  if (yychar <= 0)		/* This means end of input. */
+    {
+      yychar1 = 0;
+      yychar = YYEOF;		/* Don't call YYLEX any more */
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Now at end of input.\n");
+#endif
+    }
+  else
+    {
+      yychar1 = YYTRANSLATE(yychar);
+
+#if YYDEBUG != 0
+      if (yydebug)
+	{
+	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+	  /* Give the individual parser a way to print the precise meaning
+	     of a token, for further debugging info.  */
+#ifdef YYPRINT
+	  YYPRINT (stderr, yychar, yylval);
+#endif
+	  fprintf (stderr, ")\n");
+	}
+#endif
+    }
+
+  yyn += yychar1;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+    goto yydefault;
+
+  yyn = yytable[yyn];
+
+  /* yyn is what to do for this token type in this state.
+     Negative => reduce, -yyn is rule number.
+     Positive => shift, yyn is new state.
+       New state is final state => don't bother to shift,
+       just return success.
+     0, or most negative number => error.  */
+
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrlab;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Shift the lookahead token.  */
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
+
+  /* Discard the token being shifted unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
+
+  *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  /* count tokens shifted since error; after three, turn off error status.  */
+  if (yyerrstatus) yyerrstatus--;
+
+  yystate = yyn;
+  goto yynewstate;
+
+/* Do the default action for the current state.  */
+yydefault:
+
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+
+/* Do a reduction.  yyn is the number of a rule to reduce with.  */
+yyreduce:
+  yylen = yyr2[yyn];
+  yyval = yyvsp[1-yylen]; /* implement default value of the action */
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      int i;
+
+      fprintf (stderr, "Reducing via rule %d (line %d), ",
+	       yyn, yyrline[yyn]);
+
+      /* Print the symbols being reduced, and their result.  */
+      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
+      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+    }
+#endif
+
 
   switch (yyn) {
 
 case 10:
-#line 69 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 69 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  rec_finfile();  return(0);  /*  fini pour celui-la  */  ;
     break;}
 case 15:
-#line 78 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 78 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  rec_finhead();  ;
     break;}
 case 16:
-#line 80 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 80 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  rec_typarg(rec_argIdent);     rec_newarg();  ;
     break;}
 case 17:
-#line 81 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 81 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  /* deja fait par lex*/ 	 rec_newarg();  ;
     break;}
 case 18:
-#line 82 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 82 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  rec_newarg();  ;
     break;}
 case 19:
-#line 83 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 83 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  rec_newarg();  ;
     break;}
 case 20:
-#line 84 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 84 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  rec_typarg(rec_argMisc);      rec_newarg();
 			   yyerrstatus = 1; yyclearin;  ;
     break;}
 case 21:
-#line 89 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 89 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  rec_listype();  ;
     break;}
 case 22:
-#line 92 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 92 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  rec_deblist();  ;
     break;}
 case 23:
-#line 95 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 95 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  if (modeprint > 0)
 		{  printf("Record no : %d -- ",nbrec+1);  rec_print(currec);  }
 	   rec_newent ();  yyerrstatus = 0; ;
     break;}
 case 40:
-#line 122 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 122 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  scope_debut();  ;
     break;}
 case 41:
-#line 125 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 125 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  rec_typarg(rec_argIdent);    rec_newarg();  ;
     break;}
 case 44:
-#line 131 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 131 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  rec_deblist();  ;
     break;}
 case 45:
-#line 134 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 134 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  scope_fin();  ;
     break;}
 case 46:
-#line 136 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 136 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  printf("***  Warning : Export List not yet processed\n");
 	   rec_newent();  scope_fin() ; ;
     break;}
 case 47:
-#line 141 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 141 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  rec_ident();  ;
     break;}
 case 48:
-#line 144 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+#line 144 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 {  rec_type ();  ;
     break;}
 }
-   /* the action file gets copied in in place of this dollarsign */
-#line 498 "/dn29/PRODUCTS/maintenance/Mandriva2008/bison-1.25/share/bison.simple"
-
-  yyvsp -= yylen;
-  yyssp -= yylen;
-#ifdef YYLSP_NEEDED
-  yylsp -= yylen;
-#endif
-
-#if YYDEBUG != 0
-  if (yydebug)
-    {
-      short *ssp1 = yyss - 1;
-      fprintf (stderr, "state stack now");
-      while (ssp1 != yyssp)
-	fprintf (stderr, " %d", *++ssp1);
-      fprintf (stderr, "\n");
-    }
-#endif
-
-  *++yyvsp = yyval;
-
-#ifdef YYLSP_NEEDED
-  yylsp++;
-  if (yylen == 0)
-    {
-      yylsp->first_line = yylloc.first_line;
-      yylsp->first_column = yylloc.first_column;
-      yylsp->last_line = (yylsp-1)->last_line;
-      yylsp->last_column = (yylsp-1)->last_column;
-      yylsp->text = 0;
-    }
-  else
-    {
-      yylsp->last_line = (yylsp+yylen-1)->last_line;
-      yylsp->last_column = (yylsp+yylen-1)->last_column;
-    }
-#endif
-
-  /* Now "shift" the result of the reduction.
-     Determine what state that goes to,
-     based on the state we popped back to
-     and the rule number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
-  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTBASE];
-
-  goto yynewstate;
-
-yyerrlab:   /* here on detecting error */
-
-  if (! yyerrstatus)
-    /* If not already recovering from an error, report this error.  */
-    {
-      ++yynerrs;
-
-#ifdef YYERROR_VERBOSE
-      yyn = yypact[yystate];
-
-      if (yyn > YYFLAG && yyn < YYLAST)
-	{
-	  int size = 0;
-	  char *msg;
-	  int x, count;
-
-	  count = 0;
-	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
-	  for (x = (yyn < 0 ? -yyn : 0);
-	       x < (sizeof(yytname) / sizeof(char *)); x++)
-	    if (yycheck[x + yyn] == x)
-	      size += strlen(yytname[x]) + 15, count++;
-	  msg = (char *) malloc(size + 15);
-	  if (msg != 0)
-	    {
-	      strcpy(msg, "parse error");
-
-	      if (count < 5)
-		{
-		  count = 0;
-		  for (x = (yyn < 0 ? -yyn : 0);
-		       x < (sizeof(yytname) / sizeof(char *)); x++)
-		    if (yycheck[x + yyn] == x)
-		      {
-			strcat(msg, count == 0 ? ", expecting `" : " or `");
-			strcat(msg, yytname[x]);
-			strcat(msg, "'");
-			count++;
-		      }
-		}
-	      yyerror(msg);
-	      free(msg);
-	    }
-	  else
-	    yyerror ("parse error; also virtual memory exceeded");
-	}
-      else
-#endif /* YYERROR_VERBOSE */
-	yyerror("parse error");
-    }
-
-  goto yyerrlab1;
-yyerrlab1:   /* here on error raised explicitly by an action */
-
-  if (yyerrstatus == 3)
-    {
-      /* if just tried and failed to reuse lookahead token after an error, discard it.  */
-
-      /* return failure if at end of input */
-      if (yychar == YYEOF)
-	YYABORT;
-
-#if YYDEBUG != 0
-      if (yydebug)
-	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
-#endif
-
-      yychar = YYEMPTY;
-    }
-
-  /* Else will try to reuse lookahead token
-     after shifting the error token.  */
-
-  yyerrstatus = 3;		/* Each real token shifted decrements this */
-
-  goto yyerrhandle;
-
-yyerrdefault:  /* current state does not do anything special for the error token. */
-
-#if 0
-  /* This is wrong; only states that explicitly want error tokens
-     should shift them.  */
-  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
-  if (yyn) goto yydefault;
-#endif
-
-yyerrpop:   /* pop the current state because it cannot handle the error token */
-
-  if (yyssp == yyss) YYABORT;
-  yyvsp--;
-  yystate = *--yyssp;
-#ifdef YYLSP_NEEDED
-  yylsp--;
-#endif
-
-#if YYDEBUG != 0
-  if (yydebug)
-    {
-      short *ssp1 = yyss - 1;
-      fprintf (stderr, "Error: state stack now");
-      while (ssp1 != yyssp)
-	fprintf (stderr, " %d", *++ssp1);
-      fprintf (stderr, "\n");
-    }
-#endif
-
-yyerrhandle:
-
-  yyn = yypact[yystate];
-  if (yyn == YYFLAG)
-    goto yyerrdefault;
-
-  yyn += YYTERROR;
-  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
-    goto yyerrdefault;
-
-  yyn = yytable[yyn];
-  if (yyn < 0)
-    {
-      if (yyn == YYFLAG)
-	goto yyerrpop;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-  else if (yyn == 0)
-    goto yyerrpop;
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-#if YYDEBUG != 0
-  if (yydebug)
-    fprintf(stderr, "Shifting error token, ");
-#endif
-
-  *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
-  *++yylsp = yylloc;
-#endif
-
-  yystate = yyn;
-  goto yynewstate;
-}
-#line 146 "/dn43/OCCT/tmp/results_15.04.2012/occt/release-sources-20120415/src/StepFile/step.yacc"
+   /* the action file gets copied in in place of this dollarsign */
+#line 442 "bison.simple"
+
+  yyvsp -= yylen;
+  yyssp -= yylen;
+#ifdef YYLSP_NEEDED
+  yylsp -= yylen;
+#endif
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      short *ssp1 = yyss - 1;
+      fprintf (stderr, "state stack now");
+      while (ssp1 != yyssp)
+	fprintf (stderr, " %d", *++ssp1);
+      fprintf (stderr, "\n");
+    }
+#endif
+
+  *++yyvsp = yyval;
+
+#ifdef YYLSP_NEEDED
+  yylsp++;
+  if (yylen == 0)
+    {
+      yylsp->first_line = yylloc.first_line;
+      yylsp->first_column = yylloc.first_column;
+      yylsp->last_line = (yylsp-1)->last_line;
+      yylsp->last_column = (yylsp-1)->last_column;
+      yylsp->text = 0;
+    }
+  else
+    {
+      yylsp->last_line = (yylsp+yylen-1)->last_line;
+      yylsp->last_column = (yylsp+yylen-1)->last_column;
+    }
+#endif
+
+  /* Now "shift" the result of the reduction.
+     Determine what state that goes to,
+     based on the state we popped back to
+     and the rule number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTBASE];
+
+  goto yynewstate;
+
+yyerrlab:   /* here on detecting error */
+
+  if (! yyerrstatus)
+    /* If not already recovering from an error, report this error.  */
+    {
+      ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+      yyn = yypact[yystate];
+
+      if (yyn > YYFLAG && yyn < YYLAST)
+	{
+	  int size = 0;
+	  char *msg;
+	  int x, count;
+
+	  count = 0;
+	  for (x = 0; x < (sizeof(yytname) / sizeof(char *)); x++)
+	    if (yycheck[x + yyn] == x)
+	      size += strlen(yytname[x]) + 15, count++;
+	  msg = (char *) malloc(size + 15);
+	  if (msg != 0)
+	    {
+	      strcpy(msg, "parse error");
+
+	      if (count < 5)
+		{
+		  count = 0;
+		  for (x = 0; x < (sizeof(yytname) / sizeof(char *)); x++)
+		    if (yycheck[x + yyn] == x)
+		      {
+			strcat(msg, count == 0 ? ", expecting `" : " or `");
+			strcat(msg, yytname[x]);
+			strcat(msg, "'");
+			count++;
+		      }
+		}
+	      yyerror(msg);
+	      free(msg);
+	    }
+	  else
+	    yyerror ("parse error; also virtual memory exceeded");
+	}
+      else
+#endif /* YYERROR_VERBOSE */
+	yyerror("parse error");
+    }
+
+  goto yyerrlab1;
+yyerrlab1:   /* here on error raised explicitly by an action */
+
+  if (yyerrstatus == 3)
+    {
+      /* if just tried and failed to reuse lookahead token after an error, discard it.  */
+
+      /* return failure if at end of input */
+      if (yychar == YYEOF)
+	YYABORT;
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+#endif
+
+      yychar = YYEMPTY;
+    }
+
+  /* Else will try to reuse lookahead token
+     after shifting the error token.  */
+
+  yyerrstatus = 3;		/* Each real token shifted decrements this */
+
+  goto yyerrhandle;
+
+yyerrdefault:  /* current state does not do anything special for the error token. */
+
+#if 0
+  /* This is wrong; only states that explicitly want error tokens
+     should shift them.  */
+  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
+  if (yyn) goto yydefault;
+#endif
+
+yyerrpop:   /* pop the current state because it cannot handle the error token */
+
+  if (yyssp == yyss) YYABORT;
+  yyvsp--;
+  yystate = *--yyssp;
+#ifdef YYLSP_NEEDED
+  yylsp--;
+#endif
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      short *ssp1 = yyss - 1;
+      fprintf (stderr, "Error: state stack now");
+      while (ssp1 != yyssp)
+	fprintf (stderr, " %d", *++ssp1);
+      fprintf (stderr, "\n");
+    }
+#endif
+
+yyerrhandle:
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yyerrdefault;
+
+  yyn += YYTERROR;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+    goto yyerrdefault;
+
+  yyn = yytable[yyn];
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrpop;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrpop;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Shifting error token, ");
+#endif
+
+  *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  yystate = yyn;
+  goto yynewstate;
+}
+#line 146 "/misc/dn47/KAS/builds/inv/LocalWOK/wok_entities/LOC/dev/inv-IR-2012-11-09-IR-2012-11-09-OCCT/src/StepFile/step.yacc"
 
 
 #ifdef _MSC_VER
diff --git a/drv/TNaming/TNaming.jxx b/drv/TNaming/TNaming.jxx
index 795587d..e39de3e 100644
--- a/drv/TNaming/TNaming.jxx
+++ b/drv/TNaming/TNaming.jxx
@@ -22,6 +22,18 @@
 #ifndef _TopTools_HArray1OfShape_HeaderFile
 #include <TopTools_HArray1OfShape.hxx>
 #endif
+#ifndef _TopoDS_Face_HeaderFile
+#include <TopoDS_Face.hxx>
+#endif
+#ifndef _TopoDS_Wire_HeaderFile
+#include <TopoDS_Wire.hxx>
+#endif
+#ifndef _TopoDS_Solid_HeaderFile
+#include <TopoDS_Solid.hxx>
+#endif
+#ifndef _TopoDS_Shell_HeaderFile
+#include <TopoDS_Shell.hxx>
+#endif
 #ifndef _TDF_IDList_HeaderFile
 #include <TDF_IDList.hxx>
 #endif
diff --git a/drv/TNaming/TNaming_Builder.jxx b/drv/TNaming/TNaming_Builder.jxx
index 822b9db..30489ac 100644
--- a/drv/TNaming/TNaming_Builder.jxx
+++ b/drv/TNaming/TNaming_Builder.jxx
@@ -1,3 +1,9 @@
+#ifndef _TNaming_UsedShapes_HeaderFile
+#include <TNaming_UsedShapes.hxx>
+#endif
+#ifndef _TNaming_NamedShape_HeaderFile
+#include <TNaming_NamedShape.hxx>
+#endif
 #ifndef _Standard_ConstructionError_HeaderFile
 #include <Standard_ConstructionError.hxx>
 #endif
@@ -7,9 +13,6 @@
 #ifndef _TopoDS_Shape_HeaderFile
 #include <TopoDS_Shape.hxx>
 #endif
-#ifndef _TNaming_NamedShape_HeaderFile
-#include <TNaming_NamedShape.hxx>
-#endif
 #ifndef _TNaming_Builder_HeaderFile
 #include <TNaming_Builder.hxx>
 #endif
diff --git a/drv/TNaming/TNaming_NamedShape.ixx b/drv/TNaming/TNaming_NamedShape.ixx
index 5f4052b..2e7048d 100644
--- a/drv/TNaming/TNaming_NamedShape.ixx
+++ b/drv/TNaming/TNaming_NamedShape.ixx
@@ -9,7 +9,6 @@
 #include <Standard_Type.hxx>
 #endif
 
-
  
 
 
diff --git a/drv/V3d/V3d_View.jxx b/drv/V3d/V3d_View.jxx
index 8700b4d..aa2ad67 100644
--- a/drv/V3d/V3d_View.jxx
+++ b/drv/V3d/V3d_View.jxx
@@ -82,9 +82,6 @@
 #ifndef _PlotMgt_PlotterDriver_HeaderFile
 #include <PlotMgt_PlotterDriver.hxx>
 #endif
-#ifndef _Image_PixMap_HeaderFile
-#include <Image_PixMap.hxx>
-#endif
 #ifndef _V3d_View_HeaderFile
 #include <V3d_View.hxx>
 #endif
diff --git a/drv/WNT/WNT_PixMap.ixx b/drv/WNT/WNT_PixMap.ixx
deleted file mode 100644
index 62875ae..0000000
--- a/drv/WNT/WNT_PixMap.ixx
+++ /dev/null
@@ -1,29 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#include <WNT_PixMap.jxx>
-
-#ifndef _Standard_Type_HeaderFile
-#include <Standard_Type.hxx>
-#endif
-
- 
-
-
-IMPLEMENT_STANDARD_TYPE(WNT_PixMap)
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
-  STANDARD_TYPE(Aspect_PixMap),
-  STANDARD_TYPE(MMgt_TShared),
-  STANDARD_TYPE(Standard_Transient),
-
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-IMPLEMENT_STANDARD_TYPE_END(WNT_PixMap)
-
-
-IMPLEMENT_DOWNCAST(WNT_PixMap,Standard_Transient)
-IMPLEMENT_STANDARD_RTTI(WNT_PixMap)
-
-
-
diff --git a/drv/WNT/WNT_PixMap.jxx b/drv/WNT/WNT_PixMap.jxx
deleted file mode 100644
index 0eab132..0000000
--- a/drv/WNT/WNT_PixMap.jxx
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef _Aspect_Window_HeaderFile
-#include <Aspect_Window.hxx>
-#endif
-#ifndef _Aspect_PixmapDefinitionError_HeaderFile
-#include <Aspect_PixmapDefinitionError.hxx>
-#endif
-#ifndef _Aspect_PixmapError_HeaderFile
-#include <Aspect_PixmapError.hxx>
-#endif
-#ifndef _Quantity_Color_HeaderFile
-#include <Quantity_Color.hxx>
-#endif
-#ifndef _WNT_PixMap_HeaderFile
-#include <WNT_PixMap.hxx>
-#endif
diff --git a/drv/WNT/WNT_Window.jxx b/drv/WNT/WNT_Window.jxx
index c97a257..e41e50e 100644
--- a/drv/WNT/WNT_Window.jxx
+++ b/drv/WNT/WNT_Window.jxx
@@ -19,9 +19,6 @@
 #ifndef _WNT_IconBox_HeaderFile
 #include <WNT_IconBox.hxx>
 #endif
-#ifndef _WNT_PixMap_HeaderFile
-#include <WNT_PixMap.hxx>
-#endif
 #ifndef _WNT_GraphicDevice_HeaderFile
 #include <WNT_GraphicDevice.hxx>
 #endif
@@ -34,9 +31,6 @@
 #ifndef _Aspect_GradientBackground_HeaderFile
 #include <Aspect_GradientBackground.hxx>
 #endif
-#ifndef _Aspect_PixMap_HeaderFile
-#include <Aspect_PixMap.hxx>
-#endif
 #ifndef _WNT_Window_HeaderFile
 #include <WNT_Window.hxx>
 #endif
diff --git a/drv/Xw/Xw_PixMap.ixx b/drv/Xw/Xw_PixMap.ixx
deleted file mode 100644
index cc6b362..0000000
--- a/drv/Xw/Xw_PixMap.ixx
+++ /dev/null
@@ -1,30 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#include <Xw_PixMap.jxx>
-
-#ifndef _Standard_Type_HeaderFile
-#include <Standard_Type.hxx>
-#endif
-
-
- 
-
-
-IMPLEMENT_STANDARD_TYPE(Xw_PixMap)
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
-  STANDARD_TYPE(Aspect_PixMap),
-  STANDARD_TYPE(MMgt_TShared),
-  STANDARD_TYPE(Standard_Transient),
-
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-IMPLEMENT_STANDARD_TYPE_END(Xw_PixMap)
-
-
-IMPLEMENT_DOWNCAST(Xw_PixMap,Standard_Transient)
-IMPLEMENT_STANDARD_RTTI(Xw_PixMap)
-
-
-
diff --git a/drv/Xw/Xw_PixMap.jxx b/drv/Xw/Xw_PixMap.jxx
deleted file mode 100644
index 3d739c8..0000000
--- a/drv/Xw/Xw_PixMap.jxx
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _Xw_Window_HeaderFile
-#include <Xw_Window.hxx>
-#endif
-#ifndef _Aspect_PixmapDefinitionError_HeaderFile
-#include <Aspect_PixmapDefinitionError.hxx>
-#endif
-#ifndef _Aspect_PixmapError_HeaderFile
-#include <Aspect_PixmapError.hxx>
-#endif
-#ifndef _Aspect_Window_HeaderFile
-#include <Aspect_Window.hxx>
-#endif
-#ifndef _Quantity_Color_HeaderFile
-#include <Quantity_Color.hxx>
-#endif
-#ifndef _Xw_PixMap_HeaderFile
-#include <Xw_PixMap.hxx>
-#endif
diff --git a/drv/Xw/Xw_Window.jxx b/drv/Xw/Xw_Window.jxx
index 0592abb..a3864c3 100644
--- a/drv/Xw/Xw_Window.jxx
+++ b/drv/Xw/Xw_Window.jxx
@@ -25,9 +25,6 @@
 #ifndef _Xw_IconBox_HeaderFile
 #include <Xw_IconBox.hxx>
 #endif
-#ifndef _Xw_PixMap_HeaderFile
-#include <Xw_PixMap.hxx>
-#endif
 #ifndef _Xw_GraphicDevice_HeaderFile
 #include <Xw_GraphicDevice.hxx>
 #endif
@@ -40,9 +37,6 @@
 #ifndef _Aspect_GradientBackground_HeaderFile
 #include <Aspect_GradientBackground.hxx>
 #endif
-#ifndef _Aspect_PixMap_HeaderFile
-#include <Aspect_PixMap.hxx>
-#endif
 #ifndef _Xw_Window_HeaderFile
 #include <Xw_Window.hxx>
 #endif
diff --git a/env.bat b/env.bat
index 6b73193..89eaef0 100755
--- a/env.bat
+++ b/env.bat
@@ -9,11 +9,9 @@ rem   vc9 win32 Release
 
 set "SCRIPTROOT=%~dp0"
 set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
-set "CASROOT="
-if not ["%CASROOT%"] == [""] if exist "%SCRIPTROOT%\%CASROOT%" set "CASROOT=%SCRIPTROOT%\%CASROOT%"
-if     ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
 
 rem ----- Reset values to defaults -----
+set "CASROOT="
 set "CASDEB="
 set "VCVER=vc9"
 set "ARCH=32"
@@ -32,6 +30,9 @@ if exist %~dp0custom.bat (
   call %~dp0custom.bat %1 %2 %3 %4 %5
 )
 
+if not ["%CASROOT%"] == [""] if exist "%SCRIPTROOT%\%CASROOT%" set "CASROOT=%SCRIPTROOT%\%CASROOT%"
+if     ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
+
 rem ----- Read script arguments (override local settings) -----
 if not ["%1"]    == [""]      set "VCVER=%1"
 if not ["%2"]    == [""]      set "ARCH=%2"
@@ -40,15 +41,15 @@ if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
 if /I ["%3"]     == ["debug"] set "CASDEB=d"
 if /I ["%3"]     == ["d"]     set "CASDEB=d"
 
-set "CSF_OPT_INC=%CSF_OPT_INC%;%CASROOT%\inc"
-set "CSF_OPT_LIB32D=%CSF_OPT_LIB32%;%CASROOT%\win32\%VCVER%\libd"
-set "CSF_OPT_LIB64D=%CSF_OPT_LIB64%;%CASROOT%\win64\%VCVER%\libd"
-set "CSF_OPT_BIN32D=%CSF_OPT_BIN32%;%CASROOT%\win32\%VCVER%\bind"
-set "CSF_OPT_BIN64D=%CSF_OPT_BIN64%;%CASROOT%\win64\%VCVER%\bind"
-set "CSF_OPT_LIB32=%CSF_OPT_LIB32%;%CASROOT%\win32\%VCVER%\lib"
-set "CSF_OPT_LIB64=%CSF_OPT_LIB64%;%CASROOT%\win64\%VCVER%\lib"
-set "CSF_OPT_BIN32=%CSF_OPT_BIN32%;%CASROOT%\win32\%VCVER%\bin"
-set "CSF_OPT_BIN64=%CSF_OPT_BIN64%;%CASROOT%\win64\%VCVER%\bin"
+set "CSF_OPT_INC=%CSF_OPT_INC%;%SCRIPTROOT%\inc"
+set "CSF_OPT_LIB32D=%CSF_OPT_LIB32%;%SCRIPTROOT%\win32\%VCVER%\libd"
+set "CSF_OPT_LIB64D=%CSF_OPT_LIB64%;%SCRIPTROOT%\win64\%VCVER%\libd"
+set "CSF_OPT_BIN32D=%CSF_OPT_BIN32%;%SCRIPTROOT%\win32\%VCVER%\bind"
+set "CSF_OPT_BIN64D=%CSF_OPT_BIN64%;%SCRIPTROOT%\win64\%VCVER%\bind"
+set "CSF_OPT_LIB32=%CSF_OPT_LIB32%;%SCRIPTROOT%\win32\%VCVER%\lib"
+set "CSF_OPT_LIB64=%CSF_OPT_LIB64%;%SCRIPTROOT%\win64\%VCVER%\lib"
+set "CSF_OPT_BIN32=%CSF_OPT_BIN32%;%SCRIPTROOT%\win32\%VCVER%\bin"
+set "CSF_OPT_BIN64=%CSF_OPT_BIN64%;%SCRIPTROOT%\win64\%VCVER%\bin"
 
 rem ----- Optional 3rd-parties should be enabled by HAVE macros -----
 set "CSF_OPT_CMPL="
@@ -105,6 +106,7 @@ if     ["%CASDEB%"] == [""] if ["%ARCH%"] == ["64"] set "PATH=%CSF_OPT_BIN64%;%P
 if not ["%CASDEB%"] == [""] if ["%ARCH%"] == ["32"] set "PATH=%CSF_OPT_BIN32D%;%PATH%"
 if not ["%CASDEB%"] == [""] if ["%ARCH%"] == ["64"] set "PATH=%CSF_OPT_BIN64D%;%PATH%"
 
+
 rem ----- Set envoronment variables used by OCCT -----
 set "CSF_MDTVFontDirectory=%CASROOT%\src\FontMFT"
 set CSF_LANGUAGE=us
diff --git a/env.sh b/env.sh
index 4f16a61..adc628b 100755
--- a/env.sh
+++ b/env.sh
@@ -94,7 +94,7 @@ fi
 export PATH="${CASROOT}/${CASBIN}/bin${CASDEB}:${PATH}"
 export LD_LIBRARY_PATH="${CASROOT}/${CASBIN}/lib${CASDEB}:${LD_LIBRARY_PATH}"
 
-# Set environment variables used by OCCT
+# Set envoronment variables used by OCCT
 export CSF_MDTVFontDirectory="${CASROOT}/src/FontMFT"
 export CSF_LANGUAGE="us"
 export MMGT_CLEAR="1"
@@ -128,4 +128,3 @@ fi
 if [ -e "${aScriptPath}/src/DrawResourcesProducts" ]; then
   export CSF_DrawPluginProductsDefaults="${aScriptPath}/src/DrawResourcesProducts"
 fi
-
diff --git a/inc/AIS.hxx b/inc/AIS.hxx
index 9dec356..2d5f68d 100644
--- a/inc/AIS.hxx
+++ b/inc/AIS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -250,18 +253,7 @@ class AIS_DataMapIteratorOfDataMapOfSelStat;
 class AIS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Returns the nearest point in a shape. This is used by <br>
diff --git a/inc/AIS2D.hxx b/inc/AIS2D.hxx
index 84ef5ee..920028a 100644
--- a/inc/AIS2D.hxx
+++ b/inc/AIS2D.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class AIS2D_DataMapIteratorOfDataMapOfLocStat;
 class AIS2D  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Save(const Handle(AIS2D_InteractiveContext)& aCntx,const Standard_CString aFile) ;
diff --git a/inc/AIS2D_DataMapIteratorOfDataMapOfIOStatus.hxx b/inc/AIS2D_DataMapIteratorOfDataMapOfIOStatus.hxx
index 988a2a2..d487cba 100644
--- a/inc/AIS2D_DataMapIteratorOfDataMapOfIOStatus.hxx
+++ b/inc/AIS2D_DataMapIteratorOfDataMapOfIOStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class AIS2D_DataMapNodeOfDataMapOfIOStatus;
 class AIS2D_DataMapIteratorOfDataMapOfIOStatus  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS2D_DataMapIteratorOfDataMapOfIOStatus();
diff --git a/inc/AIS2D_DataMapIteratorOfDataMapOfLC.hxx b/inc/AIS2D_DataMapIteratorOfDataMapOfLC.hxx
index acedfdd..5fdb69c 100644
--- a/inc/AIS2D_DataMapIteratorOfDataMapOfLC.hxx
+++ b/inc/AIS2D_DataMapIteratorOfDataMapOfLC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class AIS2D_DataMapNodeOfDataMapOfLC;
 class AIS2D_DataMapIteratorOfDataMapOfLC  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS2D_DataMapIteratorOfDataMapOfLC();
diff --git a/inc/AIS2D_DataMapIteratorOfDataMapOfLocStat.hxx b/inc/AIS2D_DataMapIteratorOfDataMapOfLocStat.hxx
index c613a77..e4085b1 100644
--- a/inc/AIS2D_DataMapIteratorOfDataMapOfLocStat.hxx
+++ b/inc/AIS2D_DataMapIteratorOfDataMapOfLocStat.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class AIS2D_DataMapNodeOfDataMapOfLocStat;
 class AIS2D_DataMapIteratorOfDataMapOfLocStat  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS2D_DataMapIteratorOfDataMapOfLocStat();
diff --git a/inc/AIS2D_DataMapIteratorOfDataMapOfPrimAspects.hxx b/inc/AIS2D_DataMapIteratorOfDataMapOfPrimAspects.hxx
index f4e99a2..4de5547 100644
--- a/inc/AIS2D_DataMapIteratorOfDataMapOfPrimAspects.hxx
+++ b/inc/AIS2D_DataMapIteratorOfDataMapOfPrimAspects.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class AIS2D_DataMapNodeOfDataMapOfPrimAspects;
 class AIS2D_DataMapIteratorOfDataMapOfPrimAspects  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS2D_DataMapIteratorOfDataMapOfPrimAspects();
diff --git a/inc/AIS2D_DataMapOfIOStatus.hxx b/inc/AIS2D_DataMapOfIOStatus.hxx
index 923d1d5..90faeb0 100644
--- a/inc/AIS2D_DataMapOfIOStatus.hxx
+++ b/inc/AIS2D_DataMapOfIOStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class AIS2D_DataMapIteratorOfDataMapOfIOStatus;
 class AIS2D_DataMapOfIOStatus  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS2D_DataMapOfIOStatus(const Standard_Integer NbBuckets = 1);
diff --git a/inc/AIS2D_DataMapOfLC.hxx b/inc/AIS2D_DataMapOfLC.hxx
index ecddfbd..e581a6c 100644
--- a/inc/AIS2D_DataMapOfLC.hxx
+++ b/inc/AIS2D_DataMapOfLC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class AIS2D_DataMapIteratorOfDataMapOfLC;
 class AIS2D_DataMapOfLC  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS2D_DataMapOfLC(const Standard_Integer NbBuckets = 1);
diff --git a/inc/AIS2D_DataMapOfLocStat.hxx b/inc/AIS2D_DataMapOfLocStat.hxx
index 8a64f2e..899146f 100644
--- a/inc/AIS2D_DataMapOfLocStat.hxx
+++ b/inc/AIS2D_DataMapOfLocStat.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class AIS2D_DataMapIteratorOfDataMapOfLocStat;
 class AIS2D_DataMapOfLocStat  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS2D_DataMapOfLocStat(const Standard_Integer NbBuckets = 1);
diff --git a/inc/AIS2D_DataMapOfPrimAspects.hxx b/inc/AIS2D_DataMapOfPrimAspects.hxx
index 7a45802..682141f 100644
--- a/inc/AIS2D_DataMapOfPrimAspects.hxx
+++ b/inc/AIS2D_DataMapOfPrimAspects.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class AIS2D_DataMapIteratorOfDataMapOfPrimAspects;
 class AIS2D_DataMapOfPrimAspects  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS2D_DataMapOfPrimAspects(const Standard_Integer NbBuckets = 1);
diff --git a/inc/AIS2D_ListIteratorOfListOfIO.hxx b/inc/AIS2D_ListIteratorOfListOfIO.hxx
index cee1a17..ab75cb4 100644
--- a/inc/AIS2D_ListIteratorOfListOfIO.hxx
+++ b/inc/AIS2D_ListIteratorOfListOfIO.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class AIS2D_ListNodeOfListOfIO;
 class AIS2D_ListIteratorOfListOfIO  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS2D_ListIteratorOfListOfIO();
diff --git a/inc/AIS2D_ListOfIO.hxx b/inc/AIS2D_ListOfIO.hxx
index 785e396..9ab30cb 100644
--- a/inc/AIS2D_ListOfIO.hxx
+++ b/inc/AIS2D_ListOfIO.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class AIS2D_ListNodeOfListOfIO;
 class AIS2D_ListOfIO  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS2D_ListOfIO();
diff --git a/inc/AIS2D_SequenceOfIO.hxx b/inc/AIS2D_SequenceOfIO.hxx
index 9bdc448..ed0e5dc 100644
--- a/inc/AIS2D_SequenceOfIO.hxx
+++ b/inc/AIS2D_SequenceOfIO.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class AIS2D_SequenceNodeOfSequenceOfIO;
 class AIS2D_SequenceOfIO  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       AIS2D_SequenceOfIO();
diff --git a/inc/AIS2D_SequenceOfPrimArchit.hxx b/inc/AIS2D_SequenceOfPrimArchit.hxx
index 59323c0..9cbde3e 100644
--- a/inc/AIS2D_SequenceOfPrimArchit.hxx
+++ b/inc/AIS2D_SequenceOfPrimArchit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class AIS2D_SequenceNodeOfSequenceOfPrimArchit;
 class AIS2D_SequenceOfPrimArchit  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       AIS2D_SequenceOfPrimArchit();
diff --git a/inc/AIS_DataMapIteratorOfDataMapOfILC.hxx b/inc/AIS_DataMapIteratorOfDataMapOfILC.hxx
index 5eb2729..02277ee 100644
--- a/inc/AIS_DataMapIteratorOfDataMapOfILC.hxx
+++ b/inc/AIS_DataMapIteratorOfDataMapOfILC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class AIS_DataMapNodeOfDataMapOfILC;
 class AIS_DataMapIteratorOfDataMapOfILC  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_DataMapIteratorOfDataMapOfILC();
diff --git a/inc/AIS_DataMapIteratorOfDataMapOfIOStatus.hxx b/inc/AIS_DataMapIteratorOfDataMapOfIOStatus.hxx
index 56d8a81..c42b007 100644
--- a/inc/AIS_DataMapIteratorOfDataMapOfIOStatus.hxx
+++ b/inc/AIS_DataMapIteratorOfDataMapOfIOStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class AIS_DataMapNodeOfDataMapOfIOStatus;
 class AIS_DataMapIteratorOfDataMapOfIOStatus  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_DataMapIteratorOfDataMapOfIOStatus();
diff --git a/inc/AIS_DataMapIteratorOfDataMapOfSelStat.hxx b/inc/AIS_DataMapIteratorOfDataMapOfSelStat.hxx
index b3217e6..711fe5c 100644
--- a/inc/AIS_DataMapIteratorOfDataMapOfSelStat.hxx
+++ b/inc/AIS_DataMapIteratorOfDataMapOfSelStat.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class AIS_DataMapNodeOfDataMapOfSelStat;
 class AIS_DataMapIteratorOfDataMapOfSelStat  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_DataMapIteratorOfDataMapOfSelStat();
diff --git a/inc/AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive.hxx b/inc/AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive.hxx
index 2a889a9..ed2fb7a 100644
--- a/inc/AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive.hxx
+++ b/inc/AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class AIS_DataMapNodeOfDataMapofIntegerListOfinteractive;
 class AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive();
diff --git a/inc/AIS_DataMapOfILC.hxx b/inc/AIS_DataMapOfILC.hxx
index d83bdbe..1be1bb2 100644
--- a/inc/AIS_DataMapOfILC.hxx
+++ b/inc/AIS_DataMapOfILC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class AIS_DataMapIteratorOfDataMapOfILC;
 class AIS_DataMapOfILC  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_DataMapOfILC(const Standard_Integer NbBuckets = 1);
diff --git a/inc/AIS_DataMapOfIOStatus.hxx b/inc/AIS_DataMapOfIOStatus.hxx
index 6919e6e..9d72f5e 100644
--- a/inc/AIS_DataMapOfIOStatus.hxx
+++ b/inc/AIS_DataMapOfIOStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class AIS_DataMapIteratorOfDataMapOfIOStatus;
 class AIS_DataMapOfIOStatus  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_DataMapOfIOStatus(const Standard_Integer NbBuckets = 1);
diff --git a/inc/AIS_DataMapOfSelStat.hxx b/inc/AIS_DataMapOfSelStat.hxx
index af86bd9..bad80cc 100644
--- a/inc/AIS_DataMapOfSelStat.hxx
+++ b/inc/AIS_DataMapOfSelStat.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class AIS_DataMapIteratorOfDataMapOfSelStat;
 class AIS_DataMapOfSelStat  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_DataMapOfSelStat(const Standard_Integer NbBuckets = 1);
diff --git a/inc/AIS_DataMapofIntegerListOfinteractive.hxx b/inc/AIS_DataMapofIntegerListOfinteractive.hxx
index cca621b..9f488ac 100644
--- a/inc/AIS_DataMapofIntegerListOfinteractive.hxx
+++ b/inc/AIS_DataMapofIntegerListOfinteractive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive;
 class AIS_DataMapofIntegerListOfinteractive  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_DataMapofIntegerListOfinteractive(const Standard_Integer NbBuckets = 1);
diff --git a/inc/AIS_Drawer.hxx b/inc/AIS_Drawer.hxx
index 84681ee..76b3d81 100644
--- a/inc/AIS_Drawer.hxx
+++ b/inc/AIS_Drawer.hxx
@@ -371,6 +371,27 @@ public:
 //!          Color: Quantity_NOC_SKYBLUE <br>
 //!          Type of line: Aspect_TOL_SOLID Width: 1. <br>
   Standard_EXPORT     Handle_Prs3d_LineAspect VectorAspect() ;
+  //! Enables or disables drawing of face boundaries for shading presentations. <br>
+//! The method sets drawing flag owned by the drawer that will be used during <br>
+//! visualization instead of the one set in link. <br>
+//! theIsEnabled is a boolean flag indicating whether the face boundaries should be <br>
+//! drawn or not. <br>
+  Standard_EXPORT     void SetFaceBoundaryDraw(const Standard_Boolean theIsEnabled) ;
+  //! Checks whether the drawing of face boundaries is enabled or not. <br>
+  Standard_EXPORT     Standard_Boolean IsFaceBoundaryDraw() const;
+  //! Sets line aspect for face boundaries. <br>
+//! The method sets line aspect owned by the drawer that will be used during <br>
+//! visualization instead of the one set in link. <br>
+//! theAspect is the line aspect that determines the look of the face boundaries. <br>
+  Standard_EXPORT     void SetFaceBoundaryAspect(const Handle(Prs3d_LineAspect)& theAspect) ;
+  //! Returns line aspect of face boundaries. <br>
+  Standard_EXPORT     Handle_Prs3d_LineAspect FaceBoundaryAspect() ;
+  //! Returns true if the drawer has its own attribute for <br>
+//! "draw face boundaries" flag that overrides the one in the link. <br>
+        Standard_Boolean IsOwnFaceBoundaryDraw() const;
+  //! Returns true if the drawer has its own attribute for <br>
+//! face boundaries aspect that overrides the one in the link. <br>
+        Standard_Boolean IsOwnFaceBoundaryAspect() const;
   
         Standard_Boolean HasDatumAspect() const;
   //! Returns a link with Prs3d_Drawer_DatumAspect, <br>
@@ -446,6 +467,7 @@ Standard_Real myPreviousDeviationAngle;
 Standard_Boolean myhasOwnHLRDeviationAngle;
 Standard_Real myOwnHLRDeviationAngle;
 Standard_Real myPreviousHLRDeviationAngle;
+Standard_Boolean myHasOwnFaceBoundaryDraw;
 
 
 };
diff --git a/inc/AIS_Drawer.lxx b/inc/AIS_Drawer.lxx
index 3e3e644..c4608ca 100644
--- a/inc/AIS_Drawer.lxx
+++ b/inc/AIS_Drawer.lxx
@@ -94,3 +94,8 @@ inline Standard_Boolean AIS_Drawer::HasPlaneAspect ()  const
 inline Standard_Boolean AIS_Drawer::HasLengthAspect ()  const 
 { return !myLengthAspect.IsNull();}
 
+inline Standard_Boolean AIS_Drawer::IsOwnFaceBoundaryDraw () const
+{ return myHasOwnFaceBoundaryDraw; }
+
+inline Standard_Boolean AIS_Drawer::IsOwnFaceBoundaryAspect () const
+{ return !myFaceBoundaryAspect.IsNull (); }
diff --git a/inc/AIS_GraphicTool.hxx b/inc/AIS_GraphicTool.hxx
index ddaecd2..e7405a4 100644
--- a/inc/AIS_GraphicTool.hxx
+++ b/inc/AIS_GraphicTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Graphic3d_MaterialAspect;
 class AIS_GraphicTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Quantity_NameOfColor GetLineColor(const Handle(Prs3d_Drawer)& aDrawer,const AIS_TypeOfAttribute TheTypeOfAttributes) ;
diff --git a/inc/AIS_IndexedDataMapOfOwnerPrs.hxx b/inc/AIS_IndexedDataMapOfOwnerPrs.hxx
index b459c7c..a623039 100644
--- a/inc/AIS_IndexedDataMapOfOwnerPrs.hxx
+++ b/inc/AIS_IndexedDataMapOfOwnerPrs.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class AIS_IndexedDataMapNodeOfIndexedDataMapOfOwnerPrs;
 class AIS_IndexedDataMapOfOwnerPrs  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_IndexedDataMapOfOwnerPrs(const Standard_Integer NbBuckets = 1);
diff --git a/inc/AIS_InteractiveContext.hxx b/inc/AIS_InteractiveContext.hxx
index af4ff7e..e64165d 100644
--- a/inc/AIS_InteractiveContext.hxx
+++ b/inc/AIS_InteractiveContext.hxx
@@ -88,6 +88,9 @@
 #ifndef _Handle_AIS_Drawer_HeaderFile
 #include <Handle_AIS_Drawer.hxx>
 #endif
+#ifndef _Standard_ShortReal_HeaderFile
+#include <Standard_ShortReal.hxx>
+#endif
 #ifndef _AIS_DisplayStatus_HeaderFile
 #include <AIS_DisplayStatus.hxx>
 #endif
@@ -609,11 +612,11 @@ public:
   Standard_EXPORT     void UnsetLocalAttributes(const Handle(AIS_InteractiveObject)& anObj,const Standard_Boolean updateviewer = Standard_True) ;
   //! Sets up polygon offsets for the given AIS_InteractiveObject. <br>
 //!          It simply calls anObj->SetPolygonOffsets() <br>
-  Standard_EXPORT     void SetPolygonOffsets(const Handle(AIS_InteractiveObject)& anObj,const Standard_Integer aMode,const Standard_Real aFactor = 1.0,const Standard_Real aUnits = 0.0,const Standard_Boolean updateviewer = Standard_True) ;
+  Standard_EXPORT     void SetPolygonOffsets(const Handle(AIS_InteractiveObject)& anObj,const Standard_Integer aMode,const Standard_ShortReal aFactor = 1.0,const Standard_ShortReal aUnits = 0.0,const Standard_Boolean updateviewer = Standard_True) ;
   //! simply calls anObj->HasPolygonOffsets() <br>
   Standard_EXPORT     Standard_Boolean HasPolygonOffsets(const Handle(AIS_InteractiveObject)& anObj) const;
   //! Retrieves current polygon offsets settings for <anObj>. <br>
-  Standard_EXPORT     void PolygonOffsets(const Handle(AIS_InteractiveObject)& anObj,Standard_Integer& aMode,Standard_Real& aFactor,Standard_Real& aUnits) const;
+  Standard_EXPORT     void PolygonOffsets(const Handle(AIS_InteractiveObject)& anObj,Standard_Integer& aMode,Standard_ShortReal& aFactor,Standard_ShortReal& aUnits) const;
   //! Sets the size aSize of the trihedron. <br>
 //! Is used to change the default value 100 mm for <br>
 //! display of trihedra. <br>
diff --git a/inc/AIS_InteractiveObject.hxx b/inc/AIS_InteractiveObject.hxx
index 19c89fb..97b5a16 100644
--- a/inc/AIS_InteractiveObject.hxx
+++ b/inc/AIS_InteractiveObject.hxx
@@ -64,12 +64,6 @@
 #ifndef _Handle_AIS_InteractiveContext_HeaderFile
 #include <Handle_AIS_InteractiveContext.hxx>
 #endif
-#ifndef _Handle_PrsMgr_PresentationManager_HeaderFile
-#include <Handle_PrsMgr_PresentationManager.hxx>
-#endif
-#ifndef _Handle_PrsMgr_Presentation_HeaderFile
-#include <Handle_PrsMgr_Presentation.hxx>
-#endif
 #ifndef _Aspect_TypeOfDegenerateModel_HeaderFile
 #include <Aspect_TypeOfDegenerateModel.hxx>
 #endif
@@ -85,6 +79,9 @@
 #ifndef _Handle_Prs3d_BasicAspect_HeaderFile
 #include <Handle_Prs3d_BasicAspect.hxx>
 #endif
+#ifndef _Standard_ShortReal_HeaderFile
+#include <Standard_ShortReal.hxx>
+#endif
 class Standard_Transient;
 class AIS_Drawer;
 class AIS_InteractiveContext;
@@ -92,8 +89,6 @@ class Quantity_Color;
 class TColStd_ListOfTransient;
 class Graphic3d_MaterialAspect;
 class TColStd_ListOfInteger;
-class PrsMgr_PresentationManager;
-class PrsMgr_Presentation;
 class Geom_Transformation;
 class Prs3d_Presentation;
 class Prs3d_BasicAspect;
@@ -486,11 +481,11 @@ public:
 //!          so it is reasonable to call this method after <anObj> has been displayed. <br>
 //!          Otherwise, Compute() method should pass Graphic3d_AspectFillArea3d <br>
 //!          aspect from <myDrawer> to Graphic3d_Group to make polygon offsets work. <br>
-  Standard_EXPORT   virtual  void SetPolygonOffsets(const Standard_Integer aMode,const Standard_Real aFactor = 1.0,const Standard_Real aUnits = 0.0) ;
+  Standard_EXPORT   virtual  void SetPolygonOffsets(const Standard_Integer aMode,const Standard_ShortReal aFactor = 1.0,const Standard_ShortReal aUnits = 0.0) ;
   //! Returns Standard_True if <myDrawer> has non-null shading aspect <br>
   Standard_EXPORT   virtual  Standard_Boolean HasPolygonOffsets() const;
   //! Retrieves current polygon offsets settings from <myDrawer>. <br>
-  Standard_EXPORT   virtual  void PolygonOffsets(Standard_Integer& aMode,Standard_Real& aFactor,Standard_Real& aUnits) const;
+  Standard_EXPORT   virtual  void PolygonOffsets(Standard_Integer& aMode,Standard_ShortReal& aFactor,Standard_ShortReal& aUnits) const;
 
 
 friend class AIS_InteractiveContext;
diff --git a/inc/AIS_ListIteratorOfListOfInteractive.hxx b/inc/AIS_ListIteratorOfListOfInteractive.hxx
index 40d2ef8..a6c26d7 100644
--- a/inc/AIS_ListIteratorOfListOfInteractive.hxx
+++ b/inc/AIS_ListIteratorOfListOfInteractive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class AIS_ListNodeOfListOfInteractive;
 class AIS_ListIteratorOfListOfInteractive  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_ListIteratorOfListOfInteractive();
diff --git a/inc/AIS_ListOfInteractive.hxx b/inc/AIS_ListOfInteractive.hxx
index c6f341b..51d7155 100644
--- a/inc/AIS_ListOfInteractive.hxx
+++ b/inc/AIS_ListOfInteractive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class AIS_ListNodeOfListOfInteractive;
 class AIS_ListOfInteractive  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_ListOfInteractive();
diff --git a/inc/AIS_MapIteratorOfMapOfInteractive.hxx b/inc/AIS_MapIteratorOfMapOfInteractive.hxx
index f8044cd..d9888b8 100644
--- a/inc/AIS_MapIteratorOfMapOfInteractive.hxx
+++ b/inc/AIS_MapIteratorOfMapOfInteractive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class AIS_StdMapNodeOfMapOfInteractive;
 class AIS_MapIteratorOfMapOfInteractive  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_MapIteratorOfMapOfInteractive();
diff --git a/inc/AIS_MapOfInteractive.hxx b/inc/AIS_MapOfInteractive.hxx
index 658501c..2252dae 100644
--- a/inc/AIS_MapOfInteractive.hxx
+++ b/inc/AIS_MapOfInteractive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class AIS_MapIteratorOfMapOfInteractive;
 class AIS_MapOfInteractive  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AIS_MapOfInteractive(const Standard_Integer NbBuckets = 1);
diff --git a/inc/AIS_SequenceOfDimension.hxx b/inc/AIS_SequenceOfDimension.hxx
index 9808bad..9bb0b6a 100644
--- a/inc/AIS_SequenceOfDimension.hxx
+++ b/inc/AIS_SequenceOfDimension.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class AIS_SequenceNodeOfSequenceOfDimension;
 class AIS_SequenceOfDimension  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       AIS_SequenceOfDimension();
diff --git a/inc/AIS_SequenceOfInteractive.hxx b/inc/AIS_SequenceOfInteractive.hxx
index 0340329..e5a3748 100644
--- a/inc/AIS_SequenceOfInteractive.hxx
+++ b/inc/AIS_SequenceOfInteractive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class AIS_SequenceNodeOfSequenceOfInteractive;
 class AIS_SequenceOfInteractive  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       AIS_SequenceOfInteractive();
diff --git a/inc/APIHeaderSection_MakeHeader.hxx b/inc/APIHeaderSection_MakeHeader.hxx
index c599ad2..188c8e4 100644
--- a/inc/APIHeaderSection_MakeHeader.hxx
+++ b/inc/APIHeaderSection_MakeHeader.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class Interface_HArray1OfHAsciiString;
 class APIHeaderSection_MakeHeader  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares a new MakeHeader from scratch <br>
   Standard_EXPORT   APIHeaderSection_MakeHeader(const Standard_Integer shapetype = 0);
diff --git a/inc/Adaptor2d_Curve2d.hxx b/inc/Adaptor2d_Curve2d.hxx
index 65d0a77..8319c64 100644
--- a/inc/Adaptor2d_Curve2d.hxx
+++ b/inc/Adaptor2d_Curve2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class Geom2d_BSplineCurve;
 class Adaptor2d_Curve2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/Adaptor2d_Line2d.hxx b/inc/Adaptor2d_Line2d.hxx
index 5d006f5..2b0e045 100644
--- a/inc/Adaptor2d_Line2d.hxx
+++ b/inc/Adaptor2d_Line2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class Geom2d_BSplineCurve;
 class Adaptor2d_Line2d  : public Adaptor2d_Curve2d {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Adaptor2d_Line2d();
diff --git a/inc/Adaptor3d_Curve.hxx b/inc/Adaptor3d_Curve.hxx
index f8d0d85..c0446f3 100644
--- a/inc/Adaptor3d_Curve.hxx
+++ b/inc/Adaptor3d_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class Geom_BSplineCurve;
 class Adaptor3d_Curve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/Adaptor3d_CurveOnSurface.hxx b/inc/Adaptor3d_CurveOnSurface.hxx
index 943c86c..65b4fdd 100644
--- a/inc/Adaptor3d_CurveOnSurface.hxx
+++ b/inc/Adaptor3d_CurveOnSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -84,18 +87,7 @@ class gp_Vec2d;
 class Adaptor3d_CurveOnSurface  : public Adaptor3d_Curve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Adaptor3d_CurveOnSurface();
diff --git a/inc/Adaptor3d_HSurfaceTool.hxx b/inc/Adaptor3d_HSurfaceTool.hxx
index 46e7f51..42ab4d1 100644
--- a/inc/Adaptor3d_HSurfaceTool.hxx
+++ b/inc/Adaptor3d_HSurfaceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -82,18 +85,7 @@ class Adaptor3d_HCurve;
 class Adaptor3d_HSurfaceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstUParameter(const Handle(Adaptor3d_HSurface)& S) ;
diff --git a/inc/Adaptor3d_InterFunc.hxx b/inc/Adaptor3d_InterFunc.hxx
index a9f6f61..88ec9ab 100644
--- a/inc/Adaptor3d_InterFunc.hxx
+++ b/inc/Adaptor3d_InterFunc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Standard_ConstructionError;
 class Adaptor3d_InterFunc  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!   build the function  U(t)=FixVal   if Fix =1 or <br>
 //!            V(t)=FixVal if Fix=2 <br>
diff --git a/inc/Adaptor3d_IsoCurve.hxx b/inc/Adaptor3d_IsoCurve.hxx
index ec3aec2..cc4f112 100644
--- a/inc/Adaptor3d_IsoCurve.hxx
+++ b/inc/Adaptor3d_IsoCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -70,18 +73,7 @@ class Geom_BSplineCurve;
 class Adaptor3d_IsoCurve  : public Adaptor3d_Curve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! The iso is set to NoneIso. <br>
   Standard_EXPORT   Adaptor3d_IsoCurve();
diff --git a/inc/Adaptor3d_OffsetCurve.hxx b/inc/Adaptor3d_OffsetCurve.hxx
index 7c410f0..f9d5828 100644
--- a/inc/Adaptor3d_OffsetCurve.hxx
+++ b/inc/Adaptor3d_OffsetCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -62,18 +65,7 @@ class Geom2d_BSplineCurve;
 class Adaptor3d_OffsetCurve  : public Adaptor2d_Curve2d {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! The Offset is set to 0. <br>
   Standard_EXPORT   Adaptor3d_OffsetCurve();
diff --git a/inc/Adaptor3d_Surface.hxx b/inc/Adaptor3d_Surface.hxx
index 900ea6d..cd56f1a 100644
--- a/inc/Adaptor3d_Surface.hxx
+++ b/inc/Adaptor3d_Surface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -78,18 +81,7 @@ class Adaptor3d_HCurve;
 class Adaptor3d_Surface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/Adaptor3d_SurfaceOfLinearExtrusion.hxx b/inc/Adaptor3d_SurfaceOfLinearExtrusion.hxx
index 190634a..73eab4b 100644
--- a/inc/Adaptor3d_SurfaceOfLinearExtrusion.hxx
+++ b/inc/Adaptor3d_SurfaceOfLinearExtrusion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -75,18 +78,7 @@ class gp_Ax1;
 class Adaptor3d_SurfaceOfLinearExtrusion  : public Adaptor3d_Surface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Adaptor3d_SurfaceOfLinearExtrusion();
diff --git a/inc/Adaptor3d_SurfaceOfRevolution.hxx b/inc/Adaptor3d_SurfaceOfRevolution.hxx
index c2553f4..7d401a4 100644
--- a/inc/Adaptor3d_SurfaceOfRevolution.hxx
+++ b/inc/Adaptor3d_SurfaceOfRevolution.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -88,18 +91,7 @@ class gp_Dir;
 class Adaptor3d_SurfaceOfRevolution  : public Adaptor3d_Surface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Adaptor3d_SurfaceOfRevolution();
diff --git a/inc/AdvApp2Var_ApproxAFunc2Var.hxx b/inc/AdvApp2Var_ApproxAFunc2Var.hxx
index f3d1c35..2bfed0a 100644
--- a/inc/AdvApp2Var_ApproxAFunc2Var.hxx
+++ b/inc/AdvApp2Var_ApproxAFunc2Var.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -109,18 +112,7 @@ class Geom_BSplineSurface;
 class AdvApp2Var_ApproxAFunc2Var  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AdvApp2Var_ApproxAFunc2Var(const Standard_Integer Num1DSS,const Standard_Integer Num2DSS,const Standard_Integer Num3DSS,const Handle(TColStd_HArray1OfReal)& OneDTol,const Handle(TColStd_HArray1OfReal)& TwoDTol,const Handle(TColStd_HArray1OfReal)& ThreeDTol,const Handle(TColStd_HArray2OfReal)& OneDTolFr,const Handle(TColStd_HArray2OfReal)& TwoDTolFr,const Handle(TColStd_HArray2OfReal)& ThreeDTolFr,const Standard_Real FirstInU,const Standard_Real LastInU,const Standard_Real FirstInV,const Standard_Real LastInV,const GeomAbs_IsoType FavorIso,const GeomAbs_Shape ContInU,const GeomAbs_Shape ContInV,const Standard_Integer PrecisCode,const Standard_Integer MaxDegInU,const Standard_Integer MaxDegInV,const Standard_Integer MaxPatch,const AdvApp2Var_EvaluatorFunc2Var& Func,AdvApprox_Cutting& UChoice,AdvApprox_Cutting& VChoice);
diff --git a/inc/AdvApp2Var_Context.hxx b/inc/AdvApp2Var_Context.hxx
index 9373208..43dfd84 100644
--- a/inc/AdvApp2Var_Context.hxx
+++ b/inc/AdvApp2Var_Context.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TColStd_HArray2OfReal;
 class AdvApp2Var_Context  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AdvApp2Var_Context();
diff --git a/inc/AdvApp2Var_Criterion.hxx b/inc/AdvApp2Var_Criterion.hxx
index be3c124..eaa9038 100644
--- a/inc/AdvApp2Var_Criterion.hxx
+++ b/inc/AdvApp2Var_Criterion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class AdvApp2Var_Context;
 class AdvApp2Var_Criterion  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/AdvApp2Var_Framework.hxx b/inc/AdvApp2Var_Framework.hxx
index 446c4fe..6825bb1 100644
--- a/inc/AdvApp2Var_Framework.hxx
+++ b/inc/AdvApp2Var_Framework.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TColStd_HArray1OfReal;
 class AdvApp2Var_Framework  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AdvApp2Var_Framework();
diff --git a/inc/AdvApp2Var_Iso.hxx b/inc/AdvApp2Var_Iso.hxx
index 8d432d2..1a36f67 100644
--- a/inc/AdvApp2Var_Iso.hxx
+++ b/inc/AdvApp2Var_Iso.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class AdvApp2Var_Node;
 class AdvApp2Var_Iso  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AdvApp2Var_Iso();
diff --git a/inc/AdvApp2Var_Network.hxx b/inc/AdvApp2Var_Network.hxx
index a4eeb19..4826dbb 100644
--- a/inc/AdvApp2Var_Network.hxx
+++ b/inc/AdvApp2Var_Network.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class AdvApp2Var_Patch;
 class AdvApp2Var_Network  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AdvApp2Var_Network();
diff --git a/inc/AdvApp2Var_Node.hxx b/inc/AdvApp2Var_Node.hxx
index 80a7bf3..1b71a02 100644
--- a/inc/AdvApp2Var_Node.hxx
+++ b/inc/AdvApp2Var_Node.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class gp_Pnt;
 class AdvApp2Var_Node  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AdvApp2Var_Node();
diff --git a/inc/AdvApp2Var_Patch.hxx b/inc/AdvApp2Var_Patch.hxx
index 88899bd..74cf20e 100644
--- a/inc/AdvApp2Var_Patch.hxx
+++ b/inc/AdvApp2Var_Patch.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TColgp_HArray2OfPnt;
 class AdvApp2Var_Patch  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AdvApp2Var_Patch();
diff --git a/inc/AdvApp2Var_SequenceOfNode.hxx b/inc/AdvApp2Var_SequenceOfNode.hxx
index c41717d..9b4b557 100644
--- a/inc/AdvApp2Var_SequenceOfNode.hxx
+++ b/inc/AdvApp2Var_SequenceOfNode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class AdvApp2Var_SequenceNodeOfSequenceOfNode;
 class AdvApp2Var_SequenceOfNode  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       AdvApp2Var_SequenceOfNode();
diff --git a/inc/AdvApp2Var_SequenceOfPatch.hxx b/inc/AdvApp2Var_SequenceOfPatch.hxx
index 1001687..14a0030 100644
--- a/inc/AdvApp2Var_SequenceOfPatch.hxx
+++ b/inc/AdvApp2Var_SequenceOfPatch.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class AdvApp2Var_SequenceNodeOfSequenceOfPatch;
 class AdvApp2Var_SequenceOfPatch  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       AdvApp2Var_SequenceOfPatch();
diff --git a/inc/AdvApp2Var_SequenceOfStrip.hxx b/inc/AdvApp2Var_SequenceOfStrip.hxx
index 8fbdf4b..5d0f588 100644
--- a/inc/AdvApp2Var_SequenceOfStrip.hxx
+++ b/inc/AdvApp2Var_SequenceOfStrip.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class AdvApp2Var_SequenceNodeOfSequenceOfStrip;
 class AdvApp2Var_SequenceOfStrip  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       AdvApp2Var_SequenceOfStrip();
diff --git a/inc/AdvApp2Var_Strip.hxx b/inc/AdvApp2Var_Strip.hxx
index a9ccbd8..ad7997f 100644
--- a/inc/AdvApp2Var_Strip.hxx
+++ b/inc/AdvApp2Var_Strip.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class AdvApp2Var_SequenceNodeOfStrip;
 class AdvApp2Var_Strip  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       AdvApp2Var_Strip();
diff --git a/inc/AdvApprox_ApproxAFunction.hxx b/inc/AdvApprox_ApproxAFunction.hxx
index 2f07982..9182461 100644
--- a/inc/AdvApprox_ApproxAFunction.hxx
+++ b/inc/AdvApprox_ApproxAFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class TColgp_Array1OfPnt;
 class AdvApprox_ApproxAFunction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs approximator tool. <br>
   Standard_EXPORT   AdvApprox_ApproxAFunction(const Standard_Integer Num1DSS,const Standard_Integer Num2DSS,const Standard_Integer Num3DSS,const Handle(TColStd_HArray1OfReal)& OneDTol,const Handle(TColStd_HArray1OfReal)& TwoDTol,const Handle(TColStd_HArray1OfReal)& ThreeDTol,const Standard_Real First,const Standard_Real Last,const GeomAbs_Shape Continuity,const Standard_Integer MaxDeg,const Standard_Integer MaxSeg,const AdvApprox_EvaluatorFunction& Func);
diff --git a/inc/AdvApprox_Cutting.hxx b/inc/AdvApprox_Cutting.hxx
index c61a3bd..e3606f8 100644
--- a/inc/AdvApprox_Cutting.hxx
+++ b/inc/AdvApprox_Cutting.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class AdvApprox_Cutting  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/AdvApprox_DichoCutting.hxx b/inc/AdvApprox_DichoCutting.hxx
index ae9d849..a61a0fd 100644
--- a/inc/AdvApprox_DichoCutting.hxx
+++ b/inc/AdvApprox_DichoCutting.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@
 class AdvApprox_DichoCutting  : public AdvApprox_Cutting {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AdvApprox_DichoCutting();
diff --git a/inc/AdvApprox_PrefAndRec.hxx b/inc/AdvApprox_PrefAndRec.hxx
index 7d20b1e..2c20787 100644
--- a/inc/AdvApprox_PrefAndRec.hxx
+++ b/inc/AdvApprox_PrefAndRec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_Array1OfReal;
 class AdvApprox_PrefAndRec  : public AdvApprox_Cutting {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AdvApprox_PrefAndRec(const TColStd_Array1OfReal& RecomendedCut,const TColStd_Array1OfReal& PrefferedCut,const Standard_Real Weight = 5);
diff --git a/inc/AdvApprox_PrefCutting.hxx b/inc/AdvApprox_PrefCutting.hxx
index 9db3c9c..bfce640 100644
--- a/inc/AdvApprox_PrefCutting.hxx
+++ b/inc/AdvApprox_PrefCutting.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColStd_Array1OfReal;
 class AdvApprox_PrefCutting  : public AdvApprox_Cutting {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AdvApprox_PrefCutting(const TColStd_Array1OfReal& CutPnts);
diff --git a/inc/AdvApprox_SimpleApprox.hxx b/inc/AdvApprox_SimpleApprox.hxx
index 7f4781f..8683aa7 100644
--- a/inc/AdvApprox_SimpleApprox.hxx
+++ b/inc/AdvApprox_SimpleApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -60,18 +63,7 @@ class TColStd_Array1OfReal;
 class AdvApprox_SimpleApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AdvApprox_SimpleApprox(const Standard_Integer TotalDimension,const Standard_Integer TotalNumSS,const GeomAbs_Shape Continuity,const Standard_Integer WorkDegree,const Standard_Integer NbGaussPoints,const Handle(PLib_JacobiPolynomial)& JacobiBase,const AdvApprox_EvaluatorFunction& Func);
diff --git a/inc/AlienImage.hxx b/inc/AlienImage.hxx
index 153e203..1c4e246 100644
--- a/inc/AlienImage.hxx
+++ b/inc/AlienImage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class AlienImage_GIFAlienImage;
 class AlienImage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean CreateImage(const TCollection_AsciiString& theFileName,Handle(Image_Image)& theImage) ;
diff --git a/inc/AlienImage_MemoryOperations.hxx b/inc/AlienImage_MemoryOperations.hxx
index 2e1e653..9dddd47 100644
--- a/inc/AlienImage_MemoryOperations.hxx
+++ b/inc/AlienImage_MemoryOperations.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class Standard_NullObject;
 class AlienImage_MemoryOperations  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Swap byte in a long word ( 32 Bit ) <br>
 //!	       Size is the number of long word to swap <br>
diff --git a/inc/AppBlend_Approx.hxx b/inc/AppBlend_Approx.hxx
index 7cab148..628ff54 100644
--- a/inc/AppBlend_Approx.hxx
+++ b/inc/AppBlend_Approx.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColgp_Array1OfPnt2d;
 class AppBlend_Approx  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/AppCont_FitFunction.hxx b/inc/AppCont_FitFunction.hxx
index 10104e1..c08beaa 100644
--- a/inc/AppCont_FitFunction.hxx
+++ b/inc/AppCont_FitFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class AppParCurves_MultiCurve;
 class AppCont_FitFunction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppCont_FitFunction(const AppCont_Function& SSP,const Standard_Real U0,const Standard_Real U1,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const Standard_Integer Deg,const Standard_Integer NbPoints = 24);
diff --git a/inc/AppCont_FitFunction2d.hxx b/inc/AppCont_FitFunction2d.hxx
index e36ffff..5e42c4b 100644
--- a/inc/AppCont_FitFunction2d.hxx
+++ b/inc/AppCont_FitFunction2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class AppParCurves_MultiCurve;
 class AppCont_FitFunction2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppCont_FitFunction2d(const AppCont_Function2d& SSP,const Standard_Real U0,const Standard_Real U1,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const Standard_Integer Deg,const Standard_Integer NbPoints = 24);
diff --git a/inc/AppCont_Function.hxx b/inc/AppCont_Function.hxx
index 4686d17..42229b1 100644
--- a/inc/AppCont_Function.hxx
+++ b/inc/AppCont_Function.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class gp_Vec;
 class AppCont_Function  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/AppCont_Function2d.hxx b/inc/AppCont_Function2d.hxx
index d1d2a04..4d0f346 100644
--- a/inc/AppCont_Function2d.hxx
+++ b/inc/AppCont_Function2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class gp_Vec2d;
 class AppCont_Function2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/AppCont_FunctionTool.hxx b/inc/AppCont_FunctionTool.hxx
index 93347dc..cfe98e9 100644
--- a/inc/AppCont_FunctionTool.hxx
+++ b/inc/AppCont_FunctionTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColgp_Array1OfVec2d;
 class AppCont_FunctionTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns the first parameter of the Function. <br>
   Standard_EXPORT   static  Standard_Real FirstParameter(const AppCont_Function& C) ;
diff --git a/inc/AppCont_FunctionTool2d.hxx b/inc/AppCont_FunctionTool2d.hxx
index 60ef4e2..45b508e 100644
--- a/inc/AppCont_FunctionTool2d.hxx
+++ b/inc/AppCont_FunctionTool2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColgp_Array1OfVec;
 class AppCont_FunctionTool2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns the first parameter of the Function. <br>
   Standard_EXPORT   static  Standard_Real FirstParameter(const AppCont_Function2d& C) ;
diff --git a/inc/AppDef_Array1OfMultiPointConstraint.hxx b/inc/AppDef_Array1OfMultiPointConstraint.hxx
index 649bd39..5967b41 100644
--- a/inc/AppDef_Array1OfMultiPointConstraint.hxx
+++ b/inc/AppDef_Array1OfMultiPointConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class AppDef_MultiPointConstraint;
 class AppDef_Array1OfMultiPointConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_Array1OfMultiPointConstraint(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx b/inc/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx
index 0b548bc..fa1a9e5 100644
--- a/inc/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx
+++ b/inc/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class math_Vector;
 class AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute  : public math_BFGS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute(math_MultipleVarFunctionWithGradient& F,const math_Vector& StartingPoint,const Standard_Real Tolerance3d,const Standard_Real Tolerance2d,const Standard_Real Eps,const Standard_Integer NbIterations = 200);
diff --git a/inc/AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx b/inc/AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx
index 0504fed..b74478e 100644
--- a/inc/AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx
+++ b/inc/AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class math_IntegerVector;
 class AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute  : public math_MultipleVarFunctionWithGradient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,const math_Vector& Parameters,const TColStd_Array1OfReal& Knots,const TColStd_Array1OfInteger& Mults,const Standard_Integer NbPol);
diff --git a/inc/AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx b/inc/AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx
index aa9d056..83e0d6c 100644
--- a/inc/AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx
+++ b/inc/AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class math_IntegerVector;
 class AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const math_Vector& Parameters,const Standard_Integer NbPol);
diff --git a/inc/AppDef_BSplineCompute.hxx b/inc/AppDef_BSplineCompute.hxx
index ff4fe29..00cc754 100644
--- a/inc/AppDef_BSplineCompute.hxx
+++ b/inc/AppDef_BSplineCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class AppParCurves_MultiCurve;
 class AppDef_BSplineCompute  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_BSplineCompute(const AppDef_MultiLine& Line,const Standard_Integer degreemin = 4,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-3,const Standard_Real Tolerance2d = 1.0e-6,const Standard_Integer NbIterations = 5,const Standard_Boolean cutting = Standard_True,const Approx_ParametrizationType parametrization = Approx_ChordLength,const Standard_Boolean Squares = Standard_False);
diff --git a/inc/AppDef_Compute.hxx b/inc/AppDef_Compute.hxx
index beb5800..16a4213 100644
--- a/inc/AppDef_Compute.hxx
+++ b/inc/AppDef_Compute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class TColStd_Array1OfReal;
 class AppDef_Compute  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_Compute(const AppDef_MultiLine& Line,const Standard_Integer degreemin = 4,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-3,const Standard_Real Tolerance2d = 1.0e-6,const Standard_Integer NbIterations = 5,const Standard_Boolean cutting = Standard_True,const Approx_ParametrizationType parametrization = Approx_ChordLength,const Standard_Boolean Squares = Standard_False);
diff --git a/inc/AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx b/inc/AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx
index 271bd69..3f95971 100644
--- a/inc/AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx
+++ b/inc/AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class math_Vector;
 class AppDef_Gradient_BFGSOfMyGradientOfCompute  : public math_BFGS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_Gradient_BFGSOfMyGradientOfCompute(math_MultipleVarFunctionWithGradient& F,const math_Vector& StartingPoint,const Standard_Real Tolerance3d,const Standard_Real Tolerance2d,const Standard_Real Eps,const Standard_Integer NbIterations = 200);
diff --git a/inc/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx b/inc/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx
index 9562a19..06cf49a 100644
--- a/inc/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx
+++ b/inc/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class math_Vector;
 class AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute  : public math_BFGS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute(math_MultipleVarFunctionWithGradient& F,const math_Vector& StartingPoint,const Standard_Real Tolerance3d,const Standard_Real Tolerance2d,const Standard_Real Eps,const Standard_Integer NbIterations = 200);
diff --git a/inc/AppDef_Gradient_BFGSOfTheGradient.hxx b/inc/AppDef_Gradient_BFGSOfTheGradient.hxx
index fdef623..881c1fc 100644
--- a/inc/AppDef_Gradient_BFGSOfTheGradient.hxx
+++ b/inc/AppDef_Gradient_BFGSOfTheGradient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class math_Vector;
 class AppDef_Gradient_BFGSOfTheGradient  : public math_BFGS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_Gradient_BFGSOfTheGradient(math_MultipleVarFunctionWithGradient& F,const math_Vector& StartingPoint,const Standard_Real Tolerance3d,const Standard_Real Tolerance2d,const Standard_Real Eps,const Standard_Integer NbIterations = 200);
diff --git a/inc/AppDef_MultiLine.hxx b/inc/AppDef_MultiLine.hxx
index 52f2855..8a9bbb3 100644
--- a/inc/AppDef_MultiLine.hxx
+++ b/inc/AppDef_MultiLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class AppDef_MultiPointConstraint;
 class AppDef_MultiLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates an undefined MultiLine. <br>
   Standard_EXPORT   AppDef_MultiLine();
diff --git a/inc/AppDef_MultiPointConstraint.hxx b/inc/AppDef_MultiPointConstraint.hxx
index 4317363..ed3316e 100644
--- a/inc/AppDef_MultiPointConstraint.hxx
+++ b/inc/AppDef_MultiPointConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class gp_Vec2d;
 class AppDef_MultiPointConstraint  : public AppParCurves_MultiPoint {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates an undefined MultiPointConstraint. <br>
   Standard_EXPORT   AppDef_MultiPointConstraint();
diff --git a/inc/AppDef_MyBSplGradientOfBSplineCompute.hxx b/inc/AppDef_MyBSplGradientOfBSplineCompute.hxx
index 74b35d8..c63f3e8 100644
--- a/inc/AppDef_MyBSplGradientOfBSplineCompute.hxx
+++ b/inc/AppDef_MyBSplGradientOfBSplineCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class AppParCurves_MultiBSpCurve;
 class AppDef_MyBSplGradientOfBSplineCompute  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_MyBSplGradientOfBSplineCompute(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,math_Vector& Parameters,const TColStd_Array1OfReal& Knots,const TColStd_Array1OfInteger& Mults,const Standard_Integer Deg,const Standard_Real Tol3d,const Standard_Real Tol2d,const Standard_Integer NbIterations = 1);
diff --git a/inc/AppDef_MyGradientOfCompute.hxx b/inc/AppDef_MyGradientOfCompute.hxx
index 0ba34ca..405b079 100644
--- a/inc/AppDef_MyGradientOfCompute.hxx
+++ b/inc/AppDef_MyGradientOfCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class AppParCurves_MultiCurve;
 class AppDef_MyGradientOfCompute  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_MyGradientOfCompute(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,math_Vector& Parameters,const Standard_Integer Deg,const Standard_Real Tol3d,const Standard_Real Tol2d,const Standard_Integer NbIterations = 200);
diff --git a/inc/AppDef_MyGradientbisOfBSplineCompute.hxx b/inc/AppDef_MyGradientbisOfBSplineCompute.hxx
index 8d590bd..cfb1f9d 100644
--- a/inc/AppDef_MyGradientbisOfBSplineCompute.hxx
+++ b/inc/AppDef_MyGradientbisOfBSplineCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class AppParCurves_MultiCurve;
 class AppDef_MyGradientbisOfBSplineCompute  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_MyGradientbisOfBSplineCompute(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,math_Vector& Parameters,const Standard_Integer Deg,const Standard_Real Tol3d,const Standard_Real Tol2d,const Standard_Integer NbIterations = 200);
diff --git a/inc/AppDef_MyLineTool.hxx b/inc/AppDef_MyLineTool.hxx
index 3204a63..fdc1141 100644
--- a/inc/AppDef_MyLineTool.hxx
+++ b/inc/AppDef_MyLineTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColgp_Array1OfVec2d;
 class AppDef_MyLineTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the first index of multipoints of the MultiLine. <br>
   Standard_EXPORT   static  Standard_Integer FirstPoint(const AppDef_MultiLine& ML) ;
diff --git a/inc/AppDef_ParFunctionOfMyGradientOfCompute.hxx b/inc/AppDef_ParFunctionOfMyGradientOfCompute.hxx
index 671afb3..c78e841 100644
--- a/inc/AppDef_ParFunctionOfMyGradientOfCompute.hxx
+++ b/inc/AppDef_ParFunctionOfMyGradientOfCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class AppParCurves_MultiCurve;
 class AppDef_ParFunctionOfMyGradientOfCompute  : public math_MultipleVarFunctionWithGradient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_ParFunctionOfMyGradientOfCompute(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,const math_Vector& Parameters,const Standard_Integer Deg);
diff --git a/inc/AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx b/inc/AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx
index 52f288e..7b0000a 100644
--- a/inc/AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx
+++ b/inc/AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class AppParCurves_MultiCurve;
 class AppDef_ParFunctionOfMyGradientbisOfBSplineCompute  : public math_MultipleVarFunctionWithGradient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_ParFunctionOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,const math_Vector& Parameters,const Standard_Integer Deg);
diff --git a/inc/AppDef_ParFunctionOfTheGradient.hxx b/inc/AppDef_ParFunctionOfTheGradient.hxx
index cec30de..e94d708 100644
--- a/inc/AppDef_ParFunctionOfTheGradient.hxx
+++ b/inc/AppDef_ParFunctionOfTheGradient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class AppParCurves_MultiCurve;
 class AppDef_ParFunctionOfTheGradient  : public math_MultipleVarFunctionWithGradient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_ParFunctionOfTheGradient(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,const math_Vector& Parameters,const Standard_Integer Deg);
diff --git a/inc/AppDef_ParLeastSquareOfMyGradientOfCompute.hxx b/inc/AppDef_ParLeastSquareOfMyGradientOfCompute.hxx
index fc4731b..ac3b08e 100644
--- a/inc/AppDef_ParLeastSquareOfMyGradientOfCompute.hxx
+++ b/inc/AppDef_ParLeastSquareOfMyGradientOfCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class math_IntegerVector;
 class AppDef_ParLeastSquareOfMyGradientOfCompute  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_ParLeastSquareOfMyGradientOfCompute(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const math_Vector& Parameters,const Standard_Integer NbPol);
diff --git a/inc/AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx b/inc/AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx
index 682b213..94b5751 100644
--- a/inc/AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx
+++ b/inc/AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class math_IntegerVector;
 class AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const math_Vector& Parameters,const Standard_Integer NbPol);
diff --git a/inc/AppDef_ParLeastSquareOfTheGradient.hxx b/inc/AppDef_ParLeastSquareOfTheGradient.hxx
index abad132..f090b59 100644
--- a/inc/AppDef_ParLeastSquareOfTheGradient.hxx
+++ b/inc/AppDef_ParLeastSquareOfTheGradient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class math_IntegerVector;
 class AppDef_ParLeastSquareOfTheGradient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const math_Vector& Parameters,const Standard_Integer NbPol);
diff --git a/inc/AppDef_ResConstraintOfMyGradientOfCompute.hxx b/inc/AppDef_ResConstraintOfMyGradientOfCompute.hxx
index c8466d1..809abe5 100644
--- a/inc/AppDef_ResConstraintOfMyGradientOfCompute.hxx
+++ b/inc/AppDef_ResConstraintOfMyGradientOfCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class math_Vector;
 class AppDef_ResConstraintOfMyGradientOfCompute  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_ResConstraintOfMyGradientOfCompute(const AppDef_MultiLine& SSP,AppParCurves_MultiCurve& SCurv,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints,const math_Matrix& Bern,const math_Matrix& DerivativeBern,const Standard_Real Tolerance = 1.0e-10);
diff --git a/inc/AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx b/inc/AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx
index 24a0e86..a0cff80 100644
--- a/inc/AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx
+++ b/inc/AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class math_Vector;
 class AppDef_ResConstraintOfMyGradientbisOfBSplineCompute  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_ResConstraintOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& SSP,AppParCurves_MultiCurve& SCurv,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints,const math_Matrix& Bern,const math_Matrix& DerivativeBern,const Standard_Real Tolerance = 1.0e-10);
diff --git a/inc/AppDef_ResConstraintOfTheGradient.hxx b/inc/AppDef_ResConstraintOfTheGradient.hxx
index 61c4cc3..d265f20 100644
--- a/inc/AppDef_ResConstraintOfTheGradient.hxx
+++ b/inc/AppDef_ResConstraintOfTheGradient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class math_Vector;
 class AppDef_ResConstraintOfTheGradient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_ResConstraintOfTheGradient(const AppDef_MultiLine& SSP,AppParCurves_MultiCurve& SCurv,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints,const math_Matrix& Bern,const math_Matrix& DerivativeBern,const Standard_Real Tolerance = 1.0e-10);
diff --git a/inc/AppDef_TheFunction.hxx b/inc/AppDef_TheFunction.hxx
index c505dc0..86783d8 100644
--- a/inc/AppDef_TheFunction.hxx
+++ b/inc/AppDef_TheFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class AppParCurves_MultiCurve;
 class AppDef_TheFunction  : public math_MultipleVarFunctionWithGradient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_TheFunction(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,const math_Vector& Parameters,const Standard_Integer Deg);
diff --git a/inc/AppDef_TheGradient.hxx b/inc/AppDef_TheGradient.hxx
index 78367db..1d34344 100644
--- a/inc/AppDef_TheGradient.hxx
+++ b/inc/AppDef_TheGradient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class AppParCurves_MultiCurve;
 class AppDef_TheGradient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_TheGradient(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,math_Vector& Parameters,const Standard_Integer Deg,const Standard_Real Tol3d,const Standard_Real Tol2d,const Standard_Integer NbIterations = 200);
diff --git a/inc/AppDef_TheLeastSquares.hxx b/inc/AppDef_TheLeastSquares.hxx
index c17a177..8a77959 100644
--- a/inc/AppDef_TheLeastSquares.hxx
+++ b/inc/AppDef_TheLeastSquares.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class math_IntegerVector;
 class AppDef_TheLeastSquares  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_TheLeastSquares(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const math_Vector& Parameters,const Standard_Integer NbPol);
diff --git a/inc/AppDef_TheResol.hxx b/inc/AppDef_TheResol.hxx
index 16c02c4..16566f0 100644
--- a/inc/AppDef_TheResol.hxx
+++ b/inc/AppDef_TheResol.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class math_Vector;
 class AppDef_TheResol  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_TheResol(const AppDef_MultiLine& SSP,AppParCurves_MultiCurve& SCurv,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints,const math_Matrix& Bern,const math_Matrix& DerivativeBern,const Standard_Real Tolerance = 1.0e-10);
diff --git a/inc/AppDef_TheVariational.hxx b/inc/AppDef_TheVariational.hxx
index c3d6cb3..15e8d0b 100644
--- a/inc/AppDef_TheVariational.hxx
+++ b/inc/AppDef_TheVariational.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -84,18 +87,7 @@ class PLib_Base;
 class AppDef_TheVariational  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppDef_TheVariational(const AppDef_MultiLine& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,const Standard_Integer MaxDegree = 14,const Standard_Integer MaxSegment = 100,const GeomAbs_Shape Continuity = GeomAbs_C2,const Standard_Boolean WithMinMax = Standard_False,const Standard_Boolean WithCutting = Standard_True,const Standard_Real Tolerance = 1.0,const Standard_Integer NbIterations = 2);
diff --git a/inc/AppParCurves.hxx b/inc/AppParCurves.hxx
index 74a9b40..2a18c85 100644
--- a/inc/AppParCurves.hxx
+++ b/inc/AppParCurves.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class AppParCurves_SequenceNodeOfSequenceOfMultiBSpCurve;
 class AppParCurves  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void BernsteinMatrix(const Standard_Integer NbPoles,const math_Vector& U,math_Matrix& A) ;
diff --git a/inc/AppParCurves_Array1OfConstraintCouple.hxx b/inc/AppParCurves_Array1OfConstraintCouple.hxx
index 0f1cf15..1507dc2 100644
--- a/inc/AppParCurves_Array1OfConstraintCouple.hxx
+++ b/inc/AppParCurves_Array1OfConstraintCouple.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class AppParCurves_ConstraintCouple;
 class AppParCurves_Array1OfConstraintCouple  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppParCurves_Array1OfConstraintCouple(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/AppParCurves_Array1OfMultiBSpCurve.hxx b/inc/AppParCurves_Array1OfMultiBSpCurve.hxx
index 09d4777..a915738 100644
--- a/inc/AppParCurves_Array1OfMultiBSpCurve.hxx
+++ b/inc/AppParCurves_Array1OfMultiBSpCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class AppParCurves_MultiBSpCurve;
 class AppParCurves_Array1OfMultiBSpCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppParCurves_Array1OfMultiBSpCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/AppParCurves_Array1OfMultiCurve.hxx b/inc/AppParCurves_Array1OfMultiCurve.hxx
index c612b7a..417f6b3 100644
--- a/inc/AppParCurves_Array1OfMultiCurve.hxx
+++ b/inc/AppParCurves_Array1OfMultiCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class AppParCurves_MultiCurve;
 class AppParCurves_Array1OfMultiCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppParCurves_Array1OfMultiCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/AppParCurves_Array1OfMultiPoint.hxx b/inc/AppParCurves_Array1OfMultiPoint.hxx
index a578e7d..5e2d611 100644
--- a/inc/AppParCurves_Array1OfMultiPoint.hxx
+++ b/inc/AppParCurves_Array1OfMultiPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class AppParCurves_MultiPoint;
 class AppParCurves_Array1OfMultiPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   AppParCurves_Array1OfMultiPoint(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/AppParCurves_ConstraintCouple.hxx b/inc/AppParCurves_ConstraintCouple.hxx
index 61b8add..436f735 100644
--- a/inc/AppParCurves_ConstraintCouple.hxx
+++ b/inc/AppParCurves_ConstraintCouple.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@
 class AppParCurves_ConstraintCouple  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns an indefinite ConstraintCouple. <br>
   Standard_EXPORT   AppParCurves_ConstraintCouple();
diff --git a/inc/AppParCurves_MultiBSpCurve.hxx b/inc/AppParCurves_MultiBSpCurve.hxx
index 813363f..717e784 100644
--- a/inc/AppParCurves_MultiBSpCurve.hxx
+++ b/inc/AppParCurves_MultiBSpCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class gp_Vec2d;
 class AppParCurves_MultiBSpCurve  : public AppParCurves_MultiCurve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns an indefinite MultiBSpCurve. <br>
   Standard_EXPORT   AppParCurves_MultiBSpCurve();
diff --git a/inc/AppParCurves_MultiCurve.hxx b/inc/AppParCurves_MultiCurve.hxx
index 4b90246..b61d100 100644
--- a/inc/AppParCurves_MultiCurve.hxx
+++ b/inc/AppParCurves_MultiCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class gp_Vec2d;
 class AppParCurves_MultiCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns an indefinite MultiCurve. <br>
   Standard_EXPORT   AppParCurves_MultiCurve();
diff --git a/inc/AppParCurves_MultiPoint.hxx b/inc/AppParCurves_MultiPoint.hxx
index 45ff70d..c1840df 100644
--- a/inc/AppParCurves_MultiPoint.hxx
+++ b/inc/AppParCurves_MultiPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Pnt2d;
 class AppParCurves_MultiPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates an indefinite MultiPoint. <br>
   Standard_EXPORT   AppParCurves_MultiPoint();
diff --git a/inc/AppParCurves_SequenceOfMultiBSpCurve.hxx b/inc/AppParCurves_SequenceOfMultiBSpCurve.hxx
index 0141e2f..ccd61ab 100644
--- a/inc/AppParCurves_SequenceOfMultiBSpCurve.hxx
+++ b/inc/AppParCurves_SequenceOfMultiBSpCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class AppParCurves_SequenceNodeOfSequenceOfMultiBSpCurve;
 class AppParCurves_SequenceOfMultiBSpCurve  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       AppParCurves_SequenceOfMultiBSpCurve();
diff --git a/inc/AppParCurves_SequenceOfMultiCurve.hxx b/inc/AppParCurves_SequenceOfMultiCurve.hxx
index 771dbf0..f75cc18 100644
--- a/inc/AppParCurves_SequenceOfMultiCurve.hxx
+++ b/inc/AppParCurves_SequenceOfMultiCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class AppParCurves_SequenceNodeOfSequenceOfMultiCurve;
 class AppParCurves_SequenceOfMultiCurve  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       AppParCurves_SequenceOfMultiCurve();
diff --git a/inc/ApproxInt_PrmPrmSvSurfaces.gxx b/inc/ApproxInt_PrmPrmSvSurfaces.gxx
index 028e52d..785069b 100644
--- a/inc/ApproxInt_PrmPrmSvSurfaces.gxx
+++ b/inc/ApproxInt_PrmPrmSvSurfaces.gxx
@@ -24,6 +24,7 @@
 
 #include <TColStd_Array1OfReal.hxx>
 #include <math_FunctionSetRoot.hxx>
+#include <Precision.hxx>
 
 #define Debug(expr)  cout<<" expr :"<<expr;
 #define MySurf1 MyIntersectionOn2S.Function().AuxillarSurface1()
@@ -173,6 +174,11 @@ Standard_Boolean ApproxInt_PrmPrmSvSurfaces::Compute( Standard_Real& u1
   TgTU = Tg.Dot(TU);
   TgTV = Tg.Dot(TV);
   DIS  = TUTU * TVTV - TUTV * TUTV;
+  if(fabs(DIS)<Precision::Angular()) { 
+    MyIsTangent=Standard_False;
+    MyHasBeenComputed = MyHasBeenComputedbis = Standard_False;
+    return(Standard_False); 
+  }
   
   DeltaU = (TgTU * TVTV - TgTV * TUTV ) / DIS ; 
   DeltaV = (TgTV * TUTU - TgTU * TUTV ) / DIS ;
@@ -190,6 +196,11 @@ Standard_Boolean ApproxInt_PrmPrmSvSurfaces::Compute( Standard_Real& u1
   TgTU = Tg.Dot(TU);
   TgTV = Tg.Dot(TV);
   DIS  = TUTU * TVTV - TUTV * TUTV;
+  if(fabs(DIS)<Precision::Angular()) { 
+    MyIsTangent=Standard_False;
+    MyHasBeenComputed = MyHasBeenComputedbis = Standard_False;
+    return(Standard_False); 
+  }
 
   DeltaU = (TgTU * TVTV - TgTV * TUTV ) / DIS ; 
   DeltaV = (TgTV * TUTU - TgTU * TUTV ) / DIS ;
diff --git a/inc/ApproxInt_SvSurfaces.hxx b/inc/ApproxInt_SvSurfaces.hxx
index 25c209c..12695aa 100644
--- a/inc/ApproxInt_SvSurfaces.hxx
+++ b/inc/ApproxInt_SvSurfaces.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_Vec2d;
 class ApproxInt_SvSurfaces  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/Approx_Array1OfAdHSurface.hxx b/inc/Approx_Array1OfAdHSurface.hxx
index b29d240..bf410b5 100644
--- a/inc/Approx_Array1OfAdHSurface.hxx
+++ b/inc/Approx_Array1OfAdHSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Adaptor3d_HSurface;
 class Approx_Array1OfAdHSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Approx_Array1OfAdHSurface(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Approx_Array1OfGTrsf2d.hxx b/inc/Approx_Array1OfGTrsf2d.hxx
index b5bd1a5..8b2cfbf 100644
--- a/inc/Approx_Array1OfGTrsf2d.hxx
+++ b/inc/Approx_Array1OfGTrsf2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_GTrsf2d;
 class Approx_Array1OfGTrsf2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Approx_Array1OfGTrsf2d(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Approx_Curve2d.hxx b/inc/Approx_Curve2d.hxx
index caa4ca2..29fbb5e 100644
--- a/inc/Approx_Curve2d.hxx
+++ b/inc/Approx_Curve2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Adaptor2d_HCurve2d;
 class Approx_Curve2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Approx_Curve2d(const Handle(Adaptor2d_HCurve2d)& C2D,const Standard_Real First,const Standard_Real Last,const Standard_Real TolU,const Standard_Real TolV,const GeomAbs_Shape Continuity,const Standard_Integer MaxDegree,const Standard_Integer MaxSegments);
diff --git a/inc/Approx_Curve3d.hxx b/inc/Approx_Curve3d.hxx
index bd71fe1..bd3cd7b 100644
--- a/inc/Approx_Curve3d.hxx
+++ b/inc/Approx_Curve3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class Adaptor3d_HCurve;
 class Approx_Curve3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Approximation  of  a  curve  with respect of the <br>
 //!          requiered tolerance Tol3D. <br>
diff --git a/inc/Approx_CurveOnSurface.hxx b/inc/Approx_CurveOnSurface.hxx
index 28cd1db..a5ca9f2 100644
--- a/inc/Approx_CurveOnSurface.hxx
+++ b/inc/Approx_CurveOnSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class Adaptor3d_HSurface;
 class Approx_CurveOnSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Approx_CurveOnSurface(const Handle(Adaptor2d_HCurve2d)& C2D,const Handle(Adaptor3d_HSurface)& Surf,const Standard_Real First,const Standard_Real Last,const Standard_Real Tol,const GeomAbs_Shape Continuity,const Standard_Integer MaxDegree,const Standard_Integer MaxSegments,const Standard_Boolean Only3d = Standard_False,const Standard_Boolean Only2d = Standard_False);
diff --git a/inc/Approx_CurvilinearParameter.hxx b/inc/Approx_CurvilinearParameter.hxx
index 801359a..26ffd16 100644
--- a/inc/Approx_CurvilinearParameter.hxx
+++ b/inc/Approx_CurvilinearParameter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -62,18 +65,7 @@ class Adaptor3d_HSurface;
 class Approx_CurvilinearParameter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! case of a free 3D curve <br>
   Standard_EXPORT   Approx_CurvilinearParameter(const Handle(Adaptor3d_HCurve)& C3D,const Standard_Real Tol,const GeomAbs_Shape Order,const Standard_Integer MaxDegree,const Standard_Integer MaxSegments);
diff --git a/inc/Approx_FitAndDivide.hxx b/inc/Approx_FitAndDivide.hxx
index 031904d..27f6ac4 100644
--- a/inc/Approx_FitAndDivide.hxx
+++ b/inc/Approx_FitAndDivide.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class AppParCurves_MultiCurve;
 class Approx_FitAndDivide  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Approx_FitAndDivide(const AppCont_Function& Line,const Standard_Integer degreemin = 3,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-5,const Standard_Real Tolerance2d = 1.0e-5,const Standard_Boolean cutting = Standard_False,const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint,const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint);
diff --git a/inc/Approx_FitAndDivide2d.hxx b/inc/Approx_FitAndDivide2d.hxx
index dd7d199..76aba64 100644
--- a/inc/Approx_FitAndDivide2d.hxx
+++ b/inc/Approx_FitAndDivide2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class AppParCurves_MultiCurve;
 class Approx_FitAndDivide2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Approx_FitAndDivide2d(const AppCont_Function2d& Line,const Standard_Integer degreemin = 3,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-5,const Standard_Real Tolerance2d = 1.0e-5,const Standard_Boolean cutting = Standard_False,const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint,const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint);
diff --git a/inc/Approx_MCurvesToBSpCurve.hxx b/inc/Approx_MCurvesToBSpCurve.hxx
index 306cb15..8da4bfa 100644
--- a/inc/Approx_MCurvesToBSpCurve.hxx
+++ b/inc/Approx_MCurvesToBSpCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class AppParCurves_MultiBSpCurve;
 class Approx_MCurvesToBSpCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Approx_MCurvesToBSpCurve();
diff --git a/inc/Approx_MyLeastSquareOfFitAndDivide.hxx b/inc/Approx_MyLeastSquareOfFitAndDivide.hxx
index cc0531c..7d9ef87 100644
--- a/inc/Approx_MyLeastSquareOfFitAndDivide.hxx
+++ b/inc/Approx_MyLeastSquareOfFitAndDivide.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class AppParCurves_MultiCurve;
 class Approx_MyLeastSquareOfFitAndDivide  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Approx_MyLeastSquareOfFitAndDivide(const AppCont_Function& SSP,const Standard_Real U0,const Standard_Real U1,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const Standard_Integer Deg,const Standard_Integer NbPoints = 24);
diff --git a/inc/Approx_MyLeastSquareOfFitAndDivide2d.hxx b/inc/Approx_MyLeastSquareOfFitAndDivide2d.hxx
index 45c30bc..a84d459 100644
--- a/inc/Approx_MyLeastSquareOfFitAndDivide2d.hxx
+++ b/inc/Approx_MyLeastSquareOfFitAndDivide2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class AppParCurves_MultiCurve;
 class Approx_MyLeastSquareOfFitAndDivide2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Approx_MyLeastSquareOfFitAndDivide2d(const AppCont_Function2d& SSP,const Standard_Real U0,const Standard_Real U1,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const Standard_Integer Deg,const Standard_Integer NbPoints = 24);
diff --git a/inc/Approx_SameParameter.hxx b/inc/Approx_SameParameter.hxx
index 71a2e7f..fb3601b 100644
--- a/inc/Approx_SameParameter.hxx
+++ b/inc/Approx_SameParameter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class Geom_Surface;
 class Approx_SameParameter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Warning: the C3D and C2D must have the same parametric domain. <br>
diff --git a/inc/Approx_SequenceOfHArray1OfReal.hxx b/inc/Approx_SequenceOfHArray1OfReal.hxx
index a01d7d1..95c07d9 100644
--- a/inc/Approx_SequenceOfHArray1OfReal.hxx
+++ b/inc/Approx_SequenceOfHArray1OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Approx_SequenceNodeOfSequenceOfHArray1OfReal;
 class Approx_SequenceOfHArray1OfReal  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Approx_SequenceOfHArray1OfReal();
diff --git a/inc/Approx_SweepApproximation.hxx b/inc/Approx_SweepApproximation.hxx
index 0d88ee9..4168807 100644
--- a/inc/Approx_SweepApproximation.hxx
+++ b/inc/Approx_SweepApproximation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -100,18 +103,7 @@ class TColgp_Array1OfPnt2d;
 class Approx_SweepApproximation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Approx_SweepApproximation(const Handle(Approx_SweepFunction)& Func);
diff --git a/inc/Aspect.hxx b/inc/Aspect.hxx
index 9510f28..691d210 100644
--- a/inc/Aspect.hxx
+++ b/inc/Aspect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,7 +58,6 @@ class Aspect_MarkerStyle;
 class Aspect_MarkMap;
 class Aspect_MarkMapEntry;
 class Aspect_Window;
-class Aspect_PixMap;
 class Aspect_GraphicDevice;
 class Aspect_Driver;
 class Aspect_WindowDriver;
@@ -86,18 +88,7 @@ class Aspect_SequenceNodeOfSequenceOfColor;
 class Aspect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the format size according to the default <br>
 //!      LENGTH unit of the required format <aFOSP>. <br>
@@ -152,7 +143,6 @@ friend class Aspect_MarkerStyle;
 friend class Aspect_MarkMap;
 friend class Aspect_MarkMapEntry;
 friend class Aspect_Window;
-friend class Aspect_PixMap;
 friend class Aspect_GraphicDevice;
 friend class Aspect_Driver;
 friend class Aspect_WindowDriver;
diff --git a/inc/Aspect_Array1OfEdge.hxx b/inc/Aspect_Array1OfEdge.hxx
index 1527dcc..4c6e288 100644
--- a/inc/Aspect_Array1OfEdge.hxx
+++ b/inc/Aspect_Array1OfEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Aspect_Edge;
 class Aspect_Array1OfEdge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Aspect_Array1OfEdge(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Aspect_Background.hxx b/inc/Aspect_Background.hxx
index cb06962..b1c73c0 100644
--- a/inc/Aspect_Background.hxx
+++ b/inc/Aspect_Background.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class Quantity_Color;
 class Aspect_Background  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a window background. <br>
 //!	    Default color : NOC_MATRAGRAY. <br>
diff --git a/inc/Aspect_ColorMapEntry.hxx b/inc/Aspect_ColorMapEntry.hxx
index f80e514..0eaf1ce 100644
--- a/inc/Aspect_ColorMapEntry.hxx
+++ b/inc/Aspect_ColorMapEntry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Aspect_ColorMapEntry)
 class Aspect_ColorMapEntry  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an unallocated colormap entry <br>
   Standard_EXPORT   Aspect_ColorMapEntry();
diff --git a/inc/Aspect_ColorPixel.hxx b/inc/Aspect_ColorPixel.hxx
index a794994..8b4ee3e 100644
--- a/inc/Aspect_ColorPixel.hxx
+++ b/inc/Aspect_ColorPixel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Aspect_ColorPixel);
 class Aspect_ColorPixel  : public Aspect_Pixel {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Aspect_ColorPixel();
diff --git a/inc/Aspect_Edge.hxx b/inc/Aspect_Edge.hxx
index 9e80004..d260fdc 100644
--- a/inc/Aspect_Edge.hxx
+++ b/inc/Aspect_Edge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Aspect_EdgeDefinitionError;
 class Aspect_Edge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an edge. <br>
   Standard_EXPORT   Aspect_Edge();
diff --git a/inc/Aspect_FontMapEntry.hxx b/inc/Aspect_FontMapEntry.hxx
index 4ee5ee3..e1573a3 100644
--- a/inc/Aspect_FontMapEntry.hxx
+++ b/inc/Aspect_FontMapEntry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Aspect_FontStyle;
 class Aspect_FontMapEntry  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an unallocated fontmap entry <br>
   Standard_EXPORT   Aspect_FontMapEntry();
diff --git a/inc/Aspect_FontStyle.hxx b/inc/Aspect_FontStyle.hxx
index 00b30f9..c4b95c7 100644
--- a/inc/Aspect_FontStyle.hxx
+++ b/inc/Aspect_FontStyle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TCollection_AsciiString;
 class Aspect_FontStyle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a font style with the default values of <br>
 //!	    FontStyle type : DEFAULT <br>
diff --git a/inc/Aspect_GenId.hxx b/inc/Aspect_GenId.hxx
index 441f197..2149ee7 100644
--- a/inc/Aspect_GenId.hxx
+++ b/inc/Aspect_GenId.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class Aspect_IdentDefinitionError;
 class Aspect_GenId  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an available set of identifiers with the lower <br>
 //!	    bound 0 and the upper bound INT_MAX/2. <br>
diff --git a/inc/Aspect_GradientBackground.hxx b/inc/Aspect_GradientBackground.hxx
index 30eb2a9..437b7ac 100644
--- a/inc/Aspect_GradientBackground.hxx
+++ b/inc/Aspect_GradientBackground.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class Quantity_Color;
 class Aspect_GradientBackground  : public Aspect_Background {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a window gradient background. <br>
 //! Default colors : Quantity_NOC_BLACK. <br>
diff --git a/inc/Aspect_GraphicCallbackProc.hxx b/inc/Aspect_GraphicCallbackProc.hxx
index 225c1b9..898a486 100644
--- a/inc/Aspect_GraphicCallbackProc.hxx
+++ b/inc/Aspect_GraphicCallbackProc.hxx
@@ -15,18 +15,13 @@
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
-/*============================================================================*/
-/*==== Titre: Aspect_GraphicCallbackProc.hxx                                               */
-/*==== Role : The header file of primitive type "GraphicCallbackProc" from package        */
-/*==== "V3d"                                                           */
-/*==== Implementation:  This is a primitive type implemented with typedef     */
-/*============================================================================*/
-
 #ifndef _Aspect_GraphicCallbackProc_HeaderFile
 #define _Aspect_GraphicCallbackProc_HeaderFile
+
 #include <Aspect_Display.hxx>
 #include <Aspect_Drawable.hxx>
 #include <Aspect_RenderingContext.hxx>
+#include <Handle_Standard_Transient.hxx>
 
 // The flags below provide additional information to define the moment when
 // callback was invoked in redraw procedure. These flags are bitwise OR'ed
@@ -42,29 +37,20 @@
 // mask for all additional callbacks that invoked in process of redrawing
 #define OCC_REDRAW_ADDITIONAL_CALLBACKS ( OCC_PRE_REDRAW | OCC_PRE_OVERLAY )
 
- typedef struct {
-   int reason;
-   int wsID;
-   int viewID;
-   Aspect_Display display;
-   Aspect_Drawable window;
-   Aspect_RenderingContext gcontext;
- } Aspect_GraphicCallbackStruct;
+typedef struct
+{
+  int reason;
+  int wsID;
+  int viewID;
+  Handle(Standard_Transient) glContext;
+} Aspect_GraphicCallbackStruct;
 
- typedef int (*Aspect_GraphicCallbackProc)(
-    Aspect_Drawable   	/* Window ID */,
-    void*           	/* user data */, 
-    Aspect_GraphicCallbackStruct*  /* call data */ 
- );
+// Prototype for callback function to perform custom drawing within the same window and GL context.
+typedef int (*Aspect_GraphicCallbackProc) (Aspect_Drawable               theWindowID,
+                                           void*                         theUserData,
+                                           Aspect_GraphicCallbackStruct* theCallData);
 
-#if defined(__cplusplus) || defined(c_plusplus)
-/*==== Definition de Type ====================================================*/
-
-#include <Standard_Macro.hxx>
 class Handle(Standard_Type);
 const Handle(Standard_Type)& STANDARD_TYPE(Aspect_GraphicCallbackProc);
 
-/*============================================================================*/
-#endif
-
 #endif /* _Aspect_GraphicCallbackProc_HeaderFile */
diff --git a/inc/Aspect_IndexPixel.hxx b/inc/Aspect_IndexPixel.hxx
index 72f3800..d8cd95a 100644
--- a/inc/Aspect_IndexPixel.hxx
+++ b/inc/Aspect_IndexPixel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Aspect_IndexPixel);
 class Aspect_IndexPixel  : public Aspect_Pixel {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Aspect_IndexPixel();
diff --git a/inc/Aspect_LineStyle.hxx b/inc/Aspect_LineStyle.hxx
index dd1cf30..ccdb861 100644
--- a/inc/Aspect_LineStyle.hxx
+++ b/inc/Aspect_LineStyle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColQuantity_Array1OfLength;
 class Aspect_LineStyle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a line style with the default value of <br>
 //!	    LineStyle type : SOLID <br>
diff --git a/inc/Aspect_MarkMapEntry.hxx b/inc/Aspect_MarkMapEntry.hxx
index a1ba18e..6ef6b49 100644
--- a/inc/Aspect_MarkMapEntry.hxx
+++ b/inc/Aspect_MarkMapEntry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Aspect_MarkerStyle;
 class Aspect_MarkMapEntry  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an unallocated markmap entry <br>
   Standard_EXPORT   Aspect_MarkMapEntry();
diff --git a/inc/Aspect_MarkerStyle.hxx b/inc/Aspect_MarkerStyle.hxx
index 8573f21..754e058 100644
--- a/inc/Aspect_MarkerStyle.hxx
+++ b/inc/Aspect_MarkerStyle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TShort_Array1OfShortReal;
 class Aspect_MarkerStyle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a marker style with the default value of <br>
 //!	    MarkerStyle type : POINT <br>
diff --git a/inc/Aspect_PixMap.hxx b/inc/Aspect_PixMap.hxx
deleted file mode 100644
index 0588757..0000000
--- a/inc/Aspect_PixMap.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _Aspect_PixMap_HeaderFile
-#define _Aspect_PixMap_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-#ifndef _Handle_Aspect_PixMap_HeaderFile
-#include <Handle_Aspect_PixMap.hxx>
-#endif
-
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _MMgt_TShared_HeaderFile
-#include <MMgt_TShared.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Standard_CString_HeaderFile
-#include <Standard_CString.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _Aspect_Handle_HeaderFile
-#include <Aspect_Handle.hxx>
-#endif
-class Aspect_PixmapDefinitionError;
-class Aspect_PixmapError;
-class Quantity_Color;
-
-
-//! This class allows the definition of a pixmap(bitmap) <br>
-class Aspect_PixMap : public MMgt_TShared {
-
-public:
-
-  //! Destroy the pixmap <br>
-  Standard_EXPORT   virtual  void Destroy()  = 0;
-  
-//! Dumps the Bitmap to an image file with <br>
-//! an optional gamma correction value <br>
-//! and returns TRUE if the dump occurs normaly. <br>
-  Standard_EXPORT   virtual  Standard_Boolean Dump(const Standard_CString aFilename,const Standard_Real aGammaValue = 1.0) const = 0;
-  
-//! Returns the pixel color. <br>
-  Standard_EXPORT   virtual  Quantity_Color PixelColor(const Standard_Integer theX,const Standard_Integer theY) const = 0;
-  //! Returns the ID of the just created pixmap <br>
-  Standard_EXPORT   virtual  Aspect_Handle PixmapID() const = 0;
-  //! Returns the allocated pixmap's size in PIXEL <br>
-  Standard_EXPORT     void Size(Standard_Integer& aWidth,Standard_Integer& anHeight) const;
-  //! Returns the allocated pixmap's depth (planes number) <br>
-  Standard_EXPORT     Standard_Integer Depth() const;
-
-
-
-
-  DEFINE_STANDARD_RTTI(Aspect_PixMap)
-
-protected:
-
-  //! Initializes the datas of a pixmap with a pixel size <br>
-//! <aWidth>,<anHeight> and depth. <br>
-  Standard_EXPORT   Aspect_PixMap(const Standard_Integer aWidth,const Standard_Integer anHeight,const Standard_Integer aDepth);
-
-Standard_Integer myWidth;
-Standard_Integer myHeight;
-Standard_Integer myDepth;
-
-
-private: 
-
-
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-
-
-#endif
diff --git a/inc/Aspect_Pixel.hxx b/inc/Aspect_Pixel.hxx
index 0494d19..2066fe4 100644
--- a/inc/Aspect_Pixel.hxx
+++ b/inc/Aspect_Pixel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Aspect_Pixel);
 class Aspect_Pixel  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Prints the contents of <me> on the stream <s> <br>
   Standard_EXPORT   virtual  void Print(Standard_OStream& s) const = 0;
diff --git a/inc/Aspect_SequenceOfColor.hxx b/inc/Aspect_SequenceOfColor.hxx
index 80c8deb..a914860 100644
--- a/inc/Aspect_SequenceOfColor.hxx
+++ b/inc/Aspect_SequenceOfColor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Aspect_SequenceNodeOfSequenceOfColor;
 class Aspect_SequenceOfColor  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Aspect_SequenceOfColor();
diff --git a/inc/Aspect_SequenceOfColorMapEntry.hxx b/inc/Aspect_SequenceOfColorMapEntry.hxx
index f1e6253..b9930d9 100644
--- a/inc/Aspect_SequenceOfColorMapEntry.hxx
+++ b/inc/Aspect_SequenceOfColorMapEntry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Aspect_SequenceNodeOfSequenceOfColorMapEntry;
 class Aspect_SequenceOfColorMapEntry  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Aspect_SequenceOfColorMapEntry();
diff --git a/inc/Aspect_SequenceOfFontMapEntry.hxx b/inc/Aspect_SequenceOfFontMapEntry.hxx
index c365213..6f7c101 100644
--- a/inc/Aspect_SequenceOfFontMapEntry.hxx
+++ b/inc/Aspect_SequenceOfFontMapEntry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Aspect_SequenceNodeOfSequenceOfFontMapEntry;
 class Aspect_SequenceOfFontMapEntry  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Aspect_SequenceOfFontMapEntry();
diff --git a/inc/Aspect_SequenceOfMarkMapEntry.hxx b/inc/Aspect_SequenceOfMarkMapEntry.hxx
index 9becd08..2a86aef 100644
--- a/inc/Aspect_SequenceOfMarkMapEntry.hxx
+++ b/inc/Aspect_SequenceOfMarkMapEntry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Aspect_SequenceNodeOfSequenceOfMarkMapEntry;
 class Aspect_SequenceOfMarkMapEntry  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Aspect_SequenceOfMarkMapEntry();
diff --git a/inc/Aspect_SequenceOfTypeMapEntry.hxx b/inc/Aspect_SequenceOfTypeMapEntry.hxx
index ba07d95..7d1080b 100644
--- a/inc/Aspect_SequenceOfTypeMapEntry.hxx
+++ b/inc/Aspect_SequenceOfTypeMapEntry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Aspect_SequenceNodeOfSequenceOfTypeMapEntry;
 class Aspect_SequenceOfTypeMapEntry  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Aspect_SequenceOfTypeMapEntry();
diff --git a/inc/Aspect_SequenceOfWidthMapEntry.hxx b/inc/Aspect_SequenceOfWidthMapEntry.hxx
index f29939a..9233d44 100644
--- a/inc/Aspect_SequenceOfWidthMapEntry.hxx
+++ b/inc/Aspect_SequenceOfWidthMapEntry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Aspect_SequenceNodeOfSequenceOfWidthMapEntry;
 class Aspect_SequenceOfWidthMapEntry  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Aspect_SequenceOfWidthMapEntry();
diff --git a/inc/Aspect_TypeMapEntry.hxx b/inc/Aspect_TypeMapEntry.hxx
index 028985e..ed0b706 100644
--- a/inc/Aspect_TypeMapEntry.hxx
+++ b/inc/Aspect_TypeMapEntry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Aspect_LineStyle;
 class Aspect_TypeMapEntry  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an unallocated typemap entry <br>
   Standard_EXPORT   Aspect_TypeMapEntry();
diff --git a/inc/Aspect_WidthMapEntry.hxx b/inc/Aspect_WidthMapEntry.hxx
index 1a89191..dd3ef36 100644
--- a/inc/Aspect_WidthMapEntry.hxx
+++ b/inc/Aspect_WidthMapEntry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Aspect_BadAccess;
 class Aspect_WidthMapEntry  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an unallocated widthmap entry <br>
   Standard_EXPORT   Aspect_WidthMapEntry();
diff --git a/inc/Aspect_Window.hxx b/inc/Aspect_Window.hxx
index 68ed10a..b0aa871 100644
--- a/inc/Aspect_Window.hxx
+++ b/inc/Aspect_Window.hxx
@@ -55,9 +55,6 @@
 #ifndef _Standard_Real_HeaderFile
 #include <Standard_Real.hxx>
 #endif
-#ifndef _Handle_Aspect_PixMap_HeaderFile
-#include <Handle_Aspect_PixMap.hxx>
-#endif
 #ifndef _Quantity_Ratio_HeaderFile
 #include <Quantity_Ratio.hxx>
 #endif
@@ -70,7 +67,6 @@ class Aspect_WindowError;
 class Aspect_Background;
 class Quantity_Color;
 class Aspect_GradientBackground;
-class Aspect_PixMap;
 
 
 //! This class allows the definition of a window <br>
@@ -132,8 +128,6 @@ public:
 //! to an image file with <br>
 //! an optional gamma correction value according to the graphic system <br>
   Standard_EXPORT   virtual  Standard_Boolean DumpArea(const Standard_CString aFilename,const Standard_Integer Xc,const Standard_Integer Yc,const Standard_Integer Width,const Standard_Integer Height,const Standard_Real aGammaValue = 1.0) const = 0;
-  //! dump the full contents of the window to a pixmap. <br>
-  Standard_EXPORT   virtual  Handle_Aspect_PixMap ToPixMap() const = 0;
   //! Loads the XWD file to this Window. <br>
 //! Returns TRUE if the loading occurs normaly. <br>
 //!  Warning: Note that the Window is enlarged automatically <br>
diff --git a/inc/BOPTColStd_CArray1OfInteger.hxx b/inc/BOPTColStd_CArray1OfInteger.hxx
index 1ea8da7..c8b2551 100644
--- a/inc/BOPTColStd_CArray1OfInteger.hxx
+++ b/inc/BOPTColStd_CArray1OfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class Standard_OutOfMemory;
 class BOPTColStd_CArray1OfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTColStd_CArray1OfInteger(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTColStd_CArray1OfPnt2d.hxx b/inc/BOPTColStd_CArray1OfPnt2d.hxx
index 7a7e5f4..9211333 100644
--- a/inc/BOPTColStd_CArray1OfPnt2d.hxx
+++ b/inc/BOPTColStd_CArray1OfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_Pnt2d;
 class BOPTColStd_CArray1OfPnt2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTColStd_CArray1OfPnt2d(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTColStd_CArray1OfShape.hxx b/inc/BOPTColStd_CArray1OfShape.hxx
index ecd43b6..bdad23b 100644
--- a/inc/BOPTColStd_CArray1OfShape.hxx
+++ b/inc/BOPTColStd_CArray1OfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopoDS_Shape;
 class BOPTColStd_CArray1OfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTColStd_CArray1OfShape(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTColStd_Dump.hxx b/inc/BOPTColStd_Dump.hxx
index 9ca8f59..7cc38ab 100644
--- a/inc/BOPTColStd_Dump.hxx
+++ b/inc/BOPTColStd_Dump.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TCollection_AsciiString;
 class BOPTColStd_Dump  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void PrintMessage(const TCollection_AsciiString& aMessage) ;
diff --git a/inc/BOPTColStd_Failure.hxx b/inc/BOPTColStd_Failure.hxx
index 38d4144..e832fb1 100644
--- a/inc/BOPTColStd_Failure.hxx
+++ b/inc/BOPTColStd_Failure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@
 class BOPTColStd_Failure  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTColStd_Failure(const Standard_CString aMessage);
diff --git a/inc/BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx b/inc/BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx
index ae2110e..56fd296 100644
--- a/inc/BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx
+++ b/inc/BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BOPTColStd_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedMapOfInteger;
 class BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOPTColStd_IndexedDataMapOfIntegerInteger.hxx b/inc/BOPTColStd_IndexedDataMapOfIntegerInteger.hxx
index 0385a46..8d492bf 100644
--- a/inc/BOPTColStd_IndexedDataMapOfIntegerInteger.hxx
+++ b/inc/BOPTColStd_IndexedDataMapOfIntegerInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class BOPTColStd_IndexedDataMapNodeOfIndexedDataMapOfIntegerInteger;
 class BOPTColStd_IndexedDataMapOfIntegerInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTColStd_IndexedDataMapOfIntegerInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOPTColStd_IndexedDataMapOfSWRInteger.hxx b/inc/BOPTColStd_IndexedDataMapOfSWRInteger.hxx
index 2d0dc4b..8a1db5f 100644
--- a/inc/BOPTColStd_IndexedDataMapOfSWRInteger.hxx
+++ b/inc/BOPTColStd_IndexedDataMapOfSWRInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BOPTColStd_IndexedDataMapNodeOfIndexedDataMapOfSWRInteger;
 class BOPTColStd_IndexedDataMapOfSWRInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTColStd_IndexedDataMapOfSWRInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOPTColStd_ListIteratorOfListOfListOfShape.hxx b/inc/BOPTColStd_ListIteratorOfListOfListOfShape.hxx
index a89cc1f..72fde71 100644
--- a/inc/BOPTColStd_ListIteratorOfListOfListOfShape.hxx
+++ b/inc/BOPTColStd_ListIteratorOfListOfListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOPTColStd_ListNodeOfListOfListOfShape;
 class BOPTColStd_ListIteratorOfListOfListOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTColStd_ListIteratorOfListOfListOfShape();
diff --git a/inc/BOPTColStd_ListOfListOfShape.hxx b/inc/BOPTColStd_ListOfListOfShape.hxx
index cd34b6f..7416625 100644
--- a/inc/BOPTColStd_ListOfListOfShape.hxx
+++ b/inc/BOPTColStd_ListOfListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOPTColStd_ListNodeOfListOfListOfShape;
 class BOPTColStd_ListOfListOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTColStd_ListOfListOfShape();
diff --git a/inc/BOPTColStd_ShapeWithRank.hxx b/inc/BOPTColStd_ShapeWithRank.hxx
index 566e1bc..b3780aa 100644
--- a/inc/BOPTColStd_ShapeWithRank.hxx
+++ b/inc/BOPTColStd_ShapeWithRank.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TopoDS_Shape;
 class BOPTColStd_ShapeWithRank  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTColStd_ShapeWithRankHasher.hxx b/inc/BOPTColStd_ShapeWithRankHasher.hxx
index af4a918..3126884 100644
--- a/inc/BOPTColStd_ShapeWithRankHasher.hxx
+++ b/inc/BOPTColStd_ShapeWithRankHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class BOPTColStd_ShapeWithRank;
 class BOPTColStd_ShapeWithRankHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HasCode value  for  the  Key <K>  in the <br>
 //!          range 0..Upper. <br>
diff --git a/inc/BOPTest.hxx b/inc/BOPTest.hxx
index 0d741d9..0114243 100644
--- a/inc/BOPTest.hxx
+++ b/inc/BOPTest.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@ class BOPTest_DrawableShape;
 class BOPTest  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines all commands. <br>
   Standard_EXPORT   static  void AllCommands(Draw_Interpretor& DI) ;
diff --git a/inc/BOPTools_Array1OfPave.hxx b/inc/BOPTools_Array1OfPave.hxx
index 7c7ede6..a2a2a23 100644
--- a/inc/BOPTools_Array1OfPave.hxx
+++ b/inc/BOPTools_Array1OfPave.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOPTools_Pave;
 class BOPTools_Array1OfPave  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_Array1OfPave(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/BOPTools_Array2OfIntersectionStatus.hxx b/inc/BOPTools_Array2OfIntersectionStatus.hxx
index a18d032..98d14a2 100644
--- a/inc/BOPTools_Array2OfIntersectionStatus.hxx
+++ b/inc/BOPTools_Array2OfIntersectionStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_DimensionMismatch;
 class BOPTools_Array2OfIntersectionStatus  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_Array2OfIntersectionStatus(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/BOPTools_CArray1OfEEInterference.hxx b/inc/BOPTools_CArray1OfEEInterference.hxx
index 5df8e47..23ec0c2 100644
--- a/inc/BOPTools_CArray1OfEEInterference.hxx
+++ b/inc/BOPTools_CArray1OfEEInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BOPTools_EEInterference;
 class BOPTools_CArray1OfEEInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_CArray1OfEEInterference(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTools_CArray1OfESInterference.hxx b/inc/BOPTools_CArray1OfESInterference.hxx
index 7d86675..cd9209c 100644
--- a/inc/BOPTools_CArray1OfESInterference.hxx
+++ b/inc/BOPTools_CArray1OfESInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BOPTools_ESInterference;
 class BOPTools_CArray1OfESInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_CArray1OfESInterference(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTools_CArray1OfInterferenceLine.hxx b/inc/BOPTools_CArray1OfInterferenceLine.hxx
index f506905..5d2f1d8 100644
--- a/inc/BOPTools_CArray1OfInterferenceLine.hxx
+++ b/inc/BOPTools_CArray1OfInterferenceLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BOPTools_InterferenceLine;
 class BOPTools_CArray1OfInterferenceLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_CArray1OfInterferenceLine(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTools_CArray1OfPave.hxx b/inc/BOPTools_CArray1OfPave.hxx
index 8671009..3ad4977 100644
--- a/inc/BOPTools_CArray1OfPave.hxx
+++ b/inc/BOPTools_CArray1OfPave.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BOPTools_Pave;
 class BOPTools_CArray1OfPave  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_CArray1OfPave(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTools_CArray1OfSSInterference.hxx b/inc/BOPTools_CArray1OfSSInterference.hxx
index 5f6d414..8eb14d0 100644
--- a/inc/BOPTools_CArray1OfSSInterference.hxx
+++ b/inc/BOPTools_CArray1OfSSInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BOPTools_SSInterference;
 class BOPTools_CArray1OfSSInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_CArray1OfSSInterference(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTools_CArray1OfVEInterference.hxx b/inc/BOPTools_CArray1OfVEInterference.hxx
index 566160c..a4dd185 100644
--- a/inc/BOPTools_CArray1OfVEInterference.hxx
+++ b/inc/BOPTools_CArray1OfVEInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BOPTools_VEInterference;
 class BOPTools_CArray1OfVEInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_CArray1OfVEInterference(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTools_CArray1OfVSInterference.hxx b/inc/BOPTools_CArray1OfVSInterference.hxx
index 5dc86d4..06afa2e 100644
--- a/inc/BOPTools_CArray1OfVSInterference.hxx
+++ b/inc/BOPTools_CArray1OfVSInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BOPTools_VSInterference;
 class BOPTools_CArray1OfVSInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_CArray1OfVSInterference(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTools_CArray1OfVVInterference.hxx b/inc/BOPTools_CArray1OfVVInterference.hxx
index 816c745..416164a 100644
--- a/inc/BOPTools_CArray1OfVVInterference.hxx
+++ b/inc/BOPTools_CArray1OfVVInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BOPTools_VVInterference;
 class BOPTools_CArray1OfVVInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_CArray1OfVVInterference(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTools_CheckResult.hxx b/inc/BOPTools_CheckResult.hxx
index bdf426a..dea9afc 100644
--- a/inc/BOPTools_CheckResult.hxx
+++ b/inc/BOPTools_CheckResult.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TopTools_ListOfShape;
 class BOPTools_CheckResult  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! empty constructor <br>
   Standard_EXPORT   BOPTools_CheckResult();
diff --git a/inc/BOPTools_Checker.hxx b/inc/BOPTools_Checker.hxx
index ed8c77b..e65c20e 100644
--- a/inc/BOPTools_Checker.hxx
+++ b/inc/BOPTools_Checker.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class BOPTools_ListOfCheckResults;
 class BOPTools_Checker  : public BOPTools_PaveFiller {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty Contructor <br>
diff --git a/inc/BOPTools_CommonBlock.hxx b/inc/BOPTools_CommonBlock.hxx
index 9194dd7..1292109 100644
--- a/inc/BOPTools_CommonBlock.hxx
+++ b/inc/BOPTools_CommonBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class BOPTools_PaveBlock;
 class BOPTools_CommonBlock  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_CommonBlockAPI.hxx b/inc/BOPTools_CommonBlockAPI.hxx
index bfaf7a5..a3d4ca3 100644
--- a/inc/BOPTools_CommonBlockAPI.hxx
+++ b/inc/BOPTools_CommonBlockAPI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class BOPTools_PaveBlock;
 class BOPTools_CommonBlockAPI  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Constructor <br>
diff --git a/inc/BOPTools_CommonBlockPool.hxx b/inc/BOPTools_CommonBlockPool.hxx
index 65f7feb..14596f1 100644
--- a/inc/BOPTools_CommonBlockPool.hxx
+++ b/inc/BOPTools_CommonBlockPool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BOPTools_ListOfCommonBlock;
 class BOPTools_CommonBlockPool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_CommonBlockPool(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTools_ComparePave.hxx b/inc/BOPTools_ComparePave.hxx
index 861323a..e2ab673 100644
--- a/inc/BOPTools_ComparePave.hxx
+++ b/inc/BOPTools_ComparePave.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class BOPTools_Pave;
 class BOPTools_ComparePave  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_CoupleOfInteger.hxx b/inc/BOPTools_CoupleOfInteger.hxx
index e4eac40..f1c46bf 100644
--- a/inc/BOPTools_CoupleOfInteger.hxx
+++ b/inc/BOPTools_CoupleOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@
 class BOPTools_CoupleOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty Constructor <br>
diff --git a/inc/BOPTools_CoupleOfIntegerMapHasher.hxx b/inc/BOPTools_CoupleOfIntegerMapHasher.hxx
index 4f6066a..9486e7d 100644
--- a/inc/BOPTools_CoupleOfIntegerMapHasher.hxx
+++ b/inc/BOPTools_CoupleOfIntegerMapHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class BOPTools_CoupleOfInteger;
 class BOPTools_CoupleOfIntegerMapHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const BOPTools_CoupleOfInteger& aPKey,const Standard_Integer Upper) ;
diff --git a/inc/BOPTools_Curve.hxx b/inc/BOPTools_Curve.hxx
index fd38b8b..4b611e4 100644
--- a/inc/BOPTools_Curve.hxx
+++ b/inc/BOPTools_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TColStd_ListOfInteger;
 class BOPTools_Curve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_DEInfo.hxx b/inc/BOPTools_DEInfo.hxx
index 93cc1f9..e641a57 100644
--- a/inc/BOPTools_DEInfo.hxx
+++ b/inc/BOPTools_DEInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TColStd_ListOfInteger;
 class BOPTools_DEInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_DEProcessor.hxx b/inc/BOPTools_DEProcessor.hxx
index 1c809e1..c878822 100644
--- a/inc/BOPTools_DEProcessor.hxx
+++ b/inc/BOPTools_DEProcessor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopoDS_Vertex;
 class BOPTools_DEProcessor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Constructor <br>
diff --git a/inc/BOPTools_DSFiller.hxx b/inc/BOPTools_DSFiller.hxx
index 3d33c94..c3a6257 100644
--- a/inc/BOPTools_DSFiller.hxx
+++ b/inc/BOPTools_DSFiller.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class TColStd_DataMapOfIntegerListOfInteger;
 class BOPTools_DSFiller  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_EEInterference.hxx b/inc/BOPTools_EEInterference.hxx
index 8b85772..e23b5c0 100644
--- a/inc/BOPTools_EEInterference.hxx
+++ b/inc/BOPTools_EEInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntTools_CommonPrt;
 class BOPTools_EEInterference  : public BOPTools_ShapeShapeInterference {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_ESInterference.hxx b/inc/BOPTools_ESInterference.hxx
index cad284d..9750148 100644
--- a/inc/BOPTools_ESInterference.hxx
+++ b/inc/BOPTools_ESInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class IntTools_CommonPrt;
 class BOPTools_ESInterference  : public BOPTools_ShapeShapeInterference {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_IDMapOfPaveBlockIMapOfInteger.hxx b/inc/BOPTools_IDMapOfPaveBlockIMapOfInteger.hxx
index a5c1347..78a97a3 100644
--- a/inc/BOPTools_IDMapOfPaveBlockIMapOfInteger.hxx
+++ b/inc/BOPTools_IDMapOfPaveBlockIMapOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BOPTools_IndexedDataMapNodeOfIDMapOfPaveBlockIMapOfInteger;
 class BOPTools_IDMapOfPaveBlockIMapOfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_IDMapOfPaveBlockIMapOfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOPTools_IDMapOfPaveBlockIMapOfPaveBlock.hxx b/inc/BOPTools_IDMapOfPaveBlockIMapOfPaveBlock.hxx
index eeaaaa0..f8e0721 100644
--- a/inc/BOPTools_IDMapOfPaveBlockIMapOfPaveBlock.hxx
+++ b/inc/BOPTools_IDMapOfPaveBlockIMapOfPaveBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BOPTools_IndexedDataMapNodeOfIDMapOfPaveBlockIMapOfPaveBlock;
 class BOPTools_IDMapOfPaveBlockIMapOfPaveBlock  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_IDMapOfPaveBlockIMapOfPaveBlock(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOPTools_IMapOfPaveBlock.hxx b/inc/BOPTools_IMapOfPaveBlock.hxx
index 9e15180..b70b49c 100644
--- a/inc/BOPTools_IMapOfPaveBlock.hxx
+++ b/inc/BOPTools_IMapOfPaveBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class BOPTools_IndexedMapNodeOfIMapOfPaveBlock;
 class BOPTools_IMapOfPaveBlock  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_IMapOfPaveBlock(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOPTools_IndexedDataMapOfIntegerDEInfo.hxx b/inc/BOPTools_IndexedDataMapOfIntegerDEInfo.hxx
index d78c498..99ef0fd 100644
--- a/inc/BOPTools_IndexedDataMapOfIntegerDEInfo.hxx
+++ b/inc/BOPTools_IndexedDataMapOfIntegerDEInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BOPTools_IndexedDataMapNodeOfIndexedDataMapOfIntegerDEInfo;
 class BOPTools_IndexedDataMapOfIntegerDEInfo  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_IndexedDataMapOfIntegerDEInfo(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOPTools_IndexedDataMapOfIntegerPaveSet.hxx b/inc/BOPTools_IndexedDataMapOfIntegerPaveSet.hxx
index ac59cf4..8b82d15 100644
--- a/inc/BOPTools_IndexedDataMapOfIntegerPaveSet.hxx
+++ b/inc/BOPTools_IndexedDataMapOfIntegerPaveSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BOPTools_IndexedDataMapNodeOfIndexedDataMapOfIntegerPaveSet;
 class BOPTools_IndexedDataMapOfIntegerPaveSet  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_IndexedDataMapOfIntegerPaveSet(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOPTools_IndexedDataMapOfIntegerState.hxx b/inc/BOPTools_IndexedDataMapOfIntegerState.hxx
index f24767e..c17ba06 100644
--- a/inc/BOPTools_IndexedDataMapOfIntegerState.hxx
+++ b/inc/BOPTools_IndexedDataMapOfIntegerState.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class BOPTools_IndexedDataMapNodeOfIndexedDataMapOfIntegerState;
 class BOPTools_IndexedDataMapOfIntegerState  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_IndexedDataMapOfIntegerState(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOPTools_IndexedDataMapOfShapeWithState.hxx b/inc/BOPTools_IndexedDataMapOfShapeWithState.hxx
index 623b947..2776023 100644
--- a/inc/BOPTools_IndexedDataMapOfShapeWithState.hxx
+++ b/inc/BOPTools_IndexedDataMapOfShapeWithState.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class BOPTools_IndexedDataMapNodeOfIndexedDataMapOfShapeWithState;
 class BOPTools_IndexedDataMapOfShapeWithState  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_IndexedDataMapOfShapeWithState(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOPTools_IndexedMapOfCoupleOfInteger.hxx b/inc/BOPTools_IndexedMapOfCoupleOfInteger.hxx
index c12035b..8e5e7e1 100644
--- a/inc/BOPTools_IndexedMapOfCoupleOfInteger.hxx
+++ b/inc/BOPTools_IndexedMapOfCoupleOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class BOPTools_IndexedMapNodeOfIndexedMapOfCoupleOfInteger;
 class BOPTools_IndexedMapOfCoupleOfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_IndexedMapOfCoupleOfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOPTools_Interference.hxx b/inc/BOPTools_Interference.hxx
index 30a49b5..fa49591 100644
--- a/inc/BOPTools_Interference.hxx
+++ b/inc/BOPTools_Interference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@
 class BOPTools_Interference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_InterferenceLine.hxx b/inc/BOPTools_InterferenceLine.hxx
index 4be936c..dfae0ae 100644
--- a/inc/BOPTools_InterferenceLine.hxx
+++ b/inc/BOPTools_InterferenceLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class BOPTools_Interference;
 class BOPTools_InterferenceLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_InterferencePool.hxx b/inc/BOPTools_InterferencePool.hxx
index 4a75024..3b39531 100644
--- a/inc/BOPTools_InterferencePool.hxx
+++ b/inc/BOPTools_InterferencePool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class BOPTools_CArray1OfVVInterference;
 class BOPTools_InterferencePool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_IteratorOfCoupleOfShape.hxx b/inc/BOPTools_IteratorOfCoupleOfShape.hxx
index 17e4f54..fa4d40e 100644
--- a/inc/BOPTools_IteratorOfCoupleOfShape.hxx
+++ b/inc/BOPTools_IteratorOfCoupleOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class BOPTools_ListOfCoupleOfInteger;
 class BOPTools_IteratorOfCoupleOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty Constructor <br>
diff --git a/inc/BOPTools_ListIteratorOfListOfCheckResults.hxx b/inc/BOPTools_ListIteratorOfListOfCheckResults.hxx
index a79a3a0..5f5bbb8 100644
--- a/inc/BOPTools_ListIteratorOfListOfCheckResults.hxx
+++ b/inc/BOPTools_ListIteratorOfListOfCheckResults.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOPTools_ListNodeOfListOfCheckResults;
 class BOPTools_ListIteratorOfListOfCheckResults  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListIteratorOfListOfCheckResults();
diff --git a/inc/BOPTools_ListIteratorOfListOfCommonBlock.hxx b/inc/BOPTools_ListIteratorOfListOfCommonBlock.hxx
index ab9c5a6..f1eb445 100644
--- a/inc/BOPTools_ListIteratorOfListOfCommonBlock.hxx
+++ b/inc/BOPTools_ListIteratorOfListOfCommonBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOPTools_ListNodeOfListOfCommonBlock;
 class BOPTools_ListIteratorOfListOfCommonBlock  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListIteratorOfListOfCommonBlock();
diff --git a/inc/BOPTools_ListIteratorOfListOfCoupleOfInteger.hxx b/inc/BOPTools_ListIteratorOfListOfCoupleOfInteger.hxx
index 280303f..3c16b0d 100644
--- a/inc/BOPTools_ListIteratorOfListOfCoupleOfInteger.hxx
+++ b/inc/BOPTools_ListIteratorOfListOfCoupleOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOPTools_ListNodeOfListOfCoupleOfInteger;
 class BOPTools_ListIteratorOfListOfCoupleOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListIteratorOfListOfCoupleOfInteger();
diff --git a/inc/BOPTools_ListIteratorOfListOfInterference.hxx b/inc/BOPTools_ListIteratorOfListOfInterference.hxx
index 5dede23..3b91fe6 100644
--- a/inc/BOPTools_ListIteratorOfListOfInterference.hxx
+++ b/inc/BOPTools_ListIteratorOfListOfInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOPTools_ListNodeOfListOfInterference;
 class BOPTools_ListIteratorOfListOfInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListIteratorOfListOfInterference();
diff --git a/inc/BOPTools_ListIteratorOfListOfPave.hxx b/inc/BOPTools_ListIteratorOfListOfPave.hxx
index 6d561c8..3fd0ba7 100644
--- a/inc/BOPTools_ListIteratorOfListOfPave.hxx
+++ b/inc/BOPTools_ListIteratorOfListOfPave.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOPTools_ListNodeOfListOfPave;
 class BOPTools_ListIteratorOfListOfPave  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListIteratorOfListOfPave();
diff --git a/inc/BOPTools_ListIteratorOfListOfPaveBlock.hxx b/inc/BOPTools_ListIteratorOfListOfPaveBlock.hxx
index 1953f48..0eedc46 100644
--- a/inc/BOPTools_ListIteratorOfListOfPaveBlock.hxx
+++ b/inc/BOPTools_ListIteratorOfListOfPaveBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOPTools_ListNodeOfListOfPaveBlock;
 class BOPTools_ListIteratorOfListOfPaveBlock  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListIteratorOfListOfPaveBlock();
diff --git a/inc/BOPTools_ListIteratorOfListOfShapeEnum.hxx b/inc/BOPTools_ListIteratorOfListOfShapeEnum.hxx
index 7a36413..03c512c 100644
--- a/inc/BOPTools_ListIteratorOfListOfShapeEnum.hxx
+++ b/inc/BOPTools_ListIteratorOfListOfShapeEnum.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOPTools_ListNodeOfListOfShapeEnum;
 class BOPTools_ListIteratorOfListOfShapeEnum  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListIteratorOfListOfShapeEnum();
diff --git a/inc/BOPTools_ListOfCheckResults.hxx b/inc/BOPTools_ListOfCheckResults.hxx
index 943ccfc..1ac0ab7 100644
--- a/inc/BOPTools_ListOfCheckResults.hxx
+++ b/inc/BOPTools_ListOfCheckResults.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOPTools_ListNodeOfListOfCheckResults;
 class BOPTools_ListOfCheckResults  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListOfCheckResults();
diff --git a/inc/BOPTools_ListOfCommonBlock.hxx b/inc/BOPTools_ListOfCommonBlock.hxx
index 0e5f108..db340bd 100644
--- a/inc/BOPTools_ListOfCommonBlock.hxx
+++ b/inc/BOPTools_ListOfCommonBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOPTools_ListNodeOfListOfCommonBlock;
 class BOPTools_ListOfCommonBlock  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListOfCommonBlock();
diff --git a/inc/BOPTools_ListOfCoupleOfInteger.hxx b/inc/BOPTools_ListOfCoupleOfInteger.hxx
index a9d7856..3bdca4c 100644
--- a/inc/BOPTools_ListOfCoupleOfInteger.hxx
+++ b/inc/BOPTools_ListOfCoupleOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOPTools_ListNodeOfListOfCoupleOfInteger;
 class BOPTools_ListOfCoupleOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListOfCoupleOfInteger();
diff --git a/inc/BOPTools_ListOfInterference.hxx b/inc/BOPTools_ListOfInterference.hxx
index aae1a60..018141c 100644
--- a/inc/BOPTools_ListOfInterference.hxx
+++ b/inc/BOPTools_ListOfInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOPTools_ListNodeOfListOfInterference;
 class BOPTools_ListOfInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListOfInterference();
diff --git a/inc/BOPTools_ListOfPave.hxx b/inc/BOPTools_ListOfPave.hxx
index 114c12d..6a7581b 100644
--- a/inc/BOPTools_ListOfPave.hxx
+++ b/inc/BOPTools_ListOfPave.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOPTools_ListNodeOfListOfPave;
 class BOPTools_ListOfPave  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListOfPave();
diff --git a/inc/BOPTools_ListOfPaveBlock.hxx b/inc/BOPTools_ListOfPaveBlock.hxx
index 543e114..76edcb5 100644
--- a/inc/BOPTools_ListOfPaveBlock.hxx
+++ b/inc/BOPTools_ListOfPaveBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOPTools_ListNodeOfListOfPaveBlock;
 class BOPTools_ListOfPaveBlock  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListOfPaveBlock();
diff --git a/inc/BOPTools_ListOfShapeEnum.hxx b/inc/BOPTools_ListOfShapeEnum.hxx
index bcb9d62..a64657f 100644
--- a/inc/BOPTools_ListOfShapeEnum.hxx
+++ b/inc/BOPTools_ListOfShapeEnum.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class BOPTools_ListNodeOfListOfShapeEnum;
 class BOPTools_ListOfShapeEnum  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_ListOfShapeEnum();
diff --git a/inc/BOPTools_PCurveMaker.hxx b/inc/BOPTools_PCurveMaker.hxx
index 8ee26e3..4235592 100644
--- a/inc/BOPTools_PCurveMaker.hxx
+++ b/inc/BOPTools_PCurveMaker.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BOPTools_PaveFiller;
 class BOPTools_PCurveMaker  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Constructor <br>
diff --git a/inc/BOPTools_Pave.hxx b/inc/BOPTools_Pave.hxx
index 7b15c06..0c00de7 100644
--- a/inc/BOPTools_Pave.hxx
+++ b/inc/BOPTools_Pave.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@
 class BOPTools_Pave  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_PaveBlock.hxx b/inc/BOPTools_PaveBlock.hxx
index 1e049e4..4787bbc 100644
--- a/inc/BOPTools_PaveBlock.hxx
+++ b/inc/BOPTools_PaveBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class IntTools_Range;
 class BOPTools_PaveBlock  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_PaveBlockIterator.hxx b/inc/BOPTools_PaveBlockIterator.hxx
index 8dc3408..48228dc 100644
--- a/inc/BOPTools_PaveBlockIterator.hxx
+++ b/inc/BOPTools_PaveBlockIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class BOPTools_PaveBlock;
 class BOPTools_PaveBlockIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_PaveBlockMapHasher.hxx b/inc/BOPTools_PaveBlockMapHasher.hxx
index 8678cc1..9a3bf60 100644
--- a/inc/BOPTools_PaveBlockMapHasher.hxx
+++ b/inc/BOPTools_PaveBlockMapHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class BOPTools_PaveBlock;
 class BOPTools_PaveBlockMapHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const BOPTools_PaveBlock& aPB,const Standard_Integer Upper) ;
diff --git a/inc/BOPTools_PaveFiller.hxx b/inc/BOPTools_PaveFiller.hxx
index 3478367..5acdf25 100644
--- a/inc/BOPTools_PaveFiller.hxx
+++ b/inc/BOPTools_PaveFiller.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -78,18 +81,7 @@ class TColStd_IndexedMapOfInteger;
 class BOPTools_PaveFiller  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty Contructor <br>
diff --git a/inc/BOPTools_PavePool.hxx b/inc/BOPTools_PavePool.hxx
index 77a81e1..ffa9a46 100644
--- a/inc/BOPTools_PavePool.hxx
+++ b/inc/BOPTools_PavePool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BOPTools_PaveSet;
 class BOPTools_PavePool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_PavePool(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTools_PaveSet.hxx b/inc/BOPTools_PaveSet.hxx
index 19e2426..cc3f878 100644
--- a/inc/BOPTools_PaveSet.hxx
+++ b/inc/BOPTools_PaveSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class BOPTools_Pave;
 class BOPTools_PaveSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_PointBetween.hxx b/inc/BOPTools_PointBetween.hxx
index d21e807..f94b1ae 100644
--- a/inc/BOPTools_PointBetween.hxx
+++ b/inc/BOPTools_PointBetween.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Pnt;
 class BOPTools_PointBetween  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_QuickSortPave.hxx b/inc/BOPTools_QuickSortPave.hxx
index e5cb5a0..d05785d 100644
--- a/inc/BOPTools_QuickSortPave.hxx
+++ b/inc/BOPTools_QuickSortPave.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@ class BOPTools_ComparePave;
 class BOPTools_QuickSortPave  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(BOPTools_Array1OfPave& TheArray,const BOPTools_ComparePave& Comp) ;
diff --git a/inc/BOPTools_RoughShapeIntersector.hxx b/inc/BOPTools_RoughShapeIntersector.hxx
index 46ef637..27f20bd 100644
--- a/inc/BOPTools_RoughShapeIntersector.hxx
+++ b/inc/BOPTools_RoughShapeIntersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class BOPTools_HArray2OfIntersectionStatus;
 class BOPTools_RoughShapeIntersector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Initializes algorithm by shapes data structure <br>
diff --git a/inc/BOPTools_SSInterference.hxx b/inc/BOPTools_SSInterference.hxx
index f07f5fb..e9946be 100644
--- a/inc/BOPTools_SSInterference.hxx
+++ b/inc/BOPTools_SSInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -70,18 +73,7 @@ class TColStd_ListOfInteger;
 class BOPTools_SSInterference  : public BOPTools_ShapeShapeInterference {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_SSIntersectionAttribute.hxx b/inc/BOPTools_SSIntersectionAttribute.hxx
index 10038ac..fdb5f8e 100644
--- a/inc/BOPTools_SSIntersectionAttribute.hxx
+++ b/inc/BOPTools_SSIntersectionAttribute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@
 class BOPTools_SSIntersectionAttribute  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Initializes me by flags <br>
diff --git a/inc/BOPTools_SequenceOfCurves.hxx b/inc/BOPTools_SequenceOfCurves.hxx
index 82209b9..7d7807d 100644
--- a/inc/BOPTools_SequenceOfCurves.hxx
+++ b/inc/BOPTools_SequenceOfCurves.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BOPTools_SequenceNodeOfSequenceOfCurves;
 class BOPTools_SequenceOfCurves  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BOPTools_SequenceOfCurves();
diff --git a/inc/BOPTools_SequenceOfPaveBlock.hxx b/inc/BOPTools_SequenceOfPaveBlock.hxx
index bca8ef4..843649e 100644
--- a/inc/BOPTools_SequenceOfPaveBlock.hxx
+++ b/inc/BOPTools_SequenceOfPaveBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BOPTools_SequenceNodeOfSequenceOfPaveBlock;
 class BOPTools_SequenceOfPaveBlock  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BOPTools_SequenceOfPaveBlock();
diff --git a/inc/BOPTools_ShapeShapeInterference.hxx b/inc/BOPTools_ShapeShapeInterference.hxx
index 3fff337..a137151 100644
--- a/inc/BOPTools_ShapeShapeInterference.hxx
+++ b/inc/BOPTools_ShapeShapeInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@
 class BOPTools_ShapeShapeInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_SolidStateFiller.hxx b/inc/BOPTools_SolidStateFiller.hxx
index 0fb1e76..0c92b27 100644
--- a/inc/BOPTools_SolidStateFiller.hxx
+++ b/inc/BOPTools_SolidStateFiller.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BOPTools_PaveFiller;
 class BOPTools_SolidStateFiller  : public BOPTools_StateFiller {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Constructor <br>
diff --git a/inc/BOPTools_SplitShapesPool.hxx b/inc/BOPTools_SplitShapesPool.hxx
index 6ce1e1e..8f9db93 100644
--- a/inc/BOPTools_SplitShapesPool.hxx
+++ b/inc/BOPTools_SplitShapesPool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BOPTools_ListOfPaveBlock;
 class BOPTools_SplitShapesPool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOPTools_SplitShapesPool(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
diff --git a/inc/BOPTools_StateFiller.hxx b/inc/BOPTools_StateFiller.hxx
index 6085749..b02dbe8 100644
--- a/inc/BOPTools_StateFiller.hxx
+++ b/inc/BOPTools_StateFiller.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TopoDS_Shape;
 class BOPTools_StateFiller  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Constructor <br>
diff --git a/inc/BOPTools_Tools.hxx b/inc/BOPTools_Tools.hxx
index 99b0d7d..4014509 100644
--- a/inc/BOPTools_Tools.hxx
+++ b/inc/BOPTools_Tools.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class IntTools_Range;
 class BOPTools_Tools  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Make a vertex using 3D-point <aP1> and 3D-tolerance value <aTol> <br>
diff --git a/inc/BOPTools_Tools2D.hxx b/inc/BOPTools_Tools2D.hxx
index a5c0c58..5a59a9a 100644
--- a/inc/BOPTools_Tools2D.hxx
+++ b/inc/BOPTools_Tools2D.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopoDS_Vertex;
 class BOPTools_Tools2D  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Remove P-Curve of the edge <aE> on the face <aF> <br>
diff --git a/inc/BOPTools_Tools3D.hxx b/inc/BOPTools_Tools3D.hxx
index 66e2204..14069ee 100644
--- a/inc/BOPTools_Tools3D.hxx
+++ b/inc/BOPTools_Tools3D.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class TopoDS_Solid;
 class BOPTools_Tools3D  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Returns amount of sub-shapes of type <aT> <br>
diff --git a/inc/BOPTools_VEInterference.hxx b/inc/BOPTools_VEInterference.hxx
index 2a6edd3..313e355 100644
--- a/inc/BOPTools_VEInterference.hxx
+++ b/inc/BOPTools_VEInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@
 class BOPTools_VEInterference  : public BOPTools_ShapeShapeInterference {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_VSInterference.hxx b/inc/BOPTools_VSInterference.hxx
index ec294ef..fe9375c 100644
--- a/inc/BOPTools_VSInterference.hxx
+++ b/inc/BOPTools_VSInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@
 class BOPTools_VSInterference  : public BOPTools_ShapeShapeInterference {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_VVInterference.hxx b/inc/BOPTools_VVInterference.hxx
index 7c1c441..3d5c8b7 100644
--- a/inc/BOPTools_VVInterference.hxx
+++ b/inc/BOPTools_VVInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@
 class BOPTools_VVInterference  : public BOPTools_ShapeShapeInterference {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOPTools_WireStateFiller.hxx b/inc/BOPTools_WireStateFiller.hxx
index e0f0d61..19e9b6c 100644
--- a/inc/BOPTools_WireStateFiller.hxx
+++ b/inc/BOPTools_WireStateFiller.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class BOPTools_PaveFiller;
 class BOPTools_WireStateFiller  : public BOPTools_StateFiller {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Constructor <br>
diff --git a/inc/BOP_Area2dBuilder.hxx b/inc/BOP_Area2dBuilder.hxx
index 74daeda..4a41de2 100644
--- a/inc/BOP_Area2dBuilder.hxx
+++ b/inc/BOP_Area2dBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class BOP_LoopClassifier;
 class BOP_Area2dBuilder  : public BOP_AreaBuilder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty  Constructor <br>
diff --git a/inc/BOP_Area3dBuilder.hxx b/inc/BOP_Area3dBuilder.hxx
index fb64624..e634a56 100644
--- a/inc/BOP_Area3dBuilder.hxx
+++ b/inc/BOP_Area3dBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class BOP_LoopClassifier;
 class BOP_Area3dBuilder  : public BOP_AreaBuilder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty  Constructor <br>
diff --git a/inc/BOP_AreaBuilder.hxx b/inc/BOP_AreaBuilder.hxx
index 12ce8b8..c657928 100644
--- a/inc/BOP_AreaBuilder.hxx
+++ b/inc/BOP_AreaBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class BOP_ListIteratorOfListOfLoop;
 class BOP_AreaBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty  Constructor <br>
diff --git a/inc/BOP_ArgumentAnalyzer.hxx b/inc/BOP_ArgumentAnalyzer.hxx
index df4bc9e..818ff1a 100644
--- a/inc/BOP_ArgumentAnalyzer.hxx
+++ b/inc/BOP_ArgumentAnalyzer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class BOP_ListOfCheckResult;
 class BOP_ArgumentAnalyzer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! empty constructor <br>
   Standard_EXPORT   BOP_ArgumentAnalyzer();
diff --git a/inc/BOP_BlockBuilder.hxx b/inc/BOP_BlockBuilder.hxx
index 5025c59..d5cafc0 100644
--- a/inc/BOP_BlockBuilder.hxx
+++ b/inc/BOP_BlockBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopoDS_Shape;
 class BOP_BlockBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty  Constructor <br>
diff --git a/inc/BOP_BlockIterator.hxx b/inc/BOP_BlockIterator.hxx
index 526b021..04451c0 100644
--- a/inc/BOP_BlockIterator.hxx
+++ b/inc/BOP_BlockIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Standard_NoMoreObject;
 class BOP_BlockIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty  Constructor <br>
diff --git a/inc/BOP_Builder.hxx b/inc/BOP_Builder.hxx
index affabf4..2212f5f 100644
--- a/inc/BOP_Builder.hxx
+++ b/inc/BOP_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class TopTools_ListOfShape;
 class BOP_Builder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Set shapes (arguments) to perform BO <br>
diff --git a/inc/BOP_BuilderTools.hxx b/inc/BOP_BuilderTools.hxx
index 08b338a..b0fbde3 100644
--- a/inc/BOP_BuilderTools.hxx
+++ b/inc/BOP_BuilderTools.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class BOP_ListOfConnexityBlock;
 class BOP_BuilderTools  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  BooleanOperations_StateOfShape StateToCompare(const Standard_Integer iRank,const BOP_Operation anOp) ;
diff --git a/inc/BOP_CheckResult.hxx b/inc/BOP_CheckResult.hxx
index 3dbeb88..c90f07d 100644
--- a/inc/BOP_CheckResult.hxx
+++ b/inc/BOP_CheckResult.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopTools_ListOfShape;
 class BOP_CheckResult  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! empty constructor <br>
   Standard_EXPORT   BOP_CheckResult();
diff --git a/inc/BOP_CompositeClassifier.hxx b/inc/BOP_CompositeClassifier.hxx
index b3efa12..0cb485c 100644
--- a/inc/BOP_CompositeClassifier.hxx
+++ b/inc/BOP_CompositeClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopoDS_Shape;
 class BOP_CompositeClassifier  : public BOP_LoopClassifier {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Classify loop <L1> with  <L2> <br>
diff --git a/inc/BOP_ConnexityBlock.hxx b/inc/BOP_ConnexityBlock.hxx
index c88a150..2602d39 100644
--- a/inc/BOP_ConnexityBlock.hxx
+++ b/inc/BOP_ConnexityBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopTools_IndexedMapOfOrientedShape;
 class BOP_ConnexityBlock  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_CorrectTolerances.hxx b/inc/BOP_CorrectTolerances.hxx
index b01451c..1a0be5c 100644
--- a/inc/BOP_CorrectTolerances.hxx
+++ b/inc/BOP_CorrectTolerances.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TopoDS_Shape;
 class BOP_CorrectTolerances  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Provides valid values of tolerances for the shape <aS> <br>
diff --git a/inc/BOP_Draw.hxx b/inc/BOP_Draw.hxx
index dcc7987..fd39952 100644
--- a/inc/BOP_Draw.hxx
+++ b/inc/BOP_Draw.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopoDS_Edge;
 class BOP_Draw  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Display in  3D-view shapes from the ListOfShape  <aList> <br>
diff --git a/inc/BOP_EdgeInfo.hxx b/inc/BOP_EdgeInfo.hxx
index a619e82..113660b 100644
--- a/inc/BOP_EdgeInfo.hxx
+++ b/inc/BOP_EdgeInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TopoDS_Edge;
 class BOP_EdgeInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_EmptyBuilder.hxx b/inc/BOP_EmptyBuilder.hxx
index 5ac4f76..4f2482b 100644
--- a/inc/BOP_EmptyBuilder.hxx
+++ b/inc/BOP_EmptyBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class BOPTools_DSFiller;
 class BOP_EmptyBuilder  : public BOP_Builder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_FaceAreaBuilder.hxx b/inc/BOP_FaceAreaBuilder.hxx
index cb286f6..83d078f 100644
--- a/inc/BOP_FaceAreaBuilder.hxx
+++ b/inc/BOP_FaceAreaBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOP_LoopClassifier;
 class BOP_FaceAreaBuilder  : public BOP_Area2dBuilder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_FaceBuilder.hxx b/inc/BOP_FaceBuilder.hxx
index 6bed8bc..0626716 100644
--- a/inc/BOP_FaceBuilder.hxx
+++ b/inc/BOP_FaceBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopTools_ListOfShape;
 class BOP_FaceBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_FaceInfo.hxx b/inc/BOP_FaceInfo.hxx
index 350ed0b..db9c91c 100644
--- a/inc/BOP_FaceInfo.hxx
+++ b/inc/BOP_FaceInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class gp_Dir;
 class BOP_FaceInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_IndexedDataMapOfEdgeListFaceInfo.hxx b/inc/BOP_IndexedDataMapOfEdgeListFaceInfo.hxx
index 2ebee5d..e6affb6 100644
--- a/inc/BOP_IndexedDataMapOfEdgeListFaceInfo.hxx
+++ b/inc/BOP_IndexedDataMapOfEdgeListFaceInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BOP_IndexedDataMapNodeOfIndexedDataMapOfEdgeListFaceInfo;
 class BOP_IndexedDataMapOfEdgeListFaceInfo  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_IndexedDataMapOfEdgeListFaceInfo(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOP_IndexedDataMapOfSolidClassifier.hxx b/inc/BOP_IndexedDataMapOfSolidClassifier.hxx
index 45380b0..d4d656c 100644
--- a/inc/BOP_IndexedDataMapOfSolidClassifier.hxx
+++ b/inc/BOP_IndexedDataMapOfSolidClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class BOP_IndexedDataMapNodeOfIndexedDataMapOfSolidClassifier;
 class BOP_IndexedDataMapOfSolidClassifier  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_IndexedDataMapOfSolidClassifier(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOP_IndexedDataMapOfVertexListEdgeInfo.hxx b/inc/BOP_IndexedDataMapOfVertexListEdgeInfo.hxx
index f3eb109..b1becfc 100644
--- a/inc/BOP_IndexedDataMapOfVertexListEdgeInfo.hxx
+++ b/inc/BOP_IndexedDataMapOfVertexListEdgeInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BOP_IndexedDataMapNodeOfIndexedDataMapOfVertexListEdgeInfo;
 class BOP_IndexedDataMapOfVertexListEdgeInfo  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_IndexedDataMapOfVertexListEdgeInfo(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BOP_ListIteratorOfListOfCheckResult.hxx b/inc/BOP_ListIteratorOfListOfCheckResult.hxx
index ce7664e..d2351a4 100644
--- a/inc/BOP_ListIteratorOfListOfCheckResult.hxx
+++ b/inc/BOP_ListIteratorOfListOfCheckResult.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOP_ListNodeOfListOfCheckResult;
 class BOP_ListIteratorOfListOfCheckResult  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_ListIteratorOfListOfCheckResult();
diff --git a/inc/BOP_ListIteratorOfListOfConnexityBlock.hxx b/inc/BOP_ListIteratorOfListOfConnexityBlock.hxx
index 2ae89a6..b5cb45e 100644
--- a/inc/BOP_ListIteratorOfListOfConnexityBlock.hxx
+++ b/inc/BOP_ListIteratorOfListOfConnexityBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOP_ListNodeOfListOfConnexityBlock;
 class BOP_ListIteratorOfListOfConnexityBlock  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_ListIteratorOfListOfConnexityBlock();
diff --git a/inc/BOP_ListIteratorOfListOfEdgeInfo.hxx b/inc/BOP_ListIteratorOfListOfEdgeInfo.hxx
index 5b11a57..fb8720f 100644
--- a/inc/BOP_ListIteratorOfListOfEdgeInfo.hxx
+++ b/inc/BOP_ListIteratorOfListOfEdgeInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOP_ListNodeOfListOfEdgeInfo;
 class BOP_ListIteratorOfListOfEdgeInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_ListIteratorOfListOfEdgeInfo();
diff --git a/inc/BOP_ListIteratorOfListOfFaceInfo.hxx b/inc/BOP_ListIteratorOfListOfFaceInfo.hxx
index 3b06dfd..127e5cf 100644
--- a/inc/BOP_ListIteratorOfListOfFaceInfo.hxx
+++ b/inc/BOP_ListIteratorOfListOfFaceInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOP_ListNodeOfListOfFaceInfo;
 class BOP_ListIteratorOfListOfFaceInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_ListIteratorOfListOfFaceInfo();
diff --git a/inc/BOP_ListIteratorOfListOfListOfLoop.hxx b/inc/BOP_ListIteratorOfListOfListOfLoop.hxx
index 76c845f..bb80e9d 100644
--- a/inc/BOP_ListIteratorOfListOfListOfLoop.hxx
+++ b/inc/BOP_ListIteratorOfListOfListOfLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BOP_ListNodeOfListOfListOfLoop;
 class BOP_ListIteratorOfListOfListOfLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_ListIteratorOfListOfListOfLoop();
diff --git a/inc/BOP_ListIteratorOfListOfLoop.hxx b/inc/BOP_ListIteratorOfListOfLoop.hxx
index 4b27889..868085b 100644
--- a/inc/BOP_ListIteratorOfListOfLoop.hxx
+++ b/inc/BOP_ListIteratorOfListOfLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class BOP_ListNodeOfListOfLoop;
 class BOP_ListIteratorOfListOfLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_ListIteratorOfListOfLoop();
diff --git a/inc/BOP_ListOfCheckResult.hxx b/inc/BOP_ListOfCheckResult.hxx
index 70610f7..72568be 100644
--- a/inc/BOP_ListOfCheckResult.hxx
+++ b/inc/BOP_ListOfCheckResult.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOP_ListNodeOfListOfCheckResult;
 class BOP_ListOfCheckResult  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_ListOfCheckResult();
diff --git a/inc/BOP_ListOfConnexityBlock.hxx b/inc/BOP_ListOfConnexityBlock.hxx
index 0e4219a..c6005ec 100644
--- a/inc/BOP_ListOfConnexityBlock.hxx
+++ b/inc/BOP_ListOfConnexityBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOP_ListNodeOfListOfConnexityBlock;
 class BOP_ListOfConnexityBlock  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_ListOfConnexityBlock();
diff --git a/inc/BOP_ListOfEdgeInfo.hxx b/inc/BOP_ListOfEdgeInfo.hxx
index 75c9356..b5e2122 100644
--- a/inc/BOP_ListOfEdgeInfo.hxx
+++ b/inc/BOP_ListOfEdgeInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOP_ListNodeOfListOfEdgeInfo;
 class BOP_ListOfEdgeInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_ListOfEdgeInfo();
diff --git a/inc/BOP_ListOfFaceInfo.hxx b/inc/BOP_ListOfFaceInfo.hxx
index ba6b0c4..68ed964 100644
--- a/inc/BOP_ListOfFaceInfo.hxx
+++ b/inc/BOP_ListOfFaceInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOP_ListNodeOfListOfFaceInfo;
 class BOP_ListOfFaceInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_ListOfFaceInfo();
diff --git a/inc/BOP_ListOfListOfLoop.hxx b/inc/BOP_ListOfListOfLoop.hxx
index 6532492..446aba9 100644
--- a/inc/BOP_ListOfListOfLoop.hxx
+++ b/inc/BOP_ListOfListOfLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BOP_ListNodeOfListOfListOfLoop;
 class BOP_ListOfListOfLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_ListOfListOfLoop();
diff --git a/inc/BOP_ListOfLoop.hxx b/inc/BOP_ListOfLoop.hxx
index 8789ad5..112f609 100644
--- a/inc/BOP_ListOfLoop.hxx
+++ b/inc/BOP_ListOfLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class BOP_ListNodeOfListOfLoop;
 class BOP_ListOfLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BOP_ListOfLoop();
diff --git a/inc/BOP_LoopClassifier.hxx b/inc/BOP_LoopClassifier.hxx
index e1790bf..44c4b76 100644
--- a/inc/BOP_LoopClassifier.hxx
+++ b/inc/BOP_LoopClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class BOP_Loop;
 class BOP_LoopClassifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Destructor; <br>
diff --git a/inc/BOP_LoopSet.hxx b/inc/BOP_LoopSet.hxx
index 1574690..13cc3de 100644
--- a/inc/BOP_LoopSet.hxx
+++ b/inc/BOP_LoopSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class BOP_Loop;
 class BOP_LoopSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_Refiner.hxx b/inc/BOP_Refiner.hxx
index 6b9d087..c2e41d8 100644
--- a/inc/BOP_Refiner.hxx
+++ b/inc/BOP_Refiner.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TopTools_ListOfShape;
 class BOP_Refiner  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_SDFWESFiller.hxx b/inc/BOP_SDFWESFiller.hxx
index 16d72e4..23f88da 100644
--- a/inc/BOP_SDFWESFiller.hxx
+++ b/inc/BOP_SDFWESFiller.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopTools_ListOfShape;
 class BOP_SDFWESFiller  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/BOP_SFSCorrector.hxx b/inc/BOP_SFSCorrector.hxx
index 5723367..fd716c5 100644
--- a/inc/BOP_SFSCorrector.hxx
+++ b/inc/BOP_SFSCorrector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class BOP_ShellFaceSet;
 class BOP_SFSCorrector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_Section.hxx b/inc/BOP_Section.hxx
index 2ad56a1..e454dcc 100644
--- a/inc/BOP_Section.hxx
+++ b/inc/BOP_Section.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class BOP_HistoryCollector;
 class BOP_Section  : public BOP_Builder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_SeqOfSeqOfShape.hxx b/inc/BOP_SeqOfSeqOfShape.hxx
index 571c83e..3c976d6 100644
--- a/inc/BOP_SeqOfSeqOfShape.hxx
+++ b/inc/BOP_SeqOfSeqOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BOP_SequenceNodeOfSeqOfSeqOfShape;
 class BOP_SeqOfSeqOfShape  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BOP_SeqOfSeqOfShape();
diff --git a/inc/BOP_ShapeSet.hxx b/inc/BOP_ShapeSet.hxx
index a5e74be..868f54a 100644
--- a/inc/BOP_ShapeSet.hxx
+++ b/inc/BOP_ShapeSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopTools_ListOfShape;
 class BOP_ShapeSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Creates a ShapeSet  in order to build shapes connected <br>
diff --git a/inc/BOP_ShellFaceClassifier.hxx b/inc/BOP_ShellFaceClassifier.hxx
index e11f7ea..2ef6fb9 100644
--- a/inc/BOP_ShellFaceClassifier.hxx
+++ b/inc/BOP_ShellFaceClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopoDS_Shape;
 class BOP_ShellFaceClassifier  : public BOP_CompositeClassifier {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Creates a classifier in 3D space, to compare <br>
diff --git a/inc/BOP_ShellFaceSet.hxx b/inc/BOP_ShellFaceSet.hxx
index 5769184..c01480f 100644
--- a/inc/BOP_ShellFaceSet.hxx
+++ b/inc/BOP_ShellFaceSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class TopoDS_Solid;
 class BOP_ShellFaceSet  : public BOP_ShapeSet {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty  Consreuctor <br>
diff --git a/inc/BOP_ShellShell.hxx b/inc/BOP_ShellShell.hxx
index 566c961..ad0d7e1 100644
--- a/inc/BOP_ShellShell.hxx
+++ b/inc/BOP_ShellShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class BOPTools_DSFiller;
 class BOP_ShellShell  : public BOP_ShellSolid {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_ShellSolid.hxx b/inc/BOP_ShellSolid.hxx
index 6c62cdd..5925a89 100644
--- a/inc/BOP_ShellSolid.hxx
+++ b/inc/BOP_ShellSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class BOP_HistoryCollector;
 class BOP_ShellSolid  : public BOP_Builder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_ShellSplitter.hxx b/inc/BOP_ShellSplitter.hxx
index 45e0f28..147def4 100644
--- a/inc/BOP_ShellSplitter.hxx
+++ b/inc/BOP_ShellSplitter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BOPTColStd_ListOfListOfShape;
 class BOP_ShellSplitter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_SolidAreaBuilder.hxx b/inc/BOP_SolidAreaBuilder.hxx
index e13fc5a..f83d016 100644
--- a/inc/BOP_SolidAreaBuilder.hxx
+++ b/inc/BOP_SolidAreaBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class BOP_LoopClassifier;
 class BOP_SolidAreaBuilder  : public BOP_Area3dBuilder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_SolidBuilder.hxx b/inc/BOP_SolidBuilder.hxx
index ee3f5c2..99e100a 100644
--- a/inc/BOP_SolidBuilder.hxx
+++ b/inc/BOP_SolidBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class BOP_ShapeSet;
 class BOP_SolidBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_SolidClassifier.hxx b/inc/BOP_SolidClassifier.hxx
index c5cc690..612c16f 100644
--- a/inc/BOP_SolidClassifier.hxx
+++ b/inc/BOP_SolidClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TopoDS_Shell;
 class BOP_SolidClassifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty  Constructor <br>
diff --git a/inc/BOP_SolidSolid.hxx b/inc/BOP_SolidSolid.hxx
index 775bc77..6e6cd08 100644
--- a/inc/BOP_SolidSolid.hxx
+++ b/inc/BOP_SolidSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger;
 class BOP_SolidSolid  : public BOP_ShellSolid {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_WESCorrector.hxx b/inc/BOP_WESCorrector.hxx
index 66ec866..a3ba68f 100644
--- a/inc/BOP_WESCorrector.hxx
+++ b/inc/BOP_WESCorrector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class BOP_WireEdgeSet;
 class BOP_WESCorrector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_WireEdgeClassifier.hxx b/inc/BOP_WireEdgeClassifier.hxx
index a855fe6..6d34a4f 100644
--- a/inc/BOP_WireEdgeClassifier.hxx
+++ b/inc/BOP_WireEdgeClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TopoDS_Shape;
 class BOP_WireEdgeClassifier  : public BOP_CompositeClassifier {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Creates a classifier on edge <F>. <br>
diff --git a/inc/BOP_WireEdgeSet.hxx b/inc/BOP_WireEdgeSet.hxx
index 5e5eb7a..7a0f4e7 100644
--- a/inc/BOP_WireEdgeSet.hxx
+++ b/inc/BOP_WireEdgeSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Vec2d;
 class BOP_WireEdgeSet  : public BOP_ShapeSet {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_WireShape.hxx b/inc/BOP_WireShape.hxx
index fb71374..78e3991 100644
--- a/inc/BOP_WireShape.hxx
+++ b/inc/BOP_WireShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class BOP_WireShape  : public BOP_Builder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_WireShell.hxx b/inc/BOP_WireShell.hxx
index eb56da2..201c142 100644
--- a/inc/BOP_WireShell.hxx
+++ b/inc/BOP_WireShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class BOPTools_DSFiller;
 class BOP_WireShell  : public BOP_WireShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_WireSolid.hxx b/inc/BOP_WireSolid.hxx
index 5f0edb0..f185997 100644
--- a/inc/BOP_WireSolid.hxx
+++ b/inc/BOP_WireSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BOP_HistoryCollector;
 class BOP_WireSolid  : public BOP_WireShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_WireSplitter.hxx b/inc/BOP_WireSplitter.hxx
index f636f15..f443c8a 100644
--- a/inc/BOP_WireSplitter.hxx
+++ b/inc/BOP_WireSplitter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BOPTColStd_ListOfListOfShape;
 class BOP_WireSplitter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BOP_WireWire.hxx b/inc/BOP_WireWire.hxx
index 9bd8a0b..7b85853 100644
--- a/inc/BOP_WireWire.hxx
+++ b/inc/BOP_WireWire.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class BOPTools_DSFiller;
 class BOP_WireWire  : public BOP_WireShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor; <br>
diff --git a/inc/BRepAdaptor_Array1OfCurve.hxx b/inc/BRepAdaptor_Array1OfCurve.hxx
index 51c2691..902c7be 100644
--- a/inc/BRepAdaptor_Array1OfCurve.hxx
+++ b/inc/BRepAdaptor_Array1OfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepAdaptor_Curve;
 class BRepAdaptor_Array1OfCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAdaptor_Array1OfCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/BRepAdaptor_CompCurve.hxx b/inc/BRepAdaptor_CompCurve.hxx
index 296e02a..afda637 100644
--- a/inc/BRepAdaptor_CompCurve.hxx
+++ b/inc/BRepAdaptor_CompCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -77,18 +80,7 @@ class Geom_BSplineCurve;
 class BRepAdaptor_CompCurve  : public Adaptor3d_Curve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an undefined Curve with no Wire loaded. <br>
   Standard_EXPORT   BRepAdaptor_CompCurve();
diff --git a/inc/BRepAdaptor_Curve.hxx b/inc/BRepAdaptor_Curve.hxx
index 34b4d58..dda08c7 100644
--- a/inc/BRepAdaptor_Curve.hxx
+++ b/inc/BRepAdaptor_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -90,18 +93,7 @@ class Geom_BSplineCurve;
 class BRepAdaptor_Curve  : public Adaptor3d_Curve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an undefined Curve with no Edge loaded. <br>
   Standard_EXPORT   BRepAdaptor_Curve();
diff --git a/inc/BRepAdaptor_Curve2d.hxx b/inc/BRepAdaptor_Curve2d.hxx
index 922e952..7baac0b 100644
--- a/inc/BRepAdaptor_Curve2d.hxx
+++ b/inc/BRepAdaptor_Curve2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopoDS_Face;
 class BRepAdaptor_Curve2d  : public Geom2dAdaptor_Curve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an uninitialized curve2d. <br>
   Standard_EXPORT   BRepAdaptor_Curve2d();
diff --git a/inc/BRepAdaptor_Surface.hxx b/inc/BRepAdaptor_Surface.hxx
index 41ab012..667b4aa 100644
--- a/inc/BRepAdaptor_Surface.hxx
+++ b/inc/BRepAdaptor_Surface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -89,18 +92,7 @@ class Adaptor3d_HCurve;
 class BRepAdaptor_Surface  : public Adaptor3d_Surface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an undefined surface with no face loaded. <br>
   Standard_EXPORT   BRepAdaptor_Surface();
diff --git a/inc/BRepAlgo.hxx b/inc/BRepAlgo.hxx
index de2912d..29f2714 100644
--- a/inc/BRepAlgo.hxx
+++ b/inc/BRepAlgo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -60,18 +63,7 @@ class BRepAlgo_SequenceNodeOfSequenceOfSequenceOfInteger;
 class BRepAlgo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  TopoDS_Wire ConcatenateWire(const TopoDS_Wire& Wire,const GeomAbs_Shape Option,const Standard_Real AngularTolerance = 1.0e-4) ;
diff --git a/inc/BRepAlgoAPI_BooleanOperation.hxx b/inc/BRepAlgoAPI_BooleanOperation.hxx
index 21598d4..2e0d0b1 100644
--- a/inc/BRepAlgoAPI_BooleanOperation.hxx
+++ b/inc/BRepAlgoAPI_BooleanOperation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class TopTools_ListOfShape;
 class BRepAlgoAPI_BooleanOperation  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Sets the type of Boolean operation to perform <br>
 //!          It can be BOP_SECTION <br>
diff --git a/inc/BRepAlgoAPI_Common.hxx b/inc/BRepAlgoAPI_Common.hxx
index 79d5447..b27c597 100644
--- a/inc/BRepAlgoAPI_Common.hxx
+++ b/inc/BRepAlgoAPI_Common.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class BOPTools_DSFiller;
 class BRepAlgoAPI_Common  : public BRepAlgoAPI_BooleanOperation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a common part for shapes aS1 and aS2 . <br>
   Standard_EXPORT   BRepAlgoAPI_Common(const TopoDS_Shape& S1,const TopoDS_Shape& S2);
diff --git a/inc/BRepAlgoAPI_Cut.hxx b/inc/BRepAlgoAPI_Cut.hxx
index f36627b..6551de7 100644
--- a/inc/BRepAlgoAPI_Cut.hxx
+++ b/inc/BRepAlgoAPI_Cut.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class BOPTools_DSFiller;
 class BRepAlgoAPI_Cut  : public BRepAlgoAPI_BooleanOperation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Shape aS2 cuts shape aS1. The <br>
 //! resulting shape is a new shape produced by the cut operation. <br>
diff --git a/inc/BRepAlgoAPI_Fuse.hxx b/inc/BRepAlgoAPI_Fuse.hxx
index b15447b..aaeb79b 100644
--- a/inc/BRepAlgoAPI_Fuse.hxx
+++ b/inc/BRepAlgoAPI_Fuse.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class BOPTools_DSFiller;
 class BRepAlgoAPI_Fuse  : public BRepAlgoAPI_BooleanOperation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a fuse of shapes aS1 and aS2. <br>
   Standard_EXPORT   BRepAlgoAPI_Fuse(const TopoDS_Shape& S1,const TopoDS_Shape& S2);
diff --git a/inc/BRepAlgoAPI_Section.hxx b/inc/BRepAlgoAPI_Section.hxx
index 6f3ebeb..7ebfa7f 100644
--- a/inc/BRepAlgoAPI_Section.hxx
+++ b/inc/BRepAlgoAPI_Section.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class Geom2d_Curve;
 class BRepAlgoAPI_Section  : public BRepAlgoAPI_BooleanOperation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgoAPI_Section(const TopoDS_Shape& S1,const TopoDS_Shape& S2,const BOPTools_DSFiller& aDSF,const Standard_Boolean PerformNow = Standard_True);
diff --git a/inc/BRepAlgo_BooleanOperation.hxx b/inc/BRepAlgo_BooleanOperation.hxx
index 9bee479..567c6af 100644
--- a/inc/BRepAlgo_BooleanOperation.hxx
+++ b/inc/BRepAlgo_BooleanOperation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class TopTools_ListOfShape;
 class BRepAlgo_BooleanOperation  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/BRepAlgo_BooleanOperations.hxx b/inc/BRepAlgo_BooleanOperations.hxx
index a34299f..9696c45 100644
--- a/inc/BRepAlgo_BooleanOperations.hxx
+++ b/inc/BRepAlgo_BooleanOperations.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class BRepAlgo_DSAccess;
 class BRepAlgo_BooleanOperations  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgo_BooleanOperations();
diff --git a/inc/BRepAlgo_Common.hxx b/inc/BRepAlgo_Common.hxx
index 09bb451..aad4c2e 100644
--- a/inc/BRepAlgo_Common.hxx
+++ b/inc/BRepAlgo_Common.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class TopoDS_Shape;
 class BRepAlgo_Common  : public BRepAlgo_BooleanOperation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs the common part of shapes S1 and S2. <br>
   Standard_EXPORT   BRepAlgo_Common(const TopoDS_Shape& S1,const TopoDS_Shape& S2);
diff --git a/inc/BRepAlgo_Cut.hxx b/inc/BRepAlgo_Cut.hxx
index 00e8044..5fe5ce6 100644
--- a/inc/BRepAlgo_Cut.hxx
+++ b/inc/BRepAlgo_Cut.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class TopoDS_Shape;
 class BRepAlgo_Cut  : public BRepAlgo_BooleanOperation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Cuts the shape S2 from the shape S1. <br>
   Standard_EXPORT   BRepAlgo_Cut(const TopoDS_Shape& S1,const TopoDS_Shape& S2);
diff --git a/inc/BRepAlgo_DSAccess.hxx b/inc/BRepAlgo_DSAccess.hxx
index 2daf445..a698501 100644
--- a/inc/BRepAlgo_DSAccess.hxx
+++ b/inc/BRepAlgo_DSAccess.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -72,18 +75,7 @@ class TColStd_ListOfInteger;
 class BRepAlgo_DSAccess  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgo_DSAccess();
diff --git a/inc/BRepAlgo_DataMapIteratorOfDataMapOfShapeBoolean.hxx b/inc/BRepAlgo_DataMapIteratorOfDataMapOfShapeBoolean.hxx
index d055977..954f4de 100644
--- a/inc/BRepAlgo_DataMapIteratorOfDataMapOfShapeBoolean.hxx
+++ b/inc/BRepAlgo_DataMapIteratorOfDataMapOfShapeBoolean.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepAlgo_DataMapNodeOfDataMapOfShapeBoolean;
 class BRepAlgo_DataMapIteratorOfDataMapOfShapeBoolean  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgo_DataMapIteratorOfDataMapOfShapeBoolean();
diff --git a/inc/BRepAlgo_DataMapIteratorOfDataMapOfShapeInterference.hxx b/inc/BRepAlgo_DataMapIteratorOfDataMapOfShapeInterference.hxx
index 09a6bd8..586f4ae 100644
--- a/inc/BRepAlgo_DataMapIteratorOfDataMapOfShapeInterference.hxx
+++ b/inc/BRepAlgo_DataMapIteratorOfDataMapOfShapeInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class BRepAlgo_DataMapNodeOfDataMapOfShapeInterference;
 class BRepAlgo_DataMapIteratorOfDataMapOfShapeInterference  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgo_DataMapIteratorOfDataMapOfShapeInterference();
diff --git a/inc/BRepAlgo_DataMapOfShapeBoolean.hxx b/inc/BRepAlgo_DataMapOfShapeBoolean.hxx
index efeb2fd..0009b32 100644
--- a/inc/BRepAlgo_DataMapOfShapeBoolean.hxx
+++ b/inc/BRepAlgo_DataMapOfShapeBoolean.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BRepAlgo_DataMapIteratorOfDataMapOfShapeBoolean;
 class BRepAlgo_DataMapOfShapeBoolean  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgo_DataMapOfShapeBoolean(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepAlgo_DataMapOfShapeInterference.hxx b/inc/BRepAlgo_DataMapOfShapeInterference.hxx
index bbdcdfa..952833f 100644
--- a/inc/BRepAlgo_DataMapOfShapeInterference.hxx
+++ b/inc/BRepAlgo_DataMapOfShapeInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class BRepAlgo_DataMapIteratorOfDataMapOfShapeInterference;
 class BRepAlgo_DataMapOfShapeInterference  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgo_DataMapOfShapeInterference(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepAlgo_FaceRestrictor.hxx b/inc/BRepAlgo_FaceRestrictor.hxx
index 472ee66..1a619ea 100644
--- a/inc/BRepAlgo_FaceRestrictor.hxx
+++ b/inc/BRepAlgo_FaceRestrictor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopoDS_Wire;
 class BRepAlgo_FaceRestrictor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgo_FaceRestrictor();
diff --git a/inc/BRepAlgo_Fuse.hxx b/inc/BRepAlgo_Fuse.hxx
index 72f397d..02224fc 100644
--- a/inc/BRepAlgo_Fuse.hxx
+++ b/inc/BRepAlgo_Fuse.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class TopoDS_Shape;
 class BRepAlgo_Fuse  : public BRepAlgo_BooleanOperation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Fuse S1 and S2. <br>
   Standard_EXPORT   BRepAlgo_Fuse(const TopoDS_Shape& S1,const TopoDS_Shape& S2);
diff --git a/inc/BRepAlgo_Image.hxx b/inc/BRepAlgo_Image.hxx
index 449c7de..019fd7f 100644
--- a/inc/BRepAlgo_Image.hxx
+++ b/inc/BRepAlgo_Image.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopTools_ListOfShape;
 class BRepAlgo_Image  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgo_Image();
diff --git a/inc/BRepAlgo_Loop.hxx b/inc/BRepAlgo_Loop.hxx
index 246e8ac..9b17c32 100644
--- a/inc/BRepAlgo_Loop.hxx
+++ b/inc/BRepAlgo_Loop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopTools_DataMapOfShapeShape;
 class BRepAlgo_Loop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgo_Loop();
diff --git a/inc/BRepAlgo_NormalProjection.hxx b/inc/BRepAlgo_NormalProjection.hxx
index 8f2d0ca..eabf1ba 100644
--- a/inc/BRepAlgo_NormalProjection.hxx
+++ b/inc/BRepAlgo_NormalProjection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class Adaptor3d_Curve;
 class BRepAlgo_NormalProjection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgo_NormalProjection();
diff --git a/inc/BRepAlgo_Section.hxx b/inc/BRepAlgo_Section.hxx
index 8a77b8b..f97fc9d 100644
--- a/inc/BRepAlgo_Section.hxx
+++ b/inc/BRepAlgo_Section.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -60,18 +63,7 @@ class Geom2d_Curve;
 class BRepAlgo_Section  : public BRepAlgo_BooleanOperation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgo_Section(const TopoDS_Shape& Sh1,const TopoDS_Shape& Sh2,const Standard_Boolean PerformNow = Standard_True);
diff --git a/inc/BRepAlgo_SequenceOfSequenceOfInteger.hxx b/inc/BRepAlgo_SequenceOfSequenceOfInteger.hxx
index 196491c..ea59cba 100644
--- a/inc/BRepAlgo_SequenceOfSequenceOfInteger.hxx
+++ b/inc/BRepAlgo_SequenceOfSequenceOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BRepAlgo_SequenceNodeOfSequenceOfSequenceOfInteger;
 class BRepAlgo_SequenceOfSequenceOfInteger  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BRepAlgo_SequenceOfSequenceOfInteger();
diff --git a/inc/BRepAlgo_Tool.hxx b/inc/BRepAlgo_Tool.hxx
index c28839d..1e8a27b 100644
--- a/inc/BRepAlgo_Tool.hxx
+++ b/inc/BRepAlgo_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -21,18 +24,7 @@ class TopTools_MapOfShape;
 class BRepAlgo_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Remove the non valid   part of an offsetshape <br>
 //!          1 - Remove all the free boundary  and the faces <br>
diff --git a/inc/BRepAlgo_TopOpe.hxx b/inc/BRepAlgo_TopOpe.hxx
index 19b5646..8fdb404 100644
--- a/inc/BRepAlgo_TopOpe.hxx
+++ b/inc/BRepAlgo_TopOpe.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class TopTools_ListOfShape;
 class BRepAlgo_TopOpe  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepAlgo_TopOpe();
diff --git a/inc/BRepApprox_Approx.hxx b/inc/BRepApprox_Approx.hxx
index 234263f..6e5456a 100644
--- a/inc/BRepApprox_Approx.hxx
+++ b/inc/BRepApprox_Approx.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -62,18 +65,7 @@ class AppParCurves_MultiBSpCurve;
 class BRepApprox_Approx  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_Approx();
diff --git a/inc/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx b/inc/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx
index 2366027..b63cfe0 100644
--- a/inc/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx
+++ b/inc/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class math_Vector;
 class BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox  : public math_BFGS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox(math_MultipleVarFunctionWithGradient& F,const math_Vector& StartingPoint,const Standard_Real Tolerance3d,const Standard_Real Tolerance2d,const Standard_Real Eps,const Standard_Integer NbIterations = 200);
diff --git a/inc/BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx b/inc/BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx
index ee68f59..ad4b0b2 100644
--- a/inc/BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx
+++ b/inc/BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class math_IntegerVector;
 class BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox  : public math_MultipleVarFunctionWithGradient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,const math_Vector& Parameters,const TColStd_Array1OfReal& Knots,const TColStd_Array1OfInteger& Mults,const Standard_Integer NbPol);
diff --git a/inc/BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx b/inc/BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx
index e802b45..f589ad0 100644
--- a/inc/BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx
+++ b/inc/BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class math_IntegerVector;
 class BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const math_Vector& Parameters,const Standard_Integer NbPol);
diff --git a/inc/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx b/inc/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx
index d4a8bf3..cff5598 100644
--- a/inc/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx
+++ b/inc/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class math_Vector;
 class BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox  : public math_BFGS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox(math_MultipleVarFunctionWithGradient& F,const math_Vector& StartingPoint,const Standard_Real Tolerance3d,const Standard_Real Tolerance2d,const Standard_Real Eps,const Standard_Integer NbIterations = 200);
diff --git a/inc/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx b/inc/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx
index f7d0a7c..00ca090 100644
--- a/inc/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx
+++ b/inc/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class math_Vector;
 class BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox  : public math_BFGS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox(math_MultipleVarFunctionWithGradient& F,const math_Vector& StartingPoint,const Standard_Real Tolerance3d,const Standard_Real Tolerance2d,const Standard_Real Eps,const Standard_Integer NbIterations = 200);
diff --git a/inc/BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx b/inc/BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx
index bb3ca95..49ef2eb 100644
--- a/inc/BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx
+++ b/inc/BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class AppParCurves_MultiBSpCurve;
 class BRepApprox_MyBSplGradientOfTheComputeLineOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_MyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,math_Vector& Parameters,const TColStd_Array1OfReal& Knots,const TColStd_Array1OfInteger& Mults,const Standard_Integer Deg,const Standard_Real Tol3d,const Standard_Real Tol2d,const Standard_Integer NbIterations = 1);
diff --git a/inc/BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx b/inc/BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx
index 27b1afb..21220d2 100644
--- a/inc/BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx
+++ b/inc/BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class AppParCurves_MultiCurve;
 class BRepApprox_MyGradientOfTheComputeLineBezierOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_MyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,math_Vector& Parameters,const Standard_Integer Deg,const Standard_Real Tol3d,const Standard_Real Tol2d,const Standard_Integer NbIterations = 200);
diff --git a/inc/BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx b/inc/BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx
index 8f43ac4..647c03a 100644
--- a/inc/BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx
+++ b/inc/BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class AppParCurves_MultiCurve;
 class BRepApprox_MyGradientbisOfTheComputeLineOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_MyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,math_Vector& Parameters,const Standard_Integer Deg,const Standard_Real Tol3d,const Standard_Real Tol2d,const Standard_Integer NbIterations = 200);
diff --git a/inc/BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx b/inc/BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx
index 1940b78..4ccb3b5 100644
--- a/inc/BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx
+++ b/inc/BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class AppParCurves_MultiCurve;
 class BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox  : public math_MultipleVarFunctionWithGradient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,const math_Vector& Parameters,const Standard_Integer Deg);
diff --git a/inc/BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx b/inc/BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx
index 6a78f0e..b15e34f 100644
--- a/inc/BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx
+++ b/inc/BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class AppParCurves_MultiCurve;
 class BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox  : public math_MultipleVarFunctionWithGradient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,const math_Vector& Parameters,const Standard_Integer Deg);
diff --git a/inc/BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx b/inc/BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx
index 1c7320f..d87c061 100644
--- a/inc/BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx
+++ b/inc/BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class math_IntegerVector;
 class BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const math_Vector& Parameters,const Standard_Integer NbPol);
diff --git a/inc/BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx b/inc/BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx
index be28f96..8ff7a8d 100644
--- a/inc/BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx
+++ b/inc/BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class math_IntegerVector;
 class BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const math_Vector& Parameters,const Standard_Integer NbPol);
diff --git a/inc/BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx b/inc/BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx
index b77819b..76dfa3c 100644
--- a/inc/BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx
+++ b/inc/BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class math_Vector;
 class BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP,AppParCurves_MultiCurve& SCurv,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints,const math_Matrix& Bern,const math_Matrix& DerivativeBern,const Standard_Real Tolerance = 1.0e-10);
diff --git a/inc/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx b/inc/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx
index aa47c6d..dbf494a 100644
--- a/inc/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx
+++ b/inc/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class math_Vector;
 class BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP,AppParCurves_MultiCurve& SCurv,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints,const math_Matrix& Bern,const math_Matrix& DerivativeBern,const Standard_Real Tolerance = 1.0e-10);
diff --git a/inc/BRepApprox_SurfaceTool.hxx b/inc/BRepApprox_SurfaceTool.hxx
index 1ec7e53..43384cb 100644
--- a/inc/BRepApprox_SurfaceTool.hxx
+++ b/inc/BRepApprox_SurfaceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -83,18 +86,7 @@ class Adaptor3d_HCurve;
 class BRepApprox_SurfaceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstUParameter(const BRepAdaptor_Surface& S) ;
diff --git a/inc/BRepApprox_TheComputeLineBezierOfApprox.hxx b/inc/BRepApprox_TheComputeLineBezierOfApprox.hxx
index 55425ae..862b882 100644
--- a/inc/BRepApprox_TheComputeLineBezierOfApprox.hxx
+++ b/inc/BRepApprox_TheComputeLineBezierOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class TColStd_Array1OfReal;
 class BRepApprox_TheComputeLineBezierOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_TheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& Line,const Standard_Integer degreemin = 4,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-3,const Standard_Real Tolerance2d = 1.0e-6,const Standard_Integer NbIterations = 5,const Standard_Boolean cutting = Standard_True,const Approx_ParametrizationType parametrization = Approx_ChordLength,const Standard_Boolean Squares = Standard_False);
diff --git a/inc/BRepApprox_TheComputeLineOfApprox.hxx b/inc/BRepApprox_TheComputeLineOfApprox.hxx
index fdf067e..3f35757 100644
--- a/inc/BRepApprox_TheComputeLineOfApprox.hxx
+++ b/inc/BRepApprox_TheComputeLineOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class AppParCurves_MultiCurve;
 class BRepApprox_TheComputeLineOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_TheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& Line,const Standard_Integer degreemin = 4,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-3,const Standard_Real Tolerance2d = 1.0e-6,const Standard_Integer NbIterations = 5,const Standard_Boolean cutting = Standard_True,const Approx_ParametrizationType parametrization = Approx_ChordLength,const Standard_Boolean Squares = Standard_False);
diff --git a/inc/BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx b/inc/BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx
index f6e09d9..bb8a972 100644
--- a/inc/BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx
+++ b/inc/BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class TColStd_Array1OfReal;
 class BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox();
diff --git a/inc/BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx b/inc/BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx
index 13118d5..e467b47 100644
--- a/inc/BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx
+++ b/inc/BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class gp_Vec2d;
 class BRepApprox_TheImpPrmSvSurfacesOfApprox  : public ApproxInt_SvSurfaces {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_TheImpPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& Surf1,const IntSurf_Quadric& Surf2);
diff --git a/inc/BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx b/inc/BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx
index 1b43167..4b703b7 100644
--- a/inc/BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx
+++ b/inc/BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class gp_Dir2d;
 class BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox();
diff --git a/inc/BRepApprox_TheMultiLineOfApprox.hxx b/inc/BRepApprox_TheMultiLineOfApprox.hxx
index 4911231..d0330a2 100644
--- a/inc/BRepApprox_TheMultiLineOfApprox.hxx
+++ b/inc/BRepApprox_TheMultiLineOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TColgp_Array1OfVec2d;
 class BRepApprox_TheMultiLineOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_TheMultiLineOfApprox(const Handle(BRepApprox_ApproxLine)& line,const Standard_Address PtrSvSurfaces,const Standard_Integer NbP3d,const Standard_Integer NbP2d,const Standard_Real xo,const Standard_Real ax,const Standard_Real yo,const Standard_Real ay,const Standard_Real zo,const Standard_Real az,const Standard_Real u1o,const Standard_Real a1u,const Standard_Real v1o,const Standard_Real a1v,const Standard_Real u2o,const Standard_Real a2u,const Standard_Real v2o,const Standard_Real a2v,const Standard_Boolean P2DOnFirst,const Standard_Integer IndMin = 0,const Standard_Integer IndMax = 0);
diff --git a/inc/BRepApprox_TheMultiLineToolOfApprox.hxx b/inc/BRepApprox_TheMultiLineToolOfApprox.hxx
index a1af221..bf4a5dd 100644
--- a/inc/BRepApprox_TheMultiLineToolOfApprox.hxx
+++ b/inc/BRepApprox_TheMultiLineToolOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TColgp_Array1OfVec2d;
 class BRepApprox_TheMultiLineToolOfApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Integer FirstPoint(const BRepApprox_TheMultiLineOfApprox& ML) ;
diff --git a/inc/BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx b/inc/BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx
index 0baaa9a..84d605d 100644
--- a/inc/BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx
+++ b/inc/BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class gp_Vec2d;
 class BRepApprox_ThePrmPrmSvSurfacesOfApprox  : public ApproxInt_SvSurfaces {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_ThePrmPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& Surf1,const BRepAdaptor_Surface& Surf2);
diff --git a/inc/BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx b/inc/BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx
index ce5c388..45a7c55 100644
--- a/inc/BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx
+++ b/inc/BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class gp_Dir2d;
 class BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox();
diff --git a/inc/BRepBlend_AppSurf.hxx b/inc/BRepBlend_AppSurf.hxx
index ff5a707..5c1a2b7 100644
--- a/inc/BRepBlend_AppSurf.hxx
+++ b/inc/BRepBlend_AppSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class TColgp_Array1OfPnt2d;
 class BRepBlend_AppSurf  : public AppBlend_Approx {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_AppSurf();
diff --git a/inc/BRepBlend_AppSurface.hxx b/inc/BRepBlend_AppSurface.hxx
index 42c789c..2fc2378 100644
--- a/inc/BRepBlend_AppSurface.hxx
+++ b/inc/BRepBlend_AppSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class TColgp_Array1OfPnt2d;
 class BRepBlend_AppSurface  : public AppBlend_Approx {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Approximation     of   the   new  Surface  (and <br>
 //!          eventually the  2d    Curves   on the   support <br>
diff --git a/inc/BRepBlend_BlendTool.hxx b/inc/BRepBlend_BlendTool.hxx
index fb34c3c..a559368 100644
--- a/inc/BRepBlend_BlendTool.hxx
+++ b/inc/BRepBlend_BlendTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Adaptor3d_HVertex;
 class BRepBlend_BlendTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Projects the point P on the arc C. <br>
 //!          If the methods returns Standard_True, the projection is <br>
diff --git a/inc/BRepBlend_BlendTool.lxx b/inc/BRepBlend_BlendTool.lxx
index 9fc73c2..856a286 100644
--- a/inc/BRepBlend_BlendTool.lxx
+++ b/inc/BRepBlend_BlendTool.lxx
@@ -18,6 +18,7 @@
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
+#include <Adaptor3d_HVertex.hxx>
 
 #include <Adaptor3d_HVertex.hxx>
 
diff --git a/inc/BRepBlend_CSWalking.hxx b/inc/BRepBlend_CSWalking.hxx
index b6e1f03..e3dcdb5 100644
--- a/inc/BRepBlend_CSWalking.hxx
+++ b/inc/BRepBlend_CSWalking.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -77,18 +80,7 @@ class gp_Vec2d;
 class BRepBlend_CSWalking  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_CSWalking(const Handle(Adaptor3d_HCurve)& Curv,const Handle(Adaptor3d_HSurface)& Surf,const Handle(Adaptor3d_TopolTool)& Domain);
diff --git a/inc/BRepBlend_CurvPointRadInv.hxx b/inc/BRepBlend_CurvPointRadInv.hxx
index 196b1da..a8611e9 100644
--- a/inc/BRepBlend_CurvPointRadInv.hxx
+++ b/inc/BRepBlend_CurvPointRadInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class gp_Pnt;
 class BRepBlend_CurvPointRadInv  : public Blend_CurvPointFuncInv {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_CurvPointRadInv(const Handle(Adaptor3d_HCurve)& C1,const Handle(Adaptor3d_HCurve)& C2);
diff --git a/inc/BRepBlend_Extremity.hxx b/inc/BRepBlend_Extremity.hxx
index 27d566c..104cb77 100644
--- a/inc/BRepBlend_Extremity.hxx
+++ b/inc/BRepBlend_Extremity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class IntSurf_Transition;
 class BRepBlend_Extremity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_Extremity();
diff --git a/inc/BRepBlend_HCurve2dTool.hxx b/inc/BRepBlend_HCurve2dTool.hxx
index ac84b95..9206071 100644
--- a/inc/BRepBlend_HCurve2dTool.hxx
+++ b/inc/BRepBlend_HCurve2dTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class Geom2d_BSplineCurve;
 class BRepBlend_HCurve2dTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstParameter(const Handle(Adaptor2d_HCurve2d)& C) ;
diff --git a/inc/BRepBlend_HCurveTool.hxx b/inc/BRepBlend_HCurveTool.hxx
index 3cfea6c..4083014 100644
--- a/inc/BRepBlend_HCurveTool.hxx
+++ b/inc/BRepBlend_HCurveTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class Geom_BSplineCurve;
 class BRepBlend_HCurveTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstParameter(const Handle(Adaptor3d_HCurve)& C) ;
diff --git a/inc/BRepBlend_PointOnRst.hxx b/inc/BRepBlend_PointOnRst.hxx
index 626240f..1ab15b7 100644
--- a/inc/BRepBlend_PointOnRst.hxx
+++ b/inc/BRepBlend_PointOnRst.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class IntSurf_Transition;
 class BRepBlend_PointOnRst  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_PointOnRst();
diff --git a/inc/BRepBlend_RstRstConstRad.hxx b/inc/BRepBlend_RstRstConstRad.hxx
index d9ff7b8..7070693 100644
--- a/inc/BRepBlend_RstRstConstRad.hxx
+++ b/inc/BRepBlend_RstRstConstRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -84,18 +87,7 @@ class TColgp_Array1OfVec2d;
 class BRepBlend_RstRstConstRad  : public Blend_RstRstFunction {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_RstRstConstRad(const Handle(Adaptor3d_HSurface)& Surf1,const Handle(Adaptor2d_HCurve2d)& Rst1,const Handle(Adaptor3d_HSurface)& Surf2,const Handle(Adaptor2d_HCurve2d)& Rst2,const Handle(Adaptor3d_HCurve)& CGuide);
diff --git a/inc/BRepBlend_RstRstEvolRad.hxx b/inc/BRepBlend_RstRstEvolRad.hxx
index 80b1e9b..fdc3528 100644
--- a/inc/BRepBlend_RstRstEvolRad.hxx
+++ b/inc/BRepBlend_RstRstEvolRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -88,18 +91,7 @@ class TColgp_Array1OfVec2d;
 class BRepBlend_RstRstEvolRad  : public Blend_RstRstFunction {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_RstRstEvolRad(const Handle(Adaptor3d_HSurface)& Surf1,const Handle(Adaptor2d_HCurve2d)& Rst1,const Handle(Adaptor3d_HSurface)& Surf2,const Handle(Adaptor2d_HCurve2d)& Rst2,const Handle(Adaptor3d_HCurve)& CGuide,const Handle(Law_Function)& Evol);
diff --git a/inc/BRepBlend_RstRstLineBuilder.hxx b/inc/BRepBlend_RstRstLineBuilder.hxx
index 0c8c973..3a780d5 100644
--- a/inc/BRepBlend_RstRstLineBuilder.hxx
+++ b/inc/BRepBlend_RstRstLineBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -86,18 +89,7 @@ class Blend_Point;
 class BRepBlend_RstRstLineBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_RstRstLineBuilder(const Handle(Adaptor3d_HSurface)& Surf1,const Handle(Adaptor2d_HCurve2d)& Rst1,const Handle(Adaptor3d_TopolTool)& Domain1,const Handle(Adaptor3d_HSurface)& Surf2,const Handle(Adaptor2d_HCurve2d)& Rst2,const Handle(Adaptor3d_TopolTool)& Domain2);
diff --git a/inc/BRepBlend_SequenceOfLine.hxx b/inc/BRepBlend_SequenceOfLine.hxx
index 570edf1..6b65def 100644
--- a/inc/BRepBlend_SequenceOfLine.hxx
+++ b/inc/BRepBlend_SequenceOfLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BRepBlend_SequenceNodeOfSequenceOfLine;
 class BRepBlend_SequenceOfLine  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BRepBlend_SequenceOfLine();
diff --git a/inc/BRepBlend_SequenceOfPointOnRst.hxx b/inc/BRepBlend_SequenceOfPointOnRst.hxx
index 28e63f5..c9c0fa7 100644
--- a/inc/BRepBlend_SequenceOfPointOnRst.hxx
+++ b/inc/BRepBlend_SequenceOfPointOnRst.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BRepBlend_SequenceNodeOfSequenceOfPointOnRst;
 class BRepBlend_SequenceOfPointOnRst  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BRepBlend_SequenceOfPointOnRst();
diff --git a/inc/BRepBlend_SurfCurvConstRadInv.hxx b/inc/BRepBlend_SurfCurvConstRadInv.hxx
index c2b1ba9..e53ecbf 100644
--- a/inc/BRepBlend_SurfCurvConstRadInv.hxx
+++ b/inc/BRepBlend_SurfCurvConstRadInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class math_Matrix;
 class BRepBlend_SurfCurvConstRadInv  : public Blend_SurfCurvFuncInv {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_SurfCurvConstRadInv(const Handle(Adaptor3d_HSurface)& S,const Handle(Adaptor3d_HCurve)& C,const Handle(Adaptor3d_HCurve)& Cg);
diff --git a/inc/BRepBlend_SurfCurvEvolRadInv.hxx b/inc/BRepBlend_SurfCurvEvolRadInv.hxx
index 6fbfc8d..f0e8bbd 100644
--- a/inc/BRepBlend_SurfCurvEvolRadInv.hxx
+++ b/inc/BRepBlend_SurfCurvEvolRadInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class math_Matrix;
 class BRepBlend_SurfCurvEvolRadInv  : public Blend_SurfCurvFuncInv {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_SurfCurvEvolRadInv(const Handle(Adaptor3d_HSurface)& S,const Handle(Adaptor3d_HCurve)& C,const Handle(Adaptor3d_HCurve)& Cg,const Handle(Law_Function)& Evol);
diff --git a/inc/BRepBlend_SurfPointConstRadInv.hxx b/inc/BRepBlend_SurfPointConstRadInv.hxx
index b39a245..08849d3 100644
--- a/inc/BRepBlend_SurfPointConstRadInv.hxx
+++ b/inc/BRepBlend_SurfPointConstRadInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class gp_Pnt;
 class BRepBlend_SurfPointConstRadInv  : public Blend_SurfPointFuncInv {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_SurfPointConstRadInv(const Handle(Adaptor3d_HSurface)& S,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/BRepBlend_SurfPointEvolRadInv.hxx b/inc/BRepBlend_SurfPointEvolRadInv.hxx
index 79c1544..a5d5871 100644
--- a/inc/BRepBlend_SurfPointEvolRadInv.hxx
+++ b/inc/BRepBlend_SurfPointEvolRadInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class gp_Pnt;
 class BRepBlend_SurfPointEvolRadInv  : public Blend_SurfPointFuncInv {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_SurfPointEvolRadInv(const Handle(Adaptor3d_HSurface)& S,const Handle(Adaptor3d_HCurve)& C,const Handle(Law_Function)& Evol);
diff --git a/inc/BRepBlend_SurfRstConstRad.hxx b/inc/BRepBlend_SurfRstConstRad.hxx
index f501bf3..9a3c621 100644
--- a/inc/BRepBlend_SurfRstConstRad.hxx
+++ b/inc/BRepBlend_SurfRstConstRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -81,18 +84,7 @@ class TColgp_Array1OfVec2d;
 class BRepBlend_SurfRstConstRad  : public Blend_SurfRstFunction {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_SurfRstConstRad(const Handle(Adaptor3d_HSurface)& Surf,const Handle(Adaptor3d_HSurface)& SurfRst,const Handle(Adaptor2d_HCurve2d)& Rst,const Handle(Adaptor3d_HCurve)& CGuide);
diff --git a/inc/BRepBlend_SurfRstEvolRad.hxx b/inc/BRepBlend_SurfRstEvolRad.hxx
index 0eddaed..f1dc057 100644
--- a/inc/BRepBlend_SurfRstEvolRad.hxx
+++ b/inc/BRepBlend_SurfRstEvolRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -85,18 +88,7 @@ class TColgp_Array1OfVec2d;
 class BRepBlend_SurfRstEvolRad  : public Blend_SurfRstFunction {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_SurfRstEvolRad(const Handle(Adaptor3d_HSurface)& Surf,const Handle(Adaptor3d_HSurface)& SurfRst,const Handle(Adaptor2d_HCurve2d)& Rst,const Handle(Adaptor3d_HCurve)& CGuide,const Handle(Law_Function)& Evol);
diff --git a/inc/BRepBlend_SurfRstLineBuilder.hxx b/inc/BRepBlend_SurfRstLineBuilder.hxx
index 51477f1..ec1d67a 100644
--- a/inc/BRepBlend_SurfRstLineBuilder.hxx
+++ b/inc/BRepBlend_SurfRstLineBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -86,18 +89,7 @@ class Blend_Point;
 class BRepBlend_SurfRstLineBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_SurfRstLineBuilder(const Handle(Adaptor3d_HSurface)& Surf1,const Handle(Adaptor3d_TopolTool)& Domain1,const Handle(Adaptor3d_HSurface)& Surf2,const Handle(Adaptor2d_HCurve2d)& Rst,const Handle(Adaptor3d_TopolTool)& Domain2);
diff --git a/inc/BRepBlend_Walking.hxx b/inc/BRepBlend_Walking.hxx
index df70ce5..2b1b972 100644
--- a/inc/BRepBlend_Walking.hxx
+++ b/inc/BRepBlend_Walking.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -81,18 +84,7 @@ class IntSurf_Transition;
 class BRepBlend_Walking  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBlend_Walking(const Handle(Adaptor3d_HSurface)& Surf1,const Handle(Adaptor3d_HSurface)& Surf2,const Handle(Adaptor3d_TopolTool)& Domain1,const Handle(Adaptor3d_TopolTool)& Domain2);
diff --git a/inc/BRepBndLib.hxx b/inc/BRepBndLib.hxx
index 8f897a1..f28b2a2 100644
--- a/inc/BRepBndLib.hxx
+++ b/inc/BRepBndLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Bnd_Box;
 class BRepBndLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!Adds the shape S to the bounding box B. <br>
 //! More precisely are successively added to B: <br>
diff --git a/inc/BRepBuilderAPI.hxx b/inc/BRepBuilderAPI.hxx
index 9b7234a..77f3c7f 100644
--- a/inc/BRepBuilderAPI.hxx
+++ b/inc/BRepBuilderAPI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class BRepBuilderAPI_Collect;
 class BRepBuilderAPI  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Sets    the current plane. <br>
   Standard_EXPORT   static  void Plane(const Handle(Geom_Plane)& P) ;
diff --git a/inc/BRepBuilderAPI_Collect.hxx b/inc/BRepBuilderAPI_Collect.hxx
index fe5a348..9dd8a72 100644
--- a/inc/BRepBuilderAPI_Collect.hxx
+++ b/inc/BRepBuilderAPI_Collect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopTools_DataMapOfShapeListOfShape;
 class BRepBuilderAPI_Collect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBuilderAPI_Collect();
diff --git a/inc/BRepBuilderAPI_Command.hxx b/inc/BRepBuilderAPI_Command.hxx
index 8d80d10..039ac2c 100644
--- a/inc/BRepBuilderAPI_Command.hxx
+++ b/inc/BRepBuilderAPI_Command.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class StdFail_NotDone;
 class BRepBuilderAPI_Command  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/BRepBuilderAPI_Copy.hxx b/inc/BRepBuilderAPI_Copy.hxx
index 5abe097..07837cc 100644
--- a/inc/BRepBuilderAPI_Copy.hxx
+++ b/inc/BRepBuilderAPI_Copy.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopoDS_Shape;
 class BRepBuilderAPI_Copy  : public BRepBuilderAPI_ModifyShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty copy framework. Use the function <br>
 //! Perform to copy shapes. <br>
diff --git a/inc/BRepBuilderAPI_FindPlane.hxx b/inc/BRepBuilderAPI_FindPlane.hxx
index b5fa300..346aff9 100644
--- a/inc/BRepBuilderAPI_FindPlane.hxx
+++ b/inc/BRepBuilderAPI_FindPlane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopoDS_Shape;
 class BRepBuilderAPI_FindPlane  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes an empty algorithm. The function Init is then used to define the shape. <br>
   Standard_EXPORT   BRepBuilderAPI_FindPlane();
diff --git a/inc/BRepBuilderAPI_GTransform.hxx b/inc/BRepBuilderAPI_GTransform.hxx
index 6749a45..223bf86 100644
--- a/inc/BRepBuilderAPI_GTransform.hxx
+++ b/inc/BRepBuilderAPI_GTransform.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class TopTools_ListOfShape;
 class BRepBuilderAPI_GTransform  : public BRepBuilderAPI_ModifyShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a framework for applying the geometric <br>
 //! transformation T to a shape. Use the function <br>
diff --git a/inc/BRepBuilderAPI_MakeEdge.hxx b/inc/BRepBuilderAPI_MakeEdge.hxx
index 668d919..91c752c 100644
--- a/inc/BRepBuilderAPI_MakeEdge.hxx
+++ b/inc/BRepBuilderAPI_MakeEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -85,18 +88,7 @@ class TopoDS_Edge;
 class BRepBuilderAPI_MakeEdge  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBuilderAPI_MakeEdge();
diff --git a/inc/BRepBuilderAPI_MakeEdge2d.hxx b/inc/BRepBuilderAPI_MakeEdge2d.hxx
index d1a14ac..eb88717 100644
--- a/inc/BRepBuilderAPI_MakeEdge2d.hxx
+++ b/inc/BRepBuilderAPI_MakeEdge2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -77,18 +80,7 @@ class TopoDS_Edge;
 class BRepBuilderAPI_MakeEdge2d  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepBuilderAPI_MakeEdge2d(const TopoDS_Vertex& V1,const TopoDS_Vertex& V2);
diff --git a/inc/BRepBuilderAPI_MakeFace.hxx b/inc/BRepBuilderAPI_MakeFace.hxx
index f2e0819..8ed7d8e 100644
--- a/inc/BRepBuilderAPI_MakeFace.hxx
+++ b/inc/BRepBuilderAPI_MakeFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -70,18 +73,7 @@ class TopoDS_Wire;
 class BRepBuilderAPI_MakeFace  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Not done. <br>
   Standard_EXPORT   BRepBuilderAPI_MakeFace();
diff --git a/inc/BRepBuilderAPI_MakePolygon.hxx b/inc/BRepBuilderAPI_MakePolygon.hxx
index b3e2b54..e57c7d1 100644
--- a/inc/BRepBuilderAPI_MakePolygon.hxx
+++ b/inc/BRepBuilderAPI_MakePolygon.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TopoDS_Wire;
 class BRepBuilderAPI_MakePolygon  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes an empty polygonal wire, to which points or <br>
 //! vertices are added using the Add function. <br>
diff --git a/inc/BRepBuilderAPI_MakeShape.hxx b/inc/BRepBuilderAPI_MakeShape.hxx
index c3ce6af..1926e6f 100644
--- a/inc/BRepBuilderAPI_MakeShape.hxx
+++ b/inc/BRepBuilderAPI_MakeShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopTools_ListOfShape;
 class BRepBuilderAPI_MakeShape  : public BRepBuilderAPI_Command {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/BRepBuilderAPI_MakeShell.hxx b/inc/BRepBuilderAPI_MakeShell.hxx
index e752c6c..d1cbedc 100644
--- a/inc/BRepBuilderAPI_MakeShell.hxx
+++ b/inc/BRepBuilderAPI_MakeShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -62,18 +65,7 @@ class TopoDS_Shell;
 class BRepBuilderAPI_MakeShell  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty shell framework. The Init <br>
 //! function is used to define the construction arguments. <br>
diff --git a/inc/BRepBuilderAPI_MakeSolid.hxx b/inc/BRepBuilderAPI_MakeSolid.hxx
index 8bdd6dd..d7b8d15 100644
--- a/inc/BRepBuilderAPI_MakeSolid.hxx
+++ b/inc/BRepBuilderAPI_MakeSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class TopoDS_Shape;
 class BRepBuilderAPI_MakeSolid  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes the construction of a solid. An empty solid is <br>
 //! considered to cover the whole space. The Add function <br>
diff --git a/inc/BRepBuilderAPI_MakeVertex.hxx b/inc/BRepBuilderAPI_MakeVertex.hxx
index 32807b0..c0d59c3 100644
--- a/inc/BRepBuilderAPI_MakeVertex.hxx
+++ b/inc/BRepBuilderAPI_MakeVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopoDS_Vertex;
 class BRepBuilderAPI_MakeVertex  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a vertex from point P. <br>
 //! Example create a vertex from a 3D point. <br>
diff --git a/inc/BRepBuilderAPI_MakeWire.hxx b/inc/BRepBuilderAPI_MakeWire.hxx
index ae7a4f2..8d5d2ba 100644
--- a/inc/BRepBuilderAPI_MakeWire.hxx
+++ b/inc/BRepBuilderAPI_MakeWire.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class TopoDS_Vertex;
 class BRepBuilderAPI_MakeWire  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty wire framework, to which edges <br>
 //! are added using the Add function. <br>
diff --git a/inc/BRepBuilderAPI_ModifyShape.hxx b/inc/BRepBuilderAPI_ModifyShape.hxx
index a3c8b54..f4edf5c 100644
--- a/inc/BRepBuilderAPI_ModifyShape.hxx
+++ b/inc/BRepBuilderAPI_ModifyShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopTools_ListOfShape;
 class BRepBuilderAPI_ModifyShape  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the list  of shapes modified from the shape <br>
 //!          <S>. <br>
diff --git a/inc/BRepBuilderAPI_NurbsConvert.hxx b/inc/BRepBuilderAPI_NurbsConvert.hxx
index bb80023..64014d7 100644
--- a/inc/BRepBuilderAPI_NurbsConvert.hxx
+++ b/inc/BRepBuilderAPI_NurbsConvert.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopoDS_Shape;
 class BRepBuilderAPI_NurbsConvert  : public BRepBuilderAPI_ModifyShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a framework for converting the geometry of a <br>
 //! shape into NURBS geometry. Use the function Perform <br>
diff --git a/inc/BRepBuilderAPI_Transform.hxx b/inc/BRepBuilderAPI_Transform.hxx
index 41a1406..17718fe 100644
--- a/inc/BRepBuilderAPI_Transform.hxx
+++ b/inc/BRepBuilderAPI_Transform.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopTools_ListOfShape;
 class BRepBuilderAPI_Transform  : public BRepBuilderAPI_ModifyShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Constructs a framework for applying the geometric <br>
 //! transformation T to a shape. Use the function Perform <br>
diff --git a/inc/BRepCheck.hxx b/inc/BRepCheck.hxx
index 442c287..70f95e6 100644
--- a/inc/BRepCheck.hxx
+++ b/inc/BRepCheck.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class BRepCheck_DataMapIteratorOfDataMapOfShapeResult;
 class BRepCheck  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(BRepCheck_ListOfStatus& List,const BRepCheck_Status Stat) ;
diff --git a/inc/BRepCheck_Analyzer.hxx b/inc/BRepCheck_Analyzer.hxx
index 949dc54..64040be 100644
--- a/inc/BRepCheck_Analyzer.hxx
+++ b/inc/BRepCheck_Analyzer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class BRepCheck_Result;
 class BRepCheck_Analyzer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a shape validation object defined by the shape S. <br>
 //!    <S> is the  shape  to control.  <GeomControls>  If <br>
diff --git a/inc/BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus.hxx b/inc/BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus.hxx
index 8e28d96..d6b414e 100644
--- a/inc/BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus.hxx
+++ b/inc/BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BRepCheck_DataMapNodeOfDataMapOfShapeListOfStatus;
 class BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus();
diff --git a/inc/BRepCheck_DataMapIteratorOfDataMapOfShapeResult.hxx b/inc/BRepCheck_DataMapIteratorOfDataMapOfShapeResult.hxx
index 5974ef4..c6f963f 100644
--- a/inc/BRepCheck_DataMapIteratorOfDataMapOfShapeResult.hxx
+++ b/inc/BRepCheck_DataMapIteratorOfDataMapOfShapeResult.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class BRepCheck_DataMapNodeOfDataMapOfShapeResult;
 class BRepCheck_DataMapIteratorOfDataMapOfShapeResult  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepCheck_DataMapIteratorOfDataMapOfShapeResult();
diff --git a/inc/BRepCheck_DataMapOfShapeListOfStatus.hxx b/inc/BRepCheck_DataMapOfShapeListOfStatus.hxx
index 4a7658e..95939ef 100644
--- a/inc/BRepCheck_DataMapOfShapeListOfStatus.hxx
+++ b/inc/BRepCheck_DataMapOfShapeListOfStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus;
 class BRepCheck_DataMapOfShapeListOfStatus  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepCheck_DataMapOfShapeListOfStatus(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepCheck_DataMapOfShapeResult.hxx b/inc/BRepCheck_DataMapOfShapeResult.hxx
index 71810d7..e06af0d 100644
--- a/inc/BRepCheck_DataMapOfShapeResult.hxx
+++ b/inc/BRepCheck_DataMapOfShapeResult.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class BRepCheck_DataMapIteratorOfDataMapOfShapeResult;
 class BRepCheck_DataMapOfShapeResult  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepCheck_DataMapOfShapeResult(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepCheck_ListIteratorOfListOfStatus.hxx b/inc/BRepCheck_ListIteratorOfListOfStatus.hxx
index 4b53d36..8201ffb 100644
--- a/inc/BRepCheck_ListIteratorOfListOfStatus.hxx
+++ b/inc/BRepCheck_ListIteratorOfListOfStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BRepCheck_ListNodeOfListOfStatus;
 class BRepCheck_ListIteratorOfListOfStatus  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepCheck_ListIteratorOfListOfStatus();
diff --git a/inc/BRepCheck_ListOfStatus.hxx b/inc/BRepCheck_ListOfStatus.hxx
index e50b0f2..5d49116 100644
--- a/inc/BRepCheck_ListOfStatus.hxx
+++ b/inc/BRepCheck_ListOfStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class BRepCheck_ListNodeOfListOfStatus;
 class BRepCheck_ListOfStatus  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepCheck_ListOfStatus();
diff --git a/inc/BRepClass3d.hxx b/inc/BRepClass3d.hxx
new file mode 100644
index 0000000..e2e8e88
--- /dev/null
+++ b/inc/BRepClass3d.hxx
@@ -0,0 +1,74 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#ifndef _BRepClass3d_HeaderFile
+#define _BRepClass3d_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+class TopoDS_Shell;
+class TopoDS_Solid;
+class BRepClass3d_Intersector3d;
+class BRepClass3d_MapOfInter;
+class BRepClass3d_SolidExplorer;
+class BRepClass3d_SolidPassiveClassifier;
+class BRepClass3d_SClassifier;
+class BRepClass3d_SolidClassifier;
+class BRepClass3d_DataMapNodeOfMapOfInter;
+class BRepClass3d_DataMapIteratorOfMapOfInter;
+
+
+
+class BRepClass3d  {
+public:
+
+  DEFINE_STANDARD_ALLOC
+
+  //! Returns the outer most shell of <S>. Returns a Null <br>
+//!          shell if <S> has no outer shell. <br>
+  Standard_EXPORT   static  TopoDS_Shell OuterShell(const TopoDS_Solid& S) ;
+
+
+
+
+
+protected:
+
+
+
+
+
+private:
+
+
+
+
+friend class BRepClass3d_Intersector3d;
+friend class BRepClass3d_MapOfInter;
+friend class BRepClass3d_SolidExplorer;
+friend class BRepClass3d_SolidPassiveClassifier;
+friend class BRepClass3d_SClassifier;
+friend class BRepClass3d_SolidClassifier;
+friend class BRepClass3d_DataMapNodeOfMapOfInter;
+friend class BRepClass3d_DataMapIteratorOfMapOfInter;
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+
+
+#endif
diff --git a/inc/BRepClass3d_DataMapIteratorOfMapOfInter.hxx b/inc/BRepClass3d_DataMapIteratorOfMapOfInter.hxx
index 061e7f8..7a964a4 100644
--- a/inc/BRepClass3d_DataMapIteratorOfMapOfInter.hxx
+++ b/inc/BRepClass3d_DataMapIteratorOfMapOfInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepClass3d_DataMapNodeOfMapOfInter;
 class BRepClass3d_DataMapIteratorOfMapOfInter  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepClass3d_DataMapIteratorOfMapOfInter();
diff --git a/inc/BRepClass3d_Intersector3d.hxx b/inc/BRepClass3d_Intersector3d.hxx
index 9e1948e..fd9de61 100644
--- a/inc/BRepClass3d_Intersector3d.hxx
+++ b/inc/BRepClass3d_Intersector3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class gp_Pnt;
 class BRepClass3d_Intersector3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   BRepClass3d_Intersector3d();
diff --git a/inc/BRepClass3d_MapOfInter.hxx b/inc/BRepClass3d_MapOfInter.hxx
index 9a7ebf5..e5cb533 100644
--- a/inc/BRepClass3d_MapOfInter.hxx
+++ b/inc/BRepClass3d_MapOfInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BRepClass3d_DataMapIteratorOfMapOfInter;
 class BRepClass3d_MapOfInter  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepClass3d_MapOfInter(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepClass3d_SClassifier.hxx b/inc/BRepClass3d_SClassifier.hxx
index 3e99024..f10796f 100644
--- a/inc/BRepClass3d_SClassifier.hxx
+++ b/inc/BRepClass3d_SClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopoDS_Face;
 class BRepClass3d_SClassifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   BRepClass3d_SClassifier();
diff --git a/inc/BRepClass3d_SolidClassifier.hxx b/inc/BRepClass3d_SolidClassifier.hxx
index 8e6fb9a..5916848 100644
--- a/inc/BRepClass3d_SolidClassifier.hxx
+++ b/inc/BRepClass3d_SolidClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class gp_Pnt;
 class BRepClass3d_SolidClassifier  : public BRepClass3d_SClassifier {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! empty constructor <br>
   Standard_EXPORT   BRepClass3d_SolidClassifier();
diff --git a/inc/BRepClass3d_SolidExplorer.hxx b/inc/BRepClass3d_SolidExplorer.hxx
index 09e94d6..6ce9fbb 100644
--- a/inc/BRepClass3d_SolidExplorer.hxx
+++ b/inc/BRepClass3d_SolidExplorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class IntCurvesFace_Intersector;
 class BRepClass3d_SolidExplorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepClass3d_SolidExplorer();
diff --git a/inc/BRepClass3d_SolidPassiveClassifier.hxx b/inc/BRepClass3d_SolidPassiveClassifier.hxx
index 8903832..83b2144 100644
--- a/inc/BRepClass3d_SolidPassiveClassifier.hxx
+++ b/inc/BRepClass3d_SolidPassiveClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TopoDS_Face;
 class BRepClass3d_SolidPassiveClassifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepClass3d_SolidPassiveClassifier();
diff --git a/inc/BRepClass_Edge.hxx b/inc/BRepClass_Edge.hxx
index ade32a5..78890b8 100644
--- a/inc/BRepClass_Edge.hxx
+++ b/inc/BRepClass_Edge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Face;
 class BRepClass_Edge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepClass_Edge();
diff --git a/inc/BRepClass_FClass2dOfFClassifier.hxx b/inc/BRepClass_FClass2dOfFClassifier.hxx
index 25250a3..68e9089 100644
--- a/inc/BRepClass_FClass2dOfFClassifier.hxx
+++ b/inc/BRepClass_FClass2dOfFClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Lin2d;
 class BRepClass_FClass2dOfFClassifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepClass_FClass2dOfFClassifier();
diff --git a/inc/BRepClass_FClassifier.hxx b/inc/BRepClass_FClassifier.hxx
index a9c4a14..5deb326 100644
--- a/inc/BRepClass_FClassifier.hxx
+++ b/inc/BRepClass_FClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Pnt2d;
 class BRepClass_FClassifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepClass_FClassifier();
diff --git a/inc/BRepClass_FaceClassifier.hxx b/inc/BRepClass_FaceClassifier.hxx
index 6a7a062..d370f42 100644
--- a/inc/BRepClass_FaceClassifier.hxx
+++ b/inc/BRepClass_FaceClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class gp_Pnt;
 class BRepClass_FaceClassifier  : public BRepClass_FClassifier {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor, undefined algorithm. <br>
   Standard_EXPORT   BRepClass_FaceClassifier();
diff --git a/inc/BRepClass_FaceExplorer.hxx b/inc/BRepClass_FaceExplorer.hxx
index 0ff19f6..164c366 100644
--- a/inc/BRepClass_FaceExplorer.hxx
+++ b/inc/BRepClass_FaceExplorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class BRepClass_Edge;
 class BRepClass_FaceExplorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepClass_FaceExplorer(const TopoDS_Face& F);
diff --git a/inc/BRepClass_FacePassiveClassifier.hxx b/inc/BRepClass_FacePassiveClassifier.hxx
index b7f7b42..1807fec 100644
--- a/inc/BRepClass_FacePassiveClassifier.hxx
+++ b/inc/BRepClass_FacePassiveClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Lin2d;
 class BRepClass_FacePassiveClassifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepClass_FacePassiveClassifier();
diff --git a/inc/BRepClass_Intersector.hxx b/inc/BRepClass_Intersector.hxx
index dcf5f8f..cf5e1ab 100644
--- a/inc/BRepClass_Intersector.hxx
+++ b/inc/BRepClass_Intersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_Dir2d;
 class BRepClass_Intersector  : public Geom2dInt_IntConicCurveOfGInter {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepClass_Intersector();
diff --git a/inc/BRepFeat.hxx b/inc/BRepFeat.hxx
index fc12b3f..d9ca497 100644
--- a/inc/BRepFeat.hxx
+++ b/inc/BRepFeat.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -100,18 +103,7 @@ class BRepFeat_MakeRevolutionForm;
 class BRepFeat  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void SampleEdges(const TopoDS_Shape& S,TColgp_SequenceOfPnt& Pt) ;
diff --git a/inc/BRepFeat_Builder.hxx b/inc/BRepFeat_Builder.hxx
index 439a41b..9e8852e 100644
--- a/inc/BRepFeat_Builder.hxx
+++ b/inc/BRepFeat_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopTools_ListOfShape;
 class BRepFeat_Builder  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes a local operation on <S>. <br>
         void Init(const TopoDS_Shape& S) ;
diff --git a/inc/BRepFeat_Form.hxx b/inc/BRepFeat_Form.hxx
index f1191cd..94d96cf 100644
--- a/inc/BRepFeat_Form.hxx
+++ b/inc/BRepFeat_Form.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -92,18 +95,7 @@ class TopOpeBRepBuild_HBuilder;
 class BRepFeat_Form  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns the list of generated Faces. <br>
   Standard_EXPORT   virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& F) ;
diff --git a/inc/BRepFeat_Gluer.hxx b/inc/BRepFeat_Gluer.hxx
index 0a65b4d..cbe4dae 100644
--- a/inc/BRepFeat_Gluer.hxx
+++ b/inc/BRepFeat_Gluer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopTools_ListOfShape;
 class BRepFeat_Gluer  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes an empty constructor <br>
       BRepFeat_Gluer();
diff --git a/inc/BRepFeat_LocalOperation.hxx b/inc/BRepFeat_LocalOperation.hxx
index 698c282..54be911 100644
--- a/inc/BRepFeat_LocalOperation.hxx
+++ b/inc/BRepFeat_LocalOperation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopTools_ListOfShape;
 class BRepFeat_LocalOperation  : public BRepFeat_Builder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Builds the framework to store the topological shape <br>
 //! which is to be created by the local operation. <br>
diff --git a/inc/BRepFeat_MakeCylindricalHole.hxx b/inc/BRepFeat_MakeCylindricalHole.hxx
index f096354..8fb26f7 100644
--- a/inc/BRepFeat_MakeCylindricalHole.hxx
+++ b/inc/BRepFeat_MakeCylindricalHole.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Ax1;
 class BRepFeat_MakeCylindricalHole  : public BRepFeat_Builder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
       BRepFeat_MakeCylindricalHole();
diff --git a/inc/BRepFeat_MakeDPrism.hxx b/inc/BRepFeat_MakeDPrism.hxx
index 4399662..f821f4c 100644
--- a/inc/BRepFeat_MakeDPrism.hxx
+++ b/inc/BRepFeat_MakeDPrism.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -71,18 +74,7 @@ class TopTools_ListOfShape;
 class BRepFeat_MakeDPrism  : public BRepFeat_Form {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! A face Pbase is selected in the shape <br>
 //!   Sbase to serve as the basis for the draft prism. The <br>
diff --git a/inc/BRepFeat_MakeLinearForm.hxx b/inc/BRepFeat_MakeLinearForm.hxx
index 6b06db0..f5119c8 100644
--- a/inc/BRepFeat_MakeLinearForm.hxx
+++ b/inc/BRepFeat_MakeLinearForm.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class gp_Pnt;
 class BRepFeat_MakeLinearForm  : public BRepFeat_RibSlot {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! initializes the linear form class <br>
       BRepFeat_MakeLinearForm();
diff --git a/inc/BRepFeat_MakePipe.hxx b/inc/BRepFeat_MakePipe.hxx
index b13960e..24c8371 100644
--- a/inc/BRepFeat_MakePipe.hxx
+++ b/inc/BRepFeat_MakePipe.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -72,18 +75,7 @@ class TColGeom_SequenceOfCurve;
 class BRepFeat_MakePipe  : public BRepFeat_Form {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! initializes the pipe class. <br>
       BRepFeat_MakePipe();
diff --git a/inc/BRepFeat_MakePrism.hxx b/inc/BRepFeat_MakePrism.hxx
index a353688..9b70a2a 100644
--- a/inc/BRepFeat_MakePrism.hxx
+++ b/inc/BRepFeat_MakePrism.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class TColGeom_SequenceOfCurve;
 class BRepFeat_MakePrism  : public BRepFeat_Form {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Builds a prism by projecting a <br>
 //! wire along the face of a shape. Initializes the prism class. <br>
diff --git a/inc/BRepFeat_MakeRevol.hxx b/inc/BRepFeat_MakeRevol.hxx
index 993c61c..969158c 100644
--- a/inc/BRepFeat_MakeRevol.hxx
+++ b/inc/BRepFeat_MakeRevol.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class TColGeom_SequenceOfCurve;
 class BRepFeat_MakeRevol  : public BRepFeat_Form {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! initializes the revolved shell class. <br>
       BRepFeat_MakeRevol();
diff --git a/inc/BRepFeat_MakeRevolutionForm.hxx b/inc/BRepFeat_MakeRevolutionForm.hxx
index ac8c901..3a6690b 100644
--- a/inc/BRepFeat_MakeRevolutionForm.hxx
+++ b/inc/BRepFeat_MakeRevolutionForm.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class gp_Pnt;
 class BRepFeat_MakeRevolutionForm  : public BRepFeat_RibSlot {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! initializes the linear form class. <br>
       BRepFeat_MakeRevolutionForm();
diff --git a/inc/BRepFeat_RibSlot.hxx b/inc/BRepFeat_RibSlot.hxx
index 3634ae1..4877955 100644
--- a/inc/BRepFeat_RibSlot.hxx
+++ b/inc/BRepFeat_RibSlot.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -93,18 +96,7 @@ class BOP_HistoryCollector;
 class BRepFeat_RibSlot  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns true if F a TopoDS_Shape of type edge or face has been deleted. <br>
   Standard_EXPORT   virtual  Standard_Boolean IsDeleted(const TopoDS_Shape& F) ;
diff --git a/inc/BRepFeat_SplitShape.hxx b/inc/BRepFeat_SplitShape.hxx
index 6311c38..b8c25d4 100644
--- a/inc/BRepFeat_SplitShape.hxx
+++ b/inc/BRepFeat_SplitShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class TopTools_ListOfShape;
 class BRepFeat_SplitShape  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
       BRepFeat_SplitShape();
@@ -72,6 +64,9 @@ public:
       BRepFeat_SplitShape(const TopoDS_Shape& S);
   //! Initializes the process on the shape <S>. <br>
         void Init(const TopoDS_Shape& S) ;
+  //! Set the flag of check internal intersections <br>
+//!          default value is True (to check) <br>
+        void SetCheckInterior(const Standard_Boolean ToCheckInterior) ;
   //! Adds the wire <W> on the face <F>. <br>
 //! Raises NoSuchObject  if <F> does not belong to the original shape. <br>
         void Add(const TopoDS_Wire& W,const TopoDS_Face& F) ;
diff --git a/inc/BRepFeat_SplitShape.lxx b/inc/BRepFeat_SplitShape.lxx
index 2019d52..8759dd8 100644
--- a/inc/BRepFeat_SplitShape.lxx
+++ b/inc/BRepFeat_SplitShape.lxx
@@ -60,6 +60,15 @@ inline void BRepFeat_SplitShape::Init(const TopoDS_Shape& S)
   }
 }
 
+//=======================================================================
+//function : SetCheckInterior
+//purpose  : 
+//=======================================================================
+
+inline void BRepFeat_SplitShape::SetCheckInterior(const Standard_Boolean ToCheckInterior)
+{
+  myWOnShape->SetCheckInterior(ToCheckInterior);
+}
 
 //=======================================================================
 //function : Add
diff --git a/inc/BRepFill.hxx b/inc/BRepFill.hxx
index 46a64f0..b9d5fa5 100644
--- a/inc/BRepFill.hxx
+++ b/inc/BRepFill.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -94,18 +97,7 @@ class BRepFill_SequenceNodeOfSequenceOfEdgeFaceAndOrder;
 class BRepFill  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  TopoDS_Face Face(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2) ;
diff --git a/inc/BRepFill_ApproxSeewing.hxx b/inc/BRepFill_ApproxSeewing.hxx
index e014dbf..fe21f5e 100644
--- a/inc/BRepFill_ApproxSeewing.hxx
+++ b/inc/BRepFill_ApproxSeewing.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class BRepFill_MultiLine;
 class BRepFill_ApproxSeewing  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_ApproxSeewing();
diff --git a/inc/BRepFill_CompatibleWires.hxx b/inc/BRepFill_CompatibleWires.hxx
index 58655e3..65f6e57 100644
--- a/inc/BRepFill_CompatibleWires.hxx
+++ b/inc/BRepFill_CompatibleWires.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TopTools_DataMapOfShapeListOfShape;
 class BRepFill_CompatibleWires  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_CompatibleWires();
diff --git a/inc/BRepFill_ComputeCLine.hxx b/inc/BRepFill_ComputeCLine.hxx
index 0a8b503..0dfe6f8 100644
--- a/inc/BRepFill_ComputeCLine.hxx
+++ b/inc/BRepFill_ComputeCLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class AppParCurves_MultiCurve;
 class BRepFill_ComputeCLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_ComputeCLine(const BRepFill_MultiLine& Line,const Standard_Integer degreemin = 3,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-5,const Standard_Real Tolerance2d = 1.0e-5,const Standard_Boolean cutting = Standard_False,const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint,const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint);
diff --git a/inc/BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape.hxx b/inc/BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape.hxx
index 4245a72..f890249 100644
--- a/inc/BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape.hxx
+++ b/inc/BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class BRepFill_DataMapNodeOfDataMapOfNodeDataMapOfShapeShape;
 class BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape();
diff --git a/inc/BRepFill_DataMapIteratorOfDataMapOfNodeShape.hxx b/inc/BRepFill_DataMapIteratorOfDataMapOfNodeShape.hxx
index 5f70319..cba9ebd 100644
--- a/inc/BRepFill_DataMapIteratorOfDataMapOfNodeShape.hxx
+++ b/inc/BRepFill_DataMapIteratorOfDataMapOfNodeShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class BRepFill_DataMapNodeOfDataMapOfNodeShape;
 class BRepFill_DataMapIteratorOfDataMapOfNodeShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_DataMapIteratorOfDataMapOfNodeShape();
diff --git a/inc/BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape.hxx b/inc/BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape.hxx
index f3c3238..736f158 100644
--- a/inc/BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape.hxx
+++ b/inc/BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BRepFill_DataMapNodeOfDataMapOfOrientedShapeListOfShape;
 class BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape();
diff --git a/inc/BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape.hxx b/inc/BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape.hxx
index b15aa52..2e5bc63 100644
--- a/inc/BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape.hxx
+++ b/inc/BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BRepFill_DataMapNodeOfDataMapOfShapeDataMapOfShapeListOfShape;
 class BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape();
diff --git a/inc/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt.hxx b/inc/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt.hxx
index 9b81a81..0e95940 100644
--- a/inc/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt.hxx
+++ b/inc/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BRepFill_DataMapNodeOfDataMapOfShapeSequenceOfPnt;
 class BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt();
diff --git a/inc/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal.hxx b/inc/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal.hxx
index 527f813..b8163ef 100644
--- a/inc/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal.hxx
+++ b/inc/BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BRepFill_DataMapNodeOfDataMapOfShapeSequenceOfReal;
 class BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal();
diff --git a/inc/BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx b/inc/BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx
index 89b64f5..78b0bff 100644
--- a/inc/BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx
+++ b/inc/BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape;
 class BRepFill_DataMapOfNodeDataMapOfShapeShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_DataMapOfNodeDataMapOfShapeShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepFill_DataMapOfNodeShape.hxx b/inc/BRepFill_DataMapOfNodeShape.hxx
index 870e52c..761b303 100644
--- a/inc/BRepFill_DataMapOfNodeShape.hxx
+++ b/inc/BRepFill_DataMapOfNodeShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class BRepFill_DataMapIteratorOfDataMapOfNodeShape;
 class BRepFill_DataMapOfNodeShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_DataMapOfNodeShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepFill_DataMapOfOrientedShapeListOfShape.hxx b/inc/BRepFill_DataMapOfOrientedShapeListOfShape.hxx
index 861b2ad..c9661ef 100644
--- a/inc/BRepFill_DataMapOfOrientedShapeListOfShape.hxx
+++ b/inc/BRepFill_DataMapOfOrientedShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape;
 class BRepFill_DataMapOfOrientedShapeListOfShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_DataMapOfOrientedShapeListOfShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx b/inc/BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx
index 91079a4..dc040c7 100644
--- a/inc/BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx
+++ b/inc/BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape;
 class BRepFill_DataMapOfShapeDataMapOfShapeListOfShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_DataMapOfShapeDataMapOfShapeListOfShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepFill_DataMapOfShapeSequenceOfPnt.hxx b/inc/BRepFill_DataMapOfShapeSequenceOfPnt.hxx
index 930d4ee..126a83c 100644
--- a/inc/BRepFill_DataMapOfShapeSequenceOfPnt.hxx
+++ b/inc/BRepFill_DataMapOfShapeSequenceOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt;
 class BRepFill_DataMapOfShapeSequenceOfPnt  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_DataMapOfShapeSequenceOfPnt(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepFill_DataMapOfShapeSequenceOfReal.hxx b/inc/BRepFill_DataMapOfShapeSequenceOfReal.hxx
index d4ceadb..e6980f6 100644
--- a/inc/BRepFill_DataMapOfShapeSequenceOfReal.hxx
+++ b/inc/BRepFill_DataMapOfShapeSequenceOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal;
 class BRepFill_DataMapOfShapeSequenceOfReal  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_DataMapOfShapeSequenceOfReal(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepFill_Draft.hxx b/inc/BRepFill_Draft.hxx
index 5b51773..baaa4cd 100644
--- a/inc/BRepFill_Draft.hxx
+++ b/inc/BRepFill_Draft.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class Bnd_Box;
 class BRepFill_Draft  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_Draft(const TopoDS_Shape& Shape,const gp_Dir& Dir,const Standard_Real Angle);
diff --git a/inc/BRepFill_EdgeFaceAndOrder.hxx b/inc/BRepFill_EdgeFaceAndOrder.hxx
index 3e82c7a..105491b 100644
--- a/inc/BRepFill_EdgeFaceAndOrder.hxx
+++ b/inc/BRepFill_EdgeFaceAndOrder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopoDS_Face;
 class BRepFill_EdgeFaceAndOrder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_EdgeFaceAndOrder();
diff --git a/inc/BRepFill_Evolved.hxx b/inc/BRepFill_Evolved.hxx
index 959045c..42cfea1 100644
--- a/inc/BRepFill_Evolved.hxx
+++ b/inc/BRepFill_Evolved.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class TopoDS_Vertex;
 class BRepFill_Evolved  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_Evolved();
diff --git a/inc/BRepFill_FaceAndOrder.hxx b/inc/BRepFill_FaceAndOrder.hxx
index 71dd1ac..deda311 100644
--- a/inc/BRepFill_FaceAndOrder.hxx
+++ b/inc/BRepFill_FaceAndOrder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class TopoDS_Face;
 class BRepFill_FaceAndOrder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_FaceAndOrder();
diff --git a/inc/BRepFill_Filling.hxx b/inc/BRepFill_Filling.hxx
index dff11df..ba732aa 100644
--- a/inc/BRepFill_Filling.hxx
+++ b/inc/BRepFill_Filling.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class TopoDS_Shape;
 class BRepFill_Filling  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructor <br>
   Standard_EXPORT   BRepFill_Filling(const Standard_Integer Degree = 3,const Standard_Integer NbPtsOnCur = 15,const Standard_Integer NbIter = 2,const Standard_Boolean Anisotropie = Standard_False,const Standard_Real Tol2d = 0.00001,const Standard_Real Tol3d = 0.0001,const Standard_Real TolAng = 0.01,const Standard_Real TolCurv = 0.1,const Standard_Integer MaxDeg = 8,const Standard_Integer MaxSegments = 9);
diff --git a/inc/BRepFill_Generator.hxx b/inc/BRepFill_Generator.hxx
index 0abe741..6b31df5 100644
--- a/inc/BRepFill_Generator.hxx
+++ b/inc/BRepFill_Generator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopoDS_Shape;
 class BRepFill_Generator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_Generator();
diff --git a/inc/BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx b/inc/BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx
index 705f7d7..8a3e51c 100644
--- a/inc/BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx
+++ b/inc/BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepFill_IndexedDataMapNodeOfIndexedDataMapOfOrientedShapeListOfShape;
 class BRepFill_IndexedDataMapOfOrientedShapeListOfShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_IndexedDataMapOfOrientedShapeListOfShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepFill_ListIteratorOfListOfOffsetWire.hxx b/inc/BRepFill_ListIteratorOfListOfOffsetWire.hxx
index b6ed7bc..59a87dd 100644
--- a/inc/BRepFill_ListIteratorOfListOfOffsetWire.hxx
+++ b/inc/BRepFill_ListIteratorOfListOfOffsetWire.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepFill_ListNodeOfListOfOffsetWire;
 class BRepFill_ListIteratorOfListOfOffsetWire  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_ListIteratorOfListOfOffsetWire();
diff --git a/inc/BRepFill_ListOfOffsetWire.hxx b/inc/BRepFill_ListOfOffsetWire.hxx
index a367328..a2778f8 100644
--- a/inc/BRepFill_ListOfOffsetWire.hxx
+++ b/inc/BRepFill_ListOfOffsetWire.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BRepFill_ListNodeOfListOfOffsetWire;
 class BRepFill_ListOfOffsetWire  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_ListOfOffsetWire();
diff --git a/inc/BRepFill_MultiLine.hxx b/inc/BRepFill_MultiLine.hxx
index 03c20b8..182cd73 100644
--- a/inc/BRepFill_MultiLine.hxx
+++ b/inc/BRepFill_MultiLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class gp_Pnt2d;
 class BRepFill_MultiLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_MultiLine();
diff --git a/inc/BRepFill_MultiLineTool.hxx b/inc/BRepFill_MultiLineTool.hxx
index f05d4b2..cad2a3b 100644
--- a/inc/BRepFill_MultiLineTool.hxx
+++ b/inc/BRepFill_MultiLineTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColgp_Array1OfVec2d;
 class BRepFill_MultiLineTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns the first parameter of the Line. <br>
   Standard_EXPORT   static  Standard_Real FirstParameter(const BRepFill_MultiLine& ML) ;
diff --git a/inc/BRepFill_MyLeastSquareOfComputeCLine.hxx b/inc/BRepFill_MyLeastSquareOfComputeCLine.hxx
index 5971fe7..1f57b75 100644
--- a/inc/BRepFill_MyLeastSquareOfComputeCLine.hxx
+++ b/inc/BRepFill_MyLeastSquareOfComputeCLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class AppParCurves_MultiCurve;
 class BRepFill_MyLeastSquareOfComputeCLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_MyLeastSquareOfComputeCLine(const BRepFill_MultiLine& SSP,const Standard_Real U0,const Standard_Real U1,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const Standard_Integer Deg,const Standard_Integer NbPoints = 24);
diff --git a/inc/BRepFill_OffsetAncestors.hxx b/inc/BRepFill_OffsetAncestors.hxx
index 6e7461e..001ada9 100644
--- a/inc/BRepFill_OffsetAncestors.hxx
+++ b/inc/BRepFill_OffsetAncestors.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopoDS_Shape;
 class BRepFill_OffsetAncestors  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_OffsetAncestors();
diff --git a/inc/BRepFill_OffsetWire.hxx b/inc/BRepFill_OffsetWire.hxx
index b83d53e..4d724bd 100644
--- a/inc/BRepFill_OffsetWire.hxx
+++ b/inc/BRepFill_OffsetWire.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class BRepFill_IndexedDataMapOfOrientedShapeListOfShape;
 class BRepFill_OffsetWire  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_OffsetWire();
diff --git a/inc/BRepFill_Pipe.hxx b/inc/BRepFill_Pipe.hxx
index d9fd4e2..013be18 100644
--- a/inc/BRepFill_Pipe.hxx
+++ b/inc/BRepFill_Pipe.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class gp_Pnt;
 class BRepFill_Pipe  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_Pipe();
diff --git a/inc/BRepFill_Section.hxx b/inc/BRepFill_Section.hxx
index d272031..5298e43 100644
--- a/inc/BRepFill_Section.hxx
+++ b/inc/BRepFill_Section.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopoDS_Wire;
 class BRepFill_Section  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_Section();
diff --git a/inc/BRepFill_SectionPlacement.hxx b/inc/BRepFill_SectionPlacement.hxx
index 78bd477..853fda6 100644
--- a/inc/BRepFill_SectionPlacement.hxx
+++ b/inc/BRepFill_SectionPlacement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class gp_Trsf;
 class BRepFill_SectionPlacement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Automatic placement <br>
   Standard_EXPORT   BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,const TopoDS_Shape& Section,const Standard_Boolean WithContact = Standard_False,const Standard_Boolean WithCorrection = Standard_False);
diff --git a/inc/BRepFill_SequenceOfEdgeFaceAndOrder.hxx b/inc/BRepFill_SequenceOfEdgeFaceAndOrder.hxx
index eaf4530..5952a77 100644
--- a/inc/BRepFill_SequenceOfEdgeFaceAndOrder.hxx
+++ b/inc/BRepFill_SequenceOfEdgeFaceAndOrder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BRepFill_SequenceNodeOfSequenceOfEdgeFaceAndOrder;
 class BRepFill_SequenceOfEdgeFaceAndOrder  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BRepFill_SequenceOfEdgeFaceAndOrder();
diff --git a/inc/BRepFill_SequenceOfFaceAndOrder.hxx b/inc/BRepFill_SequenceOfFaceAndOrder.hxx
index 639953b..416d24e 100644
--- a/inc/BRepFill_SequenceOfFaceAndOrder.hxx
+++ b/inc/BRepFill_SequenceOfFaceAndOrder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BRepFill_SequenceNodeOfSequenceOfFaceAndOrder;
 class BRepFill_SequenceOfFaceAndOrder  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BRepFill_SequenceOfFaceAndOrder();
diff --git a/inc/BRepFill_SequenceOfSection.hxx b/inc/BRepFill_SequenceOfSection.hxx
index 52ef98e..90079d5 100644
--- a/inc/BRepFill_SequenceOfSection.hxx
+++ b/inc/BRepFill_SequenceOfSection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BRepFill_SequenceNodeOfSequenceOfSection;
 class BRepFill_SequenceOfSection  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BRepFill_SequenceOfSection();
diff --git a/inc/BRepFill_Sweep.hxx b/inc/BRepFill_Sweep.hxx
index 25c8db1..c2bfe95 100644
--- a/inc/BRepFill_Sweep.hxx
+++ b/inc/BRepFill_Sweep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class TopoDS_Shape;
 class BRepFill_Sweep  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,const Handle(BRepFill_LocationLaw)& Location,const Standard_Boolean WithKPart);
diff --git a/inc/BRepFill_TrimEdgeTool.hxx b/inc/BRepFill_TrimEdgeTool.hxx
index f1685a9..6e0dae9 100644
--- a/inc/BRepFill_TrimEdgeTool.hxx
+++ b/inc/BRepFill_TrimEdgeTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class gp_Pnt2d;
 class BRepFill_TrimEdgeTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_TrimEdgeTool();
diff --git a/inc/BRepFill_TrimShellCorner.hxx b/inc/BRepFill_TrimShellCorner.hxx
index b9e8c28..1ed306c 100644
--- a/inc/BRepFill_TrimShellCorner.hxx
+++ b/inc/BRepFill_TrimShellCorner.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TopTools_ListOfShape;
 class BRepFill_TrimShellCorner  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_TrimShellCorner(const Handle(TopTools_HArray2OfShape)& theFaces,const gp_Ax2& theAxeOfBisPlane,const TopoDS_Face& theSecPlane);
diff --git a/inc/BRepFill_TrimSurfaceTool.hxx b/inc/BRepFill_TrimSurfaceTool.hxx
index dacddc9..8cd6426 100644
--- a/inc/BRepFill_TrimSurfaceTool.hxx
+++ b/inc/BRepFill_TrimSurfaceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Geom_Curve;
 class BRepFill_TrimSurfaceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepFill_TrimSurfaceTool(const Handle(Geom2d_Curve)& Bis,const TopoDS_Face& Face1,const TopoDS_Face& Face2,const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,const Standard_Boolean Inv1,const Standard_Boolean Inv2);
diff --git a/inc/BRepFilletAPI_LocalOperation.hxx b/inc/BRepFilletAPI_LocalOperation.hxx
index 431beb3..b0f3c41 100644
--- a/inc/BRepFilletAPI_LocalOperation.hxx
+++ b/inc/BRepFilletAPI_LocalOperation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class ChFiDS_SecHArray1;
 class BRepFilletAPI_LocalOperation  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds a  contour in  the  builder  (builds a <br>
 //!          contour  of tangent edges). <br>
diff --git a/inc/BRepFilletAPI_MakeChamfer.hxx b/inc/BRepFilletAPI_MakeChamfer.hxx
index 79dc802..669d250 100644
--- a/inc/BRepFilletAPI_MakeChamfer.hxx
+++ b/inc/BRepFilletAPI_MakeChamfer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class ChFiDS_SecHArray1;
 class BRepFilletAPI_MakeChamfer  : public BRepFilletAPI_LocalOperation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes an algorithm for computing chamfers on the shape S. <br>
 //! The edges on which chamfers are built are defined using the Add function. <br>
diff --git a/inc/BRepFilletAPI_MakeFillet.hxx b/inc/BRepFilletAPI_MakeFillet.hxx
index caf1ab7..b90c4f0 100644
--- a/inc/BRepFilletAPI_MakeFillet.hxx
+++ b/inc/BRepFilletAPI_MakeFillet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -74,18 +77,7 @@ class Geom_Surface;
 class BRepFilletAPI_MakeFillet  : public BRepFilletAPI_LocalOperation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes   the computation    of   the  fillets. <br>
 //!          <FShape> sets   the type   of fillet  surface. The <br>
diff --git a/inc/BRepFilletAPI_MakeFillet2d.hxx b/inc/BRepFilletAPI_MakeFillet2d.hxx
index c5dcd5c..83503b0 100644
--- a/inc/BRepFilletAPI_MakeFillet2d.hxx
+++ b/inc/BRepFilletAPI_MakeFillet2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class TopoDS_Shape;
 class BRepFilletAPI_MakeFillet2d  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes an empty algorithm for computing fillets and <br>
 //!   chamfers. The face on which the fillets and <br>
diff --git a/inc/BRepGProp.hxx b/inc/BRepGProp.hxx
index f4b0c5b..4d932ed 100644
--- a/inc/BRepGProp.hxx
+++ b/inc/BRepGProp.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class BRepGProp_TFunctionOfVinertGK;
 class BRepGProp  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the linear global properties of the shape S, <br>
 //! i.e. the global properties induced by each edge of the <br>
diff --git a/inc/BRepGProp_Cinert.hxx b/inc/BRepGProp_Cinert.hxx
index 8c15834..3651183 100644
--- a/inc/BRepGProp_Cinert.hxx
+++ b/inc/BRepGProp_Cinert.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class gp_Pnt;
 class BRepGProp_Cinert  : public GProp_GProps {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepGProp_Cinert();
diff --git a/inc/BRepGProp_Domain.hxx b/inc/BRepGProp_Domain.hxx
index acacf02..544cf23 100644
--- a/inc/BRepGProp_Domain.hxx
+++ b/inc/BRepGProp_Domain.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class TopoDS_Edge;
 class BRepGProp_Domain  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
       BRepGProp_Domain();
diff --git a/inc/BRepGProp_EdgeTool.hxx b/inc/BRepGProp_EdgeTool.hxx
index d110c2f..aaab9a1 100644
--- a/inc/BRepGProp_EdgeTool.hxx
+++ b/inc/BRepGProp_EdgeTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColStd_Array1OfReal;
 class BRepGProp_EdgeTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Returns the parametric value of the start point of <br>
diff --git a/inc/BRepGProp_Face.hxx b/inc/BRepGProp_Face.hxx
index 9a85ee4..fcefd22 100644
--- a/inc/BRepGProp_Face.hxx
+++ b/inc/BRepGProp_Face.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class TColStd_HArray1OfReal;
 class BRepGProp_Face  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructor. Initializes the object with a flag IsUseSpan <br>
 //!          that says if it is necessary to define spans on a face. <br>
diff --git a/inc/BRepGProp_Sinert.hxx b/inc/BRepGProp_Sinert.hxx
index 2c6ee0c..0115716 100644
--- a/inc/BRepGProp_Sinert.hxx
+++ b/inc/BRepGProp_Sinert.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class gp_Pnt;
 class BRepGProp_Sinert  : public GProp_GProps {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepGProp_Sinert();
diff --git a/inc/BRepGProp_TFunctionOfVinertGK.hxx b/inc/BRepGProp_TFunctionOfVinertGK.hxx
index be93e64..2b7b262 100644
--- a/inc/BRepGProp_TFunctionOfVinertGK.hxx
+++ b/inc/BRepGProp_TFunctionOfVinertGK.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class gp_Pnt;
 class BRepGProp_TFunctionOfVinertGK  : public math_Function {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepGProp_TFunctionOfVinertGK(const BRepGProp_Face& theSurface,const gp_Pnt& theVertex,const Standard_Boolean IsByPoint,const Standard_Address theCoeffs,const Standard_Real theUMin,const Standard_Real theTolerance);
diff --git a/inc/BRepGProp_UFunctionOfVinertGK.hxx b/inc/BRepGProp_UFunctionOfVinertGK.hxx
index cd684c7..a537ba8 100644
--- a/inc/BRepGProp_UFunctionOfVinertGK.hxx
+++ b/inc/BRepGProp_UFunctionOfVinertGK.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_XYZ;
 class BRepGProp_UFunctionOfVinertGK  : public math_Function {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepGProp_UFunctionOfVinertGK(const BRepGProp_Face& theSurface,const gp_Pnt& theVertex,const Standard_Boolean IsByPoint,const Standard_Address theCoeffs);
diff --git a/inc/BRepGProp_Vinert.hxx b/inc/BRepGProp_Vinert.hxx
index bcdced9..27739b6 100644
--- a/inc/BRepGProp_Vinert.hxx
+++ b/inc/BRepGProp_Vinert.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Pln;
 class BRepGProp_Vinert  : public GProp_GProps {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepGProp_Vinert();
diff --git a/inc/BRepGProp_VinertGK.hxx b/inc/BRepGProp_VinertGK.hxx
index b8e4a92..3061432 100644
--- a/inc/BRepGProp_VinertGK.hxx
+++ b/inc/BRepGProp_VinertGK.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class gp_Pln;
 class BRepGProp_VinertGK  : public GProp_GProps {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepGProp_VinertGK();
diff --git a/inc/BRepIntCurveSurface_Inter.hxx b/inc/BRepIntCurveSurface_Inter.hxx
index a63e9e3..ced0d74 100644
--- a/inc/BRepIntCurveSurface_Inter.hxx
+++ b/inc/BRepIntCurveSurface_Inter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class TopoDS_Face;
 class BRepIntCurveSurface_Inter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor; <br>
   Standard_EXPORT   BRepIntCurveSurface_Inter();
diff --git a/inc/BRepLProp.hxx b/inc/BRepLProp.hxx
index a88dec5..ff40c60 100644
--- a/inc/BRepLProp.hxx
+++ b/inc/BRepLProp.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BRepLProp_SLProps;
 class BRepLProp  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  GeomAbs_Shape Continuity(const BRepAdaptor_Curve& C1,const BRepAdaptor_Curve& C2,const Standard_Real u1,const Standard_Real u2,const Standard_Real tl,const Standard_Real ta) ;
diff --git a/inc/BRepLProp_CLProps.hxx b/inc/BRepLProp_CLProps.hxx
index 2df88a2..cb13923 100644
--- a/inc/BRepLProp_CLProps.hxx
+++ b/inc/BRepLProp_CLProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class BRepLProp_CurveTool;
 class BRepLProp_CLProps  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepLProp_CLProps(const BRepAdaptor_Curve& C,const Standard_Integer N,const Standard_Real Resolution);
diff --git a/inc/BRepLProp_CurveTool.hxx b/inc/BRepLProp_CurveTool.hxx
index 9d55ace..9b1b80c 100644
--- a/inc/BRepLProp_CurveTool.hxx
+++ b/inc/BRepLProp_CurveTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_Vec;
 class BRepLProp_CurveTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the point <P> of parameter <U> on the curve <C>. <br>
   Standard_EXPORT   static  void Value(const BRepAdaptor_Curve& C,const Standard_Real U,gp_Pnt& P) ;
diff --git a/inc/BRepLProp_SLProps.hxx b/inc/BRepLProp_SLProps.hxx
index 2ad8808..4637840 100644
--- a/inc/BRepLProp_SLProps.hxx
+++ b/inc/BRepLProp_SLProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class gp_Dir;
 class BRepLProp_SLProps  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepLProp_SLProps(const BRepAdaptor_Surface& S,const Standard_Real U,const Standard_Real V,const Standard_Integer N,const Standard_Real Resolution);
diff --git a/inc/BRepLProp_SurfaceTool.hxx b/inc/BRepLProp_SurfaceTool.hxx
index 27dfc54..9f44c00 100644
--- a/inc/BRepLProp_SurfaceTool.hxx
+++ b/inc/BRepLProp_SurfaceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_Vec;
 class BRepLProp_SurfaceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the point <P> of parameter <U> and <V> on the <br>
 //!          Surface <S>. <br>
diff --git a/inc/BRepLib.hxx b/inc/BRepLib.hxx
index 5fd44f6..3bd1640 100644
--- a/inc/BRepLib.hxx
+++ b/inc/BRepLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class BRepLib_FuseEdges;
 class BRepLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Sets the default precision.  The current Precision <br>
 //!          is returned. <br>
diff --git a/inc/BRepLib_Command.hxx b/inc/BRepLib_Command.hxx
index 659dc9c..1dc2620 100644
--- a/inc/BRepLib_Command.hxx
+++ b/inc/BRepLib_Command.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class StdFail_NotDone;
 class BRepLib_Command  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/BRepLib_FindSurface.hxx b/inc/BRepLib_FindSurface.hxx
index ebf77bf..010a7d5 100644
--- a/inc/BRepLib_FindSurface.hxx
+++ b/inc/BRepLib_FindSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class TopLoc_Location;
 class BRepLib_FindSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepLib_FindSurface();
@@ -74,13 +66,19 @@ public:
 //!          if <OnlyPlane> is true, the computed surface will be <br>
 //!          a plane. If it is not possible to find a plane, the <br>
 //!          flag NotDone will be set. <br>
-  Standard_EXPORT   BRepLib_FindSurface(const TopoDS_Shape& S,const Standard_Real Tol = -1,const Standard_Boolean OnlyPlane = Standard_False);
+//!          If <OnlyClosed> is true,  then  S  sould be a wire <br>
+//!          and the existing surface,  on  which wire S is not <br>
+//!          closed in 2D, will be ignored. <br>
+  Standard_EXPORT   BRepLib_FindSurface(const TopoDS_Shape& S,const Standard_Real Tol = -1,const Standard_Boolean OnlyPlane = Standard_False,const Standard_Boolean OnlyClosed = Standard_False);
   //! Computes the Surface from the edges of  <S> with the <br>
 //!          given tolerance. <br>
 //!          if <OnlyPlane> is true, the computed surface will be <br>
 //!          a plane. If it is not possible to find a plane, the <br>
 //!          flag NotDone will be set. <br>
-  Standard_EXPORT     void Init(const TopoDS_Shape& S,const Standard_Real Tol = -1,const Standard_Boolean OnlyPlane = Standard_False) ;
+//!          If <OnlyClosed> is true,  then  S  sould be a wire <br>
+//!          and the existing surface,  on  which wire S is not <br>
+//!          closed in 2D, will be ignored. <br>
+  Standard_EXPORT     void Init(const TopoDS_Shape& S,const Standard_Real Tol = -1,const Standard_Boolean OnlyPlane = Standard_False,const Standard_Boolean OnlyClosed = Standard_False) ;
   
   Standard_EXPORT     Standard_Boolean Found() const;
   
diff --git a/inc/BRepLib_FuseEdges.hxx b/inc/BRepLib_FuseEdges.hxx
index 18ad097..481d3b5 100644
--- a/inc/BRepLib_FuseEdges.hxx
+++ b/inc/BRepLib_FuseEdges.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class TopoDS_Edge;
 class BRepLib_FuseEdges  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initialise members  and build  construction of map <br>
 //!          of ancestors. <br>
diff --git a/inc/BRepLib_MakeEdge.hxx b/inc/BRepLib_MakeEdge.hxx
index 41d2471..91ec9db 100644
--- a/inc/BRepLib_MakeEdge.hxx
+++ b/inc/BRepLib_MakeEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -82,18 +85,7 @@ class TopoDS_Edge;
 class BRepLib_MakeEdge  : public BRepLib_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepLib_MakeEdge();
diff --git a/inc/BRepLib_MakeEdge2d.hxx b/inc/BRepLib_MakeEdge2d.hxx
index d5563b7..c8e4c89 100644
--- a/inc/BRepLib_MakeEdge2d.hxx
+++ b/inc/BRepLib_MakeEdge2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -74,18 +77,7 @@ class TopoDS_Edge;
 class BRepLib_MakeEdge2d  : public BRepLib_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepLib_MakeEdge2d(const TopoDS_Vertex& V1,const TopoDS_Vertex& V2);
diff --git a/inc/BRepLib_MakeFace.hxx b/inc/BRepLib_MakeFace.hxx
index 028a371..4b03829 100644
--- a/inc/BRepLib_MakeFace.hxx
+++ b/inc/BRepLib_MakeFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class TopoDS_Wire;
 class BRepLib_MakeFace  : public BRepLib_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Not done. <br>
   Standard_EXPORT   BRepLib_MakeFace();
diff --git a/inc/BRepLib_MakePolygon.hxx b/inc/BRepLib_MakePolygon.hxx
index ff36cd5..e80efae 100644
--- a/inc/BRepLib_MakePolygon.hxx
+++ b/inc/BRepLib_MakePolygon.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class TopoDS_Wire;
 class BRepLib_MakePolygon  : public BRepLib_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty MakePolygon. <br>
   Standard_EXPORT   BRepLib_MakePolygon();
diff --git a/inc/BRepLib_MakeShape.hxx b/inc/BRepLib_MakeShape.hxx
index e67b61c..c7e23ad 100644
--- a/inc/BRepLib_MakeShape.hxx
+++ b/inc/BRepLib_MakeShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TopoDS_Edge;
 class BRepLib_MakeShape  : public BRepLib_Command {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This is  called by  Shape().  It does  nothing but <br>
 //!          may be redefined. <br>
diff --git a/inc/BRepLib_MakeShell.hxx b/inc/BRepLib_MakeShell.hxx
index 88b3206..3e84464 100644
--- a/inc/BRepLib_MakeShell.hxx
+++ b/inc/BRepLib_MakeShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopoDS_Shell;
 class BRepLib_MakeShell  : public BRepLib_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Not done. <br>
   Standard_EXPORT   BRepLib_MakeShell();
diff --git a/inc/BRepLib_MakeSolid.hxx b/inc/BRepLib_MakeSolid.hxx
index 4b7722f..59042ee 100644
--- a/inc/BRepLib_MakeSolid.hxx
+++ b/inc/BRepLib_MakeSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopoDS_Face;
 class BRepLib_MakeSolid  : public BRepLib_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Solid covers whole space. <br>
   Standard_EXPORT   BRepLib_MakeSolid();
diff --git a/inc/BRepLib_MakeVertex.hxx b/inc/BRepLib_MakeVertex.hxx
index 475c8b8..65aa5d3 100644
--- a/inc/BRepLib_MakeVertex.hxx
+++ b/inc/BRepLib_MakeVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TopoDS_Vertex;
 class BRepLib_MakeVertex  : public BRepLib_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepLib_MakeVertex(const gp_Pnt& P);
diff --git a/inc/BRepLib_MakeWire.hxx b/inc/BRepLib_MakeWire.hxx
index 83a0977..ff58cc9 100644
--- a/inc/BRepLib_MakeWire.hxx
+++ b/inc/BRepLib_MakeWire.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -81,18 +84,7 @@ class TopoDS_Vertex;
 class BRepLib_MakeWire  : public BRepLib_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! NotDone MakeWire. <br>
   Standard_EXPORT   BRepLib_MakeWire();
diff --git a/inc/BRepMAT2d_BisectingLocus.hxx b/inc/BRepMAT2d_BisectingLocus.hxx
index 430d290..2bfe446 100644
--- a/inc/BRepMAT2d_BisectingLocus.hxx
+++ b/inc/BRepMAT2d_BisectingLocus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class MAT_DataMapOfIntegerBasicElt;
 class BRepMAT2d_BisectingLocus  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMAT2d_BisectingLocus();
diff --git a/inc/BRepMAT2d_DataMapIteratorOfDataMapOfBasicEltShape.hxx b/inc/BRepMAT2d_DataMapIteratorOfDataMapOfBasicEltShape.hxx
index 7cbb2cd..caec1cf 100644
--- a/inc/BRepMAT2d_DataMapIteratorOfDataMapOfBasicEltShape.hxx
+++ b/inc/BRepMAT2d_DataMapIteratorOfDataMapOfBasicEltShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class BRepMAT2d_DataMapNodeOfDataMapOfBasicEltShape;
 class BRepMAT2d_DataMapIteratorOfDataMapOfBasicEltShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMAT2d_DataMapIteratorOfDataMapOfBasicEltShape();
diff --git a/inc/BRepMAT2d_DataMapIteratorOfDataMapOfShapeSequenceOfBasicElt.hxx b/inc/BRepMAT2d_DataMapIteratorOfDataMapOfShapeSequenceOfBasicElt.hxx
index 77f1505..1d57180 100644
--- a/inc/BRepMAT2d_DataMapIteratorOfDataMapOfShapeSequenceOfBasicElt.hxx
+++ b/inc/BRepMAT2d_DataMapIteratorOfDataMapOfShapeSequenceOfBasicElt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BRepMAT2d_DataMapNodeOfDataMapOfShapeSequenceOfBasicElt;
 class BRepMAT2d_DataMapIteratorOfDataMapOfShapeSequenceOfBasicElt  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMAT2d_DataMapIteratorOfDataMapOfShapeSequenceOfBasicElt();
diff --git a/inc/BRepMAT2d_DataMapOfBasicEltShape.hxx b/inc/BRepMAT2d_DataMapOfBasicEltShape.hxx
index 1515f96..cb0a804 100644
--- a/inc/BRepMAT2d_DataMapOfBasicEltShape.hxx
+++ b/inc/BRepMAT2d_DataMapOfBasicEltShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class BRepMAT2d_DataMapIteratorOfDataMapOfBasicEltShape;
 class BRepMAT2d_DataMapOfBasicEltShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMAT2d_DataMapOfBasicEltShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMAT2d_DataMapOfShapeSequenceOfBasicElt.hxx b/inc/BRepMAT2d_DataMapOfShapeSequenceOfBasicElt.hxx
index ac82f1d..233c83b 100644
--- a/inc/BRepMAT2d_DataMapOfShapeSequenceOfBasicElt.hxx
+++ b/inc/BRepMAT2d_DataMapOfShapeSequenceOfBasicElt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepMAT2d_DataMapIteratorOfDataMapOfShapeSequenceOfBasicElt;
 class BRepMAT2d_DataMapOfShapeSequenceOfBasicElt  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMAT2d_DataMapOfShapeSequenceOfBasicElt(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMAT2d_Explorer.hxx b/inc/BRepMAT2d_Explorer.hxx
index 4d05603..8622de6 100644
--- a/inc/BRepMAT2d_Explorer.hxx
+++ b/inc/BRepMAT2d_Explorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class TColStd_SequenceOfBoolean;
 class BRepMAT2d_Explorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMAT2d_Explorer();
diff --git a/inc/BRepMAT2d_LinkTopoBilo.hxx b/inc/BRepMAT2d_LinkTopoBilo.hxx
index 03f80a2..460e055 100644
--- a/inc/BRepMAT2d_LinkTopoBilo.hxx
+++ b/inc/BRepMAT2d_LinkTopoBilo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TopoDS_Wire;
 class BRepMAT2d_LinkTopoBilo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMAT2d_LinkTopoBilo();
diff --git a/inc/BRepMAT2d_SequenceOfBasicElt.hxx b/inc/BRepMAT2d_SequenceOfBasicElt.hxx
index 6772ed1..b3a7be9 100644
--- a/inc/BRepMAT2d_SequenceOfBasicElt.hxx
+++ b/inc/BRepMAT2d_SequenceOfBasicElt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BRepMAT2d_SequenceNodeOfSequenceOfBasicElt;
 class BRepMAT2d_SequenceOfBasicElt  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BRepMAT2d_SequenceOfBasicElt();
diff --git a/inc/BRepMesh.hxx b/inc/BRepMesh.hxx
index ad49bf6..3e65dc8 100644
--- a/inc/BRepMesh.hxx
+++ b/inc/BRepMesh.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -89,18 +92,7 @@ class BRepMesh_DataMapIteratorOfDataMapOfShapePairOfPolygon;
 class BRepMesh  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! call to incremental mesh. <br>
   Standard_EXPORT   static  void Mesh(const TopoDS_Shape& S,const Standard_Real d) ;
diff --git a/inc/BRepMesh_Array1OfBiPoint.hxx b/inc/BRepMesh_Array1OfBiPoint.hxx
index 58e6730..35cdf43 100644
--- a/inc/BRepMesh_Array1OfBiPoint.hxx
+++ b/inc/BRepMesh_Array1OfBiPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepMesh_BiPoint;
 class BRepMesh_Array1OfBiPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_Array1OfBiPoint(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/BRepMesh_Array1OfVertexOfDelaun.hxx b/inc/BRepMesh_Array1OfVertexOfDelaun.hxx
index ffa1d5d..575ef70 100644
--- a/inc/BRepMesh_Array1OfVertexOfDelaun.hxx
+++ b/inc/BRepMesh_Array1OfVertexOfDelaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepMesh_Vertex;
 class BRepMesh_Array1OfVertexOfDelaun  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_Array1OfVertexOfDelaun(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/BRepMesh_BiPoint.hxx b/inc/BRepMesh_BiPoint.hxx
index be302ba..5609183 100644
--- a/inc/BRepMesh_BiPoint.hxx
+++ b/inc/BRepMesh_BiPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class BRepMesh_BiPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BRepMesh_BiPoint();
diff --git a/inc/BRepMesh_Circ.hxx b/inc/BRepMesh_Circ.hxx
index 211e101..ec7c1ad 100644
--- a/inc/BRepMesh_Circ.hxx
+++ b/inc/BRepMesh_Circ.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,22 +31,7 @@ class gp_XY;
 class BRepMesh_Circ  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_Circ();
diff --git a/inc/BRepMesh_CircleTool.hxx b/inc/BRepMesh_CircleTool.hxx
index 4dd50d4..c022d47 100644
--- a/inc/BRepMesh_CircleTool.hxx
+++ b/inc/BRepMesh_CircleTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class gp_Circ2d;
 class BRepMesh_CircleTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_CircleTool(const BRepMesh_BaseAllocator& theAlloc);
diff --git a/inc/BRepMesh_Classifier.hxx b/inc/BRepMesh_Classifier.hxx
index c4c278d..6b2906f 100644
--- a/inc/BRepMesh_Classifier.hxx
+++ b/inc/BRepMesh_Classifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,23 +49,12 @@ class TColgp_SequenceOfPnt2d;
 class BRepMesh_Classifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
-  Standard_EXPORT   BRepMesh_Classifier(const TopoDS_Face& F,const Standard_Real Tol,const BRepMesh_DataMapOfShapePairOfPolygon& edges,const TColStd_IndexedMapOfInteger& themap,const Handle(BRepMesh_DataStructureOfDelaun)& Str,const Standard_Real Umin,const Standard_Real Umax,const Standard_Real Vmin,const Standard_Real Vmax);
+  Standard_EXPORT   BRepMesh_Classifier(const TopoDS_Face& theFace,const Standard_Real theTolUV,const BRepMesh_DataMapOfShapePairOfPolygon& theEdges,const TColStd_IndexedMapOfInteger& theMap,const Handle(BRepMesh_DataStructureOfDelaun)& theStructure,const Standard_Real theUmin,const Standard_Real theUmax,const Standard_Real theVmin,const Standard_Real theVmax);
   
-  Standard_EXPORT     TopAbs_State Perform(const gp_Pnt2d& Puv) const;
+  Standard_EXPORT     TopAbs_State Perform(const gp_Pnt2d& thePoint) const;
   
         BRepMesh_Status State() const;
   
@@ -85,17 +77,13 @@ protected:
 private:
 
   
-  Standard_EXPORT     void AnalizeWire(const TColgp_SequenceOfPnt2d& theSeqPnt2d,const Standard_Real Umin,const Standard_Real Umax,const Standard_Real Vmin,const Standard_Real Vmax) ;
+  Standard_EXPORT     void AnalizeWire(const TColgp_SequenceOfPnt2d& theSeqPnt2d,const Standard_Real theUmin,const Standard_Real theUmax,const Standard_Real theVmin,const Standard_Real theVmax) ;
 
 
-BRepTopAdaptor_SeqOfPtr TabClass;
-TColStd_SequenceOfInteger TabOrien;
-Standard_Real Toluv;
-TopoDS_Face Face;
-Standard_Real U1;
-Standard_Real V1;
-Standard_Real U2;
-Standard_Real V2;
+BRepTopAdaptor_SeqOfPtr myTabClass;
+TColStd_SequenceOfInteger myTabOrient;
+Standard_Real myTolUV;
+TopoDS_Face myFace;
 BRepMesh_Status myState;
 
 
diff --git a/inc/BRepMesh_ComparatorOfIndexedVertexOfDelaun.hxx b/inc/BRepMesh_ComparatorOfIndexedVertexOfDelaun.hxx
index 1a932d7..12860e5 100644
--- a/inc/BRepMesh_ComparatorOfIndexedVertexOfDelaun.hxx
+++ b/inc/BRepMesh_ComparatorOfIndexedVertexOfDelaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_XY;
 class BRepMesh_ComparatorOfIndexedVertexOfDelaun  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_ComparatorOfIndexedVertexOfDelaun(const gp_XY& theDir,const Standard_Real TheTol,const Handle(BRepMesh_DataStructureOfDelaun)& HDS);
diff --git a/inc/BRepMesh_ComparatorOfVertexOfDelaun.hxx b/inc/BRepMesh_ComparatorOfVertexOfDelaun.hxx
index 657ddca..4ce77ca 100644
--- a/inc/BRepMesh_ComparatorOfVertexOfDelaun.hxx
+++ b/inc/BRepMesh_ComparatorOfVertexOfDelaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class BRepMesh_Vertex;
 class BRepMesh_ComparatorOfVertexOfDelaun  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_ComparatorOfVertexOfDelaun(const gp_XY& theDir,const Standard_Real TheTol);
diff --git a/inc/BRepMesh_DataMapIteratorOfDataMapOfFaceAttribute.hxx b/inc/BRepMesh_DataMapIteratorOfDataMapOfFaceAttribute.hxx
index 49173c6..f03baad 100644
--- a/inc/BRepMesh_DataMapIteratorOfDataMapOfFaceAttribute.hxx
+++ b/inc/BRepMesh_DataMapIteratorOfDataMapOfFaceAttribute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class BRepMesh_DataMapNodeOfDataMapOfFaceAttribute;
 class BRepMesh_DataMapIteratorOfDataMapOfFaceAttribute  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapIteratorOfDataMapOfFaceAttribute();
diff --git a/inc/BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx b/inc/BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx
index dd533fa..7ca4bed 100644
--- a/inc/BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx
+++ b/inc/BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BRepMesh_DataMapNodeOfDataMapOfIntegerListOfInteger;
 class BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfInteger();
diff --git a/inc/BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfXY.hxx b/inc/BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfXY.hxx
index 8ae699e..16c7551 100644
--- a/inc/BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfXY.hxx
+++ b/inc/BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfXY.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepMesh_DataMapNodeOfDataMapOfIntegerListOfXY;
 class BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfXY  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfXY();
diff --git a/inc/BRepMesh_DataMapIteratorOfDataMapOfIntegerPnt.hxx b/inc/BRepMesh_DataMapIteratorOfDataMapOfIntegerPnt.hxx
index e70aefc..4506c27 100644
--- a/inc/BRepMesh_DataMapIteratorOfDataMapOfIntegerPnt.hxx
+++ b/inc/BRepMesh_DataMapIteratorOfDataMapOfIntegerPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepMesh_DataMapNodeOfDataMapOfIntegerPnt;
 class BRepMesh_DataMapIteratorOfDataMapOfIntegerPnt  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapIteratorOfDataMapOfIntegerPnt();
diff --git a/inc/BRepMesh_DataMapIteratorOfDataMapOfShapePairOfPolygon.hxx b/inc/BRepMesh_DataMapIteratorOfDataMapOfShapePairOfPolygon.hxx
index a8660c8..83b27a7 100644
--- a/inc/BRepMesh_DataMapIteratorOfDataMapOfShapePairOfPolygon.hxx
+++ b/inc/BRepMesh_DataMapIteratorOfDataMapOfShapePairOfPolygon.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BRepMesh_DataMapNodeOfDataMapOfShapePairOfPolygon;
 class BRepMesh_DataMapIteratorOfDataMapOfShapePairOfPolygon  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapIteratorOfDataMapOfShapePairOfPolygon();
diff --git a/inc/BRepMesh_DataMapIteratorOfDataMapOfShapeReal.hxx b/inc/BRepMesh_DataMapIteratorOfDataMapOfShapeReal.hxx
index 4608232..193f321 100644
--- a/inc/BRepMesh_DataMapIteratorOfDataMapOfShapeReal.hxx
+++ b/inc/BRepMesh_DataMapIteratorOfDataMapOfShapeReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepMesh_DataMapNodeOfDataMapOfShapeReal;
 class BRepMesh_DataMapIteratorOfDataMapOfShapeReal  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapIteratorOfDataMapOfShapeReal();
diff --git a/inc/BRepMesh_DataMapIteratorOfDataMapOfVertexInteger.hxx b/inc/BRepMesh_DataMapIteratorOfDataMapOfVertexInteger.hxx
index 4636d81..1c393bb 100644
--- a/inc/BRepMesh_DataMapIteratorOfDataMapOfVertexInteger.hxx
+++ b/inc/BRepMesh_DataMapIteratorOfDataMapOfVertexInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepMesh_DataMapNodeOfDataMapOfVertexInteger;
 class BRepMesh_DataMapIteratorOfDataMapOfVertexInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapIteratorOfDataMapOfVertexInteger();
diff --git a/inc/BRepMesh_DataMapOfFaceAttribute.hxx b/inc/BRepMesh_DataMapOfFaceAttribute.hxx
index f63dfaa..efd2160 100644
--- a/inc/BRepMesh_DataMapOfFaceAttribute.hxx
+++ b/inc/BRepMesh_DataMapOfFaceAttribute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class BRepMesh_DataMapIteratorOfDataMapOfFaceAttribute;
 class BRepMesh_DataMapOfFaceAttribute  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapOfFaceAttribute(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMesh_DataMapOfIntegerListOfInteger.hxx b/inc/BRepMesh_DataMapOfIntegerListOfInteger.hxx
index 3f0a813..b1058e8 100644
--- a/inc/BRepMesh_DataMapOfIntegerListOfInteger.hxx
+++ b/inc/BRepMesh_DataMapOfIntegerListOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfInteger;
 class BRepMesh_DataMapOfIntegerListOfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapOfIntegerListOfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMesh_DataMapOfIntegerListOfXY.hxx b/inc/BRepMesh_DataMapOfIntegerListOfXY.hxx
index df04dad..241a450 100644
--- a/inc/BRepMesh_DataMapOfIntegerListOfXY.hxx
+++ b/inc/BRepMesh_DataMapOfIntegerListOfXY.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BRepMesh_DataMapIteratorOfDataMapOfIntegerListOfXY;
 class BRepMesh_DataMapOfIntegerListOfXY  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapOfIntegerListOfXY(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMesh_DataMapOfIntegerPnt.hxx b/inc/BRepMesh_DataMapOfIntegerPnt.hxx
index 445b971..03695e0 100644
--- a/inc/BRepMesh_DataMapOfIntegerPnt.hxx
+++ b/inc/BRepMesh_DataMapOfIntegerPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BRepMesh_DataMapIteratorOfDataMapOfIntegerPnt;
 class BRepMesh_DataMapOfIntegerPnt  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapOfIntegerPnt(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMesh_DataMapOfShapePairOfPolygon.hxx b/inc/BRepMesh_DataMapOfShapePairOfPolygon.hxx
index 9f303e1..c491c94 100644
--- a/inc/BRepMesh_DataMapOfShapePairOfPolygon.hxx
+++ b/inc/BRepMesh_DataMapOfShapePairOfPolygon.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepMesh_DataMapIteratorOfDataMapOfShapePairOfPolygon;
 class BRepMesh_DataMapOfShapePairOfPolygon  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapOfShapePairOfPolygon(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMesh_DataMapOfShapeReal.hxx b/inc/BRepMesh_DataMapOfShapeReal.hxx
index e6f48e3..eb71485 100644
--- a/inc/BRepMesh_DataMapOfShapeReal.hxx
+++ b/inc/BRepMesh_DataMapOfShapeReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class BRepMesh_DataMapIteratorOfDataMapOfShapeReal;
 class BRepMesh_DataMapOfShapeReal  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapOfShapeReal(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMesh_DataMapOfVertexInteger.hxx b/inc/BRepMesh_DataMapOfVertexInteger.hxx
index 4d748c2..8e2b854 100644
--- a/inc/BRepMesh_DataMapOfVertexInteger.hxx
+++ b/inc/BRepMesh_DataMapOfVertexInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BRepMesh_DataMapIteratorOfDataMapOfVertexInteger;
 class BRepMesh_DataMapOfVertexInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_DataMapOfVertexInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMesh_Delaun.hxx b/inc/BRepMesh_Delaun.hxx
index 3c175e7..dffdeb5 100644
--- a/inc/BRepMesh_Delaun.hxx
+++ b/inc/BRepMesh_Delaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,6 +45,7 @@ class BRepMesh_Edge;
 class BRepMesh_Triangle;
 class Bnd_Box2d;
 class TColStd_SequenceOfInteger;
+class TColStd_MapOfInteger;
 
 
 //! Compute the  Delaunay's triangulation    with  the <br>
@@ -49,18 +53,7 @@ class TColStd_SequenceOfInteger;
 class BRepMesh_Delaun  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates the  triangulation with an  empty Mesh <br>
 //!          data structure. <br>
@@ -135,16 +128,26 @@ private:
   Standard_EXPORT     void Perform(Bnd_Box2d& theBndBox,TColStd_Array1OfInteger& theVertexIndices) ;
   //! Creates the triangles on new nodes <br>
   Standard_EXPORT     void CreateTrianglesOnNewVertices(TColStd_Array1OfInteger& theVertexIndices) ;
-
-
-Handle_BRepMesh_DataStructureOfDelaun MeshData;
-Standard_Boolean PositiveOrientation;
-BRepMesh_CircleTool tCircles;
-Standard_Integer supVert1;
-Standard_Integer supVert2;
-Standard_Integer supVert3;
-BRepMesh_Triangle supTrian;
-BRepMesh_MapOfInteger mapEdges;
+  //! Check intersection between the two segments. <br>
+  Standard_EXPORT     Standard_Boolean IntSegSeg(const BRepMesh_Edge& theEdge1,const BRepMesh_Edge& theEdge2) ;
+  //! Removes triangles within polygon <br>
+  Standard_EXPORT     void KillInternalTriangles(const Standard_Integer theEdgeId,const TColStd_MapOfInteger& theIgnoredEdges,BRepMesh_MapOfIntegerInteger& theLoopEdges) ;
+  //! Cleanup mesh from the free triangles <br>
+  Standard_EXPORT     void CleanupMesh() ;
+  //! Removes triangles around the given pivot node <br>
+  Standard_EXPORT     void RemovePivotTriangles(const Standard_Integer theEdgeInfo,const Standard_Integer thePivotNode,TColStd_MapOfInteger& theInfectedEdges,BRepMesh_MapOfIntegerInteger& theLoopEdges,const Standard_Boolean isFirstPass) ;
+  //! Remove internal triangles from the given polygon <br>
+  Standard_EXPORT     void CleanupPolygon(const TColStd_SequenceOfInteger& thePolygon,TColStd_MapOfInteger& theInfectedEdges,BRepMesh_MapOfIntegerInteger& theLoopEdges) ;
+
+
+Handle_BRepMesh_DataStructureOfDelaun myMeshData;
+Standard_Boolean myPositiveOrientation;
+BRepMesh_CircleTool myCircles;
+Standard_Integer mySupVert1;
+Standard_Integer mySupVert2;
+Standard_Integer mySupVert3;
+BRepMesh_Triangle mySupTrian;
+BRepMesh_MapOfInteger myMapEdges;
 
 
 };
diff --git a/inc/BRepMesh_Delaun.lxx b/inc/BRepMesh_Delaun.lxx
index 5d8cc79..67ca061 100644
--- a/inc/BRepMesh_Delaun.lxx
+++ b/inc/BRepMesh_Delaun.lxx
@@ -25,19 +25,19 @@
 inline const BRepMesh_Vertex& BRepMesh_Delaun::GetVertex
 (const Standard_Integer vIndex) const
 {
-  return MeshData->GetNode(vIndex);
+  return myMeshData->GetNode(vIndex);
 }
 
 
 inline const BRepMesh_Edge& BRepMesh_Delaun::GetEdge
 (const Standard_Integer eIndex) const
 {
-  return MeshData->GetLink(eIndex);
+  return myMeshData->GetLink(eIndex);
 }
 
 
 inline const BRepMesh_Triangle& BRepMesh_Delaun::GetTriangle
 (const Standard_Integer tIndex) const
 {
-  return MeshData->GetElement(tIndex);
+  return myMeshData->GetElement(tIndex);
 }
diff --git a/inc/BRepMesh_DiscretFactory.hxx b/inc/BRepMesh_DiscretFactory.hxx
index 9a5cdc3..0ace772 100644
--- a/inc/BRepMesh_DiscretFactory.hxx
+++ b/inc/BRepMesh_DiscretFactory.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopoDS_Shape;
 class BRepMesh_DiscretFactory  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Returns the global factory instance. <br>
diff --git a/inc/BRepMesh_Edge.hxx b/inc/BRepMesh_Edge.hxx
index d2820db..f3b9504 100644
--- a/inc/BRepMesh_Edge.hxx
+++ b/inc/BRepMesh_Edge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,19 +31,10 @@
 class BRepMesh_Edge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
+  
+      BRepMesh_Edge();
   //! Contructs a link beetween to vertices. <br>
   Standard_EXPORT   BRepMesh_Edge(const Standard_Integer vDebut,const Standard_Integer vFin,const BRepMesh_DegreeOfFreedom canMove);
   //! Give the index of first node of the Link. <br>
diff --git a/inc/BRepMesh_Edge.lxx b/inc/BRepMesh_Edge.lxx
index 3f726ae..ebfe78d 100644
--- a/inc/BRepMesh_Edge.lxx
+++ b/inc/BRepMesh_Edge.lxx
@@ -18,6 +18,12 @@
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
+inline BRepMesh_Edge::BRepMesh_Edge()
+: myFirstNode(-1),
+  myLastNode(-1),
+  myMovability(BRepMesh_Deleted)
+{
+}
 
 inline Standard_Integer  BRepMesh_Edge::FirstNode()const 
 {
diff --git a/inc/BRepMesh_ElemHasherOfDataStructureOfDelaun.hxx b/inc/BRepMesh_ElemHasherOfDataStructureOfDelaun.hxx
index f7265a2..d10e4fe 100644
--- a/inc/BRepMesh_ElemHasherOfDataStructureOfDelaun.hxx
+++ b/inc/BRepMesh_ElemHasherOfDataStructureOfDelaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class BRepMesh_Triangle;
 class BRepMesh_ElemHasherOfDataStructureOfDelaun  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const BRepMesh_Triangle& K,const Standard_Integer Upper) ;
diff --git a/inc/BRepMesh_FastDiscret.hxx b/inc/BRepMesh_FastDiscret.hxx
index c24f982..a557a33 100644
--- a/inc/BRepMesh_FastDiscret.hxx
+++ b/inc/BRepMesh_FastDiscret.hxx
@@ -58,6 +58,9 @@
 #ifndef _BRepMesh_BaseAllocator_HeaderFile
 #include <BRepMesh_BaseAllocator.hxx>
 #endif
+#ifndef _TopTools_MutexForShapeProvider_HeaderFile
+#include <TopTools_MutexForShapeProvider.hxx>
+#endif
 #ifndef _MMgt_TShared_HeaderFile
 #include <MMgt_TShared.hxx>
 #endif
@@ -70,6 +73,9 @@
 #ifndef _BRepMesh_ClassifierPtr_HeaderFile
 #include <BRepMesh_ClassifierPtr.hxx>
 #endif
+#ifndef _TopAbs_ShapeEnum_HeaderFile
+#include <TopAbs_ShapeEnum.hxx>
+#endif
 #ifndef _BRepMesh_MapOfInteger_HeaderFile
 #include <BRepMesh_MapOfInteger.hxx>
 #endif
@@ -143,6 +149,13 @@ public:
   
 //! Returns the multi-threading usage flag. <br>
   Standard_EXPORT     Standard_Boolean IsParallel() const;
+  
+//! Creates mutexes for each sub-shape of type theType in theShape. <br>
+//! Used to avoid data races. <br>
+  Standard_EXPORT     void CreateMutexesForSubShapes(const TopoDS_Shape& theShape,const TopAbs_ShapeEnum theType) ;
+  
+//! Removes all created mutexes <br>
+  Standard_EXPORT     void RemoveAllMutexes() ;
   //! Gives the number of built triangles. <br>
   Standard_EXPORT     Standard_Integer NbTriangles() const;
   //! Gives the triangle of <Index>. <br>
@@ -234,6 +247,7 @@ BRepMesh_Status myFacestate;
 TopTools_DataMapOfShapeReal myMapdefle;
 TopTools_ListOfShape myNottriangulated;
 BRepMesh_BaseAllocator myAllocator;
+TopTools_MutexForShapeProvider myMutexProvider;
 
 
 };
diff --git a/inc/BRepMesh_FastDiscretFace.hxx b/inc/BRepMesh_FastDiscretFace.hxx
index 8192d63..6578f5f 100644
--- a/inc/BRepMesh_FastDiscretFace.hxx
+++ b/inc/BRepMesh_FastDiscretFace.hxx
@@ -58,6 +58,9 @@
 #ifndef _MMgt_TShared_HeaderFile
 #include <MMgt_TShared.hxx>
 #endif
+#ifndef _TopTools_MutexForShapeProvider_HeaderFile
+#include <TopTools_MutexForShapeProvider.hxx>
+#endif
 #ifndef _Handle_BRepAdaptor_HSurface_HeaderFile
 #include <Handle_BRepAdaptor_HSurface.hxx>
 #endif
@@ -98,7 +101,7 @@ public:
   
   Standard_EXPORT   BRepMesh_FastDiscretFace(const Standard_Real theAngle,const Standard_Boolean theWithShare = Standard_True);
   
-  Standard_EXPORT     void Add(const TopoDS_Face& theFace,const Handle(BRepMesh_FaceAttribute)& theAttrib,const TopTools_DataMapOfShapeReal& theMapDefle) ;
+  Standard_EXPORT     void Add(const TopoDS_Face& theFace,const Handle(BRepMesh_FaceAttribute)& theAttrib,const TopTools_DataMapOfShapeReal& theMapDefle,const TopTools_MutexForShapeProvider& theMutexProvider) ;
   
   Standard_EXPORT     Standard_Real Control(const Handle(BRepAdaptor_HSurface)& theCaro,const Standard_Real theDefFace,BRepMesh_ListOfVertex& theInternalV,TColStd_ListOfInteger& theBadTriangles,TColStd_ListOfInteger& theNulTriangles,BRepMesh_Delaun& theTrigu,const Standard_Boolean theIsFirst) ;
   
@@ -120,7 +123,7 @@ public:
 protected:
 
   
-  Standard_EXPORT     Standard_Boolean RestoreStructureFromTriangulation(const TopoDS_Edge& theEdge,const TopoDS_Face& theFace,const Handle(BRepAdaptor_HSurface)& theSurf,const Handle(Poly_Triangulation)& theTrigu,const Standard_Real theDefEdge,const TopLoc_Location& theLoc) ;
+  Standard_EXPORT     Standard_Boolean RestoreStructureFromTriangulation(const TopoDS_Edge& theEdge,const TopoDS_Face& theFace,const Handle(BRepAdaptor_HSurface)& theSurf,const Handle(Poly_Triangulation)& theTrigu,const Standard_Real theDefEdge,const TopLoc_Location& theLoc,const TopTools_MutexForShapeProvider& theMutexProvider) ;
 
 
 
@@ -131,7 +134,7 @@ private:
   
   Standard_EXPORT     void InternalVertices(const Handle(BRepAdaptor_HSurface)& theCaro,BRepMesh_ListOfVertex& theInternalV,const Standard_Real theDefFace,const BRepMesh_ClassifierPtr& theClassifier) ;
   
-  Standard_EXPORT     void AddInShape(const TopoDS_Face& theFace,const Standard_Real theDefFace) ;
+  Standard_EXPORT     void AddInShape(const TopoDS_Face& theFace,const Standard_Real theDefFace,const TopTools_MutexForShapeProvider& theMutexProvider) ;
 
 Standard_Real myAngle;
 Standard_Boolean myWithShare;
diff --git a/inc/BRepMesh_GeomTool.hxx b/inc/BRepMesh_GeomTool.hxx
index 83ce571..8267bf1 100644
--- a/inc/BRepMesh_GeomTool.hxx
+++ b/inc/BRepMesh_GeomTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Dir;
 class BRepMesh_GeomTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_GeomTool(BRepAdaptor_Curve& C,const Standard_Real Ufirst,const Standard_Real Ulast,const Standard_Real AngDefl,const Standard_Real Deflection,const Standard_Integer nbpointsmin = 2);
diff --git a/inc/BRepMesh_HeapSortIndexedVertexOfDelaun.hxx b/inc/BRepMesh_HeapSortIndexedVertexOfDelaun.hxx
index 43b43a0..7ff339f 100644
--- a/inc/BRepMesh_HeapSortIndexedVertexOfDelaun.hxx
+++ b/inc/BRepMesh_HeapSortIndexedVertexOfDelaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class BRepMesh_ComparatorOfIndexedVertexOfDelaun;
 class BRepMesh_HeapSortIndexedVertexOfDelaun  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(TColStd_Array1OfInteger& TheArray,const BRepMesh_ComparatorOfIndexedVertexOfDelaun& Comp) ;
diff --git a/inc/BRepMesh_HeapSortVertexOfDelaun.hxx b/inc/BRepMesh_HeapSortVertexOfDelaun.hxx
index 5d28dbf..5606904 100644
--- a/inc/BRepMesh_HeapSortVertexOfDelaun.hxx
+++ b/inc/BRepMesh_HeapSortVertexOfDelaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@ class BRepMesh_ComparatorOfVertexOfDelaun;
 class BRepMesh_HeapSortVertexOfDelaun  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(BRepMesh_Array1OfVertexOfDelaun& TheArray,const BRepMesh_ComparatorOfVertexOfDelaun& Comp) ;
diff --git a/inc/BRepMesh_IDMapOfLinkOfDataStructureOfDelaun.hxx b/inc/BRepMesh_IDMapOfLinkOfDataStructureOfDelaun.hxx
index 21e0205..7ac95ed 100644
--- a/inc/BRepMesh_IDMapOfLinkOfDataStructureOfDelaun.hxx
+++ b/inc/BRepMesh_IDMapOfLinkOfDataStructureOfDelaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class BRepMesh_IndexedDataMapNodeOfIDMapOfLinkOfDataStructureOfDelaun;
 class BRepMesh_IDMapOfLinkOfDataStructureOfDelaun  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_IDMapOfLinkOfDataStructureOfDelaun(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMesh_IDMapOfNodeOfDataStructureOfDelaun.hxx b/inc/BRepMesh_IDMapOfNodeOfDataStructureOfDelaun.hxx
index 4ec41c1..0840b8a 100644
--- a/inc/BRepMesh_IDMapOfNodeOfDataStructureOfDelaun.hxx
+++ b/inc/BRepMesh_IDMapOfNodeOfDataStructureOfDelaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class BRepMesh_IndexedDataMapNodeOfIDMapOfNodeOfDataStructureOfDelaun;
 class BRepMesh_IDMapOfNodeOfDataStructureOfDelaun  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_IDMapOfNodeOfDataStructureOfDelaun(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMesh_IMapOfElementOfDataStructureOfDelaun.hxx b/inc/BRepMesh_IMapOfElementOfDataStructureOfDelaun.hxx
index afd339f..32af56e 100644
--- a/inc/BRepMesh_IMapOfElementOfDataStructureOfDelaun.hxx
+++ b/inc/BRepMesh_IMapOfElementOfDataStructureOfDelaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class BRepMesh_IndexedMapNodeOfIMapOfElementOfDataStructureOfDelaun;
 class BRepMesh_IMapOfElementOfDataStructureOfDelaun  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_IMapOfElementOfDataStructureOfDelaun(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMesh_IndexedMapOfVertex.hxx b/inc/BRepMesh_IndexedMapOfVertex.hxx
index 1d03dfb..2cd4a82 100644
--- a/inc/BRepMesh_IndexedMapOfVertex.hxx
+++ b/inc/BRepMesh_IndexedMapOfVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class BRepMesh_IndexedMapNodeOfIndexedMapOfVertex;
 class BRepMesh_IndexedMapOfVertex  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_IndexedMapOfVertex(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepMesh_LinkHasherOfDataStructureOfDelaun.hxx b/inc/BRepMesh_LinkHasherOfDataStructureOfDelaun.hxx
index 99cae24..25e5f63 100644
--- a/inc/BRepMesh_LinkHasherOfDataStructureOfDelaun.hxx
+++ b/inc/BRepMesh_LinkHasherOfDataStructureOfDelaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class BRepMesh_Edge;
 class BRepMesh_LinkHasherOfDataStructureOfDelaun  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const BRepMesh_Edge& K,const Standard_Integer Upper) ;
diff --git a/inc/BRepMesh_ListIteratorOfListOfVertex.hxx b/inc/BRepMesh_ListIteratorOfListOfVertex.hxx
index 8d1fceb..c501b3c 100644
--- a/inc/BRepMesh_ListIteratorOfListOfVertex.hxx
+++ b/inc/BRepMesh_ListIteratorOfListOfVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepMesh_ListNodeOfListOfVertex;
 class BRepMesh_ListIteratorOfListOfVertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_ListIteratorOfListOfVertex();
diff --git a/inc/BRepMesh_ListIteratorOfListOfXY.hxx b/inc/BRepMesh_ListIteratorOfListOfXY.hxx
index a2de2b2..0db1f93 100644
--- a/inc/BRepMesh_ListIteratorOfListOfXY.hxx
+++ b/inc/BRepMesh_ListIteratorOfListOfXY.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepMesh_ListNodeOfListOfXY;
 class BRepMesh_ListIteratorOfListOfXY  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_ListIteratorOfListOfXY();
diff --git a/inc/BRepMesh_ListOfVertex.hxx b/inc/BRepMesh_ListOfVertex.hxx
index 4b105d7..319ef8e 100644
--- a/inc/BRepMesh_ListOfVertex.hxx
+++ b/inc/BRepMesh_ListOfVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BRepMesh_ListNodeOfListOfVertex;
 class BRepMesh_ListOfVertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_ListOfVertex();
diff --git a/inc/BRepMesh_ListOfXY.hxx b/inc/BRepMesh_ListOfXY.hxx
index defc3dd..80267aa 100644
--- a/inc/BRepMesh_ListOfXY.hxx
+++ b/inc/BRepMesh_ListOfXY.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BRepMesh_ListNodeOfListOfXY;
 class BRepMesh_ListOfXY  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_ListOfXY();
diff --git a/inc/BRepMesh_NodeHasherOfDataStructureOfDelaun.hxx b/inc/BRepMesh_NodeHasherOfDataStructureOfDelaun.hxx
index 3294904..9a19210 100644
--- a/inc/BRepMesh_NodeHasherOfDataStructureOfDelaun.hxx
+++ b/inc/BRepMesh_NodeHasherOfDataStructureOfDelaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class BRepMesh_Vertex;
 class BRepMesh_NodeHasherOfDataStructureOfDelaun  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const BRepMesh_Vertex& K,const Standard_Integer Upper) ;
diff --git a/inc/BRepMesh_PairOfIndex.hxx b/inc/BRepMesh_PairOfIndex.hxx
index 362f035..df269e1 100644
--- a/inc/BRepMesh_PairOfIndex.hxx
+++ b/inc/BRepMesh_PairOfIndex.hxx
@@ -38,7 +38,7 @@ public:
   BRepMesh_PairOfIndex(const BRepMesh_PairOfIndex& theOther)
   {
     myIndx1 = theOther.myIndx1;
-    myIndx1 = theOther.myIndx2;
+    myIndx2 = theOther.myIndx2;
   }
 
   //! Clear indices
diff --git a/inc/BRepMesh_PairOfPolygon.hxx b/inc/BRepMesh_PairOfPolygon.hxx
index 6164e32..49b1451 100644
--- a/inc/BRepMesh_PairOfPolygon.hxx
+++ b/inc/BRepMesh_PairOfPolygon.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@ class Poly_PolygonOnTriangulation;
 class BRepMesh_PairOfPolygon  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create empty pair with null fileds <br>
   Standard_EXPORT   BRepMesh_PairOfPolygon();
diff --git a/inc/BRepMesh_SelectorOfDataStructureOfDelaun.hxx b/inc/BRepMesh_SelectorOfDataStructureOfDelaun.hxx
index 8495813..1513221 100644
--- a/inc/BRepMesh_SelectorOfDataStructureOfDelaun.hxx
+++ b/inc/BRepMesh_SelectorOfDataStructureOfDelaun.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepMesh_Triangle;
 class BRepMesh_SelectorOfDataStructureOfDelaun  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_SelectorOfDataStructureOfDelaun();
diff --git a/inc/BRepMesh_ShapeTool.hxx b/inc/BRepMesh_ShapeTool.hxx
index 649f0ef..36c38a1 100644
--- a/inc/BRepMesh_ShapeTool.hxx
+++ b/inc/BRepMesh_ShapeTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Poly_Triangulation;
 class BRepMesh_ShapeTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_ShapeTool();
diff --git a/inc/BRepMesh_Triangle.hxx b/inc/BRepMesh_Triangle.hxx
index 986d98b..9695a6c 100644
--- a/inc/BRepMesh_Triangle.hxx
+++ b/inc/BRepMesh_Triangle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class BRepMesh_Triangle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_Triangle();
diff --git a/inc/BRepMesh_Vertex.hxx b/inc/BRepMesh_Vertex.hxx
index b5aeec3..f123bcb 100644
--- a/inc/BRepMesh_Vertex.hxx
+++ b/inc/BRepMesh_Vertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,22 +38,7 @@ class gp_XY;
 class BRepMesh_Vertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_Vertex();
diff --git a/inc/BRepMesh_VertexHasher.hxx b/inc/BRepMesh_VertexHasher.hxx
index 679adc3..5a9ff66 100644
--- a/inc/BRepMesh_VertexHasher.hxx
+++ b/inc/BRepMesh_VertexHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class BRepMesh_Vertex;
 class BRepMesh_VertexHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const BRepMesh_Vertex& K,const Standard_Integer Upper) ;
diff --git a/inc/BRepMesh_VertexTool.hxx b/inc/BRepMesh_VertexTool.hxx
index 85f6e4a..806af44 100644
--- a/inc/BRepMesh_VertexTool.hxx
+++ b/inc/BRepMesh_VertexTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class gp_XY;
 class BRepMesh_VertexTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepMesh_VertexTool(const BRepMesh_BaseAllocator& theAlloc);
diff --git a/inc/BRepOffset.hxx b/inc/BRepOffset.hxx
index 7979034..544c2ef 100644
--- a/inc/BRepOffset.hxx
+++ b/inc/BRepOffset.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class BRepOffset_DataMapIteratorOfDataMapOfShapeMapOfShape;
 class BRepOffset  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Geom_Surface Surface(const Handle(Geom_Surface)& Surface,const Standard_Real Offset,BRepOffset_Status& Status) ;
diff --git a/inc/BRepOffsetAPI_DraftAngle.hxx b/inc/BRepOffsetAPI_DraftAngle.hxx
index 8a13e25..665fcaa 100644
--- a/inc/BRepOffsetAPI_DraftAngle.hxx
+++ b/inc/BRepOffsetAPI_DraftAngle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class TopTools_ListOfShape;
 class BRepOffsetAPI_DraftAngle  : public BRepBuilderAPI_ModifyShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty algorithm to perform <br>
 //! taper-adding transformations on faces of a shape. <br>
diff --git a/inc/BRepOffsetAPI_FindContigousEdges.hxx b/inc/BRepOffsetAPI_FindContigousEdges.hxx
index c7e7354..bdd9888 100644
--- a/inc/BRepOffsetAPI_FindContigousEdges.hxx
+++ b/inc/BRepOffsetAPI_FindContigousEdges.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TopTools_ListOfShape;
 class BRepOffsetAPI_FindContigousEdges  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes an algorithm for identifying contiguous edges <br>
 //! on shapes with tolerance as the tolerance of contiguity <br>
diff --git a/inc/BRepOffsetAPI_MakeDraft.hxx b/inc/BRepOffsetAPI_MakeDraft.hxx
index bf79610..2468c0b 100644
--- a/inc/BRepOffsetAPI_MakeDraft.hxx
+++ b/inc/BRepOffsetAPI_MakeDraft.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TopTools_ListOfShape;
 class BRepOffsetAPI_MakeDraft  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs the draft surface object defined by the shape <br>
 //! Shape, the direction Dir, and the angle Angle. <br>
diff --git a/inc/BRepOffsetAPI_MakeEvolved.hxx b/inc/BRepOffsetAPI_MakeEvolved.hxx
index 1046357..eaeb238 100644
--- a/inc/BRepOffsetAPI_MakeEvolved.hxx
+++ b/inc/BRepOffsetAPI_MakeEvolved.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -62,18 +65,7 @@ class TopoDS_Shape;
 class BRepOffsetAPI_MakeEvolved  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffsetAPI_MakeEvolved();
diff --git a/inc/BRepOffsetAPI_MakeFilling.hxx b/inc/BRepOffsetAPI_MakeFilling.hxx
index 8c3b83d..a6c4aef 100644
--- a/inc/BRepOffsetAPI_MakeFilling.hxx
+++ b/inc/BRepOffsetAPI_MakeFilling.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class TopoDS_Shape;
 class BRepOffsetAPI_MakeFilling  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a wire filling object defined by <br>
 //! - the energy minimizing criterion Degree <br>
diff --git a/inc/BRepOffsetAPI_MakeOffset.hxx b/inc/BRepOffsetAPI_MakeOffset.hxx
index 42316aa..62d7832 100644
--- a/inc/BRepOffsetAPI_MakeOffset.hxx
+++ b/inc/BRepOffsetAPI_MakeOffset.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,7 +37,7 @@
 #ifndef _Standard_Real_HeaderFile
 #include <Standard_Real.hxx>
 #endif
-class Standard_ConstructionError;
+class StdFail_NotDone;
 class TopoDS_Face;
 class TopoDS_Wire;
 class TopTools_ListOfShape;
@@ -50,18 +53,7 @@ class TopoDS_Shape;
 class BRepOffsetAPI_MakeOffset  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an algorithm for creating an empty offset <br>
   Standard_EXPORT   BRepOffsetAPI_MakeOffset();
@@ -83,7 +75,7 @@ public:
   //!  Computes a parallel to the spine at distance Offset and <br>
 //! at an altitude Alt from the plane of the spine in relation <br>
 //! to the normal to the spine. <br>
-//! Exceptions: Standard_ConstructionError if the offset is not built. <br>
+//! Exceptions: StdFail_NotDone if the offset is not built. <br>
   Standard_EXPORT     void Perform(const Standard_Real Offset,const Standard_Real Alt = 0.0) ;
   //! Builds the resulting shape (redefined from MakeShape). <br>
   Standard_EXPORT   virtual  void Build() ;
diff --git a/inc/BRepOffsetAPI_MakeOffsetShape.hxx b/inc/BRepOffsetAPI_MakeOffsetShape.hxx
index 346ff32..3890221 100644
--- a/inc/BRepOffsetAPI_MakeOffsetShape.hxx
+++ b/inc/BRepOffsetAPI_MakeOffsetShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopTools_ListOfShape;
 class BRepOffsetAPI_MakeOffsetShape  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffsetAPI_MakeOffsetShape();
diff --git a/inc/BRepOffsetAPI_MakePipe.hxx b/inc/BRepOffsetAPI_MakePipe.hxx
index a2d37f3..a225cef 100644
--- a/inc/BRepOffsetAPI_MakePipe.hxx
+++ b/inc/BRepOffsetAPI_MakePipe.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class BRepFill_Pipe;
 class BRepOffsetAPI_MakePipe  : public BRepPrimAPI_MakeSweep {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a pipe by sweeping the shape Profile along <br>
 //! the wire Spine.The angle made by the spine with the profile is <br>
diff --git a/inc/BRepOffsetAPI_MakePipeShell.hxx b/inc/BRepOffsetAPI_MakePipeShell.hxx
index f5e73de..42d98fe 100644
--- a/inc/BRepOffsetAPI_MakePipeShell.hxx
+++ b/inc/BRepOffsetAPI_MakePipeShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class TopTools_ListOfShape;
 class BRepOffsetAPI_MakePipeShell  : public BRepPrimAPI_MakeSweep {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs the shell-generating framework defined by the wire Spine. <br>//! Sets an sweep's mode <br>
 //!         If no mode are setted, the mode use in MakePipe is used <br>
diff --git a/inc/BRepOffsetAPI_MakeThickSolid.hxx b/inc/BRepOffsetAPI_MakeThickSolid.hxx
index 66952a2..462bb18 100644
--- a/inc/BRepOffsetAPI_MakeThickSolid.hxx
+++ b/inc/BRepOffsetAPI_MakeThickSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopTools_ListOfShape;
 class BRepOffsetAPI_MakeThickSolid  : public BRepOffsetAPI_MakeOffsetShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffsetAPI_MakeThickSolid();
diff --git a/inc/BRepOffsetAPI_MiddlePath.hxx b/inc/BRepOffsetAPI_MiddlePath.hxx
new file mode 100644
index 0000000..8574321
--- /dev/null
+++ b/inc/BRepOffsetAPI_MiddlePath.hxx
@@ -0,0 +1,87 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#ifndef _BRepOffsetAPI_MiddlePath_HeaderFile
+#define _BRepOffsetAPI_MiddlePath_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+#ifndef _TopoDS_Shape_HeaderFile
+#include <TopoDS_Shape.hxx>
+#endif
+#ifndef _TopoDS_Wire_HeaderFile
+#include <TopoDS_Wire.hxx>
+#endif
+#ifndef _Standard_Boolean_HeaderFile
+#include <Standard_Boolean.hxx>
+#endif
+#ifndef _TopTools_MapOfShape_HeaderFile
+#include <TopTools_MapOfShape.hxx>
+#endif
+#ifndef _BRepOffsetAPI_SequenceOfSequenceOfShape_HeaderFile
+#include <BRepOffsetAPI_SequenceOfSequenceOfShape.hxx>
+#endif
+#ifndef _BRepBuilderAPI_MakeShape_HeaderFile
+#include <BRepBuilderAPI_MakeShape.hxx>
+#endif
+class TopoDS_Shape;
+
+
+//! Describes functions to build a middle path of a <br>
+//!          pipe-like shape <br>
+class BRepOffsetAPI_MiddlePath  : public BRepBuilderAPI_MakeShape {
+public:
+
+  DEFINE_STANDARD_ALLOC
+
+  //! General constructor. <br>
+//!          StartShape and EndShape may be <br>
+//!          a wire or a face <br>
+  Standard_EXPORT   BRepOffsetAPI_MiddlePath(const TopoDS_Shape& aShape,const TopoDS_Shape& StartShape,const TopoDS_Shape& EndShape);
+  
+  Standard_EXPORT   virtual  void Build() ;
+
+
+
+
+
+protected:
+
+
+
+
+
+private:
+
+
+
+TopoDS_Shape myInitialShape;
+TopoDS_Wire myStartWire;
+TopoDS_Wire myEndWire;
+Standard_Boolean myClosedSection;
+Standard_Boolean myClosedRing;
+TopTools_MapOfShape myStartWireEdges;
+TopTools_MapOfShape myEndWireEdges;
+BRepOffsetAPI_SequenceOfSequenceOfShape myPaths;
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+
+
+#endif
diff --git a/inc/BRepOffsetAPI_NormalProjection.hxx b/inc/BRepOffsetAPI_NormalProjection.hxx
index 28da07f..afd5412 100644
--- a/inc/BRepOffsetAPI_NormalProjection.hxx
+++ b/inc/BRepOffsetAPI_NormalProjection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TopTools_ListOfShape;
 class BRepOffsetAPI_NormalProjection  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty framework to define projection on <br>
 //! a shape according to the normal from each point to be <br>
diff --git a/inc/BRepOffsetAPI_SequenceOfSequenceOfReal.hxx b/inc/BRepOffsetAPI_SequenceOfSequenceOfReal.hxx
index a7ee2dd..c72cc58 100644
--- a/inc/BRepOffsetAPI_SequenceOfSequenceOfReal.hxx
+++ b/inc/BRepOffsetAPI_SequenceOfSequenceOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BRepOffsetAPI_SequenceNodeOfSequenceOfSequenceOfReal;
 class BRepOffsetAPI_SequenceOfSequenceOfReal  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BRepOffsetAPI_SequenceOfSequenceOfReal();
diff --git a/inc/BRepOffsetAPI_SequenceOfSequenceOfShape.hxx b/inc/BRepOffsetAPI_SequenceOfSequenceOfShape.hxx
index 972f73b..0a4cc5d 100644
--- a/inc/BRepOffsetAPI_SequenceOfSequenceOfShape.hxx
+++ b/inc/BRepOffsetAPI_SequenceOfSequenceOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BRepOffsetAPI_SequenceNodeOfSequenceOfSequenceOfShape;
 class BRepOffsetAPI_SequenceOfSequenceOfShape  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BRepOffsetAPI_SequenceOfSequenceOfShape();
diff --git a/inc/BRepOffsetAPI_ThruSections.hxx b/inc/BRepOffsetAPI_ThruSections.hxx
index d0110f4..02540d3 100644
--- a/inc/BRepOffsetAPI_ThruSections.hxx
+++ b/inc/BRepOffsetAPI_ThruSections.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class TopTools_Array1OfShape;
 class BRepOffsetAPI_ThruSections  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes an algorithm for building a shell or a solid <br>
 //! passing through a set of sections, where: <br>
diff --git a/inc/BRepOffset_Analyse.hxx b/inc/BRepOffset_Analyse.hxx
index 1225a63..0be9272 100644
--- a/inc/BRepOffset_Analyse.hxx
+++ b/inc/BRepOffset_Analyse.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TopTools_MapOfShape;
 class BRepOffset_Analyse  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_Analyse();
diff --git a/inc/BRepOffset_DataMapIteratorOfDataMapOfShapeListOfInterval.hxx b/inc/BRepOffset_DataMapIteratorOfDataMapOfShapeListOfInterval.hxx
index 5fb663d..48ba22f 100644
--- a/inc/BRepOffset_DataMapIteratorOfDataMapOfShapeListOfInterval.hxx
+++ b/inc/BRepOffset_DataMapIteratorOfDataMapOfShapeListOfInterval.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BRepOffset_DataMapNodeOfDataMapOfShapeListOfInterval;
 class BRepOffset_DataMapIteratorOfDataMapOfShapeListOfInterval  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_DataMapIteratorOfDataMapOfShapeListOfInterval();
diff --git a/inc/BRepOffset_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx b/inc/BRepOffset_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx
index f451e08..8726ce5 100644
--- a/inc/BRepOffset_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx
+++ b/inc/BRepOffset_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BRepOffset_DataMapNodeOfDataMapOfShapeMapOfShape;
 class BRepOffset_DataMapIteratorOfDataMapOfShapeMapOfShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_DataMapIteratorOfDataMapOfShapeMapOfShape();
diff --git a/inc/BRepOffset_DataMapIteratorOfDataMapOfShapeOffset.hxx b/inc/BRepOffset_DataMapIteratorOfDataMapOfShapeOffset.hxx
index d8e1732..3812bc8 100644
--- a/inc/BRepOffset_DataMapIteratorOfDataMapOfShapeOffset.hxx
+++ b/inc/BRepOffset_DataMapIteratorOfDataMapOfShapeOffset.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BRepOffset_DataMapNodeOfDataMapOfShapeOffset;
 class BRepOffset_DataMapIteratorOfDataMapOfShapeOffset  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_DataMapIteratorOfDataMapOfShapeOffset();
diff --git a/inc/BRepOffset_DataMapOfShapeListOfInterval.hxx b/inc/BRepOffset_DataMapOfShapeListOfInterval.hxx
index a4f101b..4c96dcf 100644
--- a/inc/BRepOffset_DataMapOfShapeListOfInterval.hxx
+++ b/inc/BRepOffset_DataMapOfShapeListOfInterval.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepOffset_DataMapIteratorOfDataMapOfShapeListOfInterval;
 class BRepOffset_DataMapOfShapeListOfInterval  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_DataMapOfShapeListOfInterval(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepOffset_DataMapOfShapeMapOfShape.hxx b/inc/BRepOffset_DataMapOfShapeMapOfShape.hxx
index 6b92ff5..df649c3 100644
--- a/inc/BRepOffset_DataMapOfShapeMapOfShape.hxx
+++ b/inc/BRepOffset_DataMapOfShapeMapOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepOffset_DataMapIteratorOfDataMapOfShapeMapOfShape;
 class BRepOffset_DataMapOfShapeMapOfShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_DataMapOfShapeMapOfShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepOffset_DataMapOfShapeOffset.hxx b/inc/BRepOffset_DataMapOfShapeOffset.hxx
index 102c9d9..0394ad9 100644
--- a/inc/BRepOffset_DataMapOfShapeOffset.hxx
+++ b/inc/BRepOffset_DataMapOfShapeOffset.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepOffset_DataMapIteratorOfDataMapOfShapeOffset;
 class BRepOffset_DataMapOfShapeOffset  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_DataMapOfShapeOffset(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepOffset_Inter2d.hxx b/inc/BRepOffset_Inter2d.hxx
index fd3290a..53538a7 100644
--- a/inc/BRepOffset_Inter2d.hxx
+++ b/inc/BRepOffset_Inter2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopTools_DataMapOfShapeShape;
 class BRepOffset_Inter2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the intersections between the edges stored <br>
 //!          is AsDes as descendants of <F> . Intersections is computed <br>
diff --git a/inc/BRepOffset_Inter3d.hxx b/inc/BRepOffset_Inter3d.hxx
index ac3f851..5aa341a 100644
--- a/inc/BRepOffset_Inter3d.hxx
+++ b/inc/BRepOffset_Inter3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class TopTools_IndexedMapOfShape;
 class BRepOffset_Inter3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_Inter3d(const Handle(BRepAlgo_AsDes)& AsDes,const TopAbs_State Side,const Standard_Real Tol);
diff --git a/inc/BRepOffset_Interval.hxx b/inc/BRepOffset_Interval.hxx
index 8569c3a..e4e613c 100644
--- a/inc/BRepOffset_Interval.hxx
+++ b/inc/BRepOffset_Interval.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class BRepOffset_Interval  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_Interval();
diff --git a/inc/BRepOffset_ListIteratorOfListOfInterval.hxx b/inc/BRepOffset_ListIteratorOfListOfInterval.hxx
index 6e99b21..b9b26e2 100644
--- a/inc/BRepOffset_ListIteratorOfListOfInterval.hxx
+++ b/inc/BRepOffset_ListIteratorOfListOfInterval.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class BRepOffset_ListNodeOfListOfInterval;
 class BRepOffset_ListIteratorOfListOfInterval  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_ListIteratorOfListOfInterval();
diff --git a/inc/BRepOffset_ListOfInterval.hxx b/inc/BRepOffset_ListOfInterval.hxx
index f40e4ac..a0aec6d 100644
--- a/inc/BRepOffset_ListOfInterval.hxx
+++ b/inc/BRepOffset_ListOfInterval.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BRepOffset_ListNodeOfListOfInterval;
 class BRepOffset_ListOfInterval  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_ListOfInterval();
diff --git a/inc/BRepOffset_MakeLoops.hxx b/inc/BRepOffset_MakeLoops.hxx
index 44bed4a..e1b57d6 100644
--- a/inc/BRepOffset_MakeLoops.hxx
+++ b/inc/BRepOffset_MakeLoops.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BRepOffset_Analyse;
 class BRepOffset_MakeLoops  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_MakeLoops();
diff --git a/inc/BRepOffset_MakeOffset.hxx b/inc/BRepOffset_MakeOffset.hxx
index 04dc57e..ed2d2cd 100644
--- a/inc/BRepOffset_MakeOffset.hxx
+++ b/inc/BRepOffset_MakeOffset.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class BRepOffset_DataMapOfShapeOffset;
 class BRepOffset_MakeOffset  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_MakeOffset();
diff --git a/inc/BRepOffset_Offset.hxx b/inc/BRepOffset_Offset.hxx
index 4b67c31..1e6b20a 100644
--- a/inc/BRepOffset_Offset.hxx
+++ b/inc/BRepOffset_Offset.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TopoDS_Shape;
 class BRepOffset_Offset  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepOffset_Offset();
diff --git a/inc/BRepOffset_Tool.hxx b/inc/BRepOffset_Tool.hxx
index afbcdfe..c272fb6 100644
--- a/inc/BRepOffset_Tool.hxx
+++ b/inc/BRepOffset_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class Geom_Curve;
 class BRepOffset_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! <V1> is the FirstVertex ,<V2> is the Last Vertex of <Edge> <br>
 //!          taking account the orientation of Edge. <br>
diff --git a/inc/BRepPrimAPI_MakeBox.hxx b/inc/BRepPrimAPI_MakeBox.hxx
index 2df1fe4..bc9ff23 100644
--- a/inc/BRepPrimAPI_MakeBox.hxx
+++ b/inc/BRepPrimAPI_MakeBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopoDS_Face;
 class BRepPrimAPI_MakeBox  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a box with a corner at 0,0,0 and the other dx,dy,dz <br>
   Standard_EXPORT   BRepPrimAPI_MakeBox(const Standard_Real dx,const Standard_Real dy,const Standard_Real dz);
diff --git a/inc/BRepPrimAPI_MakeCone.hxx b/inc/BRepPrimAPI_MakeCone.hxx
index 9dbb866..53dcbd0 100644
--- a/inc/BRepPrimAPI_MakeCone.hxx
+++ b/inc/BRepPrimAPI_MakeCone.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class BRepPrim_Cone;
 class BRepPrimAPI_MakeCone  : public BRepPrimAPI_MakeOneAxis {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a cone of height H radius R1 in the plane z = <br>
 //!          0, R2 in the plane Z = H. R1 and R2 may be null. <br>
diff --git a/inc/BRepPrimAPI_MakeCylinder.hxx b/inc/BRepPrimAPI_MakeCylinder.hxx
index f8ac559..99eb3f2 100644
--- a/inc/BRepPrimAPI_MakeCylinder.hxx
+++ b/inc/BRepPrimAPI_MakeCylinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class BRepPrim_Cylinder;
 class BRepPrimAPI_MakeCylinder  : public BRepPrimAPI_MakeOneAxis {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a cylinder of radius R and length H. <br>
   Standard_EXPORT   BRepPrimAPI_MakeCylinder(const Standard_Real R,const Standard_Real H);
diff --git a/inc/BRepPrimAPI_MakeHalfSpace.hxx b/inc/BRepPrimAPI_MakeHalfSpace.hxx
index b5d4280..1b26efa 100644
--- a/inc/BRepPrimAPI_MakeHalfSpace.hxx
+++ b/inc/BRepPrimAPI_MakeHalfSpace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TopoDS_Solid;
 class BRepPrimAPI_MakeHalfSpace  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a HalfSpace defined with a Face and a Point. <br>
   Standard_EXPORT   BRepPrimAPI_MakeHalfSpace(const TopoDS_Face& Face,const gp_Pnt& RefPnt);
diff --git a/inc/BRepPrimAPI_MakeOneAxis.hxx b/inc/BRepPrimAPI_MakeOneAxis.hxx
index fdb2829..cd7632b 100644
--- a/inc/BRepPrimAPI_MakeOneAxis.hxx
+++ b/inc/BRepPrimAPI_MakeOneAxis.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopoDS_Solid;
 class BRepPrimAPI_MakeOneAxis  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! The inherited commands should provide the algorithm. <br>
 //!          Returned as a pointer. <br>
diff --git a/inc/BRepPrimAPI_MakePrism.hxx b/inc/BRepPrimAPI_MakePrism.hxx
index 24b54b9..8ac9804 100644
--- a/inc/BRepPrimAPI_MakePrism.hxx
+++ b/inc/BRepPrimAPI_MakePrism.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TopTools_ListOfShape;
 class BRepPrimAPI_MakePrism  : public BRepPrimAPI_MakeSweep {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Builds the prism of base S and vector V. If C is true, <br>
 //!          S is copied. If Canonize is true then generated surfaces <br>
diff --git a/inc/BRepPrimAPI_MakeRevol.hxx b/inc/BRepPrimAPI_MakeRevol.hxx
index 8144ba1..632ba60 100644
--- a/inc/BRepPrimAPI_MakeRevol.hxx
+++ b/inc/BRepPrimAPI_MakeRevol.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -70,18 +73,7 @@ class TopTools_ListOfShape;
 class BRepPrimAPI_MakeRevol  : public BRepPrimAPI_MakeSweep {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Builds the Revol of base S, axis  A and angle  D. If C <br>
 //!          is true, S is copied. <br>
diff --git a/inc/BRepPrimAPI_MakeRevolution.hxx b/inc/BRepPrimAPI_MakeRevolution.hxx
index 6be600e..f7edea4 100644
--- a/inc/BRepPrimAPI_MakeRevolution.hxx
+++ b/inc/BRepPrimAPI_MakeRevolution.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class BRepPrim_Revolution;
 class BRepPrimAPI_MakeRevolution  : public BRepPrimAPI_MakeOneAxis {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a revolution body by rotating a curve around Z. <br>
   Standard_EXPORT   BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)& Meridian);
diff --git a/inc/BRepPrimAPI_MakeSphere.hxx b/inc/BRepPrimAPI_MakeSphere.hxx
index d03114e..34f195e 100644
--- a/inc/BRepPrimAPI_MakeSphere.hxx
+++ b/inc/BRepPrimAPI_MakeSphere.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class BRepPrim_Sphere;
 class BRepPrimAPI_MakeSphere  : public BRepPrimAPI_MakeOneAxis {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a sphere of radius R. <br>
   Standard_EXPORT   BRepPrimAPI_MakeSphere(const Standard_Real R);
diff --git a/inc/BRepPrimAPI_MakeSweep.hxx b/inc/BRepPrimAPI_MakeSweep.hxx
index c406642..cb74a7e 100644
--- a/inc/BRepPrimAPI_MakeSweep.hxx
+++ b/inc/BRepPrimAPI_MakeSweep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopoDS_Shape;
 class BRepPrimAPI_MakeSweep  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the  TopoDS  Shape of the bottom of the sweep. <br>
   Standard_EXPORT   virtual  TopoDS_Shape FirstShape()  = 0;
diff --git a/inc/BRepPrimAPI_MakeTorus.hxx b/inc/BRepPrimAPI_MakeTorus.hxx
index 8208646..62861fa 100644
--- a/inc/BRepPrimAPI_MakeTorus.hxx
+++ b/inc/BRepPrimAPI_MakeTorus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class BRepPrim_Torus;
 class BRepPrimAPI_MakeTorus  : public BRepPrimAPI_MakeOneAxis {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a torus of radii R1 R2. <br>
   Standard_EXPORT   BRepPrimAPI_MakeTorus(const Standard_Real R1,const Standard_Real R2);
diff --git a/inc/BRepPrimAPI_MakeWedge.hxx b/inc/BRepPrimAPI_MakeWedge.hxx
index 724766b..e3a1032 100644
--- a/inc/BRepPrimAPI_MakeWedge.hxx
+++ b/inc/BRepPrimAPI_MakeWedge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopoDS_Solid;
 class BRepPrimAPI_MakeWedge  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a STEP right angular wedge. (ltx >= 0) <br>
   Standard_EXPORT   BRepPrimAPI_MakeWedge(const Standard_Real dx,const Standard_Real dy,const Standard_Real dz,const Standard_Real ltx);
diff --git a/inc/BRepPrim_Builder.hxx b/inc/BRepPrim_Builder.hxx
index e67a2c6..85bac35 100644
--- a/inc/BRepPrim_Builder.hxx
+++ b/inc/BRepPrim_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class gp_Pnt;
 class BRepPrim_Builder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty, useless  Builder. Necesseray for <br>
 //!          compilation. <br>
diff --git a/inc/BRepPrim_Cone.hxx b/inc/BRepPrim_Cone.hxx
index 97d35b2..fd32f7c 100644
--- a/inc/BRepPrim_Cone.hxx
+++ b/inc/BRepPrim_Cone.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Face;
 class BRepPrim_Cone  : public BRepPrim_Revolution {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! the STEP definition <br>
 //!          Angle = semi-angle of the cone <br>
diff --git a/inc/BRepPrim_Cylinder.hxx b/inc/BRepPrim_Cylinder.hxx
index 5bb8e13..bf349a2 100644
--- a/inc/BRepPrim_Cylinder.hxx
+++ b/inc/BRepPrim_Cylinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Face;
 class BRepPrim_Cylinder  : public BRepPrim_Revolution {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! the STEP definition <br>
 //!          Position : center of a Face and Axis <br>
diff --git a/inc/BRepPrim_FaceBuilder.hxx b/inc/BRepPrim_FaceBuilder.hxx
index 1c4f8b6..c74d017 100644
--- a/inc/BRepPrim_FaceBuilder.hxx
+++ b/inc/BRepPrim_FaceBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class TopoDS_Vertex;
 class BRepPrim_FaceBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepPrim_FaceBuilder();
diff --git a/inc/BRepPrim_GWedge.hxx b/inc/BRepPrim_GWedge.hxx
index b9fd2fe..8a9f292 100644
--- a/inc/BRepPrim_GWedge.hxx
+++ b/inc/BRepPrim_GWedge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class gp_Pnt;
 class BRepPrim_GWedge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepPrim_GWedge(const BRepPrim_Builder& B,const gp_Ax2& Axes,const Standard_Real dx,const Standard_Real dy,const Standard_Real dz);
diff --git a/inc/BRepPrim_Revolution.hxx b/inc/BRepPrim_Revolution.hxx
index 9dc5cab..63f79bb 100644
--- a/inc/BRepPrim_Revolution.hxx
+++ b/inc/BRepPrim_Revolution.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class gp_Pnt2d;
 class BRepPrim_Revolution  : public BRepPrim_OneAxis {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a  revolution body <M>  is the  meridian nd <br>
 //!          must   be in the XZ  plane   of <A>. <PM>  is  the <br>
diff --git a/inc/BRepPrim_Sphere.hxx b/inc/BRepPrim_Sphere.hxx
index eec701a..5cb8e46 100644
--- a/inc/BRepPrim_Sphere.hxx
+++ b/inc/BRepPrim_Sphere.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Face;
 class BRepPrim_Sphere  : public BRepPrim_Revolution {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Sphere at  origin with  Radius. The axes <br>
 //!          of the sphere are the  reference axes. An error is <br>
diff --git a/inc/BRepPrim_Torus.hxx b/inc/BRepPrim_Torus.hxx
index 17a7519..c2e4531 100644
--- a/inc/BRepPrim_Torus.hxx
+++ b/inc/BRepPrim_Torus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Face;
 class BRepPrim_Torus  : public BRepPrim_Revolution {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! the STEP definition <br>
 //!          Position : center and axes <br>
diff --git a/inc/BRepPrim_Wedge.hxx b/inc/BRepPrim_Wedge.hxx
index ced6e2d..37ddbaf 100644
--- a/inc/BRepPrim_Wedge.hxx
+++ b/inc/BRepPrim_Wedge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class gp_Ax2;
 class BRepPrim_Wedge  : public BRepPrim_GWedge {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a  Wedge  algorithm.   <Axes> is  the axis <br>
 //!          system for the primitive. <br>
diff --git a/inc/BRepProj_Projection.hxx b/inc/BRepProj_Projection.hxx
index 11ec31f..421eafc 100644
--- a/inc/BRepProj_Projection.hxx
+++ b/inc/BRepProj_Projection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Pnt;
 class BRepProj_Projection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Makes a Cylindrical projection of Wire om Shape <br>
   Standard_EXPORT   BRepProj_Projection(const TopoDS_Shape& Wire,const TopoDS_Shape& Shape,const gp_Dir& D);
diff --git a/inc/BRepSweep_Array2OfShapesOfNumLinearRegularSweep.hxx b/inc/BRepSweep_Array2OfShapesOfNumLinearRegularSweep.hxx
index 6f36ad5..b026e19 100644
--- a/inc/BRepSweep_Array2OfShapesOfNumLinearRegularSweep.hxx
+++ b/inc/BRepSweep_Array2OfShapesOfNumLinearRegularSweep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopoDS_Shape;
 class BRepSweep_Array2OfShapesOfNumLinearRegularSweep  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepSweep_Array2OfShapesOfNumLinearRegularSweep(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/BRepSweep_Builder.hxx b/inc/BRepSweep_Builder.hxx
index 88245e0..24b2be7 100644
--- a/inc/BRepSweep_Builder.hxx
+++ b/inc/BRepSweep_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class TopoDS_Shape;
 class BRepSweep_Builder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Builder. <br>
   Standard_EXPORT   BRepSweep_Builder(const BRep_Builder& aBuilder);
diff --git a/inc/BRepSweep_Iterator.hxx b/inc/BRepSweep_Iterator.hxx
index 5c3ea4d..c6f6ce5 100644
--- a/inc/BRepSweep_Iterator.hxx
+++ b/inc/BRepSweep_Iterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopoDS_Shape;
 class BRepSweep_Iterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepSweep_Iterator();
diff --git a/inc/BRepSweep_Prism.hxx b/inc/BRepSweep_Prism.hxx
index 24d6c9c..84ed409 100644
--- a/inc/BRepSweep_Prism.hxx
+++ b/inc/BRepSweep_Prism.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TopLoc_Location;
 class BRepSweep_Prism  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Builds the prism of base S and vector V. If C is true, <br>
 //!          S is copied. If Canonize is true then generated surfaces <br>
diff --git a/inc/BRepSweep_Revol.hxx b/inc/BRepSweep_Revol.hxx
index 1047b97..a3db996 100644
--- a/inc/BRepSweep_Revol.hxx
+++ b/inc/BRepSweep_Revol.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TopLoc_Location;
 class BRepSweep_Revol  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Builds the Revol of meridian S axis A  and angle D. If <br>
 //!          C is true S is copied. <br>
diff --git a/inc/BRepSweep_Rotation.hxx b/inc/BRepSweep_Rotation.hxx
index 46f974c..f1f27be 100644
--- a/inc/BRepSweep_Rotation.hxx
+++ b/inc/BRepSweep_Rotation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Ax1;
 class BRepSweep_Rotation  : public BRepSweep_Trsf {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a topology  by rotating <S>  around A with the <br>
 //!          angle D. <br>
diff --git a/inc/BRepSweep_SequenceOfShapesOfNumLinearRegularSweep.hxx b/inc/BRepSweep_SequenceOfShapesOfNumLinearRegularSweep.hxx
index e802c9b..e3038b3 100644
--- a/inc/BRepSweep_SequenceOfShapesOfNumLinearRegularSweep.hxx
+++ b/inc/BRepSweep_SequenceOfShapesOfNumLinearRegularSweep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BRepSweep_SequenceNodeOfSequenceOfShapesOfNumLinearRegularSweep;
 class BRepSweep_SequenceOfShapesOfNumLinearRegularSweep  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       BRepSweep_SequenceOfShapesOfNumLinearRegularSweep();
diff --git a/inc/BRepSweep_Tool.hxx b/inc/BRepSweep_Tool.hxx
index 77532fa..09e21f8 100644
--- a/inc/BRepSweep_Tool.hxx
+++ b/inc/BRepSweep_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopoDS_Shape;
 class BRepSweep_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initialize the tool  with <aShape>.  The IndexTool <br>
 //!          must prepare an indexation for  all  the subshapes <br>
diff --git a/inc/BRepSweep_Translation.hxx b/inc/BRepSweep_Translation.hxx
index df1c9ed..2691d90 100644
--- a/inc/BRepSweep_Translation.hxx
+++ b/inc/BRepSweep_Translation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class gp_Vec;
 class BRepSweep_Translation  : public BRepSweep_Trsf {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates  a  topology by  translating <S>  with the <br>
 //!          vector  <V>. If  C  is   true S Sucomponents   are <br>
diff --git a/inc/BRepSweep_Trsf.hxx b/inc/BRepSweep_Trsf.hxx
index f5f26b7..c292012 100644
--- a/inc/BRepSweep_Trsf.hxx
+++ b/inc/BRepSweep_Trsf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class TopLoc_Location;
 class BRepSweep_Trsf  : public BRepSweep_NumLinearRegularSweep {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/BRepTest.hxx b/inc/BRepTest.hxx
index 7f90c3e..fd9d66d 100644
--- a/inc/BRepTest.hxx
+++ b/inc/BRepTest.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -21,18 +24,7 @@ class Draw_Interpretor;
 class BRepTest  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines all the topology commands. <br>
   Standard_EXPORT   static  void AllCommands(Draw_Interpretor& DI) ;
diff --git a/inc/BRepToIGESBRep_Entity.hxx b/inc/BRepToIGESBRep_Entity.hxx
index 3a93dfb..3ae3a76 100644
--- a/inc/BRepToIGESBRep_Entity.hxx
+++ b/inc/BRepToIGESBRep_Entity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -71,18 +74,7 @@ class TopoDS_Compound;
 class BRepToIGESBRep_Entity  : public BRepToIGES_BREntity {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a tool Entity <br>
   Standard_EXPORT   BRepToIGESBRep_Entity();
diff --git a/inc/BRepToIGES_BREntity.hxx b/inc/BRepToIGES_BREntity.hxx
index 977a61a..7a3ae54 100644
--- a/inc/BRepToIGES_BREntity.hxx
+++ b/inc/BRepToIGES_BREntity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class Standard_Transient;
 class BRepToIGES_BREntity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a tool BREntity <br>
   Standard_EXPORT   BRepToIGES_BREntity();
diff --git a/inc/BRepToIGES_BRShell.hxx b/inc/BRepToIGES_BRShell.hxx
index 4102cd4..8dde5ac 100644
--- a/inc/BRepToIGES_BRShell.hxx
+++ b/inc/BRepToIGES_BRShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TopoDS_Face;
 class BRepToIGES_BRShell  : public BRepToIGES_BREntity {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepToIGES_BRShell();
diff --git a/inc/BRepToIGES_BRSolid.hxx b/inc/BRepToIGES_BRSolid.hxx
index 16f84fb..9a2ea97 100644
--- a/inc/BRepToIGES_BRSolid.hxx
+++ b/inc/BRepToIGES_BRSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopoDS_Compound;
 class BRepToIGES_BRSolid  : public BRepToIGES_BREntity {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepToIGES_BRSolid();
diff --git a/inc/BRepToIGES_BRWire.hxx b/inc/BRepToIGES_BRWire.hxx
index 9d1cf84..b561440 100644
--- a/inc/BRepToIGES_BRWire.hxx
+++ b/inc/BRepToIGES_BRWire.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class TopoDS_Wire;
 class BRepToIGES_BRWire  : public BRepToIGES_BREntity {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepToIGES_BRWire();
diff --git a/inc/BRepTools.hxx b/inc/BRepTools.hxx
index 7c77a67..21eb3d9 100644
--- a/inc/BRepTools.hxx
+++ b/inc/BRepTools.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -98,18 +101,7 @@ class BRepTools_DataMapIteratorOfMapOfVertexPnt2d;
 class BRepTools  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns in UMin,  UMax, VMin,  VMax  the  bounding <br>
 //!          values in the parametric space of F. <br>
diff --git a/inc/BRepTools_DataMapIteratorOfMapOfVertexPnt2d.hxx b/inc/BRepTools_DataMapIteratorOfMapOfVertexPnt2d.hxx
index efe8f78..6e466bb 100644
--- a/inc/BRepTools_DataMapIteratorOfMapOfVertexPnt2d.hxx
+++ b/inc/BRepTools_DataMapIteratorOfMapOfVertexPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BRepTools_DataMapNodeOfMapOfVertexPnt2d;
 class BRepTools_DataMapIteratorOfMapOfVertexPnt2d  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepTools_DataMapIteratorOfMapOfVertexPnt2d();
diff --git a/inc/BRepTools_MapOfVertexPnt2d.hxx b/inc/BRepTools_MapOfVertexPnt2d.hxx
index fbcb7cf..399daa0 100644
--- a/inc/BRepTools_MapOfVertexPnt2d.hxx
+++ b/inc/BRepTools_MapOfVertexPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepTools_DataMapIteratorOfMapOfVertexPnt2d;
 class BRepTools_MapOfVertexPnt2d  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepTools_MapOfVertexPnt2d(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepTools_Modifier.hxx b/inc/BRepTools_Modifier.hxx
index 839e145..ac95cc2 100644
--- a/inc/BRepTools_Modifier.hxx
+++ b/inc/BRepTools_Modifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BRepTools_Modification;
 class BRepTools_Modifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty Modifier. <br>
   Standard_EXPORT   BRepTools_Modifier();
diff --git a/inc/BRepTools_Quilt.hxx b/inc/BRepTools_Quilt.hxx
index f7c71ba..8fe90ed 100644
--- a/inc/BRepTools_Quilt.hxx
+++ b/inc/BRepTools_Quilt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class TopoDS_Shape;
 class BRepTools_Quilt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepTools_Quilt();
diff --git a/inc/BRepTools_ShapeSet.hxx b/inc/BRepTools_ShapeSet.hxx
index 9fe53c0..b6c03e0 100644
--- a/inc/BRepTools_ShapeSet.hxx
+++ b/inc/BRepTools_ShapeSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class TopoDS_Shape;
 class BRepTools_ShapeSet  : public TopTools_ShapeSet {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Builds an empty ShapeSet. <br>
 //!          Parameter <isWithTriangles> is added for XML Persistence <br>
diff --git a/inc/BRepTools_Substitution.hxx b/inc/BRepTools_Substitution.hxx
index 53b9067..3cae92a 100644
--- a/inc/BRepTools_Substitution.hxx
+++ b/inc/BRepTools_Substitution.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TopTools_ListOfShape;
 class BRepTools_Substitution  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepTools_Substitution();
diff --git a/inc/BRepTools_WireExplorer.hxx b/inc/BRepTools_WireExplorer.hxx
index f8de14d..7107eac 100644
--- a/inc/BRepTools_WireExplorer.hxx
+++ b/inc/BRepTools_WireExplorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class TopoDS_Vertex;
 class BRepTools_WireExplorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty explorer (which can be initialized using Init) <br>
   Standard_EXPORT   BRepTools_WireExplorer();
diff --git a/inc/BRepTopAdaptor_DataMapIteratorOfMapOfShapeTool.hxx b/inc/BRepTopAdaptor_DataMapIteratorOfMapOfShapeTool.hxx
index 85a4543..b95f79e 100644
--- a/inc/BRepTopAdaptor_DataMapIteratorOfMapOfShapeTool.hxx
+++ b/inc/BRepTopAdaptor_DataMapIteratorOfMapOfShapeTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BRepTopAdaptor_DataMapNodeOfMapOfShapeTool;
 class BRepTopAdaptor_DataMapIteratorOfMapOfShapeTool  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepTopAdaptor_DataMapIteratorOfMapOfShapeTool();
diff --git a/inc/BRepTopAdaptor_FClass2d.hxx b/inc/BRepTopAdaptor_FClass2d.hxx
index e6b38ac..09bf036 100644
--- a/inc/BRepTopAdaptor_FClass2d.hxx
+++ b/inc/BRepTopAdaptor_FClass2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Pnt2d;
 class BRepTopAdaptor_FClass2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepTopAdaptor_FClass2d(const TopoDS_Face& F,const Standard_Real Tol);
diff --git a/inc/BRepTopAdaptor_MapOfShapeTool.hxx b/inc/BRepTopAdaptor_MapOfShapeTool.hxx
index f7faeac..2d58ecd 100644
--- a/inc/BRepTopAdaptor_MapOfShapeTool.hxx
+++ b/inc/BRepTopAdaptor_MapOfShapeTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepTopAdaptor_DataMapIteratorOfMapOfShapeTool;
 class BRepTopAdaptor_MapOfShapeTool  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepTopAdaptor_MapOfShapeTool(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BRepTopAdaptor_Tool.hxx b/inc/BRepTopAdaptor_Tool.hxx
index 46e1959..8defb55 100644
--- a/inc/BRepTopAdaptor_Tool.hxx
+++ b/inc/BRepTopAdaptor_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TopoDS_Face;
 class BRepTopAdaptor_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRepTopAdaptor_Tool();
diff --git a/inc/BRep_Builder.hxx b/inc/BRep_Builder.hxx
index c4f09f0..9321206 100644
--- a/inc/BRep_Builder.hxx
+++ b/inc/BRep_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -81,18 +84,7 @@ class gp_Pnt;
 class BRep_Builder  : public TopoDS_Builder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Makes an undefined Face. <br>
         void MakeFace(TopoDS_Face& F) const;
diff --git a/inc/BRep_ListIteratorOfListOfCurveRepresentation.hxx b/inc/BRep_ListIteratorOfListOfCurveRepresentation.hxx
index 1dd49eb..dbb6545 100644
--- a/inc/BRep_ListIteratorOfListOfCurveRepresentation.hxx
+++ b/inc/BRep_ListIteratorOfListOfCurveRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class BRep_ListNodeOfListOfCurveRepresentation;
 class BRep_ListIteratorOfListOfCurveRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRep_ListIteratorOfListOfCurveRepresentation();
diff --git a/inc/BRep_ListIteratorOfListOfPointRepresentation.hxx b/inc/BRep_ListIteratorOfListOfPointRepresentation.hxx
index 2970e21..1f7c0ae 100644
--- a/inc/BRep_ListIteratorOfListOfPointRepresentation.hxx
+++ b/inc/BRep_ListIteratorOfListOfPointRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class BRep_ListNodeOfListOfPointRepresentation;
 class BRep_ListIteratorOfListOfPointRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRep_ListIteratorOfListOfPointRepresentation();
diff --git a/inc/BRep_ListOfCurveRepresentation.hxx b/inc/BRep_ListOfCurveRepresentation.hxx
index 48cd95e..bff3ad9 100644
--- a/inc/BRep_ListOfCurveRepresentation.hxx
+++ b/inc/BRep_ListOfCurveRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class BRep_ListNodeOfListOfCurveRepresentation;
 class BRep_ListOfCurveRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRep_ListOfCurveRepresentation();
diff --git a/inc/BRep_ListOfPointRepresentation.hxx b/inc/BRep_ListOfPointRepresentation.hxx
index 81ec2b8..2832809 100644
--- a/inc/BRep_ListOfPointRepresentation.hxx
+++ b/inc/BRep_ListOfPointRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class BRep_ListNodeOfListOfPointRepresentation;
 class BRep_ListOfPointRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BRep_ListOfPointRepresentation();
diff --git a/inc/BRep_Tool.hxx b/inc/BRep_Tool.hxx
index cda3b5b..39729ec 100644
--- a/inc/BRep_Tool.hxx
+++ b/inc/BRep_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class TopoDS_Vertex;
 class BRep_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns <True>  if S if flaged Closed, if S is a <br>
 //!          Solid,Shell or Compound  returns <True> is S has no free boundaries. <br>
diff --git a/inc/BSplCLib.hxx b/inc/BSplCLib.hxx
index 98192ad..e775c25 100644
--- a/inc/BSplCLib.hxx
+++ b/inc/BSplCLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -103,18 +106,7 @@ class TColStd_HArray1OfInteger;
 class BSplCLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  This routine searches the position of the real <br>
 //!         value X in  the ordered set of  real  values XX. <br>
diff --git a/inc/BSplSLib.hxx b/inc/BSplSLib.hxx
index 1141864..1d6c8fd 100644
--- a/inc/BSplSLib.hxx
+++ b/inc/BSplSLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class TColgp_Array1OfPnt;
 class BSplSLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes  the     derivatives   of  a    ratio  of <br>
 //!          two-variables functions  x(u,v) / w(u,v) at orders <br>
diff --git a/inc/BiTgte_Blend.hxx b/inc/BiTgte_Blend.hxx
index 711e2aa..71282d3 100644
--- a/inc/BiTgte_Blend.hxx
+++ b/inc/BiTgte_Blend.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -87,18 +90,7 @@ class BRepOffset_Inter3d;
 class BiTgte_Blend  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BiTgte_Blend();
diff --git a/inc/BiTgte_CurveOnEdge.hxx b/inc/BiTgte_CurveOnEdge.hxx
index 19632b7..62a5282 100644
--- a/inc/BiTgte_CurveOnEdge.hxx
+++ b/inc/BiTgte_CurveOnEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -71,18 +74,7 @@ class Geom_BSplineCurve;
 class BiTgte_CurveOnEdge  : public Adaptor3d_Curve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BiTgte_CurveOnEdge();
diff --git a/inc/BiTgte_CurveOnVertex.hxx b/inc/BiTgte_CurveOnVertex.hxx
index efc1766..f781aae 100644
--- a/inc/BiTgte_CurveOnVertex.hxx
+++ b/inc/BiTgte_CurveOnVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class Geom_BSplineCurve;
 class BiTgte_CurveOnVertex  : public Adaptor3d_Curve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BiTgte_CurveOnVertex();
diff --git a/inc/BiTgte_DataMapIteratorOfDataMapOfShapeBox.hxx b/inc/BiTgte_DataMapIteratorOfDataMapOfShapeBox.hxx
index 41abb43..51bb629 100644
--- a/inc/BiTgte_DataMapIteratorOfDataMapOfShapeBox.hxx
+++ b/inc/BiTgte_DataMapIteratorOfDataMapOfShapeBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class BiTgte_DataMapNodeOfDataMapOfShapeBox;
 class BiTgte_DataMapIteratorOfDataMapOfShapeBox  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BiTgte_DataMapIteratorOfDataMapOfShapeBox();
diff --git a/inc/BiTgte_DataMapOfShapeBox.hxx b/inc/BiTgte_DataMapOfShapeBox.hxx
index e9e372c..0081a47 100644
--- a/inc/BiTgte_DataMapOfShapeBox.hxx
+++ b/inc/BiTgte_DataMapOfShapeBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BiTgte_DataMapIteratorOfDataMapOfShapeBox;
 class BiTgte_DataMapOfShapeBox  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BiTgte_DataMapOfShapeBox(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BinDrivers.hxx b/inc/BinDrivers.hxx
index 41ce33b..680317a 100644
--- a/inc/BinDrivers.hxx
+++ b/inc/BinDrivers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BinDrivers_DocumentRetrievalDriver;
 class BinDrivers  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Standard_Transient Factory(const Standard_GUID& theGUID) ;
diff --git a/inc/BinLDrivers.hxx b/inc/BinLDrivers.hxx
index f18707a..4a64235 100644
--- a/inc/BinLDrivers.hxx
+++ b/inc/BinLDrivers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class BinLDrivers_DocumentSection;
 class BinLDrivers  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Standard_Transient Factory(const Standard_GUID& theGUID) ;
diff --git a/inc/BinLDrivers_DocumentSection.hxx b/inc/BinLDrivers_DocumentSection.hxx
index 11bff02..b754882 100644
--- a/inc/BinLDrivers_DocumentSection.hxx
+++ b/inc/BinLDrivers_DocumentSection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,22 +40,7 @@ class TCollection_AsciiString;
 class BinLDrivers_DocumentSection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void * )
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   BinLDrivers_DocumentSection();
diff --git a/inc/BinMDF.hxx b/inc/BinMDF.hxx
index 4b393ac..a53478a 100644
--- a/inc/BinMDF.hxx
+++ b/inc/BinMDF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class BinMDF_DoubleMapIteratorOfTypeIdMap;
 class BinMDF  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute storage drivers to <aDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(BinMDF_ADriverTable)& aDriverTable,const Handle(CDM_MessageDriver)& aMsgDrv) ;
diff --git a/inc/BinMDF_DataMapIteratorOfTypeADriverMap.hxx b/inc/BinMDF_DataMapIteratorOfTypeADriverMap.hxx
index 5ead577..7f429ef 100644
--- a/inc/BinMDF_DataMapIteratorOfTypeADriverMap.hxx
+++ b/inc/BinMDF_DataMapIteratorOfTypeADriverMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class BinMDF_DataMapNodeOfTypeADriverMap;
 class BinMDF_DataMapIteratorOfTypeADriverMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BinMDF_DataMapIteratorOfTypeADriverMap();
diff --git a/inc/BinMDF_DoubleMapIteratorOfTypeIdMap.hxx b/inc/BinMDF_DoubleMapIteratorOfTypeIdMap.hxx
index b1a8776..b86b436 100644
--- a/inc/BinMDF_DoubleMapIteratorOfTypeIdMap.hxx
+++ b/inc/BinMDF_DoubleMapIteratorOfTypeIdMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class BinMDF_DoubleMapNodeOfTypeIdMap;
 class BinMDF_DoubleMapIteratorOfTypeIdMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BinMDF_DoubleMapIteratorOfTypeIdMap();
diff --git a/inc/BinMDF_TypeADriverMap.hxx b/inc/BinMDF_TypeADriverMap.hxx
index 7cb20b6..1aecc05 100644
--- a/inc/BinMDF_TypeADriverMap.hxx
+++ b/inc/BinMDF_TypeADriverMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class BinMDF_DataMapIteratorOfTypeADriverMap;
 class BinMDF_TypeADriverMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BinMDF_TypeADriverMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BinMDF_TypeIdMap.hxx b/inc/BinMDF_TypeIdMap.hxx
index 803f95d..5eaa323 100644
--- a/inc/BinMDF_TypeIdMap.hxx
+++ b/inc/BinMDF_TypeIdMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class BinMDF_DoubleMapIteratorOfTypeIdMap;
 class BinMDF_TypeIdMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BinMDF_TypeIdMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BinMDataStd.hxx b/inc/BinMDataStd.hxx
index 9b3b148..07a36d0 100644
--- a/inc/BinMDataStd.hxx
+++ b/inc/BinMDataStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class BinMDataStd_NamedDataDriver;
 class BinMDataStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute drivers to <theDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable,const Handle(CDM_MessageDriver)& aMsgDrv) ;
diff --git a/inc/BinMDataXtd.hxx b/inc/BinMDataXtd.hxx
index 09c0528..4ba17c8 100644
--- a/inc/BinMDataXtd.hxx
+++ b/inc/BinMDataXtd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class BinMDataXtd_ShapeDriver;
 class BinMDataXtd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute drivers to <theDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable,const Handle(CDM_MessageDriver)& aMsgDrv) ;
diff --git a/inc/BinMDocStd.hxx b/inc/BinMDocStd.hxx
index 2475973..ae4a9d0 100644
--- a/inc/BinMDocStd.hxx
+++ b/inc/BinMDocStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class BinMDocStd_XLinkDriver;
 class BinMDocStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute drivers to <theDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable,const Handle(CDM_MessageDriver)& aMsgDrv) ;
diff --git a/inc/BinMFunction.hxx b/inc/BinMFunction.hxx
index 0302b58..c6dc76e 100644
--- a/inc/BinMFunction.hxx
+++ b/inc/BinMFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class BinMFunction_ScopeDriver;
 class BinMFunction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute drivers to <theDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable,const Handle(CDM_MessageDriver)& aMsgDrv) ;
diff --git a/inc/BinMNaming.hxx b/inc/BinMNaming.hxx
index b399d7c..b92e459 100644
--- a/inc/BinMNaming.hxx
+++ b/inc/BinMNaming.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class BinMNaming_NamingDriver;
 class BinMNaming  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute drivers to <theDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable,const Handle(CDM_MessageDriver)& aMsgDrv) ;
diff --git a/inc/BinMPrsStd.hxx b/inc/BinMPrsStd.hxx
index 2111f42..9d98852 100644
--- a/inc/BinMPrsStd.hxx
+++ b/inc/BinMPrsStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class BinMPrsStd_PositionDriver;
 class BinMPrsStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute storage-retrieval driver to <theDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable,const Handle(CDM_MessageDriver)& theMessageDriver) ;
diff --git a/inc/BinMXCAFDoc.hxx b/inc/BinMXCAFDoc.hxx
index a83f7c5..788a6e3 100644
--- a/inc/BinMXCAFDoc.hxx
+++ b/inc/BinMXCAFDoc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class BinMXCAFDoc_MaterialToolDriver;
 class BinMXCAFDoc  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute drivers to <theDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable,const Handle(CDM_MessageDriver)& theMsgDrv) ;
diff --git a/inc/BinObjMgt_Persistent.hxx b/inc/BinObjMgt_Persistent.hxx
index 155ce92..ab01543 100644
--- a/inc/BinObjMgt_Persistent.hxx
+++ b/inc/BinObjMgt_Persistent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -86,18 +89,7 @@ class TDF_Data;
 class BinObjMgt_Persistent  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   BinObjMgt_Persistent();
diff --git a/inc/BinTools.hxx b/inc/BinTools.hxx
index c6cf0d3..a5c99e8 100644
--- a/inc/BinTools.hxx
+++ b/inc/BinTools.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class BinTools_LocationSet;
 class BinTools  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_OStream& PutReal(Standard_OStream& OS,const Standard_Real theValue) ;
diff --git a/inc/BinTools_Curve2dSet.hxx b/inc/BinTools_Curve2dSet.hxx
index a1143cd..896b6f2 100644
--- a/inc/BinTools_Curve2dSet.hxx
+++ b/inc/BinTools_Curve2dSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom2d_Curve;
 class BinTools_Curve2dSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns an empty set of Curves. <br>
   Standard_EXPORT   BinTools_Curve2dSet();
diff --git a/inc/BinTools_CurveSet.hxx b/inc/BinTools_CurveSet.hxx
index 379caef..9fde13b 100644
--- a/inc/BinTools_CurveSet.hxx
+++ b/inc/BinTools_CurveSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_Curve;
 class BinTools_CurveSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns an empty set of Curves. <br>
   Standard_EXPORT   BinTools_CurveSet();
diff --git a/inc/BinTools_LocationSet.hxx b/inc/BinTools_LocationSet.hxx
index c0f02a4..b83a865 100644
--- a/inc/BinTools_LocationSet.hxx
+++ b/inc/BinTools_LocationSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopLoc_Location;
 class BinTools_LocationSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns an empty set of locations. <br>
   Standard_EXPORT   BinTools_LocationSet();
diff --git a/inc/BinTools_ShapeSet.hxx b/inc/BinTools_ShapeSet.hxx
index 9bdda09..1d18832 100644
--- a/inc/BinTools_ShapeSet.hxx
+++ b/inc/BinTools_ShapeSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class BinTools_LocationSet;
 class BinTools_ShapeSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Builds an empty ShapeSet. <br>
 //!          Parameter <isWithTriangles> is added for XML Persistence <br>
diff --git a/inc/BinTools_SurfaceSet.hxx b/inc/BinTools_SurfaceSet.hxx
index 674110a..c406525 100644
--- a/inc/BinTools_SurfaceSet.hxx
+++ b/inc/BinTools_SurfaceSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_Surface;
 class BinTools_SurfaceSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns an empty set of Surfaces. <br>
   Standard_EXPORT   BinTools_SurfaceSet();
diff --git a/inc/BinXCAFDrivers.hxx b/inc/BinXCAFDrivers.hxx
index f9f6d6f..fbc27ff 100644
--- a/inc/BinXCAFDrivers.hxx
+++ b/inc/BinXCAFDrivers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class BinXCAFDrivers_DocumentRetrievalDriver;
 class BinXCAFDrivers  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Standard_Transient Factory(const Standard_GUID& theGUID) ;
diff --git a/inc/Bisector.hxx b/inc/Bisector.hxx
index 68687fe..951e7eb 100644
--- a/inc/Bisector.hxx
+++ b/inc/Bisector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Bisector_FunctionInter;
 class Bisector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean IsConvex(const Handle(Geom2d_Curve)& Cu,const Standard_Real Sign) ;
diff --git a/inc/Bisector_Bisec.hxx b/inc/Bisector_Bisec.hxx
index 3b9cb8e..990748f 100644
--- a/inc/Bisector_Bisec.hxx
+++ b/inc/Bisector_Bisec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Geom2d_Point;
 class Bisector_Bisec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Bisector_Bisec();
diff --git a/inc/Bisector_FunctionH.hxx b/inc/Bisector_FunctionH.hxx
index 69c3094..df3bda8 100644
--- a/inc/Bisector_FunctionH.hxx
+++ b/inc/Bisector_FunctionH.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Vec2d;
 class Bisector_FunctionH  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Bisector_FunctionH(const Handle(Geom2d_Curve)& C2,const gp_Pnt2d& P1,const gp_Vec2d& T1);
diff --git a/inc/Bisector_FunctionInter.hxx b/inc/Bisector_FunctionInter.hxx
index 55ef59b..f5df05e 100644
--- a/inc/Bisector_FunctionInter.hxx
+++ b/inc/Bisector_FunctionInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Bisector_Curve;
 class Bisector_FunctionInter  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Bisector_FunctionInter();
diff --git a/inc/Bisector_Inter.hxx b/inc/Bisector_Inter.hxx
index 62beec1..c2423d7 100644
--- a/inc/Bisector_Inter.hxx
+++ b/inc/Bisector_Inter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Geom2d_Line;
 class Bisector_Inter  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Bisector_Inter();
diff --git a/inc/Bisector_PointOnBis.hxx b/inc/Bisector_PointOnBis.hxx
index 59e5544..8401ae1 100644
--- a/inc/Bisector_PointOnBis.hxx
+++ b/inc/Bisector_PointOnBis.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class gp_Pnt2d;
 class Bisector_PointOnBis  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Bisector_PointOnBis();
diff --git a/inc/Bisector_PolyBis.hxx b/inc/Bisector_PolyBis.hxx
index bed8f02..dab57ae 100644
--- a/inc/Bisector_PolyBis.hxx
+++ b/inc/Bisector_PolyBis.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Trsf2d;
 class Bisector_PolyBis  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Bisector_PolyBis();
diff --git a/inc/BlendFunc.hxx b/inc/BlendFunc.hxx
index c63c178..0e73be5 100644
--- a/inc/BlendFunc.hxx
+++ b/inc/BlendFunc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class BlendFunc_Tensor;
 class BlendFunc  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void GetShape(const BlendFunc_SectionShape SectShape,const Standard_Real MaxAng,Standard_Integer& NbPoles,Standard_Integer& NbKnots,Standard_Integer& Degree,Convert_ParameterisationType& TypeConv) ;
diff --git a/inc/BlendFunc_CSCircular.hxx b/inc/BlendFunc_CSCircular.hxx
index 84a2f64..e0b67c7 100644
--- a/inc/BlendFunc_CSCircular.hxx
+++ b/inc/BlendFunc_CSCircular.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -78,18 +81,7 @@ class TColStd_Array1OfInteger;
 class BlendFunc_CSCircular  : public Blend_CSFunction {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a function for a circular blending between <br>
 //!          a curve  <C> and a surface  <S>.  The direction of <br>
diff --git a/inc/BlendFunc_CSConstRad.hxx b/inc/BlendFunc_CSConstRad.hxx
index 23ff485..6442b92 100644
--- a/inc/BlendFunc_CSConstRad.hxx
+++ b/inc/BlendFunc_CSConstRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -74,18 +77,7 @@ class TColStd_Array1OfInteger;
 class BlendFunc_CSConstRad  : public Blend_CSFunction {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_CSConstRad(const Handle(Adaptor3d_HSurface)& S,const Handle(Adaptor3d_HCurve)& C,const Handle(Adaptor3d_HCurve)& CGuide);
diff --git a/inc/BlendFunc_ChAsym.hxx b/inc/BlendFunc_ChAsym.hxx
index b60baa1..0e92d99 100644
--- a/inc/BlendFunc_ChAsym.hxx
+++ b/inc/BlendFunc_ChAsym.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -70,18 +73,7 @@ class TColgp_Array1OfVec2d;
 class BlendFunc_ChAsym  : public Blend_Function {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_ChAsym(const Handle(Adaptor3d_HSurface)& S1,const Handle(Adaptor3d_HSurface)& S2,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/BlendFunc_ChAsymInv.hxx b/inc/BlendFunc_ChAsymInv.hxx
index 0dc5bfb..10bb3db 100644
--- a/inc/BlendFunc_ChAsymInv.hxx
+++ b/inc/BlendFunc_ChAsymInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class math_Matrix;
 class BlendFunc_ChAsymInv  : public Blend_FuncInv {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_ChAsymInv(const Handle(Adaptor3d_HSurface)& S1,const Handle(Adaptor3d_HSurface)& S2,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/BlendFunc_ChamfInv.hxx b/inc/BlendFunc_ChamfInv.hxx
index e25750c..ff6fa56 100644
--- a/inc/BlendFunc_ChamfInv.hxx
+++ b/inc/BlendFunc_ChamfInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class math_Matrix;
 class BlendFunc_ChamfInv  : public Blend_FuncInv {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_ChamfInv(const Handle(Adaptor3d_HSurface)& S1,const Handle(Adaptor3d_HSurface)& S2,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/BlendFunc_Chamfer.hxx b/inc/BlendFunc_Chamfer.hxx
index d44f26a..0c86562 100644
--- a/inc/BlendFunc_Chamfer.hxx
+++ b/inc/BlendFunc_Chamfer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class TColgp_Array1OfVec2d;
 class BlendFunc_Chamfer  : public Blend_Function {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_Chamfer(const Handle(Adaptor3d_HSurface)& S1,const Handle(Adaptor3d_HSurface)& S2,const Handle(Adaptor3d_HCurve)& CG);
diff --git a/inc/BlendFunc_ConstRad.hxx b/inc/BlendFunc_ConstRad.hxx
index 7c9db36..c755098 100644
--- a/inc/BlendFunc_ConstRad.hxx
+++ b/inc/BlendFunc_ConstRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -80,18 +83,7 @@ class gp_Ax1;
 class BlendFunc_ConstRad  : public Blend_Function {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_ConstRad(const Handle(Adaptor3d_HSurface)& S1,const Handle(Adaptor3d_HSurface)& S2,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/BlendFunc_ConstRadInv.hxx b/inc/BlendFunc_ConstRadInv.hxx
index c4c1c53..113abca 100644
--- a/inc/BlendFunc_ConstRadInv.hxx
+++ b/inc/BlendFunc_ConstRadInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class math_Matrix;
 class BlendFunc_ConstRadInv  : public Blend_FuncInv {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_ConstRadInv(const Handle(Adaptor3d_HSurface)& S1,const Handle(Adaptor3d_HSurface)& S2,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/BlendFunc_Corde.hxx b/inc/BlendFunc_Corde.hxx
index 8f8ace8..871c30f 100644
--- a/inc/BlendFunc_Corde.hxx
+++ b/inc/BlendFunc_Corde.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class gp_Vec2d;
 class BlendFunc_Corde  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_Corde(const Handle(Adaptor3d_HSurface)& S,const Handle(Adaptor3d_HCurve)& CGuide);
diff --git a/inc/BlendFunc_EvolRad.hxx b/inc/BlendFunc_EvolRad.hxx
index 0fafa1d..3d8b151 100644
--- a/inc/BlendFunc_EvolRad.hxx
+++ b/inc/BlendFunc_EvolRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -83,18 +86,7 @@ class TColgp_Array1OfVec2d;
 class BlendFunc_EvolRad  : public Blend_Function {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_EvolRad(const Handle(Adaptor3d_HSurface)& S1,const Handle(Adaptor3d_HSurface)& S2,const Handle(Adaptor3d_HCurve)& C,const Handle(Law_Function)& Law);
diff --git a/inc/BlendFunc_EvolRadInv.hxx b/inc/BlendFunc_EvolRadInv.hxx
index c3fe8c5..e5d3a4e 100644
--- a/inc/BlendFunc_EvolRadInv.hxx
+++ b/inc/BlendFunc_EvolRadInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class math_Matrix;
 class BlendFunc_EvolRadInv  : public Blend_FuncInv {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_EvolRadInv(const Handle(Adaptor3d_HSurface)& S1,const Handle(Adaptor3d_HSurface)& S2,const Handle(Adaptor3d_HCurve)& C,const Handle(Law_Function)& Law);
diff --git a/inc/BlendFunc_Ruled.hxx b/inc/BlendFunc_Ruled.hxx
index f4c5e1a..c2551a0 100644
--- a/inc/BlendFunc_Ruled.hxx
+++ b/inc/BlendFunc_Ruled.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class gp_Ax1;
 class BlendFunc_Ruled  : public Blend_Function {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_Ruled(const Handle(Adaptor3d_HSurface)& S1,const Handle(Adaptor3d_HSurface)& S2,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/BlendFunc_RuledInv.hxx b/inc/BlendFunc_RuledInv.hxx
index 978d805..6859cf8 100644
--- a/inc/BlendFunc_RuledInv.hxx
+++ b/inc/BlendFunc_RuledInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class math_Matrix;
 class BlendFunc_RuledInv  : public Blend_FuncInv {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_RuledInv(const Handle(Adaptor3d_HSurface)& S1,const Handle(Adaptor3d_HSurface)& S2,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/BlendFunc_Tensor.hxx b/inc/BlendFunc_Tensor.hxx
index 0489e1a..808320a 100644
--- a/inc/BlendFunc_Tensor.hxx
+++ b/inc/BlendFunc_Tensor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class math_Matrix;
 class BlendFunc_Tensor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BlendFunc_Tensor(const Standard_Integer NbRow,const Standard_Integer NbCol,const Standard_Integer NbMat);
diff --git a/inc/Blend_AppFunction.hxx b/inc/Blend_AppFunction.hxx
index 7c0f925..67c35ff 100644
--- a/inc/Blend_AppFunction.hxx
+++ b/inc/Blend_AppFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TColgp_Array1OfVec2d;
 class Blend_AppFunction  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns the number of variables of the function. <br>
   Standard_EXPORT   virtual  Standard_Integer NbVariables() const = 0;
diff --git a/inc/Blend_CSFunction.hxx b/inc/Blend_CSFunction.hxx
index 669e18f..3df8f16 100644
--- a/inc/Blend_CSFunction.hxx
+++ b/inc/Blend_CSFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TColgp_Array1OfVec2d;
 class Blend_CSFunction  : public Blend_AppFunction {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns 3 (default value). Can be redefined. <br>
   Standard_EXPORT   virtual  Standard_Integer NbVariables() const;
diff --git a/inc/Blend_CurvPointFuncInv.hxx b/inc/Blend_CurvPointFuncInv.hxx
index 4d28df7..9b7f056 100644
--- a/inc/Blend_CurvPointFuncInv.hxx
+++ b/inc/Blend_CurvPointFuncInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Pnt;
 class Blend_CurvPointFuncInv  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns 3. <br>
   Standard_EXPORT     Standard_Integer NbVariables() const;
diff --git a/inc/Blend_FuncInv.hxx b/inc/Blend_FuncInv.hxx
index e647662..9ef1d5e 100644
--- a/inc/Blend_FuncInv.hxx
+++ b/inc/Blend_FuncInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class Adaptor2d_HCurve2d;
 class Blend_FuncInv  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns 4. <br>
   Standard_EXPORT     Standard_Integer NbVariables() const;
diff --git a/inc/Blend_Function.hxx b/inc/Blend_Function.hxx
index c443222..d965f4c 100644
--- a/inc/Blend_Function.hxx
+++ b/inc/Blend_Function.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TColgp_Array1OfVec2d;
 class Blend_Function  : public Blend_AppFunction {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns 4. <br>
   Standard_EXPORT     Standard_Integer NbVariables() const;
diff --git a/inc/Blend_Point.hxx b/inc/Blend_Point.hxx
index 202fe80..5fce11f 100644
--- a/inc/Blend_Point.hxx
+++ b/inc/Blend_Point.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class gp_Vec2d;
 class Blend_Point  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Blend_Point();
diff --git a/inc/Blend_RstRstFunction.hxx b/inc/Blend_RstRstFunction.hxx
index 43b9d42..dabdcfc 100644
--- a/inc/Blend_RstRstFunction.hxx
+++ b/inc/Blend_RstRstFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class TColgp_Array1OfVec2d;
 class Blend_RstRstFunction  : public Blend_AppFunction {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns 2 (default value). Can be redefined. <br>
   Standard_EXPORT   virtual  Standard_Integer NbVariables() const = 0;
diff --git a/inc/Blend_SequenceOfPoint.hxx b/inc/Blend_SequenceOfPoint.hxx
index c875e49..cafffa0 100644
--- a/inc/Blend_SequenceOfPoint.hxx
+++ b/inc/Blend_SequenceOfPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Blend_SequenceNodeOfSequenceOfPoint;
 class Blend_SequenceOfPoint  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Blend_SequenceOfPoint();
diff --git a/inc/Blend_SurfCurvFuncInv.hxx b/inc/Blend_SurfCurvFuncInv.hxx
index f6b3336..36f83ab 100644
--- a/inc/Blend_SurfCurvFuncInv.hxx
+++ b/inc/Blend_SurfCurvFuncInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Adaptor2d_HCurve2d;
 class Blend_SurfCurvFuncInv  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns 3. <br>
   Standard_EXPORT     Standard_Integer NbVariables() const;
diff --git a/inc/Blend_SurfPointFuncInv.hxx b/inc/Blend_SurfPointFuncInv.hxx
index 328953e..6647f31 100644
--- a/inc/Blend_SurfPointFuncInv.hxx
+++ b/inc/Blend_SurfPointFuncInv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Pnt;
 class Blend_SurfPointFuncInv  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns 3. <br>
   Standard_EXPORT     Standard_Integer NbVariables() const;
diff --git a/inc/Blend_SurfRstFunction.hxx b/inc/Blend_SurfRstFunction.hxx
index 6742247..83127e8 100644
--- a/inc/Blend_SurfRstFunction.hxx
+++ b/inc/Blend_SurfRstFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class TColgp_Array1OfVec2d;
 class Blend_SurfRstFunction  : public Blend_AppFunction {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns 3 (default value). Can be redefined. <br>
   Standard_EXPORT   virtual  Standard_Integer NbVariables() const = 0;
diff --git a/inc/BndLib.hxx b/inc/BndLib.hxx
index 67119f5..e44f336 100644
--- a/inc/BndLib.hxx
+++ b/inc/BndLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class BndLib_AddSurface;
 class BndLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the segment of the line L limited by the two <br>
 //! parameter values P1 and P2, to the bounding box B, and <br>
diff --git a/inc/BndLib_Add2dCurve.hxx b/inc/BndLib_Add2dCurve.hxx
index b361bd3..6f29c54 100644
--- a/inc/BndLib_Add2dCurve.hxx
+++ b/inc/BndLib_Add2dCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Bnd_Box2d;
 class BndLib_Add2dCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds to the bounding box B the curve C <br>
 //!  B is then enlarged by the tolerance value Tol. <br>
diff --git a/inc/BndLib_Add3dCurve.hxx b/inc/BndLib_Add3dCurve.hxx
index a379f03..ab29999 100644
--- a/inc/BndLib_Add3dCurve.hxx
+++ b/inc/BndLib_Add3dCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Bnd_Box;
 class BndLib_Add3dCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds to the bounding box B the curve C <br>
 //! B is then enlarged by the tolerance value Tol. <br>
diff --git a/inc/BndLib_AddSurface.hxx b/inc/BndLib_AddSurface.hxx
index 3bcb4d0..7260634 100644
--- a/inc/BndLib_AddSurface.hxx
+++ b/inc/BndLib_AddSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Bnd_Box;
 class BndLib_AddSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds to the bounding box B the surface S <br>
 //! B is then enlarged by the tolerance value Tol. <br>
diff --git a/inc/Bnd_Array1OfBox.hxx b/inc/Bnd_Array1OfBox.hxx
index 9dd76e0..28b4142 100644
--- a/inc/Bnd_Array1OfBox.hxx
+++ b/inc/Bnd_Array1OfBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Bnd_Box;
 class Bnd_Array1OfBox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Bnd_Array1OfBox(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Bnd_Array1OfBox2d.hxx b/inc/Bnd_Array1OfBox2d.hxx
index a13b3cb..efe5e98 100644
--- a/inc/Bnd_Array1OfBox2d.hxx
+++ b/inc/Bnd_Array1OfBox2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Bnd_Box2d;
 class Bnd_Array1OfBox2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Bnd_Array1OfBox2d(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Bnd_Array1OfSphere.hxx b/inc/Bnd_Array1OfSphere.hxx
index c524196..e6ec792 100644
--- a/inc/Bnd_Array1OfSphere.hxx
+++ b/inc/Bnd_Array1OfSphere.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Bnd_Sphere;
 class Bnd_Array1OfSphere  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Bnd_Array1OfSphere(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Bnd_B2d.hxx b/inc/Bnd_B2d.hxx
index ea5cac7..9314e04 100644
--- a/inc/Bnd_B2d.hxx
+++ b/inc/Bnd_B2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Ax2d;
 class Bnd_B2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Bnd_B2d();
diff --git a/inc/Bnd_B2f.hxx b/inc/Bnd_B2f.hxx
index af2bc83..2dd851b 100644
--- a/inc/Bnd_B2f.hxx
+++ b/inc/Bnd_B2f.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class gp_Ax2d;
 class Bnd_B2f  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Bnd_B2f();
diff --git a/inc/Bnd_B3d.hxx b/inc/Bnd_B3d.hxx
index da1fba9..7452dcd 100644
--- a/inc/Bnd_B3d.hxx
+++ b/inc/Bnd_B3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Ax3;
 class Bnd_B3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Bnd_B3d();
diff --git a/inc/Bnd_B3f.hxx b/inc/Bnd_B3f.hxx
index cad60ae..883c2b9 100644
--- a/inc/Bnd_B3f.hxx
+++ b/inc/Bnd_B3f.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_Ax3;
 class Bnd_B3f  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Bnd_B3f();
diff --git a/inc/Bnd_BoundSortBox.hxx b/inc/Bnd_BoundSortBox.hxx
index baa2ce8..0b9acd9 100644
--- a/inc/Bnd_BoundSortBox.hxx
+++ b/inc/Bnd_BoundSortBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class gp_Pln;
 class Bnd_BoundSortBox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty comparison algorithm for bounding boxes. <br>
 //! The bounding boxes are then defined using the Initialize function. <br>
diff --git a/inc/Bnd_BoundSortBox2d.hxx b/inc/Bnd_BoundSortBox2d.hxx
index 613669c..00e0611 100644
--- a/inc/Bnd_BoundSortBox2d.hxx
+++ b/inc/Bnd_BoundSortBox2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class TColStd_ListOfInteger;
 class Bnd_BoundSortBox2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty comparison algorithm for 2D bounding boxes. <br>
 //! The bounding boxes are then defined using the Initialize function. <br>
diff --git a/inc/Bnd_Box.hxx b/inc/Bnd_Box.hxx
index 9bde39a..0dcb054 100644
--- a/inc/Bnd_Box.hxx
+++ b/inc/Bnd_Box.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class gp_Pln;
 class Bnd_Box  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty Box. <br>
 //! The constructed box is qualified Void. Its gap is null. <br>
diff --git a/inc/Bnd_Box2d.hxx b/inc/Bnd_Box2d.hxx
index 4b6ed9a..ad2812d 100644
--- a/inc/Bnd_Box2d.hxx
+++ b/inc/Bnd_Box2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class gp_Trsf2d;
 class Bnd_Box2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty 2D bounding box. <br>
 //! The constructed box is qualified Void. Its gap is null. <br>
diff --git a/inc/Bnd_SeqOfBox.hxx b/inc/Bnd_SeqOfBox.hxx
index 98d4456..22cdfa0 100644
--- a/inc/Bnd_SeqOfBox.hxx
+++ b/inc/Bnd_SeqOfBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Bnd_SequenceNodeOfSeqOfBox;
 class Bnd_SeqOfBox  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Bnd_SeqOfBox();
diff --git a/inc/Bnd_Sphere.hxx b/inc/Bnd_Sphere.hxx
index 0a7534b..7e582f3 100644
--- a/inc/Bnd_Sphere.hxx
+++ b/inc/Bnd_Sphere.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_XYZ;
 class Bnd_Sphere  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   Bnd_Sphere();
diff --git a/inc/BooleanOperations_AncestorsAndSuccessors.hxx b/inc/BooleanOperations_AncestorsAndSuccessors.hxx
index 86886c7..7d41b5a 100644
--- a/inc/BooleanOperations_AncestorsAndSuccessors.hxx
+++ b/inc/BooleanOperations_AncestorsAndSuccessors.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,22 +35,8 @@ class BooleanOperations_AncestorsSeqAndSuccessorsSeq;
 class BooleanOperations_AncestorsAndSuccessors  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
   Standard_EXPORT   BooleanOperations_AncestorsAndSuccessors();
   //! allocates space and fills it with the data of AncSuccessors. <br>
diff --git a/inc/BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx b/inc/BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx
index 8158a60..33daffe 100644
--- a/inc/BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx
+++ b/inc/BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@
 class BooleanOperations_AncestorsSeqAndSuccessorsSeq  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BooleanOperations_AncestorsSeqAndSuccessorsSeq();
diff --git a/inc/BooleanOperations_Explorer.hxx b/inc/BooleanOperations_Explorer.hxx
index 2899ea6..72ccf9f 100644
--- a/inc/BooleanOperations_Explorer.hxx
+++ b/inc/BooleanOperations_Explorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BooleanOperations_ShapesDataStructure;
 class BooleanOperations_Explorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BooleanOperations_Explorer(const BooleanOperations_ShapesDataStructure& SDS);
diff --git a/inc/BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx b/inc/BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx
index 9f76e22..7203d1b 100644
--- a/inc/BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx
+++ b/inc/BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BooleanOperations_IndexedDataMapNodeOfIndexedDataMapOfShapeAncestorsSucces
 class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BooleanOperations_IndexedDataMapOfShapeInteger.hxx b/inc/BooleanOperations_IndexedDataMapOfShapeInteger.hxx
index b03de9c..85fa958 100644
--- a/inc/BooleanOperations_IndexedDataMapOfShapeInteger.hxx
+++ b/inc/BooleanOperations_IndexedDataMapOfShapeInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class BooleanOperations_IndexedDataMapNodeOfIndexedDataMapOfShapeInteger;
 class BooleanOperations_IndexedDataMapOfShapeInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BooleanOperations_IndexedDataMapOfShapeInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/BooleanOperations_OnceExplorer.hxx b/inc/BooleanOperations_OnceExplorer.hxx
index 999762d..34f6606 100644
--- a/inc/BooleanOperations_OnceExplorer.hxx
+++ b/inc/BooleanOperations_OnceExplorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class BooleanOperations_ShapesDataStructure;
 class BooleanOperations_OnceExplorer  : public BooleanOperations_Explorer {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BooleanOperations_OnceExplorer(const BooleanOperations_ShapesDataStructure& SDS);
diff --git a/inc/BooleanOperations_ShapeAndInterferences.hxx b/inc/BooleanOperations_ShapeAndInterferences.hxx
index 77af220..c5be859 100644
--- a/inc/BooleanOperations_ShapeAndInterferences.hxx
+++ b/inc/BooleanOperations_ShapeAndInterferences.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,22 +49,7 @@ class Bnd_Box;
 class BooleanOperations_ShapeAndInterferences  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BooleanOperations_ShapeAndInterferences();
diff --git a/inc/BooleanOperations_ShapesDataStructure.hxx b/inc/BooleanOperations_ShapesDataStructure.hxx
index ddfafde..46a3ccd 100644
--- a/inc/BooleanOperations_ShapesDataStructure.hxx
+++ b/inc/BooleanOperations_ShapesDataStructure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -60,18 +63,7 @@ class BooleanOperations_IndexedDataMapOfShapeInteger;
 class BooleanOperations_ShapesDataStructure  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   BooleanOperations_ShapesDataStructure();
diff --git a/inc/CDF.hxx b/inc/CDF.hxx
index 42b5e83..dc1dc0b 100644
--- a/inc/CDF.hxx
+++ b/inc/CDF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class CDF_Timer;
 class CDF  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void GetLicense(const Standard_Integer anApplicationIdentifier) ;
diff --git a/inc/CDF_DirectoryIterator.hxx b/inc/CDF_DirectoryIterator.hxx
index f9a42f0..cdee54a 100644
--- a/inc/CDF_DirectoryIterator.hxx
+++ b/inc/CDF_DirectoryIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class CDM_Document;
 class CDF_DirectoryIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates an Iterator with the directory <br>
 //!          of the current CDF. <br>
diff --git a/inc/CDF_Store.hxx b/inc/CDF_Store.hxx
index 7206333..fa409d2 100644
--- a/inc/CDF_Store.hxx
+++ b/inc/CDF_Store.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TCollection_ExtendedString;
 class CDF_Store  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates a store list  from the document of the current selection. <br>
 //! <br>
diff --git a/inc/CDF_Timer.hxx b/inc/CDF_Timer.hxx
index 6fb39cb..555f7bd 100644
--- a/inc/CDF_Timer.hxx
+++ b/inc/CDF_Timer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class CDF_Timer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDF_Timer();
diff --git a/inc/CDM_DataMapIteratorOfMetaDataLookUpTable.hxx b/inc/CDM_DataMapIteratorOfMetaDataLookUpTable.hxx
index 36d9c4f..3354af9 100644
--- a/inc/CDM_DataMapIteratorOfMetaDataLookUpTable.hxx
+++ b/inc/CDM_DataMapIteratorOfMetaDataLookUpTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class CDM_DataMapNodeOfMetaDataLookUpTable;
 class CDM_DataMapIteratorOfMetaDataLookUpTable  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_DataMapIteratorOfMetaDataLookUpTable();
diff --git a/inc/CDM_DataMapIteratorOfPresentationDirectory.hxx b/inc/CDM_DataMapIteratorOfPresentationDirectory.hxx
index 7fb399f..4dfc3ab 100644
--- a/inc/CDM_DataMapIteratorOfPresentationDirectory.hxx
+++ b/inc/CDM_DataMapIteratorOfPresentationDirectory.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class CDM_DataMapNodeOfPresentationDirectory;
 class CDM_DataMapIteratorOfPresentationDirectory  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_DataMapIteratorOfPresentationDirectory();
diff --git a/inc/CDM_DocumentHasher.hxx b/inc/CDM_DocumentHasher.hxx
index 30d2005..fbd7076 100644
--- a/inc/CDM_DocumentHasher.hxx
+++ b/inc/CDM_DocumentHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class CDM_Document;
 class CDM_DocumentHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const Handle(CDM_Document)& K,const Standard_Integer Upper) ;
diff --git a/inc/CDM_ListIteratorOfListOfDocument.hxx b/inc/CDM_ListIteratorOfListOfDocument.hxx
index c1c1395..b85e5fc 100644
--- a/inc/CDM_ListIteratorOfListOfDocument.hxx
+++ b/inc/CDM_ListIteratorOfListOfDocument.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class CDM_ListNodeOfListOfDocument;
 class CDM_ListIteratorOfListOfDocument  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_ListIteratorOfListOfDocument();
diff --git a/inc/CDM_ListIteratorOfListOfReferences.hxx b/inc/CDM_ListIteratorOfListOfReferences.hxx
index d5dc32f..dd12eeb 100644
--- a/inc/CDM_ListIteratorOfListOfReferences.hxx
+++ b/inc/CDM_ListIteratorOfListOfReferences.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class CDM_ListNodeOfListOfReferences;
 class CDM_ListIteratorOfListOfReferences  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_ListIteratorOfListOfReferences();
diff --git a/inc/CDM_ListOfDocument.hxx b/inc/CDM_ListOfDocument.hxx
index f4a0426..6d89b07 100644
--- a/inc/CDM_ListOfDocument.hxx
+++ b/inc/CDM_ListOfDocument.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class CDM_ListNodeOfListOfDocument;
 class CDM_ListOfDocument  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_ListOfDocument();
diff --git a/inc/CDM_ListOfReferences.hxx b/inc/CDM_ListOfReferences.hxx
index 5a6db51..8d748ad 100644
--- a/inc/CDM_ListOfReferences.hxx
+++ b/inc/CDM_ListOfReferences.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class CDM_ListNodeOfListOfReferences;
 class CDM_ListOfReferences  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_ListOfReferences();
diff --git a/inc/CDM_MapIteratorOfMapOfDocument.hxx b/inc/CDM_MapIteratorOfMapOfDocument.hxx
index 24f21eb..4517a85 100644
--- a/inc/CDM_MapIteratorOfMapOfDocument.hxx
+++ b/inc/CDM_MapIteratorOfMapOfDocument.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class CDM_StdMapNodeOfMapOfDocument;
 class CDM_MapIteratorOfMapOfDocument  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_MapIteratorOfMapOfDocument();
diff --git a/inc/CDM_MapOfDocument.hxx b/inc/CDM_MapOfDocument.hxx
index d0acbb1..575be37 100644
--- a/inc/CDM_MapOfDocument.hxx
+++ b/inc/CDM_MapOfDocument.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class CDM_MapIteratorOfMapOfDocument;
 class CDM_MapOfDocument  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_MapOfDocument(const Standard_Integer NbBuckets = 1);
diff --git a/inc/CDM_MetaDataLookUpTable.hxx b/inc/CDM_MetaDataLookUpTable.hxx
index be81e8e..ed7e3a3 100644
--- a/inc/CDM_MetaDataLookUpTable.hxx
+++ b/inc/CDM_MetaDataLookUpTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class CDM_DataMapIteratorOfMetaDataLookUpTable;
 class CDM_MetaDataLookUpTable  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_MetaDataLookUpTable(const Standard_Integer NbBuckets = 1);
diff --git a/inc/CDM_PresentationDirectory.hxx b/inc/CDM_PresentationDirectory.hxx
index d440e02..d94d6da 100644
--- a/inc/CDM_PresentationDirectory.hxx
+++ b/inc/CDM_PresentationDirectory.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class CDM_DataMapIteratorOfPresentationDirectory;
 class CDM_PresentationDirectory  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_PresentationDirectory(const Standard_Integer NbBuckets = 1);
diff --git a/inc/CDM_ReferenceIterator.hxx b/inc/CDM_ReferenceIterator.hxx
index b7b8687..4107f50 100644
--- a/inc/CDM_ReferenceIterator.hxx
+++ b/inc/CDM_ReferenceIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class CDM_Document;
 class CDM_ReferenceIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_ReferenceIterator(const Handle(CDM_Document)& aDocument);
diff --git a/inc/CDM_StackIteratorOfStackOfDocument.hxx b/inc/CDM_StackIteratorOfStackOfDocument.hxx
index 61f16ae..7fbf27a 100644
--- a/inc/CDM_StackIteratorOfStackOfDocument.hxx
+++ b/inc/CDM_StackIteratorOfStackOfDocument.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class CDM_StackNodeOfStackOfDocument;
 class CDM_StackIteratorOfStackOfDocument  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_StackIteratorOfStackOfDocument();
diff --git a/inc/CDM_StackOfDocument.hxx b/inc/CDM_StackOfDocument.hxx
index ebc8a2a..9ec9654 100644
--- a/inc/CDM_StackOfDocument.hxx
+++ b/inc/CDM_StackOfDocument.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class CDM_StackNodeOfStackOfDocument;
 class CDM_StackOfDocument  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CDM_StackOfDocument();
diff --git a/inc/CPnts_AbscissaPoint.hxx b/inc/CPnts_AbscissaPoint.hxx
index 2549d76..f2802c7 100644
--- a/inc/CPnts_AbscissaPoint.hxx
+++ b/inc/CPnts_AbscissaPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Adaptor2d_Curve2d;
 class CPnts_AbscissaPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the length of the Curve <C>. <br>
   Standard_EXPORT   static  Standard_Real Length(const Adaptor3d_Curve& C) ;
diff --git a/inc/CPnts_MyGaussFunction.hxx b/inc/CPnts_MyGaussFunction.hxx
index b14b040..13db35a 100644
--- a/inc/CPnts_MyGaussFunction.hxx
+++ b/inc/CPnts_MyGaussFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@
 class CPnts_MyGaussFunction  : public math_Function {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       CPnts_MyGaussFunction();
diff --git a/inc/CPnts_MyRootFunction.hxx b/inc/CPnts_MyRootFunction.hxx
index 79990a4..e5e46de 100644
--- a/inc/CPnts_MyRootFunction.hxx
+++ b/inc/CPnts_MyRootFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@
 class CPnts_MyRootFunction  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       CPnts_MyRootFunction();
diff --git a/inc/CPnts_UniformDeflection.hxx b/inc/CPnts_UniformDeflection.hxx
index e8a02ec..4de27f7 100644
--- a/inc/CPnts_UniformDeflection.hxx
+++ b/inc/CPnts_UniformDeflection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Adaptor2d_Curve2d;
 class CPnts_UniformDeflection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creation of a indefinite UniformDeflection <br>
   Standard_EXPORT   CPnts_UniformDeflection();
diff --git a/inc/CSLib.hxx b/inc/CSLib.hxx
index 52bbf47..d53093e 100644
--- a/inc/CSLib.hxx
+++ b/inc/CSLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class CSLib_NormalPolyDef;
 class CSLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Computes the normal direction of a surface as the cross product <br>
diff --git a/inc/CSLib_Class2d.hxx b/inc/CSLib_Class2d.hxx
index ad3e97c..ba503a6 100644
--- a/inc/CSLib_Class2d.hxx
+++ b/inc/CSLib_Class2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Pnt2d;
 class CSLib_Class2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CSLib_Class2d(const TColgp_Array1OfPnt2d& TP,const Standard_Real aTolu,const Standard_Real aTolv,const Standard_Real umin,const Standard_Real vmin,const Standard_Real umax,const Standard_Real vmax);
diff --git a/inc/CSLib_NormalPolyDef.hxx b/inc/CSLib_NormalPolyDef.hxx
index 596f976..1cd2652 100644
--- a/inc/CSLib_NormalPolyDef.hxx
+++ b/inc/CSLib_NormalPolyDef.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_Array1OfReal;
 class CSLib_NormalPolyDef  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   CSLib_NormalPolyDef(const Standard_Integer k0,const TColStd_Array1OfReal& li);
diff --git a/inc/ChFi2d.hxx b/inc/ChFi2d.hxx
index 8b79b67..3a700c5 100644
--- a/inc/ChFi2d.hxx
+++ b/inc/ChFi2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class ChFi2d_Builder;
 class ChFi2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
 
 
diff --git a/inc/ChFi2d_Builder.hxx b/inc/ChFi2d_Builder.hxx
index a9d913f..7100a05 100644
--- a/inc/ChFi2d_Builder.hxx
+++ b/inc/ChFi2d_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopTools_SequenceOfShape;
 class ChFi2d_Builder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFi2d_Builder();
diff --git a/inc/ChFi3d.hxx b/inc/ChFi3d.hxx
index 2450530..a550109 100644
--- a/inc/ChFi3d.hxx
+++ b/inc/ChFi3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class ChFi3d_SearchSing;
 class ChFi3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer ConcaveSide(const BRepAdaptor_Surface& S1,const BRepAdaptor_Surface& S2,const TopoDS_Edge& E,TopAbs_Orientation& Or1,TopAbs_Orientation& Or2) ;
diff --git a/inc/ChFi3d_Builder.hxx b/inc/ChFi3d_Builder.hxx
index 5828adc..1ffb0ca 100644
--- a/inc/ChFi3d_Builder.hxx
+++ b/inc/ChFi3d_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -144,18 +147,7 @@ class Geom2d_Curve;
 class ChFi3d_Builder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/ChFi3d_ChBuilder.hxx b/inc/ChFi3d_ChBuilder.hxx
index 4b4fbeb..ae6fdf4 100644
--- a/inc/ChFi3d_ChBuilder.hxx
+++ b/inc/ChFi3d_ChBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -81,18 +84,7 @@ class ChFiDS_ListOfStripe;
 class ChFi3d_ChBuilder  : public ChFi3d_Builder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! initializes the Builder with the Shape <S> for the <br>
 //!          computation of chamfers <br>
diff --git a/inc/ChFi3d_FilBuilder.hxx b/inc/ChFi3d_FilBuilder.hxx
index 37d87b9..21804dc 100644
--- a/inc/ChFi3d_FilBuilder.hxx
+++ b/inc/ChFi3d_FilBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -90,18 +93,7 @@ class ChFiDS_ListOfStripe;
 class ChFi3d_FilBuilder  : public ChFi3d_Builder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFi3d_FilBuilder(const TopoDS_Shape& S,const ChFi3d_FilletShape FShape = ChFi3d_Rational,const Standard_Real Ta = 1.0e-2);
diff --git a/inc/ChFi3d_SearchSing.hxx b/inc/ChFi3d_SearchSing.hxx
index 1f3595b..d924938 100644
--- a/inc/ChFi3d_SearchSing.hxx
+++ b/inc/ChFi3d_SearchSing.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_Curve;
 class ChFi3d_SearchSing  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFi3d_SearchSing(const Handle(Geom_Curve)& C1,const Handle(Geom_Curve)& C2);
diff --git a/inc/ChFiDS_CircSection.hxx b/inc/ChFiDS_CircSection.hxx
index 723d6b6..dec17ae 100644
--- a/inc/ChFiDS_CircSection.hxx
+++ b/inc/ChFiDS_CircSection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Lin;
 class ChFiDS_CircSection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_CircSection();
diff --git a/inc/ChFiDS_CommonPoint.hxx b/inc/ChFiDS_CommonPoint.hxx
index 100b257..e57ee3f 100644
--- a/inc/ChFiDS_CommonPoint.hxx
+++ b/inc/ChFiDS_CommonPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class gp_Vec;
 class ChFiDS_CommonPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   ChFiDS_CommonPoint();
diff --git a/inc/ChFiDS_ElSpine.hxx b/inc/ChFiDS_ElSpine.hxx
index 587f50e..0a1e3db 100644
--- a/inc/ChFiDS_ElSpine.hxx
+++ b/inc/ChFiDS_ElSpine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -77,18 +80,7 @@ class Geom_BSplineCurve;
 class ChFiDS_ElSpine  : public Adaptor3d_Curve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_ElSpine();
diff --git a/inc/ChFiDS_FaceInterference.hxx b/inc/ChFiDS_FaceInterference.hxx
index 5bec693..466ebbc 100644
--- a/inc/ChFiDS_FaceInterference.hxx
+++ b/inc/ChFiDS_FaceInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom2d_Curve;
 class ChFiDS_FaceInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_FaceInterference();
diff --git a/inc/ChFiDS_IndexedDataMapOfVertexListOfStripe.hxx b/inc/ChFiDS_IndexedDataMapOfVertexListOfStripe.hxx
index 62b0850..b7d5ccd 100644
--- a/inc/ChFiDS_IndexedDataMapOfVertexListOfStripe.hxx
+++ b/inc/ChFiDS_IndexedDataMapOfVertexListOfStripe.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class ChFiDS_IndexedDataMapNodeOfIndexedDataMapOfVertexListOfStripe;
 class ChFiDS_IndexedDataMapOfVertexListOfStripe  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_IndexedDataMapOfVertexListOfStripe(const Standard_Integer NbBuckets = 1);
diff --git a/inc/ChFiDS_ListIteratorOfListOfHElSpine.hxx b/inc/ChFiDS_ListIteratorOfListOfHElSpine.hxx
index 2a1e0f1..db9cd62 100644
--- a/inc/ChFiDS_ListIteratorOfListOfHElSpine.hxx
+++ b/inc/ChFiDS_ListIteratorOfListOfHElSpine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class ChFiDS_ListNodeOfListOfHElSpine;
 class ChFiDS_ListIteratorOfListOfHElSpine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_ListIteratorOfListOfHElSpine();
diff --git a/inc/ChFiDS_ListIteratorOfListOfStripe.hxx b/inc/ChFiDS_ListIteratorOfListOfStripe.hxx
index 464f445..3f109ac 100644
--- a/inc/ChFiDS_ListIteratorOfListOfStripe.hxx
+++ b/inc/ChFiDS_ListIteratorOfListOfStripe.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class ChFiDS_ListNodeOfListOfStripe;
 class ChFiDS_ListIteratorOfListOfStripe  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_ListIteratorOfListOfStripe();
diff --git a/inc/ChFiDS_ListIteratorOfRegularities.hxx b/inc/ChFiDS_ListIteratorOfRegularities.hxx
index 9672187..4d37bbc 100644
--- a/inc/ChFiDS_ListIteratorOfRegularities.hxx
+++ b/inc/ChFiDS_ListIteratorOfRegularities.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class ChFiDS_ListNodeOfRegularities;
 class ChFiDS_ListIteratorOfRegularities  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_ListIteratorOfRegularities();
diff --git a/inc/ChFiDS_ListOfHElSpine.hxx b/inc/ChFiDS_ListOfHElSpine.hxx
index 433b0bd..4fead40 100644
--- a/inc/ChFiDS_ListOfHElSpine.hxx
+++ b/inc/ChFiDS_ListOfHElSpine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class ChFiDS_ListNodeOfListOfHElSpine;
 class ChFiDS_ListOfHElSpine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_ListOfHElSpine();
diff --git a/inc/ChFiDS_ListOfStripe.hxx b/inc/ChFiDS_ListOfStripe.hxx
index c26855c..a52e5c9 100644
--- a/inc/ChFiDS_ListOfStripe.hxx
+++ b/inc/ChFiDS_ListOfStripe.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class ChFiDS_ListNodeOfListOfStripe;
 class ChFiDS_ListOfStripe  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_ListOfStripe();
diff --git a/inc/ChFiDS_Map.hxx b/inc/ChFiDS_Map.hxx
index b5be4e5..64173ec 100644
--- a/inc/ChFiDS_Map.hxx
+++ b/inc/ChFiDS_Map.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopTools_ListOfShape;
 class ChFiDS_Map  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Create an empty Map <br>
   Standard_EXPORT   ChFiDS_Map();
diff --git a/inc/ChFiDS_Regul.hxx b/inc/ChFiDS_Regul.hxx
index f1eb1ab..ffa8c3c 100644
--- a/inc/ChFiDS_Regul.hxx
+++ b/inc/ChFiDS_Regul.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class ChFiDS_Regul  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_Regul();
diff --git a/inc/ChFiDS_Regularities.hxx b/inc/ChFiDS_Regularities.hxx
index 13a1078..def138c 100644
--- a/inc/ChFiDS_Regularities.hxx
+++ b/inc/ChFiDS_Regularities.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class ChFiDS_ListNodeOfRegularities;
 class ChFiDS_Regularities  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_Regularities();
diff --git a/inc/ChFiDS_SecArray1.hxx b/inc/ChFiDS_SecArray1.hxx
index 4ba45a7..4300c51 100644
--- a/inc/ChFiDS_SecArray1.hxx
+++ b/inc/ChFiDS_SecArray1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class ChFiDS_CircSection;
 class ChFiDS_SecArray1  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_SecArray1(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/ChFiDS_SequenceOfSpine.hxx b/inc/ChFiDS_SequenceOfSpine.hxx
index f4a80d7..9ace55e 100644
--- a/inc/ChFiDS_SequenceOfSpine.hxx
+++ b/inc/ChFiDS_SequenceOfSpine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class ChFiDS_SequenceNodeOfSequenceOfSpine;
 class ChFiDS_SequenceOfSpine  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       ChFiDS_SequenceOfSpine();
diff --git a/inc/ChFiDS_SequenceOfSurfData.hxx b/inc/ChFiDS_SequenceOfSurfData.hxx
index 846ae5c..bac251a 100644
--- a/inc/ChFiDS_SequenceOfSurfData.hxx
+++ b/inc/ChFiDS_SequenceOfSurfData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class ChFiDS_SequenceNodeOfSequenceOfSurfData;
 class ChFiDS_SequenceOfSurfData  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       ChFiDS_SequenceOfSurfData();
diff --git a/inc/ChFiDS_StripeArray1.hxx b/inc/ChFiDS_StripeArray1.hxx
index 2423466..c01ee05 100644
--- a/inc/ChFiDS_StripeArray1.hxx
+++ b/inc/ChFiDS_StripeArray1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class ChFiDS_Stripe;
 class ChFiDS_StripeArray1  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_StripeArray1(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/ChFiDS_StripeMap.hxx b/inc/ChFiDS_StripeMap.hxx
index 3d573bd..ae73842 100644
--- a/inc/ChFiDS_StripeMap.hxx
+++ b/inc/ChFiDS_StripeMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class ChFiDS_ListOfStripe;
 class ChFiDS_StripeMap  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiDS_StripeMap();
diff --git a/inc/ChFiKPart_ComputeData.hxx b/inc/ChFiKPart_ComputeData.hxx
index 1bc76d4..7a4936c 100644
--- a/inc/ChFiKPart_ComputeData.hxx
+++ b/inc/ChFiKPart_ComputeData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class gp_Pnt2d;
 class ChFiKPart_ComputeData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes a simple fillet in several particular <br>
 //!          cases. <br>
diff --git a/inc/ChFiKPart_DataMapIteratorOfRstMap.hxx b/inc/ChFiKPart_DataMapIteratorOfRstMap.hxx
index 080dcd9..4e298c9 100644
--- a/inc/ChFiKPart_DataMapIteratorOfRstMap.hxx
+++ b/inc/ChFiKPart_DataMapIteratorOfRstMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class ChFiKPart_DataMapNodeOfRstMap;
 class ChFiKPart_DataMapIteratorOfRstMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiKPart_DataMapIteratorOfRstMap();
diff --git a/inc/ChFiKPart_RstMap.hxx b/inc/ChFiKPart_RstMap.hxx
index 7b94953..a2f0d20 100644
--- a/inc/ChFiKPart_RstMap.hxx
+++ b/inc/ChFiKPart_RstMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class ChFiKPart_DataMapIteratorOfRstMap;
 class ChFiKPart_RstMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ChFiKPart_RstMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Contap_ContAna.hxx b/inc/Contap_ContAna.hxx
index ba80df7..a42708d 100644
--- a/inc/Contap_ContAna.hxx
+++ b/inc/Contap_ContAna.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class gp_Lin;
 class Contap_ContAna  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Contap_ContAna();
diff --git a/inc/Contap_Contour.hxx b/inc/Contap_Contour.hxx
index 5aab764..84c7fd1 100644
--- a/inc/Contap_Contour.hxx
+++ b/inc/Contap_Contour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -98,18 +101,7 @@ class gp_Pnt;
 class Contap_Contour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Contap_Contour();
diff --git a/inc/Contap_HContTool.hxx b/inc/Contap_HContTool.hxx
index aaaab80..eb6988a 100644
--- a/inc/Contap_HContTool.hxx
+++ b/inc/Contap_HContTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class gp_Pnt;
 class Contap_HContTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer NbSamplesU(const Handle(Adaptor3d_HSurface)& S,const Standard_Real u1,const Standard_Real u2) ;
diff --git a/inc/Contap_HCurve2dTool.hxx b/inc/Contap_HCurve2dTool.hxx
index a962be5..820f261 100644
--- a/inc/Contap_HCurve2dTool.hxx
+++ b/inc/Contap_HCurve2dTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class Geom2d_BSplineCurve;
 class Contap_HCurve2dTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstParameter(const Handle(Adaptor2d_HCurve2d)& C) ;
diff --git a/inc/Contap_SequenceOfIWLineOfTheIWalkingOfContour.hxx b/inc/Contap_SequenceOfIWLineOfTheIWalkingOfContour.hxx
index d153d3e..de32395 100644
--- a/inc/Contap_SequenceOfIWLineOfTheIWalkingOfContour.hxx
+++ b/inc/Contap_SequenceOfIWLineOfTheIWalkingOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Contap_SequenceNodeOfSequenceOfIWLineOfTheIWalkingOfContour;
 class Contap_SequenceOfIWLineOfTheIWalkingOfContour  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Contap_SequenceOfIWLineOfTheIWalkingOfContour();
diff --git a/inc/Contap_SequenceOfPathPointOfTheSearchOfContour.hxx b/inc/Contap_SequenceOfPathPointOfTheSearchOfContour.hxx
index aaf7130..cf424fa 100644
--- a/inc/Contap_SequenceOfPathPointOfTheSearchOfContour.hxx
+++ b/inc/Contap_SequenceOfPathPointOfTheSearchOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Contap_SequenceNodeOfSequenceOfPathPointOfTheSearchOfContour;
 class Contap_SequenceOfPathPointOfTheSearchOfContour  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Contap_SequenceOfPathPointOfTheSearchOfContour();
diff --git a/inc/Contap_SequenceOfSegmentOfTheSearchOfContour.hxx b/inc/Contap_SequenceOfSegmentOfTheSearchOfContour.hxx
index 01e8a8d..d016a9a 100644
--- a/inc/Contap_SequenceOfSegmentOfTheSearchOfContour.hxx
+++ b/inc/Contap_SequenceOfSegmentOfTheSearchOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Contap_SequenceNodeOfSequenceOfSegmentOfTheSearchOfContour;
 class Contap_SequenceOfSegmentOfTheSearchOfContour  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Contap_SequenceOfSegmentOfTheSearchOfContour();
diff --git a/inc/Contap_TheArcFunctionOfContour.hxx b/inc/Contap_TheArcFunctionOfContour.hxx
index e3bc5c3..3ccc948 100644
--- a/inc/Contap_TheArcFunctionOfContour.hxx
+++ b/inc/Contap_TheArcFunctionOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class IntSurf_Quadric;
 class Contap_TheArcFunctionOfContour  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Contap_TheArcFunctionOfContour();
diff --git a/inc/Contap_TheIWalkingOfContour.hxx b/inc/Contap_TheIWalkingOfContour.hxx
index 784760d..174b449 100644
--- a/inc/Contap_TheIWalkingOfContour.hxx
+++ b/inc/Contap_TheIWalkingOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -81,18 +84,7 @@ class IntSurf_PntOn2S;
 class Contap_TheIWalkingOfContour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Contap_TheIWalkingOfContour();
diff --git a/inc/Contap_TheLineOfContour.hxx b/inc/Contap_TheLineOfContour.hxx
index d004892..a356c01 100644
--- a/inc/Contap_TheLineOfContour.hxx
+++ b/inc/Contap_TheLineOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class gp_Circ;
 class Contap_TheLineOfContour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Contap_TheLineOfContour();
diff --git a/inc/Contap_ThePathPointOfTheSearchOfContour.hxx b/inc/Contap_ThePathPointOfTheSearchOfContour.hxx
index 76e42d6..8337aef 100644
--- a/inc/Contap_ThePathPointOfTheSearchOfContour.hxx
+++ b/inc/Contap_ThePathPointOfTheSearchOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class gp_Pnt;
 class Contap_ThePathPointOfTheSearchOfContour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Contap_ThePathPointOfTheSearchOfContour();
diff --git a/inc/Contap_ThePointOfContour.hxx b/inc/Contap_ThePointOfContour.hxx
index a61a741..bcff2cc 100644
--- a/inc/Contap_ThePointOfContour.hxx
+++ b/inc/Contap_ThePointOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class IntSurf_Transition;
 class Contap_ThePointOfContour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Contap_ThePointOfContour();
diff --git a/inc/Contap_TheSearchInsideOfContour.hxx b/inc/Contap_TheSearchInsideOfContour.hxx
index c68634c..6fa9fe9 100644
--- a/inc/Contap_TheSearchInsideOfContour.hxx
+++ b/inc/Contap_TheSearchInsideOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class IntSurf_InteriorPoint;
 class Contap_TheSearchInsideOfContour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Contap_TheSearchInsideOfContour();
diff --git a/inc/Contap_TheSearchOfContour.hxx b/inc/Contap_TheSearchOfContour.hxx
index 6dcdf20..73e7d9c 100644
--- a/inc/Contap_TheSearchOfContour.hxx
+++ b/inc/Contap_TheSearchOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class Contap_SequenceNodeOfSequenceOfSegmentOfTheSearchOfContour;
 class Contap_TheSearchOfContour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Contap_TheSearchOfContour();
diff --git a/inc/Contap_TheSegmentOfTheSearchOfContour.hxx b/inc/Contap_TheSegmentOfTheSearchOfContour.hxx
index 9b9bc74..66a3d23 100644
--- a/inc/Contap_TheSegmentOfTheSearchOfContour.hxx
+++ b/inc/Contap_TheSegmentOfTheSearchOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Contap_ThePathPointOfTheSearchOfContour;
 class Contap_TheSegmentOfTheSearchOfContour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Contap_TheSegmentOfTheSearchOfContour();
diff --git a/inc/Contap_TheSequenceOfLineOfContour.hxx b/inc/Contap_TheSequenceOfLineOfContour.hxx
index 9a3fac2..f3aeaf5 100644
--- a/inc/Contap_TheSequenceOfLineOfContour.hxx
+++ b/inc/Contap_TheSequenceOfLineOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Contap_SequenceNodeOfTheSequenceOfLineOfContour;
 class Contap_TheSequenceOfLineOfContour  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Contap_TheSequenceOfLineOfContour();
diff --git a/inc/Contap_TheSequenceOfPointOfContour.hxx b/inc/Contap_TheSequenceOfPointOfContour.hxx
index adff4e8..12179de 100644
--- a/inc/Contap_TheSequenceOfPointOfContour.hxx
+++ b/inc/Contap_TheSequenceOfPointOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Contap_SequenceNodeOfTheSequenceOfPointOfContour;
 class Contap_TheSequenceOfPointOfContour  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Contap_TheSequenceOfPointOfContour();
diff --git a/inc/Contap_TheSurfFunctionOfContour.hxx b/inc/Contap_TheSurfFunctionOfContour.hxx
index 17be066..a17b76b 100644
--- a/inc/Contap_TheSurfFunctionOfContour.hxx
+++ b/inc/Contap_TheSurfFunctionOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -60,18 +63,7 @@ class gp_Dir2d;
 class Contap_TheSurfFunctionOfContour  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Contap_TheSurfFunctionOfContour();
diff --git a/inc/Contap_TheSurfPropsOfContour.hxx b/inc/Contap_TheSurfPropsOfContour.hxx
index 7a0470b..75d748e 100644
--- a/inc/Contap_TheSurfPropsOfContour.hxx
+++ b/inc/Contap_TheSurfPropsOfContour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class gp_Vec;
 class Contap_TheSurfPropsOfContour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Normale(const Handle(Adaptor3d_HSurface)& S,const Standard_Real U,const Standard_Real V,gp_Pnt& P,gp_Vec& N) ;
diff --git a/inc/Convert_CircleToBSplineCurve.hxx b/inc/Convert_CircleToBSplineCurve.hxx
index 3128bc6..6bccc54 100644
--- a/inc/Convert_CircleToBSplineCurve.hxx
+++ b/inc/Convert_CircleToBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Circ2d;
 class Convert_CircleToBSplineCurve  : public Convert_ConicToBSplineCurve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  The equivalent B-spline curve has the same orientation <br>
diff --git a/inc/Convert_CompBezierCurves2dToBSplineCurve2d.hxx b/inc/Convert_CompBezierCurves2dToBSplineCurve2d.hxx
index 4221180..60baf6c 100644
--- a/inc/Convert_CompBezierCurves2dToBSplineCurve2d.hxx
+++ b/inc/Convert_CompBezierCurves2dToBSplineCurve2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class TColStd_Array1OfInteger;
 class Convert_CompBezierCurves2dToBSplineCurve2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a framework for converting a sequence of <br>
 //! adjacent non-rational Bezier curves into a BSpline curve. <br>
diff --git a/inc/Convert_CompBezierCurvesToBSplineCurve.hxx b/inc/Convert_CompBezierCurvesToBSplineCurve.hxx
index 0354d03..54f8728 100644
--- a/inc/Convert_CompBezierCurvesToBSplineCurve.hxx
+++ b/inc/Convert_CompBezierCurvesToBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class TColStd_Array1OfInteger;
 class Convert_CompBezierCurvesToBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a framework for converting a sequence of <br>
 //! adjacent non-rational Bezier curves into a BSpline curve. <br>
diff --git a/inc/Convert_CompPolynomialToPoles.hxx b/inc/Convert_CompPolynomialToPoles.hxx
index 68b4f85..fa12a65 100644
--- a/inc/Convert_CompPolynomialToPoles.hxx
+++ b/inc/Convert_CompPolynomialToPoles.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -62,18 +65,7 @@ class TColStd_Array2OfReal;
 class Convert_CompPolynomialToPoles  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Warning! <br>
 //!           Continuity can be at MOST the maximum degree of <br>
diff --git a/inc/Convert_ConeToBSplineSurface.hxx b/inc/Convert_ConeToBSplineSurface.hxx
index b3e2dd9..8ef9a73 100644
--- a/inc/Convert_ConeToBSplineSurface.hxx
+++ b/inc/Convert_ConeToBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Cone;
 class Convert_ConeToBSplineSurface  : public Convert_ElementarySurfaceToBSplineSurface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  The equivalent B-spline surface as the same orientation as the <br>
diff --git a/inc/Convert_ConicToBSplineCurve.hxx b/inc/Convert_ConicToBSplineCurve.hxx
index 41f7f74..a77feb6 100644
--- a/inc/Convert_ConicToBSplineCurve.hxx
+++ b/inc/Convert_ConicToBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class gp_Pnt2d;
 class Convert_ConicToBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the degree of the BSpline curve whose data is <br>
 //! computed in this framework. <br>
diff --git a/inc/Convert_CylinderToBSplineSurface.hxx b/inc/Convert_CylinderToBSplineSurface.hxx
index 1ceeb76..18eb509 100644
--- a/inc/Convert_CylinderToBSplineSurface.hxx
+++ b/inc/Convert_CylinderToBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class gp_Cylinder;
 class Convert_CylinderToBSplineSurface  : public Convert_ElementarySurfaceToBSplineSurface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  The equivalent B-splineSurface as the same orientation as the <br>
diff --git a/inc/Convert_ElementarySurfaceToBSplineSurface.hxx b/inc/Convert_ElementarySurfaceToBSplineSurface.hxx
index bc2bd96..313a40c 100644
--- a/inc/Convert_ElementarySurfaceToBSplineSurface.hxx
+++ b/inc/Convert_ElementarySurfaceToBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -70,18 +73,7 @@ class gp_Pnt;
 class Convert_ElementarySurfaceToBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT     Standard_Integer UDegree() const;
diff --git a/inc/Convert_EllipseToBSplineCurve.hxx b/inc/Convert_EllipseToBSplineCurve.hxx
index fa95b96..068e0b1 100644
--- a/inc/Convert_EllipseToBSplineCurve.hxx
+++ b/inc/Convert_EllipseToBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class gp_Elips2d;
 class Convert_EllipseToBSplineCurve  : public Convert_ConicToBSplineCurve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! The equivalent B-spline curve has the same orientation <br>
 //!  as the ellipse E. <br>
diff --git a/inc/Convert_GridPolynomialToPoles.hxx b/inc/Convert_GridPolynomialToPoles.hxx
index c0f8ac8..56508e4 100644
--- a/inc/Convert_GridPolynomialToPoles.hxx
+++ b/inc/Convert_GridPolynomialToPoles.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TColStd_HArray2OfInteger;
 class Convert_GridPolynomialToPoles  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  To    only  one   polynomial  Surface. <br>
 //!          The  Length  of  <PolynomialUIntervals> and <PolynomialVIntervals> <br>
diff --git a/inc/Convert_HyperbolaToBSplineCurve.hxx b/inc/Convert_HyperbolaToBSplineCurve.hxx
index 702984c..20f8570 100644
--- a/inc/Convert_HyperbolaToBSplineCurve.hxx
+++ b/inc/Convert_HyperbolaToBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_Hypr2d;
 class Convert_HyperbolaToBSplineCurve  : public Convert_ConicToBSplineCurve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  The hyperbola H is limited between the parametric values U1, U2 <br>
diff --git a/inc/Convert_ParabolaToBSplineCurve.hxx b/inc/Convert_ParabolaToBSplineCurve.hxx
index a2261fe..7904590 100644
--- a/inc/Convert_ParabolaToBSplineCurve.hxx
+++ b/inc/Convert_ParabolaToBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class gp_Parab2d;
 class Convert_ParabolaToBSplineCurve  : public Convert_ConicToBSplineCurve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  The parabola Prb is limited between the parametric values U1, U2 <br>
diff --git a/inc/Convert_SequenceOfArray1OfPoles.hxx b/inc/Convert_SequenceOfArray1OfPoles.hxx
index 0eced3a..015d46c 100644
--- a/inc/Convert_SequenceOfArray1OfPoles.hxx
+++ b/inc/Convert_SequenceOfArray1OfPoles.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Convert_SequenceNodeOfSequenceOfArray1OfPoles;
 class Convert_SequenceOfArray1OfPoles  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Convert_SequenceOfArray1OfPoles();
diff --git a/inc/Convert_SphereToBSplineSurface.hxx b/inc/Convert_SphereToBSplineSurface.hxx
index 6bbd69c..3238405 100644
--- a/inc/Convert_SphereToBSplineSurface.hxx
+++ b/inc/Convert_SphereToBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Sphere;
 class Convert_SphereToBSplineSurface  : public Convert_ElementarySurfaceToBSplineSurface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  The equivalent B-spline surface as the same orientation as the <br>
diff --git a/inc/Convert_TorusToBSplineSurface.hxx b/inc/Convert_TorusToBSplineSurface.hxx
index 835aaf3..028b34c 100644
--- a/inc/Convert_TorusToBSplineSurface.hxx
+++ b/inc/Convert_TorusToBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Torus;
 class Convert_TorusToBSplineSurface  : public Convert_ElementarySurfaceToBSplineSurface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  The equivalent B-spline surface as the same orientation as the <br>
diff --git a/inc/DBC_BaseArray.hxx b/inc/DBC_BaseArray.hxx
index edc192e..badcf39 100644
--- a/inc/DBC_BaseArray.hxx
+++ b/inc/DBC_BaseArray.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(DBC_BaseArray);
 class DBC_BaseArray  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an BaseArray of NULL size <br>
   Standard_EXPORT   DBC_BaseArray();
diff --git a/inc/DBC_VArrayOfCharacter.hxx b/inc/DBC_VArrayOfCharacter.hxx
index c1edba7..3a49415 100644
--- a/inc/DBC_VArrayOfCharacter.hxx
+++ b/inc/DBC_VArrayOfCharacter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,22 +46,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(DBC_VArrayOfCharacter
 class DBC_VArrayOfCharacter  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DBC_VArrayOfCharacter();
diff --git a/inc/DBC_VArrayOfExtCharacter.hxx b/inc/DBC_VArrayOfExtCharacter.hxx
index fa26c5f..c08be29 100644
--- a/inc/DBC_VArrayOfExtCharacter.hxx
+++ b/inc/DBC_VArrayOfExtCharacter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(DBC_VArrayOfExtCharac
 class DBC_VArrayOfExtCharacter  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DBC_VArrayOfExtCharacter();
diff --git a/inc/DBC_VArrayOfInteger.hxx b/inc/DBC_VArrayOfInteger.hxx
index 69a4a62..c094a01 100644
--- a/inc/DBC_VArrayOfInteger.hxx
+++ b/inc/DBC_VArrayOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(DBC_VArrayOfInteger);
 class DBC_VArrayOfInteger  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DBC_VArrayOfInteger();
diff --git a/inc/DBC_VArrayOfReal.hxx b/inc/DBC_VArrayOfReal.hxx
index 7f446bb..18ad403 100644
--- a/inc/DBC_VArrayOfReal.hxx
+++ b/inc/DBC_VArrayOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(DBC_VArrayOfReal);
 class DBC_VArrayOfReal  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DBC_VArrayOfReal();
diff --git a/inc/DBC_VArrayTNodeOfVArrayOfCharacter.hxx b/inc/DBC_VArrayTNodeOfVArrayOfCharacter.hxx
index 5560ca8..3eb51ef 100644
--- a/inc/DBC_VArrayTNodeOfVArrayOfCharacter.hxx
+++ b/inc/DBC_VArrayTNodeOfVArrayOfCharacter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,22 +33,7 @@ class DBC_VArrayNodeOfVArrayOfCharacter;
 class DBC_VArrayTNodeOfVArrayOfCharacter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       DBC_VArrayTNodeOfVArrayOfCharacter();
diff --git a/inc/DBC_VArrayTNodeOfVArrayOfExtCharacter.hxx b/inc/DBC_VArrayTNodeOfVArrayOfExtCharacter.hxx
index 5c87afd..71cdba4 100644
--- a/inc/DBC_VArrayTNodeOfVArrayOfExtCharacter.hxx
+++ b/inc/DBC_VArrayTNodeOfVArrayOfExtCharacter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,22 +33,7 @@ class DBC_VArrayNodeOfVArrayOfExtCharacter;
 class DBC_VArrayTNodeOfVArrayOfExtCharacter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       DBC_VArrayTNodeOfVArrayOfExtCharacter();
diff --git a/inc/DBC_VArrayTNodeOfVArrayOfInteger.hxx b/inc/DBC_VArrayTNodeOfVArrayOfInteger.hxx
index 3e081d1..5f56531 100644
--- a/inc/DBC_VArrayTNodeOfVArrayOfInteger.hxx
+++ b/inc/DBC_VArrayTNodeOfVArrayOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,22 +33,8 @@ class DBC_VArrayNodeOfVArrayOfInteger;
 class DBC_VArrayTNodeOfVArrayOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       DBC_VArrayTNodeOfVArrayOfInteger();
   
diff --git a/inc/DBC_VArrayTNodeOfVArrayOfReal.hxx b/inc/DBC_VArrayTNodeOfVArrayOfReal.hxx
index fcc3cb6..537602a 100644
--- a/inc/DBC_VArrayTNodeOfVArrayOfReal.hxx
+++ b/inc/DBC_VArrayTNodeOfVArrayOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,22 +33,8 @@ class DBC_VArrayNodeOfVArrayOfReal;
 class DBC_VArrayTNodeOfVArrayOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       DBC_VArrayTNodeOfVArrayOfReal();
   
diff --git a/inc/DBRep.hxx b/inc/DBRep.hxx
index 99ac379..299819b 100644
--- a/inc/DBRep.hxx
+++ b/inc/DBRep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class DBRep_ListIteratorOfListOfHideData;
 class DBRep  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Sets  <S> in the  variable  <Name>.  Overwrite the <br>
 //!          variable if already set. <br>
diff --git a/inc/DBRep_HideData.hxx b/inc/DBRep_HideData.hxx
index 942cc28..24b2058 100644
--- a/inc/DBRep_HideData.hxx
+++ b/inc/DBRep_HideData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class Draw_Color;
 class DBRep_HideData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DBRep_HideData();
diff --git a/inc/DBRep_IsoBuilder.hxx b/inc/DBRep_IsoBuilder.hxx
index ab67d19..bd3bf3b 100644
--- a/inc/DBRep_IsoBuilder.hxx
+++ b/inc/DBRep_IsoBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class DBRep_Face;
 class DBRep_IsoBuilder  : public Geom2dHatch_Hatcher {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates the builder. <br>
   Standard_EXPORT   DBRep_IsoBuilder(const TopoDS_Face& TopologicalFace,const Standard_Real Infinite,const Standard_Integer NbIsos);
diff --git a/inc/DBRep_ListIteratorOfListOfEdge.hxx b/inc/DBRep_ListIteratorOfListOfEdge.hxx
index 02c97da..7d02608 100644
--- a/inc/DBRep_ListIteratorOfListOfEdge.hxx
+++ b/inc/DBRep_ListIteratorOfListOfEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class DBRep_ListNodeOfListOfEdge;
 class DBRep_ListIteratorOfListOfEdge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DBRep_ListIteratorOfListOfEdge();
diff --git a/inc/DBRep_ListIteratorOfListOfFace.hxx b/inc/DBRep_ListIteratorOfListOfFace.hxx
index 5c0eda3..a603606 100644
--- a/inc/DBRep_ListIteratorOfListOfFace.hxx
+++ b/inc/DBRep_ListIteratorOfListOfFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class DBRep_ListNodeOfListOfFace;
 class DBRep_ListIteratorOfListOfFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DBRep_ListIteratorOfListOfFace();
diff --git a/inc/DBRep_ListIteratorOfListOfHideData.hxx b/inc/DBRep_ListIteratorOfListOfHideData.hxx
index 1b98250..bbf4d74 100644
--- a/inc/DBRep_ListIteratorOfListOfHideData.hxx
+++ b/inc/DBRep_ListIteratorOfListOfHideData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class DBRep_ListNodeOfListOfHideData;
 class DBRep_ListIteratorOfListOfHideData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DBRep_ListIteratorOfListOfHideData();
diff --git a/inc/DBRep_ListOfEdge.hxx b/inc/DBRep_ListOfEdge.hxx
index ee57f12..0baf159 100644
--- a/inc/DBRep_ListOfEdge.hxx
+++ b/inc/DBRep_ListOfEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class DBRep_ListNodeOfListOfEdge;
 class DBRep_ListOfEdge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DBRep_ListOfEdge();
diff --git a/inc/DBRep_ListOfFace.hxx b/inc/DBRep_ListOfFace.hxx
index f24f48f..efb2515 100644
--- a/inc/DBRep_ListOfFace.hxx
+++ b/inc/DBRep_ListOfFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class DBRep_ListNodeOfListOfFace;
 class DBRep_ListOfFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DBRep_ListOfFace();
diff --git a/inc/DBRep_ListOfHideData.hxx b/inc/DBRep_ListOfHideData.hxx
index 860de4a..ba86467 100644
--- a/inc/DBRep_ListOfHideData.hxx
+++ b/inc/DBRep_ListOfHideData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class DBRep_ListNodeOfListOfHideData;
 class DBRep_ListOfHideData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DBRep_ListOfHideData();
diff --git a/inc/DDF.hxx b/inc/DDF.hxx
index 91a00c0..163ae14 100644
--- a/inc/DDF.hxx
+++ b/inc/DDF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class DDF_StackIteratorOfTransactionStack;
 class DDF  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Search in draw  directory the framewok  identified <br>
 //!          by its name <Name>. returns True if found. In that <br>
diff --git a/inc/DDF_StackIteratorOfTransactionStack.hxx b/inc/DDF_StackIteratorOfTransactionStack.hxx
index 6e021ca..01ddecd 100644
--- a/inc/DDF_StackIteratorOfTransactionStack.hxx
+++ b/inc/DDF_StackIteratorOfTransactionStack.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class DDF_StackNodeOfTransactionStack;
 class DDF_StackIteratorOfTransactionStack  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DDF_StackIteratorOfTransactionStack();
diff --git a/inc/DDF_TransactionStack.hxx b/inc/DDF_TransactionStack.hxx
index 6da26d0..9ffed2f 100644
--- a/inc/DDF_TransactionStack.hxx
+++ b/inc/DDF_TransactionStack.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class DDF_StackNodeOfTransactionStack;
 class DDF_TransactionStack  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DDF_TransactionStack();
diff --git a/inc/DDataStd.hxx b/inc/DDataStd.hxx
index 0bd607e..81dc94b 100644
--- a/inc/DDataStd.hxx
+++ b/inc/DDataStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class DDataStd_TreeBrowser;
 class DDataStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! command to set and get modeling attributes <br>
   Standard_EXPORT   static  void AllCommands(Draw_Interpretor& I) ;
diff --git a/inc/DDocStd.hxx b/inc/DDocStd.hxx
index 2e76372..b98c192 100644
--- a/inc/DDocStd.hxx
+++ b/inc/DDocStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class DDocStd_DrawDocument;
 class DDocStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Find(Handle(TDocStd_Application)& Appli,const Standard_Boolean Complain = Standard_True) ;
diff --git a/inc/DNaming.hxx b/inc/DNaming.hxx
index e8c8ddf..419a7dc 100644
--- a/inc/DNaming.hxx
+++ b/inc/DNaming.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -83,18 +86,7 @@ class DNaming_DataMapIteratorOfDataMapOfShapeOfName;
 class DNaming  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_TDataStd_Real GetReal(const Handle(TFunction_Function)& theFunction,const Standard_Integer thePosition) ;
diff --git a/inc/DNaming_DataMapIteratorOfDataMapOfShapeOfName.hxx b/inc/DNaming_DataMapIteratorOfDataMapOfShapeOfName.hxx
index 4a34267..1e35942 100644
--- a/inc/DNaming_DataMapIteratorOfDataMapOfShapeOfName.hxx
+++ b/inc/DNaming_DataMapIteratorOfDataMapOfShapeOfName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class DNaming_DataMapNodeOfDataMapOfShapeOfName;
 class DNaming_DataMapIteratorOfDataMapOfShapeOfName  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DNaming_DataMapIteratorOfDataMapOfShapeOfName();
diff --git a/inc/DNaming_DataMapOfShapeOfName.hxx b/inc/DNaming_DataMapOfShapeOfName.hxx
index c7722f4..6d7b6b7 100644
--- a/inc/DNaming_DataMapOfShapeOfName.hxx
+++ b/inc/DNaming_DataMapOfShapeOfName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class DNaming_DataMapIteratorOfDataMapOfShapeOfName;
 class DNaming_DataMapOfShapeOfName  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   DNaming_DataMapOfShapeOfName(const Standard_Integer NbBuckets = 1);
diff --git a/inc/DPrsStd.hxx b/inc/DPrsStd.hxx
index fa9e43a..da6705d 100644
--- a/inc/DPrsStd.hxx
+++ b/inc/DPrsStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -21,18 +24,7 @@ class Draw_Interpretor;
 class DPrsStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! to load all sketch commands <br>
   Standard_EXPORT   static  void AllCommands(Draw_Interpretor& I) ;
diff --git a/inc/Dico_Dictionary.gxx b/inc/Dico_Dictionary.gxx
index 999cda0..c3e029b 100644
--- a/inc/Dico_Dictionary.gxx
+++ b/inc/Dico_Dictionary.gxx
@@ -53,7 +53,8 @@ Dico_Dictionary::Dico_Dictionary ()
   (const Standard_CString name, const Standard_Boolean exact) const
 {
   Handle(Dico_Dictionary) acell;
-  Standard_Integer reslev,stat;
+  Standard_Integer stat;
+  Standard_Size reslev;
   SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
   if (stat != 0 || reslev != 0) return Standard_False;
   if (acell->HasIt()) return Standard_True;
@@ -65,7 +66,8 @@ Dico_Dictionary::Dico_Dictionary ()
   (const TCollection_AsciiString& name, const Standard_Boolean exact) const
 {
   Handle(Dico_Dictionary) acell;
-  Standard_Integer reslev,stat;
+  Standard_Integer stat;
+  Standard_Size reslev;
   SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
   if (stat != 0 || reslev != 0) return Standard_False;
   if (acell->HasIt()) return Standard_True;
@@ -79,7 +81,8 @@ Dico_Dictionary::Dico_Dictionary ()
   (const Standard_CString name, const Standard_Boolean exact) const
 {
   Handle(Dico_Dictionary) acell;
-  Standard_Integer reslev,stat;
+  Standard_Integer stat;
+  Standard_Size reslev;
   SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
   if (stat != 0 || reslev != 0)
     Standard_NoSuchObject::Raise("Dictionary : Item");
@@ -93,7 +96,8 @@ Dico_Dictionary::Dico_Dictionary ()
   (const TCollection_AsciiString& name, const Standard_Boolean exact) const
 {
   Handle(Dico_Dictionary) acell;
-  Standard_Integer reslev,stat;
+  Standard_Integer stat;
+  Standard_Size reslev;
   SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
   if (stat != 0 || reslev != 0)
     Standard_NoSuchObject::Raise("Dictionary : Item");
@@ -110,7 +114,8 @@ Dico_Dictionary::Dico_Dictionary ()
    TheItem& anitem, const Standard_Boolean exact) const
 {
   Handle(Dico_Dictionary) acell;
-  Standard_Integer reslev,stat;
+  Standard_Integer stat;
+  Standard_Size reslev;
   SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
   if (stat != 0 || reslev != 0) return Standard_False;
   if (acell->HasIt())    {  anitem = acell->It();  return Standard_True;  }
@@ -124,7 +129,8 @@ Dico_Dictionary::Dico_Dictionary ()
    TheItem& anitem, const Standard_Boolean exact) const
 {
   Handle(Dico_Dictionary) acell;
-  Standard_Integer reslev,stat;
+  Standard_Integer stat;
+  Standard_Size reslev;
   SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
   if (stat != 0 || reslev != 0) return Standard_False;
   if (acell->HasIt())    {  anitem = acell->It();  return Standard_True;  }
@@ -140,8 +146,9 @@ Dico_Dictionary::Dico_Dictionary ()
    const TheItem& anitem, const Standard_Boolean exact)
 {
   Handle(Dico_Dictionary) acell;
-  Standard_Integer reslev,stat;
-  Standard_Integer namlen = strlen(name);
+  Standard_Integer stat;
+  Standard_Size reslev;
+  Standard_Size namlen = strlen(name);
   SearchCell (name,namlen,name[0],1, acell,reslev,stat);
   if (!exact && !acell->HasIt())
     {  if (acell->Complete(acell)) { acell->SetIt(anitem); return; }  }
@@ -156,7 +163,8 @@ Dico_Dictionary::Dico_Dictionary ()
    const TheItem& anitem, const Standard_Boolean exact)
 {
   Handle(Dico_Dictionary) acell;
-  Standard_Integer reslev,stat;
+  Standard_Integer stat;
+  Standard_Size reslev;
   Standard_CString namval = name.ToCString();
   Standard_Integer namlen = name.Length();
   SearchCell (namval,namlen,name.Value(1),1, acell,reslev,stat);
@@ -175,8 +183,9 @@ Dico_Dictionary::Dico_Dictionary ()
    Standard_Boolean& isvalued, const Standard_Boolean exact)
 {
   Handle(Dico_Dictionary) acell;
-  Standard_Integer reslev,stat;
-  Standard_Integer namlen = strlen(name);
+  Standard_Integer stat;
+  Standard_Size reslev;
+  Standard_Size namlen = strlen(name);
   SearchCell (name,namlen,name[0],1, acell,reslev,stat);
   if (stat == 0 && reslev == 0) {
     isvalued = acell->HasIt();    // ancien statut
@@ -200,7 +209,8 @@ Dico_Dictionary::Dico_Dictionary ()
    Standard_Boolean& isvalued, const Standard_Boolean exact)
 {
   Handle(Dico_Dictionary) acell;
-  Standard_Integer reslev,stat;
+  Standard_Integer stat;
+  Standard_Size reslev;
   Standard_Integer namlen = name.Length();
   Standard_CString namval = name.ToCString();
   SearchCell (namval,namlen,name.Value(1),1, acell,reslev,stat);
@@ -227,7 +237,8 @@ Dico_Dictionary::Dico_Dictionary ()
    const Standard_Boolean cln, const Standard_Boolean exact)
 {
   Handle(Dico_Dictionary) acell;
-  Standard_Integer reslev,stat;
+  Standard_Integer stat;
+  Standard_Size reslev;
   SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
 //  if (stat != 0) { cout<<"Dictionary : RemoveItem not found"<<endl; return; }
   if (stat != 0) return Standard_False;
@@ -243,7 +254,8 @@ Dico_Dictionary::Dico_Dictionary ()
    const Standard_Boolean cln, const Standard_Boolean exact)
 {
   Handle(Dico_Dictionary) acell;
-  Standard_Integer reslev,stat;
+  Standard_Integer stat;
+  Standard_Size reslev;
   SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
 //  if (stat != 0) { cout<<"Dictionary : RemoveItem not found"<<endl; return; }
   if (stat != 0) return Standard_False;
@@ -338,17 +350,18 @@ Dico_Dictionary::Dico_Dictionary ()
 //  ....                            SearchCell                            ....
 
     void Dico_Dictionary::SearchCell
-      (const Standard_CString name,  const Standard_Integer lmax,
-       const Standard_Character car, const Standard_Integer level,
+      (const Standard_CString name,  const Standard_Size lmax,
+       const Standard_Character car, const Standard_Size level,
        Handle(Dico_Dictionary)& acell,
-       Standard_Integer& reslev,     Standard_Integer& stat) const
+       Standard_Size& reslev,     Standard_Integer& stat) const
 {
   reslev = lmax - level;
   if      (car > thecars[0]) {
     if (thecars[3] == '\0')     {  acell = this;  stat   =  1;    return;  }
     else {                                      // ici, HasNext
       if (thecars[3] > car)     {  acell = this;  stat   =  1;    return;  }
-      Standard_Integer lev2,stat2;
+      Standard_Integer stat2;
+      Standard_Size lev2;
       thenext->SearchCell (name,lmax,car,level,acell,lev2,stat2);
       if (stat2 < 0)            {  acell = this;  stat   =  1;    return;  }
       else                      {  stat = stat2;  reslev = lev2;  return;  }
@@ -360,7 +373,8 @@ Dico_Dictionary::Dico_Dictionary ()
     else {
       Standard_Character carsub = name[level];  // caractere no (level+1);
       if (thecars[2] > carsub)  {  acell = this;  stat   =  0;    return;  }
-      Standard_Integer lev2,stat2;
+      Standard_Integer stat2;
+      Standard_Size lev2;
       thesub->SearchCell (name,lmax,carsub,level+1,acell,lev2,stat2);
       if (stat2 < 0)            {  acell = this;  stat   =  0;    return;  }
       else                      {  stat = stat2;  reslev = lev2;  return;  }
@@ -373,11 +387,11 @@ Dico_Dictionary::Dico_Dictionary ()
 //  ....                            NewCell                            ....
 
     void Dico_Dictionary::NewCell
-  (const Standard_CString name, const Standard_Integer namlen,
+  (const Standard_CString name, const Standard_Size namlen,
    Handle(Dico_Dictionary)& acell,
-   const Standard_Integer reslev, const Standard_Integer stat)
+   const Standard_Size reslev, const Standard_Integer stat)
 {
-  Standard_Integer level = namlen - reslev;
+  Standard_Size level = namlen - reslev;
   if (stat > 0) {    // Creer une cellule next
     Handle(Dico_Dictionary) newcell = new Dico_Dictionary;
     newcell->SetChar( name[level-1] );      // caractere no level
@@ -386,7 +400,7 @@ Dico_Dictionary::Dico_Dictionary ()
     acell = newcell;
   }
 //  A present, voir les sous-niveaux
-  for (Standard_Integer i = level+1; i <= namlen; i ++) {
+  for (Standard_Size i = level+1; i <= namlen; i ++) {
     Handle(Dico_Dictionary) newcell = new Dico_Dictionary;
     newcell->SetChar(name[i-1]);
     if (acell->HasSub()) newcell->SetNext(acell->Sub());
diff --git a/inc/Dico_DictionaryOfInteger.hxx b/inc/Dico_DictionaryOfInteger.hxx
index fd6e649..50af9ba 100644
--- a/inc/Dico_DictionaryOfInteger.hxx
+++ b/inc/Dico_DictionaryOfInteger.hxx
@@ -37,6 +37,9 @@
 #ifndef _Standard_CString_HeaderFile
 #include <Standard_CString.hxx>
 #endif
+#ifndef _Standard_Size_HeaderFile
+#include <Standard_Size.hxx>
+#endif
 class Standard_NoSuchObject;
 class Dico_IteratorOfDictionaryOfInteger;
 class Dico_StackItemOfDictionaryOfInteger;
@@ -113,9 +116,9 @@ private:
   
   Standard_EXPORT     void SetNext(const Handle(Dico_DictionaryOfInteger)& acell) ;
   
-  Standard_EXPORT     void SearchCell(const Standard_CString name,const Standard_Integer lmax,const Standard_Character car,const Standard_Integer level,Handle(Dico_DictionaryOfInteger)& acell,Standard_Integer& reslev,Standard_Integer& stat) const;
+  Standard_EXPORT     void SearchCell(const Standard_CString name,const Standard_Size lmax,const Standard_Character car,const Standard_Size level,Handle(Dico_DictionaryOfInteger)& acell,Standard_Size& reslev,Standard_Integer& stat) const;
   
-  Standard_EXPORT     void NewCell(const Standard_CString name,const Standard_Integer namlen,Handle(Dico_DictionaryOfInteger)& acell,const Standard_Integer reslev,const Standard_Integer stat) ;
+  Standard_EXPORT     void NewCell(const Standard_CString name,const Standard_Size namlen,Handle(Dico_DictionaryOfInteger)& acell,const Standard_Size reslev,const Standard_Integer stat) ;
   
   Standard_EXPORT     Standard_Boolean HasIt() const;
   
diff --git a/inc/Dico_DictionaryOfTransient.hxx b/inc/Dico_DictionaryOfTransient.hxx
index ecd0237..7d60dbf 100644
--- a/inc/Dico_DictionaryOfTransient.hxx
+++ b/inc/Dico_DictionaryOfTransient.hxx
@@ -37,6 +37,9 @@
 #ifndef _Standard_CString_HeaderFile
 #include <Standard_CString.hxx>
 #endif
+#ifndef _Standard_Size_HeaderFile
+#include <Standard_Size.hxx>
+#endif
 #ifndef _Standard_Integer_HeaderFile
 #include <Standard_Integer.hxx>
 #endif
@@ -117,9 +120,9 @@ private:
   
   Standard_EXPORT     void SetNext(const Handle(Dico_DictionaryOfTransient)& acell) ;
   
-  Standard_EXPORT     void SearchCell(const Standard_CString name,const Standard_Integer lmax,const Standard_Character car,const Standard_Integer level,Handle(Dico_DictionaryOfTransient)& acell,Standard_Integer& reslev,Standard_Integer& stat) const;
+  Standard_EXPORT     void SearchCell(const Standard_CString name,const Standard_Size lmax,const Standard_Character car,const Standard_Size level,Handle(Dico_DictionaryOfTransient)& acell,Standard_Size& reslev,Standard_Integer& stat) const;
   
-  Standard_EXPORT     void NewCell(const Standard_CString name,const Standard_Integer namlen,Handle(Dico_DictionaryOfTransient)& acell,const Standard_Integer reslev,const Standard_Integer stat) ;
+  Standard_EXPORT     void NewCell(const Standard_CString name,const Standard_Size namlen,Handle(Dico_DictionaryOfTransient)& acell,const Standard_Size reslev,const Standard_Integer stat) ;
   
   Standard_EXPORT     Standard_Boolean HasIt() const;
   
diff --git a/inc/Dico_Iterator.gxx b/inc/Dico_Iterator.gxx
index 82ccc1d..cb77d8c 100644
--- a/inc/Dico_Iterator.gxx
+++ b/inc/Dico_Iterator.gxx
@@ -38,7 +38,8 @@ Dico_Iterator::Dico_Iterator (const Handle(Dico_Dictionary)& acell)
     thebase = acell;
   } else {
     thename = basename;
-    Standard_Integer reslev,stat;
+    Standard_Integer stat;
+    Standard_Size reslev;
     acell->SearchCell(basename.ToCString(),basename.Length(),basename.Value(1),
 		      1, thebase,reslev,stat);
     if (stat != 0 || reslev != 0) thebase.Nullify();    // loupe
@@ -57,7 +58,8 @@ Dico_Iterator::Dico_Iterator (const Handle(Dico_Dictionary)& acell)
     thebase = acell;
   } else {
     thename.AssignCat(basename);
-    Standard_Integer reslev,stat;
+    Standard_Integer stat;
+    Standard_Size reslev;
     acell->SearchCell (basename,thename.Length(),basename[0],1,
   thebase,reslev,stat);
     if (stat != 0 || reslev != 0) thebase.Nullify();    // loupe
diff --git a/inc/Dico_IteratorOfDictionaryOfInteger.hxx b/inc/Dico_IteratorOfDictionaryOfInteger.hxx
index 3edd6a0..b048cbc 100644
--- a/inc/Dico_IteratorOfDictionaryOfInteger.hxx
+++ b/inc/Dico_IteratorOfDictionaryOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TCollection_AsciiString;
 class Dico_IteratorOfDictionaryOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Dico_IteratorOfDictionaryOfInteger(const Handle(Dico_DictionaryOfInteger)& acell);
diff --git a/inc/Dico_IteratorOfDictionaryOfTransient.hxx b/inc/Dico_IteratorOfDictionaryOfTransient.hxx
index b79eb39..667f885 100644
--- a/inc/Dico_IteratorOfDictionaryOfTransient.hxx
+++ b/inc/Dico_IteratorOfDictionaryOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TCollection_AsciiString;
 class Dico_IteratorOfDictionaryOfTransient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Dico_IteratorOfDictionaryOfTransient(const Handle(Dico_DictionaryOfTransient)& acell);
diff --git a/inc/Draft.hxx b/inc/Draft.hxx
index cba093f..f9f8cfe 100644
--- a/inc/Draft.hxx
+++ b/inc/Draft.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Draft_DataMapIteratorOfDataMapOfVertexVertexInfo;
 class Draft  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the draft angle of the  face <F> using the <br>
 //!          direction <Direction>.  The  method is valid for : <br>
diff --git a/inc/Draft_DataMapIteratorOfDataMapOfEdgeEdgeInfo.hxx b/inc/Draft_DataMapIteratorOfDataMapOfEdgeEdgeInfo.hxx
index 2af2bf9..b3f645f 100644
--- a/inc/Draft_DataMapIteratorOfDataMapOfEdgeEdgeInfo.hxx
+++ b/inc/Draft_DataMapIteratorOfDataMapOfEdgeEdgeInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Draft_DataMapNodeOfDataMapOfEdgeEdgeInfo;
 class Draft_DataMapIteratorOfDataMapOfEdgeEdgeInfo  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draft_DataMapIteratorOfDataMapOfEdgeEdgeInfo();
diff --git a/inc/Draft_DataMapIteratorOfDataMapOfFaceFaceInfo.hxx b/inc/Draft_DataMapIteratorOfDataMapOfFaceFaceInfo.hxx
index 6618824..51d21e1 100644
--- a/inc/Draft_DataMapIteratorOfDataMapOfFaceFaceInfo.hxx
+++ b/inc/Draft_DataMapIteratorOfDataMapOfFaceFaceInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Draft_DataMapNodeOfDataMapOfFaceFaceInfo;
 class Draft_DataMapIteratorOfDataMapOfFaceFaceInfo  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draft_DataMapIteratorOfDataMapOfFaceFaceInfo();
diff --git a/inc/Draft_DataMapIteratorOfDataMapOfVertexVertexInfo.hxx b/inc/Draft_DataMapIteratorOfDataMapOfVertexVertexInfo.hxx
index aaf33d9..7cda885 100644
--- a/inc/Draft_DataMapIteratorOfDataMapOfVertexVertexInfo.hxx
+++ b/inc/Draft_DataMapIteratorOfDataMapOfVertexVertexInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Draft_DataMapNodeOfDataMapOfVertexVertexInfo;
 class Draft_DataMapIteratorOfDataMapOfVertexVertexInfo  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draft_DataMapIteratorOfDataMapOfVertexVertexInfo();
diff --git a/inc/Draft_DataMapOfEdgeEdgeInfo.hxx b/inc/Draft_DataMapOfEdgeEdgeInfo.hxx
index d16a6bb..057bffe 100644
--- a/inc/Draft_DataMapOfEdgeEdgeInfo.hxx
+++ b/inc/Draft_DataMapOfEdgeEdgeInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Draft_DataMapIteratorOfDataMapOfEdgeEdgeInfo;
 class Draft_DataMapOfEdgeEdgeInfo  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draft_DataMapOfEdgeEdgeInfo(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Draft_DataMapOfFaceFaceInfo.hxx b/inc/Draft_DataMapOfFaceFaceInfo.hxx
index d0cc3fe..d67b246 100644
--- a/inc/Draft_DataMapOfFaceFaceInfo.hxx
+++ b/inc/Draft_DataMapOfFaceFaceInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Draft_DataMapIteratorOfDataMapOfFaceFaceInfo;
 class Draft_DataMapOfFaceFaceInfo  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draft_DataMapOfFaceFaceInfo(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Draft_DataMapOfVertexVertexInfo.hxx b/inc/Draft_DataMapOfVertexVertexInfo.hxx
index 2f6b22e..487432a 100644
--- a/inc/Draft_DataMapOfVertexVertexInfo.hxx
+++ b/inc/Draft_DataMapOfVertexVertexInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Draft_DataMapIteratorOfDataMapOfVertexVertexInfo;
 class Draft_DataMapOfVertexVertexInfo  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draft_DataMapOfVertexVertexInfo(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Draft_EdgeInfo.hxx b/inc/Draft_EdgeInfo.hxx
index e6e3c48..6dd92fa 100644
--- a/inc/Draft_EdgeInfo.hxx
+++ b/inc/Draft_EdgeInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Pnt;
 class Draft_EdgeInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draft_EdgeInfo();
diff --git a/inc/Draft_FaceInfo.hxx b/inc/Draft_FaceInfo.hxx
index 4c31fde..0faaa3e 100644
--- a/inc/Draft_FaceInfo.hxx
+++ b/inc/Draft_FaceInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopoDS_Face;
 class Draft_FaceInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draft_FaceInfo();
diff --git a/inc/Draft_VertexInfo.hxx b/inc/Draft_VertexInfo.hxx
index 2262562..e2b8ae5 100644
--- a/inc/Draft_VertexInfo.hxx
+++ b/inc/Draft_VertexInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Pnt;
 class Draft_VertexInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draft_VertexInfo();
diff --git a/inc/Draw.hxx b/inc/Draw.hxx
index 7ed25d3..fc34575 100644
--- a/inc/Draw.hxx
+++ b/inc/Draw.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -72,18 +75,7 @@ class Draw_IndexedMapNodeOfMapOfAsciiString;
 class Draw  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Load(Draw_Interpretor& theDI,const TCollection_AsciiString& theKey,const TCollection_AsciiString& theResourceFileName) ;
diff --git a/inc/DrawDim.hxx b/inc/DrawDim.hxx
index 80fa378..f4618ed 100644
--- a/inc/DrawDim.hxx
+++ b/inc/DrawDim.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class DrawDim_PlanarDiameter;
 class DrawDim  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void DrawShapeName(const TopoDS_Shape& ashape,const Standard_CString aname) ;
diff --git a/inc/DrawTrSurf.hxx b/inc/DrawTrSurf.hxx
index 2c46f30..f2a307d 100644
--- a/inc/DrawTrSurf.hxx
+++ b/inc/DrawTrSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -108,18 +111,7 @@ class DrawTrSurf_Polygon2D;
 class DrawTrSurf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Sets <G> in the variable <Name>.  Overwrite the <br>
 //!          variable if already set. <br>
diff --git a/inc/Draw_Color.hxx b/inc/Draw_Color.hxx
index d94f6b4..c7ffe7a 100644
--- a/inc/Draw_Color.hxx
+++ b/inc/Draw_Color.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Draw_Color);
 class Draw_Color  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draw_Color();
diff --git a/inc/Draw_DataMapIteratorOfMapOfFunctions.hxx b/inc/Draw_DataMapIteratorOfMapOfFunctions.hxx
index e37bfdb..663ee19 100644
--- a/inc/Draw_DataMapIteratorOfMapOfFunctions.hxx
+++ b/inc/Draw_DataMapIteratorOfMapOfFunctions.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Draw_DataMapNodeOfMapOfFunctions;
 class Draw_DataMapIteratorOfMapOfFunctions  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draw_DataMapIteratorOfMapOfFunctions();
diff --git a/inc/Draw_DataMapIteratorOfVMap.hxx b/inc/Draw_DataMapIteratorOfVMap.hxx
index 748754a..3dbdac1 100644
--- a/inc/Draw_DataMapIteratorOfVMap.hxx
+++ b/inc/Draw_DataMapIteratorOfVMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Draw_DataMapNodeOfVMap;
 class Draw_DataMapIteratorOfVMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draw_DataMapIteratorOfVMap();
diff --git a/inc/Draw_Display.hxx b/inc/Draw_Display.hxx
index 5a069cb..b8b91db 100644
--- a/inc/Draw_Display.hxx
+++ b/inc/Draw_Display.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Circ2d;
 class Draw_Display  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draw_Display();
diff --git a/inc/Draw_Interpretor.hxx b/inc/Draw_Interpretor.hxx
index 67c23fd..d5d78f9 100644
--- a/inc/Draw_Interpretor.hxx
+++ b/inc/Draw_Interpretor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -19,6 +22,9 @@
 #ifndef _Draw_PInterp_HeaderFile
 #include <Draw_PInterp.hxx>
 #endif
+#ifndef _Standard_SStream_HeaderFile
+#include <Standard_SStream.hxx>
+#endif
 #ifndef _Standard_CString_HeaderFile
 #include <Standard_CString.hxx>
 #endif
@@ -31,9 +37,6 @@
 #ifndef _Standard_Real_HeaderFile
 #include <Standard_Real.hxx>
 #endif
-#ifndef _Standard_SStream_HeaderFile
-#include <Standard_SStream.hxx>
-#endif
 class TCollection_AsciiString;
 class TCollection_ExtendedString;
 
@@ -43,18 +46,7 @@ class TCollection_ExtendedString;
 class Draw_Interpretor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draw_Interpretor();
@@ -137,6 +129,18 @@ public:
   Standard_EXPORT     void Set(const Draw_PInterp& anInterp) ;
   
   Standard_EXPORT     Draw_PInterp Interp() const;
+  //! Enables or disables logging of all commands and their <br>
+//! results <br>
+  Standard_EXPORT     void SetDoLog(const Standard_Boolean doLog) ;
+  //! Enables or disables eachoing of all commands and their <br>
+//! results to cout <br>
+  Standard_EXPORT     void SetDoEcho(const Standard_Boolean doEcho) ;
+  //! Returns true if logging of commands is enabled <br>
+  Standard_EXPORT     Standard_Boolean GetDoLog() const;
+  //! Returns true if echoing of commands is enabled <br>
+  Standard_EXPORT     Standard_Boolean GetDoEcho() const;
+  //! Returns log stream <br>
+  Standard_EXPORT     Standard_SStream& Log() ;
 
 
 
@@ -154,6 +158,9 @@ private:
 
 Standard_Boolean isAllocated;
 Draw_PInterp myInterp;
+Standard_Boolean myDoLog;
+Standard_Boolean myDoEcho;
+Standard_SStream myLog;
 
 
 };
diff --git a/inc/Draw_MapOfAsciiString.hxx b/inc/Draw_MapOfAsciiString.hxx
index b169b59..7898574 100644
--- a/inc/Draw_MapOfAsciiString.hxx
+++ b/inc/Draw_MapOfAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Draw_IndexedMapNodeOfMapOfAsciiString;
 class Draw_MapOfAsciiString  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draw_MapOfAsciiString(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Draw_MapOfFunctions.hxx b/inc/Draw_MapOfFunctions.hxx
index d07cc6c..dddc7ec 100644
--- a/inc/Draw_MapOfFunctions.hxx
+++ b/inc/Draw_MapOfFunctions.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Draw_DataMapIteratorOfMapOfFunctions;
 class Draw_MapOfFunctions  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draw_MapOfFunctions(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Draw_SequenceOfDrawable3D.hxx b/inc/Draw_SequenceOfDrawable3D.hxx
index 4ad8548..11c4824 100644
--- a/inc/Draw_SequenceOfDrawable3D.hxx
+++ b/inc/Draw_SequenceOfDrawable3D.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Draw_SequenceNodeOfSequenceOfDrawable3D;
 class Draw_SequenceOfDrawable3D  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Draw_SequenceOfDrawable3D();
diff --git a/inc/Draw_VMap.hxx b/inc/Draw_VMap.hxx
index 7b0126f..1f6a1b2 100644
--- a/inc/Draw_VMap.hxx
+++ b/inc/Draw_VMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Draw_DataMapIteratorOfVMap;
 class Draw_VMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Draw_VMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Draw_Window.hxx b/inc/Draw_Window.hxx
index 21fb9f8..0edb8d1 100644
--- a/inc/Draw_Window.hxx
+++ b/inc/Draw_Window.hxx
@@ -169,7 +169,7 @@ class Draw_Window
 //           and return True if the command is complete
 //======================================================
 
-void Run_Appli(Standard_Boolean (*inteprete) (char*));
+void Run_Appli(Standard_Boolean (*inteprete) (const char*));
 
 //======================================================
 // funtion : Init_Appli
diff --git a/inc/DsgPrs.hxx b/inc/DsgPrs.hxx
index 5805c7f..7482b88 100644
--- a/inc/DsgPrs.hxx
+++ b/inc/DsgPrs.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -79,18 +82,7 @@ class DsgPrs_ShadedPlanePresentation;
 class DsgPrs  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! draws symbols ((one or two) arrows,(one or two)points <br>
 //!          at thebeginning and at the end of the dimension <br>
diff --git a/inc/DsgPrs_AnglePresentation.hxx b/inc/DsgPrs_AnglePresentation.hxx
index df59ff1..f7c76c9 100644
--- a/inc/DsgPrs_AnglePresentation.hxx
+++ b/inc/DsgPrs_AnglePresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Ax1;
 class DsgPrs_AnglePresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Draws the presenation of the full angle of a cone. <br>
 //!          VminCircle - a circle at V parameter = Vmin <br>
diff --git a/inc/DsgPrs_Chamf2dPresentation.hxx b/inc/DsgPrs_Chamf2dPresentation.hxx
index 7c8bf6c..923e8c0 100644
--- a/inc/DsgPrs_Chamf2dPresentation.hxx
+++ b/inc/DsgPrs_Chamf2dPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TCollection_ExtendedString;
 class DsgPrs_Chamf2dPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines the display of elements showing 2D chamfers on shapes. <br>
 //! These include the text aText, the point of attachment, <br>
diff --git a/inc/DsgPrs_ConcentricPresentation.hxx b/inc/DsgPrs_ConcentricPresentation.hxx
index 18067e4..340f2b1 100644
--- a/inc/DsgPrs_ConcentricPresentation.hxx
+++ b/inc/DsgPrs_ConcentricPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Dir;
 class DsgPrs_ConcentricPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines the display of elements showing relations of <br>
 //! concentricity between shapes. <br>
diff --git a/inc/DsgPrs_DatumPrs.hxx b/inc/DsgPrs_DatumPrs.hxx
index b2fc5ee..4156b5d 100644
--- a/inc/DsgPrs_DatumPrs.hxx
+++ b/inc/DsgPrs_DatumPrs.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Prs3d_Drawer;
 class DsgPrs_DatumPrs  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(const Handle(Prs3d_Presentation)& aPresentation,const gp_Ax2& aDatum,const Handle(Prs3d_Drawer)& aDrawer) ;
diff --git a/inc/DsgPrs_DatumTool.hxx b/inc/DsgPrs_DatumTool.hxx
index a1c5dc8..30513a2 100644
--- a/inc/DsgPrs_DatumTool.hxx
+++ b/inc/DsgPrs_DatumTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -20,18 +23,7 @@ class gp_Ax2;
 class DsgPrs_DatumTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  gp_Ax2 Ax2(const gp_Ax2& aDatum) ;
diff --git a/inc/DsgPrs_DiameterPresentation.hxx b/inc/DsgPrs_DiameterPresentation.hxx
index 79d3e46..d70e949 100644
--- a/inc/DsgPrs_DiameterPresentation.hxx
+++ b/inc/DsgPrs_DiameterPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Circ;
 class DsgPrs_DiameterPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Draws the diameter of the circle aCircle displayed in <br>
 //! the presentation aPresentation and with attributes <br>
diff --git a/inc/DsgPrs_EllipseRadiusPresentation.hxx b/inc/DsgPrs_EllipseRadiusPresentation.hxx
index 88fc621..d25972b 100644
--- a/inc/DsgPrs_EllipseRadiusPresentation.hxx
+++ b/inc/DsgPrs_EllipseRadiusPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Geom_OffsetCurve;
 class DsgPrs_EllipseRadiusPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! draws a  Radius  (Major  or  Minor) <br>
 //! representation for whole ellipse  case <br>
diff --git a/inc/DsgPrs_EqualDistancePresentation.hxx b/inc/DsgPrs_EqualDistancePresentation.hxx
index d51a95f..f4d164c 100644
--- a/inc/DsgPrs_EqualDistancePresentation.hxx
+++ b/inc/DsgPrs_EqualDistancePresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Circ;
 class DsgPrs_EqualDistancePresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the points Point1, Point2, Point3 Point4, and the <br>
 //! plane Plane to the presentation object aPresentation. <br>
diff --git a/inc/DsgPrs_EqualRadiusPresentation.hxx b/inc/DsgPrs_EqualRadiusPresentation.hxx
index 4e7ccda..bfb4a47 100644
--- a/inc/DsgPrs_EqualRadiusPresentation.hxx
+++ b/inc/DsgPrs_EqualRadiusPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_Plane;
 class DsgPrs_EqualRadiusPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the points FirstCenter, SecondCenter, <br>
 //! FirstPoint, SecondPoint, and the plane Plane to the <br>
diff --git a/inc/DsgPrs_FilletRadiusPresentation.hxx b/inc/DsgPrs_FilletRadiusPresentation.hxx
index dd53eb8..d4ae74a 100644
--- a/inc/DsgPrs_FilletRadiusPresentation.hxx
+++ b/inc/DsgPrs_FilletRadiusPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Geom_TrimmedCurve;
 class DsgPrs_FilletRadiusPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds a display of the radius of a fillet to the <br>
 //! presentation aPresentation. The display ttributes <br>
diff --git a/inc/DsgPrs_FixPresentation.hxx b/inc/DsgPrs_FixPresentation.hxx
index 7132212..27068e5 100644
--- a/inc/DsgPrs_FixPresentation.hxx
+++ b/inc/DsgPrs_FixPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Dir;
 class DsgPrs_FixPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! draws the presentation of fixed objects by <br>
 //!          drawing the 'fix' symbol at position <aPntEnd>. <br>
diff --git a/inc/DsgPrs_IdenticPresentation.hxx b/inc/DsgPrs_IdenticPresentation.hxx
index 53f6601..ada6fd4 100644
--- a/inc/DsgPrs_IdenticPresentation.hxx
+++ b/inc/DsgPrs_IdenticPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_Elips;
 class DsgPrs_IdenticPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! draws a line between <aPntAttach> and <br>
 //!          <aPntOffset>. <br>
diff --git a/inc/DsgPrs_LengthPresentation.hxx b/inc/DsgPrs_LengthPresentation.hxx
index d8ca9eb..387b5a3 100644
--- a/inc/DsgPrs_LengthPresentation.hxx
+++ b/inc/DsgPrs_LengthPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Geom_Surface;
 class DsgPrs_LengthPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Draws a line segment representing a length in the <br>
 //! display aPresentation. <br>
diff --git a/inc/DsgPrs_MidPointPresentation.hxx b/inc/DsgPrs_MidPointPresentation.hxx
index 34d24ba..e7ce58b 100644
--- a/inc/DsgPrs_MidPointPresentation.hxx
+++ b/inc/DsgPrs_MidPointPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class gp_Elips;
 class DsgPrs_MidPointPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! draws the representation of a MidPoint between <br>
 //!          two vertices. <br>
diff --git a/inc/DsgPrs_OffsetPresentation.hxx b/inc/DsgPrs_OffsetPresentation.hxx
index c9ee3ff..302d016 100644
--- a/inc/DsgPrs_OffsetPresentation.hxx
+++ b/inc/DsgPrs_OffsetPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Dir;
 class DsgPrs_OffsetPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines the display of elements showing offset shapes. <br>
 //! These include the two points of attachment <br>
diff --git a/inc/DsgPrs_ParalPresentation.hxx b/inc/DsgPrs_ParalPresentation.hxx
index 00ff8b4..42d0e0f 100644
--- a/inc/DsgPrs_ParalPresentation.hxx
+++ b/inc/DsgPrs_ParalPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Dir;
 class DsgPrs_ParalPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines the display of elements showing relations of <br>
 //! parallelism between shapes. <br>
diff --git a/inc/DsgPrs_PerpenPresentation.hxx b/inc/DsgPrs_PerpenPresentation.hxx
index d3ac089..ea807de 100644
--- a/inc/DsgPrs_PerpenPresentation.hxx
+++ b/inc/DsgPrs_PerpenPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Pnt;
 class DsgPrs_PerpenPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines the display of elements showing <br>
 //! perpendicular constraints between shapes. <br>
diff --git a/inc/DsgPrs_RadiusPresentation.hxx b/inc/DsgPrs_RadiusPresentation.hxx
index 65c15cc..cb88d1f 100644
--- a/inc/DsgPrs_RadiusPresentation.hxx
+++ b/inc/DsgPrs_RadiusPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Circ;
 class DsgPrs_RadiusPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the point AttachmentPoint, the circle aCircle, <br>
 //! the text aText, and the parameters firstparam and <br>
diff --git a/inc/DsgPrs_ShadedPlanePresentation.hxx b/inc/DsgPrs_ShadedPlanePresentation.hxx
index af3811e..eee4f70 100644
--- a/inc/DsgPrs_ShadedPlanePresentation.hxx
+++ b/inc/DsgPrs_ShadedPlanePresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_Pnt;
 class DsgPrs_ShadedPlanePresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the points aPt1, aPt2 and aPt3 to the <br>
 //! presentation object, aPresentation. <br>
diff --git a/inc/DsgPrs_ShapeDirPresentation.hxx b/inc/DsgPrs_ShapeDirPresentation.hxx
index 3320e04..fb96be4 100644
--- a/inc/DsgPrs_ShapeDirPresentation.hxx
+++ b/inc/DsgPrs_ShapeDirPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TopoDS_Shape;
 class DsgPrs_ShapeDirPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the shape shape and the mode mode to the <br>
 //! presentation object prs. <br>
diff --git a/inc/DsgPrs_SymbPresentation.hxx b/inc/DsgPrs_SymbPresentation.hxx
index ca909f0..1c189e0 100644
--- a/inc/DsgPrs_SymbPresentation.hxx
+++ b/inc/DsgPrs_SymbPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class gp_Pnt;
 class DsgPrs_SymbPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the text aText and the point OffsetPoint to the <br>
 //! presentation object aPresentation. <br>
diff --git a/inc/DsgPrs_SymmetricPresentation.hxx b/inc/DsgPrs_SymmetricPresentation.hxx
index 2b93cfb..d9bddba 100644
--- a/inc/DsgPrs_SymmetricPresentation.hxx
+++ b/inc/DsgPrs_SymmetricPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_Circ;
 class DsgPrs_SymmetricPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the points OffsetPoint, AttachmentPoint1, <br>
 //! AttachmentPoint2, the direction aDirection1 and the <br>
diff --git a/inc/DsgPrs_TangentPresentation.hxx b/inc/DsgPrs_TangentPresentation.hxx
index 6f1af77..46e9948 100644
--- a/inc/DsgPrs_TangentPresentation.hxx
+++ b/inc/DsgPrs_TangentPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Dir;
 class DsgPrs_TangentPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the point OffsetPoint, the direction aDirection <br>
 //! and the length aLength to the presentation object aPresentation. <br>
diff --git a/inc/DsgPrs_XYZAxisPresentation.hxx b/inc/DsgPrs_XYZAxisPresentation.hxx
index 74863c9..e5b2d72 100644
--- a/inc/DsgPrs_XYZAxisPresentation.hxx
+++ b/inc/DsgPrs_XYZAxisPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Prs3d_TextAspect;
 class DsgPrs_XYZAxisPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Draws each axis of a trihedron displayed in the <br>
 //! presentation aPresentation and with lines shown by <br>
diff --git a/inc/DsgPrs_XYZPlanePresentation.hxx b/inc/DsgPrs_XYZPlanePresentation.hxx
index 5584a75..c5e761c 100644
--- a/inc/DsgPrs_XYZPlanePresentation.hxx
+++ b/inc/DsgPrs_XYZPlanePresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_Pnt;
 class DsgPrs_XYZPlanePresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Draws each plane of a trihedron displayed in the <br>
 //! presentation aPresentation and with attributes <br>
diff --git a/inc/Dynamic.hxx b/inc/Dynamic.hxx
index 53a0594..5a4f2a4 100644
--- a/inc/Dynamic.hxx
+++ b/inc/Dynamic.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -240,18 +243,7 @@ class Dynamic_SequenceNodeOfSeqOfFuzzyDefinitions;
 class Dynamic  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Dynamic_ModeEnum Mode(const Standard_CString amode) ;
diff --git a/inc/Dynamic_SeqOfClasses.hxx b/inc/Dynamic_SeqOfClasses.hxx
index b218c29..0f0c998 100644
--- a/inc/Dynamic_SeqOfClasses.hxx
+++ b/inc/Dynamic_SeqOfClasses.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Dynamic_SequenceNodeOfSeqOfClasses;
 class Dynamic_SeqOfClasses  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Dynamic_SeqOfClasses();
diff --git a/inc/Dynamic_SeqOfFuzzyDefinitions.hxx b/inc/Dynamic_SeqOfFuzzyDefinitions.hxx
index 3f807de..e34b0ad 100644
--- a/inc/Dynamic_SeqOfFuzzyDefinitions.hxx
+++ b/inc/Dynamic_SeqOfFuzzyDefinitions.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Dynamic_SequenceNodeOfSeqOfFuzzyDefinitions;
 class Dynamic_SeqOfFuzzyDefinitions  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Dynamic_SeqOfFuzzyDefinitions();
diff --git a/inc/Dynamic_SeqOfMethodDefinitions.hxx b/inc/Dynamic_SeqOfMethodDefinitions.hxx
index db1e89e..8a87ba6 100644
--- a/inc/Dynamic_SeqOfMethodDefinitions.hxx
+++ b/inc/Dynamic_SeqOfMethodDefinitions.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Dynamic_SequenceNodeOfSeqOfMethodDefinitions;
 class Dynamic_SeqOfMethodDefinitions  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Dynamic_SeqOfMethodDefinitions();
diff --git a/inc/Dynamic_SeqOfMethods.hxx b/inc/Dynamic_SeqOfMethods.hxx
index 5dddf83..e57a5c7 100644
--- a/inc/Dynamic_SeqOfMethods.hxx
+++ b/inc/Dynamic_SeqOfMethods.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Dynamic_SequenceNodeOfSeqOfMethods;
 class Dynamic_SeqOfMethods  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Dynamic_SeqOfMethods();
diff --git a/inc/ElCLib.hxx b/inc/ElCLib.hxx
index f1a9e88..16b1486 100644
--- a/inc/ElCLib.hxx
+++ b/inc/ElCLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -75,18 +78,7 @@ class gp_Dir2d;
 class ElCLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Return a value in   the  range <UFirst, ULast>  by <br>
 //!          adding or removing the period <ULast -  UFirst> to <br>
diff --git a/inc/ElSLib.hxx b/inc/ElSLib.hxx
index 969d4c6..d98af6b 100644
--- a/inc/ElSLib.hxx
+++ b/inc/ElSLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class gp_Circ;
 class ElSLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  For elementary surfaces from the gp package (planes, <br>
 //! cones, cylinders, spheres and tori), computes the point <br>
diff --git a/inc/Expr.hxx b/inc/Expr.hxx
index 4a78ef5..eb1dcba 100644
--- a/inc/Expr.hxx
+++ b/inc/Expr.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -97,18 +100,7 @@ class Expr_SequenceNodeOfSequenceOfGeneralRelation;
 class Expr  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Expr_GeneralExpression CopyShare(const Handle(Expr_GeneralExpression)& exp) ;
diff --git a/inc/ExprIntrp.hxx b/inc/ExprIntrp.hxx
index c488810..d27ac7f 100644
--- a/inc/ExprIntrp.hxx
+++ b/inc/ExprIntrp.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class ExprIntrp_StackIteratorOfStackOfNames;
 class ExprIntrp  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
 
 
diff --git a/inc/ExprIntrp_Analysis.hxx b/inc/ExprIntrp_Analysis.hxx
index 2063bc1..b2c6044 100644
--- a/inc/ExprIntrp_Analysis.hxx
+++ b/inc/ExprIntrp_Analysis.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -71,18 +74,7 @@ class Expr_NamedExpression;
 class ExprIntrp_Analysis  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ExprIntrp_Analysis();
diff --git a/inc/ExprIntrp_SequenceOfNamedExpression.hxx b/inc/ExprIntrp_SequenceOfNamedExpression.hxx
index 6827a63..c33e054 100644
--- a/inc/ExprIntrp_SequenceOfNamedExpression.hxx
+++ b/inc/ExprIntrp_SequenceOfNamedExpression.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class ExprIntrp_SequenceNodeOfSequenceOfNamedExpression;
 class ExprIntrp_SequenceOfNamedExpression  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       ExprIntrp_SequenceOfNamedExpression();
diff --git a/inc/ExprIntrp_SequenceOfNamedFunction.hxx b/inc/ExprIntrp_SequenceOfNamedFunction.hxx
index 2001c0c..07bd949 100644
--- a/inc/ExprIntrp_SequenceOfNamedFunction.hxx
+++ b/inc/ExprIntrp_SequenceOfNamedFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class ExprIntrp_SequenceNodeOfSequenceOfNamedFunction;
 class ExprIntrp_SequenceOfNamedFunction  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       ExprIntrp_SequenceOfNamedFunction();
diff --git a/inc/ExprIntrp_StackIteratorOfStackOfGeneralExpression.hxx b/inc/ExprIntrp_StackIteratorOfStackOfGeneralExpression.hxx
index cf861dc..9827068 100644
--- a/inc/ExprIntrp_StackIteratorOfStackOfGeneralExpression.hxx
+++ b/inc/ExprIntrp_StackIteratorOfStackOfGeneralExpression.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class ExprIntrp_StackNodeOfStackOfGeneralExpression;
 class ExprIntrp_StackIteratorOfStackOfGeneralExpression  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ExprIntrp_StackIteratorOfStackOfGeneralExpression();
diff --git a/inc/ExprIntrp_StackIteratorOfStackOfGeneralFunction.hxx b/inc/ExprIntrp_StackIteratorOfStackOfGeneralFunction.hxx
index 5d640de..cf71f79 100644
--- a/inc/ExprIntrp_StackIteratorOfStackOfGeneralFunction.hxx
+++ b/inc/ExprIntrp_StackIteratorOfStackOfGeneralFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class ExprIntrp_StackNodeOfStackOfGeneralFunction;
 class ExprIntrp_StackIteratorOfStackOfGeneralFunction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ExprIntrp_StackIteratorOfStackOfGeneralFunction();
diff --git a/inc/ExprIntrp_StackIteratorOfStackOfGeneralRelation.hxx b/inc/ExprIntrp_StackIteratorOfStackOfGeneralRelation.hxx
index acba71b..ef0c478 100644
--- a/inc/ExprIntrp_StackIteratorOfStackOfGeneralRelation.hxx
+++ b/inc/ExprIntrp_StackIteratorOfStackOfGeneralRelation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class ExprIntrp_StackNodeOfStackOfGeneralRelation;
 class ExprIntrp_StackIteratorOfStackOfGeneralRelation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ExprIntrp_StackIteratorOfStackOfGeneralRelation();
diff --git a/inc/ExprIntrp_StackIteratorOfStackOfNames.hxx b/inc/ExprIntrp_StackIteratorOfStackOfNames.hxx
index 10accfc..3043a92 100644
--- a/inc/ExprIntrp_StackIteratorOfStackOfNames.hxx
+++ b/inc/ExprIntrp_StackIteratorOfStackOfNames.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class ExprIntrp_StackNodeOfStackOfNames;
 class ExprIntrp_StackIteratorOfStackOfNames  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ExprIntrp_StackIteratorOfStackOfNames();
diff --git a/inc/ExprIntrp_StackOfGeneralExpression.hxx b/inc/ExprIntrp_StackOfGeneralExpression.hxx
index 164f7be..c1c06e8 100644
--- a/inc/ExprIntrp_StackOfGeneralExpression.hxx
+++ b/inc/ExprIntrp_StackOfGeneralExpression.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class ExprIntrp_StackNodeOfStackOfGeneralExpression;
 class ExprIntrp_StackOfGeneralExpression  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ExprIntrp_StackOfGeneralExpression();
diff --git a/inc/ExprIntrp_StackOfGeneralFunction.hxx b/inc/ExprIntrp_StackOfGeneralFunction.hxx
index 111514f..e7b75a5 100644
--- a/inc/ExprIntrp_StackOfGeneralFunction.hxx
+++ b/inc/ExprIntrp_StackOfGeneralFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class ExprIntrp_StackNodeOfStackOfGeneralFunction;
 class ExprIntrp_StackOfGeneralFunction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ExprIntrp_StackOfGeneralFunction();
diff --git a/inc/ExprIntrp_StackOfGeneralRelation.hxx b/inc/ExprIntrp_StackOfGeneralRelation.hxx
index acdd87b..73803d5 100644
--- a/inc/ExprIntrp_StackOfGeneralRelation.hxx
+++ b/inc/ExprIntrp_StackOfGeneralRelation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class ExprIntrp_StackNodeOfStackOfGeneralRelation;
 class ExprIntrp_StackOfGeneralRelation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ExprIntrp_StackOfGeneralRelation();
diff --git a/inc/ExprIntrp_StackOfNames.hxx b/inc/ExprIntrp_StackOfNames.hxx
index 6fc8562..e82e382 100644
--- a/inc/ExprIntrp_StackOfNames.hxx
+++ b/inc/ExprIntrp_StackOfNames.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class ExprIntrp_StackNodeOfStackOfNames;
 class ExprIntrp_StackOfNames  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ExprIntrp_StackOfNames();
diff --git a/inc/Expr_Array1OfGeneralExpression.hxx b/inc/Expr_Array1OfGeneralExpression.hxx
index dbc01b4..6bb969e 100644
--- a/inc/Expr_Array1OfGeneralExpression.hxx
+++ b/inc/Expr_Array1OfGeneralExpression.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Expr_GeneralExpression;
 class Expr_Array1OfGeneralExpression  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Expr_Array1OfGeneralExpression(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Expr_Array1OfNamedUnknown.hxx b/inc/Expr_Array1OfNamedUnknown.hxx
index df30ca1..640f6f8 100644
--- a/inc/Expr_Array1OfNamedUnknown.hxx
+++ b/inc/Expr_Array1OfNamedUnknown.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Expr_NamedUnknown;
 class Expr_Array1OfNamedUnknown  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Expr_Array1OfNamedUnknown(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Expr_Array1OfSingleRelation.hxx b/inc/Expr_Array1OfSingleRelation.hxx
index 9fe7226..2486f1d 100644
--- a/inc/Expr_Array1OfSingleRelation.hxx
+++ b/inc/Expr_Array1OfSingleRelation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Expr_SingleRelation;
 class Expr_Array1OfSingleRelation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Expr_Array1OfSingleRelation(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Expr_MapOfNamedUnknown.hxx b/inc/Expr_MapOfNamedUnknown.hxx
index 91e6d38..c3ab410 100644
--- a/inc/Expr_MapOfNamedUnknown.hxx
+++ b/inc/Expr_MapOfNamedUnknown.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Expr_IndexedMapNodeOfMapOfNamedUnknown;
 class Expr_MapOfNamedUnknown  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Expr_MapOfNamedUnknown(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Expr_RUIterator.hxx b/inc/Expr_RUIterator.hxx
index 3919219..43c90eb 100644
--- a/inc/Expr_RUIterator.hxx
+++ b/inc/Expr_RUIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Expr_NamedUnknown;
 class Expr_RUIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an iterator on every NamedUnknown contained in <br>
 //!          <rel>. <br>
diff --git a/inc/Expr_RelationIterator.hxx b/inc/Expr_RelationIterator.hxx
index 44fc590..282122a 100644
--- a/inc/Expr_RelationIterator.hxx
+++ b/inc/Expr_RelationIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Expr_SingleRelation;
 class Expr_RelationIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Expr_RelationIterator(const Handle(Expr_GeneralRelation)& rel);
diff --git a/inc/Expr_SequenceOfGeneralExpression.hxx b/inc/Expr_SequenceOfGeneralExpression.hxx
index 55f9fd9..3bbb397 100644
--- a/inc/Expr_SequenceOfGeneralExpression.hxx
+++ b/inc/Expr_SequenceOfGeneralExpression.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Expr_SequenceNodeOfSequenceOfGeneralExpression;
 class Expr_SequenceOfGeneralExpression  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Expr_SequenceOfGeneralExpression();
diff --git a/inc/Expr_SequenceOfGeneralRelation.hxx b/inc/Expr_SequenceOfGeneralRelation.hxx
index 1d3610b..eacfb19 100644
--- a/inc/Expr_SequenceOfGeneralRelation.hxx
+++ b/inc/Expr_SequenceOfGeneralRelation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Expr_SequenceNodeOfSequenceOfGeneralRelation;
 class Expr_SequenceOfGeneralRelation  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Expr_SequenceOfGeneralRelation();
diff --git a/inc/Expr_UnknownIterator.hxx b/inc/Expr_UnknownIterator.hxx
index 198e3fb..30e243c 100644
--- a/inc/Expr_UnknownIterator.hxx
+++ b/inc/Expr_UnknownIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Expr_NamedUnknown;
 class Expr_UnknownIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Expr_UnknownIterator(const Handle(Expr_GeneralExpression)& exp);
diff --git a/inc/Extrema_Array1OfPOnCurv.hxx b/inc/Extrema_Array1OfPOnCurv.hxx
index 2c256b5..40afe71 100644
--- a/inc/Extrema_Array1OfPOnCurv.hxx
+++ b/inc/Extrema_Array1OfPOnCurv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Extrema_POnCurv;
 class Extrema_Array1OfPOnCurv  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_Array1OfPOnCurv(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Extrema_Array1OfPOnCurv2d.hxx b/inc/Extrema_Array1OfPOnCurv2d.hxx
index 32acab1..f7c9b81 100644
--- a/inc/Extrema_Array1OfPOnCurv2d.hxx
+++ b/inc/Extrema_Array1OfPOnCurv2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Extrema_POnCurv2d;
 class Extrema_Array1OfPOnCurv2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_Array1OfPOnCurv2d(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Extrema_Array1OfPOnSurf.hxx b/inc/Extrema_Array1OfPOnSurf.hxx
index 3831f74..e51dc6e 100644
--- a/inc/Extrema_Array1OfPOnSurf.hxx
+++ b/inc/Extrema_Array1OfPOnSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Extrema_POnSurf;
 class Extrema_Array1OfPOnSurf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_Array1OfPOnSurf(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Extrema_Array2OfPOnCurv.hxx b/inc/Extrema_Array2OfPOnCurv.hxx
index ed2a12b..a6e5c07 100644
--- a/inc/Extrema_Array2OfPOnCurv.hxx
+++ b/inc/Extrema_Array2OfPOnCurv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Extrema_POnCurv;
 class Extrema_Array2OfPOnCurv  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_Array2OfPOnCurv(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/Extrema_Array2OfPOnCurv2d.hxx b/inc/Extrema_Array2OfPOnCurv2d.hxx
index 4666325..7af8302 100644
--- a/inc/Extrema_Array2OfPOnCurv2d.hxx
+++ b/inc/Extrema_Array2OfPOnCurv2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Extrema_POnCurv2d;
 class Extrema_Array2OfPOnCurv2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_Array2OfPOnCurv2d(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/Extrema_Array2OfPOnSurf.hxx b/inc/Extrema_Array2OfPOnSurf.hxx
index bc9fde9..a4cc3e1 100644
--- a/inc/Extrema_Array2OfPOnSurf.hxx
+++ b/inc/Extrema_Array2OfPOnSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Extrema_POnSurf;
 class Extrema_Array2OfPOnSurf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_Array2OfPOnSurf(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/Extrema_CCFOfECC2dOfExtCC2d.hxx b/inc/Extrema_CCFOfECC2dOfExtCC2d.hxx
index 36fd6b6..ccb2d64 100644
--- a/inc/Extrema_CCFOfECC2dOfExtCC2d.hxx
+++ b/inc/Extrema_CCFOfECC2dOfExtCC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class math_Matrix;
 class Extrema_CCFOfECC2dOfExtCC2d  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_CCFOfECC2dOfExtCC2d(const Standard_Real thetol = 1.0e-10);
diff --git a/inc/Extrema_CCFOfECCOfExtCC.hxx b/inc/Extrema_CCFOfECCOfExtCC.hxx
index d2a231e..9afe6d9 100644
--- a/inc/Extrema_CCFOfECCOfExtCC.hxx
+++ b/inc/Extrema_CCFOfECCOfExtCC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class math_Matrix;
 class Extrema_CCFOfECCOfExtCC  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_CCFOfECCOfExtCC(const Standard_Real thetol = 1.0e-10);
diff --git a/inc/Extrema_CCFOfELCC2dOfLocateExtCC2d.hxx b/inc/Extrema_CCFOfELCC2dOfLocateExtCC2d.hxx
index f4f67a7..1ed0d8e 100644
--- a/inc/Extrema_CCFOfELCC2dOfLocateExtCC2d.hxx
+++ b/inc/Extrema_CCFOfELCC2dOfLocateExtCC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class math_Matrix;
 class Extrema_CCFOfELCC2dOfLocateExtCC2d  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_CCFOfELCC2dOfLocateExtCC2d(const Standard_Real thetol = 1.0e-10);
diff --git a/inc/Extrema_CCFOfELCCOfLocateExtCC.hxx b/inc/Extrema_CCFOfELCCOfLocateExtCC.hxx
index db3ab65..d45bc68 100644
--- a/inc/Extrema_CCFOfELCCOfLocateExtCC.hxx
+++ b/inc/Extrema_CCFOfELCCOfLocateExtCC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class math_Matrix;
 class Extrema_CCFOfELCCOfLocateExtCC  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_CCFOfELCCOfLocateExtCC(const Standard_Real thetol = 1.0e-10);
diff --git a/inc/Extrema_CCLocFOfLocECC2dOfLocateExtCC2d.hxx b/inc/Extrema_CCLocFOfLocECC2dOfLocateExtCC2d.hxx
index bcf3683..e6c6ff3 100644
--- a/inc/Extrema_CCLocFOfLocECC2dOfLocateExtCC2d.hxx
+++ b/inc/Extrema_CCLocFOfLocECC2dOfLocateExtCC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class math_Matrix;
 class Extrema_CCLocFOfLocECC2dOfLocateExtCC2d  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_CCLocFOfLocECC2dOfLocateExtCC2d(const Standard_Real thetol = 1.0e-10);
diff --git a/inc/Extrema_CCLocFOfLocECCOfLocateExtCC.hxx b/inc/Extrema_CCLocFOfLocECCOfLocateExtCC.hxx
index a8bccc0..244d611 100644
--- a/inc/Extrema_CCLocFOfLocECCOfLocateExtCC.hxx
+++ b/inc/Extrema_CCLocFOfLocECCOfLocateExtCC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class math_Matrix;
 class Extrema_CCLocFOfLocECCOfLocateExtCC  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_CCLocFOfLocECCOfLocateExtCC(const Standard_Real thetol = 1.0e-10);
diff --git a/inc/Extrema_Curve2dTool.hxx b/inc/Extrema_Curve2dTool.hxx
index 1713e0f..7b103bc 100644
--- a/inc/Extrema_Curve2dTool.hxx
+++ b/inc/Extrema_Curve2dTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class Geom2d_BSplineCurve;
 class Extrema_Curve2dTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstParameter(const Adaptor2d_Curve2d& C) ;
diff --git a/inc/Extrema_CurveTool.hxx b/inc/Extrema_CurveTool.hxx
index e99e443..e88d7da 100644
--- a/inc/Extrema_CurveTool.hxx
+++ b/inc/Extrema_CurveTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class Geom_BSplineCurve;
 class Extrema_CurveTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstParameter(const Adaptor3d_Curve& C) ;
diff --git a/inc/Extrema_ECC2dOfExtCC2d.hxx b/inc/Extrema_ECC2dOfExtCC2d.hxx
index dbd0f1c..c779367 100644
--- a/inc/Extrema_ECC2dOfExtCC2d.hxx
+++ b/inc/Extrema_ECC2dOfExtCC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class Extrema_SeqPOnCOfCCFOfECC2dOfExtCC2d;
 class Extrema_ECC2dOfExtCC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ECC2dOfExtCC2d();
diff --git a/inc/Extrema_ECCOfExtCC.hxx b/inc/Extrema_ECCOfExtCC.hxx
index ca58b88..0d8a290 100644
--- a/inc/Extrema_ECCOfExtCC.hxx
+++ b/inc/Extrema_ECCOfExtCC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class Extrema_SeqPOnCOfCCFOfECCOfExtCC;
 class Extrema_ECCOfExtCC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ECCOfExtCC();
diff --git a/inc/Extrema_ELCC2dOfLocateExtCC2d.hxx b/inc/Extrema_ELCC2dOfLocateExtCC2d.hxx
index 0123e40..1577a92 100644
--- a/inc/Extrema_ELCC2dOfLocateExtCC2d.hxx
+++ b/inc/Extrema_ELCC2dOfLocateExtCC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class Extrema_SeqPOnCOfCCFOfELCC2dOfLocateExtCC2d;
 class Extrema_ELCC2dOfLocateExtCC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ELCC2dOfLocateExtCC2d();
diff --git a/inc/Extrema_ELCCOfLocateExtCC.hxx b/inc/Extrema_ELCCOfLocateExtCC.hxx
index 4b13d87..4f37236 100644
--- a/inc/Extrema_ELCCOfLocateExtCC.hxx
+++ b/inc/Extrema_ELCCOfLocateExtCC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class Extrema_SeqPOnCOfCCFOfELCCOfLocateExtCC;
 class Extrema_ELCCOfLocateExtCC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ELCCOfLocateExtCC();
diff --git a/inc/Extrema_ELPCOfLocateExtPC.hxx b/inc/Extrema_ELPCOfLocateExtPC.hxx
index 47f1e37..a7f6e7f 100644
--- a/inc/Extrema_ELPCOfLocateExtPC.hxx
+++ b/inc/Extrema_ELPCOfLocateExtPC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class Extrema_PCFOfEPCOfELPCOfLocateExtPC;
 class Extrema_ELPCOfLocateExtPC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ELPCOfLocateExtPC();
diff --git a/inc/Extrema_ELPCOfLocateExtPC2d.hxx b/inc/Extrema_ELPCOfLocateExtPC2d.hxx
index 6e879fa..cb173b1 100644
--- a/inc/Extrema_ELPCOfLocateExtPC2d.hxx
+++ b/inc/Extrema_ELPCOfLocateExtPC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class Extrema_PCFOfEPCOfELPCOfLocateExtPC2d;
 class Extrema_ELPCOfLocateExtPC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ELPCOfLocateExtPC2d();
diff --git a/inc/Extrema_EPCOfELPCOfLocateExtPC.hxx b/inc/Extrema_EPCOfELPCOfLocateExtPC.hxx
index 7094a50..7c6691a 100644
--- a/inc/Extrema_EPCOfELPCOfLocateExtPC.hxx
+++ b/inc/Extrema_EPCOfELPCOfLocateExtPC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC;
 class Extrema_EPCOfELPCOfLocateExtPC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_EPCOfELPCOfLocateExtPC();
diff --git a/inc/Extrema_EPCOfELPCOfLocateExtPC2d.hxx b/inc/Extrema_EPCOfELPCOfLocateExtPC2d.hxx
index 2961157..79fbd42 100644
--- a/inc/Extrema_EPCOfELPCOfLocateExtPC2d.hxx
+++ b/inc/Extrema_EPCOfELPCOfLocateExtPC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d;
 class Extrema_EPCOfELPCOfLocateExtPC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_EPCOfELPCOfLocateExtPC2d();
diff --git a/inc/Extrema_EPCOfExtPC.hxx b/inc/Extrema_EPCOfExtPC.hxx
index d6b35d3..413ecb7 100644
--- a/inc/Extrema_EPCOfExtPC.hxx
+++ b/inc/Extrema_EPCOfExtPC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Extrema_SeqPCOfPCFOfEPCOfExtPC;
 class Extrema_EPCOfExtPC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_EPCOfExtPC();
diff --git a/inc/Extrema_EPCOfExtPC2d.hxx b/inc/Extrema_EPCOfExtPC2d.hxx
index 507cab2..1bbb7c3 100644
--- a/inc/Extrema_EPCOfExtPC2d.hxx
+++ b/inc/Extrema_EPCOfExtPC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Extrema_SeqPCOfPCFOfEPCOfExtPC2d;
 class Extrema_EPCOfExtPC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_EPCOfExtPC2d();
diff --git a/inc/Extrema_ExtCC.hxx b/inc/Extrema_ExtCC.hxx
index 4497bab..7d56a02 100644
--- a/inc/Extrema_ExtCC.hxx
+++ b/inc/Extrema_ExtCC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -60,18 +63,7 @@ class Extrema_ExtElC;
 class Extrema_ExtCC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtCC(const Standard_Real TolC1 = 1.0e-10,const Standard_Real TolC2 = 1.0e-10);
diff --git a/inc/Extrema_ExtCC2d.hxx b/inc/Extrema_ExtCC2d.hxx
index 0b1fb4a..0c888e4 100644
--- a/inc/Extrema_ExtCC2d.hxx
+++ b/inc/Extrema_ExtCC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class Extrema_ExtElC2d;
 class Extrema_ExtCC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtCC2d();
diff --git a/inc/Extrema_ExtCS.hxx b/inc/Extrema_ExtCS.hxx
index 6bd3e40..4d554dc 100644
--- a/inc/Extrema_ExtCS.hxx
+++ b/inc/Extrema_ExtCS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class Extrema_POnSurf;
 class Extrema_ExtCS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtCS();
diff --git a/inc/Extrema_ExtElC.hxx b/inc/Extrema_ExtElC.hxx
index e4596dc..8cb5c01 100644
--- a/inc/Extrema_ExtElC.hxx
+++ b/inc/Extrema_ExtElC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Extrema_POnCurv;
 class Extrema_ExtElC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtElC();
diff --git a/inc/Extrema_ExtElC2d.hxx b/inc/Extrema_ExtElC2d.hxx
index e5e9545..552c5c8 100644
--- a/inc/Extrema_ExtElC2d.hxx
+++ b/inc/Extrema_ExtElC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Extrema_POnCurv2d;
 class Extrema_ExtElC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtElC2d();
diff --git a/inc/Extrema_ExtElCS.hxx b/inc/Extrema_ExtElCS.hxx
index 4a609b8..59932bb 100644
--- a/inc/Extrema_ExtElCS.hxx
+++ b/inc/Extrema_ExtElCS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class Extrema_POnSurf;
 class Extrema_ExtElCS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtElCS();
diff --git a/inc/Extrema_ExtElSS.hxx b/inc/Extrema_ExtElSS.hxx
index 64bf21c..2437481 100644
--- a/inc/Extrema_ExtElSS.hxx
+++ b/inc/Extrema_ExtElSS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Extrema_POnSurf;
 class Extrema_ExtElSS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtElSS();
diff --git a/inc/Extrema_ExtPC.hxx b/inc/Extrema_ExtPC.hxx
index 6ba5b1a..e57d244 100644
--- a/inc/Extrema_ExtPC.hxx
+++ b/inc/Extrema_ExtPC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class Extrema_PCFOfEPCOfExtPC;
 class Extrema_ExtPC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtPC();
diff --git a/inc/Extrema_ExtPC2d.hxx b/inc/Extrema_ExtPC2d.hxx
index 7add13d..0d7ddc6 100644
--- a/inc/Extrema_ExtPC2d.hxx
+++ b/inc/Extrema_ExtPC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class Extrema_PCFOfEPCOfExtPC2d;
 class Extrema_ExtPC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtPC2d();
diff --git a/inc/Extrema_ExtPElC.hxx b/inc/Extrema_ExtPElC.hxx
index c6befc1..57fd6c5 100644
--- a/inc/Extrema_ExtPElC.hxx
+++ b/inc/Extrema_ExtPElC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Extrema_POnCurv;
 class Extrema_ExtPElC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtPElC();
diff --git a/inc/Extrema_ExtPElC2d.hxx b/inc/Extrema_ExtPElC2d.hxx
index 6d7e6b6..b3150cd 100644
--- a/inc/Extrema_ExtPElC2d.hxx
+++ b/inc/Extrema_ExtPElC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Extrema_POnCurv2d;
 class Extrema_ExtPElC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtPElC2d();
diff --git a/inc/Extrema_ExtPElS.hxx b/inc/Extrema_ExtPElS.hxx
index 7be102c..2e4dbcb 100644
--- a/inc/Extrema_ExtPElS.hxx
+++ b/inc/Extrema_ExtPElS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Extrema_POnSurf;
 class Extrema_ExtPElS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtPElS();
diff --git a/inc/Extrema_ExtPExtS.hxx b/inc/Extrema_ExtPExtS.hxx
index 25d45ba..a28bc45 100644
--- a/inc/Extrema_ExtPExtS.hxx
+++ b/inc/Extrema_ExtPExtS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class gp_Ax2;
 class Extrema_ExtPExtS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtPExtS();
diff --git a/inc/Extrema_ExtPRevS.hxx b/inc/Extrema_ExtPRevS.hxx
index 6044e32..14739e7 100644
--- a/inc/Extrema_ExtPRevS.hxx
+++ b/inc/Extrema_ExtPRevS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Extrema_POnSurf;
 class Extrema_ExtPRevS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtPRevS();
diff --git a/inc/Extrema_ExtPS.hxx b/inc/Extrema_ExtPS.hxx
index 46f0a80..7549085 100644
--- a/inc/Extrema_ExtPS.hxx
+++ b/inc/Extrema_ExtPS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class Extrema_POnSurf;
 class Extrema_ExtPS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtPS();
diff --git a/inc/Extrema_ExtSS.hxx b/inc/Extrema_ExtSS.hxx
index 9b6a807..5b2cea8 100644
--- a/inc/Extrema_ExtSS.hxx
+++ b/inc/Extrema_ExtSS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Extrema_POnSurf;
 class Extrema_ExtSS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_ExtSS();
diff --git a/inc/Extrema_FuncExtCS.hxx b/inc/Extrema_FuncExtCS.hxx
index edc629b..72e1433 100644
--- a/inc/Extrema_FuncExtCS.hxx
+++ b/inc/Extrema_FuncExtCS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class Extrema_POnSurf;
 class Extrema_FuncExtCS  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_FuncExtCS();
diff --git a/inc/Extrema_FuncExtPS.hxx b/inc/Extrema_FuncExtPS.hxx
index 8c1b53c..3887a19 100644
--- a/inc/Extrema_FuncExtPS.hxx
+++ b/inc/Extrema_FuncExtPS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class Extrema_POnSurf;
 class Extrema_FuncExtPS  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_FuncExtPS();
diff --git a/inc/Extrema_FuncExtSS.hxx b/inc/Extrema_FuncExtSS.hxx
index e2c4295..3f08032 100644
--- a/inc/Extrema_FuncExtSS.hxx
+++ b/inc/Extrema_FuncExtSS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class Extrema_POnSurf;
 class Extrema_FuncExtSS  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_FuncExtSS();
diff --git a/inc/Extrema_GExtCC.gxx b/inc/Extrema_GExtCC.gxx
index 7ecdc93..af59ab1 100644
--- a/inc/Extrema_GExtCC.gxx
+++ b/inc/Extrema_GExtCC.gxx
@@ -245,14 +245,9 @@ void Extrema_GExtCC::Perform()
     Standard_Boolean bIsDone;
     Extrema_ExtElC CCXtrem ((*((Curve1*)myC[0])).Circle(), (*((Curve2*)myC[1])).Circle());
     bIsDone = CCXtrem.IsDone();
-    //modified by NIZNHY-PKV Fri Nov 21 10:48:14 2008f
     if(bIsDone) {
       Results(CCXtrem, U11, U12, U21, U22);
     }
-    //if(CCXtrem.IsParallel()) {
-      //Results(CCXtrem, U11, U12, U21, U22);
-    //}
-    //modified by NIZNHY-PKV Fri Nov 21 10:48:23 2008t
     else {
       Standard_Integer i;
       Standard_Integer aNbS = 32; //default number of sample points per interval (why 32?)
@@ -325,7 +320,17 @@ void Extrema_GExtCC::Perform()
 	aNbS[1] = (Standard_Integer) (aNbS[1] * LL[1]/LL[0]/2. );
       }
     }
-
+    //modified by NIZNHY-PKV Tue Apr 17 10:01:32 2012f
+    Standard_Integer aNbSTresh;
+    //
+    aNbSTresh=10000;
+    //
+    for (i = 0; i < 2; ++i) {
+      if (aNbS[i]>aNbSTresh) {
+	aNbS[i]=aNbSTresh;
+      }
+    }
+    //modified by NIZNHY-PKV Tue Apr 17 10:01:34 2012t
     for (i = 0; i < 2; i++) {
       TColStd_ListOfTransient& aCacheList = myCacheLists[i];
       if (aCacheList.IsEmpty()) {
diff --git a/inc/Extrema_GExtPC.gxx b/inc/Extrema_GExtPC.gxx
index 6661c08..ddaf85e 100644
--- a/inc/Extrema_GExtPC.gxx
+++ b/inc/Extrema_GExtPC.gxx
@@ -104,6 +104,8 @@ void Extrema_GExtPC::Perform(const ThePoint& P)
       Standard_Boolean IntIsNotValid;
       n = TheCurveTool::NbIntervals(*((TheCurve*)myC), GeomAbs_C2);
       TColStd_Array1OfReal theInter(1, n+1);
+      Standard_Boolean isPeriodic = TheCurveTool::IsPeriodic(*((TheCurve*)myC));
+      Standard_Real aPeriodicShift = 0.;
       TheCurveTool::Intervals(*((TheCurve*)myC), theInter, GeomAbs_C2);
       mysample = Max(mysample/n, 17);
       TheVector V1;
@@ -111,34 +113,40 @@ void Extrema_GExtPC::Perform(const ThePoint& P)
       Standard_Real s1 = 0.0 ;
       Standard_Real s2 = 0.0;      
       for (i = 1; i <= n; i++) {
-	myintuinf = theInter(i);
-	myintusup = theInter(i+1);
-
-	IntIsNotValid = (myuinf > myintusup) || 
-	                (myusup < myintuinf);
-
-	if(IntIsNotValid) continue;
-
-	if (myuinf >= myintuinf) myintuinf = myuinf;
-	if (myusup <= myintusup) myintusup = myusup;
-
-	if((myintusup - myintuinf) <= mytolu) continue;
-
-	if (i != 1) {
-	  TheCurveTool::D1(*((TheCurve*)myC), myintuinf, PP, V1);
-	  s1 = (TheVector(P, PP))*V1;
-	  if (s1*s2 < 0.0) {
-	    mySqDist.Append(PP.SquareDistance(P));
-	    myismin.Append((s1 < 0.0));
-	    mypoint.Append(ThePOnC(myintuinf, PP));
-	  }
-	}
-	if (i != n) {
-	  TheCurveTool::D1(*((TheCurve*)myC), myintusup, PP, V1);
-	  s2 = (TheVector(P, PP))*V1;
-	}
-	IntervalPerform(P);
-	IntExtIsDone = IntExtIsDone || mydone;
+        myintuinf = theInter(i);
+        myintusup = theInter(i+1);
+        
+        Standard_Real anInfToCheck = myintuinf;
+        Standard_Real aSupToCheck = myintusup;
+        
+        if (isPeriodic) {
+          Standard_Real aPeriod = TheCurveTool::Period(*((TheCurve*)myC));
+          anInfToCheck = ElCLib::InPeriod(myintuinf, myuinf, myuinf+aPeriod);
+          aSupToCheck = myintusup+(anInfToCheck-myintuinf);
+        }    
+        IntIsNotValid = (myuinf > aSupToCheck) || (myusup < anInfToCheck);
+
+        if(IntIsNotValid) continue;
+
+        if (myuinf >= anInfToCheck) anInfToCheck = myuinf;
+        if (myusup <= aSupToCheck) aSupToCheck = myusup;
+        if((aSupToCheck - anInfToCheck) <= mytolu) continue;
+
+        if (i != 1) {
+          TheCurveTool::D1(*((TheCurve*)myC), myintuinf, PP, V1);
+          s1 = (TheVector(P, PP))*V1;
+          if (s1*s2 < 0.0) {
+            mySqDist.Append(PP.SquareDistance(P));
+            myismin.Append((s1 < 0.0));
+            mypoint.Append(ThePOnC(myintuinf, PP));
+          }
+        }
+        if (i != n) {
+          TheCurveTool::D1(*((TheCurve*)myC), myintusup, PP, V1);
+          s2 = (TheVector(P, PP))*V1;
+        }
+        IntervalPerform(P);
+        IntExtIsDone = IntExtIsDone || mydone;
       }
       mydone = IntExtIsDone;
       return;
@@ -154,17 +162,16 @@ void Extrema_GExtPC::Perform(const ThePoint& P)
       ThePOnC PC = myExtPElC.Point(i);
       U = PC.Parameter();
       if (TheCurveTool::IsPeriodic(*((TheCurve*)myC))) {
-	U = ElCLib::InPeriod(U, myuinf, myuinf+TheCurveTool::Period(*((TheCurve*)myC)));
+	    U = ElCLib::InPeriod(U, myuinf, myuinf+TheCurveTool::Period(*((TheCurve*)myC)));
       }
       if ((U >= myuinf-mytolu) && (U <= myusup+mytolu)){
-	PC.SetValues(U, myExtPElC.Point(i).Value());
-	mySqDist.Append(myExtPElC.SquareDistance(i));
-	myismin.Append(myExtPElC.IsMin(i));
-	mypoint.Append(PC);
+        PC.SetValues(U, myExtPElC.Point(i).Value());
+        mySqDist.Append(myExtPElC.SquareDistance(i));
+        myismin.Append(myExtPElC.IsMin(i));
+        mypoint.Append(PC);
       }
     }
-  }
-  
+  } 
 }
 
 
@@ -211,13 +218,13 @@ void Extrema_GExtPC::IntervalPerform(const ThePoint& P)
       ThePOnC PC = myExtPC.Point(i);
       U = PC.Parameter();
       if (TheCurveTool::IsPeriodic(*((TheCurve*)myC))) {
-	U = ElCLib::InPeriod(U, myuinf, myuinf+TheCurveTool::Period(*((TheCurve*)myC)));
+        U = ElCLib::InPeriod(U, myuinf, myuinf+TheCurveTool::Period(*((TheCurve*)myC)));
       }
       if ((U >= myuinf - mytolu) && (U <= myusup + mytolu)) {
-	PC.SetValues(U, PC.Value());
-	mySqDist.Append(myExtPC.SquareDistance(i));
-	myismin.Append(myExtPC.IsMin(i));
-	mypoint.Append(PC);
+        PC.SetValues(U, PC.Value());
+        mySqDist.Append(myExtPC.SquareDistance(i));
+        myismin.Append(myExtPC.IsMin(i));
+        mypoint.Append(PC);
       }
     }
   }
diff --git a/inc/Extrema_GenExtCS.hxx b/inc/Extrema_GenExtCS.hxx
index 0798ddf..0dbe54d 100644
--- a/inc/Extrema_GenExtCS.hxx
+++ b/inc/Extrema_GenExtCS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class Extrema_POnSurf;
 class Extrema_GenExtCS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_GenExtCS();
diff --git a/inc/Extrema_GenExtPS.hxx b/inc/Extrema_GenExtPS.hxx
index 14bdf5e..cc9dd05 100644
--- a/inc/Extrema_GenExtPS.hxx
+++ b/inc/Extrema_GenExtPS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,8 +46,12 @@
 #ifndef _Extrema_ExtAlgo_HeaderFile
 #include <Extrema_ExtAlgo.hxx>
 #endif
+#ifndef _Handle_TColStd_HArray1OfReal_HeaderFile
+#include <Handle_TColStd_HArray1OfReal.hxx>
+#endif
 class TColgp_HArray2OfPnt;
 class Bnd_HArray1OfSphere;
+class TColStd_HArray1OfReal;
 class StdFail_NotDone;
 class Standard_OutOfRange;
 class Standard_TypeMismatch;
@@ -60,18 +67,7 @@ class math_Vector;
 class Extrema_GenExtPS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_GenExtPS();
@@ -139,7 +135,11 @@ private:
   
   Standard_EXPORT     void BuildTree() ;
   
-  Standard_EXPORT     void FindSolution(const gp_Pnt& P,const math_Vector& UV,const Standard_Real PasU,const Standard_Real PasV,const Extrema_ExtFlag f) ;
+  Standard_EXPORT     void FindSolution(const gp_Pnt& P,const math_Vector& UV,const Standard_Integer theNoU,const Standard_Integer theNoV,const Extrema_ExtFlag f) ;
+  //! Selection of points to build grid, depending on the type of surface <br>
+  Standard_EXPORT     void GetGridPoints(const Adaptor3d_Surface& theSurf) ;
+  //! Creation of grid of parametric points <br>
+  Standard_EXPORT     void BuildGrid() ;
 
 
 Standard_Boolean myDone;
@@ -159,6 +159,8 @@ Extrema_FuncExtPS myF;
 Adaptor3d_SurfacePtr myS;
 Extrema_ExtFlag myFlag;
 Extrema_ExtAlgo myAlgo;
+Handle_TColStd_HArray1OfReal myUParams;
+Handle_TColStd_HArray1OfReal myVParams;
 
 
 };
diff --git a/inc/Extrema_GenExtSS.hxx b/inc/Extrema_GenExtSS.hxx
index f033284..a2d79b8 100644
--- a/inc/Extrema_GenExtSS.hxx
+++ b/inc/Extrema_GenExtSS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class Extrema_POnSurf;
 class Extrema_GenExtSS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_GenExtSS();
diff --git a/inc/Extrema_GenLocateExtCS.hxx b/inc/Extrema_GenLocateExtCS.hxx
index 499e1d5..1861aa6 100644
--- a/inc/Extrema_GenLocateExtCS.hxx
+++ b/inc/Extrema_GenLocateExtCS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Extrema_POnSurf;
 class Extrema_GenLocateExtCS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_GenLocateExtCS();
diff --git a/inc/Extrema_GenLocateExtPS.hxx b/inc/Extrema_GenLocateExtPS.hxx
index 7abd6cd..18e6e4c 100644
--- a/inc/Extrema_GenLocateExtPS.hxx
+++ b/inc/Extrema_GenLocateExtPS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Extrema_POnSurf;
 class Extrema_GenLocateExtPS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_GenLocateExtPS();
diff --git a/inc/Extrema_GenLocateExtSS.hxx b/inc/Extrema_GenLocateExtSS.hxx
index 84ffda4..6a00126 100644
--- a/inc/Extrema_GenLocateExtSS.hxx
+++ b/inc/Extrema_GenLocateExtSS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Extrema_POnSurf;
 class Extrema_GenLocateExtSS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_GenLocateExtSS();
diff --git a/inc/Extrema_LocECC2dOfLocateExtCC2d.hxx b/inc/Extrema_LocECC2dOfLocateExtCC2d.hxx
index a32d0a8..7cc5ced 100644
--- a/inc/Extrema_LocECC2dOfLocateExtCC2d.hxx
+++ b/inc/Extrema_LocECC2dOfLocateExtCC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Extrema_SeqPOnCOfCCLocFOfLocECC2dOfLocateExtCC2d;
 class Extrema_LocECC2dOfLocateExtCC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_LocECC2dOfLocateExtCC2d(const Adaptor2d_Curve2d& C1,const Adaptor2d_Curve2d& C2,const Standard_Real U0,const Standard_Real V0,const Standard_Real TolU,const Standard_Real TolV);
diff --git a/inc/Extrema_LocECCOfLocateExtCC.hxx b/inc/Extrema_LocECCOfLocateExtCC.hxx
index bd9ddc3..3160079 100644
--- a/inc/Extrema_LocECCOfLocateExtCC.hxx
+++ b/inc/Extrema_LocECCOfLocateExtCC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Extrema_SeqPOnCOfCCLocFOfLocECCOfLocateExtCC;
 class Extrema_LocECCOfLocateExtCC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_LocECCOfLocateExtCC(const Adaptor3d_Curve& C1,const Adaptor3d_Curve& C2,const Standard_Real U0,const Standard_Real V0,const Standard_Real TolU,const Standard_Real TolV);
diff --git a/inc/Extrema_LocEPCOfLocateExtPC.hxx b/inc/Extrema_LocEPCOfLocateExtPC.hxx
index d41d7b0..d83020a 100644
--- a/inc/Extrema_LocEPCOfLocateExtPC.hxx
+++ b/inc/Extrema_LocEPCOfLocateExtPC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC;
 class Extrema_LocEPCOfLocateExtPC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_LocEPCOfLocateExtPC();
diff --git a/inc/Extrema_LocEPCOfLocateExtPC2d.hxx b/inc/Extrema_LocEPCOfLocateExtPC2d.hxx
index fb0284a..d09bd7e 100644
--- a/inc/Extrema_LocEPCOfLocateExtPC2d.hxx
+++ b/inc/Extrema_LocEPCOfLocateExtPC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d;
 class Extrema_LocEPCOfLocateExtPC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_LocEPCOfLocateExtPC2d();
diff --git a/inc/Extrema_LocateExtCC.hxx b/inc/Extrema_LocateExtCC.hxx
index 6d2e866..67328d5 100644
--- a/inc/Extrema_LocateExtCC.hxx
+++ b/inc/Extrema_LocateExtCC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Extrema_POnCurv;
 class Extrema_LocateExtCC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_LocateExtCC(const Adaptor3d_Curve& C1,const Adaptor3d_Curve& C2,const Standard_Real U0,const Standard_Real V0);
diff --git a/inc/Extrema_LocateExtCC2d.hxx b/inc/Extrema_LocateExtCC2d.hxx
index a1fa7eb..4da1abe 100644
--- a/inc/Extrema_LocateExtCC2d.hxx
+++ b/inc/Extrema_LocateExtCC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Extrema_POnCurv2d;
 class Extrema_LocateExtCC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_LocateExtCC2d(const Adaptor2d_Curve2d& C1,const Adaptor2d_Curve2d& C2,const Standard_Real U0,const Standard_Real V0);
diff --git a/inc/Extrema_LocateExtPC.hxx b/inc/Extrema_LocateExtPC.hxx
index ec59462..6f4bf3a 100644
--- a/inc/Extrema_LocateExtPC.hxx
+++ b/inc/Extrema_LocateExtPC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class Extrema_PCLocFOfLocEPCOfLocateExtPC;
 class Extrema_LocateExtPC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_LocateExtPC();
diff --git a/inc/Extrema_LocateExtPC2d.hxx b/inc/Extrema_LocateExtPC2d.hxx
index de84f93..a044841 100644
--- a/inc/Extrema_LocateExtPC2d.hxx
+++ b/inc/Extrema_LocateExtPC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class Extrema_PCLocFOfLocEPCOfLocateExtPC2d;
 class Extrema_LocateExtPC2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_LocateExtPC2d();
diff --git a/inc/Extrema_PCFOfEPCOfELPCOfLocateExtPC.hxx b/inc/Extrema_PCFOfEPCOfELPCOfLocateExtPC.hxx
index dfc5bce..c234bb0 100644
--- a/inc/Extrema_PCFOfEPCOfELPCOfLocateExtPC.hxx
+++ b/inc/Extrema_PCFOfEPCOfELPCOfLocateExtPC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class Extrema_SequenceNodeOfSeqPCOfPCFOfEPCOfELPCOfLocateExtPC;
 class Extrema_PCFOfEPCOfELPCOfLocateExtPC  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_PCFOfEPCOfELPCOfLocateExtPC();
diff --git a/inc/Extrema_PCFOfEPCOfELPCOfLocateExtPC2d.hxx b/inc/Extrema_PCFOfEPCOfELPCOfLocateExtPC2d.hxx
index c7d8a91..38d41c3 100644
--- a/inc/Extrema_PCFOfEPCOfELPCOfLocateExtPC2d.hxx
+++ b/inc/Extrema_PCFOfEPCOfELPCOfLocateExtPC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class Extrema_SequenceNodeOfSeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d;
 class Extrema_PCFOfEPCOfELPCOfLocateExtPC2d  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_PCFOfEPCOfELPCOfLocateExtPC2d();
diff --git a/inc/Extrema_PCFOfEPCOfExtPC.hxx b/inc/Extrema_PCFOfEPCOfExtPC.hxx
index 89e87c4..e56d80c 100644
--- a/inc/Extrema_PCFOfEPCOfExtPC.hxx
+++ b/inc/Extrema_PCFOfEPCOfExtPC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class Extrema_SequenceNodeOfSeqPCOfPCFOfEPCOfExtPC;
 class Extrema_PCFOfEPCOfExtPC  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_PCFOfEPCOfExtPC();
diff --git a/inc/Extrema_PCFOfEPCOfExtPC2d.hxx b/inc/Extrema_PCFOfEPCOfExtPC2d.hxx
index 3ddd0ae..c29f920 100644
--- a/inc/Extrema_PCFOfEPCOfExtPC2d.hxx
+++ b/inc/Extrema_PCFOfEPCOfExtPC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class Extrema_SequenceNodeOfSeqPCOfPCFOfEPCOfExtPC2d;
 class Extrema_PCFOfEPCOfExtPC2d  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_PCFOfEPCOfExtPC2d();
diff --git a/inc/Extrema_PCLocFOfLocEPCOfLocateExtPC.hxx b/inc/Extrema_PCLocFOfLocEPCOfLocateExtPC.hxx
index 2b23d7a..3e70e12 100644
--- a/inc/Extrema_PCLocFOfLocEPCOfLocateExtPC.hxx
+++ b/inc/Extrema_PCLocFOfLocEPCOfLocateExtPC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class Extrema_SequenceNodeOfSeqPCOfPCLocFOfLocEPCOfLocateExtPC;
 class Extrema_PCLocFOfLocEPCOfLocateExtPC  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_PCLocFOfLocEPCOfLocateExtPC();
diff --git a/inc/Extrema_PCLocFOfLocEPCOfLocateExtPC2d.hxx b/inc/Extrema_PCLocFOfLocEPCOfLocateExtPC2d.hxx
index b6125a9..3b4d259 100644
--- a/inc/Extrema_PCLocFOfLocEPCOfLocateExtPC2d.hxx
+++ b/inc/Extrema_PCLocFOfLocEPCOfLocateExtPC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class Extrema_SequenceNodeOfSeqPCOfPCLocFOfLocEPCOfLocateExtPC2d;
 class Extrema_PCLocFOfLocEPCOfLocateExtPC2d  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_PCLocFOfLocEPCOfLocateExtPC2d();
diff --git a/inc/Extrema_POnCurv.hxx b/inc/Extrema_POnCurv.hxx
index 2dd9c82..635c784 100644
--- a/inc/Extrema_POnCurv.hxx
+++ b/inc/Extrema_POnCurv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Extrema_POnCurv);
 class Extrema_POnCurv  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_POnCurv();
diff --git a/inc/Extrema_POnCurv2d.hxx b/inc/Extrema_POnCurv2d.hxx
index 9dc514e..10af1a0 100644
--- a/inc/Extrema_POnCurv2d.hxx
+++ b/inc/Extrema_POnCurv2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Extrema_POnCurv2d);
 class Extrema_POnCurv2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Extrema_POnCurv2d();
diff --git a/inc/Extrema_POnSurf.hxx b/inc/Extrema_POnSurf.hxx
index 778974e..312bbb0 100644
--- a/inc/Extrema_POnSurf.hxx
+++ b/inc/Extrema_POnSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Extrema_POnSurf);
 class Extrema_POnSurf  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creation of an indefinite point on surface. <br>
   Standard_EXPORT   Extrema_POnSurf();
diff --git a/inc/Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC.hxx b/inc/Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC.hxx
index 9b263ed..ade8fde 100644
--- a/inc/Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC.hxx
+++ b/inc/Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSeqPCOfPCFOfEPCOfELPCOfLocateExtPC;
 class Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC();
diff --git a/inc/Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d.hxx b/inc/Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d.hxx
index ef50fc9..069f82d 100644
--- a/inc/Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d.hxx
+++ b/inc/Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d;
 class Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d();
diff --git a/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC.hxx b/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC.hxx
index 4e0d12f..8e814d6 100644
--- a/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC.hxx
+++ b/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSeqPCOfPCFOfEPCOfExtPC;
 class Extrema_SeqPCOfPCFOfEPCOfExtPC  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SeqPCOfPCFOfEPCOfExtPC();
diff --git a/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC2d.hxx b/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC2d.hxx
index 2c49561..fbcf1fc 100644
--- a/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC2d.hxx
+++ b/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSeqPCOfPCFOfEPCOfExtPC2d;
 class Extrema_SeqPCOfPCFOfEPCOfExtPC2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SeqPCOfPCFOfEPCOfExtPC2d();
diff --git a/inc/Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC.hxx b/inc/Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC.hxx
index 8e2a1c0..eeb3021 100644
--- a/inc/Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC.hxx
+++ b/inc/Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSeqPCOfPCLocFOfLocEPCOfLocateExtPC;
 class Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC();
diff --git a/inc/Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d.hxx b/inc/Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d.hxx
index 138cc1f..6c99590 100644
--- a/inc/Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d.hxx
+++ b/inc/Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSeqPCOfPCLocFOfLocEPCOfLocateExtPC2d;
 class Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d();
diff --git a/inc/Extrema_SeqPOnCOfCCFOfECC2dOfExtCC2d.hxx b/inc/Extrema_SeqPOnCOfCCFOfECC2dOfExtCC2d.hxx
index f2d9bd0..8bdc71e 100644
--- a/inc/Extrema_SeqPOnCOfCCFOfECC2dOfExtCC2d.hxx
+++ b/inc/Extrema_SeqPOnCOfCCFOfECC2dOfExtCC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSeqPOnCOfCCFOfECC2dOfExtCC2d;
 class Extrema_SeqPOnCOfCCFOfECC2dOfExtCC2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SeqPOnCOfCCFOfECC2dOfExtCC2d();
diff --git a/inc/Extrema_SeqPOnCOfCCFOfECCOfExtCC.hxx b/inc/Extrema_SeqPOnCOfCCFOfECCOfExtCC.hxx
index 0ab137a..b894a37 100644
--- a/inc/Extrema_SeqPOnCOfCCFOfECCOfExtCC.hxx
+++ b/inc/Extrema_SeqPOnCOfCCFOfECCOfExtCC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSeqPOnCOfCCFOfECCOfExtCC;
 class Extrema_SeqPOnCOfCCFOfECCOfExtCC  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SeqPOnCOfCCFOfECCOfExtCC();
diff --git a/inc/Extrema_SeqPOnCOfCCFOfELCC2dOfLocateExtCC2d.hxx b/inc/Extrema_SeqPOnCOfCCFOfELCC2dOfLocateExtCC2d.hxx
index 9fdda65..b696b88 100644
--- a/inc/Extrema_SeqPOnCOfCCFOfELCC2dOfLocateExtCC2d.hxx
+++ b/inc/Extrema_SeqPOnCOfCCFOfELCC2dOfLocateExtCC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSeqPOnCOfCCFOfELCC2dOfLocateExtCC2d;
 class Extrema_SeqPOnCOfCCFOfELCC2dOfLocateExtCC2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SeqPOnCOfCCFOfELCC2dOfLocateExtCC2d();
diff --git a/inc/Extrema_SeqPOnCOfCCFOfELCCOfLocateExtCC.hxx b/inc/Extrema_SeqPOnCOfCCFOfELCCOfLocateExtCC.hxx
index 86861f8..2a4b4f5 100644
--- a/inc/Extrema_SeqPOnCOfCCFOfELCCOfLocateExtCC.hxx
+++ b/inc/Extrema_SeqPOnCOfCCFOfELCCOfLocateExtCC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSeqPOnCOfCCFOfELCCOfLocateExtCC;
 class Extrema_SeqPOnCOfCCFOfELCCOfLocateExtCC  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SeqPOnCOfCCFOfELCCOfLocateExtCC();
diff --git a/inc/Extrema_SeqPOnCOfCCLocFOfLocECC2dOfLocateExtCC2d.hxx b/inc/Extrema_SeqPOnCOfCCLocFOfLocECC2dOfLocateExtCC2d.hxx
index 4aac1be..920f088 100644
--- a/inc/Extrema_SeqPOnCOfCCLocFOfLocECC2dOfLocateExtCC2d.hxx
+++ b/inc/Extrema_SeqPOnCOfCCLocFOfLocECC2dOfLocateExtCC2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSeqPOnCOfCCLocFOfLocECC2dOfLocateExtCC2d;
 class Extrema_SeqPOnCOfCCLocFOfLocECC2dOfLocateExtCC2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SeqPOnCOfCCLocFOfLocECC2dOfLocateExtCC2d();
diff --git a/inc/Extrema_SeqPOnCOfCCLocFOfLocECCOfLocateExtCC.hxx b/inc/Extrema_SeqPOnCOfCCLocFOfLocECCOfLocateExtCC.hxx
index 49b35ae..6d74e8c 100644
--- a/inc/Extrema_SeqPOnCOfCCLocFOfLocECCOfLocateExtCC.hxx
+++ b/inc/Extrema_SeqPOnCOfCCLocFOfLocECCOfLocateExtCC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSeqPOnCOfCCLocFOfLocECCOfLocateExtCC;
 class Extrema_SeqPOnCOfCCLocFOfLocECCOfLocateExtCC  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SeqPOnCOfCCLocFOfLocECCOfLocateExtCC();
diff --git a/inc/Extrema_SequenceOfPOnCurv.hxx b/inc/Extrema_SequenceOfPOnCurv.hxx
index c970ff9..b859901 100644
--- a/inc/Extrema_SequenceOfPOnCurv.hxx
+++ b/inc/Extrema_SequenceOfPOnCurv.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSequenceOfPOnCurv;
 class Extrema_SequenceOfPOnCurv  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SequenceOfPOnCurv();
diff --git a/inc/Extrema_SequenceOfPOnCurv2d.hxx b/inc/Extrema_SequenceOfPOnCurv2d.hxx
index 01c1f93..de4dedb 100644
--- a/inc/Extrema_SequenceOfPOnCurv2d.hxx
+++ b/inc/Extrema_SequenceOfPOnCurv2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSequenceOfPOnCurv2d;
 class Extrema_SequenceOfPOnCurv2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SequenceOfPOnCurv2d();
diff --git a/inc/Extrema_SequenceOfPOnSurf.hxx b/inc/Extrema_SequenceOfPOnSurf.hxx
index 5e3dedd..9e7865c 100644
--- a/inc/Extrema_SequenceOfPOnSurf.hxx
+++ b/inc/Extrema_SequenceOfPOnSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Extrema_SequenceNodeOfSequenceOfPOnSurf;
 class Extrema_SequenceOfPOnSurf  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Extrema_SequenceOfPOnSurf();
diff --git a/inc/FEmTool_Assembly.hxx b/inc/FEmTool_Assembly.hxx
index b28f26f..a437fba 100644
--- a/inc/FEmTool_Assembly.hxx
+++ b/inc/FEmTool_Assembly.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class math_Vector;
 class FEmTool_Assembly  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   FEmTool_Assembly(const TColStd_Array2OfInteger& Dependence,const Handle(FEmTool_HAssemblyTable)& Table);
diff --git a/inc/FEmTool_AssemblyTable.hxx b/inc/FEmTool_AssemblyTable.hxx
index 1daca1b..3e8dccc 100644
--- a/inc/FEmTool_AssemblyTable.hxx
+++ b/inc/FEmTool_AssemblyTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColStd_HArray1OfInteger;
 class FEmTool_AssemblyTable  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   FEmTool_AssemblyTable(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/FEmTool_ElementsOfRefMatrix.hxx b/inc/FEmTool_ElementsOfRefMatrix.hxx
index a8b0ead..71ccf62 100644
--- a/inc/FEmTool_ElementsOfRefMatrix.hxx
+++ b/inc/FEmTool_ElementsOfRefMatrix.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class math_Vector;
 class FEmTool_ElementsOfRefMatrix  : public math_FunctionSet {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   FEmTool_ElementsOfRefMatrix(const Handle(PLib_Base)& TheBase,const Standard_Integer DerOrder);
diff --git a/inc/FEmTool_ListIteratorOfListOfVectors.hxx b/inc/FEmTool_ListIteratorOfListOfVectors.hxx
index b0cdbf5..61a05cb 100644
--- a/inc/FEmTool_ListIteratorOfListOfVectors.hxx
+++ b/inc/FEmTool_ListIteratorOfListOfVectors.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class FEmTool_ListNodeOfListOfVectors;
 class FEmTool_ListIteratorOfListOfVectors  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   FEmTool_ListIteratorOfListOfVectors();
diff --git a/inc/FEmTool_ListOfVectors.hxx b/inc/FEmTool_ListOfVectors.hxx
index 2b353ec..1b41e6c 100644
--- a/inc/FEmTool_ListOfVectors.hxx
+++ b/inc/FEmTool_ListOfVectors.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class FEmTool_ListNodeOfListOfVectors;
 class FEmTool_ListOfVectors  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   FEmTool_ListOfVectors();
diff --git a/inc/FEmTool_SeqOfLinConstr.hxx b/inc/FEmTool_SeqOfLinConstr.hxx
index a63926b..08a40dc 100644
--- a/inc/FEmTool_SeqOfLinConstr.hxx
+++ b/inc/FEmTool_SeqOfLinConstr.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class FEmTool_SequenceNodeOfSeqOfLinConstr;
 class FEmTool_SeqOfLinConstr  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       FEmTool_SeqOfLinConstr();
diff --git a/inc/FSD_BinaryFile.hxx b/inc/FSD_BinaryFile.hxx
index 6d86a06..ee91d8f 100644
--- a/inc/FSD_BinaryFile.hxx
+++ b/inc/FSD_BinaryFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,6 +55,9 @@
 #ifndef _Standard_CString_HeaderFile
 #include <Standard_CString.hxx>
 #endif
+#ifndef _Standard_Size_HeaderFile
+#include <Standard_Size.hxx>
+#endif
 class Storage_StreamTypeMismatchError;
 class Storage_StreamFormatError;
 class Storage_StreamWriteError;
@@ -67,18 +73,7 @@ class Storage_BaseDriver;
 class FSD_BinaryFile  : public Storage_BaseDriver {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   FSD_BinaryFile();
@@ -284,7 +279,7 @@ public:
 protected:
 
   //! read <rsize> character from the current position. <br>
-  Standard_EXPORT     void ReadChar(TCollection_AsciiString& buffer,const Standard_Integer rsize) ;
+  Standard_EXPORT     void ReadChar(TCollection_AsciiString& buffer,const Standard_Size rsize) ;
   //! read string from the current position. <br>
   Standard_EXPORT     void ReadString(TCollection_AsciiString& buffer) ;
   //! write string at the current position. <br>
diff --git a/inc/FSD_CmpFile.hxx b/inc/FSD_CmpFile.hxx
index eb6e150..32ab89b 100644
--- a/inc/FSD_CmpFile.hxx
+++ b/inc/FSD_CmpFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,6 +52,9 @@
 #ifndef _Standard_ShortReal_HeaderFile
 #include <Standard_ShortReal.hxx>
 #endif
+#ifndef _Standard_Size_HeaderFile
+#include <Standard_Size.hxx>
+#endif
 #ifndef _Standard_CString_HeaderFile
 #include <Standard_CString.hxx>
 #endif
@@ -71,18 +77,7 @@ class Standard_Type;
 class FSD_CmpFile  : public Storage_BaseDriver {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   FSD_CmpFile();
@@ -296,7 +291,7 @@ protected:
   //! write from the current position to the end of line. <br>
   Standard_EXPORT     void WriteExtendedLine(const TCollection_ExtendedString& buffer) ;
   //! read <rsize> character from the current position. <br>
-  Standard_EXPORT     void ReadChar(TCollection_AsciiString& buffer,const Standard_Integer rsize) ;
+  Standard_EXPORT     void ReadChar(TCollection_AsciiString& buffer,const Standard_Size rsize) ;
   //! read from the first none space character position to the end of line. <br>
   Standard_EXPORT     void ReadString(TCollection_AsciiString& buffer) ;
   
diff --git a/inc/FSD_File.hxx b/inc/FSD_File.hxx
index b69e7f3..eb2d239 100644
--- a/inc/FSD_File.hxx
+++ b/inc/FSD_File.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,6 +49,9 @@
 #ifndef _Standard_ShortReal_HeaderFile
 #include <Standard_ShortReal.hxx>
 #endif
+#ifndef _Standard_Size_HeaderFile
+#include <Standard_Size.hxx>
+#endif
 #ifndef _Standard_CString_HeaderFile
 #include <Standard_CString.hxx>
 #endif
@@ -66,18 +72,7 @@ class Storage_BaseDriver;
 class FSD_File  : public Storage_BaseDriver {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Constructs a driver defining as a file, the physical <br>
@@ -305,7 +300,7 @@ protected:
   //! write from the current position to the end of line. <br>
   Standard_EXPORT     void WriteExtendedLine(const TCollection_ExtendedString& buffer) ;
   //! read <rsize> character from the current position. <br>
-  Standard_EXPORT     void ReadChar(TCollection_AsciiString& buffer,const Standard_Integer rsize) ;
+  Standard_EXPORT     void ReadChar(TCollection_AsciiString& buffer,const Standard_Size rsize) ;
   //! read from the first none space character position to the end of line. <br>
   Standard_EXPORT     void ReadString(TCollection_AsciiString& buffer) ;
   
diff --git a/inc/FWOSDriver.hxx b/inc/FWOSDriver.hxx
index 6bc69a4..7b0103d 100644
--- a/inc/FWOSDriver.hxx
+++ b/inc/FWOSDriver.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class FWOSDriver_DriverFactory;
 class FWOSDriver  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns a DriverFactory. <br>
   Standard_EXPORT   static  Handle_Standard_Transient Factory(const Standard_GUID& aGUID) ;
diff --git a/inc/FairCurve_Batten.hxx b/inc/FairCurve_Batten.hxx
index 5532723..0444fe8 100644
--- a/inc/FairCurve_Batten.hxx
+++ b/inc/FairCurve_Batten.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -60,18 +63,7 @@ class Geom2d_BSplineCurve;
 class FairCurve_Batten  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructor  with the two points and the geometrical <br>
 //!          characteristics of the batten (elastic beam) <br>
diff --git a/inc/FairCurve_BattenLaw.hxx b/inc/FairCurve_BattenLaw.hxx
index 712f3ce..00afa65 100644
--- a/inc/FairCurve_BattenLaw.hxx
+++ b/inc/FairCurve_BattenLaw.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class FairCurve_BattenLaw  : public math_Function {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructor of linear batten with <br>
 //!          Heigth : the Heigth at the middle point <br>
diff --git a/inc/FairCurve_DistributionOfEnergy.hxx b/inc/FairCurve_DistributionOfEnergy.hxx
index 080bc7e..d963282 100644
--- a/inc/FairCurve_DistributionOfEnergy.hxx
+++ b/inc/FairCurve_DistributionOfEnergy.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColgp_HArray1OfPnt2d;
 class FairCurve_DistributionOfEnergy  : public math_FunctionSet {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns the number of variables of the function. <br>
   Standard_EXPORT   virtual  Standard_Integer NbVariables() const;
diff --git a/inc/FairCurve_DistributionOfJerk.hxx b/inc/FairCurve_DistributionOfJerk.hxx
index de81e06..96702ed 100644
--- a/inc/FairCurve_DistributionOfJerk.hxx
+++ b/inc/FairCurve_DistributionOfJerk.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class math_Vector;
 class FairCurve_DistributionOfJerk  : public FairCurve_DistributionOfEnergy {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   FairCurve_DistributionOfJerk(const Standard_Integer BSplOrder,const Handle(TColStd_HArray1OfReal)& FlatKnots,const Handle(TColgp_HArray1OfPnt2d)& Poles,const Standard_Integer DerivativeOrder,const FairCurve_BattenLaw& Law,const Standard_Integer NbValAux = 0);
diff --git a/inc/FairCurve_DistributionOfSagging.hxx b/inc/FairCurve_DistributionOfSagging.hxx
index 3ca7eb8..4f8f422 100644
--- a/inc/FairCurve_DistributionOfSagging.hxx
+++ b/inc/FairCurve_DistributionOfSagging.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class math_Vector;
 class FairCurve_DistributionOfSagging  : public FairCurve_DistributionOfEnergy {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   FairCurve_DistributionOfSagging(const Standard_Integer BSplOrder,const Handle(TColStd_HArray1OfReal)& FlatKnots,const Handle(TColgp_HArray1OfPnt2d)& Poles,const Standard_Integer DerivativeOrder,const FairCurve_BattenLaw& Law,const Standard_Integer NbValAux = 0);
diff --git a/inc/FairCurve_DistributionOfTension.hxx b/inc/FairCurve_DistributionOfTension.hxx
index a6612b5..1a378d1 100644
--- a/inc/FairCurve_DistributionOfTension.hxx
+++ b/inc/FairCurve_DistributionOfTension.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class math_Vector;
 class FairCurve_DistributionOfTension  : public FairCurve_DistributionOfEnergy {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   FairCurve_DistributionOfTension(const Standard_Integer BSplOrder,const Handle(TColStd_HArray1OfReal)& FlatKnots,const Handle(TColgp_HArray1OfPnt2d)& Poles,const Standard_Integer DerivativeOrder,const Standard_Real LengthSliding,const FairCurve_BattenLaw& Law,const Standard_Integer NbValAux = 0,const Standard_Boolean Uniform = Standard_False);
diff --git a/inc/FairCurve_Energy.hxx b/inc/FairCurve_Energy.hxx
index 05eb7d4..eef02b7 100644
--- a/inc/FairCurve_Energy.hxx
+++ b/inc/FairCurve_Energy.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class gp_Pnt2d;
 class FairCurve_Energy  : public math_MultipleVarFunctionWithHessian {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns the number of variables of the energy. <br>
       virtual  Standard_Integer NbVariables() const;
diff --git a/inc/FairCurve_EnergyOfBatten.hxx b/inc/FairCurve_EnergyOfBatten.hxx
index 106b12b..53e9af7 100644
--- a/inc/FairCurve_EnergyOfBatten.hxx
+++ b/inc/FairCurve_EnergyOfBatten.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class math_Vector;
 class FairCurve_EnergyOfBatten  : public FairCurve_Energy {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Angles corresspond to the Ox axis <br>
   Standard_EXPORT   FairCurve_EnergyOfBatten(const Standard_Integer BSplOrder,const Handle(TColStd_HArray1OfReal)& FlatKnots,const Handle(TColgp_HArray1OfPnt2d)& Poles,const Standard_Integer ContrOrder1,const Standard_Integer ContrOrder2,const FairCurve_BattenLaw& Law,const Standard_Real LengthSliding,const Standard_Boolean FreeSliding = Standard_True,const Standard_Real Angle1 = 0,const Standard_Real Angle2 = 0);
diff --git a/inc/FairCurve_EnergyOfMVC.hxx b/inc/FairCurve_EnergyOfMVC.hxx
index d262a1e..6dcc40f 100644
--- a/inc/FairCurve_EnergyOfMVC.hxx
+++ b/inc/FairCurve_EnergyOfMVC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class math_Vector;
 class FairCurve_EnergyOfMVC  : public FairCurve_Energy {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Angles corresspond to the Ox axis <br>
   Standard_EXPORT   FairCurve_EnergyOfMVC(const Standard_Integer BSplOrder,const Handle(TColStd_HArray1OfReal)& FlatKnots,const Handle(TColgp_HArray1OfPnt2d)& Poles,const Standard_Integer ContrOrder1,const Standard_Integer ContrOrder2,const FairCurve_BattenLaw& Law,const Standard_Real PhysicalRatio,const Standard_Real LengthSliding,const Standard_Boolean FreeSliding = Standard_True,const Standard_Real Angle1 = 0,const Standard_Real Angle2 = 0,const Standard_Real Curvature1 = 0,const Standard_Real Curvature2 = 0);
diff --git a/inc/FairCurve_MinimalVariation.hxx b/inc/FairCurve_MinimalVariation.hxx
index 8702833..6ce9a62 100644
--- a/inc/FairCurve_MinimalVariation.hxx
+++ b/inc/FairCurve_MinimalVariation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class gp_Vec2d;
 class FairCurve_MinimalVariation  : public FairCurve_Batten {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs the two contact points P1 and P2  and the geometrical <br>
 //!          characteristics of the batten (elastic beam) <br>
diff --git a/inc/FairCurve_Newton.hxx b/inc/FairCurve_Newton.hxx
index 16be031..2dc1650 100644
--- a/inc/FairCurve_Newton.hxx
+++ b/inc/FairCurve_Newton.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class math_Vector;
 class FairCurve_Newton  : public math_NewtonMinimum {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! -- Given the  starting   point  StartingPoint, <br>
 //!            The tolerance  required on  the  solution is given  by <br>
diff --git a/inc/FilletSurf_Builder.hxx b/inc/FilletSurf_Builder.hxx
index c14c6ef..5ebb108 100644
--- a/inc/FilletSurf_Builder.hxx
+++ b/inc/FilletSurf_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class Geom_TrimmedCurve;
 class FilletSurf_Builder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! initialize  of the informations necessary for  the <br>
 //!          computation of  the fillet on the <br>
diff --git a/inc/FilletSurf_InternalBuilder.hxx b/inc/FilletSurf_InternalBuilder.hxx
index c1d15d0..5cf7512 100644
--- a/inc/FilletSurf_InternalBuilder.hxx
+++ b/inc/FilletSurf_InternalBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -82,18 +85,7 @@ class Geom_TrimmedCurve;
 class FilletSurf_InternalBuilder  : public ChFi3d_FilBuilder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   FilletSurf_InternalBuilder(const TopoDS_Shape& S,const ChFi3d_FilletShape FShape = ChFi3d_Polynomial,const Standard_Real Ta = 1.0e-2,const Standard_Real Tapp3d = 1.0e-4,const Standard_Real Tapp2d = 1.0e-5);
diff --git a/inc/Font_FontAspect.hxx b/inc/Font_FontAspect.hxx
new file mode 100644
index 0000000..e7c100e
--- /dev/null
+++ b/inc/Font_FontAspect.hxx
@@ -0,0 +1,22 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#ifndef _Font_FontAspect_HeaderFile
+#define _Font_FontAspect_HeaderFile
+
+
+enum Font_FontAspect {
+Font_FA_Undefined,
+Font_FA_Regular,
+Font_FA_Bold,
+Font_FA_Italic,
+Font_FA_BoldItalic
+};
+
+#ifndef _Standard_PrimitiveTypes_HeaderFile
+#include <Standard_PrimitiveTypes.hxx>
+#endif
+
+#endif
diff --git a/inc/Font_FontMgr.hxx b/inc/Font_FontMgr.hxx
new file mode 100644
index 0000000..2c01b55
--- /dev/null
+++ b/inc/Font_FontMgr.hxx
@@ -0,0 +1,66 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#ifndef _Font_FontMgr_HeaderFile
+#define _Font_FontMgr_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
+#ifndef _Handle_Font_FontMgr_HeaderFile
+#include <Handle_Font_FontMgr.hxx>
+#endif
+
+#ifndef _Font_NListOfSystemFont_HeaderFile
+#include <Font_NListOfSystemFont.hxx>
+#endif
+#ifndef _MMgt_TShared_HeaderFile
+#include <MMgt_TShared.hxx>
+#endif
+
+
+//! Structure for store of Font System Information <br>
+class Font_FontMgr : public MMgt_TShared {
+
+public:
+
+  
+  Standard_EXPORT   static  Handle_Font_FontMgr GetInstance() ;
+  
+  Standard_EXPORT     Font_NListOfSystemFont GetAvalableFonts() const;
+
+
+
+
+  DEFINE_STANDARD_RTTI(Font_FontMgr)
+
+protected:
+
+
+
+
+private: 
+
+  //! Creates empty font object <br>
+  Standard_EXPORT   Font_FontMgr();
+  
+  Standard_EXPORT     void InitFontDataBase() ;
+
+Font_NListOfSystemFont MyListOfFonts;
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+
+
+#endif
diff --git a/inc/Font_NListOfSystemFont.hxx b/inc/Font_NListOfSystemFont.hxx
new file mode 100644
index 0000000..3fa5422
--- /dev/null
+++ b/inc/Font_NListOfSystemFont.hxx
@@ -0,0 +1,26 @@
+// Created on: 2009-01-20
+// Created by: Alexander A. BORODIN
+// Copyright (c) 2009-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+#ifndef _Font_NListOfSystemFont_HeaderFile
+#define _Font_NListOfSystemFont_HeaderFile
+#include <NCollection_DefineList.hxx>
+#include <Font_SystemFont.hxx>
+DEFINE_LIST (Font_NListOfSystemFont,
+             NCollection_List,
+             Handle(Font_SystemFont))
+#endif
diff --git a/inc/Font_SystemFont.hxx b/inc/Font_SystemFont.hxx
new file mode 100644
index 0000000..f1da4ee
--- /dev/null
+++ b/inc/Font_SystemFont.hxx
@@ -0,0 +1,93 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#ifndef _Font_SystemFont_HeaderFile
+#define _Font_SystemFont_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
+#ifndef _Handle_Font_SystemFont_HeaderFile
+#include <Handle_Font_SystemFont.hxx>
+#endif
+
+#ifndef _Handle_TCollection_HAsciiString_HeaderFile
+#include <Handle_TCollection_HAsciiString.hxx>
+#endif
+#ifndef _Font_FontAspect_HeaderFile
+#include <Font_FontAspect.hxx>
+#endif
+#ifndef _Standard_Integer_HeaderFile
+#include <Standard_Integer.hxx>
+#endif
+#ifndef _Standard_Boolean_HeaderFile
+#include <Standard_Boolean.hxx>
+#endif
+#ifndef _MMgt_TShared_HeaderFile
+#include <MMgt_TShared.hxx>
+#endif
+class TCollection_HAsciiString;
+
+
+//! Structure for store of Font System Information <br>
+class Font_SystemFont : public MMgt_TShared {
+
+public:
+
+  //! Creates empty font object <br>
+  Standard_EXPORT   Font_SystemFont();
+  //! Creates Font object initialized with <FontName> as name <br>
+//!         <FontAspect>.... TODO <br>
+  Standard_EXPORT   Font_SystemFont(const Handle(TCollection_HAsciiString)& FontName,const Font_FontAspect Aspect,const Handle(TCollection_HAsciiString)& FilePath);
+  //! TODO <br>
+  Standard_EXPORT   Font_SystemFont(const Handle(TCollection_HAsciiString)& XLFD,const Handle(TCollection_HAsciiString)& FilePath);
+  //! Returns font family name <br>
+  Standard_EXPORT     Handle_TCollection_HAsciiString FontName() const;
+  //! Returns font file path <br>
+//! Level: Public <br>
+  Standard_EXPORT     Handle_TCollection_HAsciiString FontPath() const;
+  //! Returns font aspect <br>
+//! Level: Public <br>
+  Standard_EXPORT     Font_FontAspect FontAspect() const;
+  //! Returns font height <br>
+//! If returned value is equal -1 it means that font is resizable <br>
+//! Level: Public <br>
+  Standard_EXPORT     Standard_Integer FontHeight() const;
+  
+  Standard_EXPORT     Standard_Boolean IsValid() const;
+
+
+
+
+  DEFINE_STANDARD_RTTI(Font_SystemFont)
+
+protected:
+
+
+
+
+private: 
+
+
+Handle_TCollection_HAsciiString MyFontName;
+Font_FontAspect MyFontAspect;
+Standard_Integer MyFaceSize;
+Handle_TCollection_HAsciiString MyFilePath;
+Standard_Boolean MyVerification;
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+
+
+#endif
diff --git a/inc/GCE2d_MakeArcOfCircle.hxx b/inc/GCE2d_MakeArcOfCircle.hxx
index 71a2df9..9518a47 100644
--- a/inc/GCE2d_MakeArcOfCircle.hxx
+++ b/inc/GCE2d_MakeArcOfCircle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Vec2d;
 class GCE2d_MakeArcOfCircle  : public GCE2d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Makes an arc of circle (TrimmedCurve from Geom2d) from <br>
 //!          a circle between two parameters Alpha1 and Alpha2. <br>
diff --git a/inc/GCE2d_MakeArcOfEllipse.hxx b/inc/GCE2d_MakeArcOfEllipse.hxx
index 9b0699c..2ff0a24 100644
--- a/inc/GCE2d_MakeArcOfEllipse.hxx
+++ b/inc/GCE2d_MakeArcOfEllipse.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Pnt2d;
 class GCE2d_MakeArcOfEllipse  : public GCE2d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make an arc of Ellipse (TrimmedCurve from Geom2d) from <br>
 //!          a Ellipse between two parameters Alpha1 and Alpha2. <br>
diff --git a/inc/GCE2d_MakeArcOfHyperbola.hxx b/inc/GCE2d_MakeArcOfHyperbola.hxx
index 12a34af..a74ff6a 100644
--- a/inc/GCE2d_MakeArcOfHyperbola.hxx
+++ b/inc/GCE2d_MakeArcOfHyperbola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Pnt2d;
 class GCE2d_MakeArcOfHyperbola  : public GCE2d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from <br>
 //!          a Hyperbola between two parameters Alpha1 and Alpha2. <br>
diff --git a/inc/GCE2d_MakeArcOfParabola.hxx b/inc/GCE2d_MakeArcOfParabola.hxx
index d016e6f..40398ba 100644
--- a/inc/GCE2d_MakeArcOfParabola.hxx
+++ b/inc/GCE2d_MakeArcOfParabola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Pnt2d;
 class GCE2d_MakeArcOfParabola  : public GCE2d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make an arc of Parabola (TrimmedCurve from Geom2d) from <br>
 //!          a Parabola between two parameters Alpha1 and Alpha2. <br>
diff --git a/inc/GCE2d_MakeCircle.hxx b/inc/GCE2d_MakeCircle.hxx
index 559f764..bec6232 100644
--- a/inc/GCE2d_MakeCircle.hxx
+++ b/inc/GCE2d_MakeCircle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Pnt2d;
 class GCE2d_MakeCircle  : public GCE2d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  creates a circle from a non persistent one. <br>
   Standard_EXPORT   GCE2d_MakeCircle(const gp_Circ2d& C);
diff --git a/inc/GCE2d_MakeEllipse.hxx b/inc/GCE2d_MakeEllipse.hxx
index 3b48c6d..57eb838 100644
--- a/inc/GCE2d_MakeEllipse.hxx
+++ b/inc/GCE2d_MakeEllipse.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Pnt2d;
 class GCE2d_MakeEllipse  : public GCE2d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Creates an ellipse from a non persistent one from package gp <br>
diff --git a/inc/GCE2d_MakeHyperbola.hxx b/inc/GCE2d_MakeHyperbola.hxx
index 3454de4..ad45204 100644
--- a/inc/GCE2d_MakeHyperbola.hxx
+++ b/inc/GCE2d_MakeHyperbola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Pnt2d;
 class GCE2d_MakeHyperbola  : public GCE2d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Creates  an Hyperbola from a non persistent one from package gp <br>
diff --git a/inc/GCE2d_MakeLine.hxx b/inc/GCE2d_MakeLine.hxx
index 074b577..5d5aa2f 100644
--- a/inc/GCE2d_MakeLine.hxx
+++ b/inc/GCE2d_MakeLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class gp_Dir2d;
 class GCE2d_MakeLine  : public GCE2d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Creates a line located in 2D space with the axis placement A. <br>
diff --git a/inc/GCE2d_MakeMirror.hxx b/inc/GCE2d_MakeMirror.hxx
index 3c73138..6c105e9 100644
--- a/inc/GCE2d_MakeMirror.hxx
+++ b/inc/GCE2d_MakeMirror.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Dir2d;
 class GCE2d_MakeMirror  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GCE2d_MakeMirror(const gp_Pnt2d& Point);
diff --git a/inc/GCE2d_MakeParabola.hxx b/inc/GCE2d_MakeParabola.hxx
index b449dcb..50d14df 100644
--- a/inc/GCE2d_MakeParabola.hxx
+++ b/inc/GCE2d_MakeParabola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class gp_Pnt2d;
 class GCE2d_MakeParabola  : public GCE2d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a parabola from a non persistent one. <br>
   Standard_EXPORT   GCE2d_MakeParabola(const gp_Parab2d& Prb);
diff --git a/inc/GCE2d_MakeRotation.hxx b/inc/GCE2d_MakeRotation.hxx
index 6ca9813..caa147d 100644
--- a/inc/GCE2d_MakeRotation.hxx
+++ b/inc/GCE2d_MakeRotation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Pnt2d;
 class GCE2d_MakeRotation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a rotation through angle Angle about the center Point. <br>
   Standard_EXPORT   GCE2d_MakeRotation(const gp_Pnt2d& Point,const Standard_Real Angle);
diff --git a/inc/GCE2d_MakeScale.hxx b/inc/GCE2d_MakeScale.hxx
index c76ab45..470dca8 100644
--- a/inc/GCE2d_MakeScale.hxx
+++ b/inc/GCE2d_MakeScale.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Pnt2d;
 class GCE2d_MakeScale  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a scaling transformation with <br>
 //! -   Point as the center of the transformation, and <br>
diff --git a/inc/GCE2d_MakeSegment.hxx b/inc/GCE2d_MakeSegment.hxx
index 551f9fd..71321b3 100644
--- a/inc/GCE2d_MakeSegment.hxx
+++ b/inc/GCE2d_MakeSegment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class gp_Lin2d;
 class GCE2d_MakeSegment  : public GCE2d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a segment of Line from the 2 points <P1> and <P2>. <br>
 //!          Status is "ConfusedPoints" if <P1> and <P2> are confused. <br>
diff --git a/inc/GCE2d_MakeTranslation.hxx b/inc/GCE2d_MakeTranslation.hxx
index 23d468b..94a6e3a 100644
--- a/inc/GCE2d_MakeTranslation.hxx
+++ b/inc/GCE2d_MakeTranslation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_Pnt2d;
 class GCE2d_MakeTranslation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a translation along the vector Vect. <br>
   Standard_EXPORT   GCE2d_MakeTranslation(const gp_Vec2d& Vect);
diff --git a/inc/GCE2d_Root.hxx b/inc/GCE2d_Root.hxx
index cde1632..705e022 100644
--- a/inc/GCE2d_Root.hxx
+++ b/inc/GCE2d_Root.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@
 class GCE2d_Root  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns true if the construction is successful. <br>
         Standard_Boolean IsDone() const;
diff --git a/inc/GCPnts_AbscissaPoint.hxx b/inc/GCPnts_AbscissaPoint.hxx
index 4fc9b9a..e33fe7f 100644
--- a/inc/GCPnts_AbscissaPoint.hxx
+++ b/inc/GCPnts_AbscissaPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Adaptor2d_Curve2d;
 class GCPnts_AbscissaPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the length of the Curve <C>. <br>
   Standard_EXPORT   static  Standard_Real Length(Adaptor3d_Curve& C) ;
diff --git a/inc/GCPnts_QuasiUniformAbscissa.hxx b/inc/GCPnts_QuasiUniformAbscissa.hxx
index dc34e3e..1a6d5ca 100644
--- a/inc/GCPnts_QuasiUniformAbscissa.hxx
+++ b/inc/GCPnts_QuasiUniformAbscissa.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class Adaptor2d_Curve2d;
 class GCPnts_QuasiUniformAbscissa  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty algorithm. To define the problem <br>
 //! to be solved, use the function Initialize. <br>
diff --git a/inc/GCPnts_QuasiUniformDeflection.hxx b/inc/GCPnts_QuasiUniformDeflection.hxx
index d48f884..55b4fae 100644
--- a/inc/GCPnts_QuasiUniformDeflection.hxx
+++ b/inc/GCPnts_QuasiUniformDeflection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class gp_Pnt;
 class GCPnts_QuasiUniformDeflection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty algorithm. To define the problem <br>
 //! to be solved, use the function Initialize. <br>
diff --git a/inc/GCPnts_TangentialDeflection.hxx b/inc/GCPnts_TangentialDeflection.hxx
index 7b3c5a0..c3f56fb 100644
--- a/inc/GCPnts_TangentialDeflection.hxx
+++ b/inc/GCPnts_TangentialDeflection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Pnt;
 class GCPnts_TangentialDeflection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GCPnts_TangentialDeflection();
diff --git a/inc/GCPnts_UniformAbscissa.hxx b/inc/GCPnts_UniformAbscissa.hxx
index 5e67d47..41a2b29 100644
--- a/inc/GCPnts_UniformAbscissa.hxx
+++ b/inc/GCPnts_UniformAbscissa.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Adaptor2d_Curve2d;
 class GCPnts_UniformAbscissa  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creation of a indefinite UniformAbscissa <br>
   Standard_EXPORT   GCPnts_UniformAbscissa();
diff --git a/inc/GCPnts_UniformDeflection.hxx b/inc/GCPnts_UniformDeflection.hxx
index 3440d50..d951b6b 100644
--- a/inc/GCPnts_UniformDeflection.hxx
+++ b/inc/GCPnts_UniformDeflection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class gp_Pnt;
 class GCPnts_UniformDeflection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty algorithm. To define the problem <br>
 //! to be solved, use the function Initialize. <br>
diff --git a/inc/GC_MakeArcOfCircle.hxx b/inc/GC_MakeArcOfCircle.hxx
index 88b3eee..21dafe4 100644
--- a/inc/GC_MakeArcOfCircle.hxx
+++ b/inc/GC_MakeArcOfCircle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Vec;
 class GC_MakeArcOfCircle  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make an arc of circle (TrimmedCurve from Geom) from <br>
 //!          a circle between two angles Alpha1 and Alpha2 <br>
diff --git a/inc/GC_MakeArcOfEllipse.hxx b/inc/GC_MakeArcOfEllipse.hxx
index 755bfdd..669a66b 100644
--- a/inc/GC_MakeArcOfEllipse.hxx
+++ b/inc/GC_MakeArcOfEllipse.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Pnt;
 class GC_MakeArcOfEllipse  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an arc of Ellipse (TrimmedCurve from Geom) from <br>
 //!          a Ellipse between two parameters Alpha1 and Alpha2. <br>
diff --git a/inc/GC_MakeArcOfHyperbola.hxx b/inc/GC_MakeArcOfHyperbola.hxx
index 250338e..51d2e7f 100644
--- a/inc/GC_MakeArcOfHyperbola.hxx
+++ b/inc/GC_MakeArcOfHyperbola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Pnt;
 class GC_MakeArcOfHyperbola  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an arc of Hyperbola (TrimmedCurve from Geom) from <br>
 //!          a Hyperbola between two parameters Alpha1 and Alpha2 <br>
diff --git a/inc/GC_MakeArcOfParabola.hxx b/inc/GC_MakeArcOfParabola.hxx
index 3098af4..2dc6293 100644
--- a/inc/GC_MakeArcOfParabola.hxx
+++ b/inc/GC_MakeArcOfParabola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Pnt;
 class GC_MakeArcOfParabola  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an arc of Parabola (TrimmedCurve from Geom) from <br>
 //!          a Parabola between two parameters Alpha1 and Alpha2 <br>
diff --git a/inc/GC_MakeCircle.hxx b/inc/GC_MakeCircle.hxx
index 37e5d82..aeccd5c 100644
--- a/inc/GC_MakeCircle.hxx
+++ b/inc/GC_MakeCircle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class gp_Ax1;
 class GC_MakeCircle  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  creates a circle from a non persistent circle C by its conversion. <br>
   Standard_EXPORT   GC_MakeCircle(const gp_Circ& C);
diff --git a/inc/GC_MakeConicalSurface.hxx b/inc/GC_MakeConicalSurface.hxx
index 392dd8a..2049f40 100644
--- a/inc/GC_MakeConicalSurface.hxx
+++ b/inc/GC_MakeConicalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -62,18 +65,7 @@ class gp_Lin;
 class GC_MakeConicalSurface  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  A2 defines the local coordinate system of the conical surface. <br>
diff --git a/inc/GC_MakeCylindricalSurface.hxx b/inc/GC_MakeCylindricalSurface.hxx
index b47a199..a9551d7 100644
--- a/inc/GC_MakeCylindricalSurface.hxx
+++ b/inc/GC_MakeCylindricalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class gp_Circ;
 class GC_MakeCylindricalSurface  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  A2 defines the local coordinate system of the cylindrical surface. <br>
diff --git a/inc/GC_MakeEllipse.hxx b/inc/GC_MakeEllipse.hxx
index 4f4ca50..9a19b01 100644
--- a/inc/GC_MakeEllipse.hxx
+++ b/inc/GC_MakeEllipse.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Pnt;
 class GC_MakeEllipse  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Creates an ellipse from a non persistent ellipse E from package gp by its conversion. <br>
diff --git a/inc/GC_MakeHyperbola.hxx b/inc/GC_MakeHyperbola.hxx
index 70a110c..80a092a 100644
--- a/inc/GC_MakeHyperbola.hxx
+++ b/inc/GC_MakeHyperbola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Pnt;
 class GC_MakeHyperbola  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Creates  an Hyperbola from a non persistent hyperbola  from package gp by conversion. <br>
diff --git a/inc/GC_MakeLine.hxx b/inc/GC_MakeLine.hxx
index 1737905..7af4088 100644
--- a/inc/GC_MakeLine.hxx
+++ b/inc/GC_MakeLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class gp_Dir;
 class GC_MakeLine  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Creates a line located in 3D space with the axis placement A1. <br>
diff --git a/inc/GC_MakeMirror.hxx b/inc/GC_MakeMirror.hxx
index b4b1147..d13fea6 100644
--- a/inc/GC_MakeMirror.hxx
+++ b/inc/GC_MakeMirror.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class gp_Ax2;
 class GC_MakeMirror  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GC_MakeMirror(const gp_Pnt& Point);
diff --git a/inc/GC_MakePlane.hxx b/inc/GC_MakePlane.hxx
index 9e9a33e..b8ed492 100644
--- a/inc/GC_MakePlane.hxx
+++ b/inc/GC_MakePlane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class gp_Ax1;
 class GC_MakePlane  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Creates a plane located in 3D space with an axis placement <br>
diff --git a/inc/GC_MakeRotation.hxx b/inc/GC_MakeRotation.hxx
index 040f771..24d2c92 100644
--- a/inc/GC_MakeRotation.hxx
+++ b/inc/GC_MakeRotation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_Dir;
 class GC_MakeRotation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a rotation through angle Angle about the axis defined by the line Line. <br>
   Standard_EXPORT   GC_MakeRotation(const gp_Lin& Line,const Standard_Real Angle);
diff --git a/inc/GC_MakeScale.hxx b/inc/GC_MakeScale.hxx
index ea52676..747408e 100644
--- a/inc/GC_MakeScale.hxx
+++ b/inc/GC_MakeScale.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Pnt;
 class GC_MakeScale  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a scaling transformation with <br>
 //! -   Point as the center of the transformation, and <br>
diff --git a/inc/GC_MakeSegment.hxx b/inc/GC_MakeSegment.hxx
index b6b1bb3..9947031 100644
--- a/inc/GC_MakeSegment.hxx
+++ b/inc/GC_MakeSegment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class gp_Lin;
 class GC_MakeSegment  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a segment of Line from the 2 points <P1> and <P2>. <br>
 //!          It returns NullObject if <P1> and <P2> are confused. <br>
diff --git a/inc/GC_MakeTranslation.hxx b/inc/GC_MakeTranslation.hxx
index bca325d..e700af2 100644
--- a/inc/GC_MakeTranslation.hxx
+++ b/inc/GC_MakeTranslation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_Pnt;
 class GC_MakeTranslation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a translation along the vector " Vect " <br>
   Standard_EXPORT   GC_MakeTranslation(const gp_Vec& Vect);
diff --git a/inc/GC_MakeTrimmedCone.hxx b/inc/GC_MakeTrimmedCone.hxx
index 307855d..77eb769 100644
--- a/inc/GC_MakeTrimmedCone.hxx
+++ b/inc/GC_MakeTrimmedCone.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class gp_Pnt;
 class GC_MakeTrimmedCone  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a RectangularTrimmedSurface <TheCone> from Geom <br>
 //!          It is trimmed by P3 and P4. <br>
diff --git a/inc/GC_MakeTrimmedCylinder.hxx b/inc/GC_MakeTrimmedCylinder.hxx
index abff299..ffc7302 100644
--- a/inc/GC_MakeTrimmedCylinder.hxx
+++ b/inc/GC_MakeTrimmedCylinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Cylinder;
 class GC_MakeTrimmedCylinder  : public GC_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a cylindricalSurface <Cyl> from Geom <br>
 //!          Its axis is is <P1P2> and its radius is the distance <br>
diff --git a/inc/GC_Root.hxx b/inc/GC_Root.hxx
index 07511a0..ad8c27d 100644
--- a/inc/GC_Root.hxx
+++ b/inc/GC_Root.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@
 class GC_Root  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns true if the construction is successful. <br>
         Standard_Boolean IsDone() const;
diff --git a/inc/GProp.hxx b/inc/GProp.hxx
index 157cd00..475e8fb 100644
--- a/inc/GProp.hxx
+++ b/inc/GProp.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class GProp_PEquation;
 class GProp  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the matrix Operator, referred to as the <br>
 //! "Huyghens Operator" of a geometric system at the <br>
diff --git a/inc/GProp_CelGProps.hxx b/inc/GProp_CelGProps.hxx
index c4ea33e..e33f4cb 100644
--- a/inc/GProp_CelGProps.hxx
+++ b/inc/GProp_CelGProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Lin;
 class GProp_CelGProps  : public GProp_GProps {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GProp_CelGProps();
diff --git a/inc/GProp_GProps.hxx b/inc/GProp_GProps.hxx
index beb1dcc..6af0457 100644
--- a/inc/GProp_GProps.hxx
+++ b/inc/GProp_GProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class GProp_PrincipalProps;
 class GProp_GProps  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  The origin (0, 0, 0) of the absolute cartesian coordinate system <br>
diff --git a/inc/GProp_PEquation.hxx b/inc/GProp_PEquation.hxx
index 03c4ffd..09e359a 100644
--- a/inc/GProp_PEquation.hxx
+++ b/inc/GProp_PEquation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class gp_Vec;
 class GProp_PEquation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a framework to analyze the <br>
 //! collection of points Pnts and computes: <br>
diff --git a/inc/GProp_PGProps.hxx b/inc/GProp_PGProps.hxx
index 08e365a..c43b072 100644
--- a/inc/GProp_PGProps.hxx
+++ b/inc/GProp_PGProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TColStd_Array2OfReal;
 class GProp_PGProps  : public GProp_GProps {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes a framework to compute global properties <br>
 //! on a set of points. <br>
diff --git a/inc/GProp_PrincipalProps.hxx b/inc/GProp_PrincipalProps.hxx
index a32247a..8d5b64e 100644
--- a/inc/GProp_PrincipalProps.hxx
+++ b/inc/GProp_PrincipalProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class gp_Pnt;
 class GProp_PrincipalProps  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates an undefined PrincipalProps. <br>
   Standard_EXPORT   GProp_PrincipalProps();
diff --git a/inc/GProp_SelGProps.hxx b/inc/GProp_SelGProps.hxx
index 47446b6..8789add 100644
--- a/inc/GProp_SelGProps.hxx
+++ b/inc/GProp_SelGProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Torus;
 class GProp_SelGProps  : public GProp_GProps {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GProp_SelGProps();
diff --git a/inc/GProp_VelGProps.hxx b/inc/GProp_VelGProps.hxx
index dd093d8..87305aa 100644
--- a/inc/GProp_VelGProps.hxx
+++ b/inc/GProp_VelGProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Torus;
 class GProp_VelGProps  : public GProp_GProps {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GProp_VelGProps();
diff --git a/inc/GccAna_Circ2d2TanOn.hxx b/inc/GccAna_Circ2d2TanOn.hxx
index 6f58998..03a5747 100644
--- a/inc/GccAna_Circ2d2TanOn.hxx
+++ b/inc/GccAna_Circ2d2TanOn.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class gp_Circ2d;
 class GccAna_Circ2d2TanOn  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This method implements the algorithms used to <br>
 //!          create 2d circles TANgent to two 2d circles and <br>
diff --git a/inc/GccAna_Circ2d2TanRad.hxx b/inc/GccAna_Circ2d2TanRad.hxx
index 9084aef..5d43019 100644
--- a/inc/GccAna_Circ2d2TanRad.hxx
+++ b/inc/GccAna_Circ2d2TanRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -74,18 +77,7 @@ class gp_Circ2d;
 class GccAna_Circ2d2TanRad  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This method implements the algorithms used to <br>
 //!          create 2d circles TANgent to two 2d circle with a <br>
diff --git a/inc/GccAna_Circ2d3Tan.hxx b/inc/GccAna_Circ2d3Tan.hxx
index c1baef4..480d7cf 100644
--- a/inc/GccAna_Circ2d3Tan.hxx
+++ b/inc/GccAna_Circ2d3Tan.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -71,18 +74,7 @@ class gp_Circ2d;
 class GccAna_Circ2d3Tan  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This method implements the algorithms used to <br>
 //!          create 2d circles tangent to 3 circles. <br>
diff --git a/inc/GccAna_Circ2dBisec.hxx b/inc/GccAna_Circ2dBisec.hxx
index fc7258d..311ea77 100644
--- a/inc/GccAna_Circ2dBisec.hxx
+++ b/inc/GccAna_Circ2dBisec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class GccInt_Bisec;
 class GccAna_Circ2dBisec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs bisecting curves between the two circles Circ1 and Circ2. <br>
   Standard_EXPORT   GccAna_Circ2dBisec(const gp_Circ2d& Circ1,const gp_Circ2d& Circ2);
diff --git a/inc/GccAna_Circ2dTanCen.hxx b/inc/GccAna_Circ2dTanCen.hxx
index 7d24a2f..fafb74a 100644
--- a/inc/GccAna_Circ2dTanCen.hxx
+++ b/inc/GccAna_Circ2dTanCen.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -70,18 +73,7 @@ class gp_Circ2d;
 class GccAna_Circ2dTanCen  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This method implements the algorithms used to <br>
 //!          create 2d circles tangent to a circle and <br>
diff --git a/inc/GccAna_Circ2dTanOnRad.hxx b/inc/GccAna_Circ2dTanOnRad.hxx
index be28a03..551ffc3 100644
--- a/inc/GccAna_Circ2dTanOnRad.hxx
+++ b/inc/GccAna_Circ2dTanOnRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -75,18 +78,7 @@ class gp_Circ2d;
 class GccAna_Circ2dTanOnRad  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This methods implements the algorithms used to create <br>
 //!          2d Circles tangent to a circle and centered on a 2d Line <br>
diff --git a/inc/GccAna_CircLin2dBisec.hxx b/inc/GccAna_CircLin2dBisec.hxx
index ee5c436..70220d4 100644
--- a/inc/GccAna_CircLin2dBisec.hxx
+++ b/inc/GccAna_CircLin2dBisec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class GccInt_Bisec;
 class GccAna_CircLin2dBisec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs bisecting curves between the circle Circle and the line Line. <br>
   Standard_EXPORT   GccAna_CircLin2dBisec(const gp_Circ2d& Circle,const gp_Lin2d& Line);
diff --git a/inc/GccAna_CircPnt2dBisec.hxx b/inc/GccAna_CircPnt2dBisec.hxx
index 244a109..d233d73 100644
--- a/inc/GccAna_CircPnt2dBisec.hxx
+++ b/inc/GccAna_CircPnt2dBisec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class GccInt_Bisec;
 class GccAna_CircPnt2dBisec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs bisecting curves between the circle Circle1 and the point Point2. <br>
   Standard_EXPORT   GccAna_CircPnt2dBisec(const gp_Circ2d& Circle1,const gp_Pnt2d& Point2);
diff --git a/inc/GccAna_Lin2d2Tan.hxx b/inc/GccAna_Lin2d2Tan.hxx
index 516b11a..09a00d6 100644
--- a/inc/GccAna_Lin2d2Tan.hxx
+++ b/inc/GccAna_Lin2d2Tan.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class gp_Lin2d;
 class GccAna_Lin2d2Tan  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This methods implements the algorithms used to <br>
 //!          create 2d lines passing thrue 2 points. <br>
diff --git a/inc/GccAna_Lin2dBisec.hxx b/inc/GccAna_Lin2dBisec.hxx
index 41565c5..540043c 100644
--- a/inc/GccAna_Lin2dBisec.hxx
+++ b/inc/GccAna_Lin2dBisec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class gp_Pnt2d;
 class GccAna_Lin2dBisec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs bisecting lines between the two lines Lin1 and Lin2. <br>
   Standard_EXPORT   GccAna_Lin2dBisec(const gp_Lin2d& Lin1,const gp_Lin2d& Lin2);
diff --git a/inc/GccAna_Lin2dTanObl.hxx b/inc/GccAna_Lin2dTanObl.hxx
index d2ecafc..0fd74c3 100644
--- a/inc/GccAna_Lin2dTanObl.hxx
+++ b/inc/GccAna_Lin2dTanObl.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class GccEnt_QualifiedCirc;
 class GccAna_Lin2dTanObl  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This class implements the algorithms used to <br>
 //!          create 2d line passing through a point and <br>
diff --git a/inc/GccAna_Lin2dTanPar.hxx b/inc/GccAna_Lin2dTanPar.hxx
index 8e7d8b8..6494d3c 100644
--- a/inc/GccAna_Lin2dTanPar.hxx
+++ b/inc/GccAna_Lin2dTanPar.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class GccEnt_QualifiedCirc;
 class GccAna_Lin2dTanPar  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This method implements the algorithms used to create a 2d <br>
 //!          line passing through a point and parallel to <br>
diff --git a/inc/GccAna_Lin2dTanPer.hxx b/inc/GccAna_Lin2dTanPer.hxx
index 417d0bb..5d61773 100644
--- a/inc/GccAna_Lin2dTanPer.hxx
+++ b/inc/GccAna_Lin2dTanPer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class GccEnt_QualifiedCirc;
 class GccAna_Lin2dTanPer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This method implements the algorithms used to <br>
 //!          create 2d lines passing through a point and <br>
diff --git a/inc/GccAna_LinPnt2dBisec.hxx b/inc/GccAna_LinPnt2dBisec.hxx
index 2bcdf8a..3ca2281 100644
--- a/inc/GccAna_LinPnt2dBisec.hxx
+++ b/inc/GccAna_LinPnt2dBisec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Pnt2d;
 class GccAna_LinPnt2dBisec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a bisecting curve between the line Line1 and the point Point2. <br>
   Standard_EXPORT   GccAna_LinPnt2dBisec(const gp_Lin2d& Line1,const gp_Pnt2d& Point2);
diff --git a/inc/GccAna_Pnt2dBisec.hxx b/inc/GccAna_Pnt2dBisec.hxx
index e86c5ba..1535ce6 100644
--- a/inc/GccAna_Pnt2dBisec.hxx
+++ b/inc/GccAna_Pnt2dBisec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_Lin2d;
 class GccAna_Pnt2dBisec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a bisecting line between the points Point1 and Point2. <br>
   Standard_EXPORT   GccAna_Pnt2dBisec(const gp_Pnt2d& Point1,const gp_Pnt2d& Point2);
diff --git a/inc/GccEnt.hxx b/inc/GccEnt.hxx
index e5994b1..4f17861 100644
--- a/inc/GccEnt.hxx
+++ b/inc/GccEnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class GccEnt_Array1OfPosition;
 class GccEnt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a qualified line, <br>
 //! so that the relative position to the circle or line of the <br>
diff --git a/inc/GccEnt_Array1OfPosition.hxx b/inc/GccEnt_Array1OfPosition.hxx
index 09f3a98..1e68a3b 100644
--- a/inc/GccEnt_Array1OfPosition.hxx
+++ b/inc/GccEnt_Array1OfPosition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_OutOfMemory;
 class GccEnt_Array1OfPosition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GccEnt_Array1OfPosition(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/GccEnt_QualifiedCirc.hxx b/inc/GccEnt_QualifiedCirc.hxx
index 5029758..91df8b6 100644
--- a/inc/GccEnt_QualifiedCirc.hxx
+++ b/inc/GccEnt_QualifiedCirc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(GccEnt_QualifiedCirc)
 class GccEnt_QualifiedCirc  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a qualified circle by assigning the qualifier <br>
 //! Qualifier to the circle Qualified. Qualifier may be: <br>
diff --git a/inc/GccEnt_QualifiedLin.hxx b/inc/GccEnt_QualifiedLin.hxx
index 32317ca..b5fb2df 100644
--- a/inc/GccEnt_QualifiedLin.hxx
+++ b/inc/GccEnt_QualifiedLin.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(GccEnt_QualifiedLin);
 class GccEnt_QualifiedLin  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
 //! Constructs a qualified line by assigning the qualifier <br>
diff --git a/inc/Geom2dAPI_ExtremaCurveCurve.hxx b/inc/Geom2dAPI_ExtremaCurveCurve.hxx
index 99240e1..2f5e163 100644
--- a/inc/Geom2dAPI_ExtremaCurveCurve.hxx
+++ b/inc/Geom2dAPI_ExtremaCurveCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class Extrema_ExtCC2d;
 class Geom2dAPI_ExtremaCurveCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Computes the extrema between <br>
 //! -   the portion of the curve C1 limited by the two <br>
diff --git a/inc/Geom2dAPI_InterCurveCurve.hxx b/inc/Geom2dAPI_InterCurveCurve.hxx
index b6d8a56..5837b67 100644
--- a/inc/Geom2dAPI_InterCurveCurve.hxx
+++ b/inc/Geom2dAPI_InterCurveCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class Geom2dInt_GInter;
 class Geom2dAPI_InterCurveCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create an empty intersector. Use the <br>
 //! function Init for further initialization of the intersection <br>
diff --git a/inc/Geom2dAPI_Interpolate.hxx b/inc/Geom2dAPI_Interpolate.hxx
index 341e39c..714ca5a 100644
--- a/inc/Geom2dAPI_Interpolate.hxx
+++ b/inc/Geom2dAPI_Interpolate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class TColgp_Array1OfVec2d;
 class Geom2dAPI_Interpolate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Tolerance is to check if the points are not too close to one an other <br>
 //! It is also used to check if the tangent vector is not too small. <br>
diff --git a/inc/Geom2dAPI_PointsToBSpline.hxx b/inc/Geom2dAPI_PointsToBSpline.hxx
index 3576d55..8820618 100644
--- a/inc/Geom2dAPI_PointsToBSpline.hxx
+++ b/inc/Geom2dAPI_PointsToBSpline.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TColStd_Array1OfReal;
 class Geom2dAPI_PointsToBSpline  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty approximation algorithm. <br>
 //! Use an Init function to define and build the BSpline curve. <br>
diff --git a/inc/Geom2dAPI_ProjectPointOnCurve.hxx b/inc/Geom2dAPI_ProjectPointOnCurve.hxx
index 855c282..37fba9c 100644
--- a/inc/Geom2dAPI_ProjectPointOnCurve.hxx
+++ b/inc/Geom2dAPI_ProjectPointOnCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Extrema_ExtPC2d;
 class Geom2dAPI_ProjectPointOnCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty projector algorithm. Use an Init <br>
 //! function to define the point and the curve on which it is going to work. <br>
diff --git a/inc/Geom2dAdaptor.hxx b/inc/Geom2dAdaptor.hxx
index a9487b3..fe1707a 100644
--- a/inc/Geom2dAdaptor.hxx
+++ b/inc/Geom2dAdaptor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Geom2dAdaptor_HCurve;
 class Geom2dAdaptor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Geom2d_Curve MakeCurve(const Adaptor2d_Curve2d& HC) ;
diff --git a/inc/Geom2dAdaptor_Curve.hxx b/inc/Geom2dAdaptor_Curve.hxx
index 3c9c520..01365fb 100644
--- a/inc/Geom2dAdaptor_Curve.hxx
+++ b/inc/Geom2dAdaptor_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class Geom2d_BSplineCurve;
 class Geom2dAdaptor_Curve  : public Adaptor2d_Curve2d {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dAdaptor_Curve();
diff --git a/inc/Geom2dConvert.hxx b/inc/Geom2dConvert.hxx
index b7f6de2..d26a91b 100644
--- a/inc/Geom2dConvert.hxx
+++ b/inc/Geom2dConvert.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class Geom2dConvert_ApproxCurve;
 class Geom2dConvert  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Raised if FromK1 = ToK2 <br>
   Standard_EXPORT   static  Handle_Geom2d_BSplineCurve SplitBSplineCurve(const Handle(Geom2d_BSplineCurve)& C,const Standard_Integer FromK1,const Standard_Integer ToK2,const Standard_Boolean SameOrientation = Standard_True) ;
diff --git a/inc/Geom2dConvert_ApproxCurve.hxx b/inc/Geom2dConvert_ApproxCurve.hxx
index dd937ce..3aaefab 100644
--- a/inc/Geom2dConvert_ApproxCurve.hxx
+++ b/inc/Geom2dConvert_ApproxCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class Standard_OutOfRange;
 class Geom2dConvert_ApproxCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an approximation framework defined by <br>
 //! -   the 2D conic Curve <br>
diff --git a/inc/Geom2dConvert_BSplineCurveKnotSplitting.hxx b/inc/Geom2dConvert_BSplineCurveKnotSplitting.hxx
index dcfbc4d..85ececb 100644
--- a/inc/Geom2dConvert_BSplineCurveKnotSplitting.hxx
+++ b/inc/Geom2dConvert_BSplineCurveKnotSplitting.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TColStd_Array1OfInteger;
 class Geom2dConvert_BSplineCurveKnotSplitting  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Determines points at which the BSpline curve <br>
 //!  BasisCurve should be split in order to obtain arcs <br>
diff --git a/inc/Geom2dConvert_BSplineCurveToBezierCurve.hxx b/inc/Geom2dConvert_BSplineCurveToBezierCurve.hxx
index cc9163d..bfa6b90 100644
--- a/inc/Geom2dConvert_BSplineCurveToBezierCurve.hxx
+++ b/inc/Geom2dConvert_BSplineCurveToBezierCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TColStd_Array1OfReal;
 class Geom2dConvert_BSplineCurveToBezierCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes all the data needed to convert <br>
 //! -   the BSpline curve BasisCurve, into a series of adjacent Bezier arcs. <br>
diff --git a/inc/Geom2dConvert_CompCurveToBSplineCurve.hxx b/inc/Geom2dConvert_CompCurveToBSplineCurve.hxx
index 1a5fa2d..edea0d8 100644
--- a/inc/Geom2dConvert_CompCurveToBSplineCurve.hxx
+++ b/inc/Geom2dConvert_CompCurveToBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom2d_BoundedCurve;
 class Geom2dConvert_CompCurveToBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initialize the algorithme with one curve <br>
 //!        - Parameterisation is used to convert <br>
diff --git a/inc/Geom2dGcc.hxx b/inc/Geom2dGcc.hxx
index 1ea64e7..1710eb1 100644
--- a/inc/Geom2dGcc.hxx
+++ b/inc/Geom2dGcc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class Geom2dGcc_FuncTCirCuOfMyL2d2Tan;
 class Geom2dGcc  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs such a qualified curve that the relative <br>
 //! position of the solution computed by a construction <br>
diff --git a/inc/Geom2dGcc_Circ2d2TanOn.hxx b/inc/Geom2dGcc_Circ2d2TanOn.hxx
index b99215b..da8738b 100644
--- a/inc/Geom2dGcc_Circ2d2TanOn.hxx
+++ b/inc/Geom2dGcc_Circ2d2TanOn.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class gp_Pnt2d;
 class Geom2dGcc_Circ2d2TanOn  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This method implements the algorithms used to <br>
 //!          create 2d circles TANgent to two curves and <br>
diff --git a/inc/Geom2dGcc_Circ2d2TanRad.hxx b/inc/Geom2dGcc_Circ2d2TanRad.hxx
index 967314b..7dba31e 100644
--- a/inc/Geom2dGcc_Circ2d2TanRad.hxx
+++ b/inc/Geom2dGcc_Circ2d2TanRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -79,18 +82,7 @@ class gp_Pnt2d;
 class Geom2dGcc_Circ2d2TanRad  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_Circ2d2TanRad(const Geom2dGcc_QualifiedCurve& Qualified1,const Geom2dGcc_QualifiedCurve& Qualified2,const Standard_Real Radius,const Standard_Real Tolerance);
diff --git a/inc/Geom2dGcc_Circ2d3Tan.hxx b/inc/Geom2dGcc_Circ2d3Tan.hxx
index ca4c6d4..1a61aa8 100644
--- a/inc/Geom2dGcc_Circ2d3Tan.hxx
+++ b/inc/Geom2dGcc_Circ2d3Tan.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -72,18 +75,7 @@ class gp_Pnt2d;
 class Geom2dGcc_Circ2d3Tan  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs one or more 2D circles <br>
 //!   tangential to three curves Qualified1, Qualified2 and <br>
diff --git a/inc/Geom2dGcc_Circ2dTanCen.hxx b/inc/Geom2dGcc_Circ2dTanCen.hxx
index 37701f3..94b1c72 100644
--- a/inc/Geom2dGcc_Circ2dTanCen.hxx
+++ b/inc/Geom2dGcc_Circ2dTanCen.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -72,18 +75,7 @@ class gp_Pnt2d;
 class Geom2dGcc_Circ2dTanCen  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs one or more 2D circles tangential to the <br>
 //! curve Qualified1 and centered on the point Pcenter. <br>
diff --git a/inc/Geom2dGcc_Circ2dTanOnRad.hxx b/inc/Geom2dGcc_Circ2dTanOnRad.hxx
index 563dc94..66c76d0 100644
--- a/inc/Geom2dGcc_Circ2dTanOnRad.hxx
+++ b/inc/Geom2dGcc_Circ2dTanOnRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -81,18 +84,7 @@ class gp_Pnt2d;
 class Geom2dGcc_Circ2dTanOnRad  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs one or more 2D circles of radius Radius, <br>
 //! centered on the 2D curve OnCurv and: <br>
diff --git a/inc/Geom2dGcc_CurveTool.hxx b/inc/Geom2dGcc_CurveTool.hxx
index 61ffd3c..d4914bb 100644
--- a/inc/Geom2dGcc_CurveTool.hxx
+++ b/inc/Geom2dGcc_CurveTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_Vec2d;
 class Geom2dGcc_CurveTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Real FirstParameter(const Geom2dAdaptor_Curve& C) ;
diff --git a/inc/Geom2dGcc_FuncTCirCuOfMyL2d2Tan.hxx b/inc/Geom2dGcc_FuncTCirCuOfMyL2d2Tan.hxx
index e3619ea..18f9d68 100644
--- a/inc/Geom2dGcc_FuncTCirCuOfMyL2d2Tan.hxx
+++ b/inc/Geom2dGcc_FuncTCirCuOfMyL2d2Tan.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class gp_Circ2d;
 class Geom2dGcc_FuncTCirCuOfMyL2d2Tan  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_FuncTCirCuOfMyL2d2Tan(const gp_Circ2d& Circ,const Geom2dAdaptor_Curve& Curv);
diff --git a/inc/Geom2dGcc_FuncTCuCuCuOfMyC2d3Tan.hxx b/inc/Geom2dGcc_FuncTCuCuCuOfMyC2d3Tan.hxx
index 9d7b7fd..97e7ac6 100644
--- a/inc/Geom2dGcc_FuncTCuCuCuOfMyC2d3Tan.hxx
+++ b/inc/Geom2dGcc_FuncTCuCuCuOfMyC2d3Tan.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class math_Matrix;
 class Geom2dGcc_FuncTCuCuCuOfMyC2d3Tan  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_FuncTCuCuCuOfMyC2d3Tan(const Geom2dAdaptor_Curve& C1,const Geom2dAdaptor_Curve& C2,const Geom2dAdaptor_Curve& C3);
diff --git a/inc/Geom2dGcc_FuncTCuCuOfMyL2d2Tan.hxx b/inc/Geom2dGcc_FuncTCuCuOfMyL2d2Tan.hxx
index 6233a4d..b8fb979 100644
--- a/inc/Geom2dGcc_FuncTCuCuOfMyL2d2Tan.hxx
+++ b/inc/Geom2dGcc_FuncTCuCuOfMyL2d2Tan.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class math_Matrix;
 class Geom2dGcc_FuncTCuCuOfMyL2d2Tan  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_FuncTCuCuOfMyL2d2Tan(const Geom2dAdaptor_Curve& Curv1,const Geom2dAdaptor_Curve& Curv2);
diff --git a/inc/Geom2dGcc_FuncTCuCuOnCuOfMyC2d2TanOn.hxx b/inc/Geom2dGcc_FuncTCuCuOnCuOfMyC2d2TanOn.hxx
index 16137f8..9edbb6b 100644
--- a/inc/Geom2dGcc_FuncTCuCuOnCuOfMyC2d2TanOn.hxx
+++ b/inc/Geom2dGcc_FuncTCuCuOnCuOfMyC2d2TanOn.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class math_Matrix;
 class Geom2dGcc_FuncTCuCuOnCuOfMyC2d2TanOn  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_FuncTCuCuOnCuOfMyC2d2TanOn(const Geom2dAdaptor_Curve& C1,const Geom2dAdaptor_Curve& C2,const gp_Circ2d& OnCi,const Standard_Real Rad);
diff --git a/inc/Geom2dGcc_FuncTCuPtOfMyL2d2Tan.hxx b/inc/Geom2dGcc_FuncTCuPtOfMyL2d2Tan.hxx
index 721db35..4dc5afa 100644
--- a/inc/Geom2dGcc_FuncTCuPtOfMyL2d2Tan.hxx
+++ b/inc/Geom2dGcc_FuncTCuPtOfMyL2d2Tan.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class gp_Pnt2d;
 class Geom2dGcc_FuncTCuPtOfMyL2d2Tan  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_FuncTCuPtOfMyL2d2Tan(const Geom2dAdaptor_Curve& C,const gp_Pnt2d& Point);
diff --git a/inc/Geom2dGcc_FuncTOblOfMyL2dTanObl.hxx b/inc/Geom2dGcc_FuncTOblOfMyL2dTanObl.hxx
index bd7ba94..630d0a7 100644
--- a/inc/Geom2dGcc_FuncTOblOfMyL2dTanObl.hxx
+++ b/inc/Geom2dGcc_FuncTOblOfMyL2dTanObl.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class gp_Dir2d;
 class Geom2dGcc_FuncTOblOfMyL2dTanObl  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_FuncTOblOfMyL2dTanObl(const Geom2dAdaptor_Curve& Curve,const gp_Dir2d& Dir);
diff --git a/inc/Geom2dGcc_Lin2d2Tan.hxx b/inc/Geom2dGcc_Lin2d2Tan.hxx
index 7544ca2..60dcd7a 100644
--- a/inc/Geom2dGcc_Lin2d2Tan.hxx
+++ b/inc/Geom2dGcc_Lin2d2Tan.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class Geom2dAdaptor_Curve;
 class Geom2dGcc_Lin2d2Tan  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This class implements the algorithms used to create 2d <br>
 //!          line tangent to two curves. <br>
diff --git a/inc/Geom2dGcc_Lin2dTanObl.hxx b/inc/Geom2dGcc_Lin2dTanObl.hxx
index 6ef55ad..bd08b96 100644
--- a/inc/Geom2dGcc_Lin2dTanObl.hxx
+++ b/inc/Geom2dGcc_Lin2dTanObl.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class Geom2dAdaptor_Curve;
 class Geom2dGcc_Lin2dTanObl  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This class implements the algorithm used to <br>
 //!          create 2d line tangent to a curve and doing an <br>
diff --git a/inc/Geom2dGcc_MyC2d2TanOn.hxx b/inc/Geom2dGcc_MyC2d2TanOn.hxx
index d9821ef..6e6a053 100644
--- a/inc/Geom2dGcc_MyC2d2TanOn.hxx
+++ b/inc/Geom2dGcc_MyC2d2TanOn.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class gp_Circ2d;
 class Geom2dGcc_MyC2d2TanOn  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_MyC2d2TanOn(const GccEnt_QualifiedCirc& Qualified1,const Geom2dGcc_MyQCurve& Qualified2,const gp_Lin2d& OnLine,const Standard_Real Param1,const Standard_Real Param2,const Standard_Real Param3,const Standard_Real Tolerance);
diff --git a/inc/Geom2dGcc_MyC2d3Tan.hxx b/inc/Geom2dGcc_MyC2d3Tan.hxx
index ebb3f08..7d5aa49 100644
--- a/inc/Geom2dGcc_MyC2d3Tan.hxx
+++ b/inc/Geom2dGcc_MyC2d3Tan.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Circ2d;
 class Geom2dGcc_MyC2d3Tan  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_MyC2d3Tan(const GccEnt_QualifiedCirc& Qualified1,const GccEnt_QualifiedCirc& Qualified2,const Geom2dGcc_MyQCurve& Qualified3,const Standard_Real Param1,const Standard_Real Param2,const Standard_Real Param3,const Standard_Real Tolerance);
diff --git a/inc/Geom2dGcc_MyCirc2d2TanOn.hxx b/inc/Geom2dGcc_MyCirc2d2TanOn.hxx
index 53050ae..39a6190 100644
--- a/inc/Geom2dGcc_MyCirc2d2TanOn.hxx
+++ b/inc/Geom2dGcc_MyCirc2d2TanOn.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class gp_Circ2d;
 class Geom2dGcc_MyCirc2d2TanOn  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_MyCirc2d2TanOn(const GccEnt_QualifiedCirc& Qualified1,const GccEnt_QualifiedCirc& Qualified2,const Geom2dAdaptor_Curve& OnCurv,const Standard_Real Tolerance);
diff --git a/inc/Geom2dGcc_MyCirc2d2TanRad.hxx b/inc/Geom2dGcc_MyCirc2d2TanRad.hxx
index 5ab9521..802d001 100644
--- a/inc/Geom2dGcc_MyCirc2d2TanRad.hxx
+++ b/inc/Geom2dGcc_MyCirc2d2TanRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class gp_Circ2d;
 class Geom2dGcc_MyCirc2d2TanRad  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_MyCirc2d2TanRad(const GccEnt_QualifiedCirc& Qualified1,const Geom2dGcc_MyQCurve& Qualified2,const Standard_Real Radius,const Standard_Real Tolerance);
diff --git a/inc/Geom2dGcc_MyCirc2dTanCen.hxx b/inc/Geom2dGcc_MyCirc2dTanCen.hxx
index 302745e..c2a04c7 100644
--- a/inc/Geom2dGcc_MyCirc2dTanCen.hxx
+++ b/inc/Geom2dGcc_MyCirc2dTanCen.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class gp_Circ2d;
 class Geom2dGcc_MyCirc2dTanCen  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_MyCirc2dTanCen(const Geom2dGcc_MyQCurve& Qualified1,const gp_Pnt2d& Pcenter,const Standard_Real Tolerance);
diff --git a/inc/Geom2dGcc_MyCirc2dTanOnRad.hxx b/inc/Geom2dGcc_MyCirc2dTanOnRad.hxx
index 3b10fec..b767a86 100644
--- a/inc/Geom2dGcc_MyCirc2dTanOnRad.hxx
+++ b/inc/Geom2dGcc_MyCirc2dTanOnRad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class gp_Pnt2d;
 class Geom2dGcc_MyCirc2dTanOnRad  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_MyCirc2dTanOnRad(const Geom2dGcc_MyQCurve& Qualified1,const gp_Lin2d& OnLine,const Standard_Real Radius,const Standard_Real Tolerance);
diff --git a/inc/Geom2dGcc_MyCurveTool.hxx b/inc/Geom2dGcc_MyCurveTool.hxx
index be145f0..5d48398 100644
--- a/inc/Geom2dGcc_MyCurveTool.hxx
+++ b/inc/Geom2dGcc_MyCurveTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Vec2d;
 class Geom2dGcc_MyCurveTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  GeomAbs_CurveType TheType(const Adaptor3d_OffsetCurve& C) ;
diff --git a/inc/Geom2dGcc_MyL2d2Tan.hxx b/inc/Geom2dGcc_MyL2d2Tan.hxx
index 2b92dda..98624ec 100644
--- a/inc/Geom2dGcc_MyL2d2Tan.hxx
+++ b/inc/Geom2dGcc_MyL2d2Tan.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class gp_Lin2d;
 class Geom2dGcc_MyL2d2Tan  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_MyL2d2Tan(const Geom2dGcc_MyQCurve& Qualified1,const gp_Pnt2d& ThePoint,const Standard_Real Param1,const Standard_Real Tolang);
diff --git a/inc/Geom2dGcc_MyL2dTanObl.hxx b/inc/Geom2dGcc_MyL2dTanObl.hxx
index 105ae72..0feb75a 100644
--- a/inc/Geom2dGcc_MyL2dTanObl.hxx
+++ b/inc/Geom2dGcc_MyL2dTanObl.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Pnt2d;
 class Geom2dGcc_MyL2dTanObl  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_MyL2dTanObl(const Geom2dGcc_MyQCurve& Qualified1,const gp_Lin2d& TheLin,const Standard_Real Param1,const Standard_Real TolAng,const Standard_Real Angle = 0);
diff --git a/inc/Geom2dGcc_MyQCurve.hxx b/inc/Geom2dGcc_MyQCurve.hxx
index acd6114..0b7e733 100644
--- a/inc/Geom2dGcc_MyQCurve.hxx
+++ b/inc/Geom2dGcc_MyQCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Geom2dAdaptor_Curve;
 class Geom2dGcc_MyQCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dGcc_MyQCurve(const Geom2dAdaptor_Curve& Curve,const GccEnt_Position Qualifier);
diff --git a/inc/Geom2dGcc_QualifiedCurve.hxx b/inc/Geom2dGcc_QualifiedCurve.hxx
index 304ac05..d0d16c9 100644
--- a/inc/Geom2dGcc_QualifiedCurve.hxx
+++ b/inc/Geom2dGcc_QualifiedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom2dAdaptor_Curve;
 class Geom2dGcc_QualifiedCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a qualified curve by assigning the qualifier <br>
 //! Qualifier to the curve Curve. Qualifier may be: <br>
diff --git a/inc/Geom2dHatch_ClassifierOfHatcher.hxx b/inc/Geom2dHatch_ClassifierOfHatcher.hxx
index 3ff9e7e..60dfe3b 100644
--- a/inc/Geom2dHatch_ClassifierOfHatcher.hxx
+++ b/inc/Geom2dHatch_ClassifierOfHatcher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Pnt2d;
 class Geom2dHatch_ClassifierOfHatcher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dHatch_ClassifierOfHatcher();
diff --git a/inc/Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher.hxx b/inc/Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher.hxx
index cfa97b5..2bd3134 100644
--- a/inc/Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher.hxx
+++ b/inc/Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Geom2dHatch_DataMapNodeOfHatchingsOfHatcher;
 class Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher();
diff --git a/inc/Geom2dHatch_DataMapIteratorOfMapOfElementsOfElementsOfHatcher.hxx b/inc/Geom2dHatch_DataMapIteratorOfMapOfElementsOfElementsOfHatcher.hxx
index 1c57483..d202084 100644
--- a/inc/Geom2dHatch_DataMapIteratorOfMapOfElementsOfElementsOfHatcher.hxx
+++ b/inc/Geom2dHatch_DataMapIteratorOfMapOfElementsOfElementsOfHatcher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Geom2dHatch_DataMapNodeOfMapOfElementsOfElementsOfHatcher;
 class Geom2dHatch_DataMapIteratorOfMapOfElementsOfElementsOfHatcher  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dHatch_DataMapIteratorOfMapOfElementsOfElementsOfHatcher();
diff --git a/inc/Geom2dHatch_ElementOfHatcher.hxx b/inc/Geom2dHatch_ElementOfHatcher.hxx
index b297991..169fc3a 100644
--- a/inc/Geom2dHatch_ElementOfHatcher.hxx
+++ b/inc/Geom2dHatch_ElementOfHatcher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Geom2dAdaptor_Curve;
 class Geom2dHatch_ElementOfHatcher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dHatch_ElementOfHatcher();
diff --git a/inc/Geom2dHatch_ElementsOfHatcher.hxx b/inc/Geom2dHatch_ElementsOfHatcher.hxx
index f5f0953..0ad1089 100644
--- a/inc/Geom2dHatch_ElementsOfHatcher.hxx
+++ b/inc/Geom2dHatch_ElementsOfHatcher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class gp_Lin2d;
 class Geom2dHatch_ElementsOfHatcher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dHatch_ElementsOfHatcher();
diff --git a/inc/Geom2dHatch_FClass2dOfClassifierOfHatcher.hxx b/inc/Geom2dHatch_FClass2dOfClassifierOfHatcher.hxx
index 847eff1..2dce3c3 100644
--- a/inc/Geom2dHatch_FClass2dOfClassifierOfHatcher.hxx
+++ b/inc/Geom2dHatch_FClass2dOfClassifierOfHatcher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Lin2d;
 class Geom2dHatch_FClass2dOfClassifierOfHatcher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dHatch_FClass2dOfClassifierOfHatcher();
diff --git a/inc/Geom2dHatch_Hatcher.hxx b/inc/Geom2dHatch_Hatcher.hxx
index 54f0f1d..aa22083 100644
--- a/inc/Geom2dHatch_Hatcher.hxx
+++ b/inc/Geom2dHatch_Hatcher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,13 +48,13 @@ class Standard_OutOfRange;
 class StdFail_NotDone;
 class Geom2dAdaptor_Curve;
 class Geom2dHatch_Intersector;
-class Geom2dHatch_ElementOfHatcher;
-class Geom2dHatch_ElementsOfHatcher;
-class Geom2dHatch_MapOfElementsOfElementsOfHatcher;
 class Geom2dHatch_HatchingOfHatcher;
 class Geom2dHatch_HatchingsOfHatcher;
 class Geom2dHatch_DataMapNodeOfHatchingsOfHatcher;
 class Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher;
+class Geom2dHatch_ElementOfHatcher;
+class Geom2dHatch_ElementsOfHatcher;
+class Geom2dHatch_MapOfElementsOfElementsOfHatcher;
 class Geom2dHatch_ClassifierOfHatcher;
 class Geom2dHatch_FClass2dOfClassifierOfHatcher;
 class HatchGen_PointOnHatching;
@@ -62,18 +65,7 @@ class HatchGen_Domain;
 class Geom2dHatch_Hatcher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dHatch_Hatcher(const Geom2dHatch_Intersector& Intersector,const Standard_Real Confusion2d,const Standard_Real Confusion3d,const Standard_Boolean KeepPnt = Standard_False,const Standard_Boolean KeepSeg = Standard_False);
@@ -189,14 +181,6 @@ Geom2dHatch_HatchingsOfHatcher myHatchings;
 #define TheCurveH_hxx <Geom2dAdaptor_Curve.hxx>
 #define TheIntersector Geom2dHatch_Intersector
 #define TheIntersector_hxx <Geom2dHatch_Intersector.hxx>
-#define HatchGen_Element Geom2dHatch_ElementOfHatcher
-#define HatchGen_Element_hxx <Geom2dHatch_ElementOfHatcher.hxx>
-#define HatchGen_Elements Geom2dHatch_ElementsOfHatcher
-#define HatchGen_Elements_hxx <Geom2dHatch_ElementsOfHatcher.hxx>
-#define HatchGen_MapOfElementsOfElements Geom2dHatch_MapOfElementsOfElementsOfHatcher
-#define HatchGen_MapOfElementsOfElements_hxx <Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx>
-#define HatchGen_MapOfElementsOfElements Geom2dHatch_MapOfElementsOfElementsOfHatcher
-#define HatchGen_MapOfElementsOfElements_hxx <Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx>
 #define HatchGen_Hatching Geom2dHatch_HatchingOfHatcher
 #define HatchGen_Hatching_hxx <Geom2dHatch_HatchingOfHatcher.hxx>
 #define HatchGen_Hatchings Geom2dHatch_HatchingsOfHatcher
@@ -209,6 +193,14 @@ Geom2dHatch_HatchingsOfHatcher myHatchings;
 #define HatchGen_DataMapNodeOfHatchings_hxx <Geom2dHatch_DataMapNodeOfHatchingsOfHatcher.hxx>
 #define HatchGen_DataMapIteratorOfHatchings Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher
 #define HatchGen_DataMapIteratorOfHatchings_hxx <Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher.hxx>
+#define HatchGen_Element Geom2dHatch_ElementOfHatcher
+#define HatchGen_Element_hxx <Geom2dHatch_ElementOfHatcher.hxx>
+#define HatchGen_Elements Geom2dHatch_ElementsOfHatcher
+#define HatchGen_Elements_hxx <Geom2dHatch_ElementsOfHatcher.hxx>
+#define HatchGen_MapOfElementsOfElements Geom2dHatch_MapOfElementsOfElementsOfHatcher
+#define HatchGen_MapOfElementsOfElements_hxx <Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx>
+#define HatchGen_MapOfElementsOfElements Geom2dHatch_MapOfElementsOfElementsOfHatcher
+#define HatchGen_MapOfElementsOfElements_hxx <Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx>
 #define HatchGen_Classifier Geom2dHatch_ClassifierOfHatcher
 #define HatchGen_Classifier_hxx <Geom2dHatch_ClassifierOfHatcher.hxx>
 #define HatchGen_FClass2dOfClassifier Geom2dHatch_FClass2dOfClassifierOfHatcher
@@ -230,14 +222,6 @@ Geom2dHatch_HatchingsOfHatcher myHatchings;
 #undef TheCurveH_hxx
 #undef TheIntersector
 #undef TheIntersector_hxx
-#undef HatchGen_Element
-#undef HatchGen_Element_hxx
-#undef HatchGen_Elements
-#undef HatchGen_Elements_hxx
-#undef HatchGen_MapOfElementsOfElements
-#undef HatchGen_MapOfElementsOfElements_hxx
-#undef HatchGen_MapOfElementsOfElements
-#undef HatchGen_MapOfElementsOfElements_hxx
 #undef HatchGen_Hatching
 #undef HatchGen_Hatching_hxx
 #undef HatchGen_Hatchings
@@ -250,6 +234,14 @@ Geom2dHatch_HatchingsOfHatcher myHatchings;
 #undef HatchGen_DataMapNodeOfHatchings_hxx
 #undef HatchGen_DataMapIteratorOfHatchings
 #undef HatchGen_DataMapIteratorOfHatchings_hxx
+#undef HatchGen_Element
+#undef HatchGen_Element_hxx
+#undef HatchGen_Elements
+#undef HatchGen_Elements_hxx
+#undef HatchGen_MapOfElementsOfElements
+#undef HatchGen_MapOfElementsOfElements_hxx
+#undef HatchGen_MapOfElementsOfElements
+#undef HatchGen_MapOfElementsOfElements_hxx
 #undef HatchGen_Classifier
 #undef HatchGen_Classifier_hxx
 #undef HatchGen_FClass2dOfClassifier
diff --git a/inc/Geom2dHatch_HatchingOfHatcher.hxx b/inc/Geom2dHatch_HatchingOfHatcher.hxx
index 0b6d246..fbdea15 100644
--- a/inc/Geom2dHatch_HatchingOfHatcher.hxx
+++ b/inc/Geom2dHatch_HatchingOfHatcher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class gp_Pnt2d;
 class Geom2dHatch_HatchingOfHatcher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dHatch_HatchingOfHatcher();
diff --git a/inc/Geom2dHatch_HatchingsOfHatcher.hxx b/inc/Geom2dHatch_HatchingsOfHatcher.hxx
index 2199aab..490db24 100644
--- a/inc/Geom2dHatch_HatchingsOfHatcher.hxx
+++ b/inc/Geom2dHatch_HatchingsOfHatcher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Geom2dHatch_DataMapIteratorOfHatchingsOfHatcher;
 class Geom2dHatch_HatchingsOfHatcher  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dHatch_HatchingsOfHatcher(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Geom2dHatch_Intersector.hxx b/inc/Geom2dHatch_Intersector.hxx
index bb8fd83..fccd78f 100644
--- a/inc/Geom2dHatch_Intersector.hxx
+++ b/inc/Geom2dHatch_Intersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_Dir2d;
 class Geom2dHatch_Intersector  : public Geom2dInt_GInter {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an intersector. <br>
       Geom2dHatch_Intersector(const Standard_Real Confusion,const Standard_Real Tangency);
diff --git a/inc/Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx b/inc/Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx
index 04e6449..4909624 100644
--- a/inc/Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx
+++ b/inc/Geom2dHatch_MapOfElementsOfElementsOfHatcher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Geom2dHatch_DataMapIteratorOfMapOfElementsOfElementsOfHatcher;
 class Geom2dHatch_MapOfElementsOfElementsOfHatcher  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dHatch_MapOfElementsOfElementsOfHatcher(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter.hxx b/inc/Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter.hxx
index cfc6ff0..c1afd6c 100644
--- a/inc/Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter.hxx
+++ b/inc/Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter;
 class Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter(const Adaptor2d_Curve2d& C1,const Adaptor2d_Curve2d& C2,const Standard_Real Tol);
diff --git a/inc/Geom2dInt_GInter.hxx b/inc/Geom2dInt_GInter.hxx
index d140316..419fcfa 100644
--- a/inc/Geom2dInt_GInter.hxx
+++ b/inc/Geom2dInt_GInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class TColStd_Array1OfReal;
 class Geom2dInt_GInter  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Geom2dInt_GInter();
diff --git a/inc/Geom2dInt_Geom2dCurveTool.hxx b/inc/Geom2dInt_Geom2dCurveTool.hxx
index c36103e..1fcf3d2 100644
--- a/inc/Geom2dInt_Geom2dCurveTool.hxx
+++ b/inc/Geom2dInt_Geom2dCurveTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class TColStd_Array1OfReal;
 class Geom2dInt_Geom2dCurveTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  GeomAbs_CurveType TheType(const Adaptor2d_Curve2d& C) ;
diff --git a/inc/Geom2dInt_IntConicCurveOfGInter.hxx b/inc/Geom2dInt_IntConicCurveOfGInter.hxx
index abb59a8..4c21c3a 100644
--- a/inc/Geom2dInt_IntConicCurveOfGInter.hxx
+++ b/inc/Geom2dInt_IntConicCurveOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class gp_Hypr2d;
 class Geom2dInt_IntConicCurveOfGInter  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dInt_IntConicCurveOfGInter();
diff --git a/inc/Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter.hxx b/inc/Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter.hxx
index 34592b1..f31f14a 100644
--- a/inc/Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter.hxx
+++ b/inc/Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Geom2dInt_Geom2dCurveTool;
 class Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter(const IntCurve_IConicTool& IT,const Adaptor2d_Curve2d& PC);
diff --git a/inc/Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx b/inc/Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx
index 1d4ef4c..b3a4d1b 100644
--- a/inc/Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx
+++ b/inc/Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class Geom2dInt_SequenceNodeOfSeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter
 class Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter();
diff --git a/inc/Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx b/inc/Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx
index 271e003..68469ab 100644
--- a/inc/Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx
+++ b/inc/Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom2dInt_SequenceNodeOfSeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter
 class Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter();
diff --git a/inc/Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx b/inc/Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx
index 403e5bc..a4e4eeb 100644
--- a/inc/Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx
+++ b/inc/Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class gp_Pnt2d;
 class Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Locate(const gp_Pnt2d& P,const Adaptor2d_Curve2d& C,const Standard_Integer NbU,Extrema_POnCurv2d& Papp) ;
diff --git a/inc/Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter.hxx b/inc/Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter.hxx
index 74972d1..df5479b 100644
--- a/inc/Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter.hxx
+++ b/inc/Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class math_Matrix;
 class Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter(const Adaptor2d_Curve2d& curve1,const Adaptor2d_Curve2d& curve2);
diff --git a/inc/Geom2dInt_TheIntConicCurveOfGInter.hxx b/inc/Geom2dInt_TheIntConicCurveOfGInter.hxx
index 8fed042..fb4d8e5 100644
--- a/inc/Geom2dInt_TheIntConicCurveOfGInter.hxx
+++ b/inc/Geom2dInt_TheIntConicCurveOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class gp_Hypr2d;
 class Geom2dInt_TheIntConicCurveOfGInter  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Geom2dInt_TheIntConicCurveOfGInter();
diff --git a/inc/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx b/inc/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx
index 953c635..86b30f8 100644
--- a/inc/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx
+++ b/inc/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class IntRes2d_Domain;
 class Geom2dInt_TheIntPCurvePCurveOfGInter  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dInt_TheIntPCurvePCurveOfGInter();
diff --git a/inc/Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter.hxx b/inc/Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter.hxx
index f0490be..a6f2b56 100644
--- a/inc/Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter.hxx
+++ b/inc/Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TColStd_Array1OfReal;
 class Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter();
diff --git a/inc/Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx b/inc/Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx
index 899cbc7..92718bf 100644
--- a/inc/Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx
+++ b/inc/Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter;
 class Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter();
diff --git a/inc/Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx b/inc/Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx
index eaf59c9..3d02f83 100644
--- a/inc/Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx
+++ b/inc/Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class gp_Pnt2d;
 class Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter  : public Intf_Polygon2d {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter(const Adaptor2d_Curve2d& Curve,const Standard_Integer NbPnt,const IntRes2d_Domain& Domain,const Standard_Real Tol);
diff --git a/inc/Geom2dInt_TheProjPCurOfGInter.hxx b/inc/Geom2dInt_TheProjPCurOfGInter.hxx
index ba3d637..2b813d3 100644
--- a/inc/Geom2dInt_TheProjPCurOfGInter.hxx
+++ b/inc/Geom2dInt_TheProjPCurOfGInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_Pnt2d;
 class Geom2dInt_TheProjPCurOfGInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Real FindParameter(const Adaptor2d_Curve2d& C,const gp_Pnt2d& Pnt,const Standard_Real Tol) ;
diff --git a/inc/Geom2dLProp_CLProps2d.hxx b/inc/Geom2dLProp_CLProps2d.hxx
index eb62368..79f81d2 100644
--- a/inc/Geom2dLProp_CLProps2d.hxx
+++ b/inc/Geom2dLProp_CLProps2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class Geom2dLProp_Curve2dTool;
 class Geom2dLProp_CLProps2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dLProp_CLProps2d(const Handle(Geom2d_Curve)& C,const Standard_Integer N,const Standard_Real Resolution);
diff --git a/inc/Geom2dLProp_CurAndInf2d.hxx b/inc/Geom2dLProp_CurAndInf2d.hxx
index a06d996..b097955 100644
--- a/inc/Geom2dLProp_CurAndInf2d.hxx
+++ b/inc/Geom2dLProp_CurAndInf2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom2d_Curve;
 class Geom2dLProp_CurAndInf2d  : public LProp_CurAndInf {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes the framework. <br>
 //! Note: The curve on which the local properties are <br>
diff --git a/inc/Geom2dLProp_Curve2dTool.hxx b/inc/Geom2dLProp_Curve2dTool.hxx
index 5471f13..f5625a7 100644
--- a/inc/Geom2dLProp_Curve2dTool.hxx
+++ b/inc/Geom2dLProp_Curve2dTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_Vec2d;
 class Geom2dLProp_Curve2dTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the point <P> of parameter <U> on the curve <C>. <br>
   Standard_EXPORT   static  void Value(const Handle(Geom2d_Curve)& C,const Standard_Real U,gp_Pnt2d& P) ;
diff --git a/inc/Geom2dLProp_FCurExtOfNumericCurInf2d.hxx b/inc/Geom2dLProp_FCurExtOfNumericCurInf2d.hxx
index 86f4822..c4ea8f9 100644
--- a/inc/Geom2dLProp_FCurExtOfNumericCurInf2d.hxx
+++ b/inc/Geom2dLProp_FCurExtOfNumericCurInf2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom2dLProp_Curve2dTool;
 class Geom2dLProp_FCurExtOfNumericCurInf2d  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dLProp_FCurExtOfNumericCurInf2d(const Handle(Geom2d_Curve)& C,const Standard_Real Tol);
diff --git a/inc/Geom2dLProp_FCurNulOfNumericCurInf2d.hxx b/inc/Geom2dLProp_FCurNulOfNumericCurInf2d.hxx
index f7c9d8a..6cdfd2a 100644
--- a/inc/Geom2dLProp_FCurNulOfNumericCurInf2d.hxx
+++ b/inc/Geom2dLProp_FCurNulOfNumericCurInf2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom2dLProp_Curve2dTool;
 class Geom2dLProp_FCurNulOfNumericCurInf2d  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dLProp_FCurNulOfNumericCurInf2d(const Handle(Geom2d_Curve)& C);
diff --git a/inc/Geom2dLProp_NumericCurInf2d.hxx b/inc/Geom2dLProp_NumericCurInf2d.hxx
index 7d5d5ba..fe407c8 100644
--- a/inc/Geom2dLProp_NumericCurInf2d.hxx
+++ b/inc/Geom2dLProp_NumericCurInf2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class LProp_CurAndInf;
 class Geom2dLProp_NumericCurInf2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dLProp_NumericCurInf2d();
diff --git a/inc/Geom2dToIGES_Geom2dCurve.hxx b/inc/Geom2dToIGES_Geom2dCurve.hxx
index 42b39ec..baa9c20 100644
--- a/inc/Geom2dToIGES_Geom2dCurve.hxx
+++ b/inc/Geom2dToIGES_Geom2dCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Geom2d_Curve;
 class Geom2dToIGES_Geom2dCurve  : public Geom2dToIGES_Geom2dEntity {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dToIGES_Geom2dCurve();
diff --git a/inc/Geom2dToIGES_Geom2dEntity.hxx b/inc/Geom2dToIGES_Geom2dEntity.hxx
index 6da3861..ecf24fc 100644
--- a/inc/Geom2dToIGES_Geom2dEntity.hxx
+++ b/inc/Geom2dToIGES_Geom2dEntity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IGESData_IGESModel;
 class Geom2dToIGES_Geom2dEntity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a tool Geom2dEntity <br>
   Standard_EXPORT   Geom2dToIGES_Geom2dEntity();
diff --git a/inc/Geom2dToIGES_Geom2dPoint.hxx b/inc/Geom2dToIGES_Geom2dPoint.hxx
index f2a083d..8c549c7 100644
--- a/inc/Geom2dToIGES_Geom2dPoint.hxx
+++ b/inc/Geom2dToIGES_Geom2dPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Geom2d_CartesianPoint;
 class Geom2dToIGES_Geom2dPoint  : public Geom2dToIGES_Geom2dEntity {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dToIGES_Geom2dPoint();
diff --git a/inc/Geom2dToIGES_Geom2dVector.hxx b/inc/Geom2dToIGES_Geom2dVector.hxx
index aec684d..a4cdfea 100644
--- a/inc/Geom2dToIGES_Geom2dVector.hxx
+++ b/inc/Geom2dToIGES_Geom2dVector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Geom2d_Direction;
 class Geom2dToIGES_Geom2dVector  : public Geom2dToIGES_Geom2dEntity {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom2dToIGES_Geom2dVector();
diff --git a/inc/Geom2d_BSplineCurve.hxx b/inc/Geom2d_BSplineCurve.hxx
index 1a5ad2f..004b8ed 100644
--- a/inc/Geom2d_BSplineCurve.hxx
+++ b/inc/Geom2d_BSplineCurve.hxx
@@ -40,6 +40,9 @@
 #ifndef _Standard_Real_HeaderFile
 #include <Standard_Real.hxx>
 #endif
+#ifndef _Standard_Mutex_HeaderFile
+#include <Standard_Mutex.hxx>
+#endif
 #ifndef _Geom2d_BoundedCurve_HeaderFile
 #include <Geom2d_BoundedCurve.hxx>
 #endif
@@ -759,6 +762,7 @@ Standard_Real spanlenghtcache;
 Standard_Integer spanindexcache;
 Standard_Real maxderivinv;
 Standard_Boolean maxderivinvok;
+Standard_Mutex myMutex;
 
 
 };
diff --git a/inc/GeomAPI.hxx b/inc/GeomAPI.hxx
index 6fcc858..81d06b5 100644
--- a/inc/GeomAPI.hxx
+++ b/inc/GeomAPI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class GeomAPI_IntCS;
 class GeomAPI  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! This function builds (in the <br>
 //! parametric space of the plane P) a 2D curve equivalent to the 3D curve <br>
diff --git a/inc/GeomAPI_ExtremaCurveCurve.hxx b/inc/GeomAPI_ExtremaCurveCurve.hxx
index 75d474b..c9e1c9b 100644
--- a/inc/GeomAPI_ExtremaCurveCurve.hxx
+++ b/inc/GeomAPI_ExtremaCurveCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -72,18 +75,7 @@ class Extrema_ExtCC;
 class GeomAPI_ExtremaCurveCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty algorithm for computing <br>
 //! extrema between two curves. Use an Init function <br>
diff --git a/inc/GeomAPI_ExtremaCurveSurface.hxx b/inc/GeomAPI_ExtremaCurveSurface.hxx
index 0c6d4f8..e1ecd90 100644
--- a/inc/GeomAPI_ExtremaCurveSurface.hxx
+++ b/inc/GeomAPI_ExtremaCurveSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class Extrema_ExtCS;
 class GeomAPI_ExtremaCurveSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty algorithm for computing <br>
 //! extrema between a curve and a surface. Use an <br>
diff --git a/inc/GeomAPI_ExtremaSurfaceSurface.hxx b/inc/GeomAPI_ExtremaSurfaceSurface.hxx
index cd31651..26d396a 100644
--- a/inc/GeomAPI_ExtremaSurfaceSurface.hxx
+++ b/inc/GeomAPI_ExtremaSurfaceSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class Extrema_ExtSS;
 class GeomAPI_ExtremaSurfaceSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty algorithm for computing <br>
 //! extrema between two surfaces. Use an Init function <br>
diff --git a/inc/GeomAPI_IntCS.hxx b/inc/GeomAPI_IntCS.hxx
index 2649323..2a4211d 100644
--- a/inc/GeomAPI_IntCS.hxx
+++ b/inc/GeomAPI_IntCS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Pnt;
 class GeomAPI_IntCS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty object. Use the <br>
 //! function Perform for further initialization of the algorithm by <br>
diff --git a/inc/GeomAPI_IntSS.hxx b/inc/GeomAPI_IntSS.hxx
index 3acfe0a..9c0ae75 100644
--- a/inc/GeomAPI_IntSS.hxx
+++ b/inc/GeomAPI_IntSS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class Geom_Curve;
 class GeomAPI_IntSS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty object. Use the <br>
 //! function Perform for further initialization algorithm by two surfaces. <br>
diff --git a/inc/GeomAPI_Interpolate.hxx b/inc/GeomAPI_Interpolate.hxx
index 649801c..492920e 100644
--- a/inc/GeomAPI_Interpolate.hxx
+++ b/inc/GeomAPI_Interpolate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class TColgp_Array1OfVec;
 class GeomAPI_Interpolate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes an algorithm for constructing a <br>
 //! constrained BSpline curve passing through the points of the table   Points. <br>
diff --git a/inc/GeomAPI_PointsToBSpline.hxx b/inc/GeomAPI_PointsToBSpline.hxx
index dc76977..09f8a87 100644
--- a/inc/GeomAPI_PointsToBSpline.hxx
+++ b/inc/GeomAPI_PointsToBSpline.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class TColStd_Array1OfReal;
 class GeomAPI_PointsToBSpline  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty approximation algorithm. <br>
 //! Use an Init function to define and build the BSpline curve. <br>
diff --git a/inc/GeomAPI_PointsToBSplineSurface.hxx b/inc/GeomAPI_PointsToBSplineSurface.hxx
index 758f3ca..10bcab8 100644
--- a/inc/GeomAPI_PointsToBSplineSurface.hxx
+++ b/inc/GeomAPI_PointsToBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TColStd_Array2OfReal;
 class GeomAPI_PointsToBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty algorithm for <br>
 //! approximation or interpolation of a surface. <br>
diff --git a/inc/GeomAPI_ProjectPointOnCurve.hxx b/inc/GeomAPI_ProjectPointOnCurve.hxx
index 70a42bd..ae42037 100644
--- a/inc/GeomAPI_ProjectPointOnCurve.hxx
+++ b/inc/GeomAPI_ProjectPointOnCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Extrema_ExtPC;
 class GeomAPI_ProjectPointOnCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty object. Use an <br>
 //! Init function for further initialization. <br>
diff --git a/inc/GeomAPI_ProjectPointOnSurf.hxx b/inc/GeomAPI_ProjectPointOnSurf.hxx
index b7a9bc0..0886658 100644
--- a/inc/GeomAPI_ProjectPointOnSurf.hxx
+++ b/inc/GeomAPI_ProjectPointOnSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,6 +31,9 @@
 #ifndef _Handle_Geom_Surface_HeaderFile
 #include <Handle_Geom_Surface.hxx>
 #endif
+#ifndef _Extrema_ExtAlgo_HeaderFile
+#include <Extrema_ExtAlgo.hxx>
+#endif
 #ifndef _Standard_Real_HeaderFile
 #include <Standard_Real.hxx>
 #endif
@@ -50,51 +56,40 @@ class Extrema_ExtPS;
 class GeomAPI_ProjectPointOnSurf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty object. Use the <br>
 //! Init function for further initialization. <br>
   Standard_EXPORT   GeomAPI_ProjectPointOnSurf();
   //! Create the projection  of a point <P> on a surface <br>
 //!          <Surface> <br>
-  Standard_EXPORT   GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,const Handle(Geom_Surface)& Surface);
+  Standard_EXPORT   GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Extrema_ExtAlgo Algo = Extrema_ExtAlgo_Grad);
   //! Create the projection  of a point <P> on a surface <br>
 //!          <Surface> <br>//! Create the projection of a point <P>  on a surface <br>
 //!          <Surface>. The solution are computed in the domain <br>
 //!          [Umin,Usup] [Vmin,Vsup] of the surface. <br>
-  Standard_EXPORT   GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Standard_Real Tolerance);
+  Standard_EXPORT   GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Standard_Real Tolerance,const Extrema_ExtAlgo Algo = Extrema_ExtAlgo_Grad);
   
-  Standard_EXPORT   GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup,const Standard_Real Tolerance);
+  Standard_EXPORT   GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup,const Standard_Real Tolerance,const Extrema_ExtAlgo Algo = Extrema_ExtAlgo_Grad);
   //! Init the projection  of a point <P> on a surface <br>
 //!          <Surface> <br>
-  Standard_EXPORT   GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup);
+  Standard_EXPORT   GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup,const Extrema_ExtAlgo Algo = Extrema_ExtAlgo_Grad);
   
-  Standard_EXPORT     void Init(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Standard_Real Tolerance) ;
+  Standard_EXPORT     void Init(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Standard_Real Tolerance,const Extrema_ExtAlgo Algo = Extrema_ExtAlgo_Grad) ;
   //! Init the projection of a point <P>  on a surface <br>
 //!          <Surface>. The solution are computed in the domain <br>
 //!          [Umin,Usup] [Vmin,Vsup] of the surface. <br>
-  Standard_EXPORT     void Init(const gp_Pnt& P,const Handle(Geom_Surface)& Surface) ;
+  Standard_EXPORT     void Init(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Extrema_ExtAlgo Algo = Extrema_ExtAlgo_Grad) ;
   
-  Standard_EXPORT     void Init(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup,const Standard_Real Tolerance) ;
+  Standard_EXPORT     void Init(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup,const Standard_Real Tolerance,const Extrema_ExtAlgo Algo = Extrema_ExtAlgo_Grad) ;
   //! Init the projection for many points on a surface <br>
 //!          <Surface>. The solutions will be computed in the domain <br>
 //!          [Umin,Usup] [Vmin,Vsup] of the surface. <br>
-  Standard_EXPORT     void Init(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup) ;
+  Standard_EXPORT     void Init(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup,const Extrema_ExtAlgo Algo = Extrema_ExtAlgo_Grad) ;
   
-  Standard_EXPORT     void Init(const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup,const Standard_Real Tolerance) ;
+  Standard_EXPORT     void Init(const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup,const Standard_Real Tolerance,const Extrema_ExtAlgo Algo = Extrema_ExtAlgo_Grad) ;
   
-  Standard_EXPORT     void Init(const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup) ;
+  Standard_EXPORT     void Init(const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup,const Extrema_ExtAlgo Algo = Extrema_ExtAlgo_Grad) ;
   //! Performs the projection of a point on the current surface. <br>
   Standard_EXPORT     void Perform(const gp_Pnt& P) ;
   
diff --git a/inc/GeomAdaptor.hxx b/inc/GeomAdaptor.hxx
index 6830728..585e4dd 100644
--- a/inc/GeomAdaptor.hxx
+++ b/inc/GeomAdaptor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class GeomAdaptor_HCurve;
 class GeomAdaptor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Geom_Curve MakeCurve(const Adaptor3d_Curve& C) ;
diff --git a/inc/GeomAdaptor_Curve.hxx b/inc/GeomAdaptor_Curve.hxx
index 7d6d212..b3f907e 100644
--- a/inc/GeomAdaptor_Curve.hxx
+++ b/inc/GeomAdaptor_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class Geom_BSplineCurve;
 class GeomAdaptor_Curve  : public Adaptor3d_Curve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       GeomAdaptor_Curve();
diff --git a/inc/GeomAdaptor_Surface.hxx b/inc/GeomAdaptor_Surface.hxx
index 9510be0..465307d 100644
--- a/inc/GeomAdaptor_Surface.hxx
+++ b/inc/GeomAdaptor_Surface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class Adaptor3d_HCurve;
 class GeomAdaptor_Surface  : public Adaptor3d_Surface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       GeomAdaptor_Surface();
diff --git a/inc/GeomConvert.hxx b/inc/GeomConvert.hxx
index 6c8959d..95ba9cb 100644
--- a/inc/GeomConvert.hxx
+++ b/inc/GeomConvert.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -89,18 +92,7 @@ class GeomConvert_ApproxCurve;
 class GeomConvert  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Raised if FromK1 = ToK2 <br>
 //!             Raised if FromK1 or ToK2 are out of the bounds <br>
diff --git a/inc/GeomConvert_ApproxCurve.hxx b/inc/GeomConvert_ApproxCurve.hxx
index 3ee576b..f2225f4 100644
--- a/inc/GeomConvert_ApproxCurve.hxx
+++ b/inc/GeomConvert_ApproxCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class Standard_ConstructionError;
 class GeomConvert_ApproxCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a curve approximation framework defined by - <br>
 //!   -      the conic Curve, <br>
diff --git a/inc/GeomConvert_ApproxSurface.hxx b/inc/GeomConvert_ApproxSurface.hxx
index 9045e51..b442b3c 100644
--- a/inc/GeomConvert_ApproxSurface.hxx
+++ b/inc/GeomConvert_ApproxSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class Standard_OutOfRange;
 class GeomConvert_ApproxSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a surface approximation framework defined by <br>
 //! -   the conic Surf <br>
diff --git a/inc/GeomConvert_BSplineCurveKnotSplitting.hxx b/inc/GeomConvert_BSplineCurveKnotSplitting.hxx
index f0c8f4b..6f810d5 100644
--- a/inc/GeomConvert_BSplineCurveKnotSplitting.hxx
+++ b/inc/GeomConvert_BSplineCurveKnotSplitting.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class TColStd_Array1OfInteger;
 class GeomConvert_BSplineCurveKnotSplitting  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Determines points at which the BSpline curve <br>
 //! BasisCurve should be split in order to obtain arcs <br>
diff --git a/inc/GeomConvert_BSplineCurveToBezierCurve.hxx b/inc/GeomConvert_BSplineCurveToBezierCurve.hxx
index f4b81fd..b95c7b0 100644
--- a/inc/GeomConvert_BSplineCurveToBezierCurve.hxx
+++ b/inc/GeomConvert_BSplineCurveToBezierCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TColStd_Array1OfReal;
 class GeomConvert_BSplineCurveToBezierCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes all the data needed to convert the <br>
 //! BSpline curve BasisCurve into a series of adjacent Bezier arcs. <br>
diff --git a/inc/GeomConvert_BSplineSurfaceKnotSplitting.hxx b/inc/GeomConvert_BSplineSurfaceKnotSplitting.hxx
index 2a22251..98fde18 100644
--- a/inc/GeomConvert_BSplineSurfaceKnotSplitting.hxx
+++ b/inc/GeomConvert_BSplineSurfaceKnotSplitting.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class TColStd_Array1OfInteger;
 class GeomConvert_BSplineSurfaceKnotSplitting  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Determines the u- and v-isoparametric curves <br>
 //!  along which the BSpline surface BasisSurface <br>
diff --git a/inc/GeomConvert_BSplineSurfaceToBezierSurface.hxx b/inc/GeomConvert_BSplineSurfaceToBezierSurface.hxx
index 87b3148..6ccb844 100644
--- a/inc/GeomConvert_BSplineSurfaceToBezierSurface.hxx
+++ b/inc/GeomConvert_BSplineSurfaceToBezierSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class TColStd_Array1OfReal;
 class GeomConvert_BSplineSurfaceToBezierSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes all the data needed to convert <br>
 //! -   the BSpline surface BasisSurface into a series of adjacent Bezier surfaces. <br>
diff --git a/inc/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx b/inc/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx
index 89c4c3e..d018cc3 100644
--- a/inc/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx
+++ b/inc/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class TColStd_Array1OfReal;
 class GeomConvert_CompBezierSurfacesToBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Computes all the data needed to build a "C0" <br>
 //! continuous BSpline surface equivalent to the grid of <br>
diff --git a/inc/GeomConvert_CompCurveToBSplineCurve.hxx b/inc/GeomConvert_CompCurveToBSplineCurve.hxx
index e7f3054..310bd75 100644
--- a/inc/GeomConvert_CompCurveToBSplineCurve.hxx
+++ b/inc/GeomConvert_CompCurveToBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Geom_BoundedCurve;
 class GeomConvert_CompCurveToBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initialize the algorithme with one curve <br>
 //!        - Parameterisation is used to convert <br>
diff --git a/inc/GeomFill.hxx b/inc/GeomFill.hxx
index 1694272..dcc53c6 100644
--- a/inc/GeomFill.hxx
+++ b/inc/GeomFill.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -104,18 +107,7 @@ class GeomFill_SequenceNodeOfSequenceOfTrsf;
 class GeomFill  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Builds a ruled surface between the two curves, Curve1 and Curve2. <br>
diff --git a/inc/GeomFill_AppSurf.hxx b/inc/GeomFill_AppSurf.hxx
index fb7aa7c..a86057e 100644
--- a/inc/GeomFill_AppSurf.hxx
+++ b/inc/GeomFill_AppSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class TColgp_Array1OfPnt2d;
 class GeomFill_AppSurf  : public AppBlend_Approx {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_AppSurf();
diff --git a/inc/GeomFill_AppSweep.hxx b/inc/GeomFill_AppSweep.hxx
index 290638b..a04f972 100644
--- a/inc/GeomFill_AppSweep.hxx
+++ b/inc/GeomFill_AppSweep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class TColgp_Array1OfPnt2d;
 class GeomFill_AppSweep  : public AppBlend_Approx {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_AppSweep();
diff --git a/inc/GeomFill_Array1OfLocationLaw.hxx b/inc/GeomFill_Array1OfLocationLaw.hxx
index b7e36dd..5ef2c64 100644
--- a/inc/GeomFill_Array1OfLocationLaw.hxx
+++ b/inc/GeomFill_Array1OfLocationLaw.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class GeomFill_LocationLaw;
 class GeomFill_Array1OfLocationLaw  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_Array1OfLocationLaw(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/GeomFill_Array1OfSectionLaw.hxx b/inc/GeomFill_Array1OfSectionLaw.hxx
index 56931ea..16d9b97 100644
--- a/inc/GeomFill_Array1OfSectionLaw.hxx
+++ b/inc/GeomFill_Array1OfSectionLaw.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class GeomFill_SectionLaw;
 class GeomFill_Array1OfSectionLaw  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_Array1OfSectionLaw(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/GeomFill_BSplineCurves.hxx b/inc/GeomFill_BSplineCurves.hxx
index 3427d76..e39ce08 100644
--- a/inc/GeomFill_BSplineCurves.hxx
+++ b/inc/GeomFill_BSplineCurves.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Geom_BSplineCurve;
 class GeomFill_BSplineCurves  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a default BSpline surface framework. <br>
   Standard_EXPORT   GeomFill_BSplineCurves();
diff --git a/inc/GeomFill_BezierCurves.hxx b/inc/GeomFill_BezierCurves.hxx
index 9f091fa..1183070 100644
--- a/inc/GeomFill_BezierCurves.hxx
+++ b/inc/GeomFill_BezierCurves.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Geom_BezierCurve;
 class GeomFill_BezierCurves  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty framework for building a Bezier <br>
 //! surface from contiguous Bezier curves. <br>
diff --git a/inc/GeomFill_ConstrainedFilling.hxx b/inc/GeomFill_ConstrainedFilling.hxx
index a53fa1a..c290ff1 100644
--- a/inc/GeomFill_ConstrainedFilling.hxx
+++ b/inc/GeomFill_ConstrainedFilling.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -82,18 +85,7 @@ class GeomFill_BoundWithSurf;
 class GeomFill_ConstrainedFilling  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Constructs an empty framework for filling a surface from boundaries. <br>
diff --git a/inc/GeomFill_Coons.hxx b/inc/GeomFill_Coons.hxx
index 36bcc7c..6327e43 100644
--- a/inc/GeomFill_Coons.hxx
+++ b/inc/GeomFill_Coons.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TColStd_Array1OfReal;
 class GeomFill_Coons  : public GeomFill_Filling {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_Coons();
diff --git a/inc/GeomFill_CornerState.hxx b/inc/GeomFill_CornerState.hxx
index d599b47..7e578fb 100644
--- a/inc/GeomFill_CornerState.hxx
+++ b/inc/GeomFill_CornerState.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class GeomFill_CornerState  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_CornerState();
diff --git a/inc/GeomFill_Curved.hxx b/inc/GeomFill_Curved.hxx
index 571c47a..b1dc849 100644
--- a/inc/GeomFill_Curved.hxx
+++ b/inc/GeomFill_Curved.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TColStd_Array1OfReal;
 class GeomFill_Curved  : public GeomFill_Filling {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_Curved();
diff --git a/inc/GeomFill_Filling.hxx b/inc/GeomFill_Filling.hxx
index 09a4933..6571763 100644
--- a/inc/GeomFill_Filling.hxx
+++ b/inc/GeomFill_Filling.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColStd_Array2OfReal;
 class GeomFill_Filling  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_Filling();
diff --git a/inc/GeomFill_FunctionDraft.hxx b/inc/GeomFill_FunctionDraft.hxx
index a5342bc..88dd0c0 100644
--- a/inc/GeomFill_FunctionDraft.hxx
+++ b/inc/GeomFill_FunctionDraft.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class GeomFill_Tensor;
 class GeomFill_FunctionDraft  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_FunctionDraft(const Handle(Adaptor3d_HSurface)& S,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/GeomFill_FunctionGuide.hxx b/inc/GeomFill_FunctionGuide.hxx
index 461e410..48153d6 100644
--- a/inc/GeomFill_FunctionGuide.hxx
+++ b/inc/GeomFill_FunctionGuide.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class gp_Vec;
 class GeomFill_FunctionGuide  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_FunctionGuide(const Handle(GeomFill_SectionLaw)& S,const Handle(Adaptor3d_HCurve)& Guide,const Standard_Real ParamOnLaw = 0.0);
diff --git a/inc/GeomFill_Generator.hxx b/inc/GeomFill_Generator.hxx
index a52c421..35bfa2a 100644
--- a/inc/GeomFill_Generator.hxx
+++ b/inc/GeomFill_Generator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_DomainError;
 class GeomFill_Generator  : public GeomFill_Profiler {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_Generator();
diff --git a/inc/GeomFill_LocFunction.hxx b/inc/GeomFill_LocFunction.hxx
index a795c03..67f56da 100644
--- a/inc/GeomFill_LocFunction.hxx
+++ b/inc/GeomFill_LocFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class GeomFill_LocationLaw;
 class GeomFill_LocFunction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_LocFunction(const Handle(GeomFill_LocationLaw)& Law);
diff --git a/inc/GeomFill_Pipe.hxx b/inc/GeomFill_Pipe.hxx
index 264614e..72b75f4 100644
--- a/inc/GeomFill_Pipe.hxx
+++ b/inc/GeomFill_Pipe.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -114,18 +117,7 @@ class TColGeom_SequenceOfCurve;
 class GeomFill_Pipe  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Constructs an empty algorithm for building pipes. Use <br>
diff --git a/inc/GeomFill_PlanFunc.hxx b/inc/GeomFill_PlanFunc.hxx
index b9f0d8f..0054689 100644
--- a/inc/GeomFill_PlanFunc.hxx
+++ b/inc/GeomFill_PlanFunc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class gp_Vec;
 class GeomFill_PlanFunc  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_PlanFunc(const gp_Pnt& P,const gp_Vec& V,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/GeomFill_PolynomialConvertor.hxx b/inc/GeomFill_PolynomialConvertor.hxx
index 8c5790e..2d1ec11 100644
--- a/inc/GeomFill_PolynomialConvertor.hxx
+++ b/inc/GeomFill_PolynomialConvertor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColgp_Array1OfVec;
 class GeomFill_PolynomialConvertor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_PolynomialConvertor();
diff --git a/inc/GeomFill_Profiler.hxx b/inc/GeomFill_Profiler.hxx
index 314cb08..e6c4486 100644
--- a/inc/GeomFill_Profiler.hxx
+++ b/inc/GeomFill_Profiler.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TColStd_Array1OfInteger;
 class GeomFill_Profiler  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_Profiler();
diff --git a/inc/GeomFill_QuasiAngularConvertor.hxx b/inc/GeomFill_QuasiAngularConvertor.hxx
index ef6d524..b5e16c6 100644
--- a/inc/GeomFill_QuasiAngularConvertor.hxx
+++ b/inc/GeomFill_QuasiAngularConvertor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TColgp_Array1OfVec;
 class GeomFill_QuasiAngularConvertor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_QuasiAngularConvertor();
diff --git a/inc/GeomFill_SectionGenerator.hxx b/inc/GeomFill_SectionGenerator.hxx
index 61189de..fbf1b37 100644
--- a/inc/GeomFill_SectionGenerator.hxx
+++ b/inc/GeomFill_SectionGenerator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TColgp_Array1OfVec2d;
 class GeomFill_SectionGenerator  : public GeomFill_Profiler {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_SectionGenerator();
diff --git a/inc/GeomFill_SectionPlacement.hxx b/inc/GeomFill_SectionPlacement.hxx
index 21a14cd..eddca7c 100644
--- a/inc/GeomFill_SectionPlacement.hxx
+++ b/inc/GeomFill_SectionPlacement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class gp_Vec;
 class GeomFill_SectionPlacement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_SectionPlacement(const Handle(GeomFill_LocationLaw)& L,const Handle(Geom_Geometry)& Section);
diff --git a/inc/GeomFill_SequenceOfTrsf.hxx b/inc/GeomFill_SequenceOfTrsf.hxx
index 5589b34..08f915b 100644
--- a/inc/GeomFill_SequenceOfTrsf.hxx
+++ b/inc/GeomFill_SequenceOfTrsf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class GeomFill_SequenceNodeOfSequenceOfTrsf;
 class GeomFill_SequenceOfTrsf  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       GeomFill_SequenceOfTrsf();
diff --git a/inc/GeomFill_SnglrFunc.hxx b/inc/GeomFill_SnglrFunc.hxx
index 4fc5d67..7c97ac3 100644
--- a/inc/GeomFill_SnglrFunc.hxx
+++ b/inc/GeomFill_SnglrFunc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class gp_Vec;
 class GeomFill_SnglrFunc  : public Adaptor3d_Curve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_SnglrFunc(const Handle(Adaptor3d_HCurve)& HC);
diff --git a/inc/GeomFill_Stretch.hxx b/inc/GeomFill_Stretch.hxx
index b8deb26..497b066 100644
--- a/inc/GeomFill_Stretch.hxx
+++ b/inc/GeomFill_Stretch.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TColStd_Array1OfReal;
 class GeomFill_Stretch  : public GeomFill_Filling {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_Stretch();
diff --git a/inc/GeomFill_Sweep.hxx b/inc/GeomFill_Sweep.hxx
index 81eb766..b259b1c 100644
--- a/inc/GeomFill_Sweep.hxx
+++ b/inc/GeomFill_Sweep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class Geom2d_Curve;
 class GeomFill_Sweep  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location,const Standard_Boolean WithKpart = Standard_True);
diff --git a/inc/GeomFill_SweepSectionGenerator.hxx b/inc/GeomFill_SweepSectionGenerator.hxx
index fbb4449..10a3bd0 100644
--- a/inc/GeomFill_SweepSectionGenerator.hxx
+++ b/inc/GeomFill_SweepSectionGenerator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class gp_Trsf;
 class GeomFill_SweepSectionGenerator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_SweepSectionGenerator();
diff --git a/inc/GeomFill_Tensor.hxx b/inc/GeomFill_Tensor.hxx
index dabb53a..572458d 100644
--- a/inc/GeomFill_Tensor.hxx
+++ b/inc/GeomFill_Tensor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class math_Matrix;
 class GeomFill_Tensor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomFill_Tensor(const Standard_Integer NbRow,const Standard_Integer NbCol,const Standard_Integer NbMat);
diff --git a/inc/GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx b/inc/GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx
index 17b8cc7..4317c08 100644
--- a/inc/GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx
+++ b/inc/GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class math_Vector;
 class GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox  : public math_BFGS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox(math_MultipleVarFunctionWithGradient& F,const math_Vector& StartingPoint,const Standard_Real Tolerance3d,const Standard_Real Tolerance2d,const Standard_Real Eps,const Standard_Integer NbIterations = 200);
diff --git a/inc/GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx b/inc/GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx
index 96f5666..9cfbfa9 100644
--- a/inc/GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx
+++ b/inc/GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class math_IntegerVector;
 class GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox  : public math_MultipleVarFunctionWithGradient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,const math_Vector& Parameters,const TColStd_Array1OfReal& Knots,const TColStd_Array1OfInteger& Mults,const Standard_Integer NbPol);
diff --git a/inc/GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx b/inc/GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx
index e1ed761..dbeeb81 100644
--- a/inc/GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx
+++ b/inc/GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class math_IntegerVector;
 class GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const math_Vector& Parameters,const Standard_Integer NbPol);
diff --git a/inc/GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx b/inc/GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx
index d20031a..b9db8e1 100644
--- a/inc/GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx
+++ b/inc/GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class math_Vector;
 class GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox  : public math_BFGS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox(math_MultipleVarFunctionWithGradient& F,const math_Vector& StartingPoint,const Standard_Real Tolerance3d,const Standard_Real Tolerance2d,const Standard_Real Eps,const Standard_Integer NbIterations = 200);
diff --git a/inc/GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx b/inc/GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx
index 4db35e5..f106107 100644
--- a/inc/GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx
+++ b/inc/GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class math_Vector;
 class GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox  : public math_BFGS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox(math_MultipleVarFunctionWithGradient& F,const math_Vector& StartingPoint,const Standard_Real Tolerance3d,const Standard_Real Tolerance2d,const Standard_Real Eps,const Standard_Integer NbIterations = 200);
diff --git a/inc/GeomInt_IntSS.hxx b/inc/GeomInt_IntSS.hxx
index 1786a5a..dbefb4d 100644
--- a/inc/GeomInt_IntSS.hxx
+++ b/inc/GeomInt_IntSS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class Adaptor3d_TopolTool;
 class GeomInt_IntSS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       GeomInt_IntSS();
diff --git a/inc/GeomInt_LineConstructor.hxx b/inc/GeomInt_LineConstructor.hxx
index 48a48ab..6c1a9f3 100644
--- a/inc/GeomInt_LineConstructor.hxx
+++ b/inc/GeomInt_LineConstructor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class IntPatch_Line;
 class GeomInt_LineConstructor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/GeomInt_LineTool.hxx b/inc/GeomInt_LineTool.hxx
index c92c741..ed5a0f1 100644
--- a/inc/GeomInt_LineTool.hxx
+++ b/inc/GeomInt_LineTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class IntPatch_Point;
 class GeomInt_LineTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer NbVertex(const Handle(IntPatch_Line)& L) ;
diff --git a/inc/GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx b/inc/GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx
index 4491d7a..49a14b9 100644
--- a/inc/GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx
+++ b/inc/GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class AppParCurves_MultiBSpCurve;
 class GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,math_Vector& Parameters,const TColStd_Array1OfReal& Knots,const TColStd_Array1OfInteger& Mults,const Standard_Integer Deg,const Standard_Real Tol3d,const Standard_Real Tol2d,const Standard_Integer NbIterations = 1);
diff --git a/inc/GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx b/inc/GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx
index 78dbbb5..bfd0ddb 100644
--- a/inc/GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx
+++ b/inc/GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class AppParCurves_MultiCurve;
 class GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,math_Vector& Parameters,const Standard_Integer Deg,const Standard_Real Tol3d,const Standard_Real Tol2d,const Standard_Integer NbIterations = 200);
diff --git a/inc/GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx b/inc/GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx
index 4feff5d..7e596ae 100644
--- a/inc/GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx
+++ b/inc/GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class AppParCurves_MultiCurve;
 class GeomInt_MyGradientbisOfTheComputeLineOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_MyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,math_Vector& Parameters,const Standard_Integer Deg,const Standard_Real Tol3d,const Standard_Real Tol2d,const Standard_Integer NbIterations = 200);
diff --git a/inc/GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx b/inc/GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx
index 5936be8..8f9473c 100644
--- a/inc/GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx
+++ b/inc/GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class AppParCurves_MultiCurve;
 class GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox  : public math_MultipleVarFunctionWithGradient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,const math_Vector& Parameters,const Standard_Integer Deg);
diff --git a/inc/GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx b/inc/GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx
index 5380a8e..a4f116f 100644
--- a/inc/GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx
+++ b/inc/GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class AppParCurves_MultiCurve;
 class GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox  : public math_MultipleVarFunctionWithGradient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,const math_Vector& Parameters,const Standard_Integer Deg);
diff --git a/inc/GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx b/inc/GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx
index 27c80d9..4a1dd26 100644
--- a/inc/GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx
+++ b/inc/GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class math_IntegerVector;
 class GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const math_Vector& Parameters,const Standard_Integer NbPol);
diff --git a/inc/GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx b/inc/GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx
index 1e8213a..ede5898 100644
--- a/inc/GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx
+++ b/inc/GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class math_IntegerVector;
 class GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const math_Vector& Parameters,const Standard_Integer NbPol);
diff --git a/inc/GeomInt_ParameterAndOrientation.hxx b/inc/GeomInt_ParameterAndOrientation.hxx
index 10d516e..ab085b6 100644
--- a/inc/GeomInt_ParameterAndOrientation.hxx
+++ b/inc/GeomInt_ParameterAndOrientation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class GeomInt_ParameterAndOrientation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_ParameterAndOrientation();
diff --git a/inc/GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx b/inc/GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx
index 69f04ff..9399b8e 100644
--- a/inc/GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx
+++ b/inc/GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class math_Vector;
 class GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP,AppParCurves_MultiCurve& SCurv,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints,const math_Matrix& Bern,const math_Matrix& DerivativeBern,const Standard_Real Tolerance = 1.0e-10);
diff --git a/inc/GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx b/inc/GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx
index fc82a39..e4cf13a 100644
--- a/inc/GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx
+++ b/inc/GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class math_Vector;
 class GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP,AppParCurves_MultiCurve& SCurv,const Standard_Integer FirstPoint,const Standard_Integer LastPoint,const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints,const math_Matrix& Bern,const math_Matrix& DerivativeBern,const Standard_Real Tolerance = 1.0e-10);
diff --git a/inc/GeomInt_SequenceOfParameterAndOrientation.hxx b/inc/GeomInt_SequenceOfParameterAndOrientation.hxx
index bbd2bd2..6fe432c 100644
--- a/inc/GeomInt_SequenceOfParameterAndOrientation.hxx
+++ b/inc/GeomInt_SequenceOfParameterAndOrientation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class GeomInt_SequenceNodeOfSequenceOfParameterAndOrientation;
 class GeomInt_SequenceOfParameterAndOrientation  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       GeomInt_SequenceOfParameterAndOrientation();
diff --git a/inc/GeomInt_TheComputeLineBezierOfWLApprox.hxx b/inc/GeomInt_TheComputeLineBezierOfWLApprox.hxx
index 0e66e35..a656677 100644
--- a/inc/GeomInt_TheComputeLineBezierOfWLApprox.hxx
+++ b/inc/GeomInt_TheComputeLineBezierOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class TColStd_Array1OfReal;
 class GeomInt_TheComputeLineBezierOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_TheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& Line,const Standard_Integer degreemin = 4,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-3,const Standard_Real Tolerance2d = 1.0e-6,const Standard_Integer NbIterations = 5,const Standard_Boolean cutting = Standard_True,const Approx_ParametrizationType parametrization = Approx_ChordLength,const Standard_Boolean Squares = Standard_False);
diff --git a/inc/GeomInt_TheComputeLineOfWLApprox.hxx b/inc/GeomInt_TheComputeLineOfWLApprox.hxx
index 08c4bc3..8a3e930 100644
--- a/inc/GeomInt_TheComputeLineOfWLApprox.hxx
+++ b/inc/GeomInt_TheComputeLineOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class AppParCurves_MultiCurve;
 class GeomInt_TheComputeLineOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_TheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& Line,const Standard_Integer degreemin = 4,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-3,const Standard_Real Tolerance2d = 1.0e-6,const Standard_Integer NbIterations = 5,const Standard_Boolean cutting = Standard_True,const Approx_ParametrizationType parametrization = Approx_ChordLength,const Standard_Boolean Squares = Standard_False);
diff --git a/inc/GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx b/inc/GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx
index 432c73b..e7f6592 100644
--- a/inc/GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx
+++ b/inc/GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class TColStd_Array1OfReal;
 class GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox();
diff --git a/inc/GeomInt_TheImpPrmSvSurfacesOfWLApprox.hxx b/inc/GeomInt_TheImpPrmSvSurfacesOfWLApprox.hxx
index 49a5ad1..5f81edf 100644
--- a/inc/GeomInt_TheImpPrmSvSurfacesOfWLApprox.hxx
+++ b/inc/GeomInt_TheImpPrmSvSurfacesOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class gp_Vec2d;
 class GeomInt_TheImpPrmSvSurfacesOfWLApprox  : public ApproxInt_SvSurfaces {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_TheImpPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& Surf1,const IntSurf_Quadric& Surf2);
diff --git a/inc/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx b/inc/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx
index 2b67c91..da3c33e 100644
--- a/inc/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx
+++ b/inc/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class gp_Dir2d;
 class GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox();
diff --git a/inc/GeomInt_TheMultiLineOfWLApprox.hxx b/inc/GeomInt_TheMultiLineOfWLApprox.hxx
index 06803a9..0d8711e 100644
--- a/inc/GeomInt_TheMultiLineOfWLApprox.hxx
+++ b/inc/GeomInt_TheMultiLineOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TColgp_Array1OfVec2d;
 class GeomInt_TheMultiLineOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_TheMultiLineOfWLApprox(const Handle(IntPatch_WLine)& line,const Standard_Address PtrSvSurfaces,const Standard_Integer NbP3d,const Standard_Integer NbP2d,const Standard_Real xo,const Standard_Real ax,const Standard_Real yo,const Standard_Real ay,const Standard_Real zo,const Standard_Real az,const Standard_Real u1o,const Standard_Real a1u,const Standard_Real v1o,const Standard_Real a1v,const Standard_Real u2o,const Standard_Real a2u,const Standard_Real v2o,const Standard_Real a2v,const Standard_Boolean P2DOnFirst,const Standard_Integer IndMin = 0,const Standard_Integer IndMax = 0);
diff --git a/inc/GeomInt_TheMultiLineToolOfWLApprox.hxx b/inc/GeomInt_TheMultiLineToolOfWLApprox.hxx
index f9ab734..bce96b2 100644
--- a/inc/GeomInt_TheMultiLineToolOfWLApprox.hxx
+++ b/inc/GeomInt_TheMultiLineToolOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TColgp_Array1OfVec2d;
 class GeomInt_TheMultiLineToolOfWLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Integer FirstPoint(const GeomInt_TheMultiLineOfWLApprox& ML) ;
diff --git a/inc/GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx b/inc/GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx
index 8f46688..7fe44c2 100644
--- a/inc/GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx
+++ b/inc/GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class gp_Vec2d;
 class GeomInt_ThePrmPrmSvSurfacesOfWLApprox  : public ApproxInt_SvSurfaces {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_ThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& Surf1,const Handle(Adaptor3d_HSurface)& Surf2);
diff --git a/inc/GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx b/inc/GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx
index 8a28777..9d94e5e 100644
--- a/inc/GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx
+++ b/inc/GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class gp_Dir2d;
 class GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox();
diff --git a/inc/GeomInt_WLApprox.hxx b/inc/GeomInt_WLApprox.hxx
index 093c16e..2984692 100644
--- a/inc/GeomInt_WLApprox.hxx
+++ b/inc/GeomInt_WLApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class AppParCurves_MultiBSpCurve;
 class GeomInt_WLApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomInt_WLApprox();
diff --git a/inc/GeomLProp.hxx b/inc/GeomLProp.hxx
index 496041b..bf79e39 100644
--- a/inc/GeomLProp.hxx
+++ b/inc/GeomLProp.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class GeomLProp_SLProps;
 class GeomLProp  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  GeomAbs_Shape Continuity(const Handle(Geom_Curve)& C1,const Handle(Geom_Curve)& C2,const Standard_Real u1,const Standard_Real u2,const Standard_Boolean r1,const Standard_Boolean r2,const Standard_Real tl,const Standard_Real ta) ;
diff --git a/inc/GeomLProp_CLProps.hxx b/inc/GeomLProp_CLProps.hxx
index f50b0b8..53b468e 100644
--- a/inc/GeomLProp_CLProps.hxx
+++ b/inc/GeomLProp_CLProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class GeomLProp_CurveTool;
 class GeomLProp_CLProps  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomLProp_CLProps(const Handle(Geom_Curve)& C,const Standard_Integer N,const Standard_Real Resolution);
diff --git a/inc/GeomLProp_CurveTool.hxx b/inc/GeomLProp_CurveTool.hxx
index 2da3a13..b38cb56 100644
--- a/inc/GeomLProp_CurveTool.hxx
+++ b/inc/GeomLProp_CurveTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_Vec;
 class GeomLProp_CurveTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the point <P> of parameter <U> on the curve <C>. <br>
   Standard_EXPORT   static  void Value(const Handle(Geom_Curve)& C,const Standard_Real U,gp_Pnt& P) ;
diff --git a/inc/GeomLProp_SLProps.hxx b/inc/GeomLProp_SLProps.hxx
index 9a80a4c..836a08d 100644
--- a/inc/GeomLProp_SLProps.hxx
+++ b/inc/GeomLProp_SLProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class gp_Dir;
 class GeomLProp_SLProps  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomLProp_SLProps(const Handle(Geom_Surface)& S,const Standard_Real U,const Standard_Real V,const Standard_Integer N,const Standard_Real Resolution);
diff --git a/inc/GeomLProp_SurfaceTool.hxx b/inc/GeomLProp_SurfaceTool.hxx
index 095e5e2..bd98041 100644
--- a/inc/GeomLProp_SurfaceTool.hxx
+++ b/inc/GeomLProp_SurfaceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_Vec;
 class GeomLProp_SurfaceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the point <P> of parameter <U> and <V> on the <br>
 //!          Surface <S>. <br>
diff --git a/inc/GeomLib.hxx b/inc/GeomLib.hxx
index 71d7283..e4962da 100644
--- a/inc/GeomLib.hxx
+++ b/inc/GeomLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -82,18 +85,7 @@ class GeomLib_LogSample;
 class GeomLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes     the  curve  3d    from  package  Geom <br>
 //!          corresponding to curve 2d  from package Geom2d, on <br>
diff --git a/inc/GeomLib_Array1OfMat.hxx b/inc/GeomLib_Array1OfMat.hxx
index d667bc4..a43477a 100644
--- a/inc/GeomLib_Array1OfMat.hxx
+++ b/inc/GeomLib_Array1OfMat.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Mat;
 class GeomLib_Array1OfMat  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomLib_Array1OfMat(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/GeomLib_Check2dBSplineCurve.hxx b/inc/GeomLib_Check2dBSplineCurve.hxx
index c18c2a8..641264f 100644
--- a/inc/GeomLib_Check2dBSplineCurve.hxx
+++ b/inc/GeomLib_Check2dBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_OutOfRange;
 class GeomLib_Check2dBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomLib_Check2dBSplineCurve(const Handle(Geom2d_BSplineCurve)& Curve,const Standard_Real Tolerance,const Standard_Real AngularTolerance);
diff --git a/inc/GeomLib_CheckBSplineCurve.hxx b/inc/GeomLib_CheckBSplineCurve.hxx
index 543bcc0..5857197 100644
--- a/inc/GeomLib_CheckBSplineCurve.hxx
+++ b/inc/GeomLib_CheckBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_OutOfRange;
 class GeomLib_CheckBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomLib_CheckBSplineCurve(const Handle(Geom_BSplineCurve)& Curve,const Standard_Real Tolerance,const Standard_Real AngularTolerance);
diff --git a/inc/GeomLib_DenominatorMultiplier.hxx b/inc/GeomLib_DenominatorMultiplier.hxx
index 0fe79a4..8dbce10 100644
--- a/inc/GeomLib_DenominatorMultiplier.hxx
+++ b/inc/GeomLib_DenominatorMultiplier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColStd_Array1OfReal;
 class GeomLib_DenominatorMultiplier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! if the surface is rational this will define the evaluator <br>
 //!          of a real function of 2 variables a(u,v) such that <br>
diff --git a/inc/GeomLib_Interpolate.hxx b/inc/GeomLib_Interpolate.hxx
index 736288d..989aa9c 100644
--- a/inc/GeomLib_Interpolate.hxx
+++ b/inc/GeomLib_Interpolate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TColStd_Array1OfReal;
 class GeomLib_Interpolate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomLib_Interpolate(const Standard_Integer Degree,const Standard_Integer NumPoints,const TColgp_Array1OfPnt& Points,const TColStd_Array1OfReal& Parameters);
diff --git a/inc/GeomLib_IsPlanarSurface.hxx b/inc/GeomLib_IsPlanarSurface.hxx
index eef596c..8032683 100644
--- a/inc/GeomLib_IsPlanarSurface.hxx
+++ b/inc/GeomLib_IsPlanarSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class gp_Pln;
 class GeomLib_IsPlanarSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomLib_IsPlanarSurface(const Handle(Geom_Surface)& S,const Standard_Real Tol = 1.0e-7);
diff --git a/inc/GeomLib_LogSample.hxx b/inc/GeomLib_LogSample.hxx
index cc90552..84b05e8 100644
--- a/inc/GeomLib_LogSample.hxx
+++ b/inc/GeomLib_LogSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Standard_OutOfRange;
 class GeomLib_LogSample  : public math_FunctionSample {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomLib_LogSample(const Standard_Real A,const Standard_Real B,const Standard_Integer N);
diff --git a/inc/GeomLib_MakeCurvefromApprox.hxx b/inc/GeomLib_MakeCurvefromApprox.hxx
index cde046b..2b769a6 100644
--- a/inc/GeomLib_MakeCurvefromApprox.hxx
+++ b/inc/GeomLib_MakeCurvefromApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Geom_BSplineCurve;
 class GeomLib_MakeCurvefromApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomLib_MakeCurvefromApprox(const AdvApprox_ApproxAFunction& Approx);
diff --git a/inc/GeomLib_PolyFunc.hxx b/inc/GeomLib_PolyFunc.hxx
index 178954c..92f081f 100644
--- a/inc/GeomLib_PolyFunc.hxx
+++ b/inc/GeomLib_PolyFunc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class math_Vector;
 class GeomLib_PolyFunc  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomLib_PolyFunc(const math_Vector& Coeffs);
diff --git a/inc/GeomLib_Tool.hxx b/inc/GeomLib_Tool.hxx
index 99000f5..3759125 100644
--- a/inc/GeomLib_Tool.hxx
+++ b/inc/GeomLib_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Pnt2d;
 class GeomLib_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Extracts the parameter of a 3D point lying on a 3D curve <br>
diff --git a/inc/GeomPlate_Aij.hxx b/inc/GeomPlate_Aij.hxx
index 957e566..91ce03a 100644
--- a/inc/GeomPlate_Aij.hxx
+++ b/inc/GeomPlate_Aij.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class gp_Vec;
 class GeomPlate_Aij  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomPlate_Aij();
diff --git a/inc/GeomPlate_Array1OfHCurveOnSurface.hxx b/inc/GeomPlate_Array1OfHCurveOnSurface.hxx
index 8048eda..2cc2258 100644
--- a/inc/GeomPlate_Array1OfHCurveOnSurface.hxx
+++ b/inc/GeomPlate_Array1OfHCurveOnSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Adaptor3d_HCurveOnSurface;
 class GeomPlate_Array1OfHCurveOnSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomPlate_Array1OfHCurveOnSurface(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/GeomPlate_Array1OfSequenceOfReal.hxx b/inc/GeomPlate_Array1OfSequenceOfReal.hxx
index ef7c2f6..bccc766 100644
--- a/inc/GeomPlate_Array1OfSequenceOfReal.hxx
+++ b/inc/GeomPlate_Array1OfSequenceOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColStd_SequenceOfReal;
 class GeomPlate_Array1OfSequenceOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomPlate_Array1OfSequenceOfReal(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/GeomPlate_BuildAveragePlane.hxx b/inc/GeomPlate_BuildAveragePlane.hxx
index 79a34d4..47714f0 100644
--- a/inc/GeomPlate_BuildAveragePlane.hxx
+++ b/inc/GeomPlate_BuildAveragePlane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class GeomPlate_SequenceOfAij;
 class GeomPlate_BuildAveragePlane  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Tol is a  Tolerance to make the difference between <br>
 //!           the result plane and the result line. <br>
diff --git a/inc/GeomPlate_BuildPlateSurface.hxx b/inc/GeomPlate_BuildPlateSurface.hxx
index e8f167f..fb7be5a 100644
--- a/inc/GeomPlate_BuildPlateSurface.hxx
+++ b/inc/GeomPlate_BuildPlateSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -105,18 +108,7 @@ class Adaptor2d_HCurve2d;
 class GeomPlate_BuildPlateSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructor  compatible  with  the  old  version <br>
 //! with this constructor the constraint are given in a Array of Curve on Surface <br>
diff --git a/inc/GeomPlate_MakeApprox.hxx b/inc/GeomPlate_MakeApprox.hxx
index abc1ce4..8414828 100644
--- a/inc/GeomPlate_MakeApprox.hxx
+++ b/inc/GeomPlate_MakeApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class AdvApp2Var_Criterion;
 class GeomPlate_MakeApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Converts SurfPlate into a Geom_BSplineSurface with <br>
 //!  n Bezier pieces (n<=Nbmax) of degree <= dgmax <br>
diff --git a/inc/GeomPlate_PlateG0Criterion.hxx b/inc/GeomPlate_PlateG0Criterion.hxx
index fd8b5cf..56d47bf 100644
--- a/inc/GeomPlate_PlateG0Criterion.hxx
+++ b/inc/GeomPlate_PlateG0Criterion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class AdvApp2Var_Context;
 class GeomPlate_PlateG0Criterion  : public AdvApp2Var_Criterion {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomPlate_PlateG0Criterion(const TColgp_SequenceOfXY& Data,const TColgp_SequenceOfXYZ& G0Data,const Standard_Real Maximum,const AdvApp2Var_CriterionType Type = AdvApp2Var_Absolute,const AdvApp2Var_CriterionRepartition Repart = AdvApp2Var_Regular);
diff --git a/inc/GeomPlate_PlateG1Criterion.hxx b/inc/GeomPlate_PlateG1Criterion.hxx
index 105c4ca..d354d5e 100644
--- a/inc/GeomPlate_PlateG1Criterion.hxx
+++ b/inc/GeomPlate_PlateG1Criterion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class AdvApp2Var_Context;
 class GeomPlate_PlateG1Criterion  : public AdvApp2Var_Criterion {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomPlate_PlateG1Criterion(const TColgp_SequenceOfXY& Data,const TColgp_SequenceOfXYZ& G1Data,const Standard_Real Maximum,const AdvApp2Var_CriterionType Type = AdvApp2Var_Absolute,const AdvApp2Var_CriterionRepartition Repart = AdvApp2Var_Regular);
diff --git a/inc/GeomPlate_SequenceOfAij.hxx b/inc/GeomPlate_SequenceOfAij.hxx
index 1e2a924..5b8dd83 100644
--- a/inc/GeomPlate_SequenceOfAij.hxx
+++ b/inc/GeomPlate_SequenceOfAij.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class GeomPlate_SequenceNodeOfSequenceOfAij;
 class GeomPlate_SequenceOfAij  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       GeomPlate_SequenceOfAij();
diff --git a/inc/GeomPlate_SequenceOfCurveConstraint.hxx b/inc/GeomPlate_SequenceOfCurveConstraint.hxx
index 99901d9..e2bb54b 100644
--- a/inc/GeomPlate_SequenceOfCurveConstraint.hxx
+++ b/inc/GeomPlate_SequenceOfCurveConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class GeomPlate_SequenceNodeOfSequenceOfCurveConstraint;
 class GeomPlate_SequenceOfCurveConstraint  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       GeomPlate_SequenceOfCurveConstraint();
diff --git a/inc/GeomPlate_SequenceOfPointConstraint.hxx b/inc/GeomPlate_SequenceOfPointConstraint.hxx
index 11295a1..3daf199 100644
--- a/inc/GeomPlate_SequenceOfPointConstraint.hxx
+++ b/inc/GeomPlate_SequenceOfPointConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class GeomPlate_SequenceNodeOfSequenceOfPointConstraint;
 class GeomPlate_SequenceOfPointConstraint  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       GeomPlate_SequenceOfPointConstraint();
diff --git a/inc/GeomProjLib.hxx b/inc/GeomProjLib.hxx
index 07900dc..6096f57 100644
--- a/inc/GeomProjLib.hxx
+++ b/inc/GeomProjLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Dir;
 class GeomProjLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Geom2d_Curve Curve2d(const Handle(Geom_Curve)& C,const Standard_Real First,const Standard_Real Last,const Handle(Geom_Surface)& S,const Standard_Real UFirst,const Standard_Real ULast,const Standard_Real VFirst,const Standard_Real VLast,Standard_Real& Tolerance) ;
diff --git a/inc/GeomToIGES_GeomCurve.hxx b/inc/GeomToIGES_GeomCurve.hxx
index b20e397..a34044f 100644
--- a/inc/GeomToIGES_GeomCurve.hxx
+++ b/inc/GeomToIGES_GeomCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -91,18 +94,7 @@ class Geom_OffsetCurve;
 class GeomToIGES_GeomCurve  : public GeomToIGES_GeomEntity {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToIGES_GeomCurve();
diff --git a/inc/GeomToIGES_GeomEntity.hxx b/inc/GeomToIGES_GeomEntity.hxx
index 03359ed..9bf9a65 100644
--- a/inc/GeomToIGES_GeomEntity.hxx
+++ b/inc/GeomToIGES_GeomEntity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IGESData_IGESModel;
 class GeomToIGES_GeomEntity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a tool GeomEntity <br>
   Standard_EXPORT   GeomToIGES_GeomEntity();
diff --git a/inc/GeomToIGES_GeomPoint.hxx b/inc/GeomToIGES_GeomPoint.hxx
index 3230b6d..59d1dde 100644
--- a/inc/GeomToIGES_GeomPoint.hxx
+++ b/inc/GeomToIGES_GeomPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Geom_CartesianPoint;
 class GeomToIGES_GeomPoint  : public GeomToIGES_GeomEntity {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToIGES_GeomPoint();
diff --git a/inc/GeomToIGES_GeomSurface.hxx b/inc/GeomToIGES_GeomSurface.hxx
index 345d143..6babcc3 100644
--- a/inc/GeomToIGES_GeomSurface.hxx
+++ b/inc/GeomToIGES_GeomSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -108,18 +111,7 @@ class Geom_OffsetSurface;
 class GeomToIGES_GeomSurface  : public GeomToIGES_GeomEntity {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToIGES_GeomSurface();
diff --git a/inc/GeomToIGES_GeomVector.hxx b/inc/GeomToIGES_GeomVector.hxx
index 8a15a74..eb8479e 100644
--- a/inc/GeomToIGES_GeomVector.hxx
+++ b/inc/GeomToIGES_GeomVector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Geom_Direction;
 class GeomToIGES_GeomVector  : public GeomToIGES_GeomEntity {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToIGES_GeomVector();
diff --git a/inc/GeomToStep_MakeAxis1Placement.hxx b/inc/GeomToStep_MakeAxis1Placement.hxx
index ab8960e..94bc81d 100644
--- a/inc/GeomToStep_MakeAxis1Placement.hxx
+++ b/inc/GeomToStep_MakeAxis1Placement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Geom2d_AxisPlacement;
 class GeomToStep_MakeAxis1Placement  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeAxis1Placement(const gp_Ax1& A);
diff --git a/inc/GeomToStep_MakeAxis2Placement2d.hxx b/inc/GeomToStep_MakeAxis2Placement2d.hxx
index 2aa1f4b..e0db6e9 100644
--- a/inc/GeomToStep_MakeAxis2Placement2d.hxx
+++ b/inc/GeomToStep_MakeAxis2Placement2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Ax22d;
 class GeomToStep_MakeAxis2Placement2d  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeAxis2Placement2d(const gp_Ax2& A);
diff --git a/inc/GeomToStep_MakeAxis2Placement3d.hxx b/inc/GeomToStep_MakeAxis2Placement3d.hxx
index 1868cb4..54d8daa 100644
--- a/inc/GeomToStep_MakeAxis2Placement3d.hxx
+++ b/inc/GeomToStep_MakeAxis2Placement3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Geom_Axis2Placement;
 class GeomToStep_MakeAxis2Placement3d  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeAxis2Placement3d();
diff --git a/inc/GeomToStep_MakeBSplineCurveWithKnots.hxx b/inc/GeomToStep_MakeBSplineCurveWithKnots.hxx
index 1d50ce0..908bcba 100644
--- a/inc/GeomToStep_MakeBSplineCurveWithKnots.hxx
+++ b/inc/GeomToStep_MakeBSplineCurveWithKnots.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Geom2d_BSplineCurve;
 class GeomToStep_MakeBSplineCurveWithKnots  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom_BSplineCurve)& Bsplin);
diff --git a/inc/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx b/inc/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx
index 386daee..98d83d6 100644
--- a/inc/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx
+++ b/inc/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Geom2d_BSplineCurve;
 class GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom_BSplineCurve)& Bsplin);
diff --git a/inc/GeomToStep_MakeBSplineSurfaceWithKnots.hxx b/inc/GeomToStep_MakeBSplineSurfaceWithKnots.hxx
index e9310a0..6ced9eb 100644
--- a/inc/GeomToStep_MakeBSplineSurfaceWithKnots.hxx
+++ b/inc/GeomToStep_MakeBSplineSurfaceWithKnots.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom_BSplineSurface;
 class GeomToStep_MakeBSplineSurfaceWithKnots  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeBSplineSurfaceWithKnots(const Handle(Geom_BSplineSurface)& Bsplin);
diff --git a/inc/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx b/inc/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx
index 190b4e4..a04f1ce 100644
--- a/inc/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx
+++ b/inc/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom_BSplineSurface;
 class GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface(const Handle(Geom_BSplineSurface)& Bsplin);
diff --git a/inc/GeomToStep_MakeBoundedCurve.hxx b/inc/GeomToStep_MakeBoundedCurve.hxx
index db2b661..3d0830e 100644
--- a/inc/GeomToStep_MakeBoundedCurve.hxx
+++ b/inc/GeomToStep_MakeBoundedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Geom2d_BoundedCurve;
 class GeomToStep_MakeBoundedCurve  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeBoundedCurve(const Handle(Geom_BoundedCurve)& C);
diff --git a/inc/GeomToStep_MakeBoundedSurface.hxx b/inc/GeomToStep_MakeBoundedSurface.hxx
index 41cb400..4ec2035 100644
--- a/inc/GeomToStep_MakeBoundedSurface.hxx
+++ b/inc/GeomToStep_MakeBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom_BoundedSurface;
 class GeomToStep_MakeBoundedSurface  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeBoundedSurface(const Handle(Geom_BoundedSurface)& C);
diff --git a/inc/GeomToStep_MakeCartesianPoint.hxx b/inc/GeomToStep_MakeCartesianPoint.hxx
index ae707c4..87e420b 100644
--- a/inc/GeomToStep_MakeCartesianPoint.hxx
+++ b/inc/GeomToStep_MakeCartesianPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Geom2d_CartesianPoint;
 class GeomToStep_MakeCartesianPoint  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeCartesianPoint(const gp_Pnt& P);
diff --git a/inc/GeomToStep_MakeCircle.hxx b/inc/GeomToStep_MakeCircle.hxx
index 46fb900..978e3cf 100644
--- a/inc/GeomToStep_MakeCircle.hxx
+++ b/inc/GeomToStep_MakeCircle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Geom2d_Circle;
 class GeomToStep_MakeCircle  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeCircle(const gp_Circ& C);
diff --git a/inc/GeomToStep_MakeConic.hxx b/inc/GeomToStep_MakeConic.hxx
index 2df63ef..32fb923 100644
--- a/inc/GeomToStep_MakeConic.hxx
+++ b/inc/GeomToStep_MakeConic.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Geom2d_Conic;
 class GeomToStep_MakeConic  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeConic(const Handle(Geom_Conic)& C);
diff --git a/inc/GeomToStep_MakeConicalSurface.hxx b/inc/GeomToStep_MakeConicalSurface.hxx
index 342fe38..b3cb81b 100644
--- a/inc/GeomToStep_MakeConicalSurface.hxx
+++ b/inc/GeomToStep_MakeConicalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_ConicalSurface;
 class GeomToStep_MakeConicalSurface  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeConicalSurface(const Handle(Geom_ConicalSurface)& CSurf);
diff --git a/inc/GeomToStep_MakeCurve.hxx b/inc/GeomToStep_MakeCurve.hxx
index 03e0e75..a011a4d 100644
--- a/inc/GeomToStep_MakeCurve.hxx
+++ b/inc/GeomToStep_MakeCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Geom2d_Curve;
 class GeomToStep_MakeCurve  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeCurve(const Handle(Geom_Curve)& C);
diff --git a/inc/GeomToStep_MakeCylindricalSurface.hxx b/inc/GeomToStep_MakeCylindricalSurface.hxx
index 200257d..989754c 100644
--- a/inc/GeomToStep_MakeCylindricalSurface.hxx
+++ b/inc/GeomToStep_MakeCylindricalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_CylindricalSurface;
 class GeomToStep_MakeCylindricalSurface  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeCylindricalSurface(const Handle(Geom_CylindricalSurface)& CSurf);
diff --git a/inc/GeomToStep_MakeDirection.hxx b/inc/GeomToStep_MakeDirection.hxx
index b4d5733..5f9e873 100644
--- a/inc/GeomToStep_MakeDirection.hxx
+++ b/inc/GeomToStep_MakeDirection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Geom2d_Direction;
 class GeomToStep_MakeDirection  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeDirection(const gp_Dir& D);
diff --git a/inc/GeomToStep_MakeElementarySurface.hxx b/inc/GeomToStep_MakeElementarySurface.hxx
index 17aa30c..128b33b 100644
--- a/inc/GeomToStep_MakeElementarySurface.hxx
+++ b/inc/GeomToStep_MakeElementarySurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom_ElementarySurface;
 class GeomToStep_MakeElementarySurface  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeElementarySurface(const Handle(Geom_ElementarySurface)& S);
diff --git a/inc/GeomToStep_MakeEllipse.hxx b/inc/GeomToStep_MakeEllipse.hxx
index f2cab32..4ebc6b6 100644
--- a/inc/GeomToStep_MakeEllipse.hxx
+++ b/inc/GeomToStep_MakeEllipse.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Geom2d_Ellipse;
 class GeomToStep_MakeEllipse  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeEllipse(const gp_Elips& C);
diff --git a/inc/GeomToStep_MakeHyperbola.hxx b/inc/GeomToStep_MakeHyperbola.hxx
index f39fec4..c9255d3 100644
--- a/inc/GeomToStep_MakeHyperbola.hxx
+++ b/inc/GeomToStep_MakeHyperbola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Geom_Hyperbola;
 class GeomToStep_MakeHyperbola  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola)& C);
diff --git a/inc/GeomToStep_MakeLine.hxx b/inc/GeomToStep_MakeLine.hxx
index e1ec6dc..143a713 100644
--- a/inc/GeomToStep_MakeLine.hxx
+++ b/inc/GeomToStep_MakeLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Geom2d_Line;
 class GeomToStep_MakeLine  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeLine(const gp_Lin& L);
diff --git a/inc/GeomToStep_MakeParabola.hxx b/inc/GeomToStep_MakeParabola.hxx
index ad8a368..9118550 100644
--- a/inc/GeomToStep_MakeParabola.hxx
+++ b/inc/GeomToStep_MakeParabola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Geom_Parabola;
 class GeomToStep_MakeParabola  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& C);
diff --git a/inc/GeomToStep_MakePlane.hxx b/inc/GeomToStep_MakePlane.hxx
index 48521bc..c2d84f4 100644
--- a/inc/GeomToStep_MakePlane.hxx
+++ b/inc/GeomToStep_MakePlane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom_Plane;
 class GeomToStep_MakePlane  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakePlane(const gp_Pln& P);
diff --git a/inc/GeomToStep_MakePolyline.hxx b/inc/GeomToStep_MakePolyline.hxx
index b11e18a..74bce66 100644
--- a/inc/GeomToStep_MakePolyline.hxx
+++ b/inc/GeomToStep_MakePolyline.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TColgp_Array1OfPnt2d;
 class GeomToStep_MakePolyline  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakePolyline(const TColgp_Array1OfPnt& P);
diff --git a/inc/GeomToStep_MakeRectangularTrimmedSurface.hxx b/inc/GeomToStep_MakeRectangularTrimmedSurface.hxx
index 39083fe..4dcf876 100644
--- a/inc/GeomToStep_MakeRectangularTrimmedSurface.hxx
+++ b/inc/GeomToStep_MakeRectangularTrimmedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom_RectangularTrimmedSurface;
 class GeomToStep_MakeRectangularTrimmedSurface  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeRectangularTrimmedSurface(const Handle(Geom_RectangularTrimmedSurface)& RTSurf);
diff --git a/inc/GeomToStep_MakeSphericalSurface.hxx b/inc/GeomToStep_MakeSphericalSurface.hxx
index 4affa3c..0002d4c 100644
--- a/inc/GeomToStep_MakeSphericalSurface.hxx
+++ b/inc/GeomToStep_MakeSphericalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_SphericalSurface;
 class GeomToStep_MakeSphericalSurface  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeSphericalSurface(const Handle(Geom_SphericalSurface)& CSurf);
diff --git a/inc/GeomToStep_MakeSurface.hxx b/inc/GeomToStep_MakeSurface.hxx
index d84ce17..8917d72 100644
--- a/inc/GeomToStep_MakeSurface.hxx
+++ b/inc/GeomToStep_MakeSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_Surface;
 class GeomToStep_MakeSurface  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeSurface(const Handle(Geom_Surface)& C);
diff --git a/inc/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx b/inc/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx
index 77dcd99..29ad783 100644
--- a/inc/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx
+++ b/inc/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_SurfaceOfLinearExtrusion;
 class GeomToStep_MakeSurfaceOfLinearExtrusion  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeSurfaceOfLinearExtrusion(const Handle(Geom_SurfaceOfLinearExtrusion)& CSurf);
diff --git a/inc/GeomToStep_MakeSurfaceOfRevolution.hxx b/inc/GeomToStep_MakeSurfaceOfRevolution.hxx
index a04dd78..4932611 100644
--- a/inc/GeomToStep_MakeSurfaceOfRevolution.hxx
+++ b/inc/GeomToStep_MakeSurfaceOfRevolution.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_SurfaceOfRevolution;
 class GeomToStep_MakeSurfaceOfRevolution  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeSurfaceOfRevolution(const Handle(Geom_SurfaceOfRevolution)& RevSurf);
diff --git a/inc/GeomToStep_MakeSweptSurface.hxx b/inc/GeomToStep_MakeSweptSurface.hxx
index 0e24a63..734e9f8 100644
--- a/inc/GeomToStep_MakeSweptSurface.hxx
+++ b/inc/GeomToStep_MakeSweptSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom_SweptSurface;
 class GeomToStep_MakeSweptSurface  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeSweptSurface(const Handle(Geom_SweptSurface)& S);
diff --git a/inc/GeomToStep_MakeToroidalSurface.hxx b/inc/GeomToStep_MakeToroidalSurface.hxx
index f59802f..6c87ae7 100644
--- a/inc/GeomToStep_MakeToroidalSurface.hxx
+++ b/inc/GeomToStep_MakeToroidalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_ToroidalSurface;
 class GeomToStep_MakeToroidalSurface  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeToroidalSurface(const Handle(Geom_ToroidalSurface)& TorSurf);
diff --git a/inc/GeomToStep_MakeVector.hxx b/inc/GeomToStep_MakeVector.hxx
index bb8eca7..3a86f8a 100644
--- a/inc/GeomToStep_MakeVector.hxx
+++ b/inc/GeomToStep_MakeVector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Geom2d_Vector;
 class GeomToStep_MakeVector  : public GeomToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GeomToStep_MakeVector(const gp_Vec& V);
diff --git a/inc/GeomToStep_Root.hxx b/inc/GeomToStep_Root.hxx
index 4728681..c201a26 100644
--- a/inc/GeomToStep_Root.hxx
+++ b/inc/GeomToStep_Root.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@
 class GeomToStep_Root  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT     Standard_Boolean IsDone() const;
diff --git a/inc/GeomTools.hxx b/inc/GeomTools.hxx
index 6a7c320..63e40e2 100644
--- a/inc/GeomTools.hxx
+++ b/inc/GeomTools.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class GeomTools_Curve2dSet;
 class GeomTools  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Dumps the surface on the stream. <br>
   Standard_EXPORT   static  void Dump(const Handle(Geom_Surface)& S,Standard_OStream& OS) ;
diff --git a/inc/GeomTools_Curve2dSet.hxx b/inc/GeomTools_Curve2dSet.hxx
index 43154cc..2de6236 100644
--- a/inc/GeomTools_Curve2dSet.hxx
+++ b/inc/GeomTools_Curve2dSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Geom2d_Curve;
 class GeomTools_Curve2dSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns an empty set of Curves. <br>
   Standard_EXPORT   GeomTools_Curve2dSet();
diff --git a/inc/GeomTools_CurveSet.hxx b/inc/GeomTools_CurveSet.hxx
index a617522..c8e921f 100644
--- a/inc/GeomTools_CurveSet.hxx
+++ b/inc/GeomTools_CurveSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Geom_Curve;
 class GeomTools_CurveSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns an empty set of Curves. <br>
   Standard_EXPORT   GeomTools_CurveSet();
diff --git a/inc/GeomTools_SurfaceSet.hxx b/inc/GeomTools_SurfaceSet.hxx
index 13a603a..79374d4 100644
--- a/inc/GeomTools_SurfaceSet.hxx
+++ b/inc/GeomTools_SurfaceSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Geom_Surface;
 class GeomTools_SurfaceSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns an empty set of Surfaces. <br>
   Standard_EXPORT   GeomTools_SurfaceSet();
diff --git a/inc/Geom_BSplineCurve.hxx b/inc/Geom_BSplineCurve.hxx
index 0607b47..f79f527 100644
--- a/inc/Geom_BSplineCurve.hxx
+++ b/inc/Geom_BSplineCurve.hxx
@@ -40,6 +40,9 @@
 #ifndef _Standard_Real_HeaderFile
 #include <Standard_Real.hxx>
 #endif
+#ifndef _Standard_Mutex_HeaderFile
+#include <Standard_Mutex.hxx>
+#endif
 #ifndef _Geom_BoundedCurve_HeaderFile
 #include <Geom_BoundedCurve.hxx>
 #endif
@@ -728,6 +731,7 @@ Standard_Real spanlenghtcache;
 Standard_Integer spanindexcache;
 Standard_Real maxderivinv;
 Standard_Boolean maxderivinvok;
+Standard_Mutex myMutex;
 
 
 };
diff --git a/inc/Geom_BSplineSurface.hxx b/inc/Geom_BSplineSurface.hxx
index 1729940..05cbca0 100644
--- a/inc/Geom_BSplineSurface.hxx
+++ b/inc/Geom_BSplineSurface.hxx
@@ -43,6 +43,9 @@
 #ifndef _Standard_Real_HeaderFile
 #include <Standard_Real.hxx>
 #endif
+#ifndef _Standard_Mutex_HeaderFile
+#include <Standard_Mutex.hxx>
+#endif
 #ifndef _Geom_BoundedSurface_HeaderFile
 #include <Geom_BoundedSurface.hxx>
 #endif
@@ -1010,6 +1013,7 @@ Standard_Integer validcache;
 Standard_Real umaxderivinv;
 Standard_Real vmaxderivinv;
 Standard_Boolean maxderivinvok;
+Standard_Mutex myMutex;
 
 
 };
diff --git a/inc/Geom_OsculatingSurface.hxx b/inc/Geom_OsculatingSurface.hxx
index 780a193..a4725d5 100644
--- a/inc/Geom_OsculatingSurface.hxx
+++ b/inc/Geom_OsculatingSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class Geom_SequenceOfBSplineSurface;
 class Geom_OsculatingSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Geom_OsculatingSurface();
diff --git a/inc/Geom_SequenceOfBSplineSurface.hxx b/inc/Geom_SequenceOfBSplineSurface.hxx
index 193ac6c..d992f55 100644
--- a/inc/Geom_SequenceOfBSplineSurface.hxx
+++ b/inc/Geom_SequenceOfBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom_SequenceNodeOfSequenceOfBSplineSurface;
 class Geom_SequenceOfBSplineSurface  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Geom_SequenceOfBSplineSurface();
diff --git a/inc/Geom_SequenceOfSurface.hxx b/inc/Geom_SequenceOfSurface.hxx
index 6540195..858fd07 100644
--- a/inc/Geom_SequenceOfSurface.hxx
+++ b/inc/Geom_SequenceOfSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom_SequenceNodeOfSequenceOfSurface;
 class Geom_SequenceOfSurface  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Geom_SequenceOfSurface();
diff --git a/inc/GeometryTest.hxx b/inc/GeometryTest.hxx
index ed5f7b3..60d0e90 100644
--- a/inc/GeometryTest.hxx
+++ b/inc/GeometryTest.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -21,18 +24,7 @@ class Draw_Interpretor;
 class GeometryTest  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! defines all geometric commands. <br>
   Standard_EXPORT   static  void AllCommands(Draw_Interpretor& I) ;
diff --git a/inc/GeomliteTest.hxx b/inc/GeomliteTest.hxx
index d3c2284..dd09886 100644
--- a/inc/GeomliteTest.hxx
+++ b/inc/GeomliteTest.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -21,18 +24,7 @@ class Draw_Interpretor;
 class GeomliteTest  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! defines all geometric commands. <br>
   Standard_EXPORT   static  void AllCommands(Draw_Interpretor& I) ;
diff --git a/inc/GraphDS_DataMapIteratorOfEntityRoleMap.hxx b/inc/GraphDS_DataMapIteratorOfEntityRoleMap.hxx
index e0064c8..696880c 100644
--- a/inc/GraphDS_DataMapIteratorOfEntityRoleMap.hxx
+++ b/inc/GraphDS_DataMapIteratorOfEntityRoleMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class GraphDS_DataMapNodeOfEntityRoleMap;
 class GraphDS_DataMapIteratorOfEntityRoleMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GraphDS_DataMapIteratorOfEntityRoleMap();
diff --git a/inc/GraphDS_EntityRoleMap.hxx b/inc/GraphDS_EntityRoleMap.hxx
index 1c92ad1..da48397 100644
--- a/inc/GraphDS_EntityRoleMap.hxx
+++ b/inc/GraphDS_EntityRoleMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class GraphDS_DataMapIteratorOfEntityRoleMap;
 class GraphDS_EntityRoleMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GraphDS_EntityRoleMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/GraphTools_ListIteratorOfListOfSequenceOfInteger.hxx b/inc/GraphTools_ListIteratorOfListOfSequenceOfInteger.hxx
index 3e24388..8dce3b1 100644
--- a/inc/GraphTools_ListIteratorOfListOfSequenceOfInteger.hxx
+++ b/inc/GraphTools_ListIteratorOfListOfSequenceOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class GraphTools_ListNodeOfListOfSequenceOfInteger;
 class GraphTools_ListIteratorOfListOfSequenceOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GraphTools_ListIteratorOfListOfSequenceOfInteger();
diff --git a/inc/GraphTools_ListIteratorOfSCList.hxx b/inc/GraphTools_ListIteratorOfSCList.hxx
index cf6a4ea..bfb39c3 100644
--- a/inc/GraphTools_ListIteratorOfSCList.hxx
+++ b/inc/GraphTools_ListIteratorOfSCList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class GraphTools_ListNodeOfSCList;
 class GraphTools_ListIteratorOfSCList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GraphTools_ListIteratorOfSCList();
diff --git a/inc/GraphTools_ListOfSequenceOfInteger.hxx b/inc/GraphTools_ListOfSequenceOfInteger.hxx
index c400fb2..223cc79 100644
--- a/inc/GraphTools_ListOfSequenceOfInteger.hxx
+++ b/inc/GraphTools_ListOfSequenceOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class GraphTools_ListNodeOfListOfSequenceOfInteger;
 class GraphTools_ListOfSequenceOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GraphTools_ListOfSequenceOfInteger();
diff --git a/inc/GraphTools_RGNode.hxx b/inc/GraphTools_RGNode.hxx
index a598a0c..ad9633e 100644
--- a/inc/GraphTools_RGNode.hxx
+++ b/inc/GraphTools_RGNode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class GraphTools_SC;
 class GraphTools_RGNode  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GraphTools_RGNode();
diff --git a/inc/GraphTools_SCList.hxx b/inc/GraphTools_SCList.hxx
index a00be8e..e29ef5e 100644
--- a/inc/GraphTools_SCList.hxx
+++ b/inc/GraphTools_SCList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class GraphTools_ListNodeOfSCList;
 class GraphTools_SCList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GraphTools_SCList();
diff --git a/inc/GraphTools_TSNode.hxx b/inc/GraphTools_TSNode.hxx
index 3689611..19dbcbe 100644
--- a/inc/GraphTools_TSNode.hxx
+++ b/inc/GraphTools_TSNode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class GraphTools_TSNode  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   GraphTools_TSNode();
diff --git a/inc/Graphic2d_Array1OfVertex.hxx b/inc/Graphic2d_Array1OfVertex.hxx
index bf283c6..42a05c0 100644
--- a/inc/Graphic2d_Array1OfVertex.hxx
+++ b/inc/Graphic2d_Array1OfVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic2d_Vertex;
 class Graphic2d_Array1OfVertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic2d_Array1OfVertex(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Graphic2d_SequenceOfBuffer.hxx b/inc/Graphic2d_SequenceOfBuffer.hxx
index 4eac05e..42a8339 100644
--- a/inc/Graphic2d_SequenceOfBuffer.hxx
+++ b/inc/Graphic2d_SequenceOfBuffer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Graphic2d_SequenceNodeOfSequenceOfBuffer;
 class Graphic2d_SequenceOfBuffer  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Graphic2d_SequenceOfBuffer();
diff --git a/inc/Graphic2d_SequenceOfGraphicObject.hxx b/inc/Graphic2d_SequenceOfGraphicObject.hxx
index 55e2ba9..e955a52 100644
--- a/inc/Graphic2d_SequenceOfGraphicObject.hxx
+++ b/inc/Graphic2d_SequenceOfGraphicObject.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Graphic2d_SequenceNodeOfSequenceOfGraphicObject;
 class Graphic2d_SequenceOfGraphicObject  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Graphic2d_SequenceOfGraphicObject();
diff --git a/inc/Graphic2d_SequenceOfPolyline.hxx b/inc/Graphic2d_SequenceOfPolyline.hxx
index b4d3c49..c27bd56 100644
--- a/inc/Graphic2d_SequenceOfPolyline.hxx
+++ b/inc/Graphic2d_SequenceOfPolyline.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Graphic2d_SequenceNodeOfSequenceOfPolyline;
 class Graphic2d_SequenceOfPolyline  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Graphic2d_SequenceOfPolyline();
diff --git a/inc/Graphic2d_SequenceOfPrimitives.hxx b/inc/Graphic2d_SequenceOfPrimitives.hxx
index 3444fbc..17b1846 100644
--- a/inc/Graphic2d_SequenceOfPrimitives.hxx
+++ b/inc/Graphic2d_SequenceOfPrimitives.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Graphic2d_SequenceNodeOfSequenceOfPrimitives;
 class Graphic2d_SequenceOfPrimitives  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Graphic2d_SequenceOfPrimitives();
diff --git a/inc/Graphic2d_SequenceOfVertex.hxx b/inc/Graphic2d_SequenceOfVertex.hxx
index 10caac4..afe7bca 100644
--- a/inc/Graphic2d_SequenceOfVertex.hxx
+++ b/inc/Graphic2d_SequenceOfVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Graphic2d_SequenceNodeOfSequenceOfVertex;
 class Graphic2d_SequenceOfVertex  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Graphic2d_SequenceOfVertex();
diff --git a/inc/Graphic2d_Vertex.hxx b/inc/Graphic2d_Vertex.hxx
index cf8156e..c4d4355 100644
--- a/inc/Graphic2d_Vertex.hxx
+++ b/inc/Graphic2d_Vertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@
 class Graphic2d_Vertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a point with 0.0, 0.0 coordinates. <br>
   Standard_EXPORT   Graphic2d_Vertex();
diff --git a/inc/Graphic3d_Array1OfVector.hxx b/inc/Graphic3d_Array1OfVector.hxx
index c898ca8..3453429 100644
--- a/inc/Graphic3d_Array1OfVector.hxx
+++ b/inc/Graphic3d_Array1OfVector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic3d_Vector;
 class Graphic3d_Array1OfVector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_Array1OfVector(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Graphic3d_Array1OfVertex.hxx b/inc/Graphic3d_Array1OfVertex.hxx
index 77c5511..fd6ec6d 100644
--- a/inc/Graphic3d_Array1OfVertex.hxx
+++ b/inc/Graphic3d_Array1OfVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic3d_Vertex;
 class Graphic3d_Array1OfVertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_Array1OfVertex(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Graphic3d_Array1OfVertexC.hxx b/inc/Graphic3d_Array1OfVertexC.hxx
index 230a602..fc37111 100644
--- a/inc/Graphic3d_Array1OfVertexC.hxx
+++ b/inc/Graphic3d_Array1OfVertexC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic3d_VertexC;
 class Graphic3d_Array1OfVertexC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_Array1OfVertexC(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Graphic3d_Array1OfVertexN.hxx b/inc/Graphic3d_Array1OfVertexN.hxx
index 0739fed..5cfc789 100644
--- a/inc/Graphic3d_Array1OfVertexN.hxx
+++ b/inc/Graphic3d_Array1OfVertexN.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic3d_VertexN;
 class Graphic3d_Array1OfVertexN  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_Array1OfVertexN(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Graphic3d_Array1OfVertexNC.hxx b/inc/Graphic3d_Array1OfVertexNC.hxx
index 48d05e3..b3d7850 100644
--- a/inc/Graphic3d_Array1OfVertexNC.hxx
+++ b/inc/Graphic3d_Array1OfVertexNC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic3d_VertexNC;
 class Graphic3d_Array1OfVertexNC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_Array1OfVertexNC(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Graphic3d_Array1OfVertexNT.hxx b/inc/Graphic3d_Array1OfVertexNT.hxx
index c49dbf7..c348c46 100644
--- a/inc/Graphic3d_Array1OfVertexNT.hxx
+++ b/inc/Graphic3d_Array1OfVertexNT.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic3d_VertexNT;
 class Graphic3d_Array1OfVertexNT  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_Array1OfVertexNT(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Graphic3d_Array2OfVertex.hxx b/inc/Graphic3d_Array2OfVertex.hxx
index dde1168..9721761 100644
--- a/inc/Graphic3d_Array2OfVertex.hxx
+++ b/inc/Graphic3d_Array2OfVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic3d_Vertex;
 class Graphic3d_Array2OfVertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_Array2OfVertex(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/Graphic3d_Array2OfVertexC.hxx b/inc/Graphic3d_Array2OfVertexC.hxx
index 1328b68..7250dc5 100644
--- a/inc/Graphic3d_Array2OfVertexC.hxx
+++ b/inc/Graphic3d_Array2OfVertexC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic3d_VertexC;
 class Graphic3d_Array2OfVertexC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_Array2OfVertexC(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/Graphic3d_Array2OfVertexN.hxx b/inc/Graphic3d_Array2OfVertexN.hxx
index 9e35475..f10eeec 100644
--- a/inc/Graphic3d_Array2OfVertexN.hxx
+++ b/inc/Graphic3d_Array2OfVertexN.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic3d_VertexN;
 class Graphic3d_Array2OfVertexN  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_Array2OfVertexN(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/Graphic3d_Array2OfVertexNC.hxx b/inc/Graphic3d_Array2OfVertexNC.hxx
index 6019cf9..22f9027 100644
--- a/inc/Graphic3d_Array2OfVertexNC.hxx
+++ b/inc/Graphic3d_Array2OfVertexNC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic3d_VertexNC;
 class Graphic3d_Array2OfVertexNC  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_Array2OfVertexNC(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/Graphic3d_Array2OfVertexNT.hxx b/inc/Graphic3d_Array2OfVertexNT.hxx
index b054864..c524a22 100644
--- a/inc/Graphic3d_Array2OfVertexNT.hxx
+++ b/inc/Graphic3d_Array2OfVertexNT.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic3d_VertexNT;
 class Graphic3d_Array2OfVertexNT  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_Array2OfVertexNT(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/Graphic3d_ArrayOfPrimitives.lxx b/inc/Graphic3d_ArrayOfPrimitives.lxx
index 9296fae..bfaf413 100644
--- a/inc/Graphic3d_ArrayOfPrimitives.lxx
+++ b/inc/Graphic3d_ArrayOfPrimitives.lxx
@@ -98,9 +98,9 @@ inline void Graphic3d_ArrayOfPrimitives::SetVertexColor(
   }
 
   if( myPrimitiveArray->vcolours ) {
-    unsigned char red   = (unsigned char)(unsigned int)(R * 255.);
-    unsigned char green = (unsigned char)(unsigned int)(G * 255.);
-    unsigned char blue  = (unsigned char)(unsigned int)(B * 255.);
+    unsigned char red   = (unsigned char)(R <= 0. ? 0. : R >= 1. ? 255. : R * 255.);
+    unsigned char green = (unsigned char)(G <= 0. ? 0. : G >= 1. ? 255. : G * 255.);
+    unsigned char blue  = (unsigned char)(B <= 0. ? 0. : B >= 1. ? 255. : B * 255.);
     unsigned char alpha = 0;
     Standard_Integer outColor ;
     outColor = red;
diff --git a/inc/Graphic3d_AspectFillArea3d.hxx b/inc/Graphic3d_AspectFillArea3d.hxx
index e1ac2b0..39d124a 100644
--- a/inc/Graphic3d_AspectFillArea3d.hxx
+++ b/inc/Graphic3d_AspectFillArea3d.hxx
@@ -34,8 +34,8 @@
 #ifndef _Standard_Integer_HeaderFile
 #include <Standard_Integer.hxx>
 #endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
+#ifndef _Standard_ShortReal_HeaderFile
+#include <Standard_ShortReal.hxx>
 #endif
 #ifndef _Aspect_AspectFillArea_HeaderFile
 #include <Aspect_AspectFillArea.hxx>
@@ -46,6 +46,9 @@
 #ifndef _Aspect_TypeOfLine_HeaderFile
 #include <Aspect_TypeOfLine.hxx>
 #endif
+#ifndef _Standard_Real_HeaderFile
+#include <Standard_Real.hxx>
+#endif
 class Graphic3d_TextureMap;
 class Quantity_Color;
 class Graphic3d_MaterialAspect;
@@ -125,7 +128,7 @@ public:
 //!          offset = <aFactor> * m + <aUnits> * r, where <br>
 //!          m - maximum depth slope for the polygon currently being displayed, <br>
 //!          r - minimum window coordinates depth resolution (implementation-specific) <br>
-  Standard_EXPORT     void SetPolygonOffsets(const Standard_Integer aMode,const Standard_Real aFactor = 1.0,const Standard_Real aUnits = 0.0) ;
+  Standard_EXPORT     void SetPolygonOffsets(const Standard_Integer aMode,const Standard_ShortReal aFactor = 1.0,const Standard_ShortReal aUnits = 0.0) ;
   //! Returns the Back Face Removal status. <br>
 //!          Standard_True if SuppressBackFace is activated. <br>
   Standard_EXPORT     Standard_Boolean BackFace() const;
@@ -149,7 +152,7 @@ public:
 //!  for the polygons <br>
   Standard_EXPORT   static  Aspect_TypeOfDegenerateModel DefaultDegenerateModel(Quantity_Ratio& aRatio) ;
   //! Returns current polygon offsets settings. <br>
-  Standard_EXPORT     void PolygonOffsets(Standard_Integer& aMode,Standard_Real& aFactor,Standard_Real& aUnits) const;
+  Standard_EXPORT     void PolygonOffsets(Standard_Integer& aMode,Standard_ShortReal& aFactor,Standard_ShortReal& aUnits) const;
 
 
 
@@ -174,8 +177,8 @@ Graphic3d_MaterialAspect MyBackMaterial;
 Aspect_TypeOfDegenerateModel MyDegenerateModel;
 Quantity_Ratio MyDegenerateRatio;
 Standard_Integer MyPolygonOffsetMode;
-Standard_Real MyPolygonOffsetFactor;
-Standard_Real MyPolygonOffsetUnits;
+Standard_ShortReal MyPolygonOffsetFactor;
+Standard_ShortReal MyPolygonOffsetUnits;
 
 
 };
diff --git a/inc/Graphic3d_AspectText3d.hxx b/inc/Graphic3d_AspectText3d.hxx
index a3991c0..342e08f 100644
--- a/inc/Graphic3d_AspectText3d.hxx
+++ b/inc/Graphic3d_AspectText3d.hxx
@@ -34,8 +34,8 @@
 #ifndef _Standard_Boolean_HeaderFile
 #include <Standard_Boolean.hxx>
 #endif
-#ifndef _OSD_FontAspect_HeaderFile
-#include <OSD_FontAspect.hxx>
+#ifndef _Font_FontAspect_HeaderFile
+#include <Font_FontAspect.hxx>
 #endif
 #ifndef _MMgt_TShared_HeaderFile
 #include <MMgt_TShared.hxx>
@@ -95,9 +95,9 @@ public:
   //! Returns Angle of degree <br>
   Standard_EXPORT     Standard_Real GetTextAngle() const;
   //! Turns usage of Aspect text <br>
-  Standard_EXPORT     void SetTextFontAspect(const OSD_FontAspect AFontAspect) ;
+  Standard_EXPORT     void SetTextFontAspect(const Font_FontAspect AFontAspect) ;
   //! Returns text FontAspect <br>
-  Standard_EXPORT     OSD_FontAspect GetTextFontAspect() const;
+  Standard_EXPORT     Font_FontAspect GetTextFontAspect() const;
   //! Returns the current values of the group <me>. <br>
   Standard_EXPORT     void Values(Quantity_Color& AColor,Standard_CString& AFont,Standard_Real& AnExpansionFactor,Standard_Real& ASpace) const;
   //! Returns the current values of the group <me>. <br>
@@ -105,7 +105,7 @@ public:
   //! Returns the current values of the group <me>. <br>
   Standard_EXPORT     void Values(Quantity_Color& AColor,Standard_CString& AFont,Standard_Real& AnExpansionFactor,Standard_Real& ASpace,Aspect_TypeOfStyleText& AStyle,Aspect_TypeOfDisplayText& ADisplayType,Quantity_Color& AColorSubTitle,Standard_Boolean& ATextZoomable,Standard_Real& ATextAngle) const;
   //! Returns the current values of the group <me>. <br>
-  Standard_EXPORT     void Values(Quantity_Color& AColor,Standard_CString& AFont,Standard_Real& AnExpansionFactor,Standard_Real& ASpace,Aspect_TypeOfStyleText& AStyle,Aspect_TypeOfDisplayText& ADisplayType,Quantity_Color& AColorSubTitle,Standard_Boolean& ATextZoomable,Standard_Real& ATextAngle,OSD_FontAspect& ATextFontAspect) const;
+  Standard_EXPORT     void Values(Quantity_Color& AColor,Standard_CString& AFont,Standard_Real& AnExpansionFactor,Standard_Real& ASpace,Aspect_TypeOfStyleText& AStyle,Aspect_TypeOfDisplayText& ADisplayType,Quantity_Color& AColorSubTitle,Standard_Boolean& ATextZoomable,Standard_Real& ATextAngle,Font_FontAspect& ATextFontAspect) const;
 
 
 
@@ -129,7 +129,7 @@ Aspect_TypeOfDisplayText MyDisplayType;
 Quantity_Color MyColorSubTitle;
 Standard_Boolean MyTextZoomable;
 Standard_Real MyTextAngle;
-OSD_FontAspect MyTextFontAspect;
+Font_FontAspect MyTextFontAspect;
 
 
 };
diff --git a/inc/Graphic3d_BufferType.hxx b/inc/Graphic3d_BufferType.hxx
new file mode 100644
index 0000000..40c225c
--- /dev/null
+++ b/inc/Graphic3d_BufferType.hxx
@@ -0,0 +1,29 @@
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _Graphic3d_BufferType_H__
+#define _Graphic3d_BufferType_H__
+
+//! Define buffers available for dump
+typedef enum
+{
+  Graphic3d_BT_RGB,   //!< color buffer without alpha component
+  Graphic3d_BT_RGBA,  //!< color buffer
+  Graphic3d_BT_Depth  //!< depth buffer
+} Graphic3d_BufferType;
+
+#endif // _Graphic3d_BufferType_H__
diff --git a/inc/Graphic3d_CGraduatedTrihedron.hxx b/inc/Graphic3d_CGraduatedTrihedron.hxx
index 1426988..e34df4a 100644
--- a/inc/Graphic3d_CGraduatedTrihedron.hxx
+++ b/inc/Graphic3d_CGraduatedTrihedron.hxx
@@ -27,7 +27,7 @@
 #include <Quantity_Color.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
-#include <OSD_FontAspect.hxx>
+#include <Font_FontAspect.hxx>
 
 typedef void (*minMaxValuesCallback)(void*);
 class Graphic3d_CGraduatedTrihedron
@@ -65,13 +65,13 @@ class Graphic3d_CGraduatedTrihedron
     /* Font name of names of axes: Courier, Arial, ... */
     TCollection_AsciiString fontOfNames;
     /* Style of names of axes: OSD_FA_Regular, OSD_FA_Bold, ... */
-    OSD_FontAspect styleOfNames;
+    Font_FontAspect styleOfNames;
     /* Size of names of axes: 8, 10, 12, 14, ... */
     Standard_Integer sizeOfNames;
     /* Font name of values: Courier, Arial, ... */
     TCollection_AsciiString fontOfValues;
     /* Style of values: OSD_FA_Regular, OSD_FA_Bold, ... */
-    OSD_FontAspect styleOfValues;
+    Font_FontAspect styleOfValues;
     /* Size of values: 8, 10, 12, 14, ... */
     Standard_Integer sizeOfValues;
 
diff --git a/inc/Graphic3d_GraphicDriver.hxx b/inc/Graphic3d_GraphicDriver.hxx
index 8626014..065267b 100644
--- a/inc/Graphic3d_GraphicDriver.hxx
+++ b/inc/Graphic3d_GraphicDriver.hxx
@@ -118,8 +118,11 @@
 #ifndef _Graphic3d_PtrFrameBuffer_HeaderFile
 #include <Graphic3d_PtrFrameBuffer.hxx>
 #endif
-#ifndef _Image_CRawBufferData_HeaderFile
-#include <Image_CRawBufferData.hxx>
+#ifndef _Image_PixMap_HeaderFile
+#include <Image_PixMap.hxx>
+#endif
+#ifndef _Graphic3d_BufferType_HeaderFile
+#include <Graphic3d_BufferType.hxx>
 #endif
 #ifndef _Aspect_Handle_HeaderFile
 #include <Aspect_Handle.hxx>
@@ -418,7 +421,7 @@ public:
   //! Change offscreen FBO viewport. <br>
   Standard_EXPORT   virtual  void FBOChangeViewport(const Graphic3d_CView& view,Graphic3d_PtrFrameBuffer& fboPtr,const Standard_Integer width,const Standard_Integer height)  = 0;
   //! Dump active rendering buffer into specified memory buffer. <br>
-  Standard_EXPORT   virtual  Standard_Boolean BufferDump(const Graphic3d_CView& view,Image_CRawBufferData& buffer)  = 0;
+  Standard_EXPORT   virtual  Standard_Boolean BufferDump(const Graphic3d_CView& theCView,Image_PixMap& theImage,const Graphic3d_BufferType& theBufferType)  = 0;
   //! call_togl_gllight <br>
   Standard_EXPORT   virtual  void SetGLLightEnabled(const Graphic3d_CView& view,const Standard_Boolean isEnabled) const = 0;
   //! call_togl_isgllight <br>
diff --git a/inc/Graphic3d_ListIteratorOfListOfPArray.hxx b/inc/Graphic3d_ListIteratorOfListOfPArray.hxx
index 000656d..bf9d3b4 100644
--- a/inc/Graphic3d_ListIteratorOfListOfPArray.hxx
+++ b/inc/Graphic3d_ListIteratorOfListOfPArray.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Graphic3d_ListNodeOfListOfPArray;
 class Graphic3d_ListIteratorOfListOfPArray  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_ListIteratorOfListOfPArray();
diff --git a/inc/Graphic3d_ListIteratorOfListOfShortReal.hxx b/inc/Graphic3d_ListIteratorOfListOfShortReal.hxx
index 2446ea6..d7a2876 100644
--- a/inc/Graphic3d_ListIteratorOfListOfShortReal.hxx
+++ b/inc/Graphic3d_ListIteratorOfListOfShortReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Graphic3d_ListNodeOfListOfShortReal;
 class Graphic3d_ListIteratorOfListOfShortReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_ListIteratorOfListOfShortReal();
diff --git a/inc/Graphic3d_ListIteratorOfSetListOfSetOfGroup.hxx b/inc/Graphic3d_ListIteratorOfSetListOfSetOfGroup.hxx
index e1635f0..25944eb 100644
--- a/inc/Graphic3d_ListIteratorOfSetListOfSetOfGroup.hxx
+++ b/inc/Graphic3d_ListIteratorOfSetListOfSetOfGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Graphic3d_ListNodeOfSetListOfSetOfGroup;
 class Graphic3d_ListIteratorOfSetListOfSetOfGroup  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_ListIteratorOfSetListOfSetOfGroup();
diff --git a/inc/Graphic3d_ListOfPArray.hxx b/inc/Graphic3d_ListOfPArray.hxx
index 383c3cd..aa68b36 100644
--- a/inc/Graphic3d_ListOfPArray.hxx
+++ b/inc/Graphic3d_ListOfPArray.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Graphic3d_ListNodeOfListOfPArray;
 class Graphic3d_ListOfPArray  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_ListOfPArray();
diff --git a/inc/Graphic3d_ListOfShortReal.hxx b/inc/Graphic3d_ListOfShortReal.hxx
index e27a324..6e0c2c2 100644
--- a/inc/Graphic3d_ListOfShortReal.hxx
+++ b/inc/Graphic3d_ListOfShortReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Graphic3d_ListNodeOfListOfShortReal;
 class Graphic3d_ListOfShortReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_ListOfShortReal();
diff --git a/inc/Graphic3d_MapIteratorOfMapOfStructure.hxx b/inc/Graphic3d_MapIteratorOfMapOfStructure.hxx
index ea6fb8a..da96565 100644
--- a/inc/Graphic3d_MapIteratorOfMapOfStructure.hxx
+++ b/inc/Graphic3d_MapIteratorOfMapOfStructure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Graphic3d_StdMapNodeOfMapOfStructure;
 class Graphic3d_MapIteratorOfMapOfStructure  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_MapIteratorOfMapOfStructure();
diff --git a/inc/Graphic3d_MapOfStructure.hxx b/inc/Graphic3d_MapOfStructure.hxx
index 6349878..6f7d205 100644
--- a/inc/Graphic3d_MapOfStructure.hxx
+++ b/inc/Graphic3d_MapOfStructure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Graphic3d_MapIteratorOfMapOfStructure;
 class Graphic3d_MapOfStructure  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_MapOfStructure(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Graphic3d_MaterialAspect.hxx b/inc/Graphic3d_MaterialAspect.hxx
index 1ad23ec..d96dbca 100644
--- a/inc/Graphic3d_MaterialAspect.hxx
+++ b/inc/Graphic3d_MaterialAspect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class Quantity_Color;
 class Graphic3d_MaterialAspect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a material from default values. <br>
   Standard_EXPORT   Graphic3d_MaterialAspect();
diff --git a/inc/Graphic3d_SequenceOfAddress.hxx b/inc/Graphic3d_SequenceOfAddress.hxx
index 48161ab..6cae772 100644
--- a/inc/Graphic3d_SequenceOfAddress.hxx
+++ b/inc/Graphic3d_SequenceOfAddress.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Graphic3d_SequenceNodeOfSequenceOfAddress;
 class Graphic3d_SequenceOfAddress  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Graphic3d_SequenceOfAddress();
diff --git a/inc/Graphic3d_SequenceOfGroup.hxx b/inc/Graphic3d_SequenceOfGroup.hxx
index 4d112d7..a724bee 100644
--- a/inc/Graphic3d_SequenceOfGroup.hxx
+++ b/inc/Graphic3d_SequenceOfGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Graphic3d_SequenceNodeOfSequenceOfGroup;
 class Graphic3d_SequenceOfGroup  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Graphic3d_SequenceOfGroup();
diff --git a/inc/Graphic3d_SequenceOfStructure.hxx b/inc/Graphic3d_SequenceOfStructure.hxx
index 3451f6f..26bcad9 100644
--- a/inc/Graphic3d_SequenceOfStructure.hxx
+++ b/inc/Graphic3d_SequenceOfStructure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Graphic3d_SequenceNodeOfSequenceOfStructure;
 class Graphic3d_SequenceOfStructure  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Graphic3d_SequenceOfStructure();
diff --git a/inc/Graphic3d_SetIteratorOfSetOfGroup.hxx b/inc/Graphic3d_SetIteratorOfSetOfGroup.hxx
index c2bb74a..3c7b04c 100644
--- a/inc/Graphic3d_SetIteratorOfSetOfGroup.hxx
+++ b/inc/Graphic3d_SetIteratorOfSetOfGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Graphic3d_ListIteratorOfSetListOfSetOfGroup;
 class Graphic3d_SetIteratorOfSetOfGroup  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_SetIteratorOfSetOfGroup();
diff --git a/inc/Graphic3d_SetListOfSetOfGroup.hxx b/inc/Graphic3d_SetListOfSetOfGroup.hxx
index 672784c..0be04d0 100644
--- a/inc/Graphic3d_SetListOfSetOfGroup.hxx
+++ b/inc/Graphic3d_SetListOfSetOfGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Graphic3d_ListNodeOfSetListOfSetOfGroup;
 class Graphic3d_SetListOfSetOfGroup  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_SetListOfSetOfGroup();
diff --git a/inc/Graphic3d_SetOfGroup.hxx b/inc/Graphic3d_SetOfGroup.hxx
index 94b7e93..a288d18 100644
--- a/inc/Graphic3d_SetOfGroup.hxx
+++ b/inc/Graphic3d_SetOfGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Graphic3d_ListIteratorOfSetListOfSetOfGroup;
 class Graphic3d_SetOfGroup  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Graphic3d_SetOfGroup();
diff --git a/inc/Graphic3d_Strips.hxx b/inc/Graphic3d_Strips.hxx
index a121c88..9be05c6 100644
--- a/inc/Graphic3d_Strips.hxx
+++ b/inc/Graphic3d_Strips.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TColStd_SequenceOfInteger;
 class Graphic3d_Strips  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void STRIPT_INIT(const Standard_Integer NBVERTICES,const TColStd_Array1OfInteger& TABTRIANGLES) ;
diff --git a/inc/Graphic3d_Structure.hxx b/inc/Graphic3d_Structure.hxx
index b9eb507..d47758f 100644
--- a/inc/Graphic3d_Structure.hxx
+++ b/inc/Graphic3d_Structure.hxx
@@ -190,9 +190,11 @@ public:
 //!	    By default, <me> is not infinite but empty. <br>
   Standard_EXPORT     void SetInfiniteState(const Standard_Boolean AFlag) ;
   //! Modifies the order of displaying the structure. <br>
-//!	    Values are between 0 et 10. <br>
-//!	    The priority 10 being displayed first. <br>
-//!	    The default value is 5 <br>
+//!	    Values are between 0 and 10. <br>
+//!      Structures are drawn according to their display priorities <br>
+//!      in ascending order. <br>
+//!	    A structure of priority 10 is displayed the last and appears over the others. <br>
+//!	    The default value is 5. <br>
 //!  Category: Methods to modify the class definition <br>
 //!  Warning: If <me> is displayed then the SetDisplayPriority <br>
 //!	    method erase <me> and display <me> with the <br>
diff --git a/inc/Graphic3d_Vector.hxx b/inc/Graphic3d_Vector.hxx
index bf06e47..666411c 100644
--- a/inc/Graphic3d_Vector.hxx
+++ b/inc/Graphic3d_Vector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Graphic3d_Vertex;
 class Graphic3d_Vector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a vector with 1.0, 0.0, 0.0 coordinates. <br>
   Standard_EXPORT   Graphic3d_Vector();
diff --git a/inc/Graphic3d_Vertex.hxx b/inc/Graphic3d_Vertex.hxx
index e6d6cc0..87df45d 100644
--- a/inc/Graphic3d_Vertex.hxx
+++ b/inc/Graphic3d_Vertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@
 class Graphic3d_Vertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a point with 0.0, 0.0, 0.0 coordinates. <br>
   Standard_EXPORT   Graphic3d_Vertex();
diff --git a/inc/Graphic3d_VertexC.hxx b/inc/Graphic3d_VertexC.hxx
index 822cae0..e9d6057 100644
--- a/inc/Graphic3d_VertexC.hxx
+++ b/inc/Graphic3d_VertexC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Graphic3d_Vertex;
 class Graphic3d_VertexC  : public Graphic3d_Vertex {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty point <br>
   Standard_EXPORT   Graphic3d_VertexC();
diff --git a/inc/Graphic3d_VertexN.hxx b/inc/Graphic3d_VertexN.hxx
index 1ebb3db..1f4625c 100644
--- a/inc/Graphic3d_VertexN.hxx
+++ b/inc/Graphic3d_VertexN.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Graphic3d_Vector;
 class Graphic3d_VertexN  : public Graphic3d_Vertex {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a point with 0.0, 0.0, 0.0 coordinates <br>
 //!	    for which the normal is 0.0, 0.0, 1.0. <br>
diff --git a/inc/Graphic3d_VertexNC.hxx b/inc/Graphic3d_VertexNC.hxx
index 8392715..55662ea 100644
--- a/inc/Graphic3d_VertexNC.hxx
+++ b/inc/Graphic3d_VertexNC.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Graphic3d_Vector;
 class Graphic3d_VertexNC  : public Graphic3d_VertexN {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a point with coordinates 0.0, 0.0, 0.0 <br>
 //!	    for which the normal is 0.0, 0.0, 1.0 and <br>
diff --git a/inc/Graphic3d_VertexNT.hxx b/inc/Graphic3d_VertexNT.hxx
index 529515f..d3ebbe0 100644
--- a/inc/Graphic3d_VertexNT.hxx
+++ b/inc/Graphic3d_VertexNT.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Graphic3d_Vector;
 class Graphic3d_VertexNT  : public Graphic3d_VertexN {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a point with 0.0, 0.0, 0.0 coordinates <br>
 //!	    for which the normal is 0.0, 0.0, 1.0. <br>
diff --git a/inc/HLRAlgo.hxx b/inc/HLRAlgo.hxx
index 473183f..ec2b279 100644
--- a/inc/HLRAlgo.hxx
+++ b/inc/HLRAlgo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -77,18 +80,7 @@ class HLRAlgo_ListIteratorOfInterferenceList;
 class HLRAlgo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void UpdateMinMax(const Standard_Real x,const Standard_Real y,const Standard_Real z,const Standard_Address Min,const Standard_Address Max) ;
diff --git a/inc/HLRAlgo_Array1OfPHDat.hxx b/inc/HLRAlgo_Array1OfPHDat.hxx
index 2d4ab4a..3300282 100644
--- a/inc/HLRAlgo_Array1OfPHDat.hxx
+++ b/inc/HLRAlgo_Array1OfPHDat.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class HLRAlgo_PolyHidingData;
 class HLRAlgo_Array1OfPHDat  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_Array1OfPHDat(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/HLRAlgo_Array1OfPINod.hxx b/inc/HLRAlgo_Array1OfPINod.hxx
index d3b90b2..bebb58c 100644
--- a/inc/HLRAlgo_Array1OfPINod.hxx
+++ b/inc/HLRAlgo_Array1OfPINod.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class HLRAlgo_PolyInternalNode;
 class HLRAlgo_Array1OfPINod  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_Array1OfPINod(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/HLRAlgo_Array1OfPISeg.hxx b/inc/HLRAlgo_Array1OfPISeg.hxx
index 45cf2fd..fdbeb55 100644
--- a/inc/HLRAlgo_Array1OfPISeg.hxx
+++ b/inc/HLRAlgo_Array1OfPISeg.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class HLRAlgo_PolyInternalSegment;
 class HLRAlgo_Array1OfPISeg  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_Array1OfPISeg(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/HLRAlgo_Array1OfTData.hxx b/inc/HLRAlgo_Array1OfTData.hxx
index 386419a..67028b2 100644
--- a/inc/HLRAlgo_Array1OfTData.hxx
+++ b/inc/HLRAlgo_Array1OfTData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class HLRAlgo_TriangleData;
 class HLRAlgo_Array1OfTData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_Array1OfTData(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/HLRAlgo_BiPoint.hxx b/inc/HLRAlgo_BiPoint.hxx
index 5a9b528..e9238e8 100644
--- a/inc/HLRAlgo_BiPoint.hxx
+++ b/inc/HLRAlgo_BiPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@
 class HLRAlgo_BiPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HLRAlgo_BiPoint();
diff --git a/inc/HLRAlgo_Coincidence.hxx b/inc/HLRAlgo_Coincidence.hxx
index 8f8a26d..622f973 100644
--- a/inc/HLRAlgo_Coincidence.hxx
+++ b/inc/HLRAlgo_Coincidence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@
 class HLRAlgo_Coincidence  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_Coincidence();
diff --git a/inc/HLRAlgo_EdgeIterator.hxx b/inc/HLRAlgo_EdgeIterator.hxx
index 30de960..e0e4def 100644
--- a/inc/HLRAlgo_EdgeIterator.hxx
+++ b/inc/HLRAlgo_EdgeIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class HLRAlgo_EdgeStatus;
 class HLRAlgo_EdgeIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Iterator  on the  visible or  hidden  parts of  an <br>
 //!          edge. <br>
diff --git a/inc/HLRAlgo_EdgeStatus.hxx b/inc/HLRAlgo_EdgeStatus.hxx
index f2ce109..53af9c7 100644
--- a/inc/HLRAlgo_EdgeStatus.hxx
+++ b/inc/HLRAlgo_EdgeStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Standard_OutOfRange;
 class HLRAlgo_EdgeStatus  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_EdgeStatus();
diff --git a/inc/HLRAlgo_Interference.hxx b/inc/HLRAlgo_Interference.hxx
index 07a112a..15f3af2 100644
--- a/inc/HLRAlgo_Interference.hxx
+++ b/inc/HLRAlgo_Interference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class HLRAlgo_Coincidence;
 class HLRAlgo_Interference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_Interference();
diff --git a/inc/HLRAlgo_InterferenceList.hxx b/inc/HLRAlgo_InterferenceList.hxx
index f73fa81..0f4b3a8 100644
--- a/inc/HLRAlgo_InterferenceList.hxx
+++ b/inc/HLRAlgo_InterferenceList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class HLRAlgo_ListNodeOfInterferenceList;
 class HLRAlgo_InterferenceList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_InterferenceList();
diff --git a/inc/HLRAlgo_Intersection.hxx b/inc/HLRAlgo_Intersection.hxx
index 7c66700..04e1a4d 100644
--- a/inc/HLRAlgo_Intersection.hxx
+++ b/inc/HLRAlgo_Intersection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@
 class HLRAlgo_Intersection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_Intersection();
diff --git a/inc/HLRAlgo_ListIteratorOfInterferenceList.hxx b/inc/HLRAlgo_ListIteratorOfInterferenceList.hxx
index 7febd5d..532863a 100644
--- a/inc/HLRAlgo_ListIteratorOfInterferenceList.hxx
+++ b/inc/HLRAlgo_ListIteratorOfInterferenceList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class HLRAlgo_ListNodeOfInterferenceList;
 class HLRAlgo_ListIteratorOfInterferenceList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_ListIteratorOfInterferenceList();
diff --git a/inc/HLRAlgo_ListIteratorOfListOfBPoint.hxx b/inc/HLRAlgo_ListIteratorOfListOfBPoint.hxx
index 9ec00d7..1db4659 100644
--- a/inc/HLRAlgo_ListIteratorOfListOfBPoint.hxx
+++ b/inc/HLRAlgo_ListIteratorOfListOfBPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class HLRAlgo_ListNodeOfListOfBPoint;
 class HLRAlgo_ListIteratorOfListOfBPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_ListIteratorOfListOfBPoint();
diff --git a/inc/HLRAlgo_ListOfBPoint.hxx b/inc/HLRAlgo_ListOfBPoint.hxx
index 00bc031..9a0d806 100644
--- a/inc/HLRAlgo_ListOfBPoint.hxx
+++ b/inc/HLRAlgo_ListOfBPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class HLRAlgo_ListNodeOfListOfBPoint;
 class HLRAlgo_ListOfBPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_ListOfBPoint();
diff --git a/inc/HLRAlgo_PolyHidingData.hxx b/inc/HLRAlgo_PolyHidingData.hxx
index 9e40215..1d6b248 100644
--- a/inc/HLRAlgo_PolyHidingData.hxx
+++ b/inc/HLRAlgo_PolyHidingData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class HLRAlgo_PolyHidingData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HLRAlgo_PolyHidingData();
diff --git a/inc/HLRAlgo_PolyInternalSegment.hxx b/inc/HLRAlgo_PolyInternalSegment.hxx
index a4ddb71..dcb19fd 100644
--- a/inc/HLRAlgo_PolyInternalSegment.hxx
+++ b/inc/HLRAlgo_PolyInternalSegment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class HLRAlgo_PolyInternalSegment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HLRAlgo_PolyInternalSegment();
diff --git a/inc/HLRAlgo_Projector.hxx b/inc/HLRAlgo_Projector.hxx
index 1ab7ad5..a243c39 100644
--- a/inc/HLRAlgo_Projector.hxx
+++ b/inc/HLRAlgo_Projector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class gp_Lin;
 class HLRAlgo_Projector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRAlgo_Projector();
diff --git a/inc/HLRAlgo_TriangleData.hxx b/inc/HLRAlgo_TriangleData.hxx
index 961d1da..4cbc6e2 100644
--- a/inc/HLRAlgo_TriangleData.hxx
+++ b/inc/HLRAlgo_TriangleData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class HLRAlgo_TriangleData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HLRAlgo_TriangleData();
diff --git a/inc/HLRBRep.hxx b/inc/HLRBRep.hxx
index ac1824b..e0554a3 100644
--- a/inc/HLRBRep.hxx
+++ b/inc/HLRBRep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -95,18 +98,7 @@ class HLRBRep_ListIteratorOfListOfBPnt2D;
 class HLRBRep  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  TopoDS_Edge MakeEdge(const HLRBRep_Curve& ec,const Standard_Real U1,const Standard_Real U2) ;
diff --git a/inc/HLRBRep_Array1OfEData.hxx b/inc/HLRBRep_Array1OfEData.hxx
index f9ab5e1..8ee8b86 100644
--- a/inc/HLRBRep_Array1OfEData.hxx
+++ b/inc/HLRBRep_Array1OfEData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class HLRBRep_EdgeData;
 class HLRBRep_Array1OfEData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_Array1OfEData(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/HLRBRep_Array1OfFData.hxx b/inc/HLRBRep_Array1OfFData.hxx
index 660488a..e25e593 100644
--- a/inc/HLRBRep_Array1OfFData.hxx
+++ b/inc/HLRBRep_Array1OfFData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class HLRBRep_FaceData;
 class HLRBRep_Array1OfFData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_Array1OfFData(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/HLRBRep_BCurveTool.hxx b/inc/HLRBRep_BCurveTool.hxx
index 4fdf0f2..e710d57 100644
--- a/inc/HLRBRep_BCurveTool.hxx
+++ b/inc/HLRBRep_BCurveTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -71,18 +74,7 @@ class TColgp_Array1OfPnt;
 class HLRBRep_BCurveTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstParameter(const BRepAdaptor_Curve& C) ;
diff --git a/inc/HLRBRep_BSurfaceTool.hxx b/inc/HLRBRep_BSurfaceTool.hxx
index 403f488..0aebac7 100644
--- a/inc/HLRBRep_BSurfaceTool.hxx
+++ b/inc/HLRBRep_BSurfaceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -83,18 +86,7 @@ class Adaptor3d_HCurve;
 class HLRBRep_BSurfaceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstUParameter(const BRepAdaptor_Surface& S) ;
diff --git a/inc/HLRBRep_BiPnt2D.hxx b/inc/HLRBRep_BiPnt2D.hxx
index 4381dc1..2d27d95 100644
--- a/inc/HLRBRep_BiPnt2D.hxx
+++ b/inc/HLRBRep_BiPnt2D.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Pnt2d;
 class HLRBRep_BiPnt2D  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_BiPnt2D();
diff --git a/inc/HLRBRep_BiPoint.hxx b/inc/HLRBRep_BiPoint.hxx
index 6f55727..b66f14c 100644
--- a/inc/HLRBRep_BiPoint.hxx
+++ b/inc/HLRBRep_BiPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Pnt;
 class HLRBRep_BiPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_BiPoint();
diff --git a/inc/HLRBRep_CInter.hxx b/inc/HLRBRep_CInter.hxx
index e5391b6..8e23271 100644
--- a/inc/HLRBRep_CInter.hxx
+++ b/inc/HLRBRep_CInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class TColStd_Array1OfReal;
 class HLRBRep_CInter  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HLRBRep_CInter();
diff --git a/inc/HLRBRep_CLProps.hxx b/inc/HLRBRep_CLProps.hxx
index d6d1f98..0d6cda4 100644
--- a/inc/HLRBRep_CLProps.hxx
+++ b/inc/HLRBRep_CLProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class HLRBRep_CLPropsATool;
 class HLRBRep_CLProps  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_CLProps(const Standard_Address& C,const Standard_Integer N,const Standard_Real Resolution);
diff --git a/inc/HLRBRep_CLPropsATool.hxx b/inc/HLRBRep_CLPropsATool.hxx
index 795a7d2..8761679 100644
--- a/inc/HLRBRep_CLPropsATool.hxx
+++ b/inc/HLRBRep_CLPropsATool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Vec2d;
 class HLRBRep_CLPropsATool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the  point <P> of  parameter <U>   on the <br>
 //!          Curve from HLRBRep <C>. <br>
diff --git a/inc/HLRBRep_Curve.hxx b/inc/HLRBRep_Curve.hxx
index 78377e3..dd8afec 100644
--- a/inc/HLRBRep_Curve.hxx
+++ b/inc/HLRBRep_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class TColStd_Array1OfInteger;
 class HLRBRep_Curve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an undefined Curve. <br>
   Standard_EXPORT   HLRBRep_Curve();
diff --git a/inc/HLRBRep_CurveTool.hxx b/inc/HLRBRep_CurveTool.hxx
index 43e9969..93fd923 100644
--- a/inc/HLRBRep_CurveTool.hxx
+++ b/inc/HLRBRep_CurveTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -72,18 +75,7 @@ class Geom2d_BSplineCurve;
 class HLRBRep_CurveTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstParameter(const Standard_Address C) ;
diff --git a/inc/HLRBRep_EdgeBuilder.hxx b/inc/HLRBRep_EdgeBuilder.hxx
index 44ab3ca..1a57a08 100644
--- a/inc/HLRBRep_EdgeBuilder.hxx
+++ b/inc/HLRBRep_EdgeBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class HLRAlgo_Intersection;
 class HLRBRep_EdgeBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates  an   EdgeBuilder    algorithm.    <VList> <br>
 //!          describes   the edge    and  the    interferences. <br>
diff --git a/inc/HLRBRep_EdgeData.hxx b/inc/HLRBRep_EdgeData.hxx
index 436b37a..3558db4 100644
--- a/inc/HLRBRep_EdgeData.hxx
+++ b/inc/HLRBRep_EdgeData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class HLRBRep_Curve;
 class HLRBRep_EdgeData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_EdgeData();
diff --git a/inc/HLRBRep_EdgeFaceTool.hxx b/inc/HLRBRep_EdgeFaceTool.hxx
index 18de52d..39154a8 100644
--- a/inc/HLRBRep_EdgeFaceTool.hxx
+++ b/inc/HLRBRep_EdgeFaceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Dir;
 class HLRBRep_EdgeFaceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Real CurvatureValue(const Standard_Address F,const Standard_Real U,const Standard_Real V,const gp_Dir& Tg) ;
diff --git a/inc/HLRBRep_EdgeIList.hxx b/inc/HLRBRep_EdgeIList.hxx
index 861d351..3543add 100644
--- a/inc/HLRBRep_EdgeIList.hxx
+++ b/inc/HLRBRep_EdgeIList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@ class HLRBRep_EdgeInterferenceTool;
 class HLRBRep_EdgeIList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Add the interference <I> to the list <IL>. <br>
   Standard_EXPORT   static  void AddInterference(HLRAlgo_InterferenceList& IL,const HLRAlgo_Interference& I,const HLRBRep_EdgeInterferenceTool& T) ;
diff --git a/inc/HLRBRep_EdgeInterferenceTool.hxx b/inc/HLRBRep_EdgeInterferenceTool.hxx
index 5022b68..73706ff 100644
--- a/inc/HLRBRep_EdgeInterferenceTool.hxx
+++ b/inc/HLRBRep_EdgeInterferenceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class HLRAlgo_Interference;
 class HLRBRep_EdgeInterferenceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_EdgeInterferenceTool(const Handle(HLRBRep_Data)& DS);
diff --git a/inc/HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter.hxx b/inc/HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter.hxx
index ed94036..1e0da63 100644
--- a/inc/HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter.hxx
+++ b/inc/HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter;
 class HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter(const Standard_Address& C1,const Standard_Address& C2,const Standard_Real Tol);
diff --git a/inc/HLRBRep_FaceData.hxx b/inc/HLRBRep_FaceData.hxx
index 4fc3df7..511c6ed 100644
--- a/inc/HLRBRep_FaceData.hxx
+++ b/inc/HLRBRep_FaceData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class HLRBRep_Surface;
 class HLRBRep_FaceData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_FaceData();
diff --git a/inc/HLRBRep_FaceIterator.hxx b/inc/HLRBRep_FaceIterator.hxx
index 094affa..b8935a9 100644
--- a/inc/HLRBRep_FaceIterator.hxx
+++ b/inc/HLRBRep_FaceIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class HLRBRep_FaceData;
 class HLRBRep_FaceIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_FaceIterator();
diff --git a/inc/HLRBRep_HLRToShape.hxx b/inc/HLRBRep_HLRToShape.hxx
index 71f7344..d650789 100644
--- a/inc/HLRBRep_HLRToShape.hxx
+++ b/inc/HLRBRep_HLRToShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class HLRBRep_EdgeData;
 class HLRBRep_HLRToShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a framework for filtering the <br>
 //! results of the HLRBRep_Algo algorithm, A. <br>
diff --git a/inc/HLRBRep_Hider.hxx b/inc/HLRBRep_Hider.hxx
index 9932ae7..ae00a58 100644
--- a/inc/HLRBRep_Hider.hxx
+++ b/inc/HLRBRep_Hider.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class BRepTopAdaptor_MapOfShapeTool;
 class HLRBRep_Hider  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Hider processing  the set  of  Edges and <br>
 //!          hiding faces described by <DS>.  Stores the hidden <br>
diff --git a/inc/HLRBRep_IntConicCurveOfCInter.hxx b/inc/HLRBRep_IntConicCurveOfCInter.hxx
index 066ab60..4040a3b 100644
--- a/inc/HLRBRep_IntConicCurveOfCInter.hxx
+++ b/inc/HLRBRep_IntConicCurveOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Hypr2d;
 class HLRBRep_IntConicCurveOfCInter  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_IntConicCurveOfCInter();
diff --git a/inc/HLRBRep_InterCSurf.hxx b/inc/HLRBRep_InterCSurf.hxx
index e9032a6..9e502e7 100644
--- a/inc/HLRBRep_InterCSurf.hxx
+++ b/inc/HLRBRep_InterCSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TColStd_Array1OfReal;
 class HLRBRep_InterCSurf  : public IntCurveSurface_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_InterCSurf();
diff --git a/inc/HLRBRep_Intersector.hxx b/inc/HLRBRep_Intersector.hxx
index 4986296..5ee06eb 100644
--- a/inc/HLRBRep_Intersector.hxx
+++ b/inc/HLRBRep_Intersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class IntCurveSurface_IntersectionSegment;
 class HLRBRep_Intersector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_Intersector();
diff --git a/inc/HLRBRep_LineTool.hxx b/inc/HLRBRep_LineTool.hxx
index dbc22c6..67cb5f9 100644
--- a/inc/HLRBRep_LineTool.hxx
+++ b/inc/HLRBRep_LineTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -77,18 +80,7 @@ class TColStd_HArray1OfReal;
 class HLRBRep_LineTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstParameter(const gp_Lin& C) ;
diff --git a/inc/HLRBRep_ListIteratorOfListOfBPnt2D.hxx b/inc/HLRBRep_ListIteratorOfListOfBPnt2D.hxx
index ed17e7d..b23a160 100644
--- a/inc/HLRBRep_ListIteratorOfListOfBPnt2D.hxx
+++ b/inc/HLRBRep_ListIteratorOfListOfBPnt2D.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class HLRBRep_ListNodeOfListOfBPnt2D;
 class HLRBRep_ListIteratorOfListOfBPnt2D  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_ListIteratorOfListOfBPnt2D();
diff --git a/inc/HLRBRep_ListIteratorOfListOfBPoint.hxx b/inc/HLRBRep_ListIteratorOfListOfBPoint.hxx
index 8fbb1eb..eb7a8e5 100644
--- a/inc/HLRBRep_ListIteratorOfListOfBPoint.hxx
+++ b/inc/HLRBRep_ListIteratorOfListOfBPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class HLRBRep_ListNodeOfListOfBPoint;
 class HLRBRep_ListIteratorOfListOfBPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_ListIteratorOfListOfBPoint();
diff --git a/inc/HLRBRep_ListOfBPnt2D.hxx b/inc/HLRBRep_ListOfBPnt2D.hxx
index 7720e45..c5d49d3 100644
--- a/inc/HLRBRep_ListOfBPnt2D.hxx
+++ b/inc/HLRBRep_ListOfBPnt2D.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class HLRBRep_ListNodeOfListOfBPnt2D;
 class HLRBRep_ListOfBPnt2D  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_ListOfBPnt2D();
diff --git a/inc/HLRBRep_ListOfBPoint.hxx b/inc/HLRBRep_ListOfBPoint.hxx
index 24974a0..62d40f1 100644
--- a/inc/HLRBRep_ListOfBPoint.hxx
+++ b/inc/HLRBRep_ListOfBPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class HLRBRep_ListNodeOfListOfBPoint;
 class HLRBRep_ListOfBPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_ListOfBPoint();
diff --git a/inc/HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter.hxx b/inc/HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter.hxx
index 6b2793f..57c6424 100644
--- a/inc/HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter.hxx
+++ b/inc/HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class HLRBRep_CurveTool;
 class HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter(const IntCurve_IConicTool& IT,const Standard_Address& PC);
diff --git a/inc/HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx b/inc/HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx
index 9b62d48..7f652c6 100644
--- a/inc/HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx
+++ b/inc/HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class HLRBRep_SequenceNodeOfSeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter;
 class HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter();
diff --git a/inc/HLRBRep_PolyHLRToShape.hxx b/inc/HLRBRep_PolyHLRToShape.hxx
index 49bd742..fcc95f0 100644
--- a/inc/HLRBRep_PolyHLRToShape.hxx
+++ b/inc/HLRBRep_PolyHLRToShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -62,18 +65,7 @@ class TopoDS_Shape;
 class HLRBRep_PolyHLRToShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a framework for filtering the results <br>
 //! of the HLRBRep_Algo algorithm, A. <br>
diff --git a/inc/HLRBRep_SLProps.hxx b/inc/HLRBRep_SLProps.hxx
index 4cd4373..ad1da10 100644
--- a/inc/HLRBRep_SLProps.hxx
+++ b/inc/HLRBRep_SLProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class gp_Dir;
 class HLRBRep_SLProps  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_SLProps(const Standard_Address& S,const Standard_Real U,const Standard_Real V,const Standard_Integer N,const Standard_Real Resolution);
diff --git a/inc/HLRBRep_SLPropsATool.hxx b/inc/HLRBRep_SLPropsATool.hxx
index e4e6a3b..062fa69 100644
--- a/inc/HLRBRep_SLPropsATool.hxx
+++ b/inc/HLRBRep_SLPropsATool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Vec;
 class HLRBRep_SLPropsATool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the point  <P> of 	parameter <U> and <V> <br>
 //!          on the Surface <A>. <br>
diff --git a/inc/HLRBRep_SeqOfShapeBounds.hxx b/inc/HLRBRep_SeqOfShapeBounds.hxx
index 475f9ff..5dad232 100644
--- a/inc/HLRBRep_SeqOfShapeBounds.hxx
+++ b/inc/HLRBRep_SeqOfShapeBounds.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class HLRBRep_SequenceNodeOfSeqOfShapeBounds;
 class HLRBRep_SeqOfShapeBounds  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HLRBRep_SeqOfShapeBounds();
diff --git a/inc/HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx b/inc/HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx
index db78629..32f4615 100644
--- a/inc/HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx
+++ b/inc/HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class HLRBRep_SequenceNodeOfSeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter;
 class HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter();
diff --git a/inc/HLRBRep_ShapeBounds.hxx b/inc/HLRBRep_ShapeBounds.hxx
index 1148a7f..00b3519 100644
--- a/inc/HLRBRep_ShapeBounds.hxx
+++ b/inc/HLRBRep_ShapeBounds.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class MMgt_TShared;
 class HLRBRep_ShapeBounds  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HLRBRep_ShapeBounds();
diff --git a/inc/HLRBRep_ShapeToHLR.hxx b/inc/HLRBRep_ShapeToHLR.hxx
index b6b1ce9..ef3c03d 100644
--- a/inc/HLRBRep_ShapeToHLR.hxx
+++ b/inc/HLRBRep_ShapeToHLR.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TopoDS_Face;
 class HLRBRep_ShapeToHLR  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates  a DataStructure   containing the OutLiner <br>
 //!          <S> depending on the projector <P> and nbIso. <br>
diff --git a/inc/HLRBRep_Surface.hxx b/inc/HLRBRep_Surface.hxx
index bc89254..0dca6a7 100644
--- a/inc/HLRBRep_Surface.hxx
+++ b/inc/HLRBRep_Surface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class gp_Pln;
 class HLRBRep_Surface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an undefined surface with no face loaded. <br>
   Standard_EXPORT   HLRBRep_Surface();
diff --git a/inc/HLRBRep_SurfaceTool.hxx b/inc/HLRBRep_SurfaceTool.hxx
index a672fbe..87f45ed 100644
--- a/inc/HLRBRep_SurfaceTool.hxx
+++ b/inc/HLRBRep_SurfaceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -85,18 +88,7 @@ class Adaptor3d_HCurve;
 class HLRBRep_SurfaceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstUParameter(const Standard_Address S) ;
diff --git a/inc/HLRBRep_TheCSFunctionOfInterCSurf.hxx b/inc/HLRBRep_TheCSFunctionOfInterCSurf.hxx
index 791a9d6..c43074f 100644
--- a/inc/HLRBRep_TheCSFunctionOfInterCSurf.hxx
+++ b/inc/HLRBRep_TheCSFunctionOfInterCSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class gp_Pnt;
 class HLRBRep_TheCSFunctionOfInterCSurf  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_TheCSFunctionOfInterCSurf(const Standard_Address& S,const gp_Lin& C);
diff --git a/inc/HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx b/inc/HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx
index 5073015..0545594 100644
--- a/inc/HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx
+++ b/inc/HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_Pnt2d;
 class HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Locate(const gp_Pnt2d& P,const Standard_Address& C,const Standard_Integer NbU,Extrema_POnCurv2d& Papp) ;
diff --git a/inc/HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx b/inc/HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx
index 68338c3..ad265f5 100644
--- a/inc/HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx
+++ b/inc/HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class math_Matrix;
 class HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter(const Standard_Address& curve1,const Standard_Address& curve2);
diff --git a/inc/HLRBRep_TheExactInterCSurf.hxx b/inc/HLRBRep_TheExactInterCSurf.hxx
index d6f7947..02eb1e2 100644
--- a/inc/HLRBRep_TheExactInterCSurf.hxx
+++ b/inc/HLRBRep_TheExactInterCSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Pnt;
 class HLRBRep_TheExactInterCSurf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_TheExactInterCSurf(const Standard_Real U,const Standard_Real V,const Standard_Real W,const HLRBRep_TheCSFunctionOfInterCSurf& F,const Standard_Real TolTangency,const Standard_Real MarginCoef = 0.0);
diff --git a/inc/HLRBRep_TheIntConicCurveOfCInter.hxx b/inc/HLRBRep_TheIntConicCurveOfCInter.hxx
index 235d7c4..bd8d439 100644
--- a/inc/HLRBRep_TheIntConicCurveOfCInter.hxx
+++ b/inc/HLRBRep_TheIntConicCurveOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Hypr2d;
 class HLRBRep_TheIntConicCurveOfCInter  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HLRBRep_TheIntConicCurveOfCInter();
diff --git a/inc/HLRBRep_TheIntPCurvePCurveOfCInter.hxx b/inc/HLRBRep_TheIntPCurvePCurveOfCInter.hxx
index ca386e7..65e9a88 100644
--- a/inc/HLRBRep_TheIntPCurvePCurveOfCInter.hxx
+++ b/inc/HLRBRep_TheIntPCurvePCurveOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class IntRes2d_Domain;
 class HLRBRep_TheIntPCurvePCurveOfCInter  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_TheIntPCurvePCurveOfCInter();
diff --git a/inc/HLRBRep_TheInterferenceOfInterCSurf.hxx b/inc/HLRBRep_TheInterferenceOfInterCSurf.hxx
index 45cf509..9759264 100644
--- a/inc/HLRBRep_TheInterferenceOfInterCSurf.hxx
+++ b/inc/HLRBRep_TheInterferenceOfInterCSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class gp_XYZ;
 class HLRBRep_TheInterferenceOfInterCSurf  : public Intf_Interference {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_TheInterferenceOfInterCSurf();
diff --git a/inc/HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter.hxx b/inc/HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter.hxx
index ec5460a..28849ee 100644
--- a/inc/HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter.hxx
+++ b/inc/HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TColStd_Array1OfReal;
 class HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter();
diff --git a/inc/HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx b/inc/HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx
index 7f9e7a5..9bfdf10 100644
--- a/inc/HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx
+++ b/inc/HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter;
 class HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter();
diff --git a/inc/HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx b/inc/HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx
index 4467844..ac89e56 100644
--- a/inc/HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx
+++ b/inc/HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class gp_Pnt2d;
 class HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter  : public Intf_Polygon2d {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter(const Standard_Address& Curve,const Standard_Integer NbPnt,const IntRes2d_Domain& Domain,const Standard_Real Tol);
diff --git a/inc/HLRBRep_ThePolygonOfInterCSurf.hxx b/inc/HLRBRep_ThePolygonOfInterCSurf.hxx
index a66e79c..dbe0aa3 100644
--- a/inc/HLRBRep_ThePolygonOfInterCSurf.hxx
+++ b/inc/HLRBRep_ThePolygonOfInterCSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class gp_Pnt;
 class HLRBRep_ThePolygonOfInterCSurf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_ThePolygonOfInterCSurf(const gp_Lin& Curve,const Standard_Integer NbPnt);
diff --git a/inc/HLRBRep_ThePolygonToolOfInterCSurf.hxx b/inc/HLRBRep_ThePolygonToolOfInterCSurf.hxx
index d5fcec8..685c2cd 100644
--- a/inc/HLRBRep_ThePolygonToolOfInterCSurf.hxx
+++ b/inc/HLRBRep_ThePolygonToolOfInterCSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Bnd_Box;
 class HLRBRep_ThePolygonToolOfInterCSurf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static const Bnd_Box& Bounding(const HLRBRep_ThePolygonOfInterCSurf& thePolygon) ;
diff --git a/inc/HLRBRep_ThePolyhedronOfInterCSurf.hxx b/inc/HLRBRep_ThePolyhedronOfInterCSurf.hxx
index 03fbb1c..0e700b5 100644
--- a/inc/HLRBRep_ThePolyhedronOfInterCSurf.hxx
+++ b/inc/HLRBRep_ThePolyhedronOfInterCSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class gp_XYZ;
 class HLRBRep_ThePolyhedronOfInterCSurf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_ThePolyhedronOfInterCSurf(const Standard_Address& Surface,const Standard_Integer nbdU,const Standard_Integer nbdV,const Standard_Real U1,const Standard_Real V1,const Standard_Real U2,const Standard_Real V2);
diff --git a/inc/HLRBRep_ThePolyhedronToolOfInterCSurf.hxx b/inc/HLRBRep_ThePolyhedronToolOfInterCSurf.hxx
index 310c2ec..0617a01 100644
--- a/inc/HLRBRep_ThePolyhedronToolOfInterCSurf.hxx
+++ b/inc/HLRBRep_ThePolyhedronToolOfInterCSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_Pnt;
 class HLRBRep_ThePolyhedronToolOfInterCSurf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static const Bnd_Box& Bounding(const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh) ;
diff --git a/inc/HLRBRep_TheProjPCurOfCInter.hxx b/inc/HLRBRep_TheProjPCurOfCInter.hxx
index 3ebd9ad..05bb9ae 100644
--- a/inc/HLRBRep_TheProjPCurOfCInter.hxx
+++ b/inc/HLRBRep_TheProjPCurOfCInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Pnt2d;
 class HLRBRep_TheProjPCurOfCInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Real FindParameter(const Standard_Address& C,const gp_Pnt2d& Pnt,const Standard_Real Tol) ;
diff --git a/inc/HLRBRep_TheQuadCurvExactInterCSurf.hxx b/inc/HLRBRep_TheQuadCurvExactInterCSurf.hxx
index 27942c3..5c9645c 100644
--- a/inc/HLRBRep_TheQuadCurvExactInterCSurf.hxx
+++ b/inc/HLRBRep_TheQuadCurvExactInterCSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf;
 class HLRBRep_TheQuadCurvExactInterCSurf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_TheQuadCurvExactInterCSurf(const Standard_Address& S,const gp_Lin& C);
diff --git a/inc/HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf.hxx b/inc/HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf.hxx
index 902dd43..35cb38f 100644
--- a/inc/HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf.hxx
+++ b/inc/HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class HLRBRep_LineTool;
 class HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf(const IntSurf_Quadric& Q,const gp_Lin& C);
diff --git a/inc/HLRBRep_VertexList.hxx b/inc/HLRBRep_VertexList.hxx
index aa63e30..950ec68 100644
--- a/inc/HLRBRep_VertexList.hxx
+++ b/inc/HLRBRep_VertexList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class HLRAlgo_Intersection;
 class HLRBRep_VertexList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRBRep_VertexList(const HLRBRep_EdgeInterferenceTool& T,const HLRAlgo_ListIteratorOfInterferenceList& I);
diff --git a/inc/HLRTest.hxx b/inc/HLRTest.hxx
index 2799db4..c80ca16 100644
--- a/inc/HLRTest.hxx
+++ b/inc/HLRTest.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class HLRTest_OutLiner;
 class HLRTest  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Set a Projector Variable <br>
   Standard_EXPORT   static  void Set(const Standard_CString Name,const HLRAlgo_Projector& P) ;
diff --git a/inc/HLRTopoBRep_DSFiller.hxx b/inc/HLRTopoBRep_DSFiller.hxx
index ddcda73..dbe35be 100644
--- a/inc/HLRTopoBRep_DSFiller.hxx
+++ b/inc/HLRTopoBRep_DSFiller.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopoDS_Edge;
 class HLRTopoBRep_DSFiller  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Stores in <DS> the outlines of  <S> using the current <br>
 //!          outliner and stores the isolines in <DS> using a Hatcher. <br>
diff --git a/inc/HLRTopoBRep_Data.hxx b/inc/HLRTopoBRep_Data.hxx
index 696f35f..1fe94ce 100644
--- a/inc/HLRTopoBRep_Data.hxx
+++ b/inc/HLRTopoBRep_Data.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class TopoDS_Vertex;
 class HLRTopoBRep_Data  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRTopoBRep_Data();
diff --git a/inc/HLRTopoBRep_DataMapIteratorOfDataMapOfShapeFaceData.hxx b/inc/HLRTopoBRep_DataMapIteratorOfDataMapOfShapeFaceData.hxx
index cc33dec..05f344c 100644
--- a/inc/HLRTopoBRep_DataMapIteratorOfDataMapOfShapeFaceData.hxx
+++ b/inc/HLRTopoBRep_DataMapIteratorOfDataMapOfShapeFaceData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class HLRTopoBRep_DataMapNodeOfDataMapOfShapeFaceData;
 class HLRTopoBRep_DataMapIteratorOfDataMapOfShapeFaceData  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRTopoBRep_DataMapIteratorOfDataMapOfShapeFaceData();
diff --git a/inc/HLRTopoBRep_DataMapIteratorOfMapOfShapeListOfVData.hxx b/inc/HLRTopoBRep_DataMapIteratorOfMapOfShapeListOfVData.hxx
index d3e6871..2422ec3 100644
--- a/inc/HLRTopoBRep_DataMapIteratorOfMapOfShapeListOfVData.hxx
+++ b/inc/HLRTopoBRep_DataMapIteratorOfMapOfShapeListOfVData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class HLRTopoBRep_DataMapNodeOfMapOfShapeListOfVData;
 class HLRTopoBRep_DataMapIteratorOfMapOfShapeListOfVData  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRTopoBRep_DataMapIteratorOfMapOfShapeListOfVData();
diff --git a/inc/HLRTopoBRep_DataMapOfShapeFaceData.hxx b/inc/HLRTopoBRep_DataMapOfShapeFaceData.hxx
index 5b05405..2541372 100644
--- a/inc/HLRTopoBRep_DataMapOfShapeFaceData.hxx
+++ b/inc/HLRTopoBRep_DataMapOfShapeFaceData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class HLRTopoBRep_DataMapIteratorOfDataMapOfShapeFaceData;
 class HLRTopoBRep_DataMapOfShapeFaceData  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRTopoBRep_DataMapOfShapeFaceData(const Standard_Integer NbBuckets = 1);
diff --git a/inc/HLRTopoBRep_FaceData.hxx b/inc/HLRTopoBRep_FaceData.hxx
index 1ff46f5..9d8fde8 100644
--- a/inc/HLRTopoBRep_FaceData.hxx
+++ b/inc/HLRTopoBRep_FaceData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TopTools_ListOfShape;
 class HLRTopoBRep_FaceData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRTopoBRep_FaceData();
diff --git a/inc/HLRTopoBRep_FaceIsoLiner.hxx b/inc/HLRTopoBRep_FaceIsoLiner.hxx
index edf5911..1b94799 100644
--- a/inc/HLRTopoBRep_FaceIsoLiner.hxx
+++ b/inc/HLRTopoBRep_FaceIsoLiner.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom2d_Line;
 class HLRTopoBRep_FaceIsoLiner  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Perform(const Standard_Integer FI,const TopoDS_Face& F,HLRTopoBRep_Data& DS,const Standard_Integer nbIsos) ;
diff --git a/inc/HLRTopoBRep_ListIteratorOfListOfVData.hxx b/inc/HLRTopoBRep_ListIteratorOfListOfVData.hxx
index 9fccea6..6cd2021 100644
--- a/inc/HLRTopoBRep_ListIteratorOfListOfVData.hxx
+++ b/inc/HLRTopoBRep_ListIteratorOfListOfVData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class HLRTopoBRep_ListNodeOfListOfVData;
 class HLRTopoBRep_ListIteratorOfListOfVData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRTopoBRep_ListIteratorOfListOfVData();
diff --git a/inc/HLRTopoBRep_ListOfVData.hxx b/inc/HLRTopoBRep_ListOfVData.hxx
index 3fbcc42..4af9e8d 100644
--- a/inc/HLRTopoBRep_ListOfVData.hxx
+++ b/inc/HLRTopoBRep_ListOfVData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class HLRTopoBRep_ListNodeOfListOfVData;
 class HLRTopoBRep_ListOfVData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRTopoBRep_ListOfVData();
diff --git a/inc/HLRTopoBRep_MapOfShapeListOfVData.hxx b/inc/HLRTopoBRep_MapOfShapeListOfVData.hxx
index 38d3e38..f60ec05 100644
--- a/inc/HLRTopoBRep_MapOfShapeListOfVData.hxx
+++ b/inc/HLRTopoBRep_MapOfShapeListOfVData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class HLRTopoBRep_DataMapIteratorOfMapOfShapeListOfVData;
 class HLRTopoBRep_MapOfShapeListOfVData  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   HLRTopoBRep_MapOfShapeListOfVData(const Standard_Integer NbBuckets = 1);
diff --git a/inc/HLRTopoBRep_VData.hxx b/inc/HLRTopoBRep_VData.hxx
index 808615a..2fab658 100644
--- a/inc/HLRTopoBRep_VData.hxx
+++ b/inc/HLRTopoBRep_VData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TopoDS_Shape;
 class HLRTopoBRep_VData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HLRTopoBRep_VData();
diff --git a/inc/Handle_Aspect_PixMap.hxx b/inc/Handle_Aspect_PixMap.hxx
deleted file mode 100644
index 54951f2..0000000
--- a/inc/Handle_Aspect_PixMap.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _Handle_Aspect_PixMap_HeaderFile
-#define _Handle_Aspect_PixMap_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-
-#ifndef _Handle_MMgt_TShared_HeaderFile
-#include <Handle_MMgt_TShared.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(MMgt_TShared);
-class Aspect_PixMap;
-
-DEFINE_STANDARD_HANDLE(Aspect_PixMap,MMgt_TShared)
-
-#endif
diff --git a/inc/Handle_Font_FontMgr.hxx b/inc/Handle_Font_FontMgr.hxx
new file mode 100644
index 0000000..87f03b2
--- /dev/null
+++ b/inc/Handle_Font_FontMgr.hxx
@@ -0,0 +1,27 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#ifndef _Handle_Font_FontMgr_HeaderFile
+#define _Handle_Font_FontMgr_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
+
+#ifndef _Handle_MMgt_TShared_HeaderFile
+#include <Handle_MMgt_TShared.hxx>
+#endif
+
+class Standard_Transient;
+class Handle(Standard_Type);
+class Handle(MMgt_TShared);
+class Font_FontMgr;
+
+DEFINE_STANDARD_HANDLE(Font_FontMgr,MMgt_TShared)
+
+#endif
diff --git a/inc/Handle_Font_SystemFont.hxx b/inc/Handle_Font_SystemFont.hxx
new file mode 100644
index 0000000..1573afe
--- /dev/null
+++ b/inc/Handle_Font_SystemFont.hxx
@@ -0,0 +1,27 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#ifndef _Handle_Font_SystemFont_HeaderFile
+#define _Handle_Font_SystemFont_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
+
+#ifndef _Handle_MMgt_TShared_HeaderFile
+#include <Handle_MMgt_TShared.hxx>
+#endif
+
+class Standard_Transient;
+class Handle(Standard_Type);
+class Handle(MMgt_TShared);
+class Font_SystemFont;
+
+DEFINE_STANDARD_HANDLE(Font_SystemFont,MMgt_TShared)
+
+#endif
diff --git a/inc/Handle_Image_PixMap.hxx b/inc/Handle_Image_PixMap.hxx
deleted file mode 100644
index 4765ef7..0000000
--- a/inc/Handle_Image_PixMap.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _Handle_Image_PixMap_HeaderFile
-#define _Handle_Image_PixMap_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-
-#ifndef _Handle_Aspect_PixMap_HeaderFile
-#include <Handle_Aspect_PixMap.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(Aspect_PixMap);
-class Image_PixMap;
-
-DEFINE_STANDARD_HANDLE(Image_PixMap,Aspect_PixMap)
-
-#endif
diff --git a/inc/Handle_OSD_FontMgr.hxx b/inc/Handle_OSD_FontMgr.hxx
deleted file mode 100644
index bb7bb0a..0000000
--- a/inc/Handle_OSD_FontMgr.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _Handle_OSD_FontMgr_HeaderFile
-#define _Handle_OSD_FontMgr_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-
-#ifndef _Handle_MMgt_TShared_HeaderFile
-#include <Handle_MMgt_TShared.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(MMgt_TShared);
-class OSD_FontMgr;
-
-DEFINE_STANDARD_HANDLE(OSD_FontMgr,MMgt_TShared)
-
-#endif
diff --git a/inc/Handle_OSD_SystemFont.hxx b/inc/Handle_OSD_SystemFont.hxx
deleted file mode 100644
index 328637c..0000000
--- a/inc/Handle_OSD_SystemFont.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _Handle_OSD_SystemFont_HeaderFile
-#define _Handle_OSD_SystemFont_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-
-#ifndef _Handle_MMgt_TShared_HeaderFile
-#include <Handle_MMgt_TShared.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(MMgt_TShared);
-class OSD_SystemFont;
-
-DEFINE_STANDARD_HANDLE(OSD_SystemFont,MMgt_TShared)
-
-#endif
diff --git a/inc/Handle_ShapeUpgrade_UnifySameDomain.hxx b/inc/Handle_ShapeUpgrade_UnifySameDomain.hxx
new file mode 100644
index 0000000..4d6ce81
--- /dev/null
+++ b/inc/Handle_ShapeUpgrade_UnifySameDomain.hxx
@@ -0,0 +1,27 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#ifndef _Handle_ShapeUpgrade_UnifySameDomain_HeaderFile
+#define _Handle_ShapeUpgrade_UnifySameDomain_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
+
+#ifndef _Handle_MMgt_TShared_HeaderFile
+#include <Handle_MMgt_TShared.hxx>
+#endif
+
+class Standard_Transient;
+class Handle(Standard_Type);
+class Handle(MMgt_TShared);
+class ShapeUpgrade_UnifySameDomain;
+
+DEFINE_STANDARD_HANDLE(ShapeUpgrade_UnifySameDomain,MMgt_TShared)
+
+#endif
diff --git a/inc/Handle_WNT_PixMap.hxx b/inc/Handle_WNT_PixMap.hxx
deleted file mode 100644
index 76470b4..0000000
--- a/inc/Handle_WNT_PixMap.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _Handle_WNT_PixMap_HeaderFile
-#define _Handle_WNT_PixMap_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-
-#ifndef _Handle_Aspect_PixMap_HeaderFile
-#include <Handle_Aspect_PixMap.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(Aspect_PixMap);
-class WNT_PixMap;
-
-DEFINE_STANDARD_HANDLE(WNT_PixMap,Aspect_PixMap)
-
-#endif
diff --git a/inc/Handle_Xw_PixMap.hxx b/inc/Handle_Xw_PixMap.hxx
deleted file mode 100644
index f4d6ca7..0000000
--- a/inc/Handle_Xw_PixMap.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _Handle_Xw_PixMap_HeaderFile
-#define _Handle_Xw_PixMap_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-
-#ifndef _Handle_Aspect_PixMap_HeaderFile
-#include <Handle_Aspect_PixMap.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(Aspect_PixMap);
-class Xw_PixMap;
-
-DEFINE_STANDARD_HANDLE(Xw_PixMap,Aspect_PixMap)
-
-#endif
diff --git a/inc/HatchGen_Domain.hxx b/inc/HatchGen_Domain.hxx
index 89d4e80..eee0831 100644
--- a/inc/HatchGen_Domain.hxx
+++ b/inc/HatchGen_Domain.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class HatchGen_PointOnHatching;
 class HatchGen_Domain  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an infinite domain. <br>
   Standard_EXPORT   HatchGen_Domain();
diff --git a/inc/HatchGen_Domains.hxx b/inc/HatchGen_Domains.hxx
index db879c7..0aa235f 100644
--- a/inc/HatchGen_Domains.hxx
+++ b/inc/HatchGen_Domains.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class HatchGen_SequenceNodeOfDomains;
 class HatchGen_Domains  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HatchGen_Domains();
diff --git a/inc/HatchGen_IntersectionPoint.hxx b/inc/HatchGen_IntersectionPoint.hxx
index 99e82f9..1067c07 100644
--- a/inc/HatchGen_IntersectionPoint.hxx
+++ b/inc/HatchGen_IntersectionPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@
 class HatchGen_IntersectionPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Sets the index of the supporting curve. <br>
   Standard_EXPORT     void SetIndex(const Standard_Integer Index) ;
diff --git a/inc/HatchGen_PointOnElement.hxx b/inc/HatchGen_PointOnElement.hxx
index ac3dcb6..f881c6c 100644
--- a/inc/HatchGen_PointOnElement.hxx
+++ b/inc/HatchGen_PointOnElement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IntRes2d_IntersectionPoint;
 class HatchGen_PointOnElement  : public HatchGen_IntersectionPoint {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!---Purpose; Creates an empty point on element <br>
   Standard_EXPORT   HatchGen_PointOnElement();
diff --git a/inc/HatchGen_PointOnHatching.hxx b/inc/HatchGen_PointOnHatching.hxx
index d61c94d..75831b9 100644
--- a/inc/HatchGen_PointOnHatching.hxx
+++ b/inc/HatchGen_PointOnHatching.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class HatchGen_PointOnElement;
 class HatchGen_PointOnHatching  : public HatchGen_IntersectionPoint {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty point. <br>
   Standard_EXPORT   HatchGen_PointOnHatching();
diff --git a/inc/HatchGen_PointsOnElement.hxx b/inc/HatchGen_PointsOnElement.hxx
index 82721e7..89f39fa 100644
--- a/inc/HatchGen_PointsOnElement.hxx
+++ b/inc/HatchGen_PointsOnElement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class HatchGen_SequenceNodeOfPointsOnElement;
 class HatchGen_PointsOnElement  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HatchGen_PointsOnElement();
diff --git a/inc/HatchGen_PointsOnHatching.hxx b/inc/HatchGen_PointsOnHatching.hxx
index c586c7a..c0bb248 100644
--- a/inc/HatchGen_PointsOnHatching.hxx
+++ b/inc/HatchGen_PointsOnHatching.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class HatchGen_SequenceNodeOfPointsOnHatching;
 class HatchGen_PointsOnHatching  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       HatchGen_PointsOnHatching();
diff --git a/inc/Hatch_Hatcher.hxx b/inc/Hatch_Hatcher.hxx
index d14b93e..74476b7 100644
--- a/inc/Hatch_Hatcher.hxx
+++ b/inc/Hatch_Hatcher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -71,18 +74,7 @@ class gp_Pnt2d;
 class Hatch_Hatcher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a empty  hatcher.  <Tol> is the  tolerance <br>
 //!          for intersections. <br>
diff --git a/inc/Hatch_Line.hxx b/inc/Hatch_Line.hxx
index 6232d59..ce04583 100644
--- a/inc/Hatch_Line.hxx
+++ b/inc/Hatch_Line.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class gp_Lin2d;
 class Hatch_Line  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Hatch_Line();
diff --git a/inc/Hatch_Parameter.hxx b/inc/Hatch_Parameter.hxx
index 599e12c..473ff7d 100644
--- a/inc/Hatch_Parameter.hxx
+++ b/inc/Hatch_Parameter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Hatch_Hatcher;
 class Hatch_Parameter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Hatch_Parameter();
diff --git a/inc/Hatch_SequenceOfLine.hxx b/inc/Hatch_SequenceOfLine.hxx
index 7af7f50..ddaca46 100644
--- a/inc/Hatch_SequenceOfLine.hxx
+++ b/inc/Hatch_SequenceOfLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Hatch_SequenceNodeOfSequenceOfLine;
 class Hatch_SequenceOfLine  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Hatch_SequenceOfLine();
diff --git a/inc/Hatch_SequenceOfParameter.hxx b/inc/Hatch_SequenceOfParameter.hxx
index b286f58..e3e6c92 100644
--- a/inc/Hatch_SequenceOfParameter.hxx
+++ b/inc/Hatch_SequenceOfParameter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Hatch_SequenceNodeOfSequenceOfParameter;
 class Hatch_SequenceOfParameter  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Hatch_SequenceOfParameter();
diff --git a/inc/HeaderSection.hxx b/inc/HeaderSection.hxx
index d7383ff..231ff43 100644
--- a/inc/HeaderSection.hxx
+++ b/inc/HeaderSection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class HeaderSection_HeaderRecognizer;
 class HeaderSection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates a Protocol <br>
   Standard_EXPORT   static  Handle_HeaderSection_Protocol Protocol() ;
diff --git a/inc/Hermit.hxx b/inc/Hermit.hxx
index 2a1caaa..3b1bea8 100644
--- a/inc/Hermit.hxx
+++ b/inc/Hermit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class Geom_BSplineCurve;
 class Hermit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Geom2d_BSplineCurve Solution(const Handle(Geom_BSplineCurve)& BS,const Standard_Real TolPoles = 0.000001,const Standard_Real TolKnots = 0.000001) ;
diff --git a/inc/IFGraph_AllConnected.hxx b/inc/IFGraph_AllConnected.hxx
index 53ac115..c2316e2 100644
--- a/inc/IFGraph_AllConnected.hxx
+++ b/inc/IFGraph_AllConnected.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Standard_Transient;
 class IFGraph_AllConnected  : public Interface_GraphContent {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates an AllConnected from a graph, empty ready to be filled <br>
   Standard_EXPORT   IFGraph_AllConnected(const Interface_Graph& agraph);
diff --git a/inc/IFGraph_AllShared.hxx b/inc/IFGraph_AllShared.hxx
index 7cf279a..7b1364f 100644
--- a/inc/IFGraph_AllShared.hxx
+++ b/inc/IFGraph_AllShared.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Interface_EntityIterator;
 class IFGraph_AllShared  : public Interface_GraphContent {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates an AllShared from a graph, empty ready to be filled <br>
   Standard_EXPORT   IFGraph_AllShared(const Interface_Graph& agraph);
diff --git a/inc/IFGraph_Articulations.hxx b/inc/IFGraph_Articulations.hxx
index e597b20..b51141a 100644
--- a/inc/IFGraph_Articulations.hxx
+++ b/inc/IFGraph_Articulations.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class Interface_EntityIterator;
 class IFGraph_Articulations  : public Interface_GraphContent {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates Articulations to evaluate a Graph <br>
 //!           whole True : works on the whole Model <br>
diff --git a/inc/IFGraph_Compare.hxx b/inc/IFGraph_Compare.hxx
index 164c6a4..c265a33 100644
--- a/inc/IFGraph_Compare.hxx
+++ b/inc/IFGraph_Compare.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_EntityIterator;
 class IFGraph_Compare  : public Interface_GraphContent {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates empty Compare, ready to work <br>
   Standard_EXPORT   IFGraph_Compare(const Interface_Graph& agraph);
diff --git a/inc/IFGraph_ConnectedComponants.hxx b/inc/IFGraph_ConnectedComponants.hxx
index 5fcef9b..4b39125 100644
--- a/inc/IFGraph_ConnectedComponants.hxx
+++ b/inc/IFGraph_ConnectedComponants.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class Interface_Graph;
 class IFGraph_ConnectedComponants  : public IFGraph_SubPartsIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates with a Graph, and will analyse : <br>
 //!           whole True  : all the contents of the Model <br>
diff --git a/inc/IFGraph_Cumulate.hxx b/inc/IFGraph_Cumulate.hxx
index c0abc2a..0027276 100644
--- a/inc/IFGraph_Cumulate.hxx
+++ b/inc/IFGraph_Cumulate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Interface_EntityIterator;
 class IFGraph_Cumulate  : public Interface_GraphContent {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates empty Cumulate, ready to work <br>
   Standard_EXPORT   IFGraph_Cumulate(const Interface_Graph& agraph);
diff --git a/inc/IFGraph_Cycles.hxx b/inc/IFGraph_Cycles.hxx
index 91fbbe9..45a9c9c 100644
--- a/inc/IFGraph_Cycles.hxx
+++ b/inc/IFGraph_Cycles.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class IFGraph_StrongComponants;
 class IFGraph_Cycles  : public IFGraph_SubPartsIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates with a Graph, and will analyse : <br>
 //!           whole True  : all the contents of the Model <br>
diff --git a/inc/IFGraph_ExternalSources.hxx b/inc/IFGraph_ExternalSources.hxx
index 707e2ca..4811247 100644
--- a/inc/IFGraph_ExternalSources.hxx
+++ b/inc/IFGraph_ExternalSources.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Interface_EntityIterator;
 class IFGraph_ExternalSources  : public Interface_GraphContent {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates empty ExternalSources, ready to work <br>
   Standard_EXPORT   IFGraph_ExternalSources(const Interface_Graph& agraph);
diff --git a/inc/IFGraph_SCRoots.hxx b/inc/IFGraph_SCRoots.hxx
index dd5bed3..e4b2933 100644
--- a/inc/IFGraph_SCRoots.hxx
+++ b/inc/IFGraph_SCRoots.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class IFGraph_StrongComponants;
 class IFGraph_SCRoots  : public IFGraph_StrongComponants {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates with a Graph, and will analyse : <br>
 //!           whole True  : all the contents of the Model <br>
diff --git a/inc/IFGraph_StrongComponants.hxx b/inc/IFGraph_StrongComponants.hxx
index da8ab36..6962158 100644
--- a/inc/IFGraph_StrongComponants.hxx
+++ b/inc/IFGraph_StrongComponants.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class Interface_Graph;
 class IFGraph_StrongComponants  : public IFGraph_SubPartsIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates with a Graph, and will analyse : <br>
 //!           whole True  : all the contents of the Model <br>
diff --git a/inc/IFGraph_SubPartsIterator.hxx b/inc/IFGraph_SubPartsIterator.hxx
index 9d73c78..0ba0fd4 100644
--- a/inc/IFGraph_SubPartsIterator.hxx
+++ b/inc/IFGraph_SubPartsIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class Interface_GraphContent;
 class IFGraph_SubPartsIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates with a Graph, whole or parts of it <br>
 //!           whole True  : works on the entire Model <br>
diff --git a/inc/IFSelect.hxx b/inc/IFSelect.hxx
index 8967a00..d65e687 100644
--- a/inc/IFSelect.hxx
+++ b/inc/IFSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -129,18 +132,7 @@ class IFSelect_SequenceNodeOfSequenceOfAppliedModifiers;
 class IFSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Saves the state of a WorkSession from IFSelect, by using a <br>
 //!           SessionFile from IFSelect. Returns True if Done, False in <br>
diff --git a/inc/IFSelect_ContextModif.hxx b/inc/IFSelect_ContextModif.hxx
index d00cca6..e872802 100644
--- a/inc/IFSelect_ContextModif.hxx
+++ b/inc/IFSelect_ContextModif.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -78,18 +81,7 @@ class Interface_CheckIterator;
 class IFSelect_ContextModif  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares a ContextModif with these informations : <br>
 //!           - the graph established from original model (target passed <br>
diff --git a/inc/IFSelect_ContextWrite.hxx b/inc/IFSelect_ContextWrite.hxx
index d3df043..2812394 100644
--- a/inc/IFSelect_ContextWrite.hxx
+++ b/inc/IFSelect_ContextWrite.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class Interface_CheckIterator;
 class IFSelect_ContextWrite  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares a ContextWrite with these informations : <br>
 //!           - the model which is to be written <br>
diff --git a/inc/IFSelect_Functions.hxx b/inc/IFSelect_Functions.hxx
index 41e1679..8e4ec94 100644
--- a/inc/IFSelect_Functions.hxx
+++ b/inc/IFSelect_Functions.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class IFSelect_Dispatch;
 class IFSelect_Functions  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Takes the name of an entity, either as argument, or (if <name> <br>
 //!           is empty) on keybord, and returns the entity <br>
diff --git a/inc/IFSelect_SelectionIterator.hxx b/inc/IFSelect_SelectionIterator.hxx
index fdada1b..05cf833 100644
--- a/inc/IFSelect_SelectionIterator.hxx
+++ b/inc/IFSelect_SelectionIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IFSelect_TSeqOfSelection;
 class IFSelect_SelectionIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty iterator, ready to be filled <br>
   Standard_EXPORT   IFSelect_SelectionIterator();
diff --git a/inc/IFSelect_SequenceOfAppliedModifiers.hxx b/inc/IFSelect_SequenceOfAppliedModifiers.hxx
index 08f8f04..e3fd7ed 100644
--- a/inc/IFSelect_SequenceOfAppliedModifiers.hxx
+++ b/inc/IFSelect_SequenceOfAppliedModifiers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IFSelect_SequenceNodeOfSequenceOfAppliedModifiers;
 class IFSelect_SequenceOfAppliedModifiers  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IFSelect_SequenceOfAppliedModifiers();
diff --git a/inc/IFSelect_SequenceOfGeneralModifier.hxx b/inc/IFSelect_SequenceOfGeneralModifier.hxx
index 1ea4a2e..a44cdac 100644
--- a/inc/IFSelect_SequenceOfGeneralModifier.hxx
+++ b/inc/IFSelect_SequenceOfGeneralModifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IFSelect_SequenceNodeOfSequenceOfGeneralModifier;
 class IFSelect_SequenceOfGeneralModifier  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IFSelect_SequenceOfGeneralModifier();
diff --git a/inc/IFSelect_SequenceOfInterfaceModel.hxx b/inc/IFSelect_SequenceOfInterfaceModel.hxx
index 2cf87a2..f2d8f0f 100644
--- a/inc/IFSelect_SequenceOfInterfaceModel.hxx
+++ b/inc/IFSelect_SequenceOfInterfaceModel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IFSelect_SequenceNodeOfSequenceOfInterfaceModel;
 class IFSelect_SequenceOfInterfaceModel  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IFSelect_SequenceOfInterfaceModel();
diff --git a/inc/IFSelect_SessionFile.hxx b/inc/IFSelect_SessionFile.hxx
index f33ea2e..52193f1 100644
--- a/inc/IFSelect_SessionFile.hxx
+++ b/inc/IFSelect_SessionFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -83,18 +86,7 @@ class Standard_Transient;
 class IFSelect_SessionFile  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a SessionFile, ready to read Files in order to load <br>
 //!           them into a given WorkSession. <br>
diff --git a/inc/IFSelect_ShareOutResult.hxx b/inc/IFSelect_ShareOutResult.hxx
index 720407f..49716b0 100644
--- a/inc/IFSelect_ShareOutResult.hxx
+++ b/inc/IFSelect_ShareOutResult.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class TCollection_AsciiString;
 class IFSelect_ShareOutResult  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a ShareOutResult from a ShareOut, to work on a Model <br>
 //!           (without any more precision; uses Active Protocol) <br>
diff --git a/inc/IFSelect_TSeqOfDispatch.hxx b/inc/IFSelect_TSeqOfDispatch.hxx
index 420fee8..3f946a0 100644
--- a/inc/IFSelect_TSeqOfDispatch.hxx
+++ b/inc/IFSelect_TSeqOfDispatch.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IFSelect_SequenceNodeOfTSeqOfDispatch;
 class IFSelect_TSeqOfDispatch  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IFSelect_TSeqOfDispatch();
diff --git a/inc/IFSelect_TSeqOfSelection.hxx b/inc/IFSelect_TSeqOfSelection.hxx
index 8023eeb..3a44d83 100644
--- a/inc/IFSelect_TSeqOfSelection.hxx
+++ b/inc/IFSelect_TSeqOfSelection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IFSelect_SequenceNodeOfTSeqOfSelection;
 class IFSelect_TSeqOfSelection  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IFSelect_TSeqOfSelection();
diff --git a/inc/IGESAppli.hxx b/inc/IGESAppli.hxx
index 9989047..e81944f 100644
--- a/inc/IGESAppli.hxx
+++ b/inc/IGESAppli.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -72,18 +75,7 @@ class IGESAppli_HArray1OfFiniteElement;
 class IGESAppli  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares dynamic data (Protocol, Modules) for this package <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/IGESAppli_Array1OfFiniteElement.hxx b/inc/IGESAppli_Array1OfFiniteElement.hxx
index 19cd66c..43589f6 100644
--- a/inc/IGESAppli_Array1OfFiniteElement.hxx
+++ b/inc/IGESAppli_Array1OfFiniteElement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESAppli_FiniteElement;
 class IGESAppli_Array1OfFiniteElement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESAppli_Array1OfFiniteElement(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESAppli_Array1OfFlow.hxx b/inc/IGESAppli_Array1OfFlow.hxx
index a84d54a..715bbe0 100644
--- a/inc/IGESAppli_Array1OfFlow.hxx
+++ b/inc/IGESAppli_Array1OfFlow.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESAppli_Flow;
 class IGESAppli_Array1OfFlow  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESAppli_Array1OfFlow(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESAppli_Array1OfNode.hxx b/inc/IGESAppli_Array1OfNode.hxx
index ae9d9a2..1ac8192 100644
--- a/inc/IGESAppli_Array1OfNode.hxx
+++ b/inc/IGESAppli_Array1OfNode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESAppli_Node;
 class IGESAppli_Array1OfNode  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESAppli_Array1OfNode(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESAppli_ToolDrilledHole.hxx b/inc/IGESAppli_ToolDrilledHole.hxx
index f8e6f6d..3a78af9 100644
--- a/inc/IGESAppli_ToolDrilledHole.hxx
+++ b/inc/IGESAppli_ToolDrilledHole.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESAppli_ToolDrilledHole  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolDrilledHole, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolDrilledHole();
diff --git a/inc/IGESAppli_ToolElementResults.hxx b/inc/IGESAppli_ToolElementResults.hxx
index 66c7606..c6b8b5a 100644
--- a/inc/IGESAppli_ToolElementResults.hxx
+++ b/inc/IGESAppli_ToolElementResults.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESAppli_ToolElementResults  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolElementResults, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolElementResults();
diff --git a/inc/IGESAppli_ToolFiniteElement.hxx b/inc/IGESAppli_ToolFiniteElement.hxx
index c18199f..1d91f81 100644
--- a/inc/IGESAppli_ToolFiniteElement.hxx
+++ b/inc/IGESAppli_ToolFiniteElement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESAppli_ToolFiniteElement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolFiniteElement, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolFiniteElement();
diff --git a/inc/IGESAppli_ToolFlow.hxx b/inc/IGESAppli_ToolFlow.hxx
index 4bccb8b..e0da115 100644
--- a/inc/IGESAppli_ToolFlow.hxx
+++ b/inc/IGESAppli_ToolFlow.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESAppli_ToolFlow  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolFlow, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolFlow();
diff --git a/inc/IGESAppli_ToolFlowLineSpec.hxx b/inc/IGESAppli_ToolFlowLineSpec.hxx
index 8e20dd1..8917021 100644
--- a/inc/IGESAppli_ToolFlowLineSpec.hxx
+++ b/inc/IGESAppli_ToolFlowLineSpec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESAppli_ToolFlowLineSpec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolFlowLineSpec, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolFlowLineSpec();
diff --git a/inc/IGESAppli_ToolLevelFunction.hxx b/inc/IGESAppli_ToolLevelFunction.hxx
index de06772..e8f0c14 100644
--- a/inc/IGESAppli_ToolLevelFunction.hxx
+++ b/inc/IGESAppli_ToolLevelFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESAppli_ToolLevelFunction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolLevelFunction, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolLevelFunction();
diff --git a/inc/IGESAppli_ToolLevelToPWBLayerMap.hxx b/inc/IGESAppli_ToolLevelToPWBLayerMap.hxx
index 7c7467f..3558d74 100644
--- a/inc/IGESAppli_ToolLevelToPWBLayerMap.hxx
+++ b/inc/IGESAppli_ToolLevelToPWBLayerMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESAppli_ToolLevelToPWBLayerMap  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolLevelToPWBLayerMap, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolLevelToPWBLayerMap();
diff --git a/inc/IGESAppli_ToolLineWidening.hxx b/inc/IGESAppli_ToolLineWidening.hxx
index acbe74e..83db0bd 100644
--- a/inc/IGESAppli_ToolLineWidening.hxx
+++ b/inc/IGESAppli_ToolLineWidening.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESAppli_ToolLineWidening  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolLineWidening, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolLineWidening();
diff --git a/inc/IGESAppli_ToolNodalConstraint.hxx b/inc/IGESAppli_ToolNodalConstraint.hxx
index 49bfbd5..037ef9f 100644
--- a/inc/IGESAppli_ToolNodalConstraint.hxx
+++ b/inc/IGESAppli_ToolNodalConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESAppli_ToolNodalConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolNodalConstraint, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolNodalConstraint();
diff --git a/inc/IGESAppli_ToolNodalDisplAndRot.hxx b/inc/IGESAppli_ToolNodalDisplAndRot.hxx
index ea69d9a..9b3e9c2 100644
--- a/inc/IGESAppli_ToolNodalDisplAndRot.hxx
+++ b/inc/IGESAppli_ToolNodalDisplAndRot.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESAppli_ToolNodalDisplAndRot  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolNodalDisplAndRot, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolNodalDisplAndRot();
diff --git a/inc/IGESAppli_ToolNodalResults.hxx b/inc/IGESAppli_ToolNodalResults.hxx
index 05530f7..0b1c9fe 100644
--- a/inc/IGESAppli_ToolNodalResults.hxx
+++ b/inc/IGESAppli_ToolNodalResults.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESAppli_ToolNodalResults  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolNodalResults, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolNodalResults();
diff --git a/inc/IGESAppli_ToolNode.hxx b/inc/IGESAppli_ToolNode.hxx
index 52110ca..d319c2c 100644
--- a/inc/IGESAppli_ToolNode.hxx
+++ b/inc/IGESAppli_ToolNode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESAppli_ToolNode  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolNode, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolNode();
diff --git a/inc/IGESAppli_ToolPWBArtworkStackup.hxx b/inc/IGESAppli_ToolPWBArtworkStackup.hxx
index bf708e9..4c829af 100644
--- a/inc/IGESAppli_ToolPWBArtworkStackup.hxx
+++ b/inc/IGESAppli_ToolPWBArtworkStackup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESAppli_ToolPWBArtworkStackup  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolPWBArtworkStackup, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolPWBArtworkStackup();
diff --git a/inc/IGESAppli_ToolPWBDrilledHole.hxx b/inc/IGESAppli_ToolPWBDrilledHole.hxx
index 56f8831..6d50b16 100644
--- a/inc/IGESAppli_ToolPWBDrilledHole.hxx
+++ b/inc/IGESAppli_ToolPWBDrilledHole.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESAppli_ToolPWBDrilledHole  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolPWBDrilledHole, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolPWBDrilledHole();
diff --git a/inc/IGESAppli_ToolPartNumber.hxx b/inc/IGESAppli_ToolPartNumber.hxx
index 911cd3d..bb3d353 100644
--- a/inc/IGESAppli_ToolPartNumber.hxx
+++ b/inc/IGESAppli_ToolPartNumber.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESAppli_ToolPartNumber  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolPartNumber, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolPartNumber();
diff --git a/inc/IGESAppli_ToolPinNumber.hxx b/inc/IGESAppli_ToolPinNumber.hxx
index 33dd9d1..2dff54a 100644
--- a/inc/IGESAppli_ToolPinNumber.hxx
+++ b/inc/IGESAppli_ToolPinNumber.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESAppli_ToolPinNumber  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolPinNumber, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolPinNumber();
diff --git a/inc/IGESAppli_ToolPipingFlow.hxx b/inc/IGESAppli_ToolPipingFlow.hxx
index 20ca562..282a4e1 100644
--- a/inc/IGESAppli_ToolPipingFlow.hxx
+++ b/inc/IGESAppli_ToolPipingFlow.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESAppli_ToolPipingFlow  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolPipingFlow, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolPipingFlow();
diff --git a/inc/IGESAppli_ToolReferenceDesignator.hxx b/inc/IGESAppli_ToolReferenceDesignator.hxx
index e90a0a4..e8c1086 100644
--- a/inc/IGESAppli_ToolReferenceDesignator.hxx
+++ b/inc/IGESAppli_ToolReferenceDesignator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESAppli_ToolReferenceDesignator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolReferenceDesignator, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolReferenceDesignator();
diff --git a/inc/IGESAppli_ToolRegionRestriction.hxx b/inc/IGESAppli_ToolRegionRestriction.hxx
index 1b31e9c..948709b 100644
--- a/inc/IGESAppli_ToolRegionRestriction.hxx
+++ b/inc/IGESAppli_ToolRegionRestriction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESAppli_ToolRegionRestriction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolRegionRestriction, ready to work <br>
   Standard_EXPORT   IGESAppli_ToolRegionRestriction();
diff --git a/inc/IGESBasic.hxx b/inc/IGESBasic.hxx
index 10f6538..0d872ff 100644
--- a/inc/IGESBasic.hxx
+++ b/inc/IGESBasic.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class IGESBasic_HArray1OfLineFontEntity;
 class IGESBasic  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares dynqmic data (Protocol, Modules) for this package <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/IGESBasic_Array1OfLineFontEntity.hxx b/inc/IGESBasic_Array1OfLineFontEntity.hxx
index aceb543..ae074a6 100644
--- a/inc/IGESBasic_Array1OfLineFontEntity.hxx
+++ b/inc/IGESBasic_Array1OfLineFontEntity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESData_LineFontEntity;
 class IGESBasic_Array1OfLineFontEntity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESBasic_Array1OfLineFontEntity(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESBasic_Array2OfHArray1OfReal.hxx b/inc/IGESBasic_Array2OfHArray1OfReal.hxx
index d05b5e1..c76676b 100644
--- a/inc/IGESBasic_Array2OfHArray1OfReal.hxx
+++ b/inc/IGESBasic_Array2OfHArray1OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColStd_HArray1OfReal;
 class IGESBasic_Array2OfHArray1OfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESBasic_Array2OfHArray1OfReal(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/IGESBasic_ToolAssocGroupType.hxx b/inc/IGESBasic_ToolAssocGroupType.hxx
index 488a5e9..0cb4109 100644
--- a/inc/IGESBasic_ToolAssocGroupType.hxx
+++ b/inc/IGESBasic_ToolAssocGroupType.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESBasic_ToolAssocGroupType  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolAssocGroupType, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolAssocGroupType();
diff --git a/inc/IGESBasic_ToolExternalRefFile.hxx b/inc/IGESBasic_ToolExternalRefFile.hxx
index d827128..97597e5 100644
--- a/inc/IGESBasic_ToolExternalRefFile.hxx
+++ b/inc/IGESBasic_ToolExternalRefFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESBasic_ToolExternalRefFile  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolExternalRefFile, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolExternalRefFile();
diff --git a/inc/IGESBasic_ToolExternalRefFileIndex.hxx b/inc/IGESBasic_ToolExternalRefFileIndex.hxx
index 46f3c57..3c8270e 100644
--- a/inc/IGESBasic_ToolExternalRefFileIndex.hxx
+++ b/inc/IGESBasic_ToolExternalRefFileIndex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESBasic_ToolExternalRefFileIndex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolExternalRefFileIndex, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolExternalRefFileIndex();
diff --git a/inc/IGESBasic_ToolExternalRefFileName.hxx b/inc/IGESBasic_ToolExternalRefFileName.hxx
index b057a67..56b7441 100644
--- a/inc/IGESBasic_ToolExternalRefFileName.hxx
+++ b/inc/IGESBasic_ToolExternalRefFileName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESBasic_ToolExternalRefFileName  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolExternalRefFileName, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolExternalRefFileName();
diff --git a/inc/IGESBasic_ToolExternalRefLibName.hxx b/inc/IGESBasic_ToolExternalRefLibName.hxx
index 15ad58a..4ac5404 100644
--- a/inc/IGESBasic_ToolExternalRefLibName.hxx
+++ b/inc/IGESBasic_ToolExternalRefLibName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESBasic_ToolExternalRefLibName  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolExternalRefLibName, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolExternalRefLibName();
diff --git a/inc/IGESBasic_ToolExternalRefName.hxx b/inc/IGESBasic_ToolExternalRefName.hxx
index ff88072..0fd8164 100644
--- a/inc/IGESBasic_ToolExternalRefName.hxx
+++ b/inc/IGESBasic_ToolExternalRefName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESBasic_ToolExternalRefName  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolExternalRefName, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolExternalRefName();
diff --git a/inc/IGESBasic_ToolExternalReferenceFile.hxx b/inc/IGESBasic_ToolExternalReferenceFile.hxx
index 2af50ec..40f6638 100644
--- a/inc/IGESBasic_ToolExternalReferenceFile.hxx
+++ b/inc/IGESBasic_ToolExternalReferenceFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESBasic_ToolExternalReferenceFile  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolExternalReferenceFile, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolExternalReferenceFile();
diff --git a/inc/IGESBasic_ToolGroup.hxx b/inc/IGESBasic_ToolGroup.hxx
index d3fec42..4423483 100644
--- a/inc/IGESBasic_ToolGroup.hxx
+++ b/inc/IGESBasic_ToolGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESBasic_ToolGroup  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolGroup, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolGroup();
diff --git a/inc/IGESBasic_ToolGroupWithoutBackP.hxx b/inc/IGESBasic_ToolGroupWithoutBackP.hxx
index 3c88b12..3cb56b7 100644
--- a/inc/IGESBasic_ToolGroupWithoutBackP.hxx
+++ b/inc/IGESBasic_ToolGroupWithoutBackP.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESBasic_ToolGroupWithoutBackP  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolGroupWithoutBackP, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolGroupWithoutBackP();
diff --git a/inc/IGESBasic_ToolHierarchy.hxx b/inc/IGESBasic_ToolHierarchy.hxx
index 1e82a1b..4331284 100644
--- a/inc/IGESBasic_ToolHierarchy.hxx
+++ b/inc/IGESBasic_ToolHierarchy.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESBasic_ToolHierarchy  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolHierarchy, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolHierarchy();
diff --git a/inc/IGESBasic_ToolName.hxx b/inc/IGESBasic_ToolName.hxx
index 119f75a..855aed1 100644
--- a/inc/IGESBasic_ToolName.hxx
+++ b/inc/IGESBasic_ToolName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESBasic_ToolName  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolName, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolName();
diff --git a/inc/IGESBasic_ToolOrderedGroup.hxx b/inc/IGESBasic_ToolOrderedGroup.hxx
index 1d4e624..41ca41f 100644
--- a/inc/IGESBasic_ToolOrderedGroup.hxx
+++ b/inc/IGESBasic_ToolOrderedGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESBasic_ToolOrderedGroup  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolOrderedGroup, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolOrderedGroup();
diff --git a/inc/IGESBasic_ToolOrderedGroupWithoutBackP.hxx b/inc/IGESBasic_ToolOrderedGroupWithoutBackP.hxx
index e7c6369..c9132a0 100644
--- a/inc/IGESBasic_ToolOrderedGroupWithoutBackP.hxx
+++ b/inc/IGESBasic_ToolOrderedGroupWithoutBackP.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESBasic_ToolOrderedGroupWithoutBackP  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolOrderedGroupWithoutBackP, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolOrderedGroupWithoutBackP();
diff --git a/inc/IGESBasic_ToolSingleParent.hxx b/inc/IGESBasic_ToolSingleParent.hxx
index 82075a1..56f8c00 100644
--- a/inc/IGESBasic_ToolSingleParent.hxx
+++ b/inc/IGESBasic_ToolSingleParent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESBasic_ToolSingleParent  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSingleParent, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolSingleParent();
diff --git a/inc/IGESBasic_ToolSingularSubfigure.hxx b/inc/IGESBasic_ToolSingularSubfigure.hxx
index 3554217..a5ac60d 100644
--- a/inc/IGESBasic_ToolSingularSubfigure.hxx
+++ b/inc/IGESBasic_ToolSingularSubfigure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESBasic_ToolSingularSubfigure  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSingularSubfigure, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolSingularSubfigure();
diff --git a/inc/IGESBasic_ToolSubfigureDef.hxx b/inc/IGESBasic_ToolSubfigureDef.hxx
index cc145fe..f92cd36 100644
--- a/inc/IGESBasic_ToolSubfigureDef.hxx
+++ b/inc/IGESBasic_ToolSubfigureDef.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESBasic_ToolSubfigureDef  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSubfigureDef, ready to work <br>
   Standard_EXPORT   IGESBasic_ToolSubfigureDef();
diff --git a/inc/IGESCAFControl.hxx b/inc/IGESCAFControl.hxx
index 9e07993..e1fb968 100644
--- a/inc/IGESCAFControl.hxx
+++ b/inc/IGESCAFControl.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IGESCAFControl_Writer;
 class IGESCAFControl  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Converts IGES color index to CASCADE color <br>
   Standard_EXPORT   static  Quantity_Color DecodeColor(const Standard_Integer col) ;
diff --git a/inc/IGESCAFControl_Reader.hxx b/inc/IGESCAFControl_Reader.hxx
index 20a834f..dcb88a7 100644
--- a/inc/IGESCAFControl_Reader.hxx
+++ b/inc/IGESCAFControl_Reader.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class TCollection_AsciiString;
 class IGESCAFControl_Reader  : public IGESControl_Reader {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a reader with an empty <br>
 //!          IGES model and sets ColorMode, LayerMode and NameMode to Standard_True. <br>
diff --git a/inc/IGESCAFControl_Writer.hxx b/inc/IGESCAFControl_Writer.hxx
index 09cf476..ea472f6 100644
--- a/inc/IGESCAFControl_Writer.hxx
+++ b/inc/IGESCAFControl_Writer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -60,18 +63,7 @@ class XCAFPrs_Style;
 class IGESCAFControl_Writer  : public IGESControl_Writer {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a writer with an empty <br>
 //! IGES model and sets ColorMode, LayerMode and NameMode to Standard_True. <br>
diff --git a/inc/IGESControl_Reader.hxx b/inc/IGESControl_Reader.hxx
index e87e569..1e7458e 100644
--- a/inc/IGESControl_Reader.hxx
+++ b/inc/IGESControl_Reader.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -77,18 +80,7 @@ class IGESData_IGESModel;
 class IGESControl_Reader  : public XSControl_Reader {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Reader from scratch <br>
   Standard_EXPORT   IGESControl_Reader();
diff --git a/inc/IGESControl_Writer.hxx b/inc/IGESControl_Writer.hxx
index 7649384..edcd1b3 100644
--- a/inc/IGESControl_Writer.hxx
+++ b/inc/IGESControl_Writer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -60,18 +63,7 @@ class IGESData_IGESEntity;
 class IGESControl_Writer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a writer object with the <br>
 //! default unit (millimeters) and write mode (Face). <br>
diff --git a/inc/IGESConvGeom.hxx b/inc/IGESConvGeom.hxx
index 820b5a3..a89dbb6 100644
--- a/inc/IGESConvGeom.hxx
+++ b/inc/IGESConvGeom.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class IGESConvGeom_GeomBuilder;
 class IGESConvGeom  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Converts a SplineCurve from IGES to a BSplineCurve from CasCade <br>
 //!           <epscoef> gives tolerance to consider coefficient to be nul <br>
diff --git a/inc/IGESConvGeom_GeomBuilder.hxx b/inc/IGESConvGeom_GeomBuilder.hxx
index bf29579..02ed658 100644
--- a/inc/IGESConvGeom_GeomBuilder.hxx
+++ b/inc/IGESConvGeom_GeomBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -62,18 +65,7 @@ class IGESGeom_TransformationMatrix;
 class IGESConvGeom_GeomBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a GeomBuilder at initial state. <br>
   Standard_EXPORT   IGESConvGeom_GeomBuilder();
diff --git a/inc/IGESData.hxx b/inc/IGESData.hxx
index c7127f5..41a55b6 100644
--- a/inc/IGESData.hxx
+++ b/inc/IGESData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class IGESData_NodeOfSpecificLib;
 class IGESData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares General dynamic data used for IGESData specifically : <br>
 //!           Protocol and Modules, which treat UndefinedEntity <br>
diff --git a/inc/IGESData_Array1OfDirPart.hxx b/inc/IGESData_Array1OfDirPart.hxx
index 95abb61..ef849a1 100644
--- a/inc/IGESData_Array1OfDirPart.hxx
+++ b/inc/IGESData_Array1OfDirPart.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class IGESData_DirPart;
 class IGESData_Array1OfDirPart  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESData_Array1OfDirPart(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESData_Array1OfIGESEntity.hxx b/inc/IGESData_Array1OfIGESEntity.hxx
index 05c865c..a020cf5 100644
--- a/inc/IGESData_Array1OfIGESEntity.hxx
+++ b/inc/IGESData_Array1OfIGESEntity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESData_IGESEntity;
 class IGESData_Array1OfIGESEntity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESData_Array1OfIGESEntity(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESData_BasicEditor.hxx b/inc/IGESData_BasicEditor.hxx
index fb2ad0a..4aad8e6 100644
--- a/inc/IGESData_BasicEditor.hxx
+++ b/inc/IGESData_BasicEditor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class IGESData_IGESEntity;
 class IGESData_BasicEditor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Basic Editor, with a new IGESModel, ready to run <br>
   Standard_EXPORT   IGESData_BasicEditor(const Handle(IGESData_Protocol)& protocol);
diff --git a/inc/IGESData_DefSwitch.hxx b/inc/IGESData_DefSwitch.hxx
index 652214f..c389cf5 100644
--- a/inc/IGESData_DefSwitch.hxx
+++ b/inc/IGESData_DefSwitch.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(IGESData_DefSwitch);
 class IGESData_DefSwitch  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! creates a DefSwitch as Void <br>
   Standard_EXPORT   IGESData_DefSwitch();
diff --git a/inc/IGESData_DirChecker.hxx b/inc/IGESData_DirChecker.hxx
index 7212967..6811f3a 100644
--- a/inc/IGESData_DirChecker.hxx
+++ b/inc/IGESData_DirChecker.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class IGESData_IGESEntity;
 class IGESData_DirChecker  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a DirChecker, with no criterium at all to be checked <br>
   Standard_EXPORT   IGESData_DirChecker();
diff --git a/inc/IGESData_DirPart.hxx b/inc/IGESData_DirPart.hxx
index a6d35ef..3777948 100644
--- a/inc/IGESData_DirPart.hxx
+++ b/inc/IGESData_DirPart.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(IGESData_DirPart);
 class IGESData_DirPart  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! creates an empty DirPart, ready to be filled by Init <br>
   Standard_EXPORT   IGESData_DirPart();
diff --git a/inc/IGESData_GlobalSection.hxx b/inc/IGESData_GlobalSection.hxx
index b00e36a..5993a01 100644
--- a/inc/IGESData_GlobalSection.hxx
+++ b/inc/IGESData_GlobalSection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class gp_XYZ;
 class IGESData_GlobalSection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty GlobalSection, ready to be filled, <br>
 //!  Warning : No default value is provided <br>
diff --git a/inc/IGESData_IGESDumper.hxx b/inc/IGESData_IGESDumper.hxx
index 51e6e63..e2143f5 100644
--- a/inc/IGESData_IGESDumper.hxx
+++ b/inc/IGESData_IGESDumper.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class Message_Messenger;
 class IGESData_IGESDumper  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns an IGESDumper ready to work. The IGESModel provides <br>
 //!           the numbering of Entities : as for any InterfaceModel, it <br>
diff --git a/inc/IGESData_IGESReaderTool.hxx b/inc/IGESData_IGESReaderTool.hxx
index 535c25d..84797a9 100644
--- a/inc/IGESData_IGESReaderTool.hxx
+++ b/inc/IGESData_IGESReaderTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -78,18 +81,7 @@ class IGESData_ParamReader;
 class IGESData_IGESReaderTool  : public Interface_FileReaderTool {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates IGESReaderTool to work with an IGESReaderData and an <br>
 //!           IGES Protocol. <br>
diff --git a/inc/IGESData_IGESType.hxx b/inc/IGESData_IGESType.hxx
index b4966b2..24cdd4d 100644
--- a/inc/IGESData_IGESType.hxx
+++ b/inc/IGESData_IGESType.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@
 class IGESData_IGESType  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESData_IGESType();
diff --git a/inc/IGESData_IGESWriter.hxx b/inc/IGESData_IGESWriter.hxx
index d711b6a..dbaaf8a 100644
--- a/inc/IGESData_IGESWriter.hxx
+++ b/inc/IGESData_IGESWriter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -79,18 +82,7 @@ class gp_XYZ;
 class IGESData_IGESWriter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an IGESWriter, empty ready to work <br>
 //!           (see the methods SendModel and Print) <br>
diff --git a/inc/IGESData_ParamCursor.hxx b/inc/IGESData_ParamCursor.hxx
index 71217b9..8c80e19 100644
--- a/inc/IGESData_ParamCursor.hxx
+++ b/inc/IGESData_ParamCursor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class Interface_InterfaceError;
 class IGESData_ParamCursor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Cursor to read a precise parameter of ParamReader, <br>
 //!           identified by its number, then set Current Number to "num + 1" <br>
diff --git a/inc/IGESData_ParamReader.hxx b/inc/IGESData_ParamReader.hxx
index 1e62d63..0bb4bbc 100644
--- a/inc/IGESData_ParamReader.hxx
+++ b/inc/IGESData_ParamReader.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -95,18 +98,7 @@ class Interface_EntityList;
 class IGESData_ParamReader  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares a ParamReader, stage "Own", current param = 1 <br>
 //!           It considers a part of the list, from <base> (excluded) for <br>
diff --git a/inc/IGESData_SpecificLib.hxx b/inc/IGESData_SpecificLib.hxx
index b2ceea9..6b92759 100644
--- a/inc/IGESData_SpecificLib.hxx
+++ b/inc/IGESData_SpecificLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Standard_Transient;
 class IGESData_SpecificLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void SetGlobal(const Handle(IGESData_SpecificModule)& amodule,const Handle(IGESData_Protocol)& aprotocol) ;
diff --git a/inc/IGESData_WriterLib.hxx b/inc/IGESData_WriterLib.hxx
index 949f3b7..11f73c3 100644
--- a/inc/IGESData_WriterLib.hxx
+++ b/inc/IGESData_WriterLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Standard_Transient;
 class IGESData_WriterLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void SetGlobal(const Handle(IGESData_ReadWriteModule)& amodule,const Handle(IGESData_Protocol)& aprotocol) ;
diff --git a/inc/IGESDefs.hxx b/inc/IGESDefs.hxx
index 4303b38..b888078 100644
--- a/inc/IGESDefs.hxx
+++ b/inc/IGESDefs.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class IGESDefs_HArray1OfHArray1OfTextDisplayTemplate;
 class IGESDefs  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares dynamic data (Protocol, Modules) for this package <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/IGESDefs_Array1OfTabularData.hxx b/inc/IGESDefs_Array1OfTabularData.hxx
index 8ee1e85..6c6ce8f 100644
--- a/inc/IGESDefs_Array1OfTabularData.hxx
+++ b/inc/IGESDefs_Array1OfTabularData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESDefs_TabularData;
 class IGESDefs_Array1OfTabularData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESDefs_Array1OfTabularData(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESDefs_ToolAssociativityDef.hxx b/inc/IGESDefs_ToolAssociativityDef.hxx
index 98e4756..2c8e68f 100644
--- a/inc/IGESDefs_ToolAssociativityDef.hxx
+++ b/inc/IGESDefs_ToolAssociativityDef.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDefs_ToolAssociativityDef  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolAssociativityDef, ready to work <br>
   Standard_EXPORT   IGESDefs_ToolAssociativityDef();
diff --git a/inc/IGESDefs_ToolAttributeDef.hxx b/inc/IGESDefs_ToolAttributeDef.hxx
index 111a219..fe00726 100644
--- a/inc/IGESDefs_ToolAttributeDef.hxx
+++ b/inc/IGESDefs_ToolAttributeDef.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDefs_ToolAttributeDef  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolAttributeDef, ready to work <br>
   Standard_EXPORT   IGESDefs_ToolAttributeDef();
diff --git a/inc/IGESDefs_ToolAttributeTable.hxx b/inc/IGESDefs_ToolAttributeTable.hxx
index cb8e55b..50b6e2c 100644
--- a/inc/IGESDefs_ToolAttributeTable.hxx
+++ b/inc/IGESDefs_ToolAttributeTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDefs_ToolAttributeTable  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolAttributeTable, ready to work <br>
   Standard_EXPORT   IGESDefs_ToolAttributeTable();
diff --git a/inc/IGESDefs_ToolGenericData.hxx b/inc/IGESDefs_ToolGenericData.hxx
index 526c09c..2e8a36c 100644
--- a/inc/IGESDefs_ToolGenericData.hxx
+++ b/inc/IGESDefs_ToolGenericData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDefs_ToolGenericData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolGenericData, ready to work <br>
   Standard_EXPORT   IGESDefs_ToolGenericData();
diff --git a/inc/IGESDefs_ToolMacroDef.hxx b/inc/IGESDefs_ToolMacroDef.hxx
index c430359..1d609dd 100644
--- a/inc/IGESDefs_ToolMacroDef.hxx
+++ b/inc/IGESDefs_ToolMacroDef.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDefs_ToolMacroDef  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolMacroDef, ready to work <br>
   Standard_EXPORT   IGESDefs_ToolMacroDef();
diff --git a/inc/IGESDefs_ToolTabularData.hxx b/inc/IGESDefs_ToolTabularData.hxx
index 5b23140..81e7b9c 100644
--- a/inc/IGESDefs_ToolTabularData.hxx
+++ b/inc/IGESDefs_ToolTabularData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDefs_ToolTabularData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolTabularData, ready to work <br>
   Standard_EXPORT   IGESDefs_ToolTabularData();
diff --git a/inc/IGESDefs_ToolUnitsData.hxx b/inc/IGESDefs_ToolUnitsData.hxx
index 82cfd52..4303e17 100644
--- a/inc/IGESDefs_ToolUnitsData.hxx
+++ b/inc/IGESDefs_ToolUnitsData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDefs_ToolUnitsData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolUnitsData, ready to work <br>
   Standard_EXPORT   IGESDefs_ToolUnitsData();
diff --git a/inc/IGESDimen.hxx b/inc/IGESDimen.hxx
index 40c36b6..668aaba 100644
--- a/inc/IGESDimen.hxx
+++ b/inc/IGESDimen.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -79,18 +82,7 @@ class IGESDimen_HArray1OfGeneralNote;
 class IGESDimen  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares dynamic data (Protocol, Modules) for this package <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/IGESDimen_Array1OfGeneralNote.hxx b/inc/IGESDimen_Array1OfGeneralNote.hxx
index 489b966..d63fb3f 100644
--- a/inc/IGESDimen_Array1OfGeneralNote.hxx
+++ b/inc/IGESDimen_Array1OfGeneralNote.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESDimen_GeneralNote;
 class IGESDimen_Array1OfGeneralNote  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESDimen_Array1OfGeneralNote(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESDimen_Array1OfLeaderArrow.hxx b/inc/IGESDimen_Array1OfLeaderArrow.hxx
index 049c4b8..181d57d 100644
--- a/inc/IGESDimen_Array1OfLeaderArrow.hxx
+++ b/inc/IGESDimen_Array1OfLeaderArrow.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESDimen_LeaderArrow;
 class IGESDimen_Array1OfLeaderArrow  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESDimen_Array1OfLeaderArrow(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESDimen_ToolAngularDimension.hxx b/inc/IGESDimen_ToolAngularDimension.hxx
index 5bfb9ef..77fa30a 100644
--- a/inc/IGESDimen_ToolAngularDimension.hxx
+++ b/inc/IGESDimen_ToolAngularDimension.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolAngularDimension  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolAngularDimension, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolAngularDimension();
diff --git a/inc/IGESDimen_ToolBasicDimension.hxx b/inc/IGESDimen_ToolBasicDimension.hxx
index 5e7016d..1cbe78d 100644
--- a/inc/IGESDimen_ToolBasicDimension.hxx
+++ b/inc/IGESDimen_ToolBasicDimension.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDimen_ToolBasicDimension  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolBasicDimension, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolBasicDimension();
diff --git a/inc/IGESDimen_ToolCenterLine.hxx b/inc/IGESDimen_ToolCenterLine.hxx
index b8cd30c..d3ca9f5 100644
--- a/inc/IGESDimen_ToolCenterLine.hxx
+++ b/inc/IGESDimen_ToolCenterLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDimen_ToolCenterLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolCenterLine, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolCenterLine();
diff --git a/inc/IGESDimen_ToolCurveDimension.hxx b/inc/IGESDimen_ToolCurveDimension.hxx
index 609ca27..704d0f8 100644
--- a/inc/IGESDimen_ToolCurveDimension.hxx
+++ b/inc/IGESDimen_ToolCurveDimension.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolCurveDimension  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolCurveDimension, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolCurveDimension();
diff --git a/inc/IGESDimen_ToolDiameterDimension.hxx b/inc/IGESDimen_ToolDiameterDimension.hxx
index 7c0814b..c61f0b1 100644
--- a/inc/IGESDimen_ToolDiameterDimension.hxx
+++ b/inc/IGESDimen_ToolDiameterDimension.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolDiameterDimension  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolDiameterDimension, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolDiameterDimension();
diff --git a/inc/IGESDimen_ToolDimensionDisplayData.hxx b/inc/IGESDimen_ToolDimensionDisplayData.hxx
index 37db67a..27e7cfd 100644
--- a/inc/IGESDimen_ToolDimensionDisplayData.hxx
+++ b/inc/IGESDimen_ToolDimensionDisplayData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDimen_ToolDimensionDisplayData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolDimensionDisplayData, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolDimensionDisplayData();
diff --git a/inc/IGESDimen_ToolDimensionTolerance.hxx b/inc/IGESDimen_ToolDimensionTolerance.hxx
index 73a889d..8077337 100644
--- a/inc/IGESDimen_ToolDimensionTolerance.hxx
+++ b/inc/IGESDimen_ToolDimensionTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDimen_ToolDimensionTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolDimensionTolerance, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolDimensionTolerance();
diff --git a/inc/IGESDimen_ToolDimensionUnits.hxx b/inc/IGESDimen_ToolDimensionUnits.hxx
index d42429e..0902ff3 100644
--- a/inc/IGESDimen_ToolDimensionUnits.hxx
+++ b/inc/IGESDimen_ToolDimensionUnits.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDimen_ToolDimensionUnits  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolDimensionUnits, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolDimensionUnits();
diff --git a/inc/IGESDimen_ToolDimensionedGeometry.hxx b/inc/IGESDimen_ToolDimensionedGeometry.hxx
index 73d1825..9094a91 100644
--- a/inc/IGESDimen_ToolDimensionedGeometry.hxx
+++ b/inc/IGESDimen_ToolDimensionedGeometry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDimen_ToolDimensionedGeometry  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolDimensionedGeometry, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolDimensionedGeometry();
diff --git a/inc/IGESDimen_ToolFlagNote.hxx b/inc/IGESDimen_ToolFlagNote.hxx
index 5a3a532..62817bb 100644
--- a/inc/IGESDimen_ToolFlagNote.hxx
+++ b/inc/IGESDimen_ToolFlagNote.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolFlagNote  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolFlagNote, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolFlagNote();
diff --git a/inc/IGESDimen_ToolGeneralLabel.hxx b/inc/IGESDimen_ToolGeneralLabel.hxx
index c83a69c..cac4f9c 100644
--- a/inc/IGESDimen_ToolGeneralLabel.hxx
+++ b/inc/IGESDimen_ToolGeneralLabel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolGeneralLabel  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolGeneralLabel, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolGeneralLabel();
diff --git a/inc/IGESDimen_ToolGeneralNote.hxx b/inc/IGESDimen_ToolGeneralNote.hxx
index 513d18e..dde9959 100644
--- a/inc/IGESDimen_ToolGeneralNote.hxx
+++ b/inc/IGESDimen_ToolGeneralNote.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolGeneralNote  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolGeneralNote, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolGeneralNote();
diff --git a/inc/IGESDimen_ToolGeneralSymbol.hxx b/inc/IGESDimen_ToolGeneralSymbol.hxx
index ea26618..e2f6dbd 100644
--- a/inc/IGESDimen_ToolGeneralSymbol.hxx
+++ b/inc/IGESDimen_ToolGeneralSymbol.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolGeneralSymbol  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolGeneralSymbol, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolGeneralSymbol();
diff --git a/inc/IGESDimen_ToolLeaderArrow.hxx b/inc/IGESDimen_ToolLeaderArrow.hxx
index 0b82653..0f9a474 100644
--- a/inc/IGESDimen_ToolLeaderArrow.hxx
+++ b/inc/IGESDimen_ToolLeaderArrow.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolLeaderArrow  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolLeaderArrow, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolLeaderArrow();
diff --git a/inc/IGESDimen_ToolLinearDimension.hxx b/inc/IGESDimen_ToolLinearDimension.hxx
index b12c577..1d44dc1 100644
--- a/inc/IGESDimen_ToolLinearDimension.hxx
+++ b/inc/IGESDimen_ToolLinearDimension.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolLinearDimension  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolLinearDimension, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolLinearDimension();
diff --git a/inc/IGESDimen_ToolNewDimensionedGeometry.hxx b/inc/IGESDimen_ToolNewDimensionedGeometry.hxx
index ebde89f..f3fd430 100644
--- a/inc/IGESDimen_ToolNewDimensionedGeometry.hxx
+++ b/inc/IGESDimen_ToolNewDimensionedGeometry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDimen_ToolNewDimensionedGeometry  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolNewDimensionedGeometry, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolNewDimensionedGeometry();
diff --git a/inc/IGESDimen_ToolNewGeneralNote.hxx b/inc/IGESDimen_ToolNewGeneralNote.hxx
index c8b9ac1..8782493 100644
--- a/inc/IGESDimen_ToolNewGeneralNote.hxx
+++ b/inc/IGESDimen_ToolNewGeneralNote.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolNewGeneralNote  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolNewGeneralNote, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolNewGeneralNote();
diff --git a/inc/IGESDimen_ToolOrdinateDimension.hxx b/inc/IGESDimen_ToolOrdinateDimension.hxx
index 7c3c883..6e8807d 100644
--- a/inc/IGESDimen_ToolOrdinateDimension.hxx
+++ b/inc/IGESDimen_ToolOrdinateDimension.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolOrdinateDimension  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolOrdinateDimension, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolOrdinateDimension();
diff --git a/inc/IGESDimen_ToolPointDimension.hxx b/inc/IGESDimen_ToolPointDimension.hxx
index 6e463b1..25be872 100644
--- a/inc/IGESDimen_ToolPointDimension.hxx
+++ b/inc/IGESDimen_ToolPointDimension.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolPointDimension  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolPointDimension, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolPointDimension();
diff --git a/inc/IGESDimen_ToolRadiusDimension.hxx b/inc/IGESDimen_ToolRadiusDimension.hxx
index f902000..5afe2bc 100644
--- a/inc/IGESDimen_ToolRadiusDimension.hxx
+++ b/inc/IGESDimen_ToolRadiusDimension.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolRadiusDimension  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolRadiusDimension, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolRadiusDimension();
diff --git a/inc/IGESDimen_ToolSection.hxx b/inc/IGESDimen_ToolSection.hxx
index c905df9..447f2bf 100644
--- a/inc/IGESDimen_ToolSection.hxx
+++ b/inc/IGESDimen_ToolSection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDimen_ToolSection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSection, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolSection();
diff --git a/inc/IGESDimen_ToolSectionedArea.hxx b/inc/IGESDimen_ToolSectionedArea.hxx
index 826b1a9..9f30784 100644
--- a/inc/IGESDimen_ToolSectionedArea.hxx
+++ b/inc/IGESDimen_ToolSectionedArea.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDimen_ToolSectionedArea  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSectionedArea, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolSectionedArea();
diff --git a/inc/IGESDimen_ToolWitnessLine.hxx b/inc/IGESDimen_ToolWitnessLine.hxx
index 59ebb62..f9ff841 100644
--- a/inc/IGESDimen_ToolWitnessLine.hxx
+++ b/inc/IGESDimen_ToolWitnessLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDimen_ToolWitnessLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolWitnessLine, ready to work <br>
   Standard_EXPORT   IGESDimen_ToolWitnessLine();
diff --git a/inc/IGESDraw.hxx b/inc/IGESDraw.hxx
index b685ff1..b8c87b6 100644
--- a/inc/IGESDraw.hxx
+++ b/inc/IGESDraw.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class IGESDraw_HArray1OfViewKindEntity;
 class IGESDraw  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares dynamic data (Protocol, Modules) for this package <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/IGESDraw_Array1OfConnectPoint.hxx b/inc/IGESDraw_Array1OfConnectPoint.hxx
index ce51bd0..085f3af 100644
--- a/inc/IGESDraw_Array1OfConnectPoint.hxx
+++ b/inc/IGESDraw_Array1OfConnectPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESDraw_ConnectPoint;
 class IGESDraw_Array1OfConnectPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESDraw_Array1OfConnectPoint(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESDraw_Array1OfViewKindEntity.hxx b/inc/IGESDraw_Array1OfViewKindEntity.hxx
index f3e6207..a81afbf 100644
--- a/inc/IGESDraw_Array1OfViewKindEntity.hxx
+++ b/inc/IGESDraw_Array1OfViewKindEntity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESData_ViewKindEntity;
 class IGESDraw_Array1OfViewKindEntity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESDraw_Array1OfViewKindEntity(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESDraw_ToolCircArraySubfigure.hxx b/inc/IGESDraw_ToolCircArraySubfigure.hxx
index cc2a244..18bc2ec 100644
--- a/inc/IGESDraw_ToolCircArraySubfigure.hxx
+++ b/inc/IGESDraw_ToolCircArraySubfigure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDraw_ToolCircArraySubfigure  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolCircArraySubfigure, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolCircArraySubfigure();
diff --git a/inc/IGESDraw_ToolConnectPoint.hxx b/inc/IGESDraw_ToolConnectPoint.hxx
index 7689789..7eca303 100644
--- a/inc/IGESDraw_ToolConnectPoint.hxx
+++ b/inc/IGESDraw_ToolConnectPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDraw_ToolConnectPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolConnectPoint, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolConnectPoint();
diff --git a/inc/IGESDraw_ToolDrawing.hxx b/inc/IGESDraw_ToolDrawing.hxx
index bb7ce1e..04d4d16 100644
--- a/inc/IGESDraw_ToolDrawing.hxx
+++ b/inc/IGESDraw_ToolDrawing.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDraw_ToolDrawing  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolDrawing, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolDrawing();
diff --git a/inc/IGESDraw_ToolDrawingWithRotation.hxx b/inc/IGESDraw_ToolDrawingWithRotation.hxx
index 68b15db..37f9da3 100644
--- a/inc/IGESDraw_ToolDrawingWithRotation.hxx
+++ b/inc/IGESDraw_ToolDrawingWithRotation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDraw_ToolDrawingWithRotation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolDrawingWithRotation, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolDrawingWithRotation();
diff --git a/inc/IGESDraw_ToolLabelDisplay.hxx b/inc/IGESDraw_ToolLabelDisplay.hxx
index 87a33a3..ee3f2d6 100644
--- a/inc/IGESDraw_ToolLabelDisplay.hxx
+++ b/inc/IGESDraw_ToolLabelDisplay.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDraw_ToolLabelDisplay  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolLabelDisplay, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolLabelDisplay();
diff --git a/inc/IGESDraw_ToolNetworkSubfigure.hxx b/inc/IGESDraw_ToolNetworkSubfigure.hxx
index f18a8f2..5cc7306 100644
--- a/inc/IGESDraw_ToolNetworkSubfigure.hxx
+++ b/inc/IGESDraw_ToolNetworkSubfigure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDraw_ToolNetworkSubfigure  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolNetworkSubfigure, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolNetworkSubfigure();
diff --git a/inc/IGESDraw_ToolNetworkSubfigureDef.hxx b/inc/IGESDraw_ToolNetworkSubfigureDef.hxx
index a7bbf10..83f8520 100644
--- a/inc/IGESDraw_ToolNetworkSubfigureDef.hxx
+++ b/inc/IGESDraw_ToolNetworkSubfigureDef.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDraw_ToolNetworkSubfigureDef  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolNetworkSubfigureDef, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolNetworkSubfigureDef();
diff --git a/inc/IGESDraw_ToolPerspectiveView.hxx b/inc/IGESDraw_ToolPerspectiveView.hxx
index 86ca79b..59a5aca 100644
--- a/inc/IGESDraw_ToolPerspectiveView.hxx
+++ b/inc/IGESDraw_ToolPerspectiveView.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDraw_ToolPerspectiveView  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolPerspectiveView, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolPerspectiveView();
diff --git a/inc/IGESDraw_ToolPlanar.hxx b/inc/IGESDraw_ToolPlanar.hxx
index 96ed6a3..8a1470a 100644
--- a/inc/IGESDraw_ToolPlanar.hxx
+++ b/inc/IGESDraw_ToolPlanar.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDraw_ToolPlanar  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolPlanar, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolPlanar();
diff --git a/inc/IGESDraw_ToolRectArraySubfigure.hxx b/inc/IGESDraw_ToolRectArraySubfigure.hxx
index 6736f60..bc60365 100644
--- a/inc/IGESDraw_ToolRectArraySubfigure.hxx
+++ b/inc/IGESDraw_ToolRectArraySubfigure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDraw_ToolRectArraySubfigure  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolRectArraySubfigure, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolRectArraySubfigure();
diff --git a/inc/IGESDraw_ToolSegmentedViewsVisible.hxx b/inc/IGESDraw_ToolSegmentedViewsVisible.hxx
index c3ff1e2..0acf75c 100644
--- a/inc/IGESDraw_ToolSegmentedViewsVisible.hxx
+++ b/inc/IGESDraw_ToolSegmentedViewsVisible.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDraw_ToolSegmentedViewsVisible  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSegmentedViewsVisible, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolSegmentedViewsVisible();
diff --git a/inc/IGESDraw_ToolView.hxx b/inc/IGESDraw_ToolView.hxx
index 3f5b6a8..3328faa 100644
--- a/inc/IGESDraw_ToolView.hxx
+++ b/inc/IGESDraw_ToolView.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESDraw_ToolView  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolView, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolView();
diff --git a/inc/IGESDraw_ToolViewsVisible.hxx b/inc/IGESDraw_ToolViewsVisible.hxx
index 25e0dd5..d8d8f51 100644
--- a/inc/IGESDraw_ToolViewsVisible.hxx
+++ b/inc/IGESDraw_ToolViewsVisible.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDraw_ToolViewsVisible  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolViewsVisible, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolViewsVisible();
diff --git a/inc/IGESDraw_ToolViewsVisibleWithAttr.hxx b/inc/IGESDraw_ToolViewsVisibleWithAttr.hxx
index 74d7fd7..b013b51 100644
--- a/inc/IGESDraw_ToolViewsVisibleWithAttr.hxx
+++ b/inc/IGESDraw_ToolViewsVisibleWithAttr.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESDraw_ToolViewsVisibleWithAttr  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolViewsVisibleWithAttr, ready to work <br>
   Standard_EXPORT   IGESDraw_ToolViewsVisibleWithAttr();
diff --git a/inc/IGESGeom.hxx b/inc/IGESGeom.hxx
index d4413a4..2e56578 100644
--- a/inc/IGESGeom.hxx
+++ b/inc/IGESGeom.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -79,18 +82,7 @@ class IGESGeom_HArray1OfTransformationMatrix;
 class IGESGeom  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares dymanic data (Protocol, Modules) for this package <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/IGESGeom_Array1OfBoundary.hxx b/inc/IGESGeom_Array1OfBoundary.hxx
index 11352eb..ba1424c 100644
--- a/inc/IGESGeom_Array1OfBoundary.hxx
+++ b/inc/IGESGeom_Array1OfBoundary.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESGeom_Boundary;
 class IGESGeom_Array1OfBoundary  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESGeom_Array1OfBoundary(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESGeom_Array1OfCurveOnSurface.hxx b/inc/IGESGeom_Array1OfCurveOnSurface.hxx
index ca996db..b60441d 100644
--- a/inc/IGESGeom_Array1OfCurveOnSurface.hxx
+++ b/inc/IGESGeom_Array1OfCurveOnSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESGeom_CurveOnSurface;
 class IGESGeom_Array1OfCurveOnSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESGeom_Array1OfCurveOnSurface(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESGeom_Array1OfTransformationMatrix.hxx b/inc/IGESGeom_Array1OfTransformationMatrix.hxx
index df1f39a..bb59763 100644
--- a/inc/IGESGeom_Array1OfTransformationMatrix.hxx
+++ b/inc/IGESGeom_Array1OfTransformationMatrix.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESGeom_TransformationMatrix;
 class IGESGeom_Array1OfTransformationMatrix  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESGeom_Array1OfTransformationMatrix(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESGeom_ToolBSplineCurve.hxx b/inc/IGESGeom_ToolBSplineCurve.hxx
index b1b6fec..d82175b 100644
--- a/inc/IGESGeom_ToolBSplineCurve.hxx
+++ b/inc/IGESGeom_ToolBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolBSplineCurve, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolBSplineCurve();
diff --git a/inc/IGESGeom_ToolBSplineSurface.hxx b/inc/IGESGeom_ToolBSplineSurface.hxx
index fb83964..7c0a07d 100644
--- a/inc/IGESGeom_ToolBSplineSurface.hxx
+++ b/inc/IGESGeom_ToolBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolBSplineSurface, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolBSplineSurface();
diff --git a/inc/IGESGeom_ToolBoundary.hxx b/inc/IGESGeom_ToolBoundary.hxx
index e741805..4eac1e4 100644
--- a/inc/IGESGeom_ToolBoundary.hxx
+++ b/inc/IGESGeom_ToolBoundary.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGeom_ToolBoundary  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolBoundary, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolBoundary();
diff --git a/inc/IGESGeom_ToolBoundedSurface.hxx b/inc/IGESGeom_ToolBoundedSurface.hxx
index c0eb65e..960e151 100644
--- a/inc/IGESGeom_ToolBoundedSurface.hxx
+++ b/inc/IGESGeom_ToolBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolBoundedSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolBoundedSurface, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolBoundedSurface();
diff --git a/inc/IGESGeom_ToolCircularArc.hxx b/inc/IGESGeom_ToolCircularArc.hxx
index e2396be..a3ce14f 100644
--- a/inc/IGESGeom_ToolCircularArc.hxx
+++ b/inc/IGESGeom_ToolCircularArc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolCircularArc  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolCircularArc, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolCircularArc();
diff --git a/inc/IGESGeom_ToolCompositeCurve.hxx b/inc/IGESGeom_ToolCompositeCurve.hxx
index 0111727..df47237 100644
--- a/inc/IGESGeom_ToolCompositeCurve.hxx
+++ b/inc/IGESGeom_ToolCompositeCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolCompositeCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolCompositeCurve, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolCompositeCurve();
diff --git a/inc/IGESGeom_ToolConicArc.hxx b/inc/IGESGeom_ToolConicArc.hxx
index 9e26689..8ffb4b8 100644
--- a/inc/IGESGeom_ToolConicArc.hxx
+++ b/inc/IGESGeom_ToolConicArc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGeom_ToolConicArc  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolConicArc, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolConicArc();
diff --git a/inc/IGESGeom_ToolCopiousData.hxx b/inc/IGESGeom_ToolCopiousData.hxx
index d761795..fbe953a 100644
--- a/inc/IGESGeom_ToolCopiousData.hxx
+++ b/inc/IGESGeom_ToolCopiousData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolCopiousData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolCopiousData, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolCopiousData();
diff --git a/inc/IGESGeom_ToolCurveOnSurface.hxx b/inc/IGESGeom_ToolCurveOnSurface.hxx
index 8031e8e..796744b 100644
--- a/inc/IGESGeom_ToolCurveOnSurface.hxx
+++ b/inc/IGESGeom_ToolCurveOnSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGeom_ToolCurveOnSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolCurveOnSurface, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolCurveOnSurface();
diff --git a/inc/IGESGeom_ToolDirection.hxx b/inc/IGESGeom_ToolDirection.hxx
index 2d4e6f7..9a76eba 100644
--- a/inc/IGESGeom_ToolDirection.hxx
+++ b/inc/IGESGeom_ToolDirection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolDirection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolDirection, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolDirection();
diff --git a/inc/IGESGeom_ToolFlash.hxx b/inc/IGESGeom_ToolFlash.hxx
index e4ec63f..a632aaf 100644
--- a/inc/IGESGeom_ToolFlash.hxx
+++ b/inc/IGESGeom_ToolFlash.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGeom_ToolFlash  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolFlash, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolFlash();
diff --git a/inc/IGESGeom_ToolLine.hxx b/inc/IGESGeom_ToolLine.hxx
index 50b35c0..ac86c68 100644
--- a/inc/IGESGeom_ToolLine.hxx
+++ b/inc/IGESGeom_ToolLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolLine, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolLine();
diff --git a/inc/IGESGeom_ToolOffsetCurve.hxx b/inc/IGESGeom_ToolOffsetCurve.hxx
index 9fb2203..2c82cdd 100644
--- a/inc/IGESGeom_ToolOffsetCurve.hxx
+++ b/inc/IGESGeom_ToolOffsetCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGeom_ToolOffsetCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolOffsetCurve, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolOffsetCurve();
diff --git a/inc/IGESGeom_ToolOffsetSurface.hxx b/inc/IGESGeom_ToolOffsetSurface.hxx
index 2a57d28..b91bb2a 100644
--- a/inc/IGESGeom_ToolOffsetSurface.hxx
+++ b/inc/IGESGeom_ToolOffsetSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolOffsetSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolOffsetSurface, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolOffsetSurface();
diff --git a/inc/IGESGeom_ToolPlane.hxx b/inc/IGESGeom_ToolPlane.hxx
index cd02edd..487cae1 100644
--- a/inc/IGESGeom_ToolPlane.hxx
+++ b/inc/IGESGeom_ToolPlane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolPlane  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolPlane, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolPlane();
diff --git a/inc/IGESGeom_ToolPoint.hxx b/inc/IGESGeom_ToolPoint.hxx
index 97d6bc8..53ca73b 100644
--- a/inc/IGESGeom_ToolPoint.hxx
+++ b/inc/IGESGeom_ToolPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolPoint, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolPoint();
diff --git a/inc/IGESGeom_ToolRuledSurface.hxx b/inc/IGESGeom_ToolRuledSurface.hxx
index 0095c01..63e4b01 100644
--- a/inc/IGESGeom_ToolRuledSurface.hxx
+++ b/inc/IGESGeom_ToolRuledSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolRuledSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolRuledSurface, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolRuledSurface();
diff --git a/inc/IGESGeom_ToolSplineCurve.hxx b/inc/IGESGeom_ToolSplineCurve.hxx
index 64b7dce..328f3bb 100644
--- a/inc/IGESGeom_ToolSplineCurve.hxx
+++ b/inc/IGESGeom_ToolSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSplineCurve, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolSplineCurve();
diff --git a/inc/IGESGeom_ToolSplineSurface.hxx b/inc/IGESGeom_ToolSplineSurface.hxx
index 02fe92a..ce16889 100644
--- a/inc/IGESGeom_ToolSplineSurface.hxx
+++ b/inc/IGESGeom_ToolSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSplineSurface, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolSplineSurface();
diff --git a/inc/IGESGeom_ToolSurfaceOfRevolution.hxx b/inc/IGESGeom_ToolSurfaceOfRevolution.hxx
index 712f201..a7adb9a 100644
--- a/inc/IGESGeom_ToolSurfaceOfRevolution.hxx
+++ b/inc/IGESGeom_ToolSurfaceOfRevolution.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolSurfaceOfRevolution  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSurfaceOfRevolution, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolSurfaceOfRevolution();
diff --git a/inc/IGESGeom_ToolTabulatedCylinder.hxx b/inc/IGESGeom_ToolTabulatedCylinder.hxx
index 01392d3..44727e5 100644
--- a/inc/IGESGeom_ToolTabulatedCylinder.hxx
+++ b/inc/IGESGeom_ToolTabulatedCylinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolTabulatedCylinder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolTabulatedCylinder, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolTabulatedCylinder();
diff --git a/inc/IGESGeom_ToolTransformationMatrix.hxx b/inc/IGESGeom_ToolTransformationMatrix.hxx
index 25f8f8d..ce64749 100644
--- a/inc/IGESGeom_ToolTransformationMatrix.hxx
+++ b/inc/IGESGeom_ToolTransformationMatrix.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGeom_ToolTransformationMatrix  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolTransformationMatrix, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolTransformationMatrix();
diff --git a/inc/IGESGeom_ToolTrimmedSurface.hxx b/inc/IGESGeom_ToolTrimmedSurface.hxx
index d4aecca..7bb8ab0 100644
--- a/inc/IGESGeom_ToolTrimmedSurface.hxx
+++ b/inc/IGESGeom_ToolTrimmedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGeom_ToolTrimmedSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolTrimmedSurface, ready to work <br>
   Standard_EXPORT   IGESGeom_ToolTrimmedSurface();
diff --git a/inc/IGESGraph.hxx b/inc/IGESGraph.hxx
index 2c5ba35..1415a59 100644
--- a/inc/IGESGraph.hxx
+++ b/inc/IGESGraph.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class IGESGraph_HArray1OfTextFontDef;
 class IGESGraph  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares dynamic data (Protocol, Modules) for this package <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/IGESGraph_Array1OfColor.hxx b/inc/IGESGraph_Array1OfColor.hxx
index fac354e..155809d 100644
--- a/inc/IGESGraph_Array1OfColor.hxx
+++ b/inc/IGESGraph_Array1OfColor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESGraph_Color;
 class IGESGraph_Array1OfColor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESGraph_Array1OfColor(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESGraph_Array1OfTextDisplayTemplate.hxx b/inc/IGESGraph_Array1OfTextDisplayTemplate.hxx
index 49565af..06d5205 100644
--- a/inc/IGESGraph_Array1OfTextDisplayTemplate.hxx
+++ b/inc/IGESGraph_Array1OfTextDisplayTemplate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESGraph_TextDisplayTemplate;
 class IGESGraph_Array1OfTextDisplayTemplate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESGraph_Array1OfTextDisplayTemplate(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESGraph_Array1OfTextFontDef.hxx b/inc/IGESGraph_Array1OfTextFontDef.hxx
index f02b806..2571704 100644
--- a/inc/IGESGraph_Array1OfTextFontDef.hxx
+++ b/inc/IGESGraph_Array1OfTextFontDef.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESGraph_TextFontDef;
 class IGESGraph_Array1OfTextFontDef  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESGraph_Array1OfTextFontDef(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESGraph_ToolColor.hxx b/inc/IGESGraph_ToolColor.hxx
index d0ffc66..a93a5f7 100644
--- a/inc/IGESGraph_ToolColor.hxx
+++ b/inc/IGESGraph_ToolColor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGraph_ToolColor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolColor, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolColor();
diff --git a/inc/IGESGraph_ToolDefinitionLevel.hxx b/inc/IGESGraph_ToolDefinitionLevel.hxx
index 5073dd4..c4a678f 100644
--- a/inc/IGESGraph_ToolDefinitionLevel.hxx
+++ b/inc/IGESGraph_ToolDefinitionLevel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGraph_ToolDefinitionLevel  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolDefinitionLevel, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolDefinitionLevel();
diff --git a/inc/IGESGraph_ToolDrawingSize.hxx b/inc/IGESGraph_ToolDrawingSize.hxx
index 8446894..cf019c6 100644
--- a/inc/IGESGraph_ToolDrawingSize.hxx
+++ b/inc/IGESGraph_ToolDrawingSize.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGraph_ToolDrawingSize  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolDrawingSize, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolDrawingSize();
diff --git a/inc/IGESGraph_ToolDrawingUnits.hxx b/inc/IGESGraph_ToolDrawingUnits.hxx
index f04c813..92f8c35 100644
--- a/inc/IGESGraph_ToolDrawingUnits.hxx
+++ b/inc/IGESGraph_ToolDrawingUnits.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGraph_ToolDrawingUnits  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolDrawingUnits, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolDrawingUnits();
diff --git a/inc/IGESGraph_ToolHighLight.hxx b/inc/IGESGraph_ToolHighLight.hxx
index aef811a..b57d240 100644
--- a/inc/IGESGraph_ToolHighLight.hxx
+++ b/inc/IGESGraph_ToolHighLight.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGraph_ToolHighLight  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolHighLight, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolHighLight();
diff --git a/inc/IGESGraph_ToolIntercharacterSpacing.hxx b/inc/IGESGraph_ToolIntercharacterSpacing.hxx
index 32699e4..25ffb11 100644
--- a/inc/IGESGraph_ToolIntercharacterSpacing.hxx
+++ b/inc/IGESGraph_ToolIntercharacterSpacing.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGraph_ToolIntercharacterSpacing  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolIntercharacterSpacing, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolIntercharacterSpacing();
diff --git a/inc/IGESGraph_ToolLineFontDefPattern.hxx b/inc/IGESGraph_ToolLineFontDefPattern.hxx
index 8cda044..8714e72 100644
--- a/inc/IGESGraph_ToolLineFontDefPattern.hxx
+++ b/inc/IGESGraph_ToolLineFontDefPattern.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGraph_ToolLineFontDefPattern  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolLineFontDefPattern, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolLineFontDefPattern();
diff --git a/inc/IGESGraph_ToolLineFontDefTemplate.hxx b/inc/IGESGraph_ToolLineFontDefTemplate.hxx
index 4cc75c3..e195890 100644
--- a/inc/IGESGraph_ToolLineFontDefTemplate.hxx
+++ b/inc/IGESGraph_ToolLineFontDefTemplate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGraph_ToolLineFontDefTemplate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolLineFontDefTemplate, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolLineFontDefTemplate();
diff --git a/inc/IGESGraph_ToolLineFontPredefined.hxx b/inc/IGESGraph_ToolLineFontPredefined.hxx
index 20168c8..a6ab798 100644
--- a/inc/IGESGraph_ToolLineFontPredefined.hxx
+++ b/inc/IGESGraph_ToolLineFontPredefined.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGraph_ToolLineFontPredefined  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolLineFontPredefined, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolLineFontPredefined();
diff --git a/inc/IGESGraph_ToolNominalSize.hxx b/inc/IGESGraph_ToolNominalSize.hxx
index 942b956..25ac20c 100644
--- a/inc/IGESGraph_ToolNominalSize.hxx
+++ b/inc/IGESGraph_ToolNominalSize.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGraph_ToolNominalSize  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolNominalSize, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolNominalSize();
diff --git a/inc/IGESGraph_ToolPick.hxx b/inc/IGESGraph_ToolPick.hxx
index c806559..30df65f 100644
--- a/inc/IGESGraph_ToolPick.hxx
+++ b/inc/IGESGraph_ToolPick.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGraph_ToolPick  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolPick, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolPick();
diff --git a/inc/IGESGraph_ToolTextDisplayTemplate.hxx b/inc/IGESGraph_ToolTextDisplayTemplate.hxx
index f29c543..df83c21 100644
--- a/inc/IGESGraph_ToolTextDisplayTemplate.hxx
+++ b/inc/IGESGraph_ToolTextDisplayTemplate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGraph_ToolTextDisplayTemplate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolTextDisplayTemplate, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolTextDisplayTemplate();
diff --git a/inc/IGESGraph_ToolTextFontDef.hxx b/inc/IGESGraph_ToolTextFontDef.hxx
index 087ef3d..c20e6ab 100644
--- a/inc/IGESGraph_ToolTextFontDef.hxx
+++ b/inc/IGESGraph_ToolTextFontDef.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESGraph_ToolTextFontDef  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolTextFontDef, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolTextFontDef();
diff --git a/inc/IGESGraph_ToolUniformRectGrid.hxx b/inc/IGESGraph_ToolUniformRectGrid.hxx
index 1d7d404..7516045 100644
--- a/inc/IGESGraph_ToolUniformRectGrid.hxx
+++ b/inc/IGESGraph_ToolUniformRectGrid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class Message_Messenger;
 class IGESGraph_ToolUniformRectGrid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolUniformRectGrid, ready to work <br>
   Standard_EXPORT   IGESGraph_ToolUniformRectGrid();
diff --git a/inc/IGESSelect.hxx b/inc/IGESSelect.hxx
index 43c9c1b..ad5fcd7 100644
--- a/inc/IGESSelect.hxx
+++ b/inc/IGESSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -75,18 +78,7 @@ class IGESSelect_Dumper;
 class IGESSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Simply gives a prompt for a conversational action on standard <br>
 //!           input/output. Returns the status of a <br>
diff --git a/inc/IGESSolid.hxx b/inc/IGESSolid.hxx
index b771a1b..906e972 100644
--- a/inc/IGESSolid.hxx
+++ b/inc/IGESSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -84,18 +87,7 @@ class IGESSolid_HArray1OfVertexList;
 class IGESSolid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prepares dynamic data (Protocol, Modules) for this package <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/IGESSolid_Array1OfFace.hxx b/inc/IGESSolid_Array1OfFace.hxx
index a65eb3a..93cd7bb 100644
--- a/inc/IGESSolid_Array1OfFace.hxx
+++ b/inc/IGESSolid_Array1OfFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESSolid_Face;
 class IGESSolid_Array1OfFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESSolid_Array1OfFace(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESSolid_Array1OfLoop.hxx b/inc/IGESSolid_Array1OfLoop.hxx
index d137c36..979900f 100644
--- a/inc/IGESSolid_Array1OfLoop.hxx
+++ b/inc/IGESSolid_Array1OfLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESSolid_Loop;
 class IGESSolid_Array1OfLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESSolid_Array1OfLoop(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESSolid_Array1OfShell.hxx b/inc/IGESSolid_Array1OfShell.hxx
index 724eaac..e9d0b07 100644
--- a/inc/IGESSolid_Array1OfShell.hxx
+++ b/inc/IGESSolid_Array1OfShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESSolid_Shell;
 class IGESSolid_Array1OfShell  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESSolid_Array1OfShell(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESSolid_Array1OfVertexList.hxx b/inc/IGESSolid_Array1OfVertexList.hxx
index b04dd6a..98b36fb 100644
--- a/inc/IGESSolid_Array1OfVertexList.hxx
+++ b/inc/IGESSolid_Array1OfVertexList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IGESSolid_VertexList;
 class IGESSolid_Array1OfVertexList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IGESSolid_Array1OfVertexList(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IGESSolid_ToolBlock.hxx b/inc/IGESSolid_ToolBlock.hxx
index 533035a..8561202 100644
--- a/inc/IGESSolid_ToolBlock.hxx
+++ b/inc/IGESSolid_ToolBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolBlock  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolBlock, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolBlock();
diff --git a/inc/IGESSolid_ToolBooleanTree.hxx b/inc/IGESSolid_ToolBooleanTree.hxx
index bd24aa0..8459793 100644
--- a/inc/IGESSolid_ToolBooleanTree.hxx
+++ b/inc/IGESSolid_ToolBooleanTree.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolBooleanTree  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolBooleanTree, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolBooleanTree();
diff --git a/inc/IGESSolid_ToolConeFrustum.hxx b/inc/IGESSolid_ToolConeFrustum.hxx
index df6824b..795dcb0 100644
--- a/inc/IGESSolid_ToolConeFrustum.hxx
+++ b/inc/IGESSolid_ToolConeFrustum.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolConeFrustum  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolConeFrustum, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolConeFrustum();
diff --git a/inc/IGESSolid_ToolConicalSurface.hxx b/inc/IGESSolid_ToolConicalSurface.hxx
index a72ccf5..b88f643 100644
--- a/inc/IGESSolid_ToolConicalSurface.hxx
+++ b/inc/IGESSolid_ToolConicalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolConicalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolConicalSurface, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolConicalSurface();
diff --git a/inc/IGESSolid_ToolCylinder.hxx b/inc/IGESSolid_ToolCylinder.hxx
index 9b0b077..52461fe 100644
--- a/inc/IGESSolid_ToolCylinder.hxx
+++ b/inc/IGESSolid_ToolCylinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolCylinder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolCylinder, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolCylinder();
diff --git a/inc/IGESSolid_ToolCylindricalSurface.hxx b/inc/IGESSolid_ToolCylindricalSurface.hxx
index 4ba7698..c528799 100644
--- a/inc/IGESSolid_ToolCylindricalSurface.hxx
+++ b/inc/IGESSolid_ToolCylindricalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolCylindricalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolCylindricalSurface, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolCylindricalSurface();
diff --git a/inc/IGESSolid_ToolEdgeList.hxx b/inc/IGESSolid_ToolEdgeList.hxx
index 0a13022..681d082 100644
--- a/inc/IGESSolid_ToolEdgeList.hxx
+++ b/inc/IGESSolid_ToolEdgeList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolEdgeList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolEdgeList, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolEdgeList();
diff --git a/inc/IGESSolid_ToolEllipsoid.hxx b/inc/IGESSolid_ToolEllipsoid.hxx
index 3aacda8..3030c0e 100644
--- a/inc/IGESSolid_ToolEllipsoid.hxx
+++ b/inc/IGESSolid_ToolEllipsoid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolEllipsoid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolEllipsoid, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolEllipsoid();
diff --git a/inc/IGESSolid_ToolFace.hxx b/inc/IGESSolid_ToolFace.hxx
index 32ac852..1ff9a2c 100644
--- a/inc/IGESSolid_ToolFace.hxx
+++ b/inc/IGESSolid_ToolFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolFace, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolFace();
diff --git a/inc/IGESSolid_ToolLoop.hxx b/inc/IGESSolid_ToolLoop.hxx
index 310f718..62601b7 100644
--- a/inc/IGESSolid_ToolLoop.hxx
+++ b/inc/IGESSolid_ToolLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolLoop, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolLoop();
diff --git a/inc/IGESSolid_ToolManifoldSolid.hxx b/inc/IGESSolid_ToolManifoldSolid.hxx
index 6caa40a..3f62274 100644
--- a/inc/IGESSolid_ToolManifoldSolid.hxx
+++ b/inc/IGESSolid_ToolManifoldSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolManifoldSolid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolManifoldSolid, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolManifoldSolid();
diff --git a/inc/IGESSolid_ToolPlaneSurface.hxx b/inc/IGESSolid_ToolPlaneSurface.hxx
index 930ea81..5a6a280 100644
--- a/inc/IGESSolid_ToolPlaneSurface.hxx
+++ b/inc/IGESSolid_ToolPlaneSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolPlaneSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolPlaneSurface, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolPlaneSurface();
diff --git a/inc/IGESSolid_ToolRightAngularWedge.hxx b/inc/IGESSolid_ToolRightAngularWedge.hxx
index d58f900..9fd2374 100644
--- a/inc/IGESSolid_ToolRightAngularWedge.hxx
+++ b/inc/IGESSolid_ToolRightAngularWedge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolRightAngularWedge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolRightAngularWedge, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolRightAngularWedge();
diff --git a/inc/IGESSolid_ToolSelectedComponent.hxx b/inc/IGESSolid_ToolSelectedComponent.hxx
index 981b4fc..21cc7ee 100644
--- a/inc/IGESSolid_ToolSelectedComponent.hxx
+++ b/inc/IGESSolid_ToolSelectedComponent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolSelectedComponent  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSelectedComponent, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolSelectedComponent();
diff --git a/inc/IGESSolid_ToolShell.hxx b/inc/IGESSolid_ToolShell.hxx
index e6bd43b..afe7e5e 100644
--- a/inc/IGESSolid_ToolShell.hxx
+++ b/inc/IGESSolid_ToolShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolShell  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolShell, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolShell();
diff --git a/inc/IGESSolid_ToolSolidAssembly.hxx b/inc/IGESSolid_ToolSolidAssembly.hxx
index 60e7034..e74d946 100644
--- a/inc/IGESSolid_ToolSolidAssembly.hxx
+++ b/inc/IGESSolid_ToolSolidAssembly.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolSolidAssembly  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSolidAssembly, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolSolidAssembly();
diff --git a/inc/IGESSolid_ToolSolidInstance.hxx b/inc/IGESSolid_ToolSolidInstance.hxx
index 805a993..f22fb49 100644
--- a/inc/IGESSolid_ToolSolidInstance.hxx
+++ b/inc/IGESSolid_ToolSolidInstance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolSolidInstance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSolidInstance, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolSolidInstance();
diff --git a/inc/IGESSolid_ToolSolidOfLinearExtrusion.hxx b/inc/IGESSolid_ToolSolidOfLinearExtrusion.hxx
index 58325a7..4a2c7b2 100644
--- a/inc/IGESSolid_ToolSolidOfLinearExtrusion.hxx
+++ b/inc/IGESSolid_ToolSolidOfLinearExtrusion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolSolidOfLinearExtrusion  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSolidOfLinearExtrusion, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolSolidOfLinearExtrusion();
diff --git a/inc/IGESSolid_ToolSolidOfRevolution.hxx b/inc/IGESSolid_ToolSolidOfRevolution.hxx
index c9a841d..3df5aad 100644
--- a/inc/IGESSolid_ToolSolidOfRevolution.hxx
+++ b/inc/IGESSolid_ToolSolidOfRevolution.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolSolidOfRevolution  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSolidOfRevolution, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolSolidOfRevolution();
diff --git a/inc/IGESSolid_ToolSphere.hxx b/inc/IGESSolid_ToolSphere.hxx
index e686487..a42b354 100644
--- a/inc/IGESSolid_ToolSphere.hxx
+++ b/inc/IGESSolid_ToolSphere.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolSphere  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSphere, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolSphere();
diff --git a/inc/IGESSolid_ToolSphericalSurface.hxx b/inc/IGESSolid_ToolSphericalSurface.hxx
index 6655b30..a5528df 100644
--- a/inc/IGESSolid_ToolSphericalSurface.hxx
+++ b/inc/IGESSolid_ToolSphericalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolSphericalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolSphericalSurface, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolSphericalSurface();
diff --git a/inc/IGESSolid_ToolToroidalSurface.hxx b/inc/IGESSolid_ToolToroidalSurface.hxx
index 917517c..ab9bbac 100644
--- a/inc/IGESSolid_ToolToroidalSurface.hxx
+++ b/inc/IGESSolid_ToolToroidalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolToroidalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolToroidalSurface, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolToroidalSurface();
diff --git a/inc/IGESSolid_ToolTorus.hxx b/inc/IGESSolid_ToolTorus.hxx
index 30583a3..64ad763 100644
--- a/inc/IGESSolid_ToolTorus.hxx
+++ b/inc/IGESSolid_ToolTorus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolTorus  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolTorus, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolTorus();
diff --git a/inc/IGESSolid_ToolVertexList.hxx b/inc/IGESSolid_ToolVertexList.hxx
index 282acfd..97a0e5d 100644
--- a/inc/IGESSolid_ToolVertexList.hxx
+++ b/inc/IGESSolid_ToolVertexList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Message_Messenger;
 class IGESSolid_ToolVertexList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ToolVertexList, ready to work <br>
   Standard_EXPORT   IGESSolid_ToolVertexList();
diff --git a/inc/IGESSolid_TopoBuilder.hxx b/inc/IGESSolid_TopoBuilder.hxx
index c8a26e9..296070f 100644
--- a/inc/IGESSolid_TopoBuilder.hxx
+++ b/inc/IGESSolid_TopoBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class gp_XYZ;
 class IGESSolid_TopoBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty TopoBuilder <br>
 //!           This creates also a unique VertexList and a unique EdgeList, <br>
diff --git a/inc/IGESToBRep.hxx b/inc/IGESToBRep.hxx
index bbf0ba6..787e996 100644
--- a/inc/IGESToBRep.hxx
+++ b/inc/IGESToBRep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class IGESToBRep_ToolContainer;
 class IGESToBRep  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates and initializes default AlgoContainer. <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/IGESToBRep_BRepEntity.hxx b/inc/IGESToBRep_BRepEntity.hxx
index 1b3b06d..d5fb737 100644
--- a/inc/IGESToBRep_BRepEntity.hxx
+++ b/inc/IGESToBRep_BRepEntity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class IGESSolid_ManifoldSolid;
 class IGESToBRep_BRepEntity  : public IGESToBRep_CurveAndSurface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates  a tool BRepEntity  ready  to  run, with <br>
 //!           epsilons  set  to  1.E-04,  TheModeTopo  to  True,  the <br>
diff --git a/inc/IGESToBRep_BasicCurve.hxx b/inc/IGESToBRep_BasicCurve.hxx
index 5f91900..737a52f 100644
--- a/inc/IGESToBRep_BasicCurve.hxx
+++ b/inc/IGESToBRep_BasicCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -91,18 +94,7 @@ class IGESGeom_TransformationMatrix;
 class IGESToBRep_BasicCurve  : public IGESToBRep_CurveAndSurface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates  a tool BasicCurve  ready  to  run, with <br>
 //!         epsilons  set  to  1.E-04,  TheModeTopo  to  True,  the <br>
diff --git a/inc/IGESToBRep_BasicSurface.hxx b/inc/IGESToBRep_BasicSurface.hxx
index 8b8ea1c..c1ba225 100644
--- a/inc/IGESToBRep_BasicSurface.hxx
+++ b/inc/IGESToBRep_BasicSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -93,18 +96,7 @@ class IGESGeom_BSplineSurface;
 class IGESToBRep_BasicSurface  : public IGESToBRep_CurveAndSurface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates  a tool BasicSurface  ready  to  run, with <br>
 //!          epsilons  set  to  1.E-04,  TheModeTopo  to  True,  the <br>
diff --git a/inc/IGESToBRep_CurveAndSurface.hxx b/inc/IGESToBRep_CurveAndSurface.hxx
index fc2e503..9bbc84a 100644
--- a/inc/IGESToBRep_CurveAndSurface.hxx
+++ b/inc/IGESToBRep_CurveAndSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class Message_Msg;
 class IGESToBRep_CurveAndSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates  a tool CurveAndSurface  ready  to  run, with <br>
 //!         epsilons  set  to  1.E-04,  myModeTopo  to  True,  the <br>
diff --git a/inc/IGESToBRep_Reader.hxx b/inc/IGESToBRep_Reader.hxx
index b552b4c..8827011 100644
--- a/inc/IGESToBRep_Reader.hxx
+++ b/inc/IGESToBRep_Reader.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class TopoDS_Shape;
 class IGESToBRep_Reader  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Reader <br>
   Standard_EXPORT   IGESToBRep_Reader();
diff --git a/inc/IGESToBRep_TopoCurve.hxx b/inc/IGESToBRep_TopoCurve.hxx
index 1d2f137..21f954b 100644
--- a/inc/IGESToBRep_TopoCurve.hxx
+++ b/inc/IGESToBRep_TopoCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -83,18 +86,7 @@ class Geom2d_Curve;
 class IGESToBRep_TopoCurve  : public IGESToBRep_CurveAndSurface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates  a tool TopoCurve  ready  to  run, with <br>
 //!           epsilons  set  to  1.E-04,  TheModeTopo  to  True,  the <br>
diff --git a/inc/IGESToBRep_TopoSurface.hxx b/inc/IGESToBRep_TopoSurface.hxx
index bed638b..e04798d 100644
--- a/inc/IGESToBRep_TopoSurface.hxx
+++ b/inc/IGESToBRep_TopoSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -74,18 +77,7 @@ class gp_Trsf2d;
 class IGESToBRep_TopoSurface  : public IGESToBRep_CurveAndSurface {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates  a tool TopoSurface  ready  to  run, with <br>
 //!         epsilons  set  to  1.E-04,  TheModeTopo  to  True,  the <br>
diff --git a/inc/Image.hxx b/inc/Image.hxx
index 28a4647..aa43b07 100644
--- a/inc/Image.hxx
+++ b/inc/Image.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,7 +48,6 @@ class Image_ColorPixelMapHasher;
 class Image_ColorPixelDataMap;
 class Image_IndexPixelMapHasher;
 class Image_LookupTable;
-class Image_PixMap;
 class Image_PixelRowOfDColorImage;
 class Image_PixelFieldOfDColorImage;
 class Image_PixelRowOfDIndexedImage;
@@ -62,18 +64,7 @@ class Image_DataMapIteratorOfLookupTable;
 class Image  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Zoom an Image with a specific PixelInterpolation method. <br>
   Standard_EXPORT   static  void Zoom(const Handle(Image_Image)& aImage,const Image_PixelInterpolation& aInterpolation,const Standard_Real aCoefX,const Standard_Real aCoefY) ;
@@ -148,7 +139,6 @@ friend class Image_ColorPixelMapHasher;
 friend class Image_ColorPixelDataMap;
 friend class Image_IndexPixelMapHasher;
 friend class Image_LookupTable;
-friend class Image_PixMap;
 friend class Image_PixelRowOfDColorImage;
 friend class Image_PixelFieldOfDColorImage;
 friend class Image_PixelRowOfDIndexedImage;
diff --git a/inc/ImageUtility.hxx b/inc/ImageUtility.hxx
index cc2dad6..8d1948f 100644
--- a/inc/ImageUtility.hxx
+++ b/inc/ImageUtility.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class ImageUtility_X11Dump;
 class ImageUtility  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Image_PseudoColorImage PixelDiff(const Handle(Image_Image)& aImage,const Handle(Image_Image)& anotherImage) ;
diff --git a/inc/ImageUtility_X11Dump.hxx b/inc/ImageUtility_X11Dump.hxx
index ca5fa8d..0ca1720 100644
--- a/inc/ImageUtility_X11Dump.hxx
+++ b/inc/ImageUtility_X11Dump.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TCollection_AsciiString;
 class ImageUtility_X11Dump  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a new X11 Display,Window,Colormap,GC,XImage suitable <br>
 //!		for aImage . <br>
diff --git a/inc/ImageUtility_XPR.hxx b/inc/ImageUtility_XPR.hxx
index 86d2bf6..64b309d 100644
--- a/inc/ImageUtility_XPR.hxx
+++ b/inc/ImageUtility_XPR.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class OSD_File;
 class ImageUtility_XPR  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Write content of a Image object to aTmpFile and <br>
 //!          execute a Spawn "xpr xprOptions aTmpFile | lpr &" . <br>
diff --git a/inc/ImageUtility_XWD.hxx b/inc/ImageUtility_XWD.hxx
index 10005a0..5bfa8ec 100644
--- a/inc/ImageUtility_XWD.hxx
+++ b/inc/ImageUtility_XWD.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Standard_TypeMismatch;
 class ImageUtility_XWD  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a XWD object . <br>
   Standard_EXPORT   ImageUtility_XWD();
diff --git a/inc/ImageUtility_XWUD.hxx b/inc/ImageUtility_XWUD.hxx
index 70a170a..cbc6a1b 100644
--- a/inc/ImageUtility_XWUD.hxx
+++ b/inc/ImageUtility_XWUD.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class OSD_File;
 class ImageUtility_XWUD  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Write content of a Image object to aTmpFile and <br>
 //!          execute a Spawn "xwud xwudOptions -in aTmpFile &" . <br>
diff --git a/inc/Image_AlienPixMap.hxx b/inc/Image_AlienPixMap.hxx
new file mode 100644
index 0000000..85045b2
--- /dev/null
+++ b/inc/Image_AlienPixMap.hxx
@@ -0,0 +1,96 @@
+// Created on: 2012-07-18
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _Image_AlienPixMap_H__
+#define _Image_AlienPixMap_H__
+
+#include <Image_PixMap.hxx>
+#include <Image_TypeOfImage.hxx>
+
+class TCollection_AsciiString;
+struct FIBITMAP;
+
+//! Image class that support file reading/writing operations using auxiliary image library.
+//! Notice that supported images format could be limited.
+class Image_AlienPixMap : public Image_PixMap
+{
+
+public:
+
+  //! Empty constructor.
+  Standard_EXPORT Image_AlienPixMap();
+
+  //! Destructor
+  Standard_EXPORT virtual ~Image_AlienPixMap();
+
+  //! Read image data from file.
+  Standard_EXPORT bool Load (const TCollection_AsciiString& theFileName);
+
+  //! Write image data to file using file extension to determine compression format.
+  Standard_EXPORT bool Save (const TCollection_AsciiString& theFileName);
+
+  //! Initialize image plane with required dimensions.
+  //! thePixelFormat - if specified pixel format doesn't supported by image library
+  //!                  than nearest supported will be used instead!
+  //! theSizeRowBytes - may be ignored by this class and required alignemnt will be used instead!
+  Standard_EXPORT virtual bool InitTrash (ImgFormat           thePixelFormat,
+                                          const Standard_Size theSizeX,
+                                          const Standard_Size theSizeY,
+                                          const Standard_Size theSizeRowBytes = 0);
+
+  //! Initialize by copying data.
+  Standard_EXPORT virtual bool InitCopy (const Image_PixMap& theCopy);
+
+  //! Method correctly deallocate internal buffer.
+  Standard_EXPORT virtual void Clear (ImgFormat thePixelFormat = ImgGray);
+
+  //! Performs gamma correction on image.
+  //! theGamma - gamma value to use; a value of 1.0 leaves the image alone
+  Standard_EXPORT bool AdjustGamma (const Standard_Real theGammaCorr);
+
+private:
+
+  FIBITMAP* myLibImage;
+
+private:
+
+  //! Copying allowed only within Handles
+  Image_AlienPixMap            (const Image_AlienPixMap& );
+  Image_AlienPixMap& operator= (const Image_AlienPixMap& );
+
+  //! Wrapper initialization is disallowed for this class (will return false in any case)!
+  //! Use only copying and allocation initializers.
+  Standard_EXPORT virtual bool InitWrapper (ImgFormat           thePixelFormat,
+                                            Standard_Byte*      theDataPtr,
+                                            const Standard_Size theSizeX,
+                                            const Standard_Size theSizeY,
+                                            const Standard_Size theSizeRowBytes);
+
+  //! Built-in PPM export
+  Standard_EXPORT bool savePPM (const TCollection_AsciiString& theFileName) const;
+
+public:
+
+  DEFINE_STANDARD_RTTI(Image_AlienPixMap) // Type definition
+
+};
+
+DEFINE_STANDARD_HANDLE(Image_AlienPixMap, Image_PixMap)
+
+#endif // _Image_AlienPixMap_H__
diff --git a/inc/Image_AveragePixelInterpolation.hxx b/inc/Image_AveragePixelInterpolation.hxx
index 377eff8..c718392 100644
--- a/inc/Image_AveragePixelInterpolation.hxx
+++ b/inc/Image_AveragePixelInterpolation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class Aspect_IndexPixel;
 class Image_AveragePixelInterpolation  : public Image_PixelInterpolation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a AveragePixelInterpolation  object. <br>
   Standard_EXPORT   Image_AveragePixelInterpolation();
diff --git a/inc/Image_BalancedPixelInterpolation.hxx b/inc/Image_BalancedPixelInterpolation.hxx
index d419049..f92d240 100644
--- a/inc/Image_BalancedPixelInterpolation.hxx
+++ b/inc/Image_BalancedPixelInterpolation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class Aspect_IndexPixel;
 class Image_BalancedPixelInterpolation  : public Image_PixelInterpolation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a BalancedPixelInterpolation  object. <br>
   Standard_EXPORT   Image_BalancedPixelInterpolation();
diff --git a/inc/Image_BilinearPixelInterpolation.hxx b/inc/Image_BilinearPixelInterpolation.hxx
index 4b4f0fa..29ae840 100644
--- a/inc/Image_BilinearPixelInterpolation.hxx
+++ b/inc/Image_BilinearPixelInterpolation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class Aspect_IndexPixel;
 class Image_BilinearPixelInterpolation  : public Image_PixelInterpolation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a BilinearPixelInterpolation  object. <br>
   Standard_EXPORT   Image_BilinearPixelInterpolation();
diff --git a/inc/Image_CRawBufferData.hxx b/inc/Image_CRawBufferData.hxx
deleted file mode 100644
index 48c137a..0000000
--- a/inc/Image_CRawBufferData.hxx
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-#ifndef _Image_CRawBufferData_HeaderFile
-#define _Image_CRawBufferData_HeaderFile
-
-#include <InterfaceGraphic_RawBufferData.hxx>
-
-typedef TRawBufferData Image_CRawBufferData;
-
-#if defined(__cplusplus) || defined(c_plusplus)
-  #include <Standard_Type.hxx>
-  const Handle(Standard_Type)& TYPE(Image_CRawBufferData);
-#endif
-
-#endif /*_Image_CRawBufferData_HeaderFile*/
diff --git a/inc/Image_Color.hxx b/inc/Image_Color.hxx
new file mode 100644
index 0000000..ef58a57
--- /dev/null
+++ b/inc/Image_Color.hxx
@@ -0,0 +1,543 @@
+// Created on: 2012-07-18
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _Image_Color_H__
+#define _Image_Color_H__
+
+#include <Standard.hxx>
+
+//! POD structure for packed RGB color value (3 bytes)
+struct Image_ColorRGB
+{
+
+  //! Returns the number of components.
+  static Standard_Integer Length()
+  {
+    return 3;
+  }
+
+public: // access methods
+
+  //! Alias to 1st component (red intensity).
+  Standard_Byte r() const { return v[0]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_Byte g() const { return v[1]; }
+
+  //! Alias to 3rd component (blue intensity).
+  Standard_Byte b() const { return v[2]; }
+
+  //! Alias to 1st component (red intensity).
+  Standard_Byte& r() { return v[0]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_Byte& g() { return v[1]; }
+
+  //! Alias to 3rd component (blue intensity).
+  Standard_Byte& b() { return v[2]; }
+
+public:
+
+  Standard_Byte v[3];
+
+};
+
+//! POD structure for packed RGB color value (4 bytes with extra byte for alignment)
+struct Image_ColorRGB32
+{
+
+  //! Returns the number of components.
+  static Standard_Integer Length()
+  {
+    return 3;
+  }
+
+  //! Alias to 1st component (red intensity).
+  Standard_Byte r() const { return v[0]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_Byte g() const { return v[1]; }
+
+  //! Alias to 3rd component (blue intensity).
+  Standard_Byte b() const { return v[2]; }
+
+  //! Alias to 4th component (dummy).
+  Standard_Byte a_() const { return v[3]; }
+
+  //! Alias to 1st component (red intensity).
+  Standard_Byte& r() { return v[0]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_Byte& g() { return v[1]; }
+
+  //! Alias to 3rd component (blue intensity).
+  Standard_Byte& b() { return v[2]; }
+
+  //! Alias to 4th component (dummy).
+  Standard_Byte& a_() { return v[3]; }
+
+public:
+
+  Standard_Byte v[4];
+
+};
+
+//! POD structure for packed RGBA color value (4 bytes)
+struct Image_ColorRGBA
+{
+
+  //! Returns the number of components.
+  static Standard_Integer Length()
+  {
+    return 4;
+  }
+
+  //! Alias to 1st component (red intensity).
+  Standard_Byte r() const { return v[0]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_Byte g() const { return v[1]; }
+
+  //! Alias to 3rd component (blue intensity).
+  Standard_Byte b() const { return v[2]; }
+
+  //! Alias to 4th component (alpha value).
+  Standard_Byte a() const { return v[3]; }
+
+  //! Alias to 1st component (red intensity).
+  Standard_Byte& r() { return v[0]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_Byte& g() { return v[1]; }
+
+  //! Alias to 3rd component (blue intensity).
+  Standard_Byte& b() { return v[2]; }
+
+  //! Alias to 4th component (alpha value).
+  Standard_Byte& a() { return v[3]; }
+
+public:
+
+  Standard_Byte v[4];
+
+};
+
+//! POD structure for packed BGR color value (3 bytes)
+struct Image_ColorBGR
+{
+
+  //! Returns the number of components.
+  static Standard_Integer Length()
+  {
+    return 3;
+  }
+
+  //! Alias to 3rd component (red intensity).
+  Standard_Byte r() const { return v[2]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_Byte g() const { return v[1]; }
+
+  //! Alias to 1st component (blue intensity).
+  Standard_Byte b() const { return v[0]; }
+
+  //! Alias to 3rd component (red intensity).
+  Standard_Byte& r() { return v[2]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_Byte& g() { return v[1]; }
+
+  //! Alias to 1st component (blue intensity).
+  Standard_Byte& b() { return v[0]; }
+
+public:
+
+  Standard_Byte v[3];
+
+};
+
+//! POD structure for packed BGR color value (4 bytes with extra byte for alignment)
+struct Image_ColorBGR32
+{
+
+  //! Returns the number of components.
+  static Standard_Integer Length()
+  {
+    return 3;
+  }
+
+  //! Alias to 3rd component (red intensity).
+  Standard_Byte r() const { return v[2]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_Byte g() const { return v[1]; }
+
+  //! Alias to 1st component (blue intensity).
+  Standard_Byte b() const { return v[0]; }
+
+  //! Alias to 4th component (dummy).
+  Standard_Byte a_() const { return v[3]; }
+
+  //! Alias to 3rd component (red intensity).
+  Standard_Byte& r() { return v[2]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_Byte& g() { return v[1]; }
+
+  //! Alias to 1st component (blue intensity).
+  Standard_Byte& b() { return v[0]; }
+
+  //! Alias to 4th component (dummy).
+  Standard_Byte& a_() { return v[3]; }
+
+public:
+
+  Standard_Byte v[4];
+
+};
+
+//! POD structure for packed BGRA color value (4 bytes)
+struct Image_ColorBGRA
+{
+
+  //! Returns the number of components.
+  static Standard_Integer Length()
+  {
+    return 4;
+  }
+
+  //! Alias to 3rd component (red intensity).
+  Standard_Byte r() const { return v[2]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_Byte g() const { return v[1]; }
+
+  //! Alias to 1st component (blue intensity).
+  Standard_Byte b() const { return v[0]; }
+
+  //! Alias to 4th component (alpha value).
+  Standard_Byte a() const { return v[3]; }
+
+  //! Alias to 3rd component (red intensity).
+  Standard_Byte& r() { return v[2]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_Byte& g() { return v[1]; }
+
+  //! Alias to 1st component (blue intensity).
+  Standard_Byte& b() { return v[0]; }
+
+  //! Alias to 4th component (alpha value).
+  Standard_Byte& a() { return v[3]; }
+
+public:
+
+  Standard_Byte v[4];
+
+};
+
+//! POD structure for packed float RGB color value (3 floats)
+struct Image_ColorRGBF
+{
+
+  //! Returns the number of components.
+  static Standard_Integer Length()
+  {
+    return 3;
+  }
+
+  //! Alias to 1st component (red intensity).
+  Standard_ShortReal r() const { return v[0]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_ShortReal g() const { return v[1]; }
+
+  //! Alias to 3rd component (blue intensity).
+  Standard_ShortReal b() const { return v[2]; }
+
+  //! Alias to 1st component (red intensity).
+  Standard_ShortReal& r() { return v[0]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_ShortReal& g() { return v[1]; }
+
+  //! Alias to 3rd component (blue intensity).
+  Standard_ShortReal& b() { return v[2]; }
+
+public:
+
+  Standard_ShortReal v[3];
+
+};
+
+//! POD structure for packed BGR float color value (3 floats)
+struct Image_ColorBGRF
+{
+
+  //! Returns the number of components.
+  static Standard_Integer Length()
+  {
+    return 3;
+  }
+
+  //! Alias to 3rd component (red intensity).
+  Standard_ShortReal r() const { return v[2]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_ShortReal g() const { return v[1]; }
+
+  //! Alias to 1st component (blue intensity).
+  Standard_ShortReal b() const { return v[0]; }
+
+  //! Alias to 3rd component (red intensity).
+  Standard_ShortReal& r() { return v[2]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_ShortReal& g() { return v[1]; }
+
+  //! Alias to 1st component (blue intensity).
+  Standard_ShortReal& b() { return v[0]; }
+
+public:
+
+  Standard_ShortReal v[3];
+
+};
+
+//! POD structure for packed RGBA color value (4 floats)
+struct Image_ColorRGBAF
+{
+
+  //! Returns the number of components.
+  static Standard_Integer Length()
+  {
+    return 4;
+  }
+
+  //! Alias to 1st component (red intensity).
+  Standard_ShortReal r() const { return v[0]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_ShortReal g() const { return v[1]; }
+
+  //! Alias to 3rd component (blue intensity).
+  Standard_ShortReal b() const { return v[2]; }
+
+  //! Alias to 4th component (alpha value).
+  Standard_ShortReal a() const { return v[3]; }
+
+  //! Alias to 1st component (red intensity).
+  Standard_ShortReal& r() { return v[0]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_ShortReal& g() { return v[1]; }
+
+  //! Alias to 3rd component (blue intensity).
+  Standard_ShortReal& b() { return v[2]; }
+
+  //! Alias to 4th component (alpha value).
+  Standard_ShortReal& a() { return v[3]; }
+
+public:
+
+  Standard_ShortReal v[4];
+
+};
+
+//! POD structure for packed float BGRA color value (4 floats)
+struct Image_ColorBGRAF
+{
+
+  //! Returns the number of components.
+  static Standard_Integer Length()
+  {
+    return 4;
+  }
+
+  //! Alias to 3rd component (red intensity).
+  Standard_ShortReal r() const { return v[2]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_ShortReal g() const { return v[1]; }
+
+  //! Alias to 1st component (blue intensity).
+  Standard_ShortReal b() const { return v[0]; }
+
+  //! Alias to 4th component (alpha value).
+  Standard_ShortReal a() const { return v[3]; }
+
+  //! Alias to 3rd component (red intensity).
+  Standard_ShortReal& r() { return v[2]; }
+
+  //! Alias to 2nd component (green intensity).
+  Standard_ShortReal& g() { return v[1]; }
+
+  //! Alias to 1st component (blue intensity).
+  Standard_ShortReal& b() { return v[0]; }
+
+  //! Alias to 4th component (alpha value).
+  Standard_ShortReal& a() { return v[3]; }
+
+public:
+
+  Standard_ShortReal v[4];
+
+};
+
+//! Addition operator
+template<typename ColorType_t>
+inline ColorType_t Image_ColorSumm3 (const ColorType_t& theA, const ColorType_t& theB)
+{
+  ColorType_t aRes = { theA.v[0] + theB.v[0],
+                       theA.v[1] + theB.v[1],
+                       theA.v[2] + theB.v[2] };
+  return aRes;
+}
+
+inline Image_ColorRGB operator+ (const Image_ColorRGB& theA, const Image_ColorRGB& theB)
+{
+  return Image_ColorSumm3 (theA, theB);
+}
+
+inline Image_ColorBGR operator+ (const Image_ColorBGR& theA, const Image_ColorBGR& theB)
+{
+  return Image_ColorSumm3 (theA, theB);
+}
+
+inline Image_ColorRGBF operator+ (const Image_ColorRGBF& theA, const Image_ColorRGBF& theB)
+{
+  return Image_ColorSumm3 (theA, theB);
+}
+
+inline Image_ColorBGRF operator+ (const Image_ColorBGRF& theA, const Image_ColorBGRF& theB)
+{
+  return Image_ColorSumm3 (theA, theB);
+}
+
+template<typename ColorType_t>
+inline ColorType_t Image_ColorSumm4 (const ColorType_t& theA, const ColorType_t& theB)
+{
+  ColorType_t aRes = { theA.v[0] + theB.v[0],
+                       theA.v[1] + theB.v[1],
+                       theA.v[2] + theB.v[2],
+                       theA.v[3] + theB.v[3] };
+  return aRes;
+}
+
+inline Image_ColorRGBA operator+ (const Image_ColorRGBA& theA, const Image_ColorRGBA& theB)
+{
+  return Image_ColorSumm4 (theA, theB);
+}
+
+inline Image_ColorBGRA operator+ (const Image_ColorBGRA& theA, const Image_ColorBGRA& theB)
+{
+  return Image_ColorSumm4 (theA, theB);
+}
+
+inline Image_ColorRGB32 operator+ (const Image_ColorRGB32& theA, const Image_ColorRGB32& theB)
+{
+  return Image_ColorSumm4 (theA, theB);
+}
+
+inline Image_ColorBGR32 operator+ (const Image_ColorBGR32& theA, const Image_ColorBGR32& theB)
+{
+  return Image_ColorSumm4 (theA, theB);
+}
+
+inline Image_ColorRGBAF operator+ (const Image_ColorRGBAF& theA, const Image_ColorRGBAF& theB)
+{
+  return Image_ColorSumm4 (theA, theB);
+}
+
+inline Image_ColorBGRAF operator+ (const Image_ColorBGRAF& theA, const Image_ColorBGRAF& theB)
+{
+  return Image_ColorSumm4 (theA, theB);
+}
+
+//! Subtraction operator
+template<typename ColorType_t>
+inline ColorType_t Image_ColorSub3 (const ColorType_t& theA, const ColorType_t& theB)
+{
+  ColorType_t aRes = { theA.v[0] - theB.v[0],
+                       theA.v[1] - theB.v[1],
+                       theA.v[2] - theB.v[2] };
+  return aRes;
+}
+
+inline Image_ColorRGB operator- (const Image_ColorRGB& theA, const Image_ColorRGB& theB)
+{
+  return Image_ColorSub3 (theA, theB);
+}
+
+inline Image_ColorBGR operator- (const Image_ColorBGR& theA, const Image_ColorBGR& theB)
+{
+  return Image_ColorSub3 (theA, theB);
+}
+
+inline Image_ColorRGBF operator- (const Image_ColorRGBF& theA, const Image_ColorRGBF& theB)
+{
+  return Image_ColorSub3 (theA, theB);
+}
+
+inline Image_ColorBGRF operator- (const Image_ColorBGRF& theA, const Image_ColorBGRF& theB)
+{
+  return Image_ColorSub3 (theA, theB);
+}
+
+template<typename ColorType_t>
+inline ColorType_t Image_ColorSub4 (const ColorType_t& theA, const ColorType_t& theB)
+{
+  ColorType_t aRes = { theA.v[0] - theB.v[0],
+                       theA.v[1] - theB.v[1],
+                       theA.v[2] - theB.v[2],
+                       theA.v[3] - theB.v[3] };
+  return aRes;
+}
+
+inline Image_ColorRGBA operator- (const Image_ColorRGBA& theA, const Image_ColorRGBA& theB)
+{
+  return Image_ColorSub4 (theA, theB);
+}
+
+inline Image_ColorBGRA operator- (const Image_ColorBGRA& theA, const Image_ColorBGRA& theB)
+{
+  return Image_ColorSub4 (theA, theB);
+}
+
+inline Image_ColorRGB32 operator- (const Image_ColorRGB32& theA, const Image_ColorRGB32& theB)
+{
+  return Image_ColorSub4 (theA, theB);
+}
+
+inline Image_ColorBGR32 operator- (const Image_ColorBGR32& theA, const Image_ColorBGR32& theB)
+{
+  return Image_ColorSub4 (theA, theB);
+}
+
+inline Image_ColorRGBAF operator- (const Image_ColorRGBAF& theA, const Image_ColorRGBAF& theB)
+{
+  return Image_ColorSub4 (theA, theB);
+}
+
+inline Image_ColorBGRAF operator- (const Image_ColorBGRAF& theA, const Image_ColorBGRAF& theB)
+{
+  return Image_ColorSub4 (theA, theB);
+}
+
+#endif // _Image_Color_H__
diff --git a/inc/Image_ColorPixelDataMap.hxx b/inc/Image_ColorPixelDataMap.hxx
index 10b151d..07c6318 100644
--- a/inc/Image_ColorPixelDataMap.hxx
+++ b/inc/Image_ColorPixelDataMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Image_DataMapIteratorOfColorPixelDataMap;
 class Image_ColorPixelDataMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Image_ColorPixelDataMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Image_ColorPixelMapHasher.hxx b/inc/Image_ColorPixelMapHasher.hxx
index 47bee9f..4033c9a 100644
--- a/inc/Image_ColorPixelMapHasher.hxx
+++ b/inc/Image_ColorPixelMapHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Aspect_ColorPixel;
 class Image_ColorPixelMapHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const Aspect_ColorPixel& K,const Standard_Integer Upper) ;
diff --git a/inc/Image_Convertor.hxx b/inc/Image_Convertor.hxx
index c1119bb..ad931f8 100644
--- a/inc/Image_Convertor.hxx
+++ b/inc/Image_Convertor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Aspect_ColorMap;
 class Image_Convertor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a Convertor object with the default DitheringMethod <br>
 //!	( DM_NearestColor ). <br>
diff --git a/inc/Image_DataMapIteratorOfColorPixelDataMap.hxx b/inc/Image_DataMapIteratorOfColorPixelDataMap.hxx
index 3d4f077..bb03caa 100644
--- a/inc/Image_DataMapIteratorOfColorPixelDataMap.hxx
+++ b/inc/Image_DataMapIteratorOfColorPixelDataMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Image_DataMapNodeOfColorPixelDataMap;
 class Image_DataMapIteratorOfColorPixelDataMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Image_DataMapIteratorOfColorPixelDataMap();
diff --git a/inc/Image_DataMapIteratorOfLookupTable.hxx b/inc/Image_DataMapIteratorOfLookupTable.hxx
index 7cc00e6..6cc4c82 100644
--- a/inc/Image_DataMapIteratorOfLookupTable.hxx
+++ b/inc/Image_DataMapIteratorOfLookupTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class Image_DataMapNodeOfLookupTable;
 class Image_DataMapIteratorOfLookupTable  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Image_DataMapIteratorOfLookupTable();
diff --git a/inc/Image_Diff.hxx b/inc/Image_Diff.hxx
new file mode 100644
index 0000000..53235e6
--- /dev/null
+++ b/inc/Image_Diff.hxx
@@ -0,0 +1,142 @@
+// Created on: 2012-07-10
+// Created by: VRO
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _Image_Diff_H__
+#define _Image_Diff_H__
+
+#include <Image_PixMap.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TColStd_MapOfInteger.hxx>
+#include <NCollection_List.hxx>
+#include <NCollection_Vector.hxx>
+
+//! This class compares two images pixel-by-pixel.
+//! It uses the following methods to ignore the difference between images:
+//!  - Black/White comparison. It makes the images 2-colored before the comparison.
+//!  - Equality with tolerance. Colors of two pixels are considered the same if the
+//!    differnce of their color is less than a tolerance.
+//!  - Border filter. The algorithm ignores alone independent pixels,
+//!    which are different on both images, ignores the "border effect" -
+//!    the difference caused by triangles located at angle about 0 or 90 degrees to the user.
+//!
+//! Border filter ignores a difference in implementation of
+//! anti-aliasing and other effects on boundary of a shape.
+//! The triangles of a boundary zone are usually located so that their normals point aside the user
+//! (about 90 degree between the normal and the direction to the user's eye).
+//! Deflection of the light for such a triangle depends on implementation of the video driver.
+//! In order to skip this difference the following algorithm is used:
+//!  a) "Different" pixels are groupped and checked on "one-pixel width line".
+//!     indeed, the pixels may represent not a line, but any curve.
+//!     But the width of this curve should be not more than a pixel.
+//!     This group of pixels become a candidate to be ignored because of boundary effect.
+//!  b) The group of pixels is checked on belonging to a "shape".
+//!     Neighbour pixels are checked from the reference image.
+//!     This test confirms a fact that the group of pixels belongs to a shape and
+//!     represent a boundary of the shape.
+//!     In this case the whole group of pixels is ignored (considered as same).
+//!     Otherwise, the group of pixels may represent a geometrical curve in the viewer 3D
+//!     and should be considered as "different".
+//!
+//! References:
+//!     1. http://pdiff.sourceforge.net/ypg01.pdf
+//!     2. http://pdiff.sourceforge.net/metric.html
+//!     3. http://www.cs.ucf.edu/~sumant/publications/sig99.pdf
+//!     4. http://www.worldscientific.com/worldscibooks/10.1142/2641#t=toc (there is a list of articles and books in PDF format)
+
+class Image_Diff : public Standard_Transient
+{
+
+public:
+
+  //! An empty constructor. Init() should be called for initialization.
+  Standard_EXPORT Image_Diff();
+
+  //! Desctructor.
+  Standard_EXPORT virtual ~Image_Diff();
+
+  //! Initialize algorithm by two images.
+  //! @return false if images has different or unsupported pixel format.
+  Standard_EXPORT Standard_Boolean Init (const Handle(Image_PixMap)& theImageRef,
+                                         const Handle(Image_PixMap)& theImageNew,
+                                         const Standard_Boolean      theToBlackWhite = Standard_False);
+
+  //! Initialize algorithm by two images (will be loaded from files).
+  //! @return false if images couldn't be opened or their format is unsupported.
+  Standard_EXPORT Standard_Boolean Init (const TCollection_AsciiString& theImgPathRef,
+                                         const TCollection_AsciiString& theImgPathNew,
+                                         const Standard_Boolean         theToBlackWhite = Standard_False);
+
+  //! Color tolerance for equality check. Should be within range 0..1:
+  //! Corresponds to a difference between white and black colors (maximum difference).
+  //! By default, the tolerance is equal to 0 thus equality check will return false for any different colors.
+  Standard_EXPORT void SetColorTolerance (const Standard_Real theTolerance);
+
+  //! Color tolerance for equality check.
+  Standard_EXPORT Standard_Real ColorTolerance() const;
+
+  //! Sets taking into account (ignoring) a "border effect" on comparison of images.
+  //! The border effect is caused by a border of shaded shapes in the viewer 3d.
+  //! Triangles of this area are located at about 0 or 90 degrees to the user.
+  //! Therefore, they deflect light differently according to implementation of a video card driver.
+  //! This flag allows to detect such a "border" area and skip it from comparison of images.
+  //! Filter turned OFF by default.
+  Standard_EXPORT void SetBorderFilterOn (const Standard_Boolean theToIgnore);
+
+  //! Returns a flag of taking into account (ignoring) a border effect in comparison of images.
+  Standard_EXPORT Standard_Boolean IsBorderFilterOn() const;
+
+  //! Compares two images. It returns a number of different pixels (or groups of pixels).
+  //! It returns -1 if algorithm not initialized before.
+  Standard_EXPORT Standard_Integer Compare();
+
+  //! Saves a difference between two images as white pixels on black backgroud.
+  Standard_EXPORT Standard_Boolean SaveDiffImage (Image_PixMap& theDiffImage) const;
+
+  //! Saves a difference between two images as white pixels on black backgroud.
+  Standard_EXPORT Standard_Boolean SaveDiffImage (const TCollection_AsciiString& theDiffPath) const;
+
+protected:
+
+  //! Perform border filter algorithm.
+  Standard_EXPORT Standard_Integer ignoreBorderEffect();
+
+  //! Release dynamically allocated memory.
+  Standard_EXPORT void releaseGroupsOfDiffPixels();
+
+protected:
+
+  typedef NCollection_List<TColStd_MapOfInteger* > ListOfMapOfInteger;
+
+  Handle(Image_PixMap)              myImageRef;           //!< reference image to compare (from)
+  Handle(Image_PixMap)              myImageNew;           //!< new       image to compare (to)
+  Standard_Real                     myColorTolerance;     //!< tolerance for equality check (0..1, 0 - any not equal, 1 - opposite colors)
+  Standard_Boolean                  myIsBorderFilterOn;   //!< perform algorithm with border effect filter
+  ListOfMapOfInteger                myGroupsOfDiffPixels;
+  NCollection_Vector<Standard_Size> myDiffPixels;         //!< different pixels (position packed into integer)
+  TColStd_MapOfInteger              myLinearGroups;
+
+public:
+
+  DEFINE_STANDARD_RTTI(Image_Diff) // Type definition
+
+};
+
+DEFINE_STANDARD_HANDLE(Image_Diff, Standard_Transient)
+
+#endif // _Image_Diff_H__
diff --git a/inc/Image_FlipType.hxx b/inc/Image_FlipType.hxx
index 706a863..56849bc 100644
--- a/inc/Image_FlipType.hxx
+++ b/inc/Image_FlipType.hxx
@@ -6,7 +6,7 @@
 #ifndef _Image_FlipType_HeaderFile
 #define _Image_FlipType_HeaderFile
 
-//! Aspect_PixMap implementation. <br>
+
 enum Image_FlipType {
 Image_FT_HORIZONTAL,
 Image_FT_VERTICAL,
diff --git a/inc/Image_HPrivateImage.hxx b/inc/Image_HPrivateImage.hxx
deleted file mode 100644
index 702f83d..0000000
--- a/inc/Image_HPrivateImage.hxx
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-#ifndef _Image_HPrivateImage_HeaderFile
-#define _Image_HPrivateImage_HeaderFile
-
-#include <NCollection_Handle.hxx>
-
-// This typedef shadows the private image storage class
-// Currently FreeImagePlus is used
-
-class fipImage;
-typedef NCollection_Handle<fipImage> Image_HPrivateImage;
-
-#endif /*_Image_HPrivateImage_HeaderFile*/
diff --git a/inc/Image_IndexPixelMapHasher.hxx b/inc/Image_IndexPixelMapHasher.hxx
index 52c9680..739ed68 100644
--- a/inc/Image_IndexPixelMapHasher.hxx
+++ b/inc/Image_IndexPixelMapHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Aspect_IndexPixel;
 class Image_IndexPixelMapHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const Aspect_IndexPixel& K,const Standard_Integer Upper) ;
diff --git a/inc/Image_LookupTable.hxx b/inc/Image_LookupTable.hxx
index d4c92e2..5f38c93 100644
--- a/inc/Image_LookupTable.hxx
+++ b/inc/Image_LookupTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Image_DataMapIteratorOfLookupTable;
 class Image_LookupTable  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Image_LookupTable(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Image_PixMap.hxx b/inc/Image_PixMap.hxx
index fcd0c87..e0d2a41 100644
--- a/inc/Image_PixMap.hxx
+++ b/inc/Image_PixMap.hxx
@@ -1,129 +1,294 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _Image_PixMap_HeaderFile
-#define _Image_PixMap_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-#ifndef _Handle_Image_PixMap_HeaderFile
-#include <Handle_Image_PixMap.hxx>
-#endif
-
-#ifndef _Image_HPrivateImage_HeaderFile
-#include <Image_HPrivateImage.hxx>
-#endif
-#ifndef _Aspect_PixMap_HeaderFile
-#include <Aspect_PixMap.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Image_TypeOfImage_HeaderFile
-#include <Image_TypeOfImage.hxx>
-#endif
-#ifndef _Standard_PByte_HeaderFile
-#include <Standard_PByte.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Standard_CString_HeaderFile
-#include <Standard_CString.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _Aspect_Handle_HeaderFile
-#include <Aspect_Handle.hxx>
-#endif
-#ifndef _Image_CRawBufferData_HeaderFile
-#include <Image_CRawBufferData.hxx>
-#endif
-class Aspect_PixmapDefinitionError;
-class Aspect_PixmapError;
-class Quantity_Color;
-
-
-//! This class defines a system-independent bitmap <br>
-class Image_PixMap : public Aspect_PixMap {
+// Created on: 2012-07-18
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
 
-public:
+#ifndef _Image_PixMap_H__
+#define _Image_PixMap_H__
+
+#include <Image_PixMapData.hxx>
+#include <Standard_Transient.hxx>
+#include <Quantity_Color.hxx>
 
-  
-//! Allocate the bitmap with requested dimensions. <br>
-//! Allowed image types: <br>
-//!  - Image_TOI_RGB (color image, 1 byte per component); <br>
-//!  - Image_TOI_RGBA (color image with alpha channel); <br>
-//!  - Image_TOI_RGBF (color image, 1 float per component); <br>
-//!  - Image_TOI_RGBAF (color image with alpha channel); <br>
-//!  - Image_TOI_FLOAT (grey image, 1 float per pixel). <br>
-  Standard_EXPORT   Image_PixMap(const Standard_Integer theWidth,const Standard_Integer theHeight,const Image_TypeOfImage theType);
-  
-//! Create a bitmap by copying an existing buffer. <br>
-  Standard_EXPORT   Image_PixMap(const Standard_PByte theDataPtr,const Standard_Integer theWidth,const Standard_Integer theHeight,const Standard_Integer thePitch,const Standard_Integer theBitsPerPixel,const Standard_Boolean theIsTopDown);
-  
-//! Destroies the Bitmap <br>
-  Standard_EXPORT   virtual  void Destroy() ;
-~Image_PixMap()
+//! Class represents packed image plane.
+class Image_PixMap : public Standard_Transient
 {
-  Destroy();
-}
-  
-//! Dumps the Bitmap to an image file with <br>
-//! an optional gamma correction value <br>
-//! and returns TRUE if the dump occurs normaly. <br>
-  Standard_EXPORT   virtual  Standard_Boolean Dump(const Standard_CString theFilename,const Standard_Real theGammaCorr = 1.0) const;
-  
-//! Returns NULL handle <br>
-  Standard_EXPORT   virtual  Aspect_Handle PixmapID() const;
-  
-//! Fill the structure for low-level access to the bitmap data. <br>
-//! It is up to you to interpret these bytes correctly! <br>
-//! Important notice: image stored upside-down in the memory, <br>
-//!                   first image row is an last scanline in <br>
-//!                   the memory buffer. <br>
-//! If image was created with type Image_TOI_FLOAT buffer <br>
-//! format will be set to TDepthComponent. You can override <br>
-//! this field with another one-channel buffer format because <br>
-//! it useless for bitmap definition. <br>
-  Standard_EXPORT     void AccessBuffer(Image_CRawBufferData& theBufferInfo) const;
-  
-//! Returns the pixel color. This function is relatively slow, <br>
-//! use AccessBuffer() instead for stream operations. <br>
-//! Note that this function convert input theY coordinate <br>
-//! to count off from top of an image (while in memory it stored <br>
-//! upside-down). <br>
-  Standard_EXPORT   virtual  Quantity_Color PixelColor(const Standard_Integer theX,const Standard_Integer theY) const;
-
-
-
-  DEFINE_STANDARD_RTTI(Image_PixMap)
 
-protected:
+public:
 
+  //! This enumeration define packed image plane formats
+  typedef enum tagFormat {
+      ImgUNKNOWN = 0, //!< unsupported or unknown format
+      ImgGray    = 1, //!< 1 byte per pixel
+      ImgRGB,         //!< 3 bytes packed RGB image plane
+      ImgBGR,         //!< same as RGB but with different components order
+      ImgRGB32,       //!< 4 bytes packed RGB image plane (1 extra byte for alignment, may have undefined value)
+      ImgBGR32,       //!< same as RGB but with different components order
+      ImgRGBA,        //!< 4 bytes packed RGBA image plane
+      ImgBGRA,        //!< same as RGBA but with different components order
+      ImgGrayF,       //!< 1 float  (4-bytes) per pixel (1-component plane)
+      ImgRGBF,        //!< 3 floats (12-bytes) RGB image plane
+      ImgBGRF,        //!< same as RGBF but with different components order
+      ImgRGBAF,       //!< 4 floats (16-bytes) RGBA image plane
+      ImgBGRAF,       //!< same as RGBAF but with different components order
+  } ImgFormat;
 
-Image_HPrivateImage myImage;
+  //! Determine Big-Endian at runtime
+  static inline bool IsBigEndianHost()
+  {
+    union { int myInt; char myChar[sizeof(int)]; } aUnion;
+    aUnion.myInt = 1;
+    return !aUnion.myChar[0];
+  }
 
+public: // high-level API
 
-private: 
+  inline ImgFormat Format() const
+  {
+    return myImgFormat;
+  }
 
+  //! @return image width in pixels
+  inline Standard_Size Width() const
+  {
+    return myData.mySizeX;
+  }
 
+  //! @return image height in pixels
+  inline Standard_Size Height() const
+  {
+    return myData.mySizeY;
+  }
 
+  //! @return image width in pixels
+  inline Standard_Size SizeX() const
+  {
+    return myData.mySizeX;
+  }
 
-};
+  //! @return image height in pixels
+  inline Standard_Size SizeY() const
+  {
+    return myData.mySizeY;
+  }
+
+  //! @return width / height.
+  inline Standard_Real Ratio() const
+  {
+    return (myData.mySizeY > 0) ? (Standard_Real(myData.mySizeX) / Standard_Real(myData.mySizeY)) : 1.0;
+  }
+
+  //! @return true if data is NULL.
+  bool IsEmpty() const
+  {
+    return myData.myDataPtr == NULL;
+  }
+
+  //! Empty constructor. Initialize the NULL image plane.
+  Standard_EXPORT Image_PixMap();
+
+  //! Destructor
+  Standard_EXPORT virtual ~Image_PixMap();
+
+  //! Returns the pixel color. This function is relatively slow.
+  //! @param theX - column index from left
+  //! @param theY - row    index from top
+  //! @return the pixel color
+  inline Quantity_Color PixelColor (const Standard_Integer theX,
+                                    const Standard_Integer theY) const
+  {
+    Quantity_Parameter aDummy;
+    return PixelColor (theX, theY, aDummy);
+  }
+
+  //! Returns the pixel color. This function is relatively slow.
+  //! theAlpha argument is set to color intensity (0 - transparent, 1 - opaque)
+  Standard_EXPORT Quantity_Color PixelColor (const Standard_Integer theX,
+                                             const Standard_Integer theY,
+                                             Quantity_Parameter&    theAlpha) const;
+
+  //! Initialize image plane as wrapper over alien data.
+  //! Data will not be copied! Notice that caller should ensure
+  //! that data pointer will not be released during this wrapper lifetime.
+  //! You may call InitCopy() to perform data copying.
+  Standard_EXPORT virtual bool InitWrapper (ImgFormat            thePixelFormat,
+                                            Standard_Byte*       theDataPtr,
+                                            const Standard_Size  theSizeX,
+                                            const Standard_Size  theSizeY,
+                                            const Standard_Size  theSizeRowBytes = 0);
+
+  //! Initialize image plane with required dimensions.
+  //! Memory will be left uninitialized (performance trick).
+  Standard_EXPORT virtual bool InitTrash (ImgFormat           thePixelFormat,
+                                          const Standard_Size theSizeX,
+                                          const Standard_Size theSizeY,
+                                          const Standard_Size theSizeRowBytes = 0);
+
+  //! Initialize by copying data.
+  //! If you want to copy alien data you should create wrapper using InitWrapper() before.
+  Standard_EXPORT virtual bool InitCopy (const Image_PixMap& theCopy);
+
+  //! Initialize image plane with required dimensions.
+  //! Buffer will be zeroed (black color for most formats).
+  Standard_EXPORT bool InitZero (ImgFormat           thePixelFormat,
+                                 const Standard_Size theSizeX,
+                                 const Standard_Size theSizeY,
+                                 const Standard_Size theSizeRowBytes = 0,
+                                 const Standard_Byte theValue = 0);
+
+  //! Method correctly deallocate internal buffer.
+  Standard_EXPORT virtual void Clear (ImgFormat thePixelFormat = ImgGray);
+
+public: // low-level API for batch-processing (pixels reading / comparison / modification)
+
+  //! Returns true if image data stored from Top to the Down (default).
+  //! Some external APIs can return bottom-up data instead
+  //! (topmost scanlines starts from the bottom in memory).
+  //! Notice that access methods within this class automatically
+  //! convert input row-index to apply this flag!
+  //! You should use this flag only if interconnect with alien APIs and buffers.
+  //! @return true if image data is top-down.
+  inline bool IsTopDown() const
+  {
+    return myData.myTopToDown == 1;
+  }
+
+  //! Setup scanlines order in memory - top-down or bottom-up.
+  //! Drawers should explicitly specify this value if current state IsTopDown() was ignored!
+  //! @param theIsTopDown - top-down flag.
+  inline void SetTopDown (bool theIsTopDown)
+  {
+    myData.myTopToDown = (theIsTopDown ? 1 : Standard_Size(-1));
+    setTopDown();
+  }
+
+  //! Returns +1 if scanlines ordered in Top->Down order in memory and -1 otherwise.
+  //! @return scanline increment for Top->Down iteration
+  inline Standard_Size TopDownInc() const
+  {
+    return myData.myTopToDown;
+  }
+
+  //! @return data pointer for low-level operations (copying entire buffer, parsing with extra tools etc.).
+  inline const Standard_Byte* Data() const
+  {
+    return myData.myDataPtr;
+  }
 
+  //! @return data pointer for low-level operations (copying entire buffer, parsing with extra tools etc.).
+  inline Standard_Byte* ChangeData()
+  {
+    return myData.myDataPtr;
+  }
 
+  //! @return data pointer to requested row (first column).
+  inline const Standard_Byte* Row (const Standard_Size theRow) const
+  {
+    return myData.Row (theRow);
+  }
 
+  //! @return data pointer to requested row (first column).
+  inline Standard_Byte* ChangeRow (const Standard_Size theRow)
+  {
+    return myData.ChangeRow (theRow);
+  }
 
+  //! @return bytes reserved for one pixel (may include extra bytes for alignment).
+  inline Standard_Size SizePixelBytes() const
+  {
+    return myData.mySizeBPP;
+  }
 
-// other Inline functions and methods (like "C++: function call" methods)
+  //! @return bytes reserved for one pixel (may include extra bytes for alignment).
+  static Standard_Size SizePixelBytes (const Image_PixMap::ImgFormat thePixelFormat);
+
+  //! @return bytes reserved per row.
+  //! Could be larger than needed to store packed row (extra bytes for alignment etc.).
+  inline Standard_Size SizeRowBytes() const
+  {
+    return myData.mySizeRowBytes;
+  }
+
+  //! @return the extra bytes in the row.
+  inline Standard_Size RowExtraBytes() const
+  {
+    return myData.mySizeRowBytes - myData.mySizeX * myData.mySizeBPP;
+  }
+
+  //! Compute the maximal row alignment for current row size.
+  //! @return maximal row alignment in bytes (up to 16 bytes).
+  inline Standard_Size MaxRowAligmentBytes() const
+  {
+    return myData.MaxRowAligmentBytes();
+  }
+
+  inline Standard_Size SizeBytes() const
+  {
+    return myData.SizeBytes();
+  }
+
+  //! Access image buffer for write/read operations with specified color type.
+  template <typename ColorType_t>
+  inline Image_PixMapData<ColorType_t>& EditData()
+  {
+    return *(Image_PixMapData<ColorType_t>* )&myData;
+  }
+
+  //! Access image buffer for read operations with specified color type.
+  template <typename ColorType_t>
+  inline const Image_PixMapData<ColorType_t>& ReadData() const
+  {
+    return *(Image_PixMapData<ColorType_t>* )&myData;
+  }
+
+  //! Access image pixel with specified color type.
+  template <typename ColorType_t>
+  inline const ColorType_t& Value (const Standard_Size theRow,
+                                   const Standard_Size theCol) const
+  {
+    return ((Image_PixMapData<ColorType_t>* )&myData)->Value (theRow, theCol);
+  }
+
+protected:
+
+  //! Setup pixel format
+  Standard_EXPORT void setFormat (ImgFormat thePixelFormat);
+
+  //! Auxiliary method to setup myTopRowPtr
+  Standard_EXPORT void setTopDown();
+
+protected:
+
+  Image_PixMapData<Standard_Byte> myData;
+  ImgFormat                       myImgFormat;    //!< pixel format
+  bool                            myIsOwnPointer; //!< if data was allocated by this class - flag is true
+
+private:
+
+  //! Copying allowed only within Handles
+  Image_PixMap            (const Image_PixMap& );
+  Image_PixMap& operator= (const Image_PixMap& );
+
+public:
+
+  DEFINE_STANDARD_RTTI(Image_PixMap) // Type definition
+
+};
 
+DEFINE_STANDARD_HANDLE(Image_PixMap, Standard_Transient)
 
-#endif
+#endif // _Image_PixMap_H__
diff --git a/inc/Image_PixMapData.hxx b/inc/Image_PixMapData.hxx
new file mode 100644
index 0000000..f0ee720
--- /dev/null
+++ b/inc/Image_PixMapData.hxx
@@ -0,0 +1,113 @@
+// Created on: 2012-07-18
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _Image_PixMapData_H__
+#define _Image_PixMapData_H__
+
+#include <Image_Color.hxx>
+
+//! POD template structure to access image buffer
+template<typename ColorType_t>
+struct Image_PixMapData
+{
+
+  //! @return data pointer for low-level operations (copying entire buffer, parsing with extra tools etc.).
+  inline const ColorType_t* Data() const
+  {
+    return (const ColorType_t* )myDataPtr;
+  }
+
+  //! @return data pointer for low-level operations (copying entire buffer, parsing with extra tools etc.).
+  inline ColorType_t* ChangeData()
+  {
+    return (ColorType_t* )myDataPtr;
+  }
+
+  //! @return data pointer to requested row (first column).
+  inline const ColorType_t* Row (const Standard_Size theRow) const
+  {
+    return (ColorType_t* )(myTopRowPtr + mySizeRowBytes * theRow * myTopToDown);
+  }
+
+  //! @return data pointer to requested row (first column).
+  inline ColorType_t* ChangeRow (const Standard_Size theRow)
+  {
+    return (ColorType_t* )(myTopRowPtr + mySizeRowBytes * theRow * myTopToDown);
+  }
+
+  //! @return data pointer to requested position.
+  inline const ColorType_t& Value (const Standard_Size theRow,
+                                   const Standard_Size theCol) const
+  {
+    return *(const ColorType_t* )(myTopRowPtr + mySizeRowBytes * theRow * myTopToDown + mySizeBPP * theCol);
+  }
+
+  //! @return data pointer to requested position.
+  inline ColorType_t& ChangeValue (const Standard_Size theRow,
+                                   const Standard_Size theCol)
+  {
+    return *(ColorType_t* )(myTopRowPtr + mySizeRowBytes * theRow * myTopToDown + mySizeBPP * theCol);
+  }
+
+  //! Compute the maximal row alignment for current row size.
+  //! @return maximal row alignment in bytes (up to 16 bytes).
+  inline Standard_Size MaxRowAligmentBytes() const
+  {
+    Standard_Size anAlignment = 2;
+    for (; anAlignment <= 16; anAlignment <<= 1)
+    {
+      if ((mySizeRowBytes % anAlignment) != 0 || (Standard_Size(myDataPtr) % anAlignment) != 0)
+      {
+        return (anAlignment >> 1);
+      }
+    }
+    return anAlignment;
+  }
+
+  //! @return bytes allocated for the whole image plane.
+  inline Standard_Size SizeBytes() const
+  {
+    return mySizeRowBytes * mySizeY;
+  }
+
+  //! @return image width in pixels
+  inline Standard_Size SizeX() const
+  {
+    return mySizeX;
+  }
+
+  //! @return image height in pixels
+  inline Standard_Size SizeY() const
+  {
+    return mySizeY;
+  }
+
+public:
+
+  Standard_Byte* myDataPtr;      //!< pointer to the data
+  Standard_Byte* myTopRowPtr;    //!< pointer to the topmost row (depending on scanlines order in memory)
+  Standard_Size  mySizeBPP;      //!< bytes per pixel
+  Standard_Size  mySizeX;        //!< width  in pixels
+  Standard_Size  mySizeY;        //!< height in pixels
+  Standard_Size  mySizeRowBytes; //!< number of bytes per line (in most cases equal to 3 * sizeX)
+  Standard_Size  myTopToDown;    //!< image scanlines direction in memory from Top to the Down
+
+};
+
+#endif // _Image_PixMapData_H__
diff --git a/inc/Image_PixelFieldOfDColorImage.hxx b/inc/Image_PixelFieldOfDColorImage.hxx
index c48b977..5eb818a 100644
--- a/inc/Image_PixelFieldOfDColorImage.hxx
+++ b/inc/Image_PixelFieldOfDColorImage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Aspect_ColorPixel;
 class Image_PixelFieldOfDColorImage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Image_PixelFieldOfDColorImage(const Standard_Integer Width,const Standard_Integer Height);
diff --git a/inc/Image_PixelFieldOfDIndexedImage.hxx b/inc/Image_PixelFieldOfDIndexedImage.hxx
index 9a14924..d10199d 100644
--- a/inc/Image_PixelFieldOfDIndexedImage.hxx
+++ b/inc/Image_PixelFieldOfDIndexedImage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Aspect_IndexPixel;
 class Image_PixelFieldOfDIndexedImage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Image_PixelFieldOfDIndexedImage(const Standard_Integer Width,const Standard_Integer Height);
diff --git a/inc/Image_PixelInterpolation.hxx b/inc/Image_PixelInterpolation.hxx
index 6b3e12d..0433909 100644
--- a/inc/Image_PixelInterpolation.hxx
+++ b/inc/Image_PixelInterpolation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class Aspect_IndexPixel;
 class Image_PixelInterpolation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a PixelInterpolation  object. <br>
   Standard_EXPORT   Image_PixelInterpolation();
diff --git a/inc/Image_PixelRowOfDColorImage.hxx b/inc/Image_PixelRowOfDColorImage.hxx
index 0fd6e32..28a8d98 100644
--- a/inc/Image_PixelRowOfDColorImage.hxx
+++ b/inc/Image_PixelRowOfDColorImage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Aspect_ColorPixel;
 class Image_PixelRowOfDColorImage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Image_PixelRowOfDColorImage(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Image_PixelRowOfDIndexedImage.hxx b/inc/Image_PixelRowOfDIndexedImage.hxx
index b06a076..34e9670 100644
--- a/inc/Image_PixelRowOfDIndexedImage.hxx
+++ b/inc/Image_PixelRowOfDIndexedImage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Aspect_IndexPixel;
 class Image_PixelRowOfDIndexedImage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Image_PixelRowOfDIndexedImage(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Image_PlanarPixelInterpolation.hxx b/inc/Image_PlanarPixelInterpolation.hxx
index 1532584..1b336f6 100644
--- a/inc/Image_PlanarPixelInterpolation.hxx
+++ b/inc/Image_PlanarPixelInterpolation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class Aspect_IndexPixel;
 class Image_PlanarPixelInterpolation  : public Image_PixelInterpolation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a PlanarPixelInterpolation  object. <br>
   Standard_EXPORT   Image_PlanarPixelInterpolation();
diff --git a/inc/Image_TypeOfImage.hxx b/inc/Image_TypeOfImage.hxx
index aaa14bc..2815d55 100644
--- a/inc/Image_TypeOfImage.hxx
+++ b/inc/Image_TypeOfImage.hxx
@@ -9,12 +9,7 @@
 //! Type of dithering method. <br>
 enum Image_TypeOfImage {
 Image_TOI_ColorImage,
-Image_TOI_PseudoColorImage,
-Image_TOI_RGB,
-Image_TOI_RGBA,
-Image_TOI_RGBF,
-Image_TOI_RGBAF,
-Image_TOI_FLOAT
+Image_TOI_PseudoColorImage
 };
 
 #ifndef _Standard_PrimitiveTypes_HeaderFile
diff --git a/inc/IntAna2d_AnaIntersection.hxx b/inc/IntAna2d_AnaIntersection.hxx
index f07eda1..d45a5c0 100644
--- a/inc/IntAna2d_AnaIntersection.hxx
+++ b/inc/IntAna2d_AnaIntersection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class IntAna2d_IntPoint;
 class IntAna2d_AnaIntersection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. IsDone returns False. <br>
   Standard_EXPORT   IntAna2d_AnaIntersection();
diff --git a/inc/IntAna2d_Conic.hxx b/inc/IntAna2d_Conic.hxx
index 339b8cc..15c496c 100644
--- a/inc/IntAna2d_Conic.hxx
+++ b/inc/IntAna2d_Conic.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Ax2d;
 class IntAna2d_Conic  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntAna2d_Conic(const gp_Circ2d& C);
diff --git a/inc/IntAna2d_IntPoint.hxx b/inc/IntAna2d_IntPoint.hxx
index a50c8fc..ab10577 100644
--- a/inc/IntAna2d_IntPoint.hxx
+++ b/inc/IntAna2d_IntPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(IntAna2d_IntPoint);
 class IntAna2d_IntPoint  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Create an intersection point between 2 parametric 2d lines. <br>
 //!          X,Y are the coordinate of the point. U1 is the parameter <br>
diff --git a/inc/IntAna_Curve.hxx b/inc/IntAna_Curve.hxx
index b3b4f76..ee632a9 100644
--- a/inc/IntAna_Curve.hxx
+++ b/inc/IntAna_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class gp_Vec;
 class IntAna_Curve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty Constructor <br>
   Standard_EXPORT   IntAna_Curve();
diff --git a/inc/IntAna_Int3Pln.hxx b/inc/IntAna_Int3Pln.hxx
index f87ef8a..4dfa847 100644
--- a/inc/IntAna_Int3Pln.hxx
+++ b/inc/IntAna_Int3Pln.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_Pnt;
 class IntAna_Int3Pln  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntAna_Int3Pln();
diff --git a/inc/IntAna_IntConicQuad.hxx b/inc/IntAna_IntConicQuad.hxx
index f0a4299..895f7bd 100644
--- a/inc/IntAna_IntConicQuad.hxx
+++ b/inc/IntAna_IntConicQuad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class gp_Pnt;
 class IntAna_IntConicQuad  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
 //! <br>
diff --git a/inc/IntAna_IntLinTorus.hxx b/inc/IntAna_IntLinTorus.hxx
index 93819a9..7168678 100644
--- a/inc/IntAna_IntLinTorus.hxx
+++ b/inc/IntAna_IntLinTorus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_Pnt;
 class IntAna_IntLinTorus  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntAna_IntLinTorus();
diff --git a/inc/IntAna_IntQuadQuad.hxx b/inc/IntAna_IntQuadQuad.hxx
index 6e414d4..818a902 100644
--- a/inc/IntAna_IntQuadQuad.hxx
+++ b/inc/IntAna_IntQuadQuad.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class gp_Pnt;
 class IntAna_IntQuadQuad  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty Constructor <br>
   Standard_EXPORT   IntAna_IntQuadQuad();
diff --git a/inc/IntAna_ListIteratorOfListOfCurve.hxx b/inc/IntAna_ListIteratorOfListOfCurve.hxx
index beb4669..5e448b7 100644
--- a/inc/IntAna_ListIteratorOfListOfCurve.hxx
+++ b/inc/IntAna_ListIteratorOfListOfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class IntAna_ListNodeOfListOfCurve;
 class IntAna_ListIteratorOfListOfCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntAna_ListIteratorOfListOfCurve();
diff --git a/inc/IntAna_ListOfCurve.hxx b/inc/IntAna_ListOfCurve.hxx
index dab8b40..d358e1c 100644
--- a/inc/IntAna_ListOfCurve.hxx
+++ b/inc/IntAna_ListOfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IntAna_ListNodeOfListOfCurve;
 class IntAna_ListOfCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntAna_ListOfCurve();
diff --git a/inc/IntAna_QuadQuadGeo.hxx b/inc/IntAna_QuadQuadGeo.hxx
index 3b44575..4b3435a 100644
--- a/inc/IntAna_QuadQuadGeo.hxx
+++ b/inc/IntAna_QuadQuadGeo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class gp_Hypr;
 class IntAna_QuadQuadGeo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   IntAna_QuadQuadGeo();
diff --git a/inc/IntAna_Quadric.hxx b/inc/IntAna_Quadric.hxx
index 2d79eea..27f706e 100644
--- a/inc/IntAna_Quadric.hxx
+++ b/inc/IntAna_Quadric.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_Ax3;
 class IntAna_Quadric  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty Constructor <br>
   Standard_EXPORT   IntAna_Quadric();
diff --git a/inc/IntCurveSurface_HInter.hxx b/inc/IntCurveSurface_HInter.hxx
index be0932e..4cb472c 100644
--- a/inc/IntCurveSurface_HInter.hxx
+++ b/inc/IntCurveSurface_HInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class TColStd_Array1OfReal;
 class IntCurveSurface_HInter  : public IntCurveSurface_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurveSurface_HInter();
diff --git a/inc/IntCurveSurface_Inter.gxx b/inc/IntCurveSurface_Inter.gxx
index ac2d133..c8bfb56 100644
--- a/inc/IntCurveSurface_Inter.gxx
+++ b/inc/IntCurveSurface_Inter.gxx
@@ -25,7 +25,7 @@
 
 
 #define  TOLTANGENCY         0.00000001
-#define  TOLERANCE_ANGULAIRE 0.00000001
+#define  TOLERANCE_ANGULAIRE 1.e-12//0.00000001
 #define  TOLERANCE           0.00000001
 
 #define NBSAMPLESONCIRCLE  32
@@ -460,23 +460,6 @@ void IntCurveSurface_Inter::Perform(const TheCurve&   curve,
     U0 = TheSurfaceTool::FirstUParameter(surface);
     U1 = TheSurfaceTool::LastUParameter(surface); 
 
-    //-- ofv: begin
-    Standard_Boolean doTrim = DoTrim(curve,surface);
-    if(doTrim) {
-      TColgp_Array2OfPnt aPS(1,50,1,50);
-      Bnd_Box SB;
-      Standard_Real g = 1.e-7;
-      DoSurface(surface,U0,U1,V0,V1,aPS,SB,g);
-      Bnd_Box CB;
-      DoCurve(curve,CB);
-      CB.Enlarge(g);
-      TColStd_Array1OfReal X(1,2), Y(1,2), Z(1,2);
-      DoCommonBox(SB,CB,X,Y,Z);
-      TColStd_Array1OfReal B(1,4);
-      DoNewBounds(surface,U0,U1,V0,V1,aPS,X,Y,Z,B);
-      U0 = B(1); U1 = B(2); V0 = B(3); V1 = B(4);
-    }
-    //-- ofv: end
 
 #if 0
     //-- jgv patch (from)
diff --git a/inc/IntCurveSurface_Intersection.hxx b/inc/IntCurveSurface_Intersection.hxx
index 8babeb4..df82a66 100644
--- a/inc/IntCurveSurface_Intersection.hxx
+++ b/inc/IntCurveSurface_Intersection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class IntCurveSurface_IntersectionSegment;
 class IntCurveSurface_Intersection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns the <done> field. <br>
   Standard_EXPORT     Standard_Boolean IsDone() const;
diff --git a/inc/IntCurveSurface_IntersectionPoint.hxx b/inc/IntCurveSurface_IntersectionPoint.hxx
index cce6a02..e1ac0de 100644
--- a/inc/IntCurveSurface_IntersectionPoint.hxx
+++ b/inc/IntCurveSurface_IntersectionPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Pnt;
 class IntCurveSurface_IntersectionPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty Constructor. <br>
   Standard_EXPORT   IntCurveSurface_IntersectionPoint();
diff --git a/inc/IntCurveSurface_IntersectionSegment.hxx b/inc/IntCurveSurface_IntersectionSegment.hxx
index b94cc36..e80bea5 100644
--- a/inc/IntCurveSurface_IntersectionSegment.hxx
+++ b/inc/IntCurveSurface_IntersectionSegment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class IntCurveSurface_IntersectionPoint;
 class IntCurveSurface_IntersectionSegment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurveSurface_IntersectionSegment();
diff --git a/inc/IntCurveSurface_SequenceOfPnt.hxx b/inc/IntCurveSurface_SequenceOfPnt.hxx
index 2ccf6c7..b1565d5 100644
--- a/inc/IntCurveSurface_SequenceOfPnt.hxx
+++ b/inc/IntCurveSurface_SequenceOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntCurveSurface_SequenceNodeOfSequenceOfPnt;
 class IntCurveSurface_SequenceOfPnt  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntCurveSurface_SequenceOfPnt();
diff --git a/inc/IntCurveSurface_SequenceOfSeg.hxx b/inc/IntCurveSurface_SequenceOfSeg.hxx
index df16691..ad4948d 100644
--- a/inc/IntCurveSurface_SequenceOfSeg.hxx
+++ b/inc/IntCurveSurface_SequenceOfSeg.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntCurveSurface_SequenceNodeOfSequenceOfSeg;
 class IntCurveSurface_SequenceOfSeg  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntCurveSurface_SequenceOfSeg();
diff --git a/inc/IntCurveSurface_TheCSFunctionOfHInter.hxx b/inc/IntCurveSurface_TheCSFunctionOfHInter.hxx
index 96a7d63..d774a21 100644
--- a/inc/IntCurveSurface_TheCSFunctionOfHInter.hxx
+++ b/inc/IntCurveSurface_TheCSFunctionOfHInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Pnt;
 class IntCurveSurface_TheCSFunctionOfHInter  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurveSurface_TheCSFunctionOfHInter(const Handle(Adaptor3d_HSurface)& S,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/IntCurveSurface_TheExactHInter.hxx b/inc/IntCurveSurface_TheExactHInter.hxx
index 520d869..08b03cf 100644
--- a/inc/IntCurveSurface_TheExactHInter.hxx
+++ b/inc/IntCurveSurface_TheExactHInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Pnt;
 class IntCurveSurface_TheExactHInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurveSurface_TheExactHInter(const Standard_Real U,const Standard_Real V,const Standard_Real W,const IntCurveSurface_TheCSFunctionOfHInter& F,const Standard_Real TolTangency,const Standard_Real MarginCoef = 0.0);
diff --git a/inc/IntCurveSurface_TheHCurveTool.hxx b/inc/IntCurveSurface_TheHCurveTool.hxx
index e766611..2538a5b 100644
--- a/inc/IntCurveSurface_TheHCurveTool.hxx
+++ b/inc/IntCurveSurface_TheHCurveTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -77,18 +80,7 @@ class TColStd_HArray1OfReal;
 class IntCurveSurface_TheHCurveTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstParameter(const Handle(Adaptor3d_HCurve)& C) ;
diff --git a/inc/IntCurveSurface_TheInterferenceOfHInter.hxx b/inc/IntCurveSurface_TheInterferenceOfHInter.hxx
index 3b476da..54ffb3a 100644
--- a/inc/IntCurveSurface_TheInterferenceOfHInter.hxx
+++ b/inc/IntCurveSurface_TheInterferenceOfHInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class gp_XYZ;
 class IntCurveSurface_TheInterferenceOfHInter  : public Intf_Interference {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurveSurface_TheInterferenceOfHInter();
diff --git a/inc/IntCurveSurface_ThePolygonOfHInter.hxx b/inc/IntCurveSurface_ThePolygonOfHInter.hxx
index 8433641..ced2949 100644
--- a/inc/IntCurveSurface_ThePolygonOfHInter.hxx
+++ b/inc/IntCurveSurface_ThePolygonOfHInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Pnt;
 class IntCurveSurface_ThePolygonOfHInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurveSurface_ThePolygonOfHInter(const Handle(Adaptor3d_HCurve)& Curve,const Standard_Integer NbPnt);
diff --git a/inc/IntCurveSurface_ThePolygonToolOfHInter.hxx b/inc/IntCurveSurface_ThePolygonToolOfHInter.hxx
index f8aa5f7..c595de6 100644
--- a/inc/IntCurveSurface_ThePolygonToolOfHInter.hxx
+++ b/inc/IntCurveSurface_ThePolygonToolOfHInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Bnd_Box;
 class IntCurveSurface_ThePolygonToolOfHInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static const Bnd_Box& Bounding(const IntCurveSurface_ThePolygonOfHInter& thePolygon) ;
diff --git a/inc/IntCurveSurface_ThePolyhedronOfHInter.hxx b/inc/IntCurveSurface_ThePolyhedronOfHInter.hxx
index 4b85d75..5af3f1f 100644
--- a/inc/IntCurveSurface_ThePolyhedronOfHInter.hxx
+++ b/inc/IntCurveSurface_ThePolyhedronOfHInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class gp_XYZ;
 class IntCurveSurface_ThePolyhedronOfHInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurveSurface_ThePolyhedronOfHInter(const Handle(Adaptor3d_HSurface)& Surface,const Standard_Integer nbdU,const Standard_Integer nbdV,const Standard_Real U1,const Standard_Real V1,const Standard_Real U2,const Standard_Real V2);
diff --git a/inc/IntCurveSurface_ThePolyhedronToolOfHInter.hxx b/inc/IntCurveSurface_ThePolyhedronToolOfHInter.hxx
index 9856ff5..f426541 100644
--- a/inc/IntCurveSurface_ThePolyhedronToolOfHInter.hxx
+++ b/inc/IntCurveSurface_ThePolyhedronToolOfHInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_Pnt;
 class IntCurveSurface_ThePolyhedronToolOfHInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static const Bnd_Box& Bounding(const IntCurveSurface_ThePolyhedronOfHInter& thePolyh) ;
diff --git a/inc/IntCurveSurface_TheQuadCurvExactHInter.hxx b/inc/IntCurveSurface_TheQuadCurvExactHInter.hxx
index 865b200..ea77066 100644
--- a/inc/IntCurveSurface_TheQuadCurvExactHInter.hxx
+++ b/inc/IntCurveSurface_TheQuadCurvExactHInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter;
 class IntCurveSurface_TheQuadCurvExactHInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurveSurface_TheQuadCurvExactHInter(const Handle(Adaptor3d_HSurface)& S,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter.hxx b/inc/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter.hxx
index 2306c0f..5557a2e 100644
--- a/inc/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter.hxx
+++ b/inc/IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class IntCurveSurface_TheHCurveTool;
 class IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter(const IntSurf_Quadric& Q,const Handle(Adaptor3d_HCurve)& C);
diff --git a/inc/IntCurve_IConicTool.hxx b/inc/IntCurve_IConicTool.hxx
index e786198..78cef08 100644
--- a/inc/IntCurve_IConicTool.hxx
+++ b/inc/IntCurve_IConicTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Vec2d;
 class IntCurve_IConicTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurve_IConicTool();
diff --git a/inc/IntCurve_IntConicConic.hxx b/inc/IntCurve_IntConicConic.hxx
index a039c67..179094b 100644
--- a/inc/IntCurve_IntConicConic.hxx
+++ b/inc/IntCurve_IntConicConic.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Hypr2d;
 class IntCurve_IntConicConic  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty Constructor <br>
       IntCurve_IntConicConic();
diff --git a/inc/IntCurve_IntImpConicParConic.hxx b/inc/IntCurve_IntImpConicParConic.hxx
index 8a65c7e..a90ae36 100644
--- a/inc/IntCurve_IntImpConicParConic.hxx
+++ b/inc/IntCurve_IntImpConicParConic.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TColStd_Array1OfReal;
 class IntCurve_IntImpConicParConic  : public IntRes2d_Intersection {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurve_IntImpConicParConic();
diff --git a/inc/IntCurve_IntPolyPolyGen.gxx b/inc/IntCurve_IntPolyPolyGen.gxx
index 051efad..fff89cb 100644
--- a/inc/IntCurve_IntPolyPolyGen.gxx
+++ b/inc/IntCurve_IntPolyPolyGen.gxx
@@ -358,14 +358,8 @@ void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1
                   //--   Les courbes auto-intersectantes donne souvent des 
                   //--   polygones assez loin de la courbe a parametre ct.
 
-  if(NbIter>0) {
-    if((D1.LastParameter()-D1.FirstParameter())
-       >0.5*(DeltaU)) { 
-      nbsamples=(3*(nbsamples*NbIter)/2);
-    }
-    else { 
+  if(NbIter>0) { 
       nbsamples=(3*(nbsamples*NbIter))/2;
-    }
   }
   IntCurve_ThePolygon2d Poly1(C1,nbsamples,D1,Tol);
   if(!Poly1.AutoIntersectionIsPossible()) { 
@@ -777,10 +771,7 @@ void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1
     }
   else // NbIter > 0
     {
-      if ((D1.LastParameter()-D1.FirstParameter()) > 0.5*(DeltaU))
-	nbsamplesOnC1=(5*(nbsamplesOnC1*NbIter))/4;
-      else
-	nbsamplesOnC1=(5*(nbsamplesOnC1*NbIter))/4;
+	    nbsamplesOnC1=(5*(nbsamplesOnC1*NbIter))/4;
     }
   /////////////////////////////////////////////
 
@@ -794,10 +785,7 @@ void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1
     }
   else // NbIter > 0
     {
-      if ((D2.LastParameter()-D2.FirstParameter()) > 0.5*(DeltaV))
-	nbsamplesOnC2=(5*(nbsamplesOnC2*NbIter))/4;
-      else
-	nbsamplesOnC2=(5*(nbsamplesOnC2*NbIter))/4;
+	    nbsamplesOnC2=(5*(nbsamplesOnC2*NbIter))/4;
     }
   /////////////////////////////////////////////
 
diff --git a/inc/IntCurve_MyImpParToolOfIntImpConicParConic.hxx b/inc/IntCurve_MyImpParToolOfIntImpConicParConic.hxx
index 4033e78..fb07aea 100644
--- a/inc/IntCurve_MyImpParToolOfIntImpConicParConic.hxx
+++ b/inc/IntCurve_MyImpParToolOfIntImpConicParConic.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class IntCurve_PConicTool;
 class IntCurve_MyImpParToolOfIntImpConicParConic  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurve_MyImpParToolOfIntImpConicParConic(const IntCurve_IConicTool& IT,const IntCurve_PConic& PC);
diff --git a/inc/IntCurve_PConic.hxx b/inc/IntCurve_PConic.hxx
index 1a76a14..f97aa6b 100644
--- a/inc/IntCurve_PConic.hxx
+++ b/inc/IntCurve_PConic.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Ax22d;
 class IntCurve_PConic  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurve_PConic(const IntCurve_PConic& PC);
diff --git a/inc/IntCurve_PConicTool.hxx b/inc/IntCurve_PConicTool.hxx
index f2de143..cab6cf2 100644
--- a/inc/IntCurve_PConicTool.hxx
+++ b/inc/IntCurve_PConicTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class gp_Vec2d;
 class IntCurve_PConicTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Real EpsX(const IntCurve_PConic& C) ;
diff --git a/inc/IntCurve_ProjectOnPConicTool.hxx b/inc/IntCurve_ProjectOnPConicTool.hxx
index ce5dce3..1d6331c 100644
--- a/inc/IntCurve_ProjectOnPConicTool.hxx
+++ b/inc/IntCurve_ProjectOnPConicTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class gp_Pnt2d;
 class IntCurve_ProjectOnPConicTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Returns  the parameter V  of the  point   on the <br>
 //!  parametric  curve corresponding to  the  Point  Pnt.   The <br>
diff --git a/inc/IntCurvesFace_Intersector.hxx b/inc/IntCurvesFace_Intersector.hxx
index c5fb4aa..b0ec957 100644
--- a/inc/IntCurvesFace_Intersector.hxx
+++ b/inc/IntCurvesFace_Intersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class Bnd_Box;
 class IntCurvesFace_Intersector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Load a Face. <br>
 //! <br>
diff --git a/inc/IntCurvesFace_ShapeIntersector.hxx b/inc/IntCurvesFace_ShapeIntersector.hxx
index 59000b9..ee67304 100644
--- a/inc/IntCurvesFace_ShapeIntersector.hxx
+++ b/inc/IntCurvesFace_ShapeIntersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class TopoDS_Face;
 class IntCurvesFace_ShapeIntersector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntCurvesFace_ShapeIntersector();
diff --git a/inc/IntImpParGen.hxx b/inc/IntImpParGen.hxx
index 37d7cac..cfd5e88 100644
--- a/inc/IntImpParGen.hxx
+++ b/inc/IntImpParGen.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class IntImpParGen_MyImpParTool;
 class IntImpParGen  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void DetermineTransition(const IntRes2d_Position Pos1,gp_Vec2d& Tan1,const gp_Vec2d& Norm1,IntRes2d_Transition& Trans1,const IntRes2d_Position Pos2,gp_Vec2d& Tan2,const gp_Vec2d& Norm2,IntRes2d_Transition& Trans2,const Standard_Real Tol) ;
diff --git a/inc/IntImpParGen_ImpTool.hxx b/inc/IntImpParGen_ImpTool.hxx
index bd92c90..b72be3b 100644
--- a/inc/IntImpParGen_ImpTool.hxx
+++ b/inc/IntImpParGen_ImpTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class gp_Vec2d;
 class IntImpParGen_ImpTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT     gp_Pnt2d Value(const Standard_Real U) const;
diff --git a/inc/IntPatch_ALineToWLine.hxx b/inc/IntPatch_ALineToWLine.hxx
index e0c3b7e..8cc008e 100644
--- a/inc/IntPatch_ALineToWLine.hxx
+++ b/inc/IntPatch_ALineToWLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class IntPatch_ALine;
 class IntPatch_ALineToWLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_ALineToWLine(const IntSurf_Quadric& Quad1,const IntSurf_Quadric& Quad2);
diff --git a/inc/IntPatch_ArcFunction.hxx b/inc/IntPatch_ArcFunction.hxx
index d47ddc7..72a9fe6 100644
--- a/inc/IntPatch_ArcFunction.hxx
+++ b/inc/IntPatch_ArcFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class gp_Pnt;
 class IntPatch_ArcFunction  : public math_FunctionWithDerivative {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_ArcFunction();
diff --git a/inc/IntPatch_CSFunction.hxx b/inc/IntPatch_CSFunction.hxx
index c3fc2dd..865be60 100644
--- a/inc/IntPatch_CSFunction.hxx
+++ b/inc/IntPatch_CSFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class gp_Pnt;
 class IntPatch_CSFunction  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_CSFunction(const Handle(Adaptor3d_HSurface)& S1,const Handle(Adaptor2d_HCurve2d)& C,const Handle(Adaptor3d_HSurface)& S2);
diff --git a/inc/IntPatch_CurvIntSurf.hxx b/inc/IntPatch_CurvIntSurf.hxx
index efbd2ef..d29050a 100644
--- a/inc/IntPatch_CurvIntSurf.hxx
+++ b/inc/IntPatch_CurvIntSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Pnt;
 class IntPatch_CurvIntSurf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_CurvIntSurf(const Standard_Real U,const Standard_Real V,const Standard_Real W,const IntPatch_CSFunction& F,const Standard_Real TolTangency,const Standard_Real MarginCoef = 0.0);
diff --git a/inc/IntPatch_HCurve2dTool.hxx b/inc/IntPatch_HCurve2dTool.hxx
index 2251406..5530f36 100644
--- a/inc/IntPatch_HCurve2dTool.hxx
+++ b/inc/IntPatch_HCurve2dTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class Geom2d_BSplineCurve;
 class IntPatch_HCurve2dTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Real FirstParameter(const Handle(Adaptor2d_HCurve2d)& C) ;
diff --git a/inc/IntPatch_HInterTool.hxx b/inc/IntPatch_HInterTool.hxx
index 0b09463..ff355cf 100644
--- a/inc/IntPatch_HInterTool.hxx
+++ b/inc/IntPatch_HInterTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Pnt;
 class IntPatch_HInterTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Boolean SingularOnUMin(const Handle(Adaptor3d_HSurface)& S) ;
diff --git a/inc/IntPatch_ImpImpIntersection.hxx b/inc/IntPatch_ImpImpIntersection.hxx
index 65ac035..847c0bc 100644
--- a/inc/IntPatch_ImpImpIntersection.hxx
+++ b/inc/IntPatch_ImpImpIntersection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class IntPatch_Line;
 class IntPatch_ImpImpIntersection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_ImpImpIntersection();
diff --git a/inc/IntPatch_ImpPrmIntersection.hxx b/inc/IntPatch_ImpPrmIntersection.hxx
index 82dcf7c..f826764 100644
--- a/inc/IntPatch_ImpPrmIntersection.hxx
+++ b/inc/IntPatch_ImpPrmIntersection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class IntPatch_Line;
 class IntPatch_ImpPrmIntersection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_ImpPrmIntersection();
diff --git a/inc/IntPatch_Intersection.hxx b/inc/IntPatch_Intersection.hxx
index d515988..e297d3b 100644
--- a/inc/IntPatch_Intersection.hxx
+++ b/inc/IntPatch_Intersection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class IntPatch_SequenceOfLine;
 class IntPatch_Intersection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_Intersection();
diff --git a/inc/IntPatch_LineConstructor.hxx b/inc/IntPatch_LineConstructor.hxx
index b64c98c..0b9c52a 100644
--- a/inc/IntPatch_LineConstructor.hxx
+++ b/inc/IntPatch_LineConstructor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Adaptor3d_TopolTool;
 class IntPatch_LineConstructor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_LineConstructor(const Standard_Integer mode);
diff --git a/inc/IntPatch_Point.hxx b/inc/IntPatch_Point.hxx
index 79f8716..241cfd7 100644
--- a/inc/IntPatch_Point.hxx
+++ b/inc/IntPatch_Point.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class IntSurf_PntOn2S;
 class IntPatch_Point  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   IntPatch_Point();
diff --git a/inc/IntPatch_Point.lxx b/inc/IntPatch_Point.lxx
index fe39afe..ad9a674 100644
--- a/inc/IntPatch_Point.lxx
+++ b/inc/IntPatch_Point.lxx
@@ -21,20 +21,9 @@
 
 
 inline IntPatch_Point::IntPatch_Point ()
- : para(0.0),
-   tol(0.0),
-   tgt(Standard_False),
-   mult(Standard_False),
-   onS1(Standard_False),
-   vtxonS1(Standard_False),
-   vS1(NULL),
-   arcS1(NULL),
-   prm1(0.0),
-   onS2(Standard_False),
-   vtxonS2(Standard_False),
-   vS2(NULL),
-   arcS2(NULL),
-   prm2(0.0)
+ : para(0.0), tol(0.0), tgt(Standard_False), mult(Standard_False),
+   onS1(Standard_False), vtxonS1(Standard_False), prm1(0.0),
+   onS2(Standard_False), vtxonS2(Standard_False), prm2(0.0)
 {
 }
 
@@ -64,7 +53,7 @@ inline void IntPatch_Point::SetParameter (const Standard_Real Para)
 {
   para = Para;
 }
- 
+
 
 inline void IntPatch_Point::SetMultiple (const Standard_Boolean IsMult)
 {
@@ -216,6 +205,6 @@ inline const IntSurf_PntOn2S& IntPatch_Point::PntOn2S() const
 
 inline void IntPatch_Point::Parameters(Standard_Real& U1, Standard_Real& V1,
 				       Standard_Real& U2, Standard_Real& V2) const
-{ 
+{
   pt.Parameters(U1,V1,U2,V2);
 }
diff --git a/inc/IntPatch_PolyArc.hxx b/inc/IntPatch_PolyArc.hxx
index 6da35c6..37f63b0 100644
--- a/inc/IntPatch_PolyArc.hxx
+++ b/inc/IntPatch_PolyArc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class gp_Pnt2d;
 class IntPatch_PolyArc  : public IntPatch_Polygo {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates the polygon of the arc A on the surface S. <br>
 //!          The arc is limited by the parameters Pfirst and Plast. <br>
diff --git a/inc/IntPatch_PolyLine.hxx b/inc/IntPatch_PolyLine.hxx
index 4f34081..3cdd74b 100644
--- a/inc/IntPatch_PolyLine.hxx
+++ b/inc/IntPatch_PolyLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class gp_Pnt2d;
 class IntPatch_PolyLine  : public IntPatch_Polygo {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_PolyLine();
diff --git a/inc/IntPatch_Polygo.hxx b/inc/IntPatch_Polygo.hxx
index 6e20eeb..9bd407c 100644
--- a/inc/IntPatch_Polygo.hxx
+++ b/inc/IntPatch_Polygo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Pnt2d;
 class IntPatch_Polygo  : public Intf_Polygon2d {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
         Standard_Real Error() const;
diff --git a/inc/IntPatch_Polyhedron.hxx b/inc/IntPatch_Polyhedron.hxx
index 4e94313..7f04c40 100644
--- a/inc/IntPatch_Polyhedron.hxx
+++ b/inc/IntPatch_Polyhedron.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_XYZ;
 class IntPatch_Polyhedron  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! MaTriangle constructor with an double array of pnt for the <br>
 //!          representation of a double array of triangles. <br>
diff --git a/inc/IntPatch_PolyhedronTool.hxx b/inc/IntPatch_PolyhedronTool.hxx
index 05d9ef7..4aeaf13 100644
--- a/inc/IntPatch_PolyhedronTool.hxx
+++ b/inc/IntPatch_PolyhedronTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class gp_Pnt;
 class IntPatch_PolyhedronTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Give the bounding box of the Polyhedron. <br>
       static const Bnd_Box& Bounding(const IntPatch_Polyhedron& thePolyh) ;
diff --git a/inc/IntPatch_PrmPrmIntersection.hxx b/inc/IntPatch_PrmPrmIntersection.hxx
index b5e9edc..15c8e84 100644
--- a/inc/IntPatch_PrmPrmIntersection.hxx
+++ b/inc/IntPatch_PrmPrmIntersection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class IntSurf_LineOn2S;
 class IntPatch_PrmPrmIntersection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty Constructor <br>
   Standard_EXPORT   IntPatch_PrmPrmIntersection();
diff --git a/inc/IntPatch_PrmPrmIntersection_T3Bits.hxx b/inc/IntPatch_PrmPrmIntersection_T3Bits.hxx
index c85a993..908f859 100644
--- a/inc/IntPatch_PrmPrmIntersection_T3Bits.hxx
+++ b/inc/IntPatch_PrmPrmIntersection_T3Bits.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class IntPatch_PrmPrmIntersection_T3Bits  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_PrmPrmIntersection_T3Bits(const Standard_Integer size);
diff --git a/inc/IntPatch_RstInt.hxx b/inc/IntPatch_RstInt.hxx
index 097ee6d..ec53fa4 100644
--- a/inc/IntPatch_RstInt.hxx
+++ b/inc/IntPatch_RstInt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Adaptor3d_TopolTool;
 class IntPatch_RstInt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void PutVertexOnLine(Handle(IntPatch_Line)& L,const Handle(Adaptor3d_HSurface)& Surf,const Handle(Adaptor3d_TopolTool)& Domain,const Handle(Adaptor3d_HSurface)& OtherSurf,const Standard_Boolean OnFirst,const Standard_Real Tol) ;
diff --git a/inc/IntPatch_SequenceOfIWLineOfTheIWalking.hxx b/inc/IntPatch_SequenceOfIWLineOfTheIWalking.hxx
index 4b4df55..2b6ef06 100644
--- a/inc/IntPatch_SequenceOfIWLineOfTheIWalking.hxx
+++ b/inc/IntPatch_SequenceOfIWLineOfTheIWalking.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IntPatch_SequenceNodeOfSequenceOfIWLineOfTheIWalking;
 class IntPatch_SequenceOfIWLineOfTheIWalking  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntPatch_SequenceOfIWLineOfTheIWalking();
diff --git a/inc/IntPatch_SequenceOfLine.hxx b/inc/IntPatch_SequenceOfLine.hxx
index ebae140..e2d9418 100644
--- a/inc/IntPatch_SequenceOfLine.hxx
+++ b/inc/IntPatch_SequenceOfLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IntPatch_SequenceNodeOfSequenceOfLine;
 class IntPatch_SequenceOfLine  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntPatch_SequenceOfLine();
diff --git a/inc/IntPatch_SequenceOfPathPointOfTheSOnBounds.hxx b/inc/IntPatch_SequenceOfPathPointOfTheSOnBounds.hxx
index 17af78b..3a8b393 100644
--- a/inc/IntPatch_SequenceOfPathPointOfTheSOnBounds.hxx
+++ b/inc/IntPatch_SequenceOfPathPointOfTheSOnBounds.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntPatch_SequenceNodeOfSequenceOfPathPointOfTheSOnBounds;
 class IntPatch_SequenceOfPathPointOfTheSOnBounds  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntPatch_SequenceOfPathPointOfTheSOnBounds();
diff --git a/inc/IntPatch_SequenceOfPoint.hxx b/inc/IntPatch_SequenceOfPoint.hxx
index aaeff4d..df2e74c 100644
--- a/inc/IntPatch_SequenceOfPoint.hxx
+++ b/inc/IntPatch_SequenceOfPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntPatch_SequenceNodeOfSequenceOfPoint;
 class IntPatch_SequenceOfPoint  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntPatch_SequenceOfPoint();
diff --git a/inc/IntPatch_SequenceOfSegmentOfTheSOnBounds.hxx b/inc/IntPatch_SequenceOfSegmentOfTheSOnBounds.hxx
index 03a894e..c5f08a0 100644
--- a/inc/IntPatch_SequenceOfSegmentOfTheSOnBounds.hxx
+++ b/inc/IntPatch_SequenceOfSegmentOfTheSOnBounds.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntPatch_SequenceNodeOfSequenceOfSegmentOfTheSOnBounds;
 class IntPatch_SequenceOfSegmentOfTheSOnBounds  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntPatch_SequenceOfSegmentOfTheSOnBounds();
diff --git a/inc/IntPatch_TheFunctionOfTheInt2SOfThePWalkingInter.hxx b/inc/IntPatch_TheFunctionOfTheInt2SOfThePWalkingInter.hxx
index 0dadbbe..4045608 100644
--- a/inc/IntPatch_TheFunctionOfTheInt2SOfThePWalkingInter.hxx
+++ b/inc/IntPatch_TheFunctionOfTheInt2SOfThePWalkingInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class TColStd_Array1OfReal;
 class IntPatch_TheFunctionOfTheInt2SOfThePWalkingInter  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_TheFunctionOfTheInt2SOfThePWalkingInter();
diff --git a/inc/IntPatch_TheIWalking.hxx b/inc/IntPatch_TheIWalking.hxx
index 23e7b46..df3cfd9 100644
--- a/inc/IntPatch_TheIWalking.hxx
+++ b/inc/IntPatch_TheIWalking.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -81,18 +84,7 @@ class IntSurf_PntOn2S;
 class IntPatch_TheIWalking  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_TheIWalking();
diff --git a/inc/IntPatch_TheInt2SOfThePWalkingInter.hxx b/inc/IntPatch_TheInt2SOfThePWalkingInter.hxx
index ec2a933..8058aeb 100644
--- a/inc/IntPatch_TheInt2SOfThePWalkingInter.hxx
+++ b/inc/IntPatch_TheInt2SOfThePWalkingInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class gp_Dir2d;
 class IntPatch_TheInt2SOfThePWalkingInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_TheInt2SOfThePWalkingInter();
diff --git a/inc/IntPatch_TheInterfPolyhedron.hxx b/inc/IntPatch_TheInterfPolyhedron.hxx
index d516fba..08012fc 100644
--- a/inc/IntPatch_TheInterfPolyhedron.hxx
+++ b/inc/IntPatch_TheInterfPolyhedron.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Intf_TangentZone;
 class IntPatch_TheInterfPolyhedron  : public Intf_Interference {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_TheInterfPolyhedron();
diff --git a/inc/IntPatch_ThePWalkingInter.hxx b/inc/IntPatch_ThePWalkingInter.hxx
index c59c488..0171192 100644
--- a/inc/IntPatch_ThePWalkingInter.hxx
+++ b/inc/IntPatch_ThePWalkingInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -62,18 +65,7 @@ class gp_Dir;
 class IntPatch_ThePWalkingInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_ThePWalkingInter(const Handle(Adaptor3d_HSurface)& Caro1,const Handle(Adaptor3d_HSurface)& Caro2,const Standard_Real TolTangency,const Standard_Real Epsilon,const Standard_Real Deflection,const Standard_Real Increment);
diff --git a/inc/IntPatch_ThePathPointOfTheSOnBounds.hxx b/inc/IntPatch_ThePathPointOfTheSOnBounds.hxx
index fbb8254..c78d718 100644
--- a/inc/IntPatch_ThePathPointOfTheSOnBounds.hxx
+++ b/inc/IntPatch_ThePathPointOfTheSOnBounds.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class gp_Pnt;
 class IntPatch_ThePathPointOfTheSOnBounds  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_ThePathPointOfTheSOnBounds();
diff --git a/inc/IntPatch_TheSOnBounds.hxx b/inc/IntPatch_TheSOnBounds.hxx
index 1ebcead..9132a76 100644
--- a/inc/IntPatch_TheSOnBounds.hxx
+++ b/inc/IntPatch_TheSOnBounds.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class IntPatch_SequenceNodeOfSequenceOfSegmentOfTheSOnBounds;
 class IntPatch_TheSOnBounds  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_TheSOnBounds();
diff --git a/inc/IntPatch_TheSearchInside.hxx b/inc/IntPatch_TheSearchInside.hxx
index bbb4670..ad63433 100644
--- a/inc/IntPatch_TheSearchInside.hxx
+++ b/inc/IntPatch_TheSearchInside.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class IntSurf_InteriorPoint;
 class IntPatch_TheSearchInside  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_TheSearchInside();
diff --git a/inc/IntPatch_TheSegmentOfTheSOnBounds.hxx b/inc/IntPatch_TheSegmentOfTheSOnBounds.hxx
index b63d348..b621fe1 100644
--- a/inc/IntPatch_TheSegmentOfTheSOnBounds.hxx
+++ b/inc/IntPatch_TheSegmentOfTheSOnBounds.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IntPatch_ThePathPointOfTheSOnBounds;
 class IntPatch_TheSegmentOfTheSOnBounds  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_TheSegmentOfTheSOnBounds();
diff --git a/inc/IntPatch_TheSurfFunction.hxx b/inc/IntPatch_TheSurfFunction.hxx
index 60e5a07..ed8a5b1 100644
--- a/inc/IntPatch_TheSurfFunction.hxx
+++ b/inc/IntPatch_TheSurfFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class gp_Dir2d;
 class IntPatch_TheSurfFunction  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPatch_TheSurfFunction();
diff --git a/inc/IntPoly_IndexedMapOfPnt.hxx b/inc/IntPoly_IndexedMapOfPnt.hxx
index b8355d8..b627b08 100644
--- a/inc/IntPoly_IndexedMapOfPnt.hxx
+++ b/inc/IntPoly_IndexedMapOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IntPoly_IndexedMapNodeOfIndexedMapOfPnt;
 class IntPoly_IndexedMapOfPnt  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPoly_IndexedMapOfPnt(const Standard_Integer NbBuckets = 1);
diff --git a/inc/IntPoly_IndexedMapOfPnt2d.hxx b/inc/IntPoly_IndexedMapOfPnt2d.hxx
index 99b0d44..8922459 100644
--- a/inc/IntPoly_IndexedMapOfPnt2d.hxx
+++ b/inc/IntPoly_IndexedMapOfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IntPoly_IndexedMapNodeOfIndexedMapOfPnt2d;
 class IntPoly_IndexedMapOfPnt2d  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPoly_IndexedMapOfPnt2d(const Standard_Integer NbBuckets = 1);
diff --git a/inc/IntPoly_PlaneSection.hxx b/inc/IntPoly_PlaneSection.hxx
index 8acffae..800c479 100644
--- a/inc/IntPoly_PlaneSection.hxx
+++ b/inc/IntPoly_PlaneSection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TopoDS_Edge;
 class IntPoly_PlaneSection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPoly_PlaneSection();
diff --git a/inc/IntPoly_Pnt2dHasher.hxx b/inc/IntPoly_Pnt2dHasher.hxx
index 6e898c0..5b4c4ae 100644
--- a/inc/IntPoly_Pnt2dHasher.hxx
+++ b/inc/IntPoly_Pnt2dHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class gp_Pnt2d;
 class IntPoly_Pnt2dHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HasCode value  for  the  Key <K>  in the <br>
 //!          range 0..Upper. <br>
diff --git a/inc/IntPoly_PntHasher.hxx b/inc/IntPoly_PntHasher.hxx
index bba66bb..630175f 100644
--- a/inc/IntPoly_PntHasher.hxx
+++ b/inc/IntPoly_PntHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class gp_Pnt;
 class IntPoly_PntHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HasCode value  for  the  Key <K>  in the <br>
 //!          range 0..Upper. <br>
diff --git a/inc/IntPoly_SequenceOfSequenceOfPnt.hxx b/inc/IntPoly_SequenceOfSequenceOfPnt.hxx
index fe04ea5..2cbb576 100644
--- a/inc/IntPoly_SequenceOfSequenceOfPnt.hxx
+++ b/inc/IntPoly_SequenceOfSequenceOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntPoly_SequenceNodeOfSequenceOfSequenceOfPnt;
 class IntPoly_SequenceOfSequenceOfPnt  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntPoly_SequenceOfSequenceOfPnt();
diff --git a/inc/IntPoly_SequenceOfSequenceOfPnt2d.hxx b/inc/IntPoly_SequenceOfSequenceOfPnt2d.hxx
index b2123a1..76eaedf 100644
--- a/inc/IntPoly_SequenceOfSequenceOfPnt2d.hxx
+++ b/inc/IntPoly_SequenceOfSequenceOfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntPoly_SequenceNodeOfSequenceOfSequenceOfPnt2d;
 class IntPoly_SequenceOfSequenceOfPnt2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntPoly_SequenceOfSequenceOfPnt2d();
diff --git a/inc/IntPoly_ShapeSection.hxx b/inc/IntPoly_ShapeSection.hxx
index 7d78338..e534399 100644
--- a/inc/IntPoly_ShapeSection.hxx
+++ b/inc/IntPoly_ShapeSection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TopoDS_Edge;
 class IntPoly_ShapeSection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPoly_ShapeSection();
diff --git a/inc/IntPolyh_ArrayOfCouples.hxx b/inc/IntPolyh_ArrayOfCouples.hxx
index 789567e..a0b6e8f 100644
--- a/inc/IntPolyh_ArrayOfCouples.hxx
+++ b/inc/IntPolyh_ArrayOfCouples.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntPolyh_Couple;
 class IntPolyh_ArrayOfCouples  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_ArrayOfCouples();
diff --git a/inc/IntPolyh_ArrayOfEdges.hxx b/inc/IntPolyh_ArrayOfEdges.hxx
index 1d0a499..38d1c86 100644
--- a/inc/IntPolyh_ArrayOfEdges.hxx
+++ b/inc/IntPolyh_ArrayOfEdges.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntPolyh_Edge;
 class IntPolyh_ArrayOfEdges  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_ArrayOfEdges();
diff --git a/inc/IntPolyh_ArrayOfPoints.hxx b/inc/IntPolyh_ArrayOfPoints.hxx
index 62031d4..9049e2d 100644
--- a/inc/IntPolyh_ArrayOfPoints.hxx
+++ b/inc/IntPolyh_ArrayOfPoints.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntPolyh_Point;
 class IntPolyh_ArrayOfPoints  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_ArrayOfPoints();
diff --git a/inc/IntPolyh_ArrayOfSectionLines.hxx b/inc/IntPolyh_ArrayOfSectionLines.hxx
index 32f834c..55d9bfb 100644
--- a/inc/IntPolyh_ArrayOfSectionLines.hxx
+++ b/inc/IntPolyh_ArrayOfSectionLines.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntPolyh_SectionLine;
 class IntPolyh_ArrayOfSectionLines  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_ArrayOfSectionLines();
diff --git a/inc/IntPolyh_ArrayOfStartPoints.hxx b/inc/IntPolyh_ArrayOfStartPoints.hxx
index b871c85..ade15b3 100644
--- a/inc/IntPolyh_ArrayOfStartPoints.hxx
+++ b/inc/IntPolyh_ArrayOfStartPoints.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntPolyh_StartPoint;
 class IntPolyh_ArrayOfStartPoints  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_ArrayOfStartPoints();
diff --git a/inc/IntPolyh_ArrayOfTangentZones.hxx b/inc/IntPolyh_ArrayOfTangentZones.hxx
index d702463..d460d61 100644
--- a/inc/IntPolyh_ArrayOfTangentZones.hxx
+++ b/inc/IntPolyh_ArrayOfTangentZones.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntPolyh_StartPoint;
 class IntPolyh_ArrayOfTangentZones  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_ArrayOfTangentZones();
diff --git a/inc/IntPolyh_ArrayOfTriangles.hxx b/inc/IntPolyh_ArrayOfTriangles.hxx
index 332c841..c2c2ac5 100644
--- a/inc/IntPolyh_ArrayOfTriangles.hxx
+++ b/inc/IntPolyh_ArrayOfTriangles.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntPolyh_Triangle;
 class IntPolyh_ArrayOfTriangles  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_ArrayOfTriangles();
diff --git a/inc/IntPolyh_Couple.hxx b/inc/IntPolyh_Couple.hxx
index 73e837e..79b08fb 100644
--- a/inc/IntPolyh_Couple.hxx
+++ b/inc/IntPolyh_Couple.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class IntPolyh_Couple  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_Couple();
diff --git a/inc/IntPolyh_Edge.hxx b/inc/IntPolyh_Edge.hxx
index eafa36f..bf44bb0 100644
--- a/inc/IntPolyh_Edge.hxx
+++ b/inc/IntPolyh_Edge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@
 class IntPolyh_Edge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_Edge();
diff --git a/inc/IntPolyh_Intersection.hxx b/inc/IntPolyh_Intersection.hxx
index 9c5afe2..5dfded6 100644
--- a/inc/IntPolyh_Intersection.hxx
+++ b/inc/IntPolyh_Intersection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class IntPolyh_ArrayOfCouples;
 class IntPolyh_Intersection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructor <br>
 //! <br>
diff --git a/inc/IntPolyh_MaillageAffinage.hxx b/inc/IntPolyh_MaillageAffinage.hxx
index e206a75..9eb7ee9 100644
--- a/inc/IntPolyh_MaillageAffinage.hxx
+++ b/inc/IntPolyh_MaillageAffinage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class IntPolyh_ArrayOfCouples;
 class IntPolyh_MaillageAffinage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_MaillageAffinage(const Handle(Adaptor3d_HSurface)& S1,const Standard_Integer NbSU1,const Standard_Integer NbSV1,const Handle(Adaptor3d_HSurface)& S2,const Standard_Integer NbSU2,const Standard_Integer NbSV2,const Standard_Integer PRINT);
diff --git a/inc/IntPolyh_Point.hxx b/inc/IntPolyh_Point.hxx
index f081e83..f965d93 100644
--- a/inc/IntPolyh_Point.hxx
+++ b/inc/IntPolyh_Point.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Adaptor3d_HSurface;
 class IntPolyh_Point  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_Point();
diff --git a/inc/IntPolyh_SectionLine.hxx b/inc/IntPolyh_SectionLine.hxx
index f334076..84023ea 100644
--- a/inc/IntPolyh_SectionLine.hxx
+++ b/inc/IntPolyh_SectionLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntPolyh_StartPoint;
 class IntPolyh_SectionLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_SectionLine();
diff --git a/inc/IntPolyh_SeqOfStartPoints.hxx b/inc/IntPolyh_SeqOfStartPoints.hxx
index c22d981..d5e200d 100644
--- a/inc/IntPolyh_SeqOfStartPoints.hxx
+++ b/inc/IntPolyh_SeqOfStartPoints.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntPolyh_SequenceNodeOfSeqOfStartPoints;
 class IntPolyh_SeqOfStartPoints  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntPolyh_SeqOfStartPoints();
diff --git a/inc/IntPolyh_StartPoint.hxx b/inc/IntPolyh_StartPoint.hxx
index 6cba5af..ec281fa 100644
--- a/inc/IntPolyh_StartPoint.hxx
+++ b/inc/IntPolyh_StartPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntPolyh_Triangle;
 class IntPolyh_StartPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_StartPoint();
diff --git a/inc/IntPolyh_Triangle.hxx b/inc/IntPolyh_Triangle.hxx
index a54a805..e410dae 100644
--- a/inc/IntPolyh_Triangle.hxx
+++ b/inc/IntPolyh_Triangle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IntPolyh_ArrayOfCouples;
 class IntPolyh_Triangle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntPolyh_Triangle();
diff --git a/inc/IntRes2d_Domain.hxx b/inc/IntRes2d_Domain.hxx
index bfd2c1a..207da28 100644
--- a/inc/IntRes2d_Domain.hxx
+++ b/inc/IntRes2d_Domain.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class gp_Pnt2d;
 class IntRes2d_Domain  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an infinite Domain (HasFirstPoint = False <br>
 //!          and HasLastPoint = False). <br>
diff --git a/inc/IntRes2d_Intersection.hxx b/inc/IntRes2d_Intersection.hxx
index b3b8ed2..665ea1f 100644
--- a/inc/IntRes2d_Intersection.hxx
+++ b/inc/IntRes2d_Intersection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class IntRes2d_IntersectionSegment;
 class IntRes2d_Intersection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns TRUE when the computation was successful. <br>
         Standard_Boolean IsDone() const;
diff --git a/inc/IntRes2d_IntersectionPoint.hxx b/inc/IntRes2d_IntersectionPoint.hxx
index 970bd57..5d2835b 100644
--- a/inc/IntRes2d_IntersectionPoint.hxx
+++ b/inc/IntRes2d_IntersectionPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(IntRes2d_Intersection
 class IntRes2d_IntersectionPoint  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   IntRes2d_IntersectionPoint();
diff --git a/inc/IntRes2d_IntersectionSegment.hxx b/inc/IntRes2d_IntersectionSegment.hxx
index 58b2ea1..d651916 100644
--- a/inc/IntRes2d_IntersectionSegment.hxx
+++ b/inc/IntRes2d_IntersectionSegment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(IntRes2d_Intersection
 class IntRes2d_IntersectionSegment  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   IntRes2d_IntersectionSegment();
diff --git a/inc/IntRes2d_SequenceOfIntersectionPoint.hxx b/inc/IntRes2d_SequenceOfIntersectionPoint.hxx
index 8e6acb0..036ce5d 100644
--- a/inc/IntRes2d_SequenceOfIntersectionPoint.hxx
+++ b/inc/IntRes2d_SequenceOfIntersectionPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntRes2d_SequenceNodeOfSequenceOfIntersectionPoint;
 class IntRes2d_SequenceOfIntersectionPoint  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntRes2d_SequenceOfIntersectionPoint();
diff --git a/inc/IntRes2d_SequenceOfIntersectionSegment.hxx b/inc/IntRes2d_SequenceOfIntersectionSegment.hxx
index c7776f5..de47a0f 100644
--- a/inc/IntRes2d_SequenceOfIntersectionSegment.hxx
+++ b/inc/IntRes2d_SequenceOfIntersectionSegment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntRes2d_SequenceNodeOfSequenceOfIntersectionSegment;
 class IntRes2d_SequenceOfIntersectionSegment  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntRes2d_SequenceOfIntersectionSegment();
diff --git a/inc/IntRes2d_Transition.hxx b/inc/IntRes2d_Transition.hxx
index 4d04995..824ca3a 100644
--- a/inc/IntRes2d_Transition.hxx
+++ b/inc/IntRes2d_Transition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(IntRes2d_Transition);
 class IntRes2d_Transition  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   IntRes2d_Transition();
diff --git a/inc/IntSurf.hxx b/inc/IntSurf.hxx
index f3c5189..4f25073 100644
--- a/inc/IntSurf.hxx
+++ b/inc/IntSurf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class IntSurf_ListIteratorOfListOfPntOn2S;
 class IntSurf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the transition of the intersection point <br>
 //!          between the two lines. <br>
diff --git a/inc/IntSurf_Couple.hxx b/inc/IntSurf_Couple.hxx
index f0c1f6a..1f60ad4 100644
--- a/inc/IntSurf_Couple.hxx
+++ b/inc/IntSurf_Couple.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@
 class IntSurf_Couple  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntSurf_Couple();
diff --git a/inc/IntSurf_InteriorPoint.hxx b/inc/IntSurf_InteriorPoint.hxx
index fc9803f..cd57046 100644
--- a/inc/IntSurf_InteriorPoint.hxx
+++ b/inc/IntSurf_InteriorPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Vec2d;
 class IntSurf_InteriorPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntSurf_InteriorPoint();
diff --git a/inc/IntSurf_InteriorPointTool.hxx b/inc/IntSurf_InteriorPointTool.hxx
index a3e3764..2aa4312 100644
--- a/inc/IntSurf_InteriorPointTool.hxx
+++ b/inc/IntSurf_InteriorPointTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class IntSurf_InteriorPoint;
 class IntSurf_InteriorPointTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the 3d coordinates of the starting point. <br>
       static  gp_Pnt Value3d(const IntSurf_InteriorPoint& PStart) ;
diff --git a/inc/IntSurf_ListIteratorOfListOfPntOn2S.hxx b/inc/IntSurf_ListIteratorOfListOfPntOn2S.hxx
index 8400a1a..0aa5f51 100644
--- a/inc/IntSurf_ListIteratorOfListOfPntOn2S.hxx
+++ b/inc/IntSurf_ListIteratorOfListOfPntOn2S.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class IntSurf_ListNodeOfListOfPntOn2S;
 class IntSurf_ListIteratorOfListOfPntOn2S  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntSurf_ListIteratorOfListOfPntOn2S();
diff --git a/inc/IntSurf_ListOfPntOn2S.hxx b/inc/IntSurf_ListOfPntOn2S.hxx
index cd395fd..6f7d95c 100644
--- a/inc/IntSurf_ListOfPntOn2S.hxx
+++ b/inc/IntSurf_ListOfPntOn2S.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IntSurf_ListNodeOfListOfPntOn2S;
 class IntSurf_ListOfPntOn2S  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntSurf_ListOfPntOn2S();
diff --git a/inc/IntSurf_PathPoint.hxx b/inc/IntSurf_PathPoint.hxx
index bc500f0..4f49530 100644
--- a/inc/IntSurf_PathPoint.hxx
+++ b/inc/IntSurf_PathPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class gp_Dir2d;
 class IntSurf_PathPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntSurf_PathPoint();
diff --git a/inc/IntSurf_PathPointTool.hxx b/inc/IntSurf_PathPointTool.hxx
index c445a63..711f0c5 100644
--- a/inc/IntSurf_PathPointTool.hxx
+++ b/inc/IntSurf_PathPointTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class IntSurf_PathPoint;
 class IntSurf_PathPointTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the 3d coordinates of the starting point. <br>
       static  gp_Pnt Value3d(const IntSurf_PathPoint& PStart) ;
diff --git a/inc/IntSurf_PntOn2S.hxx b/inc/IntSurf_PntOn2S.hxx
index 3c9541d..40e8489 100644
--- a/inc/IntSurf_PntOn2S.hxx
+++ b/inc/IntSurf_PntOn2S.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Pnt;
 class IntSurf_PntOn2S  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   IntSurf_PntOn2S();
diff --git a/inc/IntSurf_Quadric.hxx b/inc/IntSurf_Quadric.hxx
index 4d32a53..4a13fbe 100644
--- a/inc/IntSurf_Quadric.hxx
+++ b/inc/IntSurf_Quadric.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class gp_Vec;
 class IntSurf_Quadric  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntSurf_Quadric();
diff --git a/inc/IntSurf_QuadricTool.hxx b/inc/IntSurf_QuadricTool.hxx
index 952b714..13fabb3 100644
--- a/inc/IntSurf_QuadricTool.hxx
+++ b/inc/IntSurf_QuadricTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class gp_Vec;
 class IntSurf_QuadricTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the value of the function. <br>
       static  Standard_Real Value(const IntSurf_Quadric& Quad,const Standard_Real X,const Standard_Real Y,const Standard_Real Z) ;
diff --git a/inc/IntSurf_SequenceOfCouple.hxx b/inc/IntSurf_SequenceOfCouple.hxx
index 1a48f2d..c66e806 100644
--- a/inc/IntSurf_SequenceOfCouple.hxx
+++ b/inc/IntSurf_SequenceOfCouple.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntSurf_SequenceNodeOfSequenceOfCouple;
 class IntSurf_SequenceOfCouple  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntSurf_SequenceOfCouple();
diff --git a/inc/IntSurf_SequenceOfInteriorPoint.hxx b/inc/IntSurf_SequenceOfInteriorPoint.hxx
index 320c12b..b534a00 100644
--- a/inc/IntSurf_SequenceOfInteriorPoint.hxx
+++ b/inc/IntSurf_SequenceOfInteriorPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntSurf_SequenceNodeOfSequenceOfInteriorPoint;
 class IntSurf_SequenceOfInteriorPoint  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntSurf_SequenceOfInteriorPoint();
diff --git a/inc/IntSurf_SequenceOfPathPoint.hxx b/inc/IntSurf_SequenceOfPathPoint.hxx
index a0011e7..d066457 100644
--- a/inc/IntSurf_SequenceOfPathPoint.hxx
+++ b/inc/IntSurf_SequenceOfPathPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntSurf_SequenceNodeOfSequenceOfPathPoint;
 class IntSurf_SequenceOfPathPoint  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntSurf_SequenceOfPathPoint();
diff --git a/inc/IntSurf_SequenceOfPntOn2S.hxx b/inc/IntSurf_SequenceOfPntOn2S.hxx
index b7f6f72..ba629cc 100644
--- a/inc/IntSurf_SequenceOfPntOn2S.hxx
+++ b/inc/IntSurf_SequenceOfPntOn2S.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntSurf_SequenceNodeOfSequenceOfPntOn2S;
 class IntSurf_SequenceOfPntOn2S  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntSurf_SequenceOfPntOn2S();
diff --git a/inc/IntSurf_Transition.hxx b/inc/IntSurf_Transition.hxx
index 56359e2..eae79f3 100644
--- a/inc/IntSurf_Transition.hxx
+++ b/inc/IntSurf_Transition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Standard_DomainError;
 class IntSurf_Transition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. Creates an UNDECIDED transition. <br>
   Standard_EXPORT   IntSurf_Transition();
diff --git a/inc/IntTools.hxx b/inc/IntTools.hxx
index 5de9399..c0eccab 100644
--- a/inc/IntTools.hxx
+++ b/inc/IntTools.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -102,18 +105,7 @@ class IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox;
 class IntTools  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  returns the length of the edge; <br>
   Standard_EXPORT   static  Standard_Real Length(const TopoDS_Edge& E) ;
diff --git a/inc/IntTools_Array1OfRange.hxx b/inc/IntTools_Array1OfRange.hxx
index aa34f1c..3d3f3e7 100644
--- a/inc/IntTools_Array1OfRange.hxx
+++ b/inc/IntTools_Array1OfRange.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class IntTools_Range;
 class IntTools_Array1OfRange  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_Array1OfRange(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IntTools_Array1OfRoots.hxx b/inc/IntTools_Array1OfRoots.hxx
index 4bc2810..eb4fe22 100644
--- a/inc/IntTools_Array1OfRoots.hxx
+++ b/inc/IntTools_Array1OfRoots.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class IntTools_Root;
 class IntTools_Array1OfRoots  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_Array1OfRoots(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/IntTools_BaseRangeSample.hxx b/inc/IntTools_BaseRangeSample.hxx
index 4fcd638..5caf41a 100644
--- a/inc/IntTools_BaseRangeSample.hxx
+++ b/inc/IntTools_BaseRangeSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@
 class IntTools_BaseRangeSample  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_BaseRangeSample();
diff --git a/inc/IntTools_BeanBeanIntersector.hxx b/inc/IntTools_BeanBeanIntersector.hxx
index ae8eac9..e2e0979 100644
--- a/inc/IntTools_BeanBeanIntersector.hxx
+++ b/inc/IntTools_BeanBeanIntersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class IntTools_Range;
 class IntTools_BeanBeanIntersector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_BeanBeanIntersector();
diff --git a/inc/IntTools_BeanFaceIntersector.hxx b/inc/IntTools_BeanFaceIntersector.hxx
index 7f04f1d..c718fb3 100644
--- a/inc/IntTools_BeanFaceIntersector.hxx
+++ b/inc/IntTools_BeanFaceIntersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -72,18 +75,7 @@ class IntTools_ListOfSurfaceRangeSample;
 class IntTools_BeanFaceIntersector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_BeanFaceIntersector();
diff --git a/inc/IntTools_CArray1OfInteger.hxx b/inc/IntTools_CArray1OfInteger.hxx
index e8d1eac..db066c8 100644
--- a/inc/IntTools_CArray1OfInteger.hxx
+++ b/inc/IntTools_CArray1OfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Standard_OutOfMemory;
 class IntTools_CArray1OfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_CArray1OfInteger(const Standard_Integer Length = 0);
diff --git a/inc/IntTools_CArray1OfReal.hxx b/inc/IntTools_CArray1OfReal.hxx
index 92b3660..9da5e1c 100644
--- a/inc/IntTools_CArray1OfReal.hxx
+++ b/inc/IntTools_CArray1OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Standard_OutOfMemory;
 class IntTools_CArray1OfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_CArray1OfReal(const Standard_Integer Length = 0);
diff --git a/inc/IntTools_CommonPrt.hxx b/inc/IntTools_CommonPrt.hxx
index 9080e02..0df9b86 100644
--- a/inc/IntTools_CommonPrt.hxx
+++ b/inc/IntTools_CommonPrt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class gp_Pnt;
 class IntTools_CommonPrt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_Compare.hxx b/inc/IntTools_Compare.hxx
index 147e032..d4fc054 100644
--- a/inc/IntTools_Compare.hxx
+++ b/inc/IntTools_Compare.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntTools_Root;
 class IntTools_Compare  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_CompareRange.hxx b/inc/IntTools_CompareRange.hxx
index e9a11a4..96f9aa6 100644
--- a/inc/IntTools_CompareRange.hxx
+++ b/inc/IntTools_CompareRange.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class IntTools_Range;
 class IntTools_CompareRange  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_Context.hxx b/inc/IntTools_Context.hxx
index fb0cbf2..fef4548 100644
--- a/inc/IntTools_Context.hxx
+++ b/inc/IntTools_Context.hxx
@@ -49,6 +49,7 @@ class Geom_Curve;
 class IntTools_SurfaceRangeLocalizeData;
 class BRepClass3d_SolidClassifier;
 class TopoDS_Solid;
+class Geom2dHatch_Hatcher;
 class TopoDS_Vertex;
 class gp_Pnt2d;
 class gp_Pnt;
@@ -96,6 +97,11 @@ Standard_EXPORT virtual ~IntTools_Context();
 //! for given solid <br>
   Standard_EXPORT     BRepClass3d_SolidClassifier& SolidClassifier(const TopoDS_Solid& aSolid) ;
   
+//! Returns a reference to 2D hatcher <br>
+//! for given face <br>
+//! <br>
+  Standard_EXPORT     Geom2dHatch_Hatcher& Hatcher(const TopoDS_Face& aF) ;
+  
 //! Computes parameter of the vertex aV on <br>
 //! the edge aE. <br>
 //! Returns zero if the distance between vertex <br>
@@ -200,17 +206,18 @@ Standard_EXPORT virtual ~IntTools_Context();
 protected:
 
 
-
-
-private: 
-
-
 TopTools_IndexedDataMapOfShapeAddress myFClass2dMap;
 TopTools_IndexedDataMapOfShapeAddress myProjPSMap;
 TopTools_IndexedDataMapOfShapeAddress myProjPCMap;
 IntTools_IndexedDataMapOfTransientAddress myProjPTMap;
 TopTools_IndexedDataMapOfShapeAddress mySClassMap;
 TopTools_IndexedDataMapOfShapeAddress myProjSDataMap;
+TopTools_IndexedDataMapOfShapeAddress myHatcherMap;
+
+
+private: 
+
+
 
 
 };
diff --git a/inc/IntTools_Curve.hxx b/inc/IntTools_Curve.hxx
index 2fd1271..c0bed14 100644
--- a/inc/IntTools_Curve.hxx
+++ b/inc/IntTools_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class gp_Pnt;
 class IntTools_Curve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_CurveRangeLocalizeData.hxx b/inc/IntTools_CurveRangeLocalizeData.hxx
index 63ad728..ccc053c 100644
--- a/inc/IntTools_CurveRangeLocalizeData.hxx
+++ b/inc/IntTools_CurveRangeLocalizeData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class IntTools_ListOfCurveRangeSample;
 class IntTools_CurveRangeLocalizeData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_CurveRangeLocalizeData(const Standard_Integer theNbSample,const Standard_Real theMinRange);
diff --git a/inc/IntTools_CurveRangeSample.hxx b/inc/IntTools_CurveRangeSample.hxx
index 489b6f1..506956b 100644
--- a/inc/IntTools_CurveRangeSample.hxx
+++ b/inc/IntTools_CurveRangeSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntTools_Range;
 class IntTools_CurveRangeSample  : public IntTools_BaseRangeSample {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_CurveRangeSample();
diff --git a/inc/IntTools_CurveRangeSampleMapHasher.hxx b/inc/IntTools_CurveRangeSampleMapHasher.hxx
index eac503b..04811e3 100644
--- a/inc/IntTools_CurveRangeSampleMapHasher.hxx
+++ b/inc/IntTools_CurveRangeSampleMapHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntTools_CurveRangeSample;
 class IntTools_CurveRangeSampleMapHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HasCode value  for  the  Key <K>  in the <br>
 //!          range 0..Upper. <br>
diff --git a/inc/IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx b/inc/IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx
index 3936d45..a57a530 100644
--- a/inc/IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx
+++ b/inc/IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class IntTools_DataMapNodeOfDataMapOfCurveSampleBox;
 class IntTools_DataMapIteratorOfDataMapOfCurveSampleBox  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_DataMapIteratorOfDataMapOfCurveSampleBox();
diff --git a/inc/IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox.hxx b/inc/IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox.hxx
index bc3a5cf..76fa5ca 100644
--- a/inc/IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox.hxx
+++ b/inc/IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class IntTools_DataMapNodeOfDataMapOfSurfaceSampleBox;
 class IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox();
diff --git a/inc/IntTools_DataMapOfCurveSampleBox.hxx b/inc/IntTools_DataMapOfCurveSampleBox.hxx
index f33ebbb..2954948 100644
--- a/inc/IntTools_DataMapOfCurveSampleBox.hxx
+++ b/inc/IntTools_DataMapOfCurveSampleBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class IntTools_DataMapIteratorOfDataMapOfCurveSampleBox;
 class IntTools_DataMapOfCurveSampleBox  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_DataMapOfCurveSampleBox(const Standard_Integer NbBuckets = 1);
diff --git a/inc/IntTools_DataMapOfSurfaceSampleBox.hxx b/inc/IntTools_DataMapOfSurfaceSampleBox.hxx
index 768f2a7..426c7a4 100644
--- a/inc/IntTools_DataMapOfSurfaceSampleBox.hxx
+++ b/inc/IntTools_DataMapOfSurfaceSampleBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox;
 class IntTools_DataMapOfSurfaceSampleBox  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_DataMapOfSurfaceSampleBox(const Standard_Integer NbBuckets = 1);
diff --git a/inc/IntTools_EdgeEdge.hxx b/inc/IntTools_EdgeEdge.hxx
index 47b50d2..f2cebd2 100644
--- a/inc/IntTools_EdgeEdge.hxx
+++ b/inc/IntTools_EdgeEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class IntTools_CArray1OfReal;
 class IntTools_EdgeEdge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_EdgeFace.hxx b/inc/IntTools_EdgeFace.hxx
index 7455125..28bc95d 100644
--- a/inc/IntTools_EdgeFace.hxx
+++ b/inc/IntTools_EdgeFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class IntTools_CommonPrt;
 class IntTools_EdgeFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty Constructor <br>
diff --git a/inc/IntTools_FClass2d.hxx b/inc/IntTools_FClass2d.hxx
index a461b30..2939a9b 100644
--- a/inc/IntTools_FClass2d.hxx
+++ b/inc/IntTools_FClass2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class gp_Pnt2d;
 class IntTools_FClass2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_FaceFace.hxx b/inc/IntTools_FaceFace.hxx
index 24689c5..6d9d6f6 100644
--- a/inc/IntTools_FaceFace.hxx
+++ b/inc/IntTools_FaceFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class Adaptor3d_TopolTool;
 class IntTools_FaceFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor. <br>
diff --git a/inc/IntTools_IndexedDataMapOfTransientAddress.hxx b/inc/IntTools_IndexedDataMapOfTransientAddress.hxx
index 33c2f7d..aa1426c 100644
--- a/inc/IntTools_IndexedDataMapOfTransientAddress.hxx
+++ b/inc/IntTools_IndexedDataMapOfTransientAddress.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class IntTools_IndexedDataMapNodeOfIndexedDataMapOfTransientAddress;
 class IntTools_IndexedDataMapOfTransientAddress  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_IndexedDataMapOfTransientAddress(const Standard_Integer NbBuckets = 1);
diff --git a/inc/IntTools_LineConstructor.hxx b/inc/IntTools_LineConstructor.hxx
index 0712392..822d293 100644
--- a/inc/IntTools_LineConstructor.hxx
+++ b/inc/IntTools_LineConstructor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class IntPatch_Line;
 class IntTools_LineConstructor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_ListIteratorOfListOfBox.hxx b/inc/IntTools_ListIteratorOfListOfBox.hxx
index be63013..7ecd971 100644
--- a/inc/IntTools_ListIteratorOfListOfBox.hxx
+++ b/inc/IntTools_ListIteratorOfListOfBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class IntTools_ListNodeOfListOfBox;
 class IntTools_ListIteratorOfListOfBox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_ListIteratorOfListOfBox();
diff --git a/inc/IntTools_ListIteratorOfListOfCurveRangeSample.hxx b/inc/IntTools_ListIteratorOfListOfCurveRangeSample.hxx
index a9054d0..b301cca 100644
--- a/inc/IntTools_ListIteratorOfListOfCurveRangeSample.hxx
+++ b/inc/IntTools_ListIteratorOfListOfCurveRangeSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class IntTools_ListNodeOfListOfCurveRangeSample;
 class IntTools_ListIteratorOfListOfCurveRangeSample  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_ListIteratorOfListOfCurveRangeSample();
diff --git a/inc/IntTools_ListIteratorOfListOfSurfaceRangeSample.hxx b/inc/IntTools_ListIteratorOfListOfSurfaceRangeSample.hxx
index a1d4314..ec61e2b 100644
--- a/inc/IntTools_ListIteratorOfListOfSurfaceRangeSample.hxx
+++ b/inc/IntTools_ListIteratorOfListOfSurfaceRangeSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class IntTools_ListNodeOfListOfSurfaceRangeSample;
 class IntTools_ListIteratorOfListOfSurfaceRangeSample  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_ListIteratorOfListOfSurfaceRangeSample();
diff --git a/inc/IntTools_ListOfBox.hxx b/inc/IntTools_ListOfBox.hxx
index 3ff03f1..9261f53 100644
--- a/inc/IntTools_ListOfBox.hxx
+++ b/inc/IntTools_ListOfBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IntTools_ListNodeOfListOfBox;
 class IntTools_ListOfBox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_ListOfBox();
diff --git a/inc/IntTools_ListOfCurveRangeSample.hxx b/inc/IntTools_ListOfCurveRangeSample.hxx
index b3a60e6..756741a 100644
--- a/inc/IntTools_ListOfCurveRangeSample.hxx
+++ b/inc/IntTools_ListOfCurveRangeSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IntTools_ListNodeOfListOfCurveRangeSample;
 class IntTools_ListOfCurveRangeSample  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_ListOfCurveRangeSample();
diff --git a/inc/IntTools_ListOfSurfaceRangeSample.hxx b/inc/IntTools_ListOfSurfaceRangeSample.hxx
index 3103c03..716682c 100644
--- a/inc/IntTools_ListOfSurfaceRangeSample.hxx
+++ b/inc/IntTools_ListOfSurfaceRangeSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class IntTools_ListNodeOfListOfSurfaceRangeSample;
 class IntTools_ListOfSurfaceRangeSample  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_ListOfSurfaceRangeSample();
diff --git a/inc/IntTools_MapIteratorOfMapOfCurveSample.hxx b/inc/IntTools_MapIteratorOfMapOfCurveSample.hxx
index cae05a6..1bcc39e 100644
--- a/inc/IntTools_MapIteratorOfMapOfCurveSample.hxx
+++ b/inc/IntTools_MapIteratorOfMapOfCurveSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class IntTools_StdMapNodeOfMapOfCurveSample;
 class IntTools_MapIteratorOfMapOfCurveSample  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_MapIteratorOfMapOfCurveSample();
diff --git a/inc/IntTools_MapIteratorOfMapOfSurfaceSample.hxx b/inc/IntTools_MapIteratorOfMapOfSurfaceSample.hxx
index 066b229..2ee1fff 100644
--- a/inc/IntTools_MapIteratorOfMapOfSurfaceSample.hxx
+++ b/inc/IntTools_MapIteratorOfMapOfSurfaceSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class IntTools_StdMapNodeOfMapOfSurfaceSample;
 class IntTools_MapIteratorOfMapOfSurfaceSample  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_MapIteratorOfMapOfSurfaceSample();
diff --git a/inc/IntTools_MapOfCurveSample.hxx b/inc/IntTools_MapOfCurveSample.hxx
index b483661..4a653fd 100644
--- a/inc/IntTools_MapOfCurveSample.hxx
+++ b/inc/IntTools_MapOfCurveSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IntTools_MapIteratorOfMapOfCurveSample;
 class IntTools_MapOfCurveSample  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_MapOfCurveSample(const Standard_Integer NbBuckets = 1);
diff --git a/inc/IntTools_MapOfSurfaceSample.hxx b/inc/IntTools_MapOfSurfaceSample.hxx
index 2f95a01..cb40595 100644
--- a/inc/IntTools_MapOfSurfaceSample.hxx
+++ b/inc/IntTools_MapOfSurfaceSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class IntTools_MapIteratorOfMapOfSurfaceSample;
 class IntTools_MapOfSurfaceSample  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_MapOfSurfaceSample(const Standard_Integer NbBuckets = 1);
diff --git a/inc/IntTools_MarkedRangeSet.hxx b/inc/IntTools_MarkedRangeSet.hxx
index 25858f5..215a572 100644
--- a/inc/IntTools_MarkedRangeSet.hxx
+++ b/inc/IntTools_MarkedRangeSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TColStd_SequenceOfInteger;
 class IntTools_MarkedRangeSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_PntOn2Faces.hxx b/inc/IntTools_PntOn2Faces.hxx
index b119390..db731a1 100644
--- a/inc/IntTools_PntOn2Faces.hxx
+++ b/inc/IntTools_PntOn2Faces.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntTools_PntOnFace;
 class IntTools_PntOn2Faces  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_PntOnFace.hxx b/inc/IntTools_PntOnFace.hxx
index 1a988f5..b742266 100644
--- a/inc/IntTools_PntOnFace.hxx
+++ b/inc/IntTools_PntOnFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Pnt;
 class IntTools_PntOnFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_QuickSort.hxx b/inc/IntTools_QuickSort.hxx
index 4f52468..10a7751 100644
--- a/inc/IntTools_QuickSort.hxx
+++ b/inc/IntTools_QuickSort.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@ class IntTools_Compare;
 class IntTools_QuickSort  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(IntTools_Array1OfRoots& TheArray,const IntTools_Compare& Comp) ;
diff --git a/inc/IntTools_QuickSortRange.hxx b/inc/IntTools_QuickSortRange.hxx
index 1761d7a..7c6cc57 100644
--- a/inc/IntTools_QuickSortRange.hxx
+++ b/inc/IntTools_QuickSortRange.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@ class IntTools_CompareRange;
 class IntTools_QuickSortRange  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(IntTools_Array1OfRange& TheArray,const IntTools_CompareRange& Comp) ;
diff --git a/inc/IntTools_Range.hxx b/inc/IntTools_Range.hxx
index 27cbdbf..5eca75b 100644
--- a/inc/IntTools_Range.hxx
+++ b/inc/IntTools_Range.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@
 class IntTools_Range  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_Root.hxx b/inc/IntTools_Root.hxx
index ff43d3e..0601b86 100644
--- a/inc/IntTools_Root.hxx
+++ b/inc/IntTools_Root.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@
 class IntTools_Root  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_SequenceOfCommonPrts.hxx b/inc/IntTools_SequenceOfCommonPrts.hxx
index 760afa5..a66c5a7 100644
--- a/inc/IntTools_SequenceOfCommonPrts.hxx
+++ b/inc/IntTools_SequenceOfCommonPrts.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntTools_SequenceNodeOfSequenceOfCommonPrts;
 class IntTools_SequenceOfCommonPrts  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntTools_SequenceOfCommonPrts();
diff --git a/inc/IntTools_SequenceOfCurves.hxx b/inc/IntTools_SequenceOfCurves.hxx
index 64fae3e..565a197 100644
--- a/inc/IntTools_SequenceOfCurves.hxx
+++ b/inc/IntTools_SequenceOfCurves.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntTools_SequenceNodeOfSequenceOfCurves;
 class IntTools_SequenceOfCurves  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntTools_SequenceOfCurves();
diff --git a/inc/IntTools_SequenceOfPntOn2Faces.hxx b/inc/IntTools_SequenceOfPntOn2Faces.hxx
index c4b389c..fe3dd30 100644
--- a/inc/IntTools_SequenceOfPntOn2Faces.hxx
+++ b/inc/IntTools_SequenceOfPntOn2Faces.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntTools_SequenceNodeOfSequenceOfPntOn2Faces;
 class IntTools_SequenceOfPntOn2Faces  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntTools_SequenceOfPntOn2Faces();
diff --git a/inc/IntTools_SequenceOfRanges.hxx b/inc/IntTools_SequenceOfRanges.hxx
index f6dee20..9f69dc2 100644
--- a/inc/IntTools_SequenceOfRanges.hxx
+++ b/inc/IntTools_SequenceOfRanges.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntTools_SequenceNodeOfSequenceOfRanges;
 class IntTools_SequenceOfRanges  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntTools_SequenceOfRanges();
diff --git a/inc/IntTools_SequenceOfRoots.hxx b/inc/IntTools_SequenceOfRoots.hxx
index c361575..ee753fe 100644
--- a/inc/IntTools_SequenceOfRoots.hxx
+++ b/inc/IntTools_SequenceOfRoots.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class IntTools_SequenceNodeOfSequenceOfRoots;
 class IntTools_SequenceOfRoots  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       IntTools_SequenceOfRoots();
diff --git a/inc/IntTools_ShrunkRange.hxx b/inc/IntTools_ShrunkRange.hxx
index b227fed..f08cdfc 100644
--- a/inc/IntTools_ShrunkRange.hxx
+++ b/inc/IntTools_ShrunkRange.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class Bnd_Box;
 class IntTools_ShrunkRange  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Empty constructor <br>
diff --git a/inc/IntTools_SurfaceRangeLocalizeData.hxx b/inc/IntTools_SurfaceRangeLocalizeData.hxx
index cbf2c41..a1fb7cd 100644
--- a/inc/IntTools_SurfaceRangeLocalizeData.hxx
+++ b/inc/IntTools_SurfaceRangeLocalizeData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class gp_Pnt;
 class IntTools_SurfaceRangeLocalizeData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_SurfaceRangeLocalizeData();
diff --git a/inc/IntTools_SurfaceRangeSample.hxx b/inc/IntTools_SurfaceRangeSample.hxx
index bc0cc79..89cda6f 100644
--- a/inc/IntTools_SurfaceRangeSample.hxx
+++ b/inc/IntTools_SurfaceRangeSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class IntTools_Range;
 class IntTools_SurfaceRangeSample  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   IntTools_SurfaceRangeSample();
diff --git a/inc/IntTools_SurfaceRangeSampleMapHasher.hxx b/inc/IntTools_SurfaceRangeSampleMapHasher.hxx
index 8c6f7df..48e4b84 100644
--- a/inc/IntTools_SurfaceRangeSampleMapHasher.hxx
+++ b/inc/IntTools_SurfaceRangeSampleMapHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class IntTools_SurfaceRangeSample;
 class IntTools_SurfaceRangeSampleMapHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HasCode value  for  the  Key <K>  in the <br>
 //!          range 0..Upper. <br>
diff --git a/inc/IntTools_Tools.hxx b/inc/IntTools_Tools.hxx
index 1c7d3ef..597c98d 100644
--- a/inc/IntTools_Tools.hxx
+++ b/inc/IntTools_Tools.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Geom_Curve;
 class IntTools_Tools  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Computes distance between vertex V1 and vertex V2, <br>
diff --git a/inc/IntWalk_IWalking_3.gxx b/inc/IntWalk_IWalking_3.gxx
index 855cca5..135ede5 100644
--- a/inc/IntWalk_IWalking_3.gxx
+++ b/inc/IntWalk_IWalking_3.gxx
@@ -45,47 +45,47 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
 				       TheIWFunction& Func,
 				       Standard_Boolean& Rajout) 
 
-// traitement ligne ouvert.
+// Processing of open line.
 //
-// 1) pour tout point de depart non passant et non tangent et non encore traite
-//    calcul du pas d'avancement = pas en fonction de la fleche et du pas max.
+// 1) for any starting point, which is not passing and not tangent and not yet processed,
+//    calculation of the step of advancement = step depending on the arrow and the maximum step.
 //
-// 2) calcul d'un point approche (ce point est sur la tangente a la section
-// de distance = pas du point interieur)
+// 2) calculate a point of approach (this point is on the tangent to the section
+// of distance = no point in the interior)
 //  
-// 3) tant que {
-//            (l'ensemble des points calcules ne depassent pas un point dans la
-//             liste des points de depart)
-//                              ou                    
-//            (l'ensemble des points ne forme pas une ligne ouverte allant 
-//            d 'une frontiere du domaine a un autre ou d un point de tangence
-//            a une frontiere ou de 2 points de tangence : cas singuliers)
+// 3) conditions  {
+//            (all calculated points do not exceed a point in the
+//             list of starting points)
+//                              or                    
+//            (all points do not form an open line going 
+//            from one border of the domain to the other or from a point tangent 
+//            to border or from 2 tangent points : single cases)
 //  
-//     1) cadrage du point approche sur les frontieres si necessaire (il
-//        y a calcul du pas)
-//     2) calcul du point
-//     3) si point non trouve on divise le pas
-//     4) tests d'arrets    
-//     5) calcul du pas en fonction de la fleche et du pas maxi,
+//     1) framing of approached point on borders if necessary (there is
+//        calculation of step)
+//     2) calculation of the point
+//     3) if the point is not found the step is divided
+//     4) stpo tests    
+//     5) calculation of the step depending on the arrow and the max step,
 //        (TestDeflection)
-//        arret possible.
-//    fin tant que.
+//        stop  possible.
+//    end of conditions.
 
 {
   Standard_Integer I, N;
   static math_Vector BornInf(1,2), BornSup(1,2), UVap(1,2);
   Standard_Real PasC, PasCu, PasCv;
-  Standard_Boolean Arrive; // indique si ligne terminee
-  Standard_Boolean Cadre;  //indique si on est sur frontiere du domaine
-  Standard_Boolean ArretAjout;  //indique si on est sur point ajoute
+  Standard_Boolean Arrive; // shows if the line ends
+  Standard_Boolean Cadre;  // shows if one is on border of the domain
+  Standard_Boolean ArretAjout;  //shows if one is on added point
   IntSurf_PntOn2S Psol;
-  Handle(IntWalk_TheIWLine)  CurrentLine;    // ligne en construction
+  Handle(IntWalk_TheIWLine)  CurrentLine;    // line under construction
   Standard_Boolean Tgtend;
 
   IntWalk_StatusDeflection Status, StatusPrecedent;
   
   Standard_Integer NbDivision; 
-  // nombre de fois que l on a divise le pas pour une section
+  // number of divisions of step for each section
 
   Standard_Integer StepSign;
   
@@ -107,7 +107,7 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
   // modified by NIZHNY-MKK  Fri Oct 27 12:32:38 2000.END
 
   for (I = 1; I <= nbPath; I++) {
-    //point de depart de cheminement
+    //start point of the progression
     //     if (etat1(I) > 11) {                
     // modified by NIZHNY-MKK  Fri Oct 27 12:33:37 2000.BEGIN
     if ((etat1(I) > 11) || ((etat1(I) < -11) && (movementdirectioninfo(I)!=0))) {
@@ -149,7 +149,7 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
       etat1(I) = - abs(etat1(I));
       movementdirectioninfo(I) = (movementdirectioninfo(I)==0) ? StepSign : 0;
 //  Modified by Sergey KHROMOV - Tue Nov 20 10:41:56 2001 End
-      // premier pas d avancement
+      // first step of advancement
       Standard_Real d2dx = Abs(previousd2d.X()); 
       Standard_Real d2dy = Abs(previousd2d.Y()); 
       if (d2dx < tolerance(1)) {
@@ -169,10 +169,10 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
       // modified by NIZHNY-MKK  Fri Oct 27 12:39:37 2000
       Standard_Integer IndexOfPathPointDoNotCheck=0;
 
-      while (!Arrive) { //    tant que un des tests d  arret est non verifie
+      while (!Arrive) { //    as one of stop tests is not checked
 
 	Cadre = Cadrage(BornInf,BornSup,UVap,PasC,StepSign);
-	//  Frontiere?
+	//  Border?
 
 #ifdef CHRONO
 	Chronrsnld.Start();
@@ -196,17 +196,17 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
 	      if (CurrentLine->NbPoints() == 1) break;
 	      Arrive = Standard_True;
 	      CurrentLine->AddStatusLast(Standard_False);
-	      Tgtend = Standard_True; // a voir
+	      Tgtend = Standard_True; // check
               Rajout = Standard_True;
 	      seqAjout.Append(lines.Length() + 1);
 	    }  
 	  }
-	  else { // test arret
+	  else { // test stop
 	    Rsnld.Root(UVap);
 	    Arrive = TestArretPassage(Umult, Vmult, Func, UVap, N);
 	    if (Arrive) {
 	      Cadre = Standard_False;
-	      //au cas ou on aurait cadre et arrive en meme temps
+	      //in case if there is a frame and arrive at the same time
 	    }
 	    else {
 	      if (Rajout) {
@@ -234,7 +234,7 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
 	      }
 	      // modified by NIZHNY-MKK  Thu Nov  2 15:09:13 2000.END
 	      if (!ArretAjout && Cadre) {
-		if (CurrentLine->NbPoints() == 1) break; // annuler la ligne
+		if (CurrentLine->NbPoints() == 1) break; // cancel the line
 		TestArretCadre(Umult, Vmult, CurrentLine, Func, UVap, N);
 //		if (N == 0) {
 		if (N <= 0) { // jag 941017
@@ -270,7 +270,7 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
 	      }
 	    }
 	    else if (Status == IntWalk_ArretSurPointPrecedent) {
-	      if (CurrentLine->NbPoints() == 1) { //annuler la ligne
+	      if (CurrentLine->NbPoints() == 1) { //cancel the line
 		Arrive = Standard_False;
 		break;
 	      }
@@ -278,37 +278,36 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
 	      Rajout = Standard_True;
               seqAjout.Append(lines.Length() + 1);
 	      CurrentLine->AddStatusLast(Standard_False);
-	      Tgtend = Standard_True; // a voir
+	      Tgtend = Standard_True; // check
 	    }
 	    else if (Arrive)  {
-	      if (CurrentLine->NbPoints() == 1 &&    // annuler la ligne
+	      if (CurrentLine->NbPoints() == 1 &&    // cancel the line
 		  (N == I || Status == IntWalk_PointConfondu) ) {
-		// si N == I on s est probablement trompe de uv 
-		// principal ou bien le point 
-		// est un point d accumulation
-		// si point confondu les donnees de depart sont mauvaises
+		// if N == I the main uv is probably lost
+		// or the point is a point of accumulation
+		// if point is confused the start data is bad
 		Arrive =  Standard_False;
 		break;
 	      }
-	      // on a necessairement N > 0 jag 940617
-              // point d arret donne en entree 
+	      // necessairily N > 0 jag 940617
+              // point of stop given at input 
 	      PathPnt = Pnts1.Value(N);
 	      
 	      Standard_Integer etat1N=etat1(N);
 	      // modified by NIZHNY-MKK  Thu Nov  2 15:09:51 2000.BEGIN
-	      // 	      if (etat1N < 11) { // point passant qui est un arret  
-	      if (Abs(etat1N) < 11) { // point passant qui est un arret  
+	      // 	      if (etat1N < 11) { // passing point that is a stop  
+	      if (Abs(etat1N) < 11) { // passing point that is a stop    
 		// modified by NIZHNY-MKK  Thu Nov  2 15:12:11 2000.END
 		if (Status == IntWalk_ArretSurPoint) { 
 		  CurrentLine->AddStatusLast(Standard_False);
-		  Tgtend = Standard_True; // a voir
+		  Tgtend = Standard_True; // need check
 		}
 		else { 
 		  Arrive = Standard_False;
 		}
 		CurrentLine->AddIndexPassing(N);
 	      }
-	      else { // point d  arret donne en entree
+	      else { // point of stop given at input
 		if (etat1N == 11) {
 		  Tgtend = Standard_True;
 		}
@@ -348,7 +347,7 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
 	    }                           
 	  }
 	}
-	else { // pas de solution numerique
+	else { // no numerical solution
 	  PasC = PasC / 2.;
 	  PasCu = Abs(PasC*previousd2d.X());
 	  PasCv = Abs(PasC*previousd2d.Y());
@@ -356,12 +355,12 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
 	    if (CurrentLine->NbPoints()==1) break;
 	    Arrive = Standard_True;
 	    CurrentLine->AddStatusLast(Standard_False);
-	    Tgtend = Standard_True; // a voir
+	    Tgtend = Standard_True; // need check
 	    Rajout = Standard_True;
             seqAjout.Append(lines.Length() + 1);
 	  }  
 	}
-      } // fin de la ligne commencee
+      } // end of started line
       
       if (Arrive) {
 	CurrentLine->SetTangencyAtEnd(Tgtend);
@@ -438,8 +437,8 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
 	}
 	  
       }
-    } //fin de traitement d  un point
-  } //fin de tous les points
+    } //end of point processing
+  } //end of all points
 }
 
 // modified by NIZHNY-MKK  Thu Nov  2 15:07:53 2000.BEGIN
@@ -463,7 +462,7 @@ static Standard_Boolean TestPassedSolutionWithNegativeState(const TColStd_Sequen
   for (i = 1; i <= etat.Length(); i++) {
     if (etat(i) < -11) {
 
- // debug jag voir avec isg
+ // debug jag see with isg
 
       Utest = ustart(i);
       Vtest = vstart(i);
diff --git a/inc/IntWalk_IWalking_4.gxx b/inc/IntWalk_IWalking_4.gxx
index 9dad698..42bffc7 100644
--- a/inc/IntWalk_IWalking_4.gxx
+++ b/inc/IntWalk_IWalking_4.gxx
@@ -29,41 +29,40 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 					const ThePOLIterator& Pnts2,
 					TheIWFunction& Func,
                                         Standard_Boolean& Rajout ) 
-// *********** traitement ligne fermee **********************
+// *********** Processing of closed line **********************
 //
-// pour tout point interieur non encore traite
-//       calculer le pas d avancement=pas en fonction de la fleche 
-// et du pas max
-//       calculer un point approche (ce point est sur la tangente a la section
-// de distance = pas du point interieur)
-//  tant que 
-//            (l ensemble des points calcules ne forme pas une boucle fermee)  
-//                              ou                    
-//            (l ensemble des points ne forme pas une ligne ouverte allant 
-//            d  une frontiere du domaine a un autre ou d un point de tangence
-//            a une frontiere ou de 2 points de tangence :cas singuliers)
+// for any interior non-processed point 
+//       calculate the step of advancement=step depending on the arrow and max step
+//       calculate a point of approach (this point is on the tangent to the section
+// of distance = no interior point)
+//  conditions 
+//            (all calculated points do not form a closed loop)  
+//                              or                    
+//            (all points do not form an open line going from 
+//            one border of the domain to the other or from a point tangent
+//            to the border or from 2 tangent points : single cases)
 //  
-//     cadrer le point approche sur les frontieres si necessaire
-//     calcul du point
-//     si point non trouve diviser le pas
-//     test d arret    
-//     calcul du pas en fonction de la fleche et du pas maxi(arret possible)
+//     frame the point of approach on borders if necessary
+//     calculate the point
+//     if point not found divide the step
+//     test of stop    
+//     calculate step depending on the arrow and the max step (stop possible)
 //
 // ******************************************************************** 
 {
 
   Standard_Integer I,N = 0;
   static math_Vector BornInf(1,2),BornSup(1,2);
-  static math_Vector Uvap(1,2);// parametres approches courant
-  Standard_Real PasC;  // taux d`avancement sur la tangente
-  Standard_Real PasCu; // pas d avancement courant en U
-  Standard_Real PasCv; // pas d avancement courant en V
-  Standard_Real PasSav; //sauvegarde du premier pas d  avancement
-  Standard_Boolean Arrive;// indique si ligne terminee
-  Standard_Boolean Cadre; //indique si on est sur frontiere du domaine
-  Standard_Boolean ArretAjout; //indique si on est sur un point ajoute
+  static math_Vector Uvap(1,2);// parameters of current approach
+  Standard_Real PasC;  // rate of advancement on the tangent
+  Standard_Real PasCu; // rate of advancement current by U
+  Standard_Real PasCv; // step of advancement current by V
+  Standard_Real PasSav; // save first step of advancement
+  Standard_Boolean Arrive;// show if line ends
+  Standard_Boolean Cadre; // show if on border of the  domains
+  Standard_Boolean ArretAjout; // show if on the added point
   IntSurf_PntOn2S Psol;
-  Handle(IntWalk_TheIWLine)  CurrentLine; //ligne en construction
+  Handle(IntWalk_TheIWLine)  CurrentLine; //line under construction
   ThePointOfPath PathPnt;
   ThePointOfLoop LoopPnt;
 
@@ -72,12 +71,11 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
   Standard_Integer StepSign;
   
   IntWalk_StatusDeflection Status,StatusPrecedent;
-  Standard_Integer NbDivision ;   // nombre de fois que l  on a divise le pas 
-  // lors du calcul d 1 section
+  Standard_Integer NbDivision ;   // number of divisions of step 
+  // during calculation of  1 section
 
   Standard_Integer Ipass ;
-  //indice dans l iterateur des points sur arete du point de 
-  //passage  
+  //index in the iterator of points on edge of point of passage  
 
 
   BornInf(1) = Um;
@@ -89,7 +87,7 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
   Standard_Integer nbLoop = Pnts2.Length();
   
   for (I = 1;I<=nbLoop;I++) {
-    if (etat2(I) > 12) { // point de demarrage de ligne fermee
+    if (etat2(I) > 12) { // start point of closed line
       
       LoopPnt = Pnts2.Value(I);
       previousPoint.SetValue(ThePointOfLoopTool::Value3d(LoopPnt),reversed,
@@ -107,7 +105,7 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 
       StepSign = 1;
 
-      // premier pas d avancement
+      // first step of advancement
 
       Standard_Real d2dx = Abs(previousd2d.X()); 
       Standard_Real d2dy = Abs(previousd2d.Y()); 
@@ -127,8 +125,8 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
       ArretAjout = Standard_False;
       NbDivision = 0;
       StatusPrecedent = IntWalk_OK;
-      while (!Arrive) {  // tant que aucun test d arret verifie
-	Cadre=Cadrage(BornInf,BornSup,Uvap,PasC, StepSign);  // frontiere?
+      while (!Arrive) {  // as no test of stop is passed
+	Cadre=Cadrage(BornInf,BornSup,Uvap,PasC, StepSign);  // border?
 #ifdef CHRONO
 	Chronrsnld.Start();
 #endif
@@ -139,11 +137,11 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 	Chronrsnld.Stop();
 #endif
 
-	if (Cadre) { // remise a jour des bornes.
+	if (Cadre) { // update of limits.
 	  BornInf(1) = Um;BornSup(1) = UM;BornInf(2) = Vm;BornSup(2) = VM;
 	}
 	if (Rsnld.IsDone()) {
-	  if (Abs(Func.Root()) > Func.Tolerance()) { // pas de solution a la tolerance
+	  if (Abs(Func.Root()) > Func.Tolerance()) { // no solution for the tolerance
 	    PasC = PasC/2.;
 	    PasCu = Abs(PasC*previousd2d.X());
 	    PasCv = Abs(PasC*previousd2d.Y());
@@ -158,10 +156,10 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 	      Tgtend = Standard_True;
 	    }
 	  }
-	  else { // il y a une solution
+	  else { // there is a solution
 	    Rsnld.Root(Uvap);
 	    Arrive = TestArretPassage(Umult,Vmult,Uvap,I,Ipass);
-	    if (Arrive) {//remettre les bons parametres pour le test de fleche.
+	    if (Arrive) {//reset proper parameter to test the arrow.
 	      Psol = CurrentLine->Value(1);
 	      if (!reversed) {
 		Psol.ParametersOnS2(Uvap(1),Uvap(2));
@@ -170,11 +168,11 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 		Psol.ParametersOnS1(Uvap(1),Uvap(2));
 	      }
               Cadre=Standard_False; 
-	      //au cas ou on aurait cadre et arrive en meme temps
+	      //in case if there is a frame and arrival at the same time
 	    }
 	    else { // modif jag 940615
 
-	      if (Rajout) {    // test sur les points rajoutes
+	      if (Rajout) {    // test on added points
 		ArretAjout =TestArretAjout(Func,Uvap,N,Psol);
 		if (ArretAjout) {
 		  if (N >0) {
@@ -188,8 +186,8 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 		}
 	      }
 
-	      if (!ArretAjout&& Cadre) {  // test sur les points deja marques
-		if (CurrentLine->NbPoints() == 1)  break; // annuler la ligne
+	      if (!ArretAjout&& Cadre) {  // test on already marked points
+		if (CurrentLine->NbPoints() == 1)  break; // cancel the line
 		TestArretCadre(Umult,Vmult,CurrentLine,Func,Uvap,N);
 //		if (N==0) {
 		if (N <= 0) { // jag 941017
@@ -197,13 +195,13 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 		  Tgtend = Func.IsTangent(); // jag 940616
 		  N = -N;
 		}
-		Arrive = (etat2(I) == 12); // la ligne s est ouverte
+		Arrive = (etat2(I) == 12); // the line is open
 	      }
 	    }
 	    Status = TestDeflection(Func, Arrive,Uvap,StatusPrecedent,
 				    NbDivision,PasC,StepSign);
 	    StatusPrecedent = Status; 
-	    if (Status == IntWalk_PasTropGrand) {// division du pas
+	    if (Status == IntWalk_PasTropGrand) {// division of the step
 	      Arrive = Standard_False;
 	      ArretAjout = Standard_False;
 	      Tgtend = Standard_False; // jag 940616
@@ -216,7 +214,7 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 	    }
 	    else if (ArretAjout || Cadre) {
 
-	      if (Arrive) { // la ligne s est ouverte
+	      if (Arrive) { // line s is open
 		CurrentLine->AddStatusLast(Standard_False);
 		if (Status != IntWalk_ArretSurPointPrecedent) {
 		  CurrentLine->AddPoint(Psol);                      
@@ -227,8 +225,8 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 		}
                 
 	      }
-	      else { // a ouvrir
-		etat2(I) = 12; //la declarer ouverte
+	      else { // open
+		etat2(I) = 12; // declare it open
 		Tgtbeg = Tgtend;
 		Tgtend = Standard_False;
 		ArretAjout = Standard_False;
@@ -249,12 +247,12 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 	    }
 
 	    else if ( Status == IntWalk_ArretSurPointPrecedent) {
-	      if (CurrentLine->NbPoints() == 1) { //annuler la ligne
+	      if (CurrentLine->NbPoints() == 1) { //cancel the line
 		Arrive = Standard_False;
 		break;
 	      }
-	      if (etat2(I) >12) { //la ligne doit s  ouvrir
-		etat2(I) = 12; //la declarer ouverte
+	      if (etat2(I) >12) { //the line should become open
+		etat2(I) = 12; //declare it open
 		ArretAjout = Standard_False;
 		OpenLine(0,Psol,Pnts1,Func,CurrentLine);
 		StepSign = -1;
@@ -264,7 +262,7 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 		Rajout = Standard_True;
                 seqAjout.Append(-lines.Length()-1);
 	      }
-	      else { // la ligne s est ouverte                 
+	      else { // line s is open                 
 		Arrive =Standard_True;
 		CurrentLine->AddStatusLast(Standard_False);
 		Rajout = Standard_True;
@@ -272,20 +270,20 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 	      } 
 	    }
 	    else if (Arrive)  {
-	      if (etat2(I) > 12) {  //ligne fermee bon cas
+	      if (etat2(I) > 12) {  //line closed good case
 		CurrentLine->AddStatusFirstLast(Standard_True,
                                                Standard_False,Standard_False);
 		CurrentLine->AddPoint(CurrentLine->Value(1));              
 	      }
-	      else if (N >0) { //point d arret donne en entree 
+	      else if (N >0) { //point of stop given at input 
 		PathPnt = Pnts1.Value(N);
 		CurrentLine->AddStatusLast(Standard_True,N,PathPnt);
                 AddPointInCurrentLine(N,PathPnt,CurrentLine);
 	      }
 	    }
 	    else if (Status == IntWalk_ArretSurPoint) {
-	      if (etat2(I) >12) { //la ligne doit s  ouvrir
-		etat2(I) = 12; //la declarer ouverte
+	      if (etat2(I) >12) { //line should become open
+		etat2(I) = 12; //declare it open
 		Tgtbeg = Standard_True;
 		Tgtend = Standard_False;
                 N= -lines.Length()-1;
@@ -300,7 +298,7 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 	      }
 	      else { 
 		Arrive = Standard_True;                   
-		if (Ipass!=0) { //point de passage  ,point d arret
+		if (Ipass!=0) { //point of passage, point of stop
 		  PathPnt = Pnts1.Value(Ipass);
 		  CurrentLine->AddStatusLast(Standard_True,Ipass,PathPnt);
                   AddPointInCurrentLine(Ipass,PathPnt,CurrentLine);
@@ -324,13 +322,13 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 	    }
 	  }
 	}
-	else { //pas de solution numerique  NotDone
+	else { //no numerical solution NotDone
 	  PasC = PasC/2.;
 	  PasCu = Abs(PasC*previousd2d.X());
 	  PasCv = Abs(PasC*previousd2d.Y());
 
 	  if (PasCu <= tolerance(1) && PasCv <= tolerance(2)) {
-            if (CurrentLine->NbPoints() == 1)  break; // annuler la ligne
+            if (CurrentLine->NbPoints() == 1)  break; // cancel the line
 	    Arrive = Standard_True;
 	    CurrentLine->AddStatusFirstLast(Standard_False,Standard_False,
                                            Standard_False);
@@ -339,16 +337,16 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
 	    seqAjout.Append(lines.Length()+1);
 	  }  
 	}
-      }// fin de la ligne commencee
+      }// end of started line 
       if (Arrive) {
 	CurrentLine->SetTangencyAtBegining(Tgtbeg);
 	CurrentLine->SetTangencyAtEnd(Tgtend);
 	
 	lines.Append(CurrentLine);
-	etat2(I)=-etat2(I); //marque le point comme traite
+	etat2(I)=-etat2(I); //mark point as processed
       }
-    } //fin de traitement d un point de depart
-  } //fin de tous les points de depart
+    } //end of processing of start point
+  } //end of all start points
 }
 
 
diff --git a/inc/IntWalk_PWalking_1.gxx b/inc/IntWalk_PWalking_1.gxx
index ced5818..c38e22f 100644
--- a/inc/IntWalk_PWalking_1.gxx
+++ b/inc/IntWalk_PWalking_1.gxx
@@ -144,7 +144,7 @@ IntWalk_PWalking::IntWalk_PWalking(const ThePSurface& Caro1,
 
 
   if(ThePSurfaceTool::IsUPeriodic(Caro1)==Standard_False) { 
-    UM1+=KELARG*pasuv[0];  Um1-=KELARG*pasuv[0];
+    //UM1+=KELARG*pasuv[0];  Um1-=KELARG*pasuv[0];
   }
   else { 
     Standard_Real t = UM1-Um1; 
@@ -156,7 +156,7 @@ IntWalk_PWalking::IntWalk_PWalking(const ThePSurface& Caro1,
   }
       
   if(ThePSurfaceTool::IsVPeriodic(Caro1)==Standard_False) { 
-    VM1+=KELARG*pasuv[1];  Vm1-=KELARG*pasuv[1];
+    //VM1+=KELARG*pasuv[1];  Vm1-=KELARG*pasuv[1];
   }
   else { 
     Standard_Real t = VM1-Vm1; 
@@ -168,7 +168,7 @@ IntWalk_PWalking::IntWalk_PWalking(const ThePSurface& Caro1,
   }
    
   if(ThePSurfaceTool::IsUPeriodic(Caro2)==Standard_False) { 
-    UM2+=KELARG*pasuv[2];  Um2-=KELARG*pasuv[2];
+    //UM2+=KELARG*pasuv[2];  Um2-=KELARG*pasuv[2];
   }
   else { 
     Standard_Real t = UM2-Um2; 
@@ -180,7 +180,7 @@ IntWalk_PWalking::IntWalk_PWalking(const ThePSurface& Caro1,
   }
    
   if(ThePSurfaceTool::IsVPeriodic(Caro2)==Standard_False) {   
-    VM2+=KELARG*pasuv[3];  Vm2-=KELARG*pasuv[3];
+    //VM2+=KELARG*pasuv[3];  Vm2-=KELARG*pasuv[3];
   }
   else { 
     Standard_Real t = VM2-Vm2; 
diff --git a/inc/InterfaceGraphic_PrimitiveArray.hxx b/inc/InterfaceGraphic_PrimitiveArray.hxx
index 68bf072..e8a690a 100644
--- a/inc/InterfaceGraphic_PrimitiveArray.hxx
+++ b/inc/InterfaceGraphic_PrimitiveArray.hxx
@@ -50,16 +50,6 @@ typedef enum {
   TelTriangleFansArrayType
 } TelPrimitivesArrayType;
 
-typedef enum 
-{
-  VBOEdges, 
-  VBOVertices, 
-  VBOVcolours, 
-  VBOVnormals, 
-  VBOVtexels,
-  VBOMaxType
-} VBODataType;
-
 typedef struct {
   TelPrimitivesArrayType type;                    /* Array type */
   Tint                   format;                  /* Array datas format */
@@ -75,17 +65,6 @@ typedef struct {
   tel_texture_coord      vtexels;                 /* Texture Coordinates */
   Tchar                 *edge_vis;                /* Edge visibility flag*/
   Tchar                 *keys;                    /* Vertex keys*/
-  Tuint                  bufferVBO[VBOMaxType];   /* VBO IDs for *edges, vertices, vcolours, vnormals, vtexels.
-                                                     default = -1. VBO - Vertex Buffer Object */
-  Tint                   flagBufferVBO;           /* this flag is responded for bufferVBO load status.
-                                                     -1 - Not Initial BufferVBO. Default mean.
-                                                      0 - Error by allocated memory in Graphic Device.
-                                                      Not Initial BufferVBO.
-                                                      1 - Initial BufferVBO */
-  Tint                   VBOEnabled;              /* -1 - it is not known VBO status
-                                                      0 - draw object without VBO
-                                                      1 - draw object with VBO */
-  Standard_Address       contextId;               /* remember context for VBO */
 } CALL_DEF_PARRAY;
 
 #endif /* _InterfaceGraphic_PrimitiveArray_header_file_ */
diff --git a/inc/InterfaceGraphic_RawBufferData.hxx b/inc/InterfaceGraphic_RawBufferData.hxx
deleted file mode 100644
index bff620e..0000000
--- a/inc/InterfaceGraphic_RawBufferData.hxx
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-#ifndef INTERFACEGRAPHIC_RawBufferData_H
-#define INTERFACEGRAPHIC_RawBufferData_H
-
-#include <Standard.hxx>
-
-// Most items are from GLenum, but values not equal!
-typedef enum
-{
-  TRGB,
-  TBGR,
-  TRGBA,
-  TBGRA,
-  TDepthComponent,
-  TRed,
-  TGreen,
-  TBlue,
-  TAlpha,
-} TRawBufferDataFormat;
-
-typedef enum
-{
-  TUByte,
-  TFloat,
-} TRawBufferDataType;
-
-struct TRawBufferData
-{
-  Standard_Integer widthPx;
-  Standard_Integer heightPx;
-  Standard_Integer rowAligmentBytes;
-  TRawBufferDataFormat format;
-  TRawBufferDataType type;
-  Standard_Address dataPtr;
-};
-
-#endif /* INTERFACEGRAPHIC_RawBufferData_H */
diff --git a/inc/Interface_Array1OfFileParameter.hxx b/inc/Interface_Array1OfFileParameter.hxx
index 419085c..dd918cc 100644
--- a/inc/Interface_Array1OfFileParameter.hxx
+++ b/inc/Interface_Array1OfFileParameter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Interface_FileParameter;
 class Interface_Array1OfFileParameter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Interface_Array1OfFileParameter(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Interface_Array1OfHAsciiString.hxx b/inc/Interface_Array1OfHAsciiString.hxx
index ff6d0f5..a8c9ea9 100644
--- a/inc/Interface_Array1OfHAsciiString.hxx
+++ b/inc/Interface_Array1OfHAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TCollection_HAsciiString;
 class Interface_Array1OfHAsciiString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Interface_Array1OfHAsciiString(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Interface_BitMap.hxx b/inc/Interface_BitMap.hxx
index 3c78264..85ec656 100644
--- a/inc/Interface_BitMap.hxx
+++ b/inc/Interface_BitMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class TColStd_HSequenceOfAsciiString;
 class Interface_BitMap  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a empty BitMap <br>
   Standard_EXPORT   Interface_BitMap();
diff --git a/inc/Interface_Category.hxx b/inc/Interface_Category.hxx
index a11793a..3eea715 100644
--- a/inc/Interface_Category.hxx
+++ b/inc/Interface_Category.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class Interface_InterfaceModel;
 class Interface_Category  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Category, with no protocol yet <br>
   Standard_EXPORT   Interface_Category();
diff --git a/inc/Interface_CheckIterator.hxx b/inc/Interface_CheckIterator.hxx
index 71ab084..86ab0c0 100644
--- a/inc/Interface_CheckIterator.hxx
+++ b/inc/Interface_CheckIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class Message_Messenger;
 class Interface_CheckIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty CheckIterator <br>
   Standard_EXPORT   Interface_CheckIterator();
diff --git a/inc/Interface_CheckTool.hxx b/inc/Interface_CheckTool.hxx
index dc9f4e1..374ac5e 100644
--- a/inc/Interface_CheckTool.hxx
+++ b/inc/Interface_CheckTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -62,18 +65,7 @@ class Interface_EntityIterator;
 class Interface_CheckTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a CheckTool, by calling the General Service Library <br>
 //!           and Modules, selected through a Protocol, to work on a Model <br>
diff --git a/inc/Interface_CopyTool.hxx b/inc/Interface_CopyTool.hxx
index 4d1d293..9c2f941 100644
--- a/inc/Interface_CopyTool.hxx
+++ b/inc/Interface_CopyTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -84,18 +87,7 @@ class Interface_EntityIterator;
 class Interface_CopyTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a CopyTool adapted to work from a Model. Works <br>
 //!           with a General Service Library, given as an argument <br>
diff --git a/inc/Interface_DataMapIteratorOfDataMapOfTransientInteger.hxx b/inc/Interface_DataMapIteratorOfDataMapOfTransientInteger.hxx
index ef90ff4..c936aef 100644
--- a/inc/Interface_DataMapIteratorOfDataMapOfTransientInteger.hxx
+++ b/inc/Interface_DataMapIteratorOfDataMapOfTransientInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_DataMapNodeOfDataMapOfTransientInteger;
 class Interface_DataMapIteratorOfDataMapOfTransientInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Interface_DataMapIteratorOfDataMapOfTransientInteger();
diff --git a/inc/Interface_DataMapOfTransientInteger.hxx b/inc/Interface_DataMapOfTransientInteger.hxx
index b592c03..917f54a 100644
--- a/inc/Interface_DataMapOfTransientInteger.hxx
+++ b/inc/Interface_DataMapOfTransientInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Interface_DataMapIteratorOfDataMapOfTransientInteger;
 class Interface_DataMapOfTransientInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Interface_DataMapOfTransientInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Interface_EntityIterator.hxx b/inc/Interface_EntityIterator.hxx
index 79bd09b..adc6267 100644
--- a/inc/Interface_EntityIterator.hxx
+++ b/inc/Interface_EntityIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class Standard_Type;
 class Interface_EntityIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines an empty iterator (see AddList & AddItem) <br>
   Standard_EXPORT   Interface_EntityIterator();
diff --git a/inc/Interface_EntityList.hxx b/inc/Interface_EntityList.hxx
index 936140c..eaba825 100644
--- a/inc/Interface_EntityList.hxx
+++ b/inc/Interface_EntityList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class Standard_Type;
 class Interface_EntityList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a List as beeing empty <br>
   Standard_EXPORT   Interface_EntityList();
diff --git a/inc/Interface_FileParameter.hxx b/inc/Interface_FileParameter.hxx
index 0838b6d..4b50c15 100644
--- a/inc/Interface_FileParameter.hxx
+++ b/inc/Interface_FileParameter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,22 +43,7 @@ class TCollection_AsciiString;
 class Interface_FileParameter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Interface_FileParameter();
diff --git a/inc/Interface_FileReaderTool.hxx b/inc/Interface_FileReaderTool.hxx
index a10b4ca..e9fdbcb 100644
--- a/inc/Interface_FileReaderTool.hxx
+++ b/inc/Interface_FileReaderTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class Interface_ReaderLib;
 class Interface_FileReaderTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Sets Data to a FileReaderData. Works with a Protocol <br>
   Standard_EXPORT     void SetData(const Handle(Interface_FileReaderData)& reader,const Handle(Interface_Protocol)& protocol) ;
diff --git a/inc/Interface_FloatWriter.hxx b/inc/Interface_FloatWriter.hxx
index 39d7b35..bb7c8d2 100644
--- a/inc/Interface_FloatWriter.hxx
+++ b/inc/Interface_FloatWriter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@
 class Interface_FloatWriter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a FloatWriter ready to work, with default options  - <br>
 //!           - zero suppress option is set <br>
diff --git a/inc/Interface_GeneralLib.hxx b/inc/Interface_GeneralLib.hxx
index d19562c..d962379 100644
--- a/inc/Interface_GeneralLib.hxx
+++ b/inc/Interface_GeneralLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class Interface_GlobalNodeOfGeneralLib;
 class Interface_GeneralLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void SetGlobal(const Handle(Interface_GeneralModule)& amodule,const Handle(Interface_Protocol)& aprotocol) ;
diff --git a/inc/Interface_Graph.hxx b/inc/Interface_Graph.hxx
index 30e9566..1a58fe8 100644
--- a/inc/Interface_Graph.hxx
+++ b/inc/Interface_Graph.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -89,18 +92,7 @@ class TCollection_HAsciiString;
 class Interface_Graph  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty graph, ready to receive Entities from amodel <br>
 //!           Note that this way of Creation allows <me> to verify that <br>
diff --git a/inc/Interface_GraphContent.hxx b/inc/Interface_GraphContent.hxx
index 720ba60..080f6a3 100644
--- a/inc/Interface_GraphContent.hxx
+++ b/inc/Interface_GraphContent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Interface_EntityIterator;
 class Interface_GraphContent  : public Interface_EntityIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty GraphContent, ready to be filled <br>
   Standard_EXPORT   Interface_GraphContent();
diff --git a/inc/Interface_IndexedMapOfAsciiString.hxx b/inc/Interface_IndexedMapOfAsciiString.hxx
index bf86d7d..a844590 100644
--- a/inc/Interface_IndexedMapOfAsciiString.hxx
+++ b/inc/Interface_IndexedMapOfAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_IndexedMapNodeOfIndexedMapOfAsciiString;
 class Interface_IndexedMapOfAsciiString  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Interface_IndexedMapOfAsciiString(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Interface_IntList.hxx b/inc/Interface_IntList.hxx
index 405d388..16c509d 100644
--- a/inc/Interface_IntList.hxx
+++ b/inc/Interface_IntList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class TColStd_HArray1OfInteger;
 class Interface_IntList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!Creates empty IntList. <br>
   Standard_EXPORT   Interface_IntList();
diff --git a/inc/Interface_LineBuffer.hxx b/inc/Interface_LineBuffer.hxx
index 7f4d8a5..296d381 100644
--- a/inc/Interface_LineBuffer.hxx
+++ b/inc/Interface_LineBuffer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TCollection_HAsciiString;
 class Interface_LineBuffer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a LineBuffer with an absolute maximum size <br>
 //!           (Default value is only to satisfy compiler requirement) <br>
diff --git a/inc/Interface_MSG.hxx b/inc/Interface_MSG.hxx
index 352250c..f50488f 100644
--- a/inc/Interface_MSG.hxx
+++ b/inc/Interface_MSG.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class Standard_DomainError;
 class Interface_MSG  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! A MSG is created to write a "functional code" in conjunction <br>
 //!           with operator () attached to Value <br>
diff --git a/inc/Interface_MapAsciiStringHasher.hxx b/inc/Interface_MapAsciiStringHasher.hxx
index 7fc63c4..37b4760 100644
--- a/inc/Interface_MapAsciiStringHasher.hxx
+++ b/inc/Interface_MapAsciiStringHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TCollection_AsciiString;
 class Interface_MapAsciiStringHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const TCollection_AsciiString& K,const Standard_Integer Upper) ;
diff --git a/inc/Interface_ReaderLib.hxx b/inc/Interface_ReaderLib.hxx
index 9c27598..9f56c14 100644
--- a/inc/Interface_ReaderLib.hxx
+++ b/inc/Interface_ReaderLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class Interface_GlobalNodeOfReaderLib;
 class Interface_ReaderLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void SetGlobal(const Handle(Interface_ReaderModule)& amodule,const Handle(Interface_Protocol)& aprotocol) ;
diff --git a/inc/Interface_STAT.hxx b/inc/Interface_STAT.hxx
index d3bc219..4b31096 100644
--- a/inc/Interface_STAT.hxx
+++ b/inc/Interface_STAT.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -97,18 +100,7 @@ class TColStd_HSequenceOfInteger;
 class Interface_STAT  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a STAT form. At start, one default phase is defined, <br>
 //!           with one default step. Then, it suffises to start with a <br>
diff --git a/inc/Interface_SequenceOfCheck.hxx b/inc/Interface_SequenceOfCheck.hxx
index 3a6c00e..9660e27 100644
--- a/inc/Interface_SequenceOfCheck.hxx
+++ b/inc/Interface_SequenceOfCheck.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Interface_SequenceNodeOfSequenceOfCheck;
 class Interface_SequenceOfCheck  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Interface_SequenceOfCheck();
diff --git a/inc/Interface_ShareFlags.hxx b/inc/Interface_ShareFlags.hxx
index 5637769..4711531 100644
--- a/inc/Interface_ShareFlags.hxx
+++ b/inc/Interface_ShareFlags.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class Interface_EntityIterator;
 class Interface_ShareFlags  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a ShareFlags from a Model and builds required data <br>
 //!           (flags) by calling the General Service Library given as <br>
diff --git a/inc/Interface_ShareTool.hxx b/inc/Interface_ShareTool.hxx
index e0b9076..b126427 100644
--- a/inc/Interface_ShareTool.hxx
+++ b/inc/Interface_ShareTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class Message_Messenger;
 class Interface_ShareTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a ShareTool from a Model and builds all required data, <br>
 //!           by calling the General Service Library and Modules <br>
diff --git a/inc/Intf.hxx b/inc/Intf.hxx
index 424d4b1..7ac36f9 100644
--- a/inc/Intf.hxx
+++ b/inc/Intf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class Intf_SequenceNodeOfSeqOfSectionLine;
 class Intf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Give the plane equation of the triangle <P1> <P2> <P3>. <br>
   Standard_EXPORT   static  void PlaneEquation(const gp_Pnt& P1,const gp_Pnt& P2,const gp_Pnt& P3,gp_XYZ& NormalVector,Standard_Real& PolarDistance) ;
diff --git a/inc/Intf_Array1OfLin.hxx b/inc/Intf_Array1OfLin.hxx
index 9b2230b..100b673 100644
--- a/inc/Intf_Array1OfLin.hxx
+++ b/inc/Intf_Array1OfLin.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Lin;
 class Intf_Array1OfLin  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Intf_Array1OfLin(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Intf_Interference.hxx b/inc/Intf_Interference.hxx
index be7d48e..c6cbd0f 100644
--- a/inc/Intf_Interference.hxx
+++ b/inc/Intf_Interference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Intf_TangentZone;
 class Intf_Interference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Gives the number   of  points of  intersection  in the <br>
 //!          interference. <br>
diff --git a/inc/Intf_InterferencePolygon2d.hxx b/inc/Intf_InterferencePolygon2d.hxx
index 33f1360..4b4ce92 100644
--- a/inc/Intf_InterferencePolygon2d.hxx
+++ b/inc/Intf_InterferencePolygon2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Pnt2d;
 class Intf_InterferencePolygon2d  : public Intf_Interference {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty interference of Polygon. <br>
   Standard_EXPORT   Intf_InterferencePolygon2d();
diff --git a/inc/Intf_Polygon2d.hxx b/inc/Intf_Polygon2d.hxx
index 25464b5..790395b 100644
--- a/inc/Intf_Polygon2d.hxx
+++ b/inc/Intf_Polygon2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class gp_Pnt2d;
 class Intf_Polygon2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the bounding box of the polygon. <br>
        const Bnd_Box2d& Bounding() const;
diff --git a/inc/Intf_SectionLine.hxx b/inc/Intf_SectionLine.hxx
index a78d052..ed95f99 100644
--- a/inc/Intf_SectionLine.hxx
+++ b/inc/Intf_SectionLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Intf_SectionPoint;
 class Intf_SectionLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns number of points in this SectionLine. <br>
         Standard_Integer NumberOfPoints() const;
diff --git a/inc/Intf_SectionPoint.hxx b/inc/Intf_SectionPoint.hxx
index 4715a96..fa5b96c 100644
--- a/inc/Intf_SectionPoint.hxx
+++ b/inc/Intf_SectionPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class gp_Pnt2d;
 class Intf_SectionPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the location of the SectionPoint. <br>
   Standard_EXPORT    const gp_Pnt& Pnt() const;
diff --git a/inc/Intf_SeqOfSectionLine.hxx b/inc/Intf_SeqOfSectionLine.hxx
index 5d10594..d1e9d09 100644
--- a/inc/Intf_SeqOfSectionLine.hxx
+++ b/inc/Intf_SeqOfSectionLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Intf_SequenceNodeOfSeqOfSectionLine;
 class Intf_SeqOfSectionLine  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Intf_SeqOfSectionLine();
diff --git a/inc/Intf_SeqOfSectionPoint.hxx b/inc/Intf_SeqOfSectionPoint.hxx
index 6642950..17bf1f7 100644
--- a/inc/Intf_SeqOfSectionPoint.hxx
+++ b/inc/Intf_SeqOfSectionPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Intf_SequenceNodeOfSeqOfSectionPoint;
 class Intf_SeqOfSectionPoint  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Intf_SeqOfSectionPoint();
diff --git a/inc/Intf_SeqOfTangentZone.hxx b/inc/Intf_SeqOfTangentZone.hxx
index b9c4522..c2dcbc7 100644
--- a/inc/Intf_SeqOfTangentZone.hxx
+++ b/inc/Intf_SeqOfTangentZone.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Intf_SequenceNodeOfSeqOfTangentZone;
 class Intf_SeqOfTangentZone  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Intf_SeqOfTangentZone();
diff --git a/inc/Intf_TangentZone.hxx b/inc/Intf_TangentZone.hxx
index af8e40d..41a8ef1 100644
--- a/inc/Intf_TangentZone.hxx
+++ b/inc/Intf_TangentZone.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Intf_SectionPoint;
 class Intf_TangentZone  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns number of SectionPoint in this TangentZone. <br>
         Standard_Integer NumberOfPoints() const;
diff --git a/inc/Intf_Tool.hxx b/inc/Intf_Tool.hxx
index 2a97d3b..68f325c 100644
--- a/inc/Intf_Tool.hxx
+++ b/inc/Intf_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class gp_Parab;
 class Intf_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Intf_Tool();
diff --git a/inc/Intrv_Interval.hxx b/inc/Intrv_Interval.hxx
index 07f483b..596aefc 100644
--- a/inc/Intrv_Interval.hxx
+++ b/inc/Intrv_Interval.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@
 class Intrv_Interval  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Intrv_Interval();
diff --git a/inc/Intrv_Intervals.hxx b/inc/Intrv_Intervals.hxx
index fb53ab0..78806a3 100644
--- a/inc/Intrv_Intervals.hxx
+++ b/inc/Intrv_Intervals.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class Intrv_Interval;
 class Intrv_Intervals  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a void sequence of intervals. <br>
   Standard_EXPORT   Intrv_Intervals();
diff --git a/inc/Intrv_SequenceOfInterval.hxx b/inc/Intrv_SequenceOfInterval.hxx
index c3729f9..3bb95e9 100644
--- a/inc/Intrv_SequenceOfInterval.hxx
+++ b/inc/Intrv_SequenceOfInterval.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Intrv_SequenceNodeOfSequenceOfInterval;
 class Intrv_SequenceOfInterval  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Intrv_SequenceOfInterval();
diff --git a/inc/LProp3d_CLProps.hxx b/inc/LProp3d_CLProps.hxx
index bdb5b0e..fb9addc 100644
--- a/inc/LProp3d_CLProps.hxx
+++ b/inc/LProp3d_CLProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class LProp3d_CurveTool;
 class LProp3d_CLProps  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   LProp3d_CLProps(const Handle(Adaptor3d_HCurve)& C,const Standard_Integer N,const Standard_Real Resolution);
diff --git a/inc/LProp3d_CurveTool.hxx b/inc/LProp3d_CurveTool.hxx
index f013d2e..c46795b 100644
--- a/inc/LProp3d_CurveTool.hxx
+++ b/inc/LProp3d_CurveTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_Vec;
 class LProp3d_CurveTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the point <P> of parameter <U> on the HCurve <C>. <br>
   Standard_EXPORT   static  void Value(const Handle(Adaptor3d_HCurve)& C,const Standard_Real U,gp_Pnt& P) ;
diff --git a/inc/LProp3d_SLProps.hxx b/inc/LProp3d_SLProps.hxx
index a4f027a..51afc7e 100644
--- a/inc/LProp3d_SLProps.hxx
+++ b/inc/LProp3d_SLProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class gp_Dir;
 class LProp3d_SLProps  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   LProp3d_SLProps(const Handle(Adaptor3d_HSurface)& S,const Standard_Real U,const Standard_Real V,const Standard_Integer N,const Standard_Real Resolution);
diff --git a/inc/LProp3d_SurfaceTool.hxx b/inc/LProp3d_SurfaceTool.hxx
index a4ae9c6..8c25a11 100644
--- a/inc/LProp3d_SurfaceTool.hxx
+++ b/inc/LProp3d_SurfaceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_Vec;
 class LProp3d_SurfaceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the point <P> of parameter <U> and <V> on the <br>
 //!          HSurface <S>. <br>
diff --git a/inc/LProp_AnalyticCurInf.hxx b/inc/LProp_AnalyticCurInf.hxx
index 8f592bc..e42a970 100644
--- a/inc/LProp_AnalyticCurInf.hxx
+++ b/inc/LProp_AnalyticCurInf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class LProp_CurAndInf;
 class LProp_AnalyticCurInf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   LProp_AnalyticCurInf();
diff --git a/inc/LProp_CurAndInf.hxx b/inc/LProp_CurAndInf.hxx
index 08bbe2a..914be91 100644
--- a/inc/LProp_CurAndInf.hxx
+++ b/inc/LProp_CurAndInf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Standard_OutOfRange;
 class LProp_CurAndInf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   LProp_CurAndInf();
diff --git a/inc/LProp_SequenceOfCIType.hxx b/inc/LProp_SequenceOfCIType.hxx
index 2649e51..eed65ce 100644
--- a/inc/LProp_SequenceOfCIType.hxx
+++ b/inc/LProp_SequenceOfCIType.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class LProp_SequenceNodeOfSequenceOfCIType;
 class LProp_SequenceOfCIType  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       LProp_SequenceOfCIType();
diff --git a/inc/Law.hxx b/inc/Law.hxx
index 1718cf8..2d01a78 100644
--- a/inc/Law.hxx
+++ b/inc/Law.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -60,18 +63,7 @@ class Law_ListIteratorOfLaws;
 class Law  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Law_BSpFunc MixBnd(const Handle(Law_Linear)& Lin) ;
diff --git a/inc/Law_BSplineKnotSplitting.hxx b/inc/Law_BSplineKnotSplitting.hxx
index 7e05f38..3ce0a92 100644
--- a/inc/Law_BSplineKnotSplitting.hxx
+++ b/inc/Law_BSplineKnotSplitting.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class TColStd_Array1OfInteger;
 class Law_BSplineKnotSplitting  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Locates the knot values which correspond to the segmentation of <br>
diff --git a/inc/Law_Interpolate.hxx b/inc/Law_Interpolate.hxx
index 18b2343..5470038 100644
--- a/inc/Law_Interpolate.hxx
+++ b/inc/Law_Interpolate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class TColStd_Array1OfReal;
 class Law_Interpolate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Tolerance is to check if  the points are not too close <br>
 //!          to one an  other.  It is  also  used to check   if the <br>
diff --git a/inc/Law_Laws.hxx b/inc/Law_Laws.hxx
index 5ac46a5..268f6ba 100644
--- a/inc/Law_Laws.hxx
+++ b/inc/Law_Laws.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Law_ListNodeOfLaws;
 class Law_Laws  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Law_Laws();
diff --git a/inc/Law_ListIteratorOfLaws.hxx b/inc/Law_ListIteratorOfLaws.hxx
index 0079875..0370fef 100644
--- a/inc/Law_ListIteratorOfLaws.hxx
+++ b/inc/Law_ListIteratorOfLaws.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Law_ListNodeOfLaws;
 class Law_ListIteratorOfLaws  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Law_ListIteratorOfLaws();
diff --git a/inc/LocOpe.hxx b/inc/LocOpe.hxx
index f8d17b4..2d10c18 100644
--- a/inc/LocOpe.hxx
+++ b/inc/LocOpe.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class LocOpe_SequenceNodeOfSequenceOfCirc;
 class LocOpe  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Closed(const TopoDS_Wire& W,const TopoDS_Face& OnF) ;
diff --git a/inc/LocOpe_BuildShape.hxx b/inc/LocOpe_BuildShape.hxx
index 0e1d004..007c954 100644
--- a/inc/LocOpe_BuildShape.hxx
+++ b/inc/LocOpe_BuildShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TopoDS_Shape;
 class LocOpe_BuildShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       LocOpe_BuildShape();
diff --git a/inc/LocOpe_BuildWires.hxx b/inc/LocOpe_BuildWires.hxx
index 8c9c5ca..233d00f 100644
--- a/inc/LocOpe_BuildWires.hxx
+++ b/inc/LocOpe_BuildWires.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class LocOpe_ProjectedWires;
 class LocOpe_BuildWires  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   LocOpe_BuildWires();
diff --git a/inc/LocOpe_Builder.hxx b/inc/LocOpe_Builder.hxx
index aab7fd8..3bc2efb 100644
--- a/inc/LocOpe_Builder.hxx
+++ b/inc/LocOpe_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class BOP_HistoryCollector;
 class LocOpe_Builder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   LocOpe_Builder();
diff --git a/inc/LocOpe_CSIntersector.hxx b/inc/LocOpe_CSIntersector.hxx
index 0bc8276..62489b3 100644
--- a/inc/LocOpe_CSIntersector.hxx
+++ b/inc/LocOpe_CSIntersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class LocOpe_PntFace;
 class LocOpe_CSIntersector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
       LocOpe_CSIntersector();
diff --git a/inc/LocOpe_CurveShapeIntersector.hxx b/inc/LocOpe_CurveShapeIntersector.hxx
index 0c6319a..c05d461 100644
--- a/inc/LocOpe_CurveShapeIntersector.hxx
+++ b/inc/LocOpe_CurveShapeIntersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class LocOpe_PntFace;
 class LocOpe_CurveShapeIntersector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
       LocOpe_CurveShapeIntersector();
diff --git a/inc/LocOpe_DPrism.hxx b/inc/LocOpe_DPrism.hxx
index 8a3cec3..2d543bd 100644
--- a/inc/LocOpe_DPrism.hxx
+++ b/inc/LocOpe_DPrism.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class Geom_Curve;
 class LocOpe_DPrism  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   LocOpe_DPrism(const TopoDS_Face& Spine,const Standard_Real Height1,const Standard_Real Height2,const Standard_Real Angle);
diff --git a/inc/LocOpe_DataMapIteratorOfDataMapOfShapePnt.hxx b/inc/LocOpe_DataMapIteratorOfDataMapOfShapePnt.hxx
index 734b8ea..32ca6c7 100644
--- a/inc/LocOpe_DataMapIteratorOfDataMapOfShapePnt.hxx
+++ b/inc/LocOpe_DataMapIteratorOfDataMapOfShapePnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class LocOpe_DataMapNodeOfDataMapOfShapePnt;
 class LocOpe_DataMapIteratorOfDataMapOfShapePnt  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   LocOpe_DataMapIteratorOfDataMapOfShapePnt();
diff --git a/inc/LocOpe_DataMapOfShapePnt.hxx b/inc/LocOpe_DataMapOfShapePnt.hxx
index c7be395..16fb597 100644
--- a/inc/LocOpe_DataMapOfShapePnt.hxx
+++ b/inc/LocOpe_DataMapOfShapePnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class LocOpe_DataMapIteratorOfDataMapOfShapePnt;
 class LocOpe_DataMapOfShapePnt  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   LocOpe_DataMapOfShapePnt(const Standard_Integer NbBuckets = 1);
diff --git a/inc/LocOpe_FindEdges.hxx b/inc/LocOpe_FindEdges.hxx
index 6c95dcd..0bbf4a3 100644
--- a/inc/LocOpe_FindEdges.hxx
+++ b/inc/LocOpe_FindEdges.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopoDS_Edge;
 class LocOpe_FindEdges  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       LocOpe_FindEdges();
diff --git a/inc/LocOpe_FindEdgesInFace.hxx b/inc/LocOpe_FindEdgesInFace.hxx
index 5c44a04..98dd650 100644
--- a/inc/LocOpe_FindEdgesInFace.hxx
+++ b/inc/LocOpe_FindEdgesInFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopoDS_Edge;
 class LocOpe_FindEdgesInFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       LocOpe_FindEdgesInFace();
diff --git a/inc/LocOpe_Generator.hxx b/inc/LocOpe_Generator.hxx
index 5f6461e..1ac2d0d 100644
--- a/inc/LocOpe_Generator.hxx
+++ b/inc/LocOpe_Generator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopoDS_Face;
 class LocOpe_Generator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
       LocOpe_Generator();
diff --git a/inc/LocOpe_Gluer.hxx b/inc/LocOpe_Gluer.hxx
index 0bd0da0..873bd40 100644
--- a/inc/LocOpe_Gluer.hxx
+++ b/inc/LocOpe_Gluer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopTools_ListOfShape;
 class LocOpe_Gluer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       LocOpe_Gluer();
diff --git a/inc/LocOpe_LinearForm.hxx b/inc/LocOpe_LinearForm.hxx
index 37b64f6..6057aef 100644
--- a/inc/LocOpe_LinearForm.hxx
+++ b/inc/LocOpe_LinearForm.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopTools_ListOfShape;
 class LocOpe_LinearForm  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       LocOpe_LinearForm();
diff --git a/inc/LocOpe_Pipe.hxx b/inc/LocOpe_Pipe.hxx
index 4b88b09..5df3331 100644
--- a/inc/LocOpe_Pipe.hxx
+++ b/inc/LocOpe_Pipe.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class Geom_Curve;
 class LocOpe_Pipe  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   LocOpe_Pipe(const TopoDS_Wire& Spine,const TopoDS_Shape& Profile);
diff --git a/inc/LocOpe_PntFace.hxx b/inc/LocOpe_PntFace.hxx
index dc93474..4eea3c6 100644
--- a/inc/LocOpe_PntFace.hxx
+++ b/inc/LocOpe_PntFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopoDS_Face;
 class LocOpe_PntFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. Useful only for the list. <br>
   Standard_EXPORT   LocOpe_PntFace();
diff --git a/inc/LocOpe_Prism.hxx b/inc/LocOpe_Prism.hxx
index 44ddc40..72b29de 100644
--- a/inc/LocOpe_Prism.hxx
+++ b/inc/LocOpe_Prism.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Geom_Curve;
 class LocOpe_Prism  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   LocOpe_Prism();
diff --git a/inc/LocOpe_Revol.hxx b/inc/LocOpe_Revol.hxx
index 831337c..580b211 100644
--- a/inc/LocOpe_Revol.hxx
+++ b/inc/LocOpe_Revol.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class Geom_Curve;
 class LocOpe_Revol  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   LocOpe_Revol();
diff --git a/inc/LocOpe_RevolutionForm.hxx b/inc/LocOpe_RevolutionForm.hxx
index e9cd083..d2951e1 100644
--- a/inc/LocOpe_RevolutionForm.hxx
+++ b/inc/LocOpe_RevolutionForm.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TopTools_ListOfShape;
 class LocOpe_RevolutionForm  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   LocOpe_RevolutionForm();
diff --git a/inc/LocOpe_SequenceOfCirc.hxx b/inc/LocOpe_SequenceOfCirc.hxx
index 446ca2b..58ae1b5 100644
--- a/inc/LocOpe_SequenceOfCirc.hxx
+++ b/inc/LocOpe_SequenceOfCirc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class LocOpe_SequenceNodeOfSequenceOfCirc;
 class LocOpe_SequenceOfCirc  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       LocOpe_SequenceOfCirc();
diff --git a/inc/LocOpe_SequenceOfLin.hxx b/inc/LocOpe_SequenceOfLin.hxx
index e06473f..e1142dd 100644
--- a/inc/LocOpe_SequenceOfLin.hxx
+++ b/inc/LocOpe_SequenceOfLin.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class LocOpe_SequenceNodeOfSequenceOfLin;
 class LocOpe_SequenceOfLin  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       LocOpe_SequenceOfLin();
diff --git a/inc/LocOpe_SequenceOfPntFace.hxx b/inc/LocOpe_SequenceOfPntFace.hxx
index fce61cc..311b852 100644
--- a/inc/LocOpe_SequenceOfPntFace.hxx
+++ b/inc/LocOpe_SequenceOfPntFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class LocOpe_SequenceNodeOfSequenceOfPntFace;
 class LocOpe_SequenceOfPntFace  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       LocOpe_SequenceOfPntFace();
diff --git a/inc/LocOpe_SplitDrafts.hxx b/inc/LocOpe_SplitDrafts.hxx
index bf15eea..39c1a79 100644
--- a/inc/LocOpe_SplitDrafts.hxx
+++ b/inc/LocOpe_SplitDrafts.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopTools_ListOfShape;
 class LocOpe_SplitDrafts  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
       LocOpe_SplitDrafts();
diff --git a/inc/LocOpe_SplitShape.hxx b/inc/LocOpe_SplitShape.hxx
index ee7ba0d..2edd352 100644
--- a/inc/LocOpe_SplitShape.hxx
+++ b/inc/LocOpe_SplitShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopTools_ListOfShape;
 class LocOpe_SplitShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
       LocOpe_SplitShape();
diff --git a/inc/LocOpe_Spliter.hxx b/inc/LocOpe_Spliter.hxx
index 96fe7b8..4c67050 100644
--- a/inc/LocOpe_Spliter.hxx
+++ b/inc/LocOpe_Spliter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopTools_ListOfShape;
 class LocOpe_Spliter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
       LocOpe_Spliter();
diff --git a/inc/LocOpe_WiresOnShape.hxx b/inc/LocOpe_WiresOnShape.hxx
index 926d841..0194148 100644
--- a/inc/LocOpe_WiresOnShape.hxx
+++ b/inc/LocOpe_WiresOnShape.hxx
@@ -25,12 +25,12 @@
 #ifndef _TopTools_MapOfShape_HeaderFile
 #include <TopTools_MapOfShape.hxx>
 #endif
-#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
-#include <TopTools_DataMapOfShapeShape.hxx>
-#endif
 #ifndef _Standard_Boolean_HeaderFile
 #include <Standard_Boolean.hxx>
 #endif
+#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
+#include <TopTools_DataMapOfShapeShape.hxx>
+#endif
 #ifndef _Standard_Integer_HeaderFile
 #include <Standard_Integer.hxx>
 #endif
@@ -57,6 +57,9 @@ public:
   Standard_EXPORT   LocOpe_WiresOnShape(const TopoDS_Shape& S);
   
   Standard_EXPORT     void Init(const TopoDS_Shape& S) ;
+  //! Set the flag of check internal intersections <br>
+//!          default value is True (to check) <br>
+        void SetCheckInterior(const Standard_Boolean ToCheckInterior) ;
   
   Standard_EXPORT     void Bind(const TopoDS_Wire& W,const TopoDS_Face& F) ;
   
@@ -111,6 +114,7 @@ private:
 TopoDS_Shape myShape;
 TopTools_IndexedDataMapOfShapeShape myMapEF;
 TopTools_MapOfShape myFacesWithSection;
+Standard_Boolean myCheckInterior;
 TopTools_DataMapOfShapeShape myMap;
 Standard_Boolean myDone;
 Standard_Integer myIndex;
diff --git a/inc/LocOpe_WiresOnShape.lxx b/inc/LocOpe_WiresOnShape.lxx
index f334fae..8b5cd54 100644
--- a/inc/LocOpe_WiresOnShape.lxx
+++ b/inc/LocOpe_WiresOnShape.lxx
@@ -21,6 +21,16 @@
 
 
 //=======================================================================
+//function : SetCheckInterior
+//purpose  : 
+//=======================================================================
+
+inline void LocOpe_WiresOnShape::SetCheckInterior(const Standard_Boolean ToCheckInterior)
+{
+  myCheckInterior = Standard_True;
+}
+
+//=======================================================================
 //function : IsDone
 //purpose  : 
 //=======================================================================
diff --git a/inc/LocalAnalysis.hxx b/inc/LocalAnalysis.hxx
index 7a58b65..cf4050b 100644
--- a/inc/LocalAnalysis.hxx
+++ b/inc/LocalAnalysis.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class LocalAnalysis_CurveContinuity;
 class LocalAnalysis  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! This fonction gives informations  about a  variable CurveContinuity <br>
diff --git a/inc/LocalAnalysis_CurveContinuity.hxx b/inc/LocalAnalysis_CurveContinuity.hxx
index 6e8f216..5014404 100644
--- a/inc/LocalAnalysis_CurveContinuity.hxx
+++ b/inc/LocalAnalysis_CurveContinuity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class GeomLProp_CLProps;
 class LocalAnalysis_CurveContinuity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! <br>
diff --git a/inc/LocalAnalysis_SurfaceContinuity.hxx b/inc/LocalAnalysis_SurfaceContinuity.hxx
index 539c3e1..3201f80 100644
--- a/inc/LocalAnalysis_SurfaceContinuity.hxx
+++ b/inc/LocalAnalysis_SurfaceContinuity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class GeomLProp_SLProps;
 class LocalAnalysis_SurfaceContinuity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!           -u1,v1 are  the parameters of the point on Surf1 <br>
diff --git a/inc/MAT2d_Array2OfConnexion.hxx b/inc/MAT2d_Array2OfConnexion.hxx
index ecbd86c..fe6561a 100644
--- a/inc/MAT2d_Array2OfConnexion.hxx
+++ b/inc/MAT2d_Array2OfConnexion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MAT2d_Connexion;
 class MAT2d_Array2OfConnexion  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_Array2OfConnexion(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/MAT2d_BiInt.hxx b/inc/MAT2d_BiInt.hxx
index 0ced04e..3e0c88e 100644
--- a/inc/MAT2d_BiInt.hxx
+++ b/inc/MAT2d_BiInt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class MAT2d_BiInt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_BiInt(const Standard_Integer I1,const Standard_Integer I2);
diff --git a/inc/MAT2d_CutCurve.hxx b/inc/MAT2d_CutCurve.hxx
index 06650c0..509ef35 100644
--- a/inc/MAT2d_CutCurve.hxx
+++ b/inc/MAT2d_CutCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Geom2d_TrimmedCurve;
 class MAT2d_CutCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_CutCurve();
diff --git a/inc/MAT2d_DataMapIteratorOfDataMapOfBiIntInteger.hxx b/inc/MAT2d_DataMapIteratorOfDataMapOfBiIntInteger.hxx
index 0f451c3..b734cf0 100644
--- a/inc/MAT2d_DataMapIteratorOfDataMapOfBiIntInteger.hxx
+++ b/inc/MAT2d_DataMapIteratorOfDataMapOfBiIntInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class MAT2d_DataMapNodeOfDataMapOfBiIntInteger;
 class MAT2d_DataMapIteratorOfDataMapOfBiIntInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapIteratorOfDataMapOfBiIntInteger();
diff --git a/inc/MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger.hxx b/inc/MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger.hxx
index ee61e45..85f6b7f 100644
--- a/inc/MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger.hxx
+++ b/inc/MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class MAT2d_DataMapNodeOfDataMapOfBiIntSequenceOfInteger;
 class MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger();
diff --git a/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerBisec.hxx b/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerBisec.hxx
index db5e133..b4da3e3 100644
--- a/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerBisec.hxx
+++ b/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerBisec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class MAT2d_DataMapNodeOfDataMapOfIntegerBisec;
 class MAT2d_DataMapIteratorOfDataMapOfIntegerBisec  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapIteratorOfDataMapOfIntegerBisec();
diff --git a/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerConnexion.hxx b/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerConnexion.hxx
index 3ae52f7..152f72c 100644
--- a/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerConnexion.hxx
+++ b/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerConnexion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MAT2d_DataMapNodeOfDataMapOfIntegerConnexion;
 class MAT2d_DataMapIteratorOfDataMapOfIntegerConnexion  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapIteratorOfDataMapOfIntegerConnexion();
diff --git a/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerPnt2d.hxx b/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerPnt2d.hxx
index 70eb089..0ab8db6 100644
--- a/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerPnt2d.hxx
+++ b/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class MAT2d_DataMapNodeOfDataMapOfIntegerPnt2d;
 class MAT2d_DataMapIteratorOfDataMapOfIntegerPnt2d  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapIteratorOfDataMapOfIntegerPnt2d();
diff --git a/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerSequenceOfConnexion.hxx b/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerSequenceOfConnexion.hxx
index 3c11a9b..f02abd8 100644
--- a/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerSequenceOfConnexion.hxx
+++ b/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerSequenceOfConnexion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class MAT2d_DataMapNodeOfDataMapOfIntegerSequenceOfConnexion;
 class MAT2d_DataMapIteratorOfDataMapOfIntegerSequenceOfConnexion  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapIteratorOfDataMapOfIntegerSequenceOfConnexion();
diff --git a/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerVec2d.hxx b/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerVec2d.hxx
index 2cc596d..7af1c19 100644
--- a/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerVec2d.hxx
+++ b/inc/MAT2d_DataMapIteratorOfDataMapOfIntegerVec2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class MAT2d_DataMapNodeOfDataMapOfIntegerVec2d;
 class MAT2d_DataMapIteratorOfDataMapOfIntegerVec2d  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapIteratorOfDataMapOfIntegerVec2d();
diff --git a/inc/MAT2d_DataMapOfBiIntInteger.hxx b/inc/MAT2d_DataMapOfBiIntInteger.hxx
index 2fde1e9..38e7b39 100644
--- a/inc/MAT2d_DataMapOfBiIntInteger.hxx
+++ b/inc/MAT2d_DataMapOfBiIntInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class MAT2d_DataMapIteratorOfDataMapOfBiIntInteger;
 class MAT2d_DataMapOfBiIntInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapOfBiIntInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MAT2d_DataMapOfBiIntSequenceOfInteger.hxx b/inc/MAT2d_DataMapOfBiIntSequenceOfInteger.hxx
index 159d478..ff5791c 100644
--- a/inc/MAT2d_DataMapOfBiIntSequenceOfInteger.hxx
+++ b/inc/MAT2d_DataMapOfBiIntSequenceOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger;
 class MAT2d_DataMapOfBiIntSequenceOfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapOfBiIntSequenceOfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MAT2d_DataMapOfIntegerBisec.hxx b/inc/MAT2d_DataMapOfIntegerBisec.hxx
index 9ecc806..c53e009 100644
--- a/inc/MAT2d_DataMapOfIntegerBisec.hxx
+++ b/inc/MAT2d_DataMapOfIntegerBisec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class MAT2d_DataMapIteratorOfDataMapOfIntegerBisec;
 class MAT2d_DataMapOfIntegerBisec  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapOfIntegerBisec(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MAT2d_DataMapOfIntegerConnexion.hxx b/inc/MAT2d_DataMapOfIntegerConnexion.hxx
index f95fdf8..919d476 100644
--- a/inc/MAT2d_DataMapOfIntegerConnexion.hxx
+++ b/inc/MAT2d_DataMapOfIntegerConnexion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class MAT2d_DataMapIteratorOfDataMapOfIntegerConnexion;
 class MAT2d_DataMapOfIntegerConnexion  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapOfIntegerConnexion(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MAT2d_DataMapOfIntegerPnt2d.hxx b/inc/MAT2d_DataMapOfIntegerPnt2d.hxx
index 71dc952..5f29907 100644
--- a/inc/MAT2d_DataMapOfIntegerPnt2d.hxx
+++ b/inc/MAT2d_DataMapOfIntegerPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class MAT2d_DataMapIteratorOfDataMapOfIntegerPnt2d;
 class MAT2d_DataMapOfIntegerPnt2d  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapOfIntegerPnt2d(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx b/inc/MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx
index 1079ccb..46b81d6 100644
--- a/inc/MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx
+++ b/inc/MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class MAT2d_DataMapIteratorOfDataMapOfIntegerSequenceOfConnexion;
 class MAT2d_DataMapOfIntegerSequenceOfConnexion  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapOfIntegerSequenceOfConnexion(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MAT2d_DataMapOfIntegerVec2d.hxx b/inc/MAT2d_DataMapOfIntegerVec2d.hxx
index 99aa8b1..6d22475 100644
--- a/inc/MAT2d_DataMapOfIntegerVec2d.hxx
+++ b/inc/MAT2d_DataMapOfIntegerVec2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class MAT2d_DataMapIteratorOfDataMapOfIntegerVec2d;
 class MAT2d_DataMapOfIntegerVec2d  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_DataMapOfIntegerVec2d(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MAT2d_MapBiIntHasher.hxx b/inc/MAT2d_MapBiIntHasher.hxx
index 31c59e3..e81e393 100644
--- a/inc/MAT2d_MapBiIntHasher.hxx
+++ b/inc/MAT2d_MapBiIntHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class MAT2d_BiInt;
 class MAT2d_MapBiIntHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static  Standard_Integer HashCode(const MAT2d_BiInt& Key1,const Standard_Integer Upper) ;
diff --git a/inc/MAT2d_Mat2d.hxx b/inc/MAT2d_Mat2d.hxx
index bc0ccb0..366e1a6 100644
--- a/inc/MAT2d_Mat2d.hxx
+++ b/inc/MAT2d_Mat2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class MAT_Bisector;
 class MAT2d_Mat2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_Mat2d();
diff --git a/inc/MAT2d_MiniPath.hxx b/inc/MAT2d_MiniPath.hxx
index dfbd3ca..8ba3876 100644
--- a/inc/MAT2d_MiniPath.hxx
+++ b/inc/MAT2d_MiniPath.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class MAT2d_Connexion;
 class MAT2d_MiniPath  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT2d_MiniPath();
diff --git a/inc/MAT2d_SequenceOfConnexion.hxx b/inc/MAT2d_SequenceOfConnexion.hxx
index 3ecf8c4..191f78c 100644
--- a/inc/MAT2d_SequenceOfConnexion.hxx
+++ b/inc/MAT2d_SequenceOfConnexion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class MAT2d_SequenceNodeOfSequenceOfConnexion;
 class MAT2d_SequenceOfConnexion  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       MAT2d_SequenceOfConnexion();
diff --git a/inc/MAT2d_SequenceOfSequenceOfCurve.hxx b/inc/MAT2d_SequenceOfSequenceOfCurve.hxx
index 6322651..af4c75e 100644
--- a/inc/MAT2d_SequenceOfSequenceOfCurve.hxx
+++ b/inc/MAT2d_SequenceOfSequenceOfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class MAT2d_SequenceNodeOfSequenceOfSequenceOfCurve;
 class MAT2d_SequenceOfSequenceOfCurve  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       MAT2d_SequenceOfSequenceOfCurve();
diff --git a/inc/MAT2d_SequenceOfSequenceOfGeometry.hxx b/inc/MAT2d_SequenceOfSequenceOfGeometry.hxx
index 72a7bb6..4dcd24b 100644
--- a/inc/MAT2d_SequenceOfSequenceOfGeometry.hxx
+++ b/inc/MAT2d_SequenceOfSequenceOfGeometry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class MAT2d_SequenceNodeOfSequenceOfSequenceOfGeometry;
 class MAT2d_SequenceOfSequenceOfGeometry  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       MAT2d_SequenceOfSequenceOfGeometry();
diff --git a/inc/MAT2d_SketchExplorer.hxx b/inc/MAT2d_SketchExplorer.hxx
index ada3e5b..66bb73c 100644
--- a/inc/MAT2d_SketchExplorer.hxx
+++ b/inc/MAT2d_SketchExplorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Geom2d_Curve;
 class MAT2d_SketchExplorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the number of contours in the figure. <br>
   Standard_EXPORT     Standard_Integer NumberOfContours() const;
diff --git a/inc/MAT2d_Tool2d.hxx b/inc/MAT2d_Tool2d.hxx
index d1fe0f4..56df45f 100644
--- a/inc/MAT2d_Tool2d.hxx
+++ b/inc/MAT2d_Tool2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class gp_Vec2d;
 class MAT2d_Tool2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty Constructor. <br>
   Standard_EXPORT   MAT2d_Tool2d();
diff --git a/inc/MAT_DataMapIteratorOfDataMapOfIntegerArc.hxx b/inc/MAT_DataMapIteratorOfDataMapOfIntegerArc.hxx
index c506e1a..2de9197 100644
--- a/inc/MAT_DataMapIteratorOfDataMapOfIntegerArc.hxx
+++ b/inc/MAT_DataMapIteratorOfDataMapOfIntegerArc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MAT_DataMapNodeOfDataMapOfIntegerArc;
 class MAT_DataMapIteratorOfDataMapOfIntegerArc  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT_DataMapIteratorOfDataMapOfIntegerArc();
diff --git a/inc/MAT_DataMapIteratorOfDataMapOfIntegerBasicElt.hxx b/inc/MAT_DataMapIteratorOfDataMapOfIntegerBasicElt.hxx
index 7a8e2c2..73fb046 100644
--- a/inc/MAT_DataMapIteratorOfDataMapOfIntegerBasicElt.hxx
+++ b/inc/MAT_DataMapIteratorOfDataMapOfIntegerBasicElt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MAT_DataMapNodeOfDataMapOfIntegerBasicElt;
 class MAT_DataMapIteratorOfDataMapOfIntegerBasicElt  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT_DataMapIteratorOfDataMapOfIntegerBasicElt();
diff --git a/inc/MAT_DataMapIteratorOfDataMapOfIntegerBisector.hxx b/inc/MAT_DataMapIteratorOfDataMapOfIntegerBisector.hxx
index 4a8ef43..4f59f56 100644
--- a/inc/MAT_DataMapIteratorOfDataMapOfIntegerBisector.hxx
+++ b/inc/MAT_DataMapIteratorOfDataMapOfIntegerBisector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MAT_DataMapNodeOfDataMapOfIntegerBisector;
 class MAT_DataMapIteratorOfDataMapOfIntegerBisector  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT_DataMapIteratorOfDataMapOfIntegerBisector();
diff --git a/inc/MAT_DataMapIteratorOfDataMapOfIntegerNode.hxx b/inc/MAT_DataMapIteratorOfDataMapOfIntegerNode.hxx
index 2372115..9f0c471 100644
--- a/inc/MAT_DataMapIteratorOfDataMapOfIntegerNode.hxx
+++ b/inc/MAT_DataMapIteratorOfDataMapOfIntegerNode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MAT_DataMapNodeOfDataMapOfIntegerNode;
 class MAT_DataMapIteratorOfDataMapOfIntegerNode  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT_DataMapIteratorOfDataMapOfIntegerNode();
diff --git a/inc/MAT_DataMapOfIntegerArc.hxx b/inc/MAT_DataMapOfIntegerArc.hxx
index 2eb6fe2..8e84721 100644
--- a/inc/MAT_DataMapOfIntegerArc.hxx
+++ b/inc/MAT_DataMapOfIntegerArc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class MAT_DataMapIteratorOfDataMapOfIntegerArc;
 class MAT_DataMapOfIntegerArc  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT_DataMapOfIntegerArc(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MAT_DataMapOfIntegerBasicElt.hxx b/inc/MAT_DataMapOfIntegerBasicElt.hxx
index f87d8f8..7d3217b 100644
--- a/inc/MAT_DataMapOfIntegerBasicElt.hxx
+++ b/inc/MAT_DataMapOfIntegerBasicElt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class MAT_DataMapIteratorOfDataMapOfIntegerBasicElt;
 class MAT_DataMapOfIntegerBasicElt  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT_DataMapOfIntegerBasicElt(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MAT_DataMapOfIntegerBisector.hxx b/inc/MAT_DataMapOfIntegerBisector.hxx
index df8eb6f..eff687a 100644
--- a/inc/MAT_DataMapOfIntegerBisector.hxx
+++ b/inc/MAT_DataMapOfIntegerBisector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class MAT_DataMapIteratorOfDataMapOfIntegerBisector;
 class MAT_DataMapOfIntegerBisector  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT_DataMapOfIntegerBisector(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MAT_DataMapOfIntegerNode.hxx b/inc/MAT_DataMapOfIntegerNode.hxx
index 2e091a3..107ffb3 100644
--- a/inc/MAT_DataMapOfIntegerNode.hxx
+++ b/inc/MAT_DataMapOfIntegerNode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class MAT_DataMapIteratorOfDataMapOfIntegerNode;
 class MAT_DataMapOfIntegerNode  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MAT_DataMapOfIntegerNode(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MAT_SequenceOfArc.hxx b/inc/MAT_SequenceOfArc.hxx
index 16f4f3d..47988e8 100644
--- a/inc/MAT_SequenceOfArc.hxx
+++ b/inc/MAT_SequenceOfArc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class MAT_SequenceNodeOfSequenceOfArc;
 class MAT_SequenceOfArc  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       MAT_SequenceOfArc();
diff --git a/inc/MAT_SequenceOfBasicElt.hxx b/inc/MAT_SequenceOfBasicElt.hxx
index e85ff31..4af4496 100644
--- a/inc/MAT_SequenceOfBasicElt.hxx
+++ b/inc/MAT_SequenceOfBasicElt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class MAT_SequenceNodeOfSequenceOfBasicElt;
 class MAT_SequenceOfBasicElt  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       MAT_SequenceOfBasicElt();
diff --git a/inc/MDF.hxx b/inc/MDF.hxx
index 71b048e..a1ac9d2 100644
--- a/inc/MDF.hxx
+++ b/inc/MDF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -119,18 +122,7 @@ class MDF_TypeDriverListMapOfARDriverTable;
 class MDF  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Translates a transient <aSource> into a persistent <br>
 //!          <aTarget>. <br>
diff --git a/inc/MDF_ARDriverSequence.hxx b/inc/MDF_ARDriverSequence.hxx
index a46beb3..b364fde 100644
--- a/inc/MDF_ARDriverSequence.hxx
+++ b/inc/MDF_ARDriverSequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class MDF_SequenceNodeOfARDriverSequence;
 class MDF_ARDriverSequence  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       MDF_ARDriverSequence();
diff --git a/inc/MDF_ASDriverSequence.hxx b/inc/MDF_ASDriverSequence.hxx
index abdaa9f..bdaed75 100644
--- a/inc/MDF_ASDriverSequence.hxx
+++ b/inc/MDF_ASDriverSequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class MDF_SequenceNodeOfASDriverSequence;
 class MDF_ASDriverSequence  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       MDF_ASDriverSequence();
diff --git a/inc/MDF_DataMapIteratorOfTypeARDriverMap.hxx b/inc/MDF_DataMapIteratorOfTypeARDriverMap.hxx
index 037fa36..8d78c0b 100644
--- a/inc/MDF_DataMapIteratorOfTypeARDriverMap.hxx
+++ b/inc/MDF_DataMapIteratorOfTypeARDriverMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class MDF_DataMapNodeOfTypeARDriverMap;
 class MDF_DataMapIteratorOfTypeARDriverMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MDF_DataMapIteratorOfTypeARDriverMap();
diff --git a/inc/MDF_DataMapIteratorOfTypeASDriverMap.hxx b/inc/MDF_DataMapIteratorOfTypeASDriverMap.hxx
index 8bba3a7..195ec83 100644
--- a/inc/MDF_DataMapIteratorOfTypeASDriverMap.hxx
+++ b/inc/MDF_DataMapIteratorOfTypeASDriverMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class MDF_DataMapNodeOfTypeASDriverMap;
 class MDF_DataMapIteratorOfTypeASDriverMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MDF_DataMapIteratorOfTypeASDriverMap();
diff --git a/inc/MDF_DataMapIteratorOfTypeDriverListMapOfARDriverTable.hxx b/inc/MDF_DataMapIteratorOfTypeDriverListMapOfARDriverTable.hxx
index cf5dbcb..e213611 100644
--- a/inc/MDF_DataMapIteratorOfTypeDriverListMapOfARDriverTable.hxx
+++ b/inc/MDF_DataMapIteratorOfTypeDriverListMapOfARDriverTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class MDF_DataMapNodeOfTypeDriverListMapOfARDriverTable;
 class MDF_DataMapIteratorOfTypeDriverListMapOfARDriverTable  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MDF_DataMapIteratorOfTypeDriverListMapOfARDriverTable();
diff --git a/inc/MDF_DataMapIteratorOfTypeDriverListMapOfASDriverTable.hxx b/inc/MDF_DataMapIteratorOfTypeDriverListMapOfASDriverTable.hxx
index 2a8c134..1e3183f 100644
--- a/inc/MDF_DataMapIteratorOfTypeDriverListMapOfASDriverTable.hxx
+++ b/inc/MDF_DataMapIteratorOfTypeDriverListMapOfASDriverTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class MDF_DataMapNodeOfTypeDriverListMapOfASDriverTable;
 class MDF_DataMapIteratorOfTypeDriverListMapOfASDriverTable  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MDF_DataMapIteratorOfTypeDriverListMapOfASDriverTable();
diff --git a/inc/MDF_DriverListOfARDriverTable.hxx b/inc/MDF_DriverListOfARDriverTable.hxx
index a8ae5ed..f36471b 100644
--- a/inc/MDF_DriverListOfARDriverTable.hxx
+++ b/inc/MDF_DriverListOfARDriverTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class MDF_ListNodeOfDriverListOfARDriverTable;
 class MDF_DriverListOfARDriverTable  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MDF_DriverListOfARDriverTable();
diff --git a/inc/MDF_DriverListOfASDriverTable.hxx b/inc/MDF_DriverListOfASDriverTable.hxx
index c6a22b1..6b8158c 100644
--- a/inc/MDF_DriverListOfASDriverTable.hxx
+++ b/inc/MDF_DriverListOfASDriverTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class MDF_ListNodeOfDriverListOfASDriverTable;
 class MDF_DriverListOfASDriverTable  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MDF_DriverListOfASDriverTable();
diff --git a/inc/MDF_ListIteratorOfDriverListOfARDriverTable.hxx b/inc/MDF_ListIteratorOfDriverListOfARDriverTable.hxx
index 3a2dc69..43e5660 100644
--- a/inc/MDF_ListIteratorOfDriverListOfARDriverTable.hxx
+++ b/inc/MDF_ListIteratorOfDriverListOfARDriverTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MDF_ListNodeOfDriverListOfARDriverTable;
 class MDF_ListIteratorOfDriverListOfARDriverTable  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MDF_ListIteratorOfDriverListOfARDriverTable();
diff --git a/inc/MDF_ListIteratorOfDriverListOfASDriverTable.hxx b/inc/MDF_ListIteratorOfDriverListOfASDriverTable.hxx
index 4b37a7d..75cfbe9 100644
--- a/inc/MDF_ListIteratorOfDriverListOfASDriverTable.hxx
+++ b/inc/MDF_ListIteratorOfDriverListOfASDriverTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MDF_ListNodeOfDriverListOfASDriverTable;
 class MDF_ListIteratorOfDriverListOfASDriverTable  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MDF_ListIteratorOfDriverListOfASDriverTable();
diff --git a/inc/MDF_Tool.hxx b/inc/MDF_Tool.hxx
index e8233e7..ec9d469 100644
--- a/inc/MDF_Tool.hxx
+++ b/inc/MDF_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class MDF_RRelocationTable;
 class MDF_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Writes the labels with empty attributes. <br>
   Standard_EXPORT   static  void WriteLabels(const Handle(TDF_Data)& aSource,const Handle(PDF_Data)& aTarget,const MDF_TypeASDriverMap& aDriverMap,const Handle(MDF_SRelocationTable)& aReloc) ;
diff --git a/inc/MDF_TypeARDriverMap.hxx b/inc/MDF_TypeARDriverMap.hxx
index cdb2efd..38acf56 100644
--- a/inc/MDF_TypeARDriverMap.hxx
+++ b/inc/MDF_TypeARDriverMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class MDF_DataMapIteratorOfTypeARDriverMap;
 class MDF_TypeARDriverMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MDF_TypeARDriverMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MDF_TypeASDriverMap.hxx b/inc/MDF_TypeASDriverMap.hxx
index ee1d763..f9b8c39 100644
--- a/inc/MDF_TypeASDriverMap.hxx
+++ b/inc/MDF_TypeASDriverMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class MDF_DataMapIteratorOfTypeASDriverMap;
 class MDF_TypeASDriverMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MDF_TypeASDriverMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MDF_TypeDriverListMapOfARDriverTable.hxx b/inc/MDF_TypeDriverListMapOfARDriverTable.hxx
index 7efdb74..dd988cd 100644
--- a/inc/MDF_TypeDriverListMapOfARDriverTable.hxx
+++ b/inc/MDF_TypeDriverListMapOfARDriverTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class MDF_DataMapIteratorOfTypeDriverListMapOfARDriverTable;
 class MDF_TypeDriverListMapOfARDriverTable  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MDF_TypeDriverListMapOfARDriverTable(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MDF_TypeDriverListMapOfASDriverTable.hxx b/inc/MDF_TypeDriverListMapOfASDriverTable.hxx
index 9048a48..e310f3d 100644
--- a/inc/MDF_TypeDriverListMapOfASDriverTable.hxx
+++ b/inc/MDF_TypeDriverListMapOfASDriverTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class MDF_DataMapIteratorOfTypeDriverListMapOfASDriverTable;
 class MDF_TypeDriverListMapOfASDriverTable  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MDF_TypeDriverListMapOfASDriverTable(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MDataStd.hxx b/inc/MDataStd.hxx
index 81703b0..02a8122 100644
--- a/inc/MDataStd.hxx
+++ b/inc/MDataStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -97,18 +100,7 @@ class MDataStd_IntPackedMapRetrievalDriver_1;
 class MDataStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute storage drivers to <aDriverSeq>. <br>
   Standard_EXPORT   static  void AddStorageDrivers(const Handle(MDF_ASDriverHSequence)& aDriverSeq,const Handle(CDM_MessageDriver)& theMessageDriver) ;
diff --git a/inc/MDataXtd.hxx b/inc/MDataXtd.hxx
index 194dc7f..eafd41a 100644
--- a/inc/MDataXtd.hxx
+++ b/inc/MDataXtd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class MDataXtd_PatternStdRetrievalDriver;
 class MDataXtd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute storage drivers to <aDriverSeq>. <br>
   Standard_EXPORT   static  void AddStorageDrivers(const Handle(MDF_ASDriverHSequence)& aDriverSeq,const Handle(CDM_MessageDriver)& theMessageDriver) ;
diff --git a/inc/MDocStd.hxx b/inc/MDocStd.hxx
index 66f2bd7..a8f4fa7 100644
--- a/inc/MDocStd.hxx
+++ b/inc/MDocStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class MDocStd_XLinkRetrievalDriver;
 class MDocStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute storage driver(s) to <aDriverSeq>. <br>
   Standard_EXPORT   static  void AddStorageDrivers(const Handle(MDF_ASDriverHSequence)& aDriverSeq,const Handle(CDM_MessageDriver)& theMessageDriver) ;
diff --git a/inc/MFT.hxx b/inc/MFT.hxx
index d88cfd7..446d921 100644
--- a/inc/MFT.hxx
+++ b/inc/MFT.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class MFT_SequenceNodeOfListOfFontHandle;
 class MFT  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
 
 
diff --git a/inc/MFT_ListOfFontHandle.hxx b/inc/MFT_ListOfFontHandle.hxx
index abff3f7..ac09c2f 100644
--- a/inc/MFT_ListOfFontHandle.hxx
+++ b/inc/MFT_ListOfFontHandle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class MFT_SequenceNodeOfListOfFontHandle;
 class MFT_ListOfFontHandle  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       MFT_ListOfFontHandle();
diff --git a/inc/MFunction.hxx b/inc/MFunction.hxx
index 0ef6488..58e2409 100644
--- a/inc/MFunction.hxx
+++ b/inc/MFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class MFunction_FunctionRetrievalDriver;
 class MFunction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the function storage driver to <aDriverSeq>. <br>
   Standard_EXPORT   static  void AddStorageDrivers(const Handle(MDF_ASDriverHSequence)& aDriverSeq,const Handle(CDM_MessageDriver)& theMessageDriver) ;
diff --git a/inc/MMgt_StackManager.hxx b/inc/MMgt_StackManager.hxx
index f7f875a..6c715d9 100644
--- a/inc/MMgt_StackManager.hxx
+++ b/inc/MMgt_StackManager.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Standard_ProgramError;
 class MMgt_StackManager  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!   Constructs a StackManager with an empty free stack. <br>
diff --git a/inc/MNaming.hxx b/inc/MNaming.hxx
index 77d4a96..f2576c4 100644
--- a/inc/MNaming.hxx
+++ b/inc/MNaming.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MNaming_NamingStorageDriver;
 class MNaming  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute storage drivers to <aDriverSeq>. <br>
   Standard_EXPORT   static  void AddStorageDrivers(const Handle(MDF_ASDriverHSequence)& aDriverSeq,const Handle(CDM_MessageDriver)& theMessageDriver) ;
diff --git a/inc/MPrsStd.hxx b/inc/MPrsStd.hxx
index d103ac4..735a417 100644
--- a/inc/MPrsStd.hxx
+++ b/inc/MPrsStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class MPrsStd_PositionRetrievalDriver;
 class MPrsStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute storage drivers to <aDriverTable>. <br>
   Standard_EXPORT   static  void AddStorageDrivers(const Handle(MDF_ASDriverHSequence)& aDriverTable,const Handle(CDM_MessageDriver)& theMessageDriver) ;
diff --git a/inc/MXCAFDoc.hxx b/inc/MXCAFDoc.hxx
index 7add6ca..dd73586 100644
--- a/inc/MXCAFDoc.hxx
+++ b/inc/MXCAFDoc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class MXCAFDoc_MaterialToolStorageDriver;
 class MXCAFDoc  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute storage drivers to <aDriverSeq>. <br>
   Standard_EXPORT   static  void AddStorageDrivers(const Handle(MDF_ASDriverHSequence)& aDriverSeq,const Handle(CDM_MessageDriver)& theMsgDriver) ;
diff --git a/inc/Materials.hxx b/inc/Materials.hxx
index 0fc6c2b..8c650bc 100644
--- a/inc/Materials.hxx
+++ b/inc/Materials.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class Materials_SequenceNodeOfMtsSequence;
 class Materials  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Sets the  location and the name  of the  file defining <br>
 //!          the definition of a material, in term of properties. <br>
diff --git a/inc/Materials_MtsSequence.hxx b/inc/Materials_MtsSequence.hxx
index 5a31d1f..707f683 100644
--- a/inc/Materials_MtsSequence.hxx
+++ b/inc/Materials_MtsSequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Materials_SequenceNodeOfMtsSequence;
 class Materials_MtsSequence  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Materials_MtsSequence();
diff --git a/inc/MeshTest.hxx b/inc/MeshTest.hxx
index 2168c4c..6f28eb5 100644
--- a/inc/MeshTest.hxx
+++ b/inc/MeshTest.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -21,18 +24,7 @@ class MeshTest_DrawableMesh;
 class MeshTest  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines meshing commands <br>
   Standard_EXPORT   static  void Commands(Draw_Interpretor& DI) ;
diff --git a/inc/MeshVS_Array1OfSequenceOfInteger.hxx b/inc/MeshVS_Array1OfSequenceOfInteger.hxx
index a5c8321..f8a66bb 100644
--- a/inc/MeshVS_Array1OfSequenceOfInteger.hxx
+++ b/inc/MeshVS_Array1OfSequenceOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColStd_SequenceOfInteger;
 class MeshVS_Array1OfSequenceOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_Array1OfSequenceOfInteger(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/MeshVS_ColorHasher.hxx b/inc/MeshVS_ColorHasher.hxx
index 18b9119..6e1f7cd 100644
--- a/inc/MeshVS_ColorHasher.hxx
+++ b/inc/MeshVS_ColorHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Quantity_Color;
 class MeshVS_ColorHasher  : public TColStd_MapIntegerHasher {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const Quantity_Color& K,const Standard_Integer Upper) ;
diff --git a/inc/MeshVS_DataMapIteratorOfDataMapOfColorMapOfInteger.hxx b/inc/MeshVS_DataMapIteratorOfDataMapOfColorMapOfInteger.hxx
index 4a0ade0..b51d122 100644
--- a/inc/MeshVS_DataMapIteratorOfDataMapOfColorMapOfInteger.hxx
+++ b/inc/MeshVS_DataMapIteratorOfDataMapOfColorMapOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class MeshVS_DataMapNodeOfDataMapOfColorMapOfInteger;
 class MeshVS_DataMapIteratorOfDataMapOfColorMapOfInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapIteratorOfDataMapOfColorMapOfInteger();
diff --git a/inc/MeshVS_DataMapIteratorOfDataMapOfHArray1OfSequenceOfInteger.hxx b/inc/MeshVS_DataMapIteratorOfDataMapOfHArray1OfSequenceOfInteger.hxx
index dd46265..407b306 100644
--- a/inc/MeshVS_DataMapIteratorOfDataMapOfHArray1OfSequenceOfInteger.hxx
+++ b/inc/MeshVS_DataMapIteratorOfDataMapOfHArray1OfSequenceOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MeshVS_DataMapNodeOfDataMapOfHArray1OfSequenceOfInteger;
 class MeshVS_DataMapIteratorOfDataMapOfHArray1OfSequenceOfInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapIteratorOfDataMapOfHArray1OfSequenceOfInteger();
diff --git a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerAsciiString.hxx b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerAsciiString.hxx
index 87f369f..e2ebf15 100644
--- a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerAsciiString.hxx
+++ b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class MeshVS_DataMapNodeOfDataMapOfIntegerAsciiString;
 class MeshVS_DataMapIteratorOfDataMapOfIntegerAsciiString  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapIteratorOfDataMapOfIntegerAsciiString();
diff --git a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerBoolean.hxx b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerBoolean.hxx
index be983e2..2016290 100644
--- a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerBoolean.hxx
+++ b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerBoolean.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class MeshVS_DataMapNodeOfDataMapOfIntegerBoolean;
 class MeshVS_DataMapIteratorOfDataMapOfIntegerBoolean  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapIteratorOfDataMapOfIntegerBoolean();
diff --git a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerColor.hxx b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerColor.hxx
index 71bab47..04416bc 100644
--- a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerColor.hxx
+++ b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerColor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class MeshVS_DataMapNodeOfDataMapOfIntegerColor;
 class MeshVS_DataMapIteratorOfDataMapOfIntegerColor  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapIteratorOfDataMapOfIntegerColor();
diff --git a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerMaterial.hxx b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerMaterial.hxx
index 67016db..5cce162 100644
--- a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerMaterial.hxx
+++ b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerMaterial.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class MeshVS_DataMapNodeOfDataMapOfIntegerMaterial;
 class MeshVS_DataMapIteratorOfDataMapOfIntegerMaterial  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapIteratorOfDataMapOfIntegerMaterial();
diff --git a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerMeshEntityOwner.hxx b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerMeshEntityOwner.hxx
index 9ff5fea..dc746e4 100644
--- a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerMeshEntityOwner.hxx
+++ b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerMeshEntityOwner.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MeshVS_DataMapNodeOfDataMapOfIntegerMeshEntityOwner;
 class MeshVS_DataMapIteratorOfDataMapOfIntegerMeshEntityOwner  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapIteratorOfDataMapOfIntegerMeshEntityOwner();
diff --git a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerOwner.hxx b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerOwner.hxx
index fd9be31..8eb706e 100644
--- a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerOwner.hxx
+++ b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerOwner.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MeshVS_DataMapNodeOfDataMapOfIntegerOwner;
 class MeshVS_DataMapIteratorOfDataMapOfIntegerOwner  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapIteratorOfDataMapOfIntegerOwner();
diff --git a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerTwoColors.hxx b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerTwoColors.hxx
index 225a751..dc31df1 100644
--- a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerTwoColors.hxx
+++ b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerTwoColors.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class MeshVS_DataMapNodeOfDataMapOfIntegerTwoColors;
 class MeshVS_DataMapIteratorOfDataMapOfIntegerTwoColors  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapIteratorOfDataMapOfIntegerTwoColors();
diff --git a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerVector.hxx b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerVector.hxx
index de5f107..e35af35 100644
--- a/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerVector.hxx
+++ b/inc/MeshVS_DataMapIteratorOfDataMapOfIntegerVector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class MeshVS_DataMapNodeOfDataMapOfIntegerVector;
 class MeshVS_DataMapIteratorOfDataMapOfIntegerVector  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapIteratorOfDataMapOfIntegerVector();
diff --git a/inc/MeshVS_DataMapIteratorOfDataMapOfTwoColorsMapOfInteger.hxx b/inc/MeshVS_DataMapIteratorOfDataMapOfTwoColorsMapOfInteger.hxx
index 10597bd..7d61941 100644
--- a/inc/MeshVS_DataMapIteratorOfDataMapOfTwoColorsMapOfInteger.hxx
+++ b/inc/MeshVS_DataMapIteratorOfDataMapOfTwoColorsMapOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class MeshVS_DataMapNodeOfDataMapOfTwoColorsMapOfInteger;
 class MeshVS_DataMapIteratorOfDataMapOfTwoColorsMapOfInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapIteratorOfDataMapOfTwoColorsMapOfInteger();
diff --git a/inc/MeshVS_DataMapOfColorMapOfInteger.hxx b/inc/MeshVS_DataMapOfColorMapOfInteger.hxx
index c2db9f8..29d10ad 100644
--- a/inc/MeshVS_DataMapOfColorMapOfInteger.hxx
+++ b/inc/MeshVS_DataMapOfColorMapOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class MeshVS_DataMapIteratorOfDataMapOfColorMapOfInteger;
 class MeshVS_DataMapOfColorMapOfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapOfColorMapOfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MeshVS_DataMapOfHArray1OfSequenceOfInteger.hxx b/inc/MeshVS_DataMapOfHArray1OfSequenceOfInteger.hxx
index f9ac857..0a5ad7e 100644
--- a/inc/MeshVS_DataMapOfHArray1OfSequenceOfInteger.hxx
+++ b/inc/MeshVS_DataMapOfHArray1OfSequenceOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class MeshVS_DataMapIteratorOfDataMapOfHArray1OfSequenceOfInteger;
 class MeshVS_DataMapOfHArray1OfSequenceOfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapOfHArray1OfSequenceOfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MeshVS_DataMapOfIntegerAsciiString.hxx b/inc/MeshVS_DataMapOfIntegerAsciiString.hxx
index eeeeac1..a0e4038 100644
--- a/inc/MeshVS_DataMapOfIntegerAsciiString.hxx
+++ b/inc/MeshVS_DataMapOfIntegerAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class MeshVS_DataMapIteratorOfDataMapOfIntegerAsciiString;
 class MeshVS_DataMapOfIntegerAsciiString  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapOfIntegerAsciiString(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MeshVS_DataMapOfIntegerBoolean.hxx b/inc/MeshVS_DataMapOfIntegerBoolean.hxx
index ea81e2c..331fc80 100644
--- a/inc/MeshVS_DataMapOfIntegerBoolean.hxx
+++ b/inc/MeshVS_DataMapOfIntegerBoolean.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class MeshVS_DataMapIteratorOfDataMapOfIntegerBoolean;
 class MeshVS_DataMapOfIntegerBoolean  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapOfIntegerBoolean(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MeshVS_DataMapOfIntegerColor.hxx b/inc/MeshVS_DataMapOfIntegerColor.hxx
index 3a10dfa..b6abb06 100644
--- a/inc/MeshVS_DataMapOfIntegerColor.hxx
+++ b/inc/MeshVS_DataMapOfIntegerColor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class MeshVS_DataMapIteratorOfDataMapOfIntegerColor;
 class MeshVS_DataMapOfIntegerColor  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapOfIntegerColor(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MeshVS_DataMapOfIntegerMaterial.hxx b/inc/MeshVS_DataMapOfIntegerMaterial.hxx
index 181fab6..031ef7c 100644
--- a/inc/MeshVS_DataMapOfIntegerMaterial.hxx
+++ b/inc/MeshVS_DataMapOfIntegerMaterial.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class MeshVS_DataMapIteratorOfDataMapOfIntegerMaterial;
 class MeshVS_DataMapOfIntegerMaterial  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapOfIntegerMaterial(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MeshVS_DataMapOfIntegerMeshEntityOwner.hxx b/inc/MeshVS_DataMapOfIntegerMeshEntityOwner.hxx
index ee181c5..45082f4 100644
--- a/inc/MeshVS_DataMapOfIntegerMeshEntityOwner.hxx
+++ b/inc/MeshVS_DataMapOfIntegerMeshEntityOwner.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class MeshVS_DataMapIteratorOfDataMapOfIntegerMeshEntityOwner;
 class MeshVS_DataMapOfIntegerMeshEntityOwner  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapOfIntegerMeshEntityOwner(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MeshVS_DataMapOfIntegerOwner.hxx b/inc/MeshVS_DataMapOfIntegerOwner.hxx
index 8fe8e00..c5ac775 100644
--- a/inc/MeshVS_DataMapOfIntegerOwner.hxx
+++ b/inc/MeshVS_DataMapOfIntegerOwner.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class MeshVS_DataMapIteratorOfDataMapOfIntegerOwner;
 class MeshVS_DataMapOfIntegerOwner  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapOfIntegerOwner(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MeshVS_DataMapOfIntegerTwoColors.hxx b/inc/MeshVS_DataMapOfIntegerTwoColors.hxx
index 343f127..182e24f 100644
--- a/inc/MeshVS_DataMapOfIntegerTwoColors.hxx
+++ b/inc/MeshVS_DataMapOfIntegerTwoColors.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class MeshVS_DataMapIteratorOfDataMapOfIntegerTwoColors;
 class MeshVS_DataMapOfIntegerTwoColors  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapOfIntegerTwoColors(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MeshVS_DataMapOfIntegerVector.hxx b/inc/MeshVS_DataMapOfIntegerVector.hxx
index 4065dc2..9346daa 100644
--- a/inc/MeshVS_DataMapOfIntegerVector.hxx
+++ b/inc/MeshVS_DataMapOfIntegerVector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class MeshVS_DataMapIteratorOfDataMapOfIntegerVector;
 class MeshVS_DataMapOfIntegerVector  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapOfIntegerVector(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MeshVS_DataMapOfTwoColorsMapOfInteger.hxx b/inc/MeshVS_DataMapOfTwoColorsMapOfInteger.hxx
index 5c74568..cc240fd 100644
--- a/inc/MeshVS_DataMapOfTwoColorsMapOfInteger.hxx
+++ b/inc/MeshVS_DataMapOfTwoColorsMapOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class MeshVS_DataMapIteratorOfDataMapOfTwoColorsMapOfInteger;
 class MeshVS_DataMapOfTwoColorsMapOfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_DataMapOfTwoColorsMapOfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MeshVS_MapIteratorOfMapOfTwoNodes.hxx b/inc/MeshVS_MapIteratorOfMapOfTwoNodes.hxx
index 54e1d31..c60460a 100644
--- a/inc/MeshVS_MapIteratorOfMapOfTwoNodes.hxx
+++ b/inc/MeshVS_MapIteratorOfMapOfTwoNodes.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class MeshVS_StdMapNodeOfMapOfTwoNodes;
 class MeshVS_MapIteratorOfMapOfTwoNodes  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_MapIteratorOfMapOfTwoNodes();
diff --git a/inc/MeshVS_MapOfTwoNodes.hxx b/inc/MeshVS_MapOfTwoNodes.hxx
index e126d5c..ca2a54c 100644
--- a/inc/MeshVS_MapOfTwoNodes.hxx
+++ b/inc/MeshVS_MapOfTwoNodes.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class MeshVS_MapIteratorOfMapOfTwoNodes;
 class MeshVS_MapOfTwoNodes  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MeshVS_MapOfTwoNodes(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MeshVS_SequenceOfPrsBuilder.hxx b/inc/MeshVS_SequenceOfPrsBuilder.hxx
index 2f5e91c..b6ad787 100644
--- a/inc/MeshVS_SequenceOfPrsBuilder.hxx
+++ b/inc/MeshVS_SequenceOfPrsBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class MeshVS_SequenceNodeOfSequenceOfPrsBuilder;
 class MeshVS_SequenceOfPrsBuilder  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       MeshVS_SequenceOfPrsBuilder();
diff --git a/inc/MeshVS_Tool.hxx b/inc/MeshVS_Tool.hxx
index 0e32bab..9e80761 100644
--- a/inc/MeshVS_Tool.hxx
+++ b/inc/MeshVS_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class gp_Vec;
 class MeshVS_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates fill area aspect with values from Drawer according to keys from DrawerAttribute <br>
   Standard_EXPORT   static  Handle_Graphic3d_AspectFillArea3d CreateAspectFillArea3d(const Handle(MeshVS_Drawer)& theDr,const Standard_Boolean UseDefaults = Standard_True) ;
diff --git a/inc/MeshVS_TwoColorsHasher.hxx b/inc/MeshVS_TwoColorsHasher.hxx
index 6c6d56e..768235c 100644
--- a/inc/MeshVS_TwoColorsHasher.hxx
+++ b/inc/MeshVS_TwoColorsHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class MeshVS_TwoColorsHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const MeshVS_TwoColors& K,const Standard_Integer Upper) ;
diff --git a/inc/MeshVS_TwoNodesHasher.hxx b/inc/MeshVS_TwoNodesHasher.hxx
index 209be53..c565fff 100644
--- a/inc/MeshVS_TwoNodesHasher.hxx
+++ b/inc/MeshVS_TwoNodesHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class MeshVS_TwoNodesHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const MeshVS_TwoNodes& K,const Standard_Integer Upper) ;
diff --git a/inc/Message.hxx b/inc/Message.hxx
index 8a4a0a5..6db8bc5 100644
--- a/inc/Message.hxx
+++ b/inc/Message.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class Message_SequenceNodeOfSequenceOfProgressScale;
 class Message  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines default messenger for OCCT applications. <br>
 //!          This is global static instance of the messenger. <br>
diff --git a/inc/Message_ListIteratorOfListOfMsg.hxx b/inc/Message_ListIteratorOfListOfMsg.hxx
index fd185ef..5e55dff 100644
--- a/inc/Message_ListIteratorOfListOfMsg.hxx
+++ b/inc/Message_ListIteratorOfListOfMsg.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Message_ListNodeOfListOfMsg;
 class Message_ListIteratorOfListOfMsg  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Message_ListIteratorOfListOfMsg();
diff --git a/inc/Message_ListOfMsg.hxx b/inc/Message_ListOfMsg.hxx
index 41a5c3a..8db5a09 100644
--- a/inc/Message_ListOfMsg.hxx
+++ b/inc/Message_ListOfMsg.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Message_ListNodeOfListOfMsg;
 class Message_ListOfMsg  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Message_ListOfMsg();
diff --git a/inc/Message_Msg.hxx b/inc/Message_Msg.hxx
index 2f9553f..7b0be32 100644
--- a/inc/Message_Msg.hxx
+++ b/inc/Message_Msg.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class TCollection_HExtendedString;
 class Message_Msg  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   Message_Msg();
diff --git a/inc/Message_MsgFile.hxx b/inc/Message_MsgFile.hxx
index 6316dbb..f56020c 100644
--- a/inc/Message_MsgFile.hxx
+++ b/inc/Message_MsgFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class TCollection_ExtendedString;
 class Message_MsgFile  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Load message file <theFileName> from directory <theDirName> <br>
 //!          or its sub-directory <br>
diff --git a/inc/Message_ProgressScale.hxx b/inc/Message_ProgressScale.hxx
index 2b717ab..de67963 100644
--- a/inc/Message_ProgressScale.hxx
+++ b/inc/Message_ProgressScale.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TCollection_HAsciiString;
 class Message_ProgressScale  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates scale ranged from 0 to 100 with step 1 <br>
   Standard_EXPORT   Message_ProgressScale();
diff --git a/inc/Message_ProgressSentry.hxx b/inc/Message_ProgressSentry.hxx
index 4c9e5f9..68794ad 100644
--- a/inc/Message_ProgressSentry.hxx
+++ b/inc/Message_ProgressSentry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TCollection_HAsciiString;
 class Message_ProgressSentry  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Message_ProgressSentry(const Handle(Message_ProgressIndicator)& PI,const Standard_CString name,const Standard_Real min,const Standard_Real max,const Standard_Real step,const Standard_Boolean isInf = Standard_False,const Standard_Real newScopeSpan = 0.0);
diff --git a/inc/Message_SequenceOfPrinters.hxx b/inc/Message_SequenceOfPrinters.hxx
index 7135c94..57a52c3 100644
--- a/inc/Message_SequenceOfPrinters.hxx
+++ b/inc/Message_SequenceOfPrinters.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Message_SequenceNodeOfSequenceOfPrinters;
 class Message_SequenceOfPrinters  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Message_SequenceOfPrinters();
diff --git a/inc/Message_SequenceOfProgressScale.hxx b/inc/Message_SequenceOfProgressScale.hxx
index 1c249d0..d2eaf16 100644
--- a/inc/Message_SequenceOfProgressScale.hxx
+++ b/inc/Message_SequenceOfProgressScale.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Message_SequenceNodeOfSequenceOfProgressScale;
 class Message_SequenceOfProgressScale  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Message_SequenceOfProgressScale();
diff --git a/inc/MgtBRep.hxx b/inc/MgtBRep.hxx
index 7c60c55..c2fa2bd 100644
--- a/inc/MgtBRep.hxx
+++ b/inc/MgtBRep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class MgtBRep_TranslateTool1;
 class MgtBRep  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Translate a transient Shape to a persistent Shape. <br>
 //!         he translation is performed according <br>
diff --git a/inc/MgtGeom.hxx b/inc/MgtGeom.hxx
index a303918..d2ff307 100644
--- a/inc/MgtGeom.hxx
+++ b/inc/MgtGeom.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -259,18 +262,7 @@ class PGeom_VectorWithMagnitude;
 class MgtGeom  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Translate <PObj> to its Transient equivalent from Geom. <br>
   Standard_EXPORT   static  Handle_Geom_Axis1Placement Translate(const Handle(PGeom_Axis1Placement)& PObj) ;
diff --git a/inc/MgtGeom2d.hxx b/inc/MgtGeom2d.hxx
index 9c570b6..2d24922 100644
--- a/inc/MgtGeom2d.hxx
+++ b/inc/MgtGeom2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -155,18 +158,7 @@ class PGeom2d_VectorWithMagnitude;
 class MgtGeom2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Translate <PObj> to its Transient equivalent from Geom2d. <br>
   Standard_EXPORT   static  Handle_Geom2d_AxisPlacement Translate(const Handle(PGeom2d_AxisPlacement)& PObj) ;
diff --git a/inc/MgtPoly.hxx b/inc/MgtPoly.hxx
index 480102b..227cdf9 100644
--- a/inc/MgtPoly.hxx
+++ b/inc/MgtPoly.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class PPoly_PolygonOnTriangulation;
 class MgtPoly  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! translates Transient -> Persistent <br>
   Standard_EXPORT   static  Poly_Triangle Translate(const PPoly_Triangle& POjb) ;
diff --git a/inc/MgtTopLoc.hxx b/inc/MgtTopLoc.hxx
index b9aecd3..2ded873 100644
--- a/inc/MgtTopLoc.hxx
+++ b/inc/MgtTopLoc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class TopLoc_Location;
 class MgtTopLoc  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Translate a  transient   Datum3D to  a  persistant <br>
 //!          Datum3D. <br>
diff --git a/inc/MgtTopoDS.hxx b/inc/MgtTopoDS.hxx
index e3f95af..94c09f5 100644
--- a/inc/MgtTopoDS.hxx
+++ b/inc/MgtTopoDS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -72,18 +75,7 @@ class MgtTopoDS_TranslateTool1;
 class MgtTopoDS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Translates a Transient Shape onto a Persistent Shape <br>
   Standard_EXPORT   static  Handle_PTopoDS_HShape Translate(const TopoDS_Shape& S,const Handle(MgtTopoDS_TranslateTool)& T,PTColStd_TransientPersistentMap& M) ;
diff --git a/inc/MoniTool_AttrList.hxx b/inc/MoniTool_AttrList.hxx
index 19acda8..bf143bf 100644
--- a/inc/MoniTool_AttrList.hxx
+++ b/inc/MoniTool_AttrList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class Standard_Type;
 class MoniTool_AttrList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an AttrList, empty <br>
   Standard_EXPORT   MoniTool_AttrList();
diff --git a/inc/MoniTool_DataInfo.hxx b/inc/MoniTool_DataInfo.hxx
index 32fc734..f6b99dd 100644
--- a/inc/MoniTool_DataInfo.hxx
+++ b/inc/MoniTool_DataInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Standard_Transient;
 class MoniTool_DataInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the Type attached to an object <br>
 //!           Here, the Dynamic Type of a Transient. Null Type if unknown <br>
diff --git a/inc/MoniTool_DataMapIteratorOfDataMapOfShapeTransient.hxx b/inc/MoniTool_DataMapIteratorOfDataMapOfShapeTransient.hxx
index 00cfc1c..8aaa83b 100644
--- a/inc/MoniTool_DataMapIteratorOfDataMapOfShapeTransient.hxx
+++ b/inc/MoniTool_DataMapIteratorOfDataMapOfShapeTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class MoniTool_DataMapNodeOfDataMapOfShapeTransient;
 class MoniTool_DataMapIteratorOfDataMapOfShapeTransient  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MoniTool_DataMapIteratorOfDataMapOfShapeTransient();
diff --git a/inc/MoniTool_DataMapIteratorOfDataMapOfTimer.hxx b/inc/MoniTool_DataMapIteratorOfDataMapOfTimer.hxx
index b37de58..5ea569b 100644
--- a/inc/MoniTool_DataMapIteratorOfDataMapOfTimer.hxx
+++ b/inc/MoniTool_DataMapIteratorOfDataMapOfTimer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MoniTool_DataMapNodeOfDataMapOfTimer;
 class MoniTool_DataMapIteratorOfDataMapOfTimer  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MoniTool_DataMapIteratorOfDataMapOfTimer();
diff --git a/inc/MoniTool_DataMapOfShapeTransient.hxx b/inc/MoniTool_DataMapOfShapeTransient.hxx
index 0a3cb7f..992ef59 100644
--- a/inc/MoniTool_DataMapOfShapeTransient.hxx
+++ b/inc/MoniTool_DataMapOfShapeTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class MoniTool_DataMapIteratorOfDataMapOfShapeTransient;
 class MoniTool_DataMapOfShapeTransient  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MoniTool_DataMapOfShapeTransient(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MoniTool_DataMapOfTimer.hxx b/inc/MoniTool_DataMapOfTimer.hxx
index 78af780..59fab70 100644
--- a/inc/MoniTool_DataMapOfTimer.hxx
+++ b/inc/MoniTool_DataMapOfTimer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class MoniTool_DataMapIteratorOfDataMapOfTimer;
 class MoniTool_DataMapOfTimer  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MoniTool_DataMapOfTimer(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MoniTool_ElemHasher.hxx b/inc/MoniTool_ElemHasher.hxx
index 55b8d3e..52ffdfa 100644
--- a/inc/MoniTool_ElemHasher.hxx
+++ b/inc/MoniTool_ElemHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class MoniTool_Element;
 class MoniTool_ElemHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HashCode in the range <0,Upper> for a Element : <br>
 //!           asks the Element its HashCode then transforms it to be in the <br>
diff --git a/inc/MoniTool_IndexedDataMapOfShapeTransient.hxx b/inc/MoniTool_IndexedDataMapOfShapeTransient.hxx
index 4505708..514669e 100644
--- a/inc/MoniTool_IndexedDataMapOfShapeTransient.hxx
+++ b/inc/MoniTool_IndexedDataMapOfShapeTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class MoniTool_IndexedDataMapNodeOfIndexedDataMapOfShapeTransient;
 class MoniTool_IndexedDataMapOfShapeTransient  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   MoniTool_IndexedDataMapOfShapeTransient(const Standard_Integer NbBuckets = 1);
diff --git a/inc/MoniTool_MTHasher.hxx b/inc/MoniTool_MTHasher.hxx
index 13684a9..e9dd891 100644
--- a/inc/MoniTool_MTHasher.hxx
+++ b/inc/MoniTool_MTHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@
 class MoniTool_MTHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HasCode value for the CString <Str>  in the <br>
 //! range 0..Upper. <br>
diff --git a/inc/MoniTool_OptValue.hxx b/inc/MoniTool_OptValue.hxx
index 936ac20..aee2afc 100644
--- a/inc/MoniTool_OptValue.hxx
+++ b/inc/MoniTool_OptValue.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class MoniTool_Profile;
 class MoniTool_OptValue  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an OptValue on a given Option <br>
 //!           This allows to use "shortcut" method to set the value <br>
diff --git a/inc/MoniTool_SequenceOfElement.hxx b/inc/MoniTool_SequenceOfElement.hxx
index 6c93882..6318da6 100644
--- a/inc/MoniTool_SequenceOfElement.hxx
+++ b/inc/MoniTool_SequenceOfElement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class MoniTool_SequenceNodeOfSequenceOfElement;
 class MoniTool_SequenceOfElement  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       MoniTool_SequenceOfElement();
diff --git a/inc/MoniTool_Stat.hxx b/inc/MoniTool_Stat.hxx
index 339b384..3766d3c 100644
--- a/inc/MoniTool_Stat.hxx
+++ b/inc/MoniTool_Stat.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class TColStd_HArray1OfInteger;
 class MoniTool_Stat  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Stat form. At start, one default phase is defined, <br>
 //!           with one default step. Then, it suffises to start with a <br>
diff --git a/inc/MoniTool_TimerSentry.hxx b/inc/MoniTool_TimerSentry.hxx
index da398d4..89c1961 100644
--- a/inc/MoniTool_TimerSentry.hxx
+++ b/inc/MoniTool_TimerSentry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class MoniTool_Timer;
 class MoniTool_TimerSentry  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructor creates an instance and runs the corresponding timer <br>
       MoniTool_TimerSentry(const Standard_CString cname);
diff --git a/inc/NCollection_BaseVector.hxx b/inc/NCollection_BaseVector.hxx
index 50cd718..5506ec0 100644
--- a/inc/NCollection_BaseVector.hxx
+++ b/inc/NCollection_BaseVector.hxx
@@ -45,18 +45,26 @@ inline Standard_Integer GetCapacity (const Standard_Integer theIncrement)
 /**
  *  Class NCollection_BaseVector - base for generic vector
  */
-class NCollection_BaseVector 
+class NCollection_BaseVector
 {
  public:
   // ------------ Class MemBlock ------------
   class MemBlock {
   protected:
     MemBlock (NCollection_BaseAllocator* theAlloc)
-      : myFirstInd(0), myLength(0), mySize(0), myAlloc(theAlloc), myData(0L) {}
+      : myAlloc(theAlloc),
+        myData(NULL),
+        myFirstInd(0),
+        myLength(0),
+        mySize(0) {}
     MemBlock (const Standard_Integer theFirstInd,
               const Standard_Integer theLength,
               NCollection_BaseAllocator* theAlloc)
-      : myFirstInd(theFirstInd), myLength(0), mySize(theLength), myAlloc(theAlloc), myData(0L) {}
+      : myAlloc(theAlloc),
+        myData(NULL),
+        myFirstInd(theFirstInd),
+        myLength(0),
+        mySize(theLength) {}
     virtual void        Reinit     (const Standard_Integer,
                                     const Standard_Integer) {}
     Standard_Integer    FirstIndex () const     { return myFirstInd; }
@@ -72,11 +80,11 @@ class NCollection_BaseVector
     Standard_EXPORT Standard_Integer
                         GetIndexV  (void * theItem, const size_t theSz) const;
   protected:
+    NCollection_BaseAllocator*   myAlloc;
+    void*                        myData;
     Standard_Integer             myFirstInd;
     Standard_Integer             myLength;
     Standard_Integer             mySize;
-    NCollection_BaseAllocator    * myAlloc;
-    void                         * myData;
     friend class NCollection_BaseVector;
   };
 
diff --git a/inc/NCollection_SparseArray.hxx b/inc/NCollection_SparseArray.hxx
index 302fd50..0d30f7b 100644
--- a/inc/NCollection_SparseArray.hxx
+++ b/inc/NCollection_SparseArray.hxx
@@ -85,31 +85,31 @@ public:
   //!@{
 
   //! Direct const access to the item 
-  const TheItemType& Value (const Standard_Integer theIndex) const 
+  const TheItemType& Value (const Standard_Size theIndex) const 
   {
     return *(const TheItemType*)this->getValue(theIndex);
   }
 
   //! Const access to the item - operator()
-  const TheItemType& operator () (const Standard_Integer theIndex) const
+  const TheItemType& operator () (const Standard_Size theIndex) const
   { 
     return Value (theIndex); 
   }
 
   //! Modification access to the item
-  TheItemType& ChangeValue (const Standard_Integer theIndex) 
+  TheItemType& ChangeValue (const Standard_Size theIndex) 
   {
     return *(TheItemType*)(this->getValue (theIndex));
   }
 
   //! Access to the item - operator()
-  TheItemType& operator () (const Standard_Integer theIndex)
+  TheItemType& operator () (const Standard_Size theIndex)
   { 
     return ChangeValue (theIndex); 
   }
   
   //! Set a value at specified index method
-  TheItemType& SetValue (const Standard_Integer theIndex,
+  TheItemType& SetValue (const Standard_Size theIndex,
                          const TheItemType&     theValue) 
   {
     return *(TheItemType*)this->setValue(theIndex, (Standard_Address)&theValue);
@@ -134,33 +134,33 @@ public:
   }
 
   //! Direct const access to the item 
-  const TheItemType& Find (const Standard_Integer theIndex) const 
+  const TheItemType& Find (const Standard_Size theIndex) const 
   {
     return *(TheItemType*)this->getValue(theIndex);
   }
 
   //! Modification access to the item; allocates space if 
   //! necessary and marks the item as defined
-  TheItemType& ChangeFind (const Standard_Integer theIndex) 
+  TheItemType& ChangeFind (const Standard_Size theIndex) 
   {
     return *(TheItemType*)(this->changeValue (theIndex));
   }
 
   //! Set a value as explicit method
-  TheItemType& Bind (const Standard_Integer theIndex,
+  TheItemType& Bind (const Standard_Size theIndex,
 		     const TheItemType&     theValue) 
   {
     return SetValue(theIndex, theValue);
   }
   
   //! Returns True if the item is defined
-  Standard_Boolean IsBound (const Standard_Integer theIndex) const
+  Standard_Boolean IsBound (const Standard_Size theIndex) const
   {
     return this->HasValue(theIndex);
   }
   
   //! Remove the item from array
-  Standard_Boolean UnBind (const Standard_Integer theIndex) 
+  Standard_Boolean UnBind (const Standard_Size theIndex) 
   {
     return this->UnsetValue(theIndex);
   }
@@ -203,7 +203,7 @@ public:
     }
 
     //! Access current index with 'a-la map' interface
-    Standard_Integer Key (void) const { return Index(); }
+    Standard_Size Key (void) const { return Index(); }
   };
 
   /**
diff --git a/inc/NCollection_SparseArrayBase.hxx b/inc/NCollection_SparseArrayBase.hxx
index ba60e4d..d8d7320 100644
--- a/inc/NCollection_SparseArrayBase.hxx
+++ b/inc/NCollection_SparseArrayBase.hxx
@@ -42,14 +42,14 @@ public:
   Standard_EXPORT void Clear ();
 
   //! Returns number of currently contained items
-  Standard_Integer Size () const { return mySize; }
+  Standard_Size Size () const { return mySize; }
 
   //! Check whether the value at given index is set
-  Standard_EXPORT Standard_Boolean HasValue (const Standard_Integer theIndex) const;
+  Standard_EXPORT Standard_Boolean HasValue (const Standard_Size theIndex) const;
 
   //! Deletes the item from the array; 
   //! returns True if that item was defined
-  Standard_EXPORT Standard_Boolean UnsetValue (const Standard_Integer theIndex);
+  Standard_EXPORT Standard_Boolean UnsetValue (const Standard_Size theIndex);
 
   //!@}
 
@@ -231,7 +231,7 @@ protected:
   }
 
   //! Direct const access to the item
-  Standard_Address getValue (const Standard_Integer theIndex) const
+  Standard_Address getValue (const Standard_Size theIndex) const
   {
     Standard_OutOfRange_Raise_if (!HasValue(theIndex),"NCollection_SparseArray::Value()")
     return Block::ToArray(myData[theIndex/myBlockSize], myBlockSize, myItemSize) + 
@@ -239,12 +239,12 @@ protected:
   }
 
   //! Set a value to the specified item; returns address of the set item
-  Standard_EXPORT Standard_Address setValue (const Standard_Integer theIndex, 
+  Standard_EXPORT Standard_Address setValue (const Standard_Size theIndex, 
                                              const Standard_Address theValue);
 
   //! Modification access to the item; allocates necessary space
   //! and marks the item as defined
-  Standard_EXPORT Standard_Address changeValue (const Standard_Integer theIndex);
+  Standard_EXPORT Standard_Address changeValue (const Standard_Size theIndex);
 
   //! Copy contents of theOther to this; 
   //! assumes that this and theOther have exactly the same type of arguments 
diff --git a/inc/NCollection_Vec2.hxx b/inc/NCollection_Vec2.hxx
new file mode 100644
index 0000000..36814cb
--- /dev/null
+++ b/inc/NCollection_Vec2.hxx
@@ -0,0 +1,230 @@
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _NCollection_Vec2_H__
+#define _NCollection_Vec2_H__
+
+//! Auxiliary macros to define couple of similar access components as vector methods.
+//! @return 2 components by their names in specified order
+#define NCOLLECTION_VEC_COMPONENTS_2D(theX, theY) \
+  const NCollection_Vec2<Element_t> theX##theY##() const { return NCollection_Vec2<Element_t>(theX##(), theY##()); } \
+  const NCollection_Vec2<Element_t> theY##theX##() const { return NCollection_Vec2<Element_t>(theY##(), theX##()); }
+
+//! Defines the 2D-vector template.
+//! The main target for this class - to handle raw low-level arrays (from/to graphic driver etc.).
+template<typename Element_t>
+class NCollection_Vec2
+{
+
+public:
+
+  //! Returns the number of components.
+  static int Length()
+  {
+    return 2;
+  }
+
+  //! Empty constructor. Construct the zero vector.
+  NCollection_Vec2()
+  {
+    v[0] = v[1] = Element_t(0);
+  }
+
+  //! Initialize ALL components of vector within specified value.
+  explicit NCollection_Vec2 (const Element_t theXY)
+  {
+    v[0] = v[1] = theXY;
+  }
+
+  //! Per-component constructor.
+  explicit NCollection_Vec2 (const Element_t theX,
+                             const Element_t theY)
+  {
+    v[0] = theX;
+    v[1] = theY;
+  }
+
+  //! Copy constructor.
+  NCollection_Vec2 (const NCollection_Vec2& theVec2)
+  {
+    v[0] = theVec2[0];
+    v[1] = theVec2[1];
+  }
+
+  //! Assignment operator.
+  const NCollection_Vec2& operator= (const NCollection_Vec2& theVec2)
+  {
+    v[0] = theVec2[0];
+    v[1] = theVec2[1];
+    return *this;
+  }
+
+  //! Alias to 1st component as X coordinate in XY.
+  Element_t x() const { return v[0]; }
+
+  //! Alias to 2nd component as Y coordinate in XY.
+  Element_t y() const { return v[1]; }
+
+  //! @return 2 components by their names in specified order (in GLSL-style)
+  NCOLLECTION_VEC_COMPONENTS_2D(x, y);
+
+  //! Alias to 1st component as X coordinate in XY.
+  Element_t& x() { return v[0]; }
+
+  //! Alias to 2nd component as Y coordinate in XY.
+  Element_t& y() { return v[1]; }
+
+  //! Raw access to the data (to simplify OpenGL exchange).
+  const Element_t* GetData() const { return v; }
+  operator const Element_t*() const { return v; }
+  operator Element_t*() { return v; }
+
+  //! Compute per-component summary.
+  NCollection_Vec2& operator+= (const NCollection_Vec2& theAdd)
+  {
+    v[0] += theAdd.v[0];
+    v[1] += theAdd.v[1];
+    return *this;
+  }
+
+  //! Compute per-component summary.
+  friend NCollection_Vec2 operator+ (const NCollection_Vec2& theLeft,
+                                     const NCollection_Vec2& theRight)
+  {
+    return NCollection_Vec2 (theLeft.v[0] + theRight.v[0],
+                             theLeft.v[1] + theRight.v[1]);
+  }
+
+  //! Compute per-component subtraction.
+  NCollection_Vec2& operator-= (const NCollection_Vec2& theDec)
+  {
+    v[0] -= theDec.v[0];
+    v[1] -= theDec.v[1];
+    return *this;
+  }
+
+  //! Compute per-component subtraction.
+  friend NCollection_Vec2 operator- (const NCollection_Vec2& theLeft,
+                                     const NCollection_Vec2& theRight)
+  {
+    return NCollection_Vec2 (theLeft.v[0] - theRight.v[0],
+                             theLeft.v[1] - theRight.v[1]);
+  }
+
+  //! Unary -.
+  NCollection_Vec2 operator-() const
+  {
+    return NCollection_Vec2 (-x(), -y());
+  }
+
+  //! Compute per-component multiplication.
+  NCollection_Vec2& operator*= (const NCollection_Vec2& theRight)
+  {
+    v[0] *= theRight.v[0];
+    v[1] *= theRight.v[1];
+    return *this;
+  }
+
+  //! Compute per-component multiplication.
+  friend NCollection_Vec2 operator* (const NCollection_Vec2& theLeft,
+                                     const NCollection_Vec2& theRight)
+  {
+    return NCollection_Vec2 (theLeft.v[0] * theRight.v[0],
+                             theLeft.v[1] * theRight.v[1]);
+  }
+
+  //! Compute per-component multiplication by scale factor.
+  void Multiply (const Element_t theFactor)
+  {
+    v[0] *= theFactor;
+    v[1] *= theFactor;
+  }
+
+  //! Compute per-component multiplication by scale factor.
+  NCollection_Vec2 Multiplied (const Element_t theFactor) const
+  {
+    return NCollection_Vec2 (v[0] * theFactor,
+                             v[1] * theFactor);
+  }
+
+  //! Compute per-component multiplication by scale factor.
+  NCollection_Vec2& operator*= (const Element_t theFactor)
+  {
+    Multiply (theFactor);
+    return *this;
+  }
+
+  //! Compute per-component division by scale factor.
+  NCollection_Vec2& operator/= (const Element_t theInvFactor)
+  {
+    v[0] /= theInvFactor;
+    v[1] /= theInvFactor;
+    return *this;
+  }
+
+  //! Compute per-component multiplication by scale factor.
+  NCollection_Vec2 operator* (const Element_t theFactor) const
+  {
+    return Multiplied (theFactor);
+  }
+
+  //! Compute per-component division by scale factor.
+  NCollection_Vec2 operator/ (const Element_t theInvFactor) const
+  {
+    return NCollection_Vec2(v[0] / theInvFactor,
+            v[1] / theInvFactor);
+  }
+
+  //! Computes the dot product.
+  Element_t Dot (const NCollection_Vec2& theOther) const
+  {
+    return x() * theOther.x() + y() * theOther.y();
+  }
+
+  //! Computes the vector modulus (magnitude, length).
+  Element_t Modulus() const
+  {
+    return std::sqrt (x() * x() + y() * y());
+  }
+
+  //! Computes the square of vector modulus (magnitude, length).
+  //! This method may be used for performance tricks.
+  Element_t SquareModulus() const
+  {
+    return x() * x() + y() * y();
+  }
+
+  //! Constuct DX unit vector.
+  static NCollection_Vec2 DX()
+  {
+    return NCollection_Vec2 (Element_t(1), Element_t(0));
+  }
+
+  //! Constuct DY unit vector.
+  static NCollection_Vec2 DY()
+  {
+    return NCollection_Vec2 (Element_t(0), Element_t(1));
+  }
+
+private:
+
+  Element_t v[2];
+
+};
+
+#endif // _NCollection_Vec2_H__
diff --git a/inc/NCollection_Vec3.hxx b/inc/NCollection_Vec3.hxx
new file mode 100644
index 0000000..33fbdae
--- /dev/null
+++ b/inc/NCollection_Vec3.hxx
@@ -0,0 +1,352 @@
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _NCollection_Vec3_H__
+#define _NCollection_Vec3_H__
+
+#include <cstring>
+#include <cmath>
+#include <NCollection_Vec2.hxx>
+
+//! Auxiliary macros to define couple of similar access components as vector methods
+#define NCOLLECTION_VEC_COMPONENTS_3D(theX, theY, theZ) \
+  const NCollection_Vec3<Element_t> theX##theY##theZ##() const { return NCollection_Vec3<Element_t>(theX##(), theY##(), theZ##()); } \
+  const NCollection_Vec3<Element_t> theX##theZ##theY##() const { return NCollection_Vec3<Element_t>(theX##(), theZ##(), theY##()); } \
+  const NCollection_Vec3<Element_t> theY##theX##theZ##() const { return NCollection_Vec3<Element_t>(theY##(), theX##(), theZ##()); } \
+  const NCollection_Vec3<Element_t> theY##theZ##theX##() const { return NCollection_Vec3<Element_t>(theY##(), theZ##(), theX##()); } \
+  const NCollection_Vec3<Element_t> theZ##theY##theX##() const { return NCollection_Vec3<Element_t>(theZ##(), theY##(), theX##()); } \
+  const NCollection_Vec3<Element_t> theZ##theX##theY##() const { return NCollection_Vec3<Element_t>(theZ##(), theX##(), theY##()); }
+
+//! Generic 3-components vector.
+//! To be used as RGB color pixel or XYZ 3D-point.
+//! The main target for this class - to handle raw low-level arrays (from/to graphic driver etc.).
+template<typename Element_t>
+class NCollection_Vec3
+{
+
+public:
+
+  //! Returns the number of components.
+  static int Length()
+  {
+    return 3;
+  }
+
+  //! Empty constructor. Construct the zero vector.
+  NCollection_Vec3()
+  {
+    std::memset (this, 0, sizeof(NCollection_Vec3));
+  }
+
+  //! Initialize ALL components of vector within specified value.
+  explicit NCollection_Vec3 (Element_t theValue)
+  {
+    v[0] = v[1] = v[2] = theValue;
+  }
+
+  //! Per-component constructor.
+  explicit NCollection_Vec3 (const Element_t theX,
+                             const Element_t theY,
+                             const Element_t theZ)
+  {
+    v[0] = theX;
+    v[1] = theY;
+    v[2] = theZ;
+  }
+
+  //! Constructor from 2-components vector.
+  explicit NCollection_Vec3 (const NCollection_Vec2<Element_t>& theVec2)
+  {
+    v[0] = theVec2[0];
+    v[1] = theVec2[1];
+    v[2] = Element_t(0);
+  }
+
+  //! Copy constructor.
+  NCollection_Vec3 (const NCollection_Vec3& theVec3)
+  {
+    std::memcpy (this, &theVec3, sizeof(NCollection_Vec3));
+  }
+
+  //! Assignment operator.
+  const NCollection_Vec3& operator= (const NCollection_Vec3& theVec3)
+  {
+    std::memcpy (this, &theVec3, sizeof(NCollection_Vec3));
+    return *this;
+  }
+
+  //! Alias to 1st component as X coordinate in XYZ.
+  Element_t x() const { return v[0]; }
+
+  //! Alias to 1st component as RED channel in RGB.
+  Element_t r() const { return v[0]; }
+
+  //! Alias to 2nd component as Y coordinate in XYZ.
+  Element_t y() const { return v[1]; }
+
+  //! Alias to 2nd component as GREEN channel in RGB.
+  Element_t g() const { return v[1]; }
+
+  //! Alias to 3rd component as Z coordinate in XYZ.
+  Element_t z() const { return v[2]; }
+
+  //! Alias to 3rd component as BLUE channel in RGB.
+  Element_t b() const { return v[2]; }
+
+  //! @return 2 components by their names in specified order (in GLSL-style)
+  NCOLLECTION_VEC_COMPONENTS_2D(x, y);
+  NCOLLECTION_VEC_COMPONENTS_2D(x, z);
+  NCOLLECTION_VEC_COMPONENTS_2D(y, z);
+
+  //! @return 3 components by their names in specified order (in GLSL-style)
+  NCOLLECTION_VEC_COMPONENTS_3D(x, y, z);
+
+  //! Alias to 1st component as X coordinate in XYZ.
+  Element_t& x() { return v[0]; }
+
+  //! Alias to 1st component as RED channel in RGB.
+  Element_t& r() { return v[0]; }
+
+  //! Alias to 2nd component as Y coordinate in XYZ.
+  Element_t& y() { return v[1]; }
+
+  //! Alias to 2nd component as GREEN channel in RGB.
+  Element_t& g() { return v[1]; }
+
+  //! Alias to 3rd component as Z coordinate in XYZ.
+  Element_t& z() { return v[2]; }
+
+  //! Alias to 3rd component as BLUE channel in RGB.
+  Element_t& b() { return v[2]; }
+
+  //! @return XY-components modifiable vector
+  NCollection_Vec2<Element_t>& xy()
+  {
+    return *((NCollection_Vec2<Element_t>* )&v[0]);
+  }
+
+  //! @return YZ-components modifiable vector
+  NCollection_Vec2<Element_t>& yz()
+  {
+    return *((NCollection_Vec2<Element_t>* )&v[1]);
+  }
+
+  //! Raw access to the data (for OpenGL exchange).
+  const Element_t* GetData() const { return v; }
+  operator const Element_t*() const { return v; }
+  operator Element_t*() { return v; }
+
+  //! Compute per-component summary.
+  NCollection_Vec3& operator+= (const NCollection_Vec3& theAdd)
+  {
+    v[0] += theAdd.v[0];
+    v[1] += theAdd.v[1];
+    v[2] += theAdd.v[2];
+    return *this;
+  }
+
+  //! Compute per-component summary.
+  friend NCollection_Vec3 operator+ (const NCollection_Vec3& theLeft,
+                                     const NCollection_Vec3& theRight)
+  {
+    NCollection_Vec3 aSumm = NCollection_Vec3 (theLeft);
+    return aSumm += theRight;
+  }
+
+  //! Unary -.
+  NCollection_Vec3 operator-() const
+  {
+    return NCollection_Vec3 (-x(), -y(), -z());
+  }
+
+  //! Compute per-component subtraction.
+  NCollection_Vec3& operator-= (const NCollection_Vec3& theDec)
+  {
+    v[0] -= theDec.v[0];
+    v[1] -= theDec.v[1];
+    v[2] -= theDec.v[2];
+    return *this;
+  }
+
+  //! Compute per-component subtraction.
+  friend NCollection_Vec3 operator- (const NCollection_Vec3& theLeft,
+                                     const NCollection_Vec3& theRight)
+  {
+    NCollection_Vec3 aSumm = NCollection_Vec3 (theLeft);
+    return aSumm -= theRight;
+  }
+
+  //! Compute per-component multiplication by scale factor.
+  void Multiply (const Element_t theFactor)
+  {
+    v[0] *= theFactor;
+    v[1] *= theFactor;
+    v[2] *= theFactor;
+  }
+
+  //! Compute per-component multiplication.
+  NCollection_Vec3& operator*= (const NCollection_Vec3& theRight)
+  {
+    v[0] *= theRight.v[0];
+    v[1] *= theRight.v[1];
+    v[2] *= theRight.v[2];
+    return *this;
+  }
+
+  //! Compute per-component multiplication.
+  friend NCollection_Vec3 operator* (const NCollection_Vec3& theLeft,
+                                     const NCollection_Vec3& theRight)
+  {
+    NCollection_Vec3 aResult = NCollection_Vec3 (theLeft);
+    return aResult *= theRight;
+  }
+
+  //! Compute per-component multiplication by scale factor.
+  NCollection_Vec3& operator*= (const Element_t theFactor)
+  {
+    Multiply (theFactor);
+    return *this;
+  }
+
+  //! Compute per-component multiplication by scale factor.
+  NCollection_Vec3 operator* (const Element_t theFactor) const
+  {
+    return Multiplied (theFactor);
+  }
+
+  //! Compute per-component multiplication by scale factor.
+  NCollection_Vec3 Multiplied (const Element_t theFactor) const
+  {
+    NCollection_Vec3 aCopyVec3 (*this);
+    aCopyVec3 *= theFactor;
+    return aCopyVec3;
+  }
+
+  //! Compute per-component division by scale factor.
+  NCollection_Vec3& operator/= (const Element_t theInvFactor)
+  {
+    v[0] /= theInvFactor;
+    v[1] /= theInvFactor;
+    v[2] /= theInvFactor;
+    return *this;
+  }
+
+  //! Compute per-component division by scale factor.
+  NCollection_Vec3 operator/ (const Element_t theInvFactor)
+  {
+    NCollection_Vec3 aResult (this);
+    return aResult /= theInvFactor;
+  }
+
+  //! Computes the dot product.
+  Element_t Dot (const NCollection_Vec3& theOther) const
+  {
+    return x() * theOther.x() + y() * theOther.y() + z() * theOther.z();
+  }
+
+  //! Computes the vector modulus (magnitude, length).
+  Element_t Modulus() const
+  {
+    return std::sqrt (x() * x() + y() * y() + z() * z());
+  }
+
+  //! Computes the square of vector modulus (magnitude, length).
+  //! This method may be used for performance tricks.
+  Element_t SquareModulus() const
+  {
+    return x() * x() + y() * y() + z() * z();
+  }
+
+  //! Normalize the vector.
+  void Normalize()
+  {
+    Element_t aModulus = Modulus();
+    if (aModulus != Element_t(0)) // just avoid divide by zero
+    {
+      x() = x() / aModulus;
+      y() = y() / aModulus;
+      z() = z() / aModulus;
+    }
+  }
+
+  //! Normalize the vector.
+  NCollection_Vec3 Normalized() const
+  {
+    NCollection_Vec3 aCopy (*this);
+    aCopy.Normalize();
+    return aCopy;
+  }
+
+  //! Computes the cross product.
+  static NCollection_Vec3 Cross (const NCollection_Vec3& theVec1,
+                                 const NCollection_Vec3& theVec2)
+  {
+    return NCollection_Vec3(theVec1.y() * theVec2.z() - theVec1.z() * theVec2.y(),
+            theVec1.z() * theVec2.x() - theVec1.x() * theVec2.z(),
+            theVec1.x() * theVec2.y() - theVec1.y() * theVec2.x());
+  }
+
+  //! Compute linear interpolation between to vectors.
+  //! @param theT - interpolation coefficient 0..1;
+  //! @return interpolation result.
+  static NCollection_Vec3 GetLERP (const NCollection_Vec3& theFrom,
+                                   const NCollection_Vec3& theTo,
+                                   const Element_t         theT)
+  {
+    return theFrom * (Element_t(1) - theT) + theTo * theT;
+  }
+
+  //! Constuct DX unit vector.
+  static NCollection_Vec3 DX()
+  {
+    return NCollection_Vec3 (Element_t(1), Element_t(0), Element_t(0));
+  }
+
+  //! Constuct DY unit vector.
+  static NCollection_Vec3 DY()
+  {
+    return NCollection_Vec3 (Element_t(0), Element_t(1), Element_t(0));
+  }
+
+  //! Constuct DZ unit vector.
+  static NCollection_Vec3 DZ()
+  {
+    return NCollection_Vec3 (Element_t(0), Element_t(0), Element_t(1));
+  }
+
+private:
+
+  Element_t v[3]; //!< define the vector as array to avoid structure alignment issues
+
+};
+
+//! Optimized concretization for float type.
+template<> inline NCollection_Vec3<float>& NCollection_Vec3<float>::operator/= (const float theInvFactor)
+{
+  Multiply (1.0f / theInvFactor);
+  return *this;
+}
+
+//! Optimized concretization for double type.
+template<> inline NCollection_Vec3<double>& NCollection_Vec3<double>::operator/= (const double theInvFactor)
+{
+  Multiply (1.0 / theInvFactor);
+  return *this;
+}
+
+#endif // _NCollection_Vec3_H__
diff --git a/inc/NCollection_Vec4.hxx b/inc/NCollection_Vec4.hxx
new file mode 100644
index 0000000..d72e93f
--- /dev/null
+++ b/inc/NCollection_Vec4.hxx
@@ -0,0 +1,321 @@
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _NCollection_Vec4_H__
+#define _NCollection_Vec4_H__
+
+#include <NCollection_Vec3.hxx>
+
+//! Generic 4-components vector.
+//! To be used as RGBA color vector or XYZW 3D-point with special W-component
+//! for operations with projection / model view matrices.
+//! Use this class for 3D-points carefully because declared W-component may
+//! results in incorrect results if used without matrices.
+template<typename Element_t>
+class NCollection_Vec4
+{
+
+public:
+
+  //! Returns the number of components.
+  static size_t Length()
+  {
+    return 4;
+  }
+
+  //! Empty constructor. Construct the zero vector.
+  NCollection_Vec4()
+  {
+    std::memset (this, 0, sizeof(NCollection_Vec4));
+  }
+
+  //! Initialize ALL components of vector within specified value.
+  explicit NCollection_Vec4 (const Element_t theValue)
+  {
+    v[0] = v[1] = v[2] = v[3] = theValue;
+  }
+
+  //! Per-component constructor.
+  explicit NCollection_Vec4 (const Element_t theX,
+                             const Element_t theY,
+                             const Element_t theZ,
+                             const Element_t theW)
+  {
+    v[0] = theX;
+    v[1] = theY;
+    v[2] = theZ;
+    v[3] = theW;
+  }
+
+  //! Constructor from 2-components vector.
+  explicit NCollection_Vec4 (const NCollection_Vec2<Element_t>& theVec2)
+  {
+    v[0] = theVec2[0];
+    v[1] = theVec2[1];
+    v[2] = v[3] = Element_t (0);
+  }
+
+  //! Constructor from 3-components vector.
+  explicit NCollection_Vec4(const NCollection_Vec3<Element_t>& theVec3)
+  {
+    std::memcpy (this, &theVec3, sizeof(NCollection_Vec3<Element_t>));
+    v[3] = Element_t (0);
+  }
+
+  //! Constructor from 3-components vector + alpha value.
+  explicit NCollection_Vec4(const NCollection_Vec3<Element_t>& theVec3,
+                            const Element_t                    theAlpha) {
+    std::memcpy (this, &theVec3, sizeof(NCollection_Vec3<Element_t>));
+    v[3] = theAlpha;
+  }
+
+  //! Copy constructor.
+  NCollection_Vec4 (const NCollection_Vec4& theVec4)
+  {
+    std::memcpy (this, &theVec4, sizeof(NCollection_Vec4));
+  }
+
+  //! Assignment operator.
+  const NCollection_Vec4& operator= (const NCollection_Vec4& theVec4)
+  {
+    std::memcpy (this, &theVec4, sizeof(NCollection_Vec4));
+    return *this;
+  }
+
+  //! Alias to 1st component as X coordinate in XYZW.
+  Element_t x() const { return v[0]; }
+
+  //! Alias to 1st component as RED channel in RGBA.
+  Element_t r() const { return v[0]; }
+
+  //! Alias to 2nd component as Y coordinate in XYZW.
+  Element_t y() const { return v[1]; }
+
+  //! Alias to 2nd component as GREEN channel in RGBA.
+  Element_t g() const { return v[1]; }
+
+  //! Alias to 3rd component as Z coordinate in XYZW.
+  Element_t z() const { return v[2]; }
+
+  //! Alias to 3rd component as BLUE channel in RGBA.
+  Element_t b() const { return v[2]; }
+
+  //! Alias to 4th component as W coordinate in XYZW.
+  Element_t w() const { return v[3]; }
+
+  //! Alias to 4th component as ALPHA channel in RGBA.
+  Element_t a() const { return v[3]; }
+
+  //! @return 2 of XYZW components in specified order as vector in GLSL-style
+  NCOLLECTION_VEC_COMPONENTS_2D(x, y);
+  NCOLLECTION_VEC_COMPONENTS_2D(x, z);
+  NCOLLECTION_VEC_COMPONENTS_2D(x, w);
+  NCOLLECTION_VEC_COMPONENTS_2D(y, z);
+  NCOLLECTION_VEC_COMPONENTS_2D(y, w);
+  NCOLLECTION_VEC_COMPONENTS_2D(z, w);
+
+  //! @return 3 of XYZW components in specified order as vector in GLSL-style
+  NCOLLECTION_VEC_COMPONENTS_3D(x, y, z);
+  NCOLLECTION_VEC_COMPONENTS_3D(x, y, w);
+  NCOLLECTION_VEC_COMPONENTS_3D(x, z, w);
+  NCOLLECTION_VEC_COMPONENTS_3D(y, z, w);
+
+  //! @return RGB components as vector
+  NCOLLECTION_VEC_COMPONENTS_3D(r, g, b);
+
+  //! Alias to 1st component as X coordinate in XYZW.
+  Element_t& x() { return v[0]; }
+
+  //! Alias to 1st component as RED channel in RGBA.
+  Element_t& r() { return v[0]; }
+
+  //! Alias to 2nd component as Y coordinate in XYZW.
+  Element_t& y() { return v[1]; }
+
+  //! Alias to 2nd component as GREEN channel in RGBA.
+  Element_t& g() { return v[1]; } // Green color
+
+  //! Alias to 3rd component as Z coordinate in XYZW.
+  Element_t& z() { return v[2]; }
+
+  //! Alias to 3rd component as BLUE channel in RGBA.
+  Element_t& b() { return v[2]; }
+
+  //! Alias to 4th component as W coordinate in XYZW.
+  Element_t& w() { return v[3]; }
+
+  //! Alias to 4th component as ALPHA channel in RGBA.
+  Element_t& a() { return v[3]; }
+
+  //! @return XY-components modifiable vector
+  NCollection_Vec2<Element_t>& xy()
+  {
+    return *((NCollection_Vec2<Element_t>* )&v[0]);
+  }
+
+  //! @return YZ-components modifiable vector
+  NCollection_Vec2<Element_t>& yz()
+  {
+    return *((NCollection_Vec2<Element_t>* )&v[1]);
+  }
+
+  //! @return YZ-components modifiable vector
+  NCollection_Vec2<Element_t>& zw()
+  {
+    return *((NCollection_Vec2<Element_t>* )&v[2]);
+  }
+
+  //! @return XYZ-components modifiable vector
+  NCollection_Vec3<Element_t>& xyz()
+  {
+    return *((NCollection_Vec3<Element_t>* )&v[0]);
+  }
+
+  //! @return YZW-components modifiable vector
+  NCollection_Vec3<Element_t>& yzw()
+  {
+    return *((NCollection_Vec3<Element_t>* )&v[1]);
+  }
+
+  //! Raw access to the data (for OpenGL exchange).
+  const Element_t* GetData() const { return v; }
+  operator const Element_t*() const { return v; }
+  operator Element_t*() { return v; }
+
+  //! Compute per-component summary.
+  NCollection_Vec4& operator+= (const NCollection_Vec4& theAdd)
+  {
+    v[0] += theAdd.v[0];
+    v[1] += theAdd.v[1];
+    v[2] += theAdd.v[2];
+    v[3] += theAdd.v[3];
+    return *this;
+  }
+
+  //! Compute per-component summary.
+  friend NCollection_Vec4 operator+ (const NCollection_Vec4& theLeft,
+                                     const NCollection_Vec4& theRight)
+  {
+    NCollection_Vec4 aSumm = NCollection_Vec4 (theLeft);
+    return aSumm += theRight;
+  }
+
+  //! Compute per-component subtraction.
+  NCollection_Vec4& operator-= (const NCollection_Vec4& theDec)
+  {
+    v[0] -= theDec.v[0];
+    v[1] -= theDec.v[1];
+    v[2] -= theDec.v[2];
+    v[3] -= theDec.v[3];
+    return *this;
+  }
+
+  //! Compute per-component subtraction.
+  friend NCollection_Vec4 operator- (const NCollection_Vec4& theLeft,
+                                     const NCollection_Vec4& theRight)
+  {
+    NCollection_Vec4 aSumm = NCollection_Vec4 (theLeft);
+    return aSumm -= theRight;
+  }
+
+  //! Compute per-component multiplication.
+  NCollection_Vec4& operator*= (const NCollection_Vec4& theRight)
+  {
+    v[0] *= theRight.v[0];
+    v[1] *= theRight.v[1];
+    v[2] *= theRight.v[2];
+    v[3] *= theRight.v[3];
+    return *this;
+  }
+
+  //! Compute per-component multiplication.
+  friend NCollection_Vec4 operator* (const NCollection_Vec4& theLeft,
+                                     const NCollection_Vec4& theRight)
+  {
+    NCollection_Vec4 aResult = NCollection_Vec4 (theLeft);
+    return aResult *= theRight;
+  }
+
+  //! Compute per-component multiplication.
+  void Multiply (const Element_t theFactor)
+  {
+    v[0] *= theFactor;
+    v[1] *= theFactor;
+    v[2] *= theFactor;
+    v[3] *= theFactor;
+  }
+
+  //! Compute per-component multiplication.
+  NCollection_Vec4& operator*=(const Element_t theFactor)
+  {
+    Multiply (theFactor);
+    return *this;
+  }
+
+  //! Compute per-component multiplication.
+  NCollection_Vec4 operator* (const Element_t theFactor) const
+  {
+    return Multiplied (theFactor);
+  }
+
+  //! Compute per-component multiplication.
+  NCollection_Vec4 Multiplied (const Element_t theFactor) const
+  {
+    NCollection_Vec4 aCopyVec4 (*this);
+    aCopyVec4 *= theFactor;
+    return aCopyVec4;
+  }
+
+  //! Compute per-component division by scale factor.
+  NCollection_Vec4& operator/= (const Element_t theInvFactor)
+  {
+    v[0] /= theInvFactor;
+    v[1] /= theInvFactor;
+    v[2] /= theInvFactor;
+    v[3] /= theInvFactor;
+    return *this;
+  }
+
+  //! Compute per-component division by scale factor.
+  NCollection_Vec4 operator/ (const Element_t theInvFactor)
+  {
+    NCollection_Vec4 aResult(this);
+    return aResult /= theInvFactor;
+  }
+
+private:
+
+  Element_t v[4]; //!< define the vector as array to avoid structure alignment issues
+
+};
+
+//! Optimized concretization for float type.
+template<> inline NCollection_Vec4<float>& NCollection_Vec4<float>::operator/= (const float theInvFactor)
+{
+  Multiply (1.0f / theInvFactor);
+  return *this;
+}
+
+//! Optimized concretization for double type.
+template<> inline NCollection_Vec4<double>& NCollection_Vec4<double>::operator/= (const double theInvFactor)
+{
+  Multiply (1.0 / theInvFactor);
+  return *this;
+}
+
+#endif // _NCollection_Vec4_H__
diff --git a/inc/NIS_InteractiveObject.hxx b/inc/NIS_InteractiveObject.hxx
index 176c7e8..edbf147 100644
--- a/inc/NIS_InteractiveObject.hxx
+++ b/inc/NIS_InteractiveObject.hxx
@@ -388,7 +388,7 @@ class NIS_InteractiveObject : public Standard_Transient
   // ---------- PRIVATE FIELDS ----------
 
   Handle_NIS_Drawer             myDrawer;
-  Standard_Size                 myID;
+  Standard_Integer              myID;
   NIS_Drawer::DrawType          myDrawType      : 3;
   NIS_Drawer::DrawType          myBaseType      : 3;
   Standard_Boolean              myIsHidden      : 1;
diff --git a/inc/NLPlate_NLPlate.hxx b/inc/NLPlate_NLPlate.hxx
index 7025316..12b210f 100644
--- a/inc/NLPlate_NLPlate.hxx
+++ b/inc/NLPlate_NLPlate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class gp_XY;
 class NLPlate_NLPlate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   NLPlate_NLPlate(const Handle(Geom_Surface)& InitialSurface);
diff --git a/inc/NLPlate_SequenceOfHGPPConstraint.hxx b/inc/NLPlate_SequenceOfHGPPConstraint.hxx
index 0930a4c..b588d28 100644
--- a/inc/NLPlate_SequenceOfHGPPConstraint.hxx
+++ b/inc/NLPlate_SequenceOfHGPPConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class NLPlate_SequenceNodeOfSequenceOfHGPPConstraint;
 class NLPlate_SequenceOfHGPPConstraint  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       NLPlate_SequenceOfHGPPConstraint();
diff --git a/inc/NLPlate_StackIteratorOfStackOfPlate.hxx b/inc/NLPlate_StackIteratorOfStackOfPlate.hxx
index d3d2795..139ed9c 100644
--- a/inc/NLPlate_StackIteratorOfStackOfPlate.hxx
+++ b/inc/NLPlate_StackIteratorOfStackOfPlate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class NLPlate_StackNodeOfStackOfPlate;
 class NLPlate_StackIteratorOfStackOfPlate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   NLPlate_StackIteratorOfStackOfPlate();
diff --git a/inc/NLPlate_StackOfPlate.hxx b/inc/NLPlate_StackOfPlate.hxx
index 97f9692..47cdaf1 100644
--- a/inc/NLPlate_StackOfPlate.hxx
+++ b/inc/NLPlate_StackOfPlate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class NLPlate_StackNodeOfStackOfPlate;
 class NLPlate_StackOfPlate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   NLPlate_StackOfPlate();
diff --git a/inc/OSD.hxx b/inc/OSD.hxx
index 6844438..f4b2eec 100644
--- a/inc/OSD.hxx
+++ b/inc/OSD.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,8 +58,6 @@ class OSD_Semaphore;
 class OSD_MailBox;
 class OSD_SharedLibrary;
 class OSD_Thread;
-class OSD_SystemFont;
-class OSD_FontMgr;
 class OSD_Real2String;
 class OSD_Localizer;
 
@@ -66,18 +67,7 @@ class OSD_Localizer;
 class OSD  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!   1) Arms some floating point signals, and sets a "Handler" for them. <br>
@@ -180,8 +170,6 @@ friend class OSD_Semaphore;
 friend class OSD_MailBox;
 friend class OSD_SharedLibrary;
 friend class OSD_Thread;
-friend class OSD_SystemFont;
-friend class OSD_FontMgr;
 friend class OSD_Real2String;
 friend class OSD_Localizer;
 
diff --git a/inc/OSD_Chronometer.hxx b/inc/OSD_Chronometer.hxx
index 8425717..46c3579 100644
--- a/inc/OSD_Chronometer.hxx
+++ b/inc/OSD_Chronometer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@
 class OSD_Chronometer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes a stopped Chronometer. <br>
   Standard_EXPORT   OSD_Chronometer(const Standard_Boolean ThisThreadOnly = Standard_False);
diff --git a/inc/OSD_Directory.hxx b/inc/OSD_Directory.hxx
index 52160c5..e2a8f37 100644
--- a/inc/OSD_Directory.hxx
+++ b/inc/OSD_Directory.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class OSD_Protection;
 class OSD_Directory  : public OSD_FileNode {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates Directory object. <br>
 //!          It is initiliazed to an empty name. <br>
diff --git a/inc/OSD_DirectoryIterator.hxx b/inc/OSD_DirectoryIterator.hxx
index 9db7eee..45c3ba1 100644
--- a/inc/OSD_DirectoryIterator.hxx
+++ b/inc/OSD_DirectoryIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class OSD_Directory;
 class OSD_DirectoryIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Instantiates Object as empty Iterator; <br>
   Standard_EXPORT   OSD_DirectoryIterator();
diff --git a/inc/OSD_Disk.hxx b/inc/OSD_Disk.hxx
index 72d1f76..d32364a 100644
--- a/inc/OSD_Disk.hxx
+++ b/inc/OSD_Disk.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class OSD_Path;
 class OSD_Disk  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a disk object. <br>
 //!          This is used only when a class contains a Disk field. <br>
diff --git a/inc/OSD_Environment.hxx b/inc/OSD_Environment.hxx
index e4a68ac..cc762e8 100644
--- a/inc/OSD_Environment.hxx
+++ b/inc/OSD_Environment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TCollection_AsciiString;
 class OSD_Environment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates the object Environment. <br>
   Standard_EXPORT   OSD_Environment();
diff --git a/inc/OSD_EnvironmentIterator.hxx b/inc/OSD_EnvironmentIterator.hxx
index ea3caf1..19cb71f 100644
--- a/inc/OSD_EnvironmentIterator.hxx
+++ b/inc/OSD_EnvironmentIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class OSD_Environment;
 class OSD_EnvironmentIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Instantiates Object as Iterator; <br>
   Standard_EXPORT   OSD_EnvironmentIterator();
diff --git a/inc/OSD_Error.hxx b/inc/OSD_Error.hxx
index a3a4d01..0fe13b2 100644
--- a/inc/OSD_Error.hxx
+++ b/inc/OSD_Error.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TCollection_AsciiString;
 class OSD_Error  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes Error to be without any Error. <br>
 //!          This is only used by OSD, not by programmer. <br>
diff --git a/inc/OSD_File.hxx b/inc/OSD_File.hxx
index e77915d..c275864 100644
--- a/inc/OSD_File.hxx
+++ b/inc/OSD_File.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class OSD_Printer;
 class OSD_File  : public OSD_FileNode {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates File object. <br>
   Standard_EXPORT   OSD_File();
diff --git a/inc/OSD_FileIterator.hxx b/inc/OSD_FileIterator.hxx
index 7885f0e..173635a 100644
--- a/inc/OSD_FileIterator.hxx
+++ b/inc/OSD_FileIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class OSD_File;
 class OSD_FileIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Instantiates Object as empty Iterator; <br>
   Standard_EXPORT   OSD_FileIterator();
diff --git a/inc/OSD_FileNode.hxx b/inc/OSD_FileNode.hxx
index 1df85ec..9edb5a5 100644
--- a/inc/OSD_FileNode.hxx
+++ b/inc/OSD_FileNode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Quantity_Date;
 class OSD_FileNode  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Gets file name and path. <br>
   Standard_EXPORT     void Path(OSD_Path& Name) const;
diff --git a/inc/OSD_FontAspect.hxx b/inc/OSD_FontAspect.hxx
deleted file mode 100644
index c42f355..0000000
--- a/inc/OSD_FontAspect.hxx
+++ /dev/null
@@ -1,22 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _OSD_FontAspect_HeaderFile
-#define _OSD_FontAspect_HeaderFile
-
-//! Specifies the type of files. <br>
-enum OSD_FontAspect {
-OSD_FA_Undefined,
-OSD_FA_Regular,
-OSD_FA_Bold,
-OSD_FA_Italic,
-OSD_FA_BoldItalic
-};
-
-#ifndef _Standard_PrimitiveTypes_HeaderFile
-#include <Standard_PrimitiveTypes.hxx>
-#endif
-
-#endif
diff --git a/inc/OSD_FontMgr.hxx b/inc/OSD_FontMgr.hxx
deleted file mode 100644
index 500f0f7..0000000
--- a/inc/OSD_FontMgr.hxx
+++ /dev/null
@@ -1,66 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _OSD_FontMgr_HeaderFile
-#define _OSD_FontMgr_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-#ifndef _Handle_OSD_FontMgr_HeaderFile
-#include <Handle_OSD_FontMgr.hxx>
-#endif
-
-#ifndef _OSD_NListOfSystemFont_HeaderFile
-#include <OSD_NListOfSystemFont.hxx>
-#endif
-#ifndef _MMgt_TShared_HeaderFile
-#include <MMgt_TShared.hxx>
-#endif
-
-
-//! Structure for store of Font System Information <br>
-class OSD_FontMgr : public MMgt_TShared {
-
-public:
-
-  
-  Standard_EXPORT   static  Handle_OSD_FontMgr GetInstance() ;
-  
-  Standard_EXPORT     OSD_NListOfSystemFont GetAvalableFonts() const;
-
-
-
-
-  DEFINE_STANDARD_RTTI(OSD_FontMgr)
-
-protected:
-
-
-
-
-private: 
-
-  //! Creates empty font object <br>
-  Standard_EXPORT   OSD_FontMgr();
-  
-  Standard_EXPORT     void InitFontDataBase() ;
-
-OSD_NListOfSystemFont MyListOfFonts;
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-
-
-#endif
diff --git a/inc/OSD_Host.hxx b/inc/OSD_Host.hxx
index 3bc2cf7..ee8123c 100644
--- a/inc/OSD_Host.hxx
+++ b/inc/OSD_Host.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TCollection_AsciiString;
 class OSD_Host  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes current host by default. <br>
   Standard_EXPORT   OSD_Host();
diff --git a/inc/OSD_Localizer.hxx b/inc/OSD_Localizer.hxx
index 4bca8a1..4448261 100644
--- a/inc/OSD_Localizer.hxx
+++ b/inc/OSD_Localizer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class OSD_Localizer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Set locale <br>
   Standard_EXPORT   OSD_Localizer(const Standard_Integer Category,const Standard_CString Locale);
diff --git a/inc/OSD_MAllocHook.hxx b/inc/OSD_MAllocHook.hxx
index f411fa8..a983900 100644
--- a/inc/OSD_MAllocHook.hxx
+++ b/inc/OSD_MAllocHook.hxx
@@ -132,7 +132,7 @@ public:
     Standard_EXPORT virtual void AllocEvent(size_t, long);
     Standard_EXPORT virtual void FreeEvent(void*, size_t, long);
 
-  private:
+  public:
     struct Numbers
     {
       int nbAlloc;
@@ -140,11 +140,13 @@ public:
       int nbLeftPeak;
       Numbers() : nbAlloc(0), nbFree(0), nbLeftPeak(0) {}
     };
+    
+    static const size_t myMaxAllocSize; //!< maximum tracked size
 
-    Standard_Mutex myMutex;
-    Numbers*       myArray;
-    ptrdiff_t      myTotalLeftSize;
-    size_t         myTotalPeakSize;
+    Standard_Mutex myMutex;             //!< used for thread-safe access
+    Numbers*       myArray;             //!< indexed from 0 to myMaxAllocSize-1
+    ptrdiff_t      myTotalLeftSize;     //!< currently remained allocated size
+    size_t         myTotalPeakSize;     //!< maxium cumulative allocated size
     size_t         myBreakSize;
   };
 
diff --git a/inc/OSD_MailBox.hxx b/inc/OSD_MailBox.hxx
index 3352aec..f220280 100644
--- a/inc/OSD_MailBox.hxx
+++ b/inc/OSD_MailBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class TCollection_AsciiString;
 class OSD_MailBox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! To be used with 'Open'. <br>
 //!          It just allocates room for 'myName'. <br>
diff --git a/inc/OSD_NListOfSystemFont.hxx b/inc/OSD_NListOfSystemFont.hxx
deleted file mode 100644
index c30575c..0000000
--- a/inc/OSD_NListOfSystemFont.hxx
+++ /dev/null
@@ -1,31 +0,0 @@
-// Created on: 2009-01-20
-// Created by: Alexander A. BORODIN
-// Copyright (c) 2009-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-
-#ifndef _OSD_NListOfSystemFont_HeaderFile
-#define _OSD_NListOfSystemFont_HeaderFile
-
-#include <NCollection_DefineList.hxx>
-#include <OSD_SystemFont.hxx>
-
-DEFINE_LIST (OSD_NListOfSystemFont,
-             NCollection_List,
-             Handle(OSD_SystemFont))
-
-#endif
diff --git a/inc/OSD_Path.hxx b/inc/OSD_Path.hxx
index d26b889..358deca 100644
--- a/inc/OSD_Path.hxx
+++ b/inc/OSD_Path.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TCollection_AsciiString;
 class OSD_Path  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Path object initialized to an empty string. <br>
 //!          i.e. current directory. <br>
diff --git a/inc/OSD_Printer.hxx b/inc/OSD_Printer.hxx
index aa539fa..8e57d54 100644
--- a/inc/OSD_Printer.hxx
+++ b/inc/OSD_Printer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TCollection_AsciiString;
 class OSD_Printer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes printer to use with its name. <br>
 //!          The string must contain only ASCII characters <br>
diff --git a/inc/OSD_Process.hxx b/inc/OSD_Process.hxx
index d3d0fa1..daf9c93 100644
--- a/inc/OSD_Process.hxx
+++ b/inc/OSD_Process.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class OSD_Path;
 class OSD_Process  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes the object and prepare for a possible dump <br>
   Standard_EXPORT   OSD_Process();
diff --git a/inc/OSD_Protection.hxx b/inc/OSD_Protection.hxx
index 4ba3fee..da6e6a3 100644
--- a/inc/OSD_Protection.hxx
+++ b/inc/OSD_Protection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class OSD_Directory;
 class OSD_Protection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes global access rights as follows <br>
   Standard_EXPORT   OSD_Protection();
diff --git a/inc/OSD_Real2String.hxx b/inc/OSD_Real2String.hxx
index 7bcd55b..47234bb 100644
--- a/inc/OSD_Real2String.hxx
+++ b/inc/OSD_Real2String.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@
 class OSD_Real2String  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   OSD_Real2String();
diff --git a/inc/OSD_Semaphore.hxx b/inc/OSD_Semaphore.hxx
index 0bbf487..50a818d 100644
--- a/inc/OSD_Semaphore.hxx
+++ b/inc/OSD_Semaphore.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TCollection_AsciiString;
 class OSD_Semaphore  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Allocate room for semaphore name. <br>
 //!          This is to be used with 'Open'. <br>
diff --git a/inc/OSD_SharedLibrary.hxx b/inc/OSD_SharedLibrary.hxx
index 134877d..172c31a 100644
--- a/inc/OSD_SharedLibrary.hxx
+++ b/inc/OSD_SharedLibrary.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@
 class OSD_SharedLibrary  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a SharedLibrary object with name NULL. <br>
   Standard_EXPORT   OSD_SharedLibrary();
diff --git a/inc/OSD_SharedMemory.hxx b/inc/OSD_SharedMemory.hxx
index 58cefce..83843ad 100644
--- a/inc/OSD_SharedMemory.hxx
+++ b/inc/OSD_SharedMemory.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TCollection_AsciiString;
 class OSD_SharedMemory  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Allocates room for shared memory name. <br>
 //!          This is to be used with 'Open'. <br>
diff --git a/inc/OSD_SystemFont.hxx b/inc/OSD_SystemFont.hxx
deleted file mode 100644
index ebcae1d..0000000
--- a/inc/OSD_SystemFont.hxx
+++ /dev/null
@@ -1,93 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _OSD_SystemFont_HeaderFile
-#define _OSD_SystemFont_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-#ifndef _Handle_OSD_SystemFont_HeaderFile
-#include <Handle_OSD_SystemFont.hxx>
-#endif
-
-#ifndef _Handle_TCollection_HAsciiString_HeaderFile
-#include <Handle_TCollection_HAsciiString.hxx>
-#endif
-#ifndef _OSD_FontAspect_HeaderFile
-#include <OSD_FontAspect.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _MMgt_TShared_HeaderFile
-#include <MMgt_TShared.hxx>
-#endif
-class TCollection_HAsciiString;
-
-
-//! Structure for store of Font System Information <br>
-class OSD_SystemFont : public MMgt_TShared {
-
-public:
-
-  //! Creates empty font object <br>
-  Standard_EXPORT   OSD_SystemFont();
-  //! Creates Font object initialized with <FontName> as name <br>
-//!         <FontAspect>.... TODO <br>
-  Standard_EXPORT   OSD_SystemFont(const Handle(TCollection_HAsciiString)& FontName,const OSD_FontAspect Aspect,const Handle(TCollection_HAsciiString)& FilePath);
-  //! TODO <br>
-  Standard_EXPORT   OSD_SystemFont(const Handle(TCollection_HAsciiString)& XLFD,const Handle(TCollection_HAsciiString)& FilePath);
-  //! Returns font family name <br>
-  Standard_EXPORT     Handle_TCollection_HAsciiString FontName() const;
-  //! Returns font file path <br>
-//! Level: Public <br>
-  Standard_EXPORT     Handle_TCollection_HAsciiString FontPath() const;
-  //! Returns font aspect <br>
-//! Level: Public <br>
-  Standard_EXPORT     OSD_FontAspect FontAspect() const;
-  //! Returns font height <br>
-//! If returned value is equal -1 it means that font is resizable <br>
-//! Level: Public <br>
-  Standard_EXPORT     Standard_Integer FontHeight() const;
-  
-  Standard_EXPORT     Standard_Boolean IsValid() const;
-
-
-
-
-  DEFINE_STANDARD_RTTI(OSD_SystemFont)
-
-protected:
-
-
-
-
-private: 
-
-
-Handle_TCollection_HAsciiString MyFontName;
-OSD_FontAspect MyFontAspect;
-Standard_Integer MyFaceSize;
-Handle_TCollection_HAsciiString MyFilePath;
-Standard_Boolean MyVerification;
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-
-
-#endif
diff --git a/inc/OSD_Thread.hxx b/inc/OSD_Thread.hxx
index 76ff42a..896700c 100644
--- a/inc/OSD_Thread.hxx
+++ b/inc/OSD_Thread.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@
 class OSD_Thread  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   OSD_Thread();
diff --git a/inc/OSD_Timer.hxx b/inc/OSD_Timer.hxx
index f9b194f..d0a235e 100644
--- a/inc/OSD_Timer.hxx
+++ b/inc/OSD_Timer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@
 class OSD_Timer  : public OSD_Chronometer {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Builds a Chronometer initialized and stopped. <br>
   Standard_EXPORT   OSD_Timer();
diff --git a/inc/OSD_WhoAmI.hxx b/inc/OSD_WhoAmI.hxx
index 9277779..60108ad 100644
--- a/inc/OSD_WhoAmI.hxx
+++ b/inc/OSD_WhoAmI.hxx
@@ -6,7 +6,7 @@
 #ifndef _OSD_WhoAmI_HeaderFile
 #define _OSD_WhoAmI_HeaderFile
 
-//! Specifies aspect of system font. <br>
+//! Specifies the type of files. <br>
 enum OSD_WhoAmI {
 OSD_WDirectory,
 OSD_WDirectoryIterator,
diff --git a/inc/ObjMgt_SeqExplorerOfPSeqOfExtRef.hxx b/inc/ObjMgt_SeqExplorerOfPSeqOfExtRef.hxx
index ffcaccd..0ab7714 100644
--- a/inc/ObjMgt_SeqExplorerOfPSeqOfExtRef.hxx
+++ b/inc/ObjMgt_SeqExplorerOfPSeqOfExtRef.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class ObjMgt_ExternRef;
 class ObjMgt_SeqExplorerOfPSeqOfExtRef  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ObjMgt_SeqExplorerOfPSeqOfExtRef(const Handle(ObjMgt_PSeqOfExtRef)& S);
diff --git a/inc/OpenGl_ArbIns.hxx b/inc/OpenGl_ArbIns.hxx
new file mode 100644
index 0000000..9c9f141
--- /dev/null
+++ b/inc/OpenGl_ArbIns.hxx
@@ -0,0 +1,34 @@
+// Created on: 2012-04-10
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _OpenGl_ArbIns_H__
+#define _OpenGl_ArbIns_H__
+
+#include <OpenGl_GlCore12.hxx>
+
+//! TBO is available on OpenGL 3.0+ hardware
+struct OpenGl_ArbIns
+{
+
+  PFNGLDRAWARRAYSINSTANCEDARBPROC   glDrawArraysInstancedARB;
+  PFNGLDRAWELEMENTSINSTANCEDARBPROC glDrawElementsInstancedARB;
+
+};
+
+#endif // _OpenGl_ArbIns_H__
diff --git a/inc/OpenGl_ArbTBO.hxx b/inc/OpenGl_ArbTBO.hxx
new file mode 100644
index 0000000..0f5e54e
--- /dev/null
+++ b/inc/OpenGl_ArbTBO.hxx
@@ -0,0 +1,33 @@
+// Created on: 2012-04-10
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _OpenGl_ArbTBO_H__
+#define _OpenGl_ArbTBO_H__
+
+#include <OpenGl_GlCore12.hxx>
+
+//! TBO is available on OpenGL 3.0+ hardware
+struct OpenGl_ArbTBO
+{
+
+  PFNGLTEXBUFFERARBPROC glTexBufferARB;
+
+};
+
+#endif // _OpenGl_ArbTBO_H__
diff --git a/inc/OpenGl_AspectFace.hxx b/inc/OpenGl_AspectFace.hxx
index c6b00aa..dd9993a 100644
--- a/inc/OpenGl_AspectFace.hxx
+++ b/inc/OpenGl_AspectFace.hxx
@@ -64,7 +64,6 @@ class OpenGl_AspectFace : public OpenGl_Element
  public:
 
   OpenGl_AspectFace ();
-  virtual ~OpenGl_AspectFace () {}
 
   void SetContext (const CALL_DEF_CONTEXTFILLAREA &AContext);
 
@@ -74,7 +73,8 @@ class OpenGl_AspectFace : public OpenGl_Element
   const TEL_CONTEXT_FACE & Context() const { return myContext; }
   const OpenGl_AspectLine * AspectEdge() const { return &myAspectEdge; }
 
-  virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
+  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
+  virtual void Release (const Handle(OpenGl_Context)&   theContext);
 
  protected:
 
diff --git a/inc/OpenGl_AspectLine.hxx b/inc/OpenGl_AspectLine.hxx
index 1216653..cf76c3f 100644
--- a/inc/OpenGl_AspectLine.hxx
+++ b/inc/OpenGl_AspectLine.hxx
@@ -32,7 +32,6 @@ class OpenGl_AspectLine : public OpenGl_Element
 
   OpenGl_AspectLine ();
   OpenGl_AspectLine (const OpenGl_AspectLine &AnOther);
-  virtual ~OpenGl_AspectLine () {}
 
   void SetContext (const CALL_DEF_CONTEXTLINE &AContext);
 
@@ -40,7 +39,8 @@ class OpenGl_AspectLine : public OpenGl_Element
   Aspect_TypeOfLine  Type() const { return myType; }
   float              Width() const { return myWidth; }
 
-  virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
+  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
+  virtual void Release (const Handle(OpenGl_Context)&   theContext);
 
  protected:
 
diff --git a/inc/OpenGl_AspectMarker.hxx b/inc/OpenGl_AspectMarker.hxx
index 91d9459..c03fdcb 100644
--- a/inc/OpenGl_AspectMarker.hxx
+++ b/inc/OpenGl_AspectMarker.hxx
@@ -31,7 +31,6 @@ class OpenGl_AspectMarker : public OpenGl_Element
  public:
 
   OpenGl_AspectMarker ();
-  virtual ~OpenGl_AspectMarker () {}
 
   void SetContext (const CALL_DEF_CONTEXTMARKER &AContext);
 
@@ -39,7 +38,8 @@ class OpenGl_AspectMarker : public OpenGl_Element
   Aspect_TypeOfMarker Type() const { return myType; }
   float               Scale() const { return myScale; }
 
-  virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
+  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
+  virtual void Release (const Handle(OpenGl_Context)&   theContext);
 
  protected:
 
diff --git a/inc/OpenGl_AspectText.hxx b/inc/OpenGl_AspectText.hxx
index b22cdff..4904825 100644
--- a/inc/OpenGl_AspectText.hxx
+++ b/inc/OpenGl_AspectText.hxx
@@ -22,7 +22,7 @@
 #define OpenGl_AspectText_Header
 
 #include <InterfaceGraphic_telem.hxx>
-#include <OSD_FontAspect.hxx>
+#include <Font_FontAspect.hxx>
 #include <Aspect_TypeOfStyleText.hxx>
 #include <Aspect_TypeOfDisplayText.hxx>
 
@@ -30,31 +30,35 @@
 
 class OpenGl_AspectText : public OpenGl_Element
 {
- public:
 
-  OpenGl_AspectText ();
-  virtual ~OpenGl_AspectText ();
+public:
+
+  OpenGl_AspectText();
+  virtual ~OpenGl_AspectText();
 
   void SetContext (const CALL_DEF_CONTEXTTEXT &AContext);
 
   int                      IsZoomable() const { return myZoomable; }
   float                    Angle() const { return myAngle; }
-  OSD_FontAspect           FontAspect() const { return myFontAspect; }
+  Font_FontAspect          FontAspect() const { return myFontAspect; }
   const char *             Font() const { return myFont; }
   const TEL_COLOUR &       Color() const { return myColor; }
   Aspect_TypeOfStyleText   StyleType() const { return myStyleType; }
   Aspect_TypeOfDisplayText DisplayType() const { return myDisplayType; }
   const TEL_COLOUR &       SubtitleColor() const { return mySubtitleColor; }
 
-  virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
+  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
+  virtual void Release (const Handle(OpenGl_Context)&   theContext);
 
- protected:
+protected:
 
   void SetFontName (const char *AFont);
 
+protected:
+
   int                      myZoomable;
   float                    myAngle;
-  OSD_FontAspect           myFontAspect;
+  Font_FontAspect          myFontAspect;
   const char              *myFont;
   //float                  mySpace;
   //float                  myExpan;
@@ -63,8 +67,10 @@ class OpenGl_AspectText : public OpenGl_Element
   Aspect_TypeOfDisplayText myDisplayType;
   TEL_COLOUR               mySubtitleColor;
 
- public:
+public:
+
   DEFINE_STANDARD_ALLOC
+
 };
 
 #endif //OpenGl_AspectText_Header
diff --git a/inc/OpenGl_Callback.hxx b/inc/OpenGl_Callback.hxx
deleted file mode 100644
index a704495..0000000
--- a/inc/OpenGl_Callback.hxx
+++ /dev/null
@@ -1,32 +0,0 @@
-// Created on: 2011-10-25
-// Created by: Sergey ZERCHANINOV
-// Copyright (c) 2011-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-
-#ifndef _OpenGl_Callback_HeaderFile
-#define _OpenGl_Callback_HeaderFile
-
-#include <InterfaceGraphic_Graphic3d.hxx>
-
-#include <OpenGl_Element.hxx>
-
-typedef OpenGl_Element * (*OpenGl_UserDrawCallback)(const CALL_DEF_USERDRAW *);
-
-Standard_EXPORT OpenGl_UserDrawCallback & UserDrawCallback ();
-
-#endif //_OpenGl_Callback_HeaderFile
diff --git a/inc/OpenGl_Context.hxx b/inc/OpenGl_Context.hxx
index 9fa6dd8..0fd25a3 100644
--- a/inc/OpenGl_Context.hxx
+++ b/inc/OpenGl_Context.hxx
@@ -25,6 +25,11 @@
 #include <Aspect_Drawable.hxx>
 #include <Aspect_Display.hxx>
 #include <Aspect_RenderingContext.hxx>
+#include <Handle_OpenGl_Context.hxx>
+#include <NCollection_DataMap.hxx>
+#include <NCollection_Handle.hxx>
+#include <NCollection_Queue.hxx>
+#include <OpenGl_Resource.hxx>
 #include <Standard_Transient.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <Handle_OpenGl_Context.hxx>
@@ -36,7 +41,10 @@ struct OpenGl_GlCore14;
 struct OpenGl_GlCore15;
 struct OpenGl_GlCore20;
 struct OpenGl_ArbVBO;
+struct OpenGl_ArbTBO;
+struct OpenGl_ArbIns;
 struct OpenGl_ExtFBO;
+struct OpenGl_ExtGS;
 
 //! This class generalize access to the GL context and available extensions.
 //!
@@ -81,6 +89,10 @@ public:
   //! Destructor.
   Standard_EXPORT virtual ~OpenGl_Context();
 
+  //! Share GL context resources.
+  //! theShareCtx - handle to context to retrieve handles to shared resources.
+  Standard_EXPORT void Share (const Handle(OpenGl_Context)& theShareCtx);
+
   //! Initialize available extensions.
   //! GL context should be active!
   Standard_EXPORT Standard_Boolean Init();
@@ -121,10 +133,18 @@ public:
   //! Clean up errors stack for this GL context (glGetError() in loop).
   Standard_EXPORT void ResetErrors();
 
+  //! This method uses system-dependent API to retrieve information
+  //! about GL context bound to the current thread.
+  //! @return true if current thread is bound to this GL context
+  Standard_EXPORT Standard_Boolean IsCurrent() const;
+
   //! Activates current context.
   //! Class should be initialized with appropriate info.
   Standard_EXPORT Standard_Boolean MakeCurrent();
 
+  //! Swap front/back buffers for this GL context (should be activated before!).
+  Standard_EXPORT void SwapBuffers();
+
   //! Return true if active mode is GL_FEEDBACK (cached state)
   Standard_EXPORT Standard_Boolean IsFeedback() const;
 
@@ -143,6 +163,53 @@ public:
   //! and contains more vendor-specific values than AvailableMemory().
   Standard_EXPORT TCollection_AsciiString MemoryInfo() const;
 
+  //! Access shared resource by its name.
+  //! @param  theKey - unique identifier;
+  //! @return handle to shared resource or NULL.
+  Standard_EXPORT const Handle(OpenGl_Resource)& GetResource (const TCollection_AsciiString& theKey) const;
+
+  //! Access shared resource by its name.
+  //! @param  theKey   - unique identifier;
+  //! @param  theValue - handle to fill;
+  //! @return true if resource was shared.
+  template<typename TheHandleType>
+  Standard_Boolean GetResource (const TCollection_AsciiString& theKey,
+                                TheHandleType&                 theValue) const
+  {
+    const Handle(OpenGl_Resource)& aResource = GetResource (theKey);
+    if (aResource.IsNull())
+    {
+      return Standard_False;
+    }
+
+    theValue = TheHandleType::DownCast (aResource);
+    return !theValue.IsNull();
+  }
+
+  //! Register shared resource.
+  //! Notice that after registration caller shouldn't release it by himself -
+  //! it will be automatically released on context destruction.
+  //! @param theKey      - unique identifier, shouldn't be empty;
+  //! @param theResource - new resource to register, shouldn't be NULL.
+  Standard_EXPORT Standard_Boolean ShareResource (const TCollection_AsciiString& theKey,
+                                                  const Handle(OpenGl_Resource)& theResource);
+
+  //! Release shared resource.
+  //! If there are more than one reference to this resource
+  //! (also used by some other existing object) then call will be ignored.
+  //! This means that current object itself should nullify handle before this call.
+  //! Notice that this is unrecommended operation at all and should be used
+  //! only in case of fat resources to release memory for other needs.
+  //! @param  theKey - unique identifier.
+  Standard_EXPORT void ReleaseResource (const TCollection_AsciiString& theKey);
+
+  //! Append resource to queue for delayed clean up.
+  //! Resources in this queue will be released at next redraw call.
+  Standard_EXPORT void DelayedRelease (Handle(OpenGl_Resource)& theResource);
+
+  //! Clean up the delayed release queue.
+  Standard_EXPORT void ReleaseDelayed();
+
 private:
 
   //! Wrapper to system function to retrieve GL function pointer by name.
@@ -165,11 +232,14 @@ public: // core profiles
 public: // extensions
 
   OpenGl_ArbVBO*   arbVBO; //!< GL_ARB_vertex_buffer_object
+  OpenGl_ArbTBO*   arbTBO; //!< GL_ARB_texture_buffer_object
+  OpenGl_ArbIns*   arbIns; //!< GL_ARB_draw_instanced
   OpenGl_ExtFBO*   extFBO; //!< GL_EXT_framebuffer_object
+  OpenGl_ExtGS*    extGS;  //!< GL_EXT_geometry_shader4
   Standard_Boolean atiMem; //!< GL_ATI_meminfo
   Standard_Boolean nvxMem; //!< GL_NVX_gpu_memory_info
 
-private:
+private: // system-dependent fields
 
 #if (defined(_WIN32) || defined(__WIN32__))
   Aspect_Handle           myWindow;   //!< window handle (owner of GL context) : HWND
@@ -181,6 +251,16 @@ private:
   Aspect_RenderingContext myGContext; //!< X-GLX rendering context : GLXContext
 #endif
 
+private: // context info
+
+  typedef NCollection_DataMap<TCollection_AsciiString, Handle(OpenGl_Resource)> OpenGl_ResourcesMap;
+  typedef NCollection_Handle<OpenGl_ResourcesMap> Handle(OpenGl_ResourcesMap);
+  typedef NCollection_Queue<Handle(OpenGl_Resource)> OpenGl_ResourcesQueue;
+  typedef NCollection_Handle<OpenGl_ResourcesQueue> Handle(OpenGl_ResourcesQueue);
+
+  Handle(OpenGl_ResourcesMap)   mySharedResources; //!< shared resourced with unique identification key
+  Handle(OpenGl_ResourcesQueue) myReleaseQueue;    //!< queue of resources for delayed clean up
+
   void*            myGlLibHandle;   //!< optional handle to GL library
   OpenGl_GlCore20* myGlCore20;      //!< common structure for GL core functions upto 2.0
   Standard_Integer myGlVerMajor;    //!< cached GL version major number
@@ -188,10 +268,18 @@ private:
   Standard_Boolean myIsFeedback;    //!< flag indicates GL_FEEDBACK mode
   Standard_Boolean myIsInitialized; //!< flag indicates initialization state
 
+private:
+
+  //! Copying allowed only within Handles
+  OpenGl_Context            (const OpenGl_Context& );
+  OpenGl_Context& operator= (const OpenGl_Context& );
+
 public:
 
   DEFINE_STANDARD_RTTI(OpenGl_Context) // Type definition
 
+  friend class OpenGl_Window;
+
 };
 
 #endif // _OpenGl_Context_H__
diff --git a/inc/OpenGl_Display.hxx b/inc/OpenGl_Display.hxx
index 8689881..44e8c82 100644
--- a/inc/OpenGl_Display.hxx
+++ b/inc/OpenGl_Display.hxx
@@ -33,7 +33,7 @@
 #include <Aspect_TypeOfLine.hxx>
 #include <Aspect_TypeOfMarker.hxx>
 
-#include <OSD_FontAspect.hxx>
+#include <Font_FontAspect.hxx>
 
 #include <InterfaceGraphic_telem.hxx>
 
@@ -115,7 +115,7 @@ class OpenGl_Display : public MMgt_TShared
 
   // Fonts
 
-  int FindFont (const char* AFontName, const OSD_FontAspect AFontAspect, const int ABestSize = -1, const float AXScale = 1.F, const float AYScale = 1.F);
+  int FindFont (const char* AFontName, const Font_FontAspect AFontAspect, const int ABestSize = -1, const float AXScale = 1.F, const float AYScale = 1.F);
 
   void StringSize (const wchar_t *text, int &width, int &ascent, int &descent);
 
diff --git a/inc/OpenGl_Element.hxx b/inc/OpenGl_Element.hxx
index 24219c4..e9d6773 100644
--- a/inc/OpenGl_Element.hxx
+++ b/inc/OpenGl_Element.hxx
@@ -25,14 +25,38 @@
 
 class OpenGl_Element
 {
- public:
-  OpenGl_Element () {}
-  virtual ~OpenGl_Element () {}
+public:
 
-  virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const = 0;
+  OpenGl_Element() {}
+
+  virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const = 0;
+
+  //! Release GPU resources.
+  virtual void Release (const Handle(OpenGl_Context)& theContext) = 0;
+
+  template <typename theResource_t>
+  static void Destroy (const Handle(OpenGl_Context)& theContext,
+                       theResource_t*&               theElement)
+  {
+    if (theElement == NULL)
+    {
+      return;
+    }
+
+    theElement->Release (theContext);
+    OpenGl_Element* anElement = theElement;
+    delete anElement;
+    theElement = NULL;
+  }
+
+protected:
+
+  virtual ~OpenGl_Element() {}
+
+public:
 
- public:
   DEFINE_STANDARD_ALLOC
+
 };
 
 #endif //OpenGl_Element_Header
diff --git a/inc/OpenGl_ExtGS.hxx b/inc/OpenGl_ExtGS.hxx
new file mode 100644
index 0000000..da6be34
--- /dev/null
+++ b/inc/OpenGl_ExtGS.hxx
@@ -0,0 +1,31 @@
+// Created on: 2012-09-26
+// Created by: Olga SURYANINOVA
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _OpenGl_ExtGS_H__
+#define _OpenGl_ExtGS_H__
+
+#include <OpenGl_GlCore12.hxx>
+
+//! Geometry shader as extension is available on OpenGL 2.0+
+struct OpenGl_ExtGS
+{
+  PFNGLPROGRAMPARAMETERIEXTPROC glProgramParameteriEXT;
+};
+
+#endif // _OpenGl_ExtGS_H__
diff --git a/inc/OpenGl_FontMgr.hxx b/inc/OpenGl_FontMgr.hxx
index eda154e..153a425 100644
--- a/inc/OpenGl_FontMgr.hxx
+++ b/inc/OpenGl_FontMgr.hxx
@@ -23,12 +23,10 @@
 # include <stdlib.h>
 #endif
 
-#include <oce-config.h>
-
-#ifdef HAVE_FTGL_NEWER212
-# include <FTGL/ftgl.h>
+#ifdef HAVE_FTGL_UPPERCASE
+#include <FTGLTextureFont.h>
 #else
-# include <FTGL/FTFont.h>
+#include <FTGL/ftgl.h>
 #endif
 
 #include <InterfaceGraphic.hxx>
@@ -36,7 +34,7 @@
 #include <NCollection_List.hxx>
 #include <NCollection_DataMap.hxx>
 #include <Graphic3d_NListOfHAsciiString.hxx>
-#include <OSD_FontMgr.hxx>
+#include <Font_FontMgr.hxx>
 
 void dump_texture();
 
@@ -46,7 +44,7 @@ class OpenGl_FontMgr
   static OpenGl_FontMgr*  instance();
 
   int request_font( const Handle(TCollection_HAsciiString)& fontName,
-                    const OSD_FontAspect                    fontAspect,
+                    const Font_FontAspect                   fontAspect,
                     const Standard_Integer                  fontHeight );
 
   void render_text( const Standard_Integer id,
@@ -80,7 +78,7 @@ private:
   typedef NCollection_List<Standard_Integer> IDList;
 
   struct OGLFont_SysInfo {
-    Handle(OSD_SystemFont)            SysFont;
+    Handle(Font_SystemFont)           SysFont;
     IDList                            GeneratedFonts;
   };
 
diff --git a/inc/OpenGl_GlCore11.hxx b/inc/OpenGl_GlCore11.hxx
index cca428a..6932fdf 100644
--- a/inc/OpenGl_GlCore11.hxx
+++ b/inc/OpenGl_GlCore11.hxx
@@ -45,8 +45,10 @@
 #define GL_GLEXT_LEGACY
 
 // include main OpenGL header provided with system
-#if defined(__APPLE__) && !defined(MACOSX_USE_GLX)
-  #include <OpenGL/OpenGL.h>
+#if defined(__APPLE__)
+  #include <OpenGL/gl.h>
+  #include <OpenGL/glu.h>
+  #define __X_GL_H // prevent chaotic gl.h inclusions to avoid compile errors
 #else
   #include <GL/gl.h>
   #include <GL/glu.h>
diff --git a/inc/OpenGl_GraduatedTrihedron.hxx b/inc/OpenGl_GraduatedTrihedron.hxx
index 9a30e6e..529620b 100644
--- a/inc/OpenGl_GraduatedTrihedron.hxx
+++ b/inc/OpenGl_GraduatedTrihedron.hxx
@@ -64,10 +64,10 @@ class OpenGl_GraduatedTrihedron : public MMgt_TShared
   float myYColor[3];
   float myZColor[3];
   const char *myFontOfNames;
-  OSD_FontAspect myStyleOfNames;
+  Font_FontAspect myStyleOfNames;
   int mySizeOfNames;
   const char* myFontOfValues;
-  OSD_FontAspect myStyleOfValues;
+  Font_FontAspect myStyleOfValues;
   int mySizeOfValues;
   minMaxValuesCallback myCbCubicAxes;
   void* myPtrVisual3dView;
diff --git a/inc/OpenGl_GraphicDriver.hxx b/inc/OpenGl_GraphicDriver.hxx
index 4579958..b704436 100644
--- a/inc/OpenGl_GraphicDriver.hxx
+++ b/inc/OpenGl_GraphicDriver.hxx
@@ -23,6 +23,7 @@
 
 #include <Graphic3d_GraphicDriver.hxx>
 #include <Handle_OpenGl_GraphicDriver.hxx>
+#include <OpenGl_Context.hxx>
 
 #include <Standard_CString.hxx>
 
@@ -31,7 +32,6 @@
 #include <Quantity_PlaneAngle.hxx>
 #include <Quantity_NameOfColor.hxx>
 #include <Handle_AlienImage_AlienImage.hxx>
-#include <Image_CRawBufferData.hxx>
 
 #include <Aspect_Display.hxx>
 #include <Aspect_GradientFillMethod.hxx>
@@ -68,6 +68,7 @@
 #include <Graphic3d_Array2OfVertex.hxx>
 #include <Graphic3d_Array2OfVertexN.hxx>
 #include <Graphic3d_Array2OfVertexNT.hxx>
+#include <Graphic3d_BufferType.hxx>
 #include <NCollection_DataMap.hxx>
 
 class TColStd_Array1OfInteger;
@@ -81,9 +82,11 @@ class Graphic3d_Vertex;
 class Aspect_Array1OfEdge;
 class TCollection_ExtendedString;
 class AlienImage_AlienImage;
+class Image_PixMap;
 class TColStd_HArray1OfReal;
 class Handle(OpenGl_View);
 class Handle(OpenGl_Workspace);
+class OpenGl_Element;
 class OpenGl_Structure;
 
 //! This class defines an OpenGl graphic driver <br>
@@ -260,7 +263,9 @@ public:
   //! Remove offscreen FBO <br>
   Standard_EXPORT void FBORelease (const Graphic3d_CView& view, Graphic3d_PtrFrameBuffer& fboPtr);
   //! Dump active rendering buffer into specified memory buffer. <br>
-  Standard_EXPORT Standard_Boolean BufferDump (const Graphic3d_CView& view, Image_CRawBufferData& buffer);
+  Standard_EXPORT Standard_Boolean BufferDump (const Graphic3d_CView&      theCView,
+                                               Image_PixMap&               theImage,
+                                               const Graphic3d_BufferType& theBufferType);
   Standard_EXPORT void SetGLLightEnabled (const Graphic3d_CView& view,const Standard_Boolean isEnabled) const;
   Standard_EXPORT Standard_Boolean IsGLLightEnabled (const Graphic3d_CView& view) const;
   //! Clear visualization data in graphical driver and stop <br>
@@ -332,23 +337,32 @@ public:
   Standard_EXPORT Standard_Boolean MemoryInfo (Standard_Size&           theFreeBytes,
                                                TCollection_AsciiString& theInfo) const;
 
-private:
+  //! UserDraw function prototype
+  typedef OpenGl_Element* (*OpenGl_UserDrawCallback_t )(const CALL_DEF_USERDRAW* );
 
-  //! Access the global map of views.
-  static NCollection_DataMap<Standard_Integer, Handle(OpenGl_View)>& GetMapOfViews();
+  //! Method to setup UserDraw callback
+  Standard_EXPORT OpenGl_UserDrawCallback_t& UserDrawCallback();
 
-  //! Access the global map of workspaces.
-  static NCollection_DataMap<Standard_Integer, Handle(OpenGl_Workspace)>& GetMapOfWorkspaces();
+private:
 
-  //! Access the global map of structures.
-  static NCollection_DataMap<Standard_Integer, OpenGl_Structure*>& GetMapOfStructures();
+  //! Method to retrieve valid GL context.
+  //! Could return NULL-handle if no window created by this driver.
+  Standard_EXPORT const Handle(OpenGl_Context)& GetSharedContext() const;
 
   //! Deprecated.
-  static void InvalidateAllWorkspaces();
+  void InvalidateAllWorkspaces();
 
 public:
 
   DEFINE_STANDARD_RTTI(OpenGl_GraphicDriver)
+
+private:
+
+  NCollection_DataMap<Standard_Integer, Handle(OpenGl_View)>      myMapOfView;
+  NCollection_DataMap<Standard_Integer, Handle(OpenGl_Workspace)> myMapOfWS;
+  NCollection_DataMap<Standard_Integer, OpenGl_Structure*>        myMapOfStructure;
+  OpenGl_UserDrawCallback_t                                       myUserDrawCallback;
+
 };
 
 #endif //_OpenGl_GraphicDriver_HeaderFile
diff --git a/inc/OpenGl_Group.hxx b/inc/OpenGl_Group.hxx
index 76822b4..d2cbee1 100644
--- a/inc/OpenGl_Group.hxx
+++ b/inc/OpenGl_Group.hxx
@@ -42,9 +42,10 @@ struct OpenGl_ElementNode
 
 class OpenGl_Group : public OpenGl_Element
 {
- public:
-  OpenGl_Group ();
-  virtual ~OpenGl_Group();
+
+public:
+
+  OpenGl_Group();
 
   void SetAspectLine (const CALL_DEF_CONTEXTLINE &AContext, const Standard_Boolean IsGlobal = Standard_True);
   void SetAspectFace (const CALL_DEF_CONTEXTFILLAREA &AContext, const Standard_Boolean IsGlobal = Standard_True);
@@ -52,23 +53,31 @@ class OpenGl_Group : public OpenGl_Element
   void SetAspectText (const CALL_DEF_CONTEXTTEXT &AContext, const Standard_Boolean IsGlobal = Standard_True);
 
   void AddElement (const TelType, OpenGl_Element * );
-  void Clear ();
 
-  void RemovePrimitiveArray (CALL_DEF_PARRAY *APArray);
+  void RemovePrimitiveArray (const Handle(OpenGl_Context)& theGlCtx,
+                             CALL_DEF_PARRAY*              thePArray);
+
+  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
+  virtual void Release (const Handle(OpenGl_Context)&   theGlCtx);
 
-  virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
+protected:
 
- protected:
+  virtual ~OpenGl_Group();
+
+protected:
 
-  OpenGl_AspectLine *myAspectLine;
-  OpenGl_AspectFace *myAspectFace;
-  OpenGl_AspectMarker *myAspectMarker;
-  OpenGl_AspectText *myAspectText;
+  OpenGl_AspectLine*   myAspectLine;
+  OpenGl_AspectFace*   myAspectFace;
+  OpenGl_AspectMarker* myAspectMarker;
+  OpenGl_AspectText*   myAspectText;
 
-  OpenGl_ElementNode *myFirst, *myLast;
+  OpenGl_ElementNode*  myFirst;
+  OpenGl_ElementNode*  myLast;
+
+public:
 
- public:
   DEFINE_STANDARD_ALLOC
+
 };
 
 #endif //_OpenGl_Group_Header
diff --git a/inc/OpenGl_IndexBuffer.hxx b/inc/OpenGl_IndexBuffer.hxx
new file mode 100644
index 0000000..65ced7f
--- /dev/null
+++ b/inc/OpenGl_IndexBuffer.hxx
@@ -0,0 +1,40 @@
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _OpenGl_IndexBuffer_H__
+#define _OpenGl_IndexBuffer_H__
+
+#include <OpenGl_VertexBuffer.hxx>
+
+//! Index buffer is just a VBO with special target (GL_ELEMENT_ARRAY_BUFFER).
+class OpenGl_IndexBuffer : public OpenGl_VertexBuffer
+{
+public:
+
+  Standard_EXPORT OpenGl_IndexBuffer();
+  Standard_EXPORT virtual GLenum GetTarget() const;
+
+public:
+
+  DEFINE_STANDARD_RTTI(OpenGl_IndexBuffer) // Type definition
+
+};
+
+DEFINE_STANDARD_HANDLE(OpenGl_IndexBuffer, OpenGl_VertexBuffer)
+
+#endif // _OpenGl_IndexBuffer_H__
diff --git a/inc/OpenGl_Marker.hxx b/inc/OpenGl_Marker.hxx
index 87348fd..c8c0e06 100644
--- a/inc/OpenGl_Marker.hxx
+++ b/inc/OpenGl_Marker.hxx
@@ -30,9 +30,9 @@ class OpenGl_Marker : public OpenGl_Element
  public:
 
   OpenGl_Marker (const TEL_POINT &APoint) : myPoint(APoint) {}
-  virtual ~OpenGl_Marker () {}
 
-  virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
+  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
+  virtual void Release (const Handle(OpenGl_Context)&   theContext);
 
  protected:
 
diff --git a/inc/OpenGl_MarkerSet.hxx b/inc/OpenGl_MarkerSet.hxx
index 5f4d19e..4840f0c 100644
--- a/inc/OpenGl_MarkerSet.hxx
+++ b/inc/OpenGl_MarkerSet.hxx
@@ -29,20 +29,27 @@
 
 class OpenGl_MarkerSet : public OpenGl_Element
 {
- public:
+
+public:
 
   OpenGl_MarkerSet (const Standard_Integer ANbPoints, const Graphic3d_Vertex *APoints);
-  virtual ~OpenGl_MarkerSet ();
 
-  virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
+  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
+  virtual void Release (const Handle(OpenGl_Context)&   theContext);
+
+protected:
+
+  virtual ~OpenGl_MarkerSet();
 
- protected:
+protected:
 
-  Tint myNbPoints;
-  TEL_POINT *myPoints;
+  Tint       myNbPoints;
+  TEL_POINT* myPoints;
+
+public:
 
- public:
   DEFINE_STANDARD_ALLOC
+
 };
 
 #endif //OpenGl_MarkerSet_Header
diff --git a/inc/OpenGl_Polygon.hxx b/inc/OpenGl_Polygon.hxx
index b6638a8..6e9d19b 100644
--- a/inc/OpenGl_Polygon.hxx
+++ b/inc/OpenGl_Polygon.hxx
@@ -52,15 +52,18 @@ struct TEL_POLYGON_DATA
 
 class OpenGl_Polygon : public OpenGl_Element
 {
- public:
+
+public:
 
   OpenGl_Polygon (const Graphic3d_Array1OfVertex& AListVertex,
                  const Graphic3d_TypeOfPolygon AType);
-  virtual ~OpenGl_Polygon ();
 
-  virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
+  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
+  virtual void Release (const Handle(OpenGl_Context)&   theContext);
+
+protected:
 
- protected:
+  virtual ~OpenGl_Polygon();
 
   void draw_polygon_concav (const Handle(OpenGl_Workspace) &AWorkspace, Tint) const;
 
@@ -72,8 +75,10 @@ class OpenGl_Polygon : public OpenGl_Element
 
   TEL_POLYGON_DATA myData;
 
- public:
+public:
+
   DEFINE_STANDARD_ALLOC
+
 };
 
 #endif //OpenGl_Polygon_Header
diff --git a/inc/OpenGl_Polyline.hxx b/inc/OpenGl_Polyline.hxx
index c3b2ccc..ac17e10 100644
--- a/inc/OpenGl_Polyline.hxx
+++ b/inc/OpenGl_Polyline.hxx
@@ -30,20 +30,27 @@
 
 class OpenGl_Polyline : public OpenGl_Element
 {
- public:
+
+public:
 
   OpenGl_Polyline (const Graphic3d_Array1OfVertex& AListVertex);
-  virtual ~OpenGl_Polyline ();
 
-  virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
+  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
+  virtual void Release (const Handle(OpenGl_Context)&   theContext);
+
+protected:
+
+  virtual ~OpenGl_Polyline();
 
- protected:
+protected:
 
   Tint       myNbVertices;    // Number of vertices in vertices array
   tel_point  myVertices;      // Vertices array of length myNbVertices
 
- public:
+public:
+
   DEFINE_STANDARD_ALLOC
+
 };
 
 #endif //OpenGl_Polyline_Header
diff --git a/inc/OpenGl_PrimitiveArray.hxx b/inc/OpenGl_PrimitiveArray.hxx
index 54a1a26..4d4a4fd 100644
--- a/inc/OpenGl_PrimitiveArray.hxx
+++ b/inc/OpenGl_PrimitiveArray.hxx
@@ -21,7 +21,7 @@
 #ifndef OpenGl_PrimitiveArray_Header
 #define OpenGl_PrimitiveArray_Header
 
-#include <OpenGl_GlCore11.hxx>
+#include <OpenGl_VertexBuffer.hxx>
 
 #include <InterfaceGraphic_telem.hxx>
 #include <Aspect_InteriorStyle.hxx>
@@ -29,30 +29,39 @@
 #include <OpenGl_Element.hxx>
 
 struct OPENGL_SURF_PROP;
-class Handle(OpenGl_Context);
 
 class OpenGl_PrimitiveArray : public OpenGl_Element
 {
 public:
+  // OpenGL does not provie a constant for "none" draw mode.
+  // So we define our own one that does not conflict with GL constants
+  // and untilizes common GL invalid value
+  enum
+  {
+    DRAW_MODE_NONE = -1
+  };
 
   //! Default constructor
   OpenGl_PrimitiveArray (CALL_DEF_PARRAY* thePArray);
 
-  //! Destructor
-  virtual ~OpenGl_PrimitiveArray();
-
   //! Render primitives to the window
-  virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const;
+  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
+
+  virtual void Release (const Handle(OpenGl_Context)&   theContext);
 
   CALL_DEF_PARRAY* PArray() const { return myPArray; }
 
 private:
 
+  Standard_Boolean toDrawVbo() const
+  {
+    return !myVbos[VBOVertices].IsNull();
+  }
+
   //! VBO initialization procedures
   Standard_Boolean BuildVBO (const Handle(OpenGl_Workspace)& theWorkspace) const;
   void clearMemoryOwn() const;
-  void clearMemoryGL (const Handle(OpenGl_Context)& theGlContext) const;
-  Standard_Boolean checkSizeForGraphicMemory (const Handle(OpenGl_Context)& theGlContext) const;
+  void clearMemoryGL (const Handle(OpenGl_Context)& theGlCtx) const;
 
   //! Main procedure to draw array
   void DrawArray (Tint theLightingModel,
@@ -90,8 +99,25 @@ private:
 
 protected:
 
-  mutable CALL_DEF_PARRAY* myPArray;
-  GLenum                   myDrawMode;
+  //! Destructor
+  virtual ~OpenGl_PrimitiveArray();
+
+protected:
+
+  typedef enum
+  {
+    VBOEdges,
+    VBOVertices,
+    VBOVcolours,
+    VBOVnormals,
+    VBOVtexels,
+    VBOMaxType
+  } VBODataType;
+
+  mutable CALL_DEF_PARRAY*            myPArray;
+  mutable Handle(OpenGl_VertexBuffer) myVbos[VBOMaxType];
+  GLint                               myDrawMode;
+  mutable Standard_Boolean            myIsVboInit;
 
 public:
 
diff --git a/inc/OpenGl_Resource.hxx b/inc/OpenGl_Resource.hxx
index c7cd264..449249b 100644
--- a/inc/OpenGl_Resource.hxx
+++ b/inc/OpenGl_Resource.hxx
@@ -17,51 +17,45 @@
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
+#ifndef _OpenGl_Resource_H__
+#define _OpenGl_Resource_H__
 
-#ifndef _OPENGL_RESOURCE_H
-#define _OPENGL_RESOURCE_H
-
-#include <OpenGl_GlCore11.hxx>
-
-#include <OpenGl_ResourceCleaner.hxx>
-#include <MMgt_TShared.hxx>
-#include <Handle_MMgt_TShared.hxx>
+#include <Standard_Transient.hxx>
+#include <Handle_Standard_Transient.hxx>
 
 class Standard_Transient;
 class Handle(Standard_Type);
-class Handle(MMgt_TShared);
-class Handle(OpenGl_Context);
-class OpenGl_ResourceCleaner;
-
-//! Class represents basic OpenGl memory resource, which
-//! could be removed only if appropriate context is avaliable;
-//! The cleaning procedure is done by OpenGl_ResourceCleaner
-class OpenGl_Resource : public MMgt_TShared
+class OpenGl_Context;
+
+//! Interface for OpenGl resource with following meaning:
+//!  - object can be constructed at any time;
+//!  - should be explicitly Initialized within active OpenGL context;
+//!  - should be explicitly Released    within active OpenGL context (virtual Release() method);
+//!  - can be destroyed at any time.
+//! Destruction of object with unreleased GPU resources will cause leaks
+//! which will be ignored in release mode and will immediately stop program execution in debug mode using assert.
+class OpenGl_Resource : public Standard_Transient
 {
 
 public:
 
-  //! Constructor
-  OpenGl_Resource() : myId(0) { }
- 
-  //! Constructor 
-  OpenGl_Resource(GLuint theId) : myId(theId) { }
-
-  //! Destructor
-  virtual ~OpenGl_Resource() {}
-
-  //! method clean() is accessible only by OpenGl_ResourceCleaner
-  friend class OpenGl_ResourceCleaner;
+  //! Empty constructor
+  Standard_EXPORT OpenGl_Resource();
 
-protected:
+  //! Destructor. Inheritors should call Clean (NULL) within it.
+  Standard_EXPORT virtual ~OpenGl_Resource();
 
-  //! Clean procedure, should be called only by OpenGl_ResourceCleaner;
-  //! Each type of resource has its own cleaning procedure
-  virtual void Clean (const Handle(OpenGl_Context)& theGlContext) = 0;
+  //! Release GPU resources.
+  //! Notice that implementation should be SAFE for several consecutive calls
+  //! (thus should invalidate internal structures / ids to avoid multiple-free errors).
+  //! @param theGlCtx - bound GL context, shouldn't be NULL.
+  Standard_EXPORT virtual void Release (const OpenGl_Context* theGlCtx) = 0;
 
-protected:
+private:
 
-  GLuint myId; // Id of OpenGl memory resource
+  //! Copy should be performed only within Handles!
+  OpenGl_Resource            (const OpenGl_Resource& );
+  OpenGl_Resource& operator= (const OpenGl_Resource& );
 
 public:
 
@@ -69,6 +63,6 @@ public:
 
 };
 
-DEFINE_STANDARD_HANDLE(OpenGl_Resource,MMgt_TShared)
+DEFINE_STANDARD_HANDLE(OpenGl_Resource, Standard_Transient)
 
-#endif
+#endif // _OpenGl_Resource_H__
diff --git a/inc/OpenGl_ResourceCleaner.hxx b/inc/OpenGl_ResourceCleaner.hxx
deleted file mode 100644
index dd5a234..0000000
--- a/inc/OpenGl_ResourceCleaner.hxx
+++ /dev/null
@@ -1,96 +0,0 @@
-// Created on: 2011-03-18
-// Created by: Anton POLETAEV
-// Copyright (c) 2011-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-
-#ifndef _OPENGL_RESOURCECLEANER_H
-#define _OPENGL_RESOURCECLEANER_H
-
-#include <OpenGl_GlCore11.hxx>
-#include <NCollection_Queue.hxx>
-#include <NCollection_List.hxx>
-#include <NCollection_Map.hxx>
-#include <NCollection_DataMap.hxx>
-#include <OpenGl_Resource.hxx>
-
-class OpenGl_Resource;
-class Handle(OpenGl_Resource);
-class Handle(OpenGl_Context);
-
-typedef NCollection_Queue<Handle_OpenGl_Resource> QueueOfResources;
-typedef NCollection_DataMap<GLCONTEXT, QueueOfResources> DataMapOfContextsResources;
-typedef NCollection_Map<GLCONTEXT> MapOfContexts;
-
-//! OpenGl_ResourceCleaner should be used to clean OpenGl memory resources;
-//! The reason is that the resources might be shared between the contexts and
-//! should be cleaned up only while suitable context is active;
-class OpenGl_ResourceCleaner
-{
-
-public:
-	
-  //! Constructor
-  OpenGl_ResourceCleaner();
-
-  //! Destructor
-  virtual ~OpenGl_ResourceCleaner() { }
-
-  //! Append OpenGl context to the OpenGl_ResourceCleaner
-  //! control list.
-  void AppendContext(GLCONTEXT theContext, Standard_Boolean isShared);	
-  
-  //! Tell the OpenGl_ResourceCleaner to clean up the OpenGl memory resource
-  //! which has been created by the specified OpenGl context;
-  //! The context should be in the OpenGl_ResourceCleaner control list.
-  Standard_EXPORT Standard_Boolean AddResource(GLCONTEXT theContext, const Handle(OpenGl_Resource)& theResource);
-
-  //! Cancel clean procedure for all the resources added to the OpenGl_ResourceCleaner.
-  void Clear();
-
-  //! Cancel clean procedure for all the resources of the specific OpenGl context 
-  //! which were added to the OpenGl_ResourceCleaner.
-  Standard_Boolean Clear(GLCONTEXT theContext);
-
-  //! Cancel clean procedure for all of the shared resources.
-  void ClearShared();
-
-  //! Clear the unused resources for active OpenGl context;
-  //! You should add the cleaner resources by AddResources method;
-  //! It is suggested to call this method right before the OpenGl
-  //! new frame drawing procedure starts.
-  void Cleanup (const Handle(OpenGl_Context)& theGlContext);
-
-  //! Remove the OpenGl context from the OpenGl_ResourceCleaner control list.
-  void RemoveContext(GLCONTEXT theContext);
-
-  //! Get any of shared contexts from the OpenGl_ResourceCleaner list 
-  //! to share resources with a new one
-  GLCONTEXT GetSharedContext() const;
-
-  //! Get the global instance of OpenGl_ResourceCleaner
-  Standard_EXPORT static OpenGl_ResourceCleaner* GetInstance();
-
-private:
-
-  DataMapOfContextsResources myInstanceQueue;  // map for queues of non-shared context's resources
-  QueueOfResources mySharedQueue;              // queue of shared context's resources
-  MapOfContexts mySharedContexts;              // the control list of shared contexts
-
-};
-
-#endif
diff --git a/inc/OpenGl_ResourceTexture.hxx b/inc/OpenGl_ResourceTexture.hxx
index 57c4dfd..c117ef9 100644
--- a/inc/OpenGl_ResourceTexture.hxx
+++ b/inc/OpenGl_ResourceTexture.hxx
@@ -34,16 +34,17 @@ class OpenGl_ResourceTexture : public OpenGl_Resource
 public:
 
   //! Constructor
-  OpenGl_ResourceTexture(GLuint theId) : OpenGl_Resource (theId) {}
+  Standard_EXPORT OpenGl_ResourceTexture (const GLuint theId);
 
   //! Destructor
-  virtual ~OpenGl_ResourceTexture() { }
+  Standard_EXPORT virtual ~OpenGl_ResourceTexture();
+
+  //! Destroy object - will release GPU memory if any.
+  Standard_EXPORT virtual void Release (const OpenGl_Context* theGlCtx);
 
 protected:
 
-  //! Clean procedure for texture resource;
-  //! Should be called by the OpenGl_ResourceCleaner
-  Standard_EXPORT virtual void Clean (const Handle(OpenGl_Context)& theGlContext);
+  GLuint myTextureId; //!< Texture name (index)
 
 public:
 
diff --git a/inc/OpenGl_ResourceVBO.hxx b/inc/OpenGl_ResourceVBO.hxx
deleted file mode 100644
index 064335b..0000000
--- a/inc/OpenGl_ResourceVBO.hxx
+++ /dev/null
@@ -1,56 +0,0 @@
-// Created on: 2011-03-18
-// Created by: Anton POLETAEV
-// Copyright (c) 2011-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-
-#ifndef _OPENGL_RESOURCEVBO_H
-#define _OPENGL_RESOURCEVBO_H
-
-#include <OpenGl_Resource.hxx>
-#include <Standard.hxx>
-
-class OpenGl_Resource;
-
-//! OpenGl_ResourceVBO represents the Vertex Buffer
-//! Object resource (VBO) for OpenGl_ResourceCleaner
-class OpenGl_ResourceVBO : public OpenGl_Resource 
-{
-
-public:
-
-  //! Constructor
-  OpenGl_ResourceVBO(GLuint theId) : OpenGl_Resource (theId) {}
-
-  //! Destructor
-  virtual ~OpenGl_ResourceVBO() { }
-
-protected:
-
-  //! Clean procedure for VBO resource;
-  //! Should be called by the OpenGl_ResourceCleaner
-  Standard_EXPORT virtual void Clean (const Handle(OpenGl_Context)& theGlContext);
-
-public:
-
-  DEFINE_STANDARD_RTTI(OpenGl_ResourceVBO) // Type definition
-
-};
-
-DEFINE_STANDARD_HANDLE(OpenGl_ResourceVBO,OpenGl_Resource)
-
-#endif
diff --git a/inc/OpenGl_Structure.hxx b/inc/OpenGl_Structure.hxx
index a71545d..2650592 100644
--- a/inc/OpenGl_Structure.hxx
+++ b/inc/OpenGl_Structure.hxx
@@ -37,9 +37,10 @@ typedef NCollection_List<const OpenGl_Group *> OpenGl_ListOfGroup;
 
 class OpenGl_Structure : public OpenGl_Element
 {
- public:
-  OpenGl_Structure ();
-  virtual ~OpenGl_Structure ();
+
+public:
+
+  OpenGl_Structure();
 
   void SetTransformation (const float *AMatrix);
 
@@ -52,20 +53,27 @@ class OpenGl_Structure : public OpenGl_Element
   void SetAspectMarker (const CALL_DEF_CONTEXTMARKER &AContext);
   void SetAspectText (const CALL_DEF_CONTEXTTEXT &AContext);
 
-  void SetHighlightBox (const CALL_DEF_BOUNDBOX &ABoundBox);
-  void ClearHighlightBox ();
+  void SetHighlightBox (const Handle(OpenGl_Context)& theGlCtx,
+                        const CALL_DEF_BOUNDBOX&      theBoundBox);
+
+  void ClearHighlightBox (const Handle(OpenGl_Context)& theGlCtx);
 
-  void SetHighlightColor (const Standard_ShortReal R, const Standard_ShortReal G, const Standard_ShortReal B);
-  void ClearHighlightColor ();
+  void SetHighlightColor (const Handle(OpenGl_Context)& theGlCtx,
+                          const Standard_ShortReal R,
+                          const Standard_ShortReal G,
+                          const Standard_ShortReal B);
+
+  void ClearHighlightColor (const Handle(OpenGl_Context)& theGlCtx);
 
   void SetNamedStatus (const Standard_Integer aStatus) { myNamedStatus = aStatus; }
 
   void Connect (const OpenGl_Structure *astructure);
   void Disconnect (const OpenGl_Structure *astructure);
 
-  OpenGl_Group * AddGroup ();
-  void RemoveGroup (const OpenGl_Group *);
-  void Clear ();
+  OpenGl_Group* AddGroup();
+  void RemoveGroup (const Handle(OpenGl_Context)& theGlCtx,
+                    const OpenGl_Group*           theGroup);
+  void Clear (const Handle(OpenGl_Context)& theGlCtx);
 
   //! Set z layer ID to display the structure in specified layer
   void SetZLayer (const Standard_Integer theLayerIndex);
@@ -73,32 +81,46 @@ class OpenGl_Structure : public OpenGl_Element
   //! Get z layer ID
   Standard_Integer GetZLayer () const;
 
-  virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
-  
- protected:
+  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
+  virtual void Release (const Handle(OpenGl_Context)&   theGlCtx);
+
+  //! This method releases GL resources without actual elements destruction.
+  //! As result structure could be correctly destroyed layter without GL context
+  //! (after last window was closed for example).
+  //!
+  //! Notice however that reusage of this structure after calling this method is incorrect
+  //! and will lead to broken visualization due to loosed data.
+  void ReleaseGlResources (const Handle(OpenGl_Context)& theGlCtx);
+
+protected:
+
+  virtual ~OpenGl_Structure();
+
+protected:
 
   //Structure_LABBegin
-  OpenGl_Matrix *myTransformation;
-  TEL_TRANSFORM_PERSISTENCE *myTransPers;
-  DEGENERATION *myDegenerateModel;
-  OpenGl_AspectLine *myAspectLine;
-  OpenGl_AspectFace *myAspectFace;
-  OpenGl_AspectMarker *myAspectMarker;
-  OpenGl_AspectText *myAspectText;
+  OpenGl_Matrix*             myTransformation;
+  TEL_TRANSFORM_PERSISTENCE* myTransPers;
+  DEGENERATION*              myDegenerateModel;
+  OpenGl_AspectLine*         myAspectLine;
+  OpenGl_AspectFace*         myAspectFace;
+  OpenGl_AspectMarker*       myAspectMarker;
+  OpenGl_AspectText*         myAspectText;
   //Structure_LABHighlight
-  OpenGl_Group *myHighlightBox;
-  TEL_COLOUR *myHighlightColor;
+  OpenGl_Group*              myHighlightBox;
+  TEL_COLOUR*                myHighlightColor;
   //Structure_LABVisibility
   //Structure_LABPick
-  int myNamedStatus; //Structure_LABNameSet
-  int myZLayer;
+  int                        myNamedStatus; //Structure_LABNameSet
+  int                        myZLayer;
 
-  OpenGl_ListOfStructure myConnected;
+  OpenGl_ListOfStructure     myConnected;
+  OpenGl_ListOfGroup         myGroups;
 
-  OpenGl_ListOfGroup myGroups;
+public:
 
- public:
   DEFINE_STANDARD_ALLOC
+
 };
 
 #endif //OpenGl_Structure_Header
diff --git a/inc/OpenGl_Text.hxx b/inc/OpenGl_Text.hxx
index cb93717..3251b43 100644
--- a/inc/OpenGl_Text.hxx
+++ b/inc/OpenGl_Text.hxx
@@ -32,25 +32,32 @@
 
 class OpenGl_Text : public OpenGl_Element
 {
- public:
+
+public:
 
   OpenGl_Text (const TCollection_ExtendedString& AText,
               const Graphic3d_Vertex& APoint,
               const Standard_Real AHeight,
               const Graphic3d_HorizontalTextAlignment AHta,
               const Graphic3d_VerticalTextAlignment AVta);
-  virtual ~OpenGl_Text ();
 
-  virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
+  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
+  virtual void Release (const Handle(OpenGl_Context)&   theContext);
+
+protected:
+
+  virtual ~OpenGl_Text();
 
- protected:
+protected:
 
   OpenGl_TextParam myParam;
   TEL_POINT       myAttachPnt;
   const wchar_t  *myString;
 
- public:
+public:
+
   DEFINE_STANDARD_ALLOC
+
 };
 
 #endif //OpenGl_Text_Header
diff --git a/inc/OpenGl_TextureBox.hxx b/inc/OpenGl_TextureBox.hxx
index bbe34d1..05d4f25 100644
--- a/inc/OpenGl_TextureBox.hxx
+++ b/inc/OpenGl_TextureBox.hxx
@@ -102,7 +102,9 @@ TextureID GetTextureData1D(char *FileName, const GLint width, const GLint height
 TextureID GetTextureData2D(char *FileName, const GLint width, const GLint height, const void *data);
 TextureID GetTextureData2DMipMap(char *FileName, const GLint width, const GLint height, const void *data);
 
-void FreeTexture(TextureID ID);
+class Handle(OpenGl_Context);
+void FreeTexture (const Handle(OpenGl_Context)& theContext,
+                  TextureID                     ID);
 
 void SetCurrentTexture(TextureID ID);
 GLboolean IsTextureValid(TextureID ID);
@@ -139,7 +141,6 @@ void SetTexturePosition(TextureID ID,
 void SetTextureDefaultParams(TextureID ID);
 
 void TransferTexture_To_Data(TextureID, TextureData *);
-void TransferData_To_Texture(TextureData*, TextureID*);
 
 /*----------------------------------------------------------------------*/
 
diff --git a/inc/OpenGl_TextureBufferArb.hxx b/inc/OpenGl_TextureBufferArb.hxx
new file mode 100644
index 0000000..8c0ed1a
--- /dev/null
+++ b/inc/OpenGl_TextureBufferArb.hxx
@@ -0,0 +1,97 @@
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _OpenGl_TextureBufferArb_H__
+#define _OpenGl_TextureBufferArb_H__
+
+#include <OpenGl_VertexBuffer.hxx>
+#include <OpenGl_ArbTBO.hxx>
+
+//! Texture Buffer Object.
+//! This is a special 1D texture that VBO-style initialized.
+//! The main differences from general 1D texture:
+//!  - no interpolation between field;
+//!  - greater sizes;
+//!  - special sampler object in GLSL shader to access data by index.
+//!
+//! Notice that though TBO is inherited from VBO this is to unify design
+//! user shouldn't cast it to base class and all really useful methods
+//! are declared in this class.
+class OpenGl_TextureBufferArb : public OpenGl_VertexBuffer
+{
+
+public:
+
+  //! Helpful constants
+  static const GLuint NO_TEXTURE = 0;
+
+public:
+
+  //! Create uninitialized TBO.
+  Standard_EXPORT OpenGl_TextureBufferArb();
+
+  //! Destroy object, will throw exception if GPU memory not released with Release() before.
+  Standard_EXPORT virtual ~OpenGl_TextureBufferArb();
+
+  //! Override VBO target
+  Standard_EXPORT virtual GLenum GetTarget() const;
+
+  //! Returns true if TBO is valid.
+  //! Notice that no any real GL call is performed!
+  bool IsValid() const
+  {
+    return OpenGl_VertexBuffer::IsValid()
+        && myTextureId != NO_TEXTURE;
+  }
+
+  //! Destroy object - will release GPU memory if any.
+  Standard_EXPORT virtual void Release (const OpenGl_Context* theGlCtx);
+
+  //! Creates VBO and Texture names (ids) if not yet generated.
+  //! Data should be initialized by another method.
+  Standard_EXPORT bool Create (const Handle(OpenGl_Context)& theGlCtx);
+
+  //! Perform TBO initialization with specified data.
+  //! Existing data will be deleted.
+  Standard_EXPORT bool Init (const Handle(OpenGl_Context)& theGlCtx,
+                             const GLuint   theComponentsNb,
+                             const GLsizei  theElemsNb,
+                             const GLfloat* theData);
+
+  //! Bind TBO to specified Texture Unit.
+  Standard_EXPORT void BindTexture (const Handle(OpenGl_Context)& theGlCtx,
+                                    const GLenum theTextureUnit = GL_TEXTURE0) const;
+
+  //! Unbind TBO.
+  Standard_EXPORT void UnbindTexture (const Handle(OpenGl_Context)& theGlCtx,
+                                      const GLenum theTextureUnit = GL_TEXTURE0) const;
+
+protected:
+
+  GLuint myTextureId; //!< texture id
+  GLenum myTexFormat; //!< internal texture format
+
+public:
+
+  DEFINE_STANDARD_RTTI(OpenGl_TextureBufferArb) // Type definition
+
+};
+
+DEFINE_STANDARD_HANDLE(OpenGl_TextureBufferArb, OpenGl_VertexBuffer)
+
+#endif // _OpenGl_TextureBufferArb_H__
diff --git a/inc/OpenGl_VertexBuffer.hxx b/inc/OpenGl_VertexBuffer.hxx
new file mode 100644
index 0000000..d691615
--- /dev/null
+++ b/inc/OpenGl_VertexBuffer.hxx
@@ -0,0 +1,158 @@
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _OpenGl_VertexBuffer_H__
+#define _OpenGl_VertexBuffer_H__
+
+#include <OpenGl_GlCore20.hxx>
+#include <OpenGl_Resource.hxx>
+
+class Handle(OpenGl_Context);
+class OpenGl_Context;
+
+//! Vertex Buffer Object - is a general storage object for vertex attributes (position, normal, color).
+//! Notice that you should use OpenGl_IndexBuffer specialization for array of indices.
+class OpenGl_VertexBuffer : public OpenGl_Resource
+{
+
+public:
+
+  //! Helpful constants
+  static const GLuint NO_BUFFER = 0;
+
+public:
+
+  //! Create uninitialized VBO.
+  Standard_EXPORT OpenGl_VertexBuffer();
+
+  //! Destroy object.
+  Standard_EXPORT virtual ~OpenGl_VertexBuffer();
+
+  Standard_EXPORT virtual GLenum GetTarget() const;
+
+  //! @return true if current object was initialized
+  inline bool IsValid() const
+  {
+    return myBufferId != NO_BUFFER;
+  }
+
+  //! @return the number of components per generic vertex attribute.
+  inline GLuint GetComponentsNb() const
+  {
+    return myComponentsNb;
+  }
+
+  //! @return number of vertex attributes / number of vertices.
+  inline GLsizei GetElemsNb() const
+  {
+    return myElemsNb;
+  }
+
+  //! @return data type of each component in the array.
+  inline GLenum GetDataType() const
+  {
+    return myDataType;
+  }
+
+  //! Creates VBO name (id) if not yet generated.
+  //! Data should be initialized by another method.
+  Standard_EXPORT bool Create (const Handle(OpenGl_Context)& theGlCtx);
+
+  //! Destroy object - will release GPU memory if any.
+  Standard_EXPORT virtual void Release (const OpenGl_Context* theGlCtx);
+
+  //! Bind this VBO.
+  Standard_EXPORT void Bind (const Handle(OpenGl_Context)& theGlCtx) const;
+
+  //! Unbind this VBO.
+  Standard_EXPORT void Unbind (const Handle(OpenGl_Context)& theGlCtx) const;
+
+  //! Notice that VBO will be unbound after this call.
+  //! @param theComponentsNb - specifies the number of components per generic vertex attribute; must be 1, 2, 3, or 4;
+  //! @param theElemsNb      - elements count;
+  //! @param theData         - pointer to GLfloat data (vertices/normals etc.).
+  Standard_EXPORT bool Init (const Handle(OpenGl_Context)& theGlCtx,
+                             const GLuint   theComponentsNb,
+                             const GLsizei  theElemsNb,
+                             const GLfloat* theData);
+
+  //! Notice that VBO will be unbound after this call.
+  //! @param theComponentsNb - specifies the number of components per generic vertex attribute; must be 1, 2, 3, or 4;
+  //! @param theElemsNb      - elements count;
+  //! @param theData         - pointer to GLuint data (indices etc.).
+  Standard_EXPORT bool Init (const Handle(OpenGl_Context)& theGlCtx,
+                             const GLuint  theComponentsNb,
+                             const GLsizei theElemsNb,
+                             const GLuint* theData);
+
+  //! Notice that VBO will be unbound after this call.
+  //! @param theComponentsNb - specifies the number of components per generic vertex attribute; must be 1, 2, 3, or 4;
+  //! @param theElemsNb      - elements count;
+  //! @param theData         - pointer to GLubyte data (indices/colors etc.).
+  Standard_EXPORT bool Init (const Handle(OpenGl_Context)& theGlCtx,
+                             const GLuint   theComponentsNb,
+                             const GLsizei  theElemsNb,
+                             const GLubyte* theData);
+
+  //! Notice that VBO will be unbound after this call.
+  //! Function replaces portion of data within this VBO using glBufferSubData().
+  //! The VBO should be initialized before call.
+  //! @param theElemFrom - element id from which replace buffer data (>=0);
+  //! @param theElemsNb  - elements count (theElemFrom + theElemsNb < GetElemsNb());
+  //! @param theData     - pointer to GLfloat data.
+  Standard_EXPORT bool SubData (const Handle(OpenGl_Context)& theGlCtx,
+                                const GLsizei  theElemFrom,
+                                const GLsizei  theElemsNb,
+                                const GLfloat* theData);
+
+  //! Bind this VBO to active GLSL program.
+  Standard_EXPORT void BindVertexAttrib (const Handle(OpenGl_Context)& theGlCtx,
+                                         const GLuint                  theAttribLoc) const;
+
+  //! Unbind any VBO from active GLSL program.
+  Standard_EXPORT void UnbindVertexAttrib (const Handle(OpenGl_Context)& theGlCtx,
+                                           const GLuint                  theAttribLoc) const;
+
+  //! Bind this VBO as fixed pipeline attribute.
+  //! @param theGlCtx - handle to bound GL context;
+  //! @param theMode  - array mode (GL_VERTEX_ARRAY, GL_NORMAL_ARRAY, GL_COLOR_ARRAY, GL_INDEX_ARRAY, GL_TEXTURE_COORD_ARRAY).
+  Standard_EXPORT void BindFixed (const Handle(OpenGl_Context)& theGlCtx,
+                                  const GLenum                  theMode) const;
+
+  //! Unbind this VBO as fixed pipeline attribute.
+  //! @param theGlCtx - handle to bound GL context;
+  //! @param theMode  - array mode.
+  Standard_EXPORT void UnbindFixed (const Handle(OpenGl_Context)& theGlCtx,
+                                    const GLenum                  theMode) const;
+
+protected:
+
+  GLuint  myBufferId;     //!< VBO name (index)
+  GLuint  myComponentsNb; //!< Number of components per generic vertex attribute, must be 1, 2, 3, or 4
+  GLsizei myElemsNb;      //!< Number of vertex attributes / number of vertices
+  GLenum  myDataType;     //!< Data type (GL_FLOAT, GL_UNSIGNED_INT, GL_UNSIGNED_BYTE etc.)
+
+public:
+
+  DEFINE_STANDARD_RTTI(OpenGl_VertexBuffer) // Type definition
+
+};
+
+DEFINE_STANDARD_HANDLE(OpenGl_VertexBuffer, OpenGl_Resource)
+
+#endif // _OpenGl_VertexBuffer_H__
diff --git a/inc/OpenGl_VertexBufferEditor.hxx b/inc/OpenGl_VertexBufferEditor.hxx
new file mode 100644
index 0000000..b150cb8
--- /dev/null
+++ b/inc/OpenGl_VertexBufferEditor.hxx
@@ -0,0 +1,123 @@
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifndef _OpenGl_VertexBufferEditor_H__
+#define _OpenGl_VertexBufferEditor_H__
+
+#include <OpenGl_VertexBuffer.hxx>
+#include <OpenGl_Context.hxx>
+
+#include <NCollection_Array1.hxx>
+
+//! Auxiliary class to iteratively modify data of existing VBO.
+//! It provides iteration interface with delayed CPU->GPU memory transfer to avoid slow per-element data transfer.
+//! User should explicitly call Flush() method to ensure that all data is transferred to VBO.
+//! Temporary buffer on CPU side can be initialized with lesser capacity than  VBO
+//! to allow re-usage of shared buffer with fixed size between VBOs.
+//!
+//! You should use NCollection_Vec2/NCollection_Vec3/NCollection_Vec4 with appropriate length
+//! to instantiate this template and access elements in VBO.
+//!
+//! Notice that this technique designed for VBO streaming scenarios (when VBO is modified from time to time).
+//! Also this class doesn't retrieve existing data from VBO - data transferred only in one direction!
+//! In case of static data this is preferred to upload it within one call during VBO initialization.
+template<typename theVec_t>
+class OpenGl_VertexBufferEditor
+{
+
+public:
+
+  //! Creates empty editor
+  //! theTmpBufferLength - temporary buffer length
+  OpenGl_VertexBufferEditor (const Standard_Integer theTmpBufferLength = 0)
+  : myElemFrom (0),
+    myElemsNb (0),
+    myTmpBuffer (0, theTmpBufferLength > 0 ? (theTmpBufferLength - 1) : 2047) {}
+
+  //! Creates empty editor
+  //! theTmpBuffer       - pointer to temporary buffer
+  //! theTmpBufferLength - temporary buffer length
+  OpenGl_VertexBufferEditor (theVec_t*              theTmpBuffer,
+                             const Standard_Integer theTmpBufferLength)
+  : myElemFrom (0),
+    myElemsNb (0),
+    myTmpBuffer (theTmpBuffer[0], 0, theTmpBufferLength - 1) {}
+
+  //! Initialize editor for specified VBO.
+  //! theGlCtx - bound OpenGL context to edit VBO
+  //! theVbo   - VBO to edit
+  Standard_Boolean Init (const Handle(OpenGl_Context)&      theGlCtx,
+                         const Handle(OpenGl_VertexBuffer)& theVbo)
+  {
+    myGlCtx = theGlCtx;
+    myVbo   = theVbo;
+    if (myGlCtx.IsNull() || myVbo.IsNull() || !myVbo->IsValid() || myVbo->GetComponentsNb() != GLuint (theVec_t::Length()))
+    {
+      return Standard_False;
+    }
+
+    myElemFrom = myElemsNb = 0;
+    return Standard_True;
+  }
+
+  //! Modify current element in VBO.
+  theVec_t& Value()
+  {
+      return myTmpBuffer.ChangeValue (myElemsNb);
+  }
+
+  //! Move to the next position in VBO.
+  Standard_Boolean Next()
+  {
+      if (++myElemsNb > myTmpBuffer.Upper())
+      {
+          return Flush();
+      }
+      return Standard_True;
+  }
+
+  //! Push current data from local buffer to VBO.
+  Standard_Boolean Flush()
+  {
+      if (myElemsNb <= 0)
+      {
+          return Standard_True;
+      }
+
+      if (!myVbo->SubData (myGlCtx, myElemFrom, myElemsNb, &myTmpBuffer.Value (0)[0]))
+      {
+          // should never happens
+          return Standard_False;
+      }
+      myElemFrom += myElemsNb;
+      myElemsNb = 0;
+
+      return Standard_True;
+  }
+
+private:
+
+  Handle(OpenGl_Context)       myGlCtx;     //!< handle to current OpenGL context
+  Handle(OpenGl_VertexBuffer)  myVbo;       //!< edited VBO
+  Standard_Integer             myElemFrom;  //!< element in VBO to upload from
+  Standard_Integer             myElemsNb;   //!< current element in temporary buffer
+  NCollection_Array1<theVec_t> myTmpBuffer; //!< temporary array
+
+};
+
+#endif // _OpenGl_VertexBufferEditor_H__
diff --git a/inc/OpenGl_Window.hxx b/inc/OpenGl_Window.hxx
index 12babfc..9cd61e7 100644
--- a/inc/OpenGl_Window.hxx
+++ b/inc/OpenGl_Window.hxx
@@ -17,19 +17,17 @@
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
-
 #ifndef _OpenGl_Window_Header
 #define _OpenGl_Window_Header
 
-#include <Handle_OpenGl_Window.hxx>
-#include <MMgt_TShared.hxx>
-
-#include <InterfaceGraphic.hxx>
+#include <OpenGl_GlCore11.hxx>
 #include <InterfaceGraphic_Aspect.hxx>
-#include <InterfaceGraphic_telem.hxx>
 
-#include <Handle_OpenGl_Display.hxx>
 #include <Handle_OpenGl_Context.hxx>
+#include <Handle_OpenGl_Display.hxx>
+#include <Handle_OpenGl_Window.hxx>
+
+#include <MMgt_TShared.hxx>
 
 //! This class represents low-level wrapper over window with GL context.
 //! The window itself should be provided to constructor.
@@ -40,7 +38,8 @@ public:
   //! Main constructor - prepare GL context for specified window.
   OpenGl_Window (const Handle(OpenGl_Display)& theDisplay,
                  const CALL_DEF_WINDOW&        theCWindow,
-                 Aspect_RenderingContext       theGContext);
+                 Aspect_RenderingContext       theGContext,
+                 const Handle(OpenGl_Context)& theShareCtx);
 
   //! Destructor
   virtual ~OpenGl_Window();
@@ -70,8 +69,8 @@ public:
 
   const Handle(OpenGl_Context)& GetGlContext() const { return myGlContext; }
 
-  WINDOW    GetWindow()   const { return myWindow; }
-  GLCONTEXT GetGContext() const { return myGContext; }
+  //! This method will be removed in future version!
+  GLCONTEXT GetGContext() const;
 
 protected:
 
@@ -96,12 +95,9 @@ protected:
 protected:
 
   Handle(OpenGl_Display) myDisplay;
-  WINDOW                 myWindow;      //!< native window handle, system-specific
   Handle(OpenGl_Context) myGlContext;
-  GLCONTEXT              myGContext;    //!< native GL context bound to this window, system-specific
   Standard_Boolean       myOwnGContext; //!< set to TRUE if GL context was not created by this class
 #if (defined(_WIN32) || defined(__WIN32__))
-  HDC                    myWindowDC;
   BOOL                   mySysPalInUse;
 #endif
 
diff --git a/inc/OpenGl_Workspace.hxx b/inc/OpenGl_Workspace.hxx
index d689a1f..e43eea7 100644
--- a/inc/OpenGl_Workspace.hxx
+++ b/inc/OpenGl_Workspace.hxx
@@ -33,7 +33,7 @@
 #include <Aspect_Handle.hxx>
 #include <Aspect_PrintAlgo.hxx>
 #include <Graphic3d_PtrFrameBuffer.hxx>
-#include <Image_CRawBufferData.hxx>
+#include <Graphic3d_BufferType.hxx>
 
 #include <InterfaceGraphic_Graphic3d.hxx>
 #include <InterfaceGraphic_Visual3d.hxx>
@@ -53,6 +53,7 @@ class OpenGl_AspectMarker;
 class OpenGl_AspectText;
 class OpenGl_FrameBuffer;
 class OpenGl_Structure;
+class Image_PixMap;
 
 //! Reprepsents window with GL context.
 //! Provides methods to render primitives and maintan GL state.
@@ -63,7 +64,8 @@ public:
   //! Main constructor - prepare GL context for specified window.
   OpenGl_Workspace (const Handle(OpenGl_Display)& theDisplay,
                     const CALL_DEF_WINDOW&        theCWindow,
-                    Aspect_RenderingContext       theGContext);
+                    Aspect_RenderingContext       theGContext,
+                    const Handle(OpenGl_Context)& theShareCtx);
 
   //! Destructor
   virtual ~OpenGl_Workspace();
@@ -126,7 +128,9 @@ public:
 
   Graphic3d_PtrFrameBuffer FBOCreate (const Standard_Integer theWidth, const Standard_Integer theHeight);
   void FBORelease (Graphic3d_PtrFrameBuffer theFBOPtr);
-  Standard_Boolean BufferDump (OpenGl_FrameBuffer *theFBOPtr, Image_CRawBufferData& theBuffer);
+  Standard_Boolean BufferDump (OpenGl_FrameBuffer*         theFBOPtr,
+                               Image_PixMap&               theImage,
+                               const Graphic3d_BufferType& theBufferType);
 
   void UseTransparency (const Standard_Boolean theFlag);
   Standard_Boolean& UseZBuffer()   { return myUseZBuffer; }
@@ -163,11 +167,11 @@ public:
 
   //// RELATED TO FONTS ////
 
-  int FindFont (const char*          theFontName,
-                const OSD_FontAspect theFontAspect,
-                const int            theBestSize = -1,
-                const float          theXScale = 1.0f,
-                const float          theYScale = 1.0f)
+  int FindFont (const char*           theFontName,
+                const Font_FontAspect theFontAspect,
+                const int             theBestSize = -1,
+                const float           theXScale = 1.0f,
+                const float           theYScale = 1.0f)
   {
     return myDisplay->FindFont (theFontName, theFontAspect, theBestSize, theXScale, theYScale);
   }
diff --git a/inc/PCDM.hxx b/inc/PCDM.hxx
index da048ab..eb3c2a7 100644
--- a/inc/PCDM.hxx
+++ b/inc/PCDM.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class PCDM_SequenceNodeOfSequenceOfReference;
 class PCDM  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean FindStorageDriver(const Handle(CDM_Document)& aDocument) ;
diff --git a/inc/PCDM_Reference.hxx b/inc/PCDM_Reference.hxx
index 26be982..a23b2f8 100644
--- a/inc/PCDM_Reference.hxx
+++ b/inc/PCDM_Reference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TCollection_ExtendedString;
 class PCDM_Reference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PCDM_Reference();
diff --git a/inc/PCDM_SequenceOfDocument.hxx b/inc/PCDM_SequenceOfDocument.hxx
index 84d7e09..1fb4c1c 100644
--- a/inc/PCDM_SequenceOfDocument.hxx
+++ b/inc/PCDM_SequenceOfDocument.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class PCDM_SequenceNodeOfSequenceOfDocument;
 class PCDM_SequenceOfDocument  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       PCDM_SequenceOfDocument();
diff --git a/inc/PCDM_SequenceOfReference.hxx b/inc/PCDM_SequenceOfReference.hxx
index cb38988..8cf8a4a 100644
--- a/inc/PCDM_SequenceOfReference.hxx
+++ b/inc/PCDM_SequenceOfReference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class PCDM_SequenceNodeOfSequenceOfReference;
 class PCDM_SequenceOfReference  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       PCDM_SequenceOfReference();
diff --git a/inc/PColPGeom2d_FieldOfHArray1OfBSplineCurve.hxx b/inc/PColPGeom2d_FieldOfHArray1OfBSplineCurve.hxx
index cd6af50..49a2c10 100644
--- a/inc/PColPGeom2d_FieldOfHArray1OfBSplineCurve.hxx
+++ b/inc/PColPGeom2d_FieldOfHArray1OfBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom2d_FieldOfHA
 class PColPGeom2d_FieldOfHArray1OfBSplineCurve  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom2d_FieldOfHArray1OfBSplineCurve();
diff --git a/inc/PColPGeom2d_FieldOfHArray1OfBezierCurve.hxx b/inc/PColPGeom2d_FieldOfHArray1OfBezierCurve.hxx
index adf6d47..05ad0bc 100644
--- a/inc/PColPGeom2d_FieldOfHArray1OfBezierCurve.hxx
+++ b/inc/PColPGeom2d_FieldOfHArray1OfBezierCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom2d_FieldOfHA
 class PColPGeom2d_FieldOfHArray1OfBezierCurve  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom2d_FieldOfHArray1OfBezierCurve();
diff --git a/inc/PColPGeom2d_FieldOfHArray1OfBoundedCurve.hxx b/inc/PColPGeom2d_FieldOfHArray1OfBoundedCurve.hxx
index 09aaf63..bd3c69f 100644
--- a/inc/PColPGeom2d_FieldOfHArray1OfBoundedCurve.hxx
+++ b/inc/PColPGeom2d_FieldOfHArray1OfBoundedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom2d_FieldOfHA
 class PColPGeom2d_FieldOfHArray1OfBoundedCurve  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom2d_FieldOfHArray1OfBoundedCurve();
diff --git a/inc/PColPGeom2d_FieldOfHArray1OfCurve.hxx b/inc/PColPGeom2d_FieldOfHArray1OfCurve.hxx
index 7445f40..05b4828 100644
--- a/inc/PColPGeom2d_FieldOfHArray1OfCurve.hxx
+++ b/inc/PColPGeom2d_FieldOfHArray1OfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom2d_FieldOfHA
 class PColPGeom2d_FieldOfHArray1OfCurve  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom2d_FieldOfHArray1OfCurve();
diff --git a/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBSplineCurve.hxx b/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBSplineCurve.hxx
index 00ed496..398faba 100644
--- a/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBSplineCurve.hxx
+++ b/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom2d_VArrayNodeOfFieldOfHArray1OfBSplineCurve;
 class PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBSplineCurve();
   
diff --git a/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBezierCurve.hxx b/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBezierCurve.hxx
index f5fa962..165142d 100644
--- a/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBezierCurve.hxx
+++ b/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBezierCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom2d_VArrayNodeOfFieldOfHArray1OfBezierCurve;
 class PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBezierCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBezierCurve();
   
diff --git a/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBoundedCurve.hxx b/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBoundedCurve.hxx
index d716f70..9f2dede 100644
--- a/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBoundedCurve.hxx
+++ b/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBoundedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom2d_VArrayNodeOfFieldOfHArray1OfBoundedCurve;
 class PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBoundedCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfBoundedCurve();
   
diff --git a/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfCurve.hxx b/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfCurve.hxx
index 8e1b738..0e9eb34 100644
--- a/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfCurve.hxx
+++ b/inc/PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom2d_VArrayNodeOfFieldOfHArray1OfCurve;
 class PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom2d_VArrayTNodeOfFieldOfHArray1OfCurve();
   
diff --git a/inc/PColPGeom_FieldOfHArray1OfBSplineCurve.hxx b/inc/PColPGeom_FieldOfHArray1OfBSplineCurve.hxx
index cb2aeaf..181944c 100644
--- a/inc/PColPGeom_FieldOfHArray1OfBSplineCurve.hxx
+++ b/inc/PColPGeom_FieldOfHArray1OfBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom_FieldOfHArr
 class PColPGeom_FieldOfHArray1OfBSplineCurve  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom_FieldOfHArray1OfBSplineCurve();
diff --git a/inc/PColPGeom_FieldOfHArray1OfBezierCurve.hxx b/inc/PColPGeom_FieldOfHArray1OfBezierCurve.hxx
index c5ae399..2aa77a2 100644
--- a/inc/PColPGeom_FieldOfHArray1OfBezierCurve.hxx
+++ b/inc/PColPGeom_FieldOfHArray1OfBezierCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom_FieldOfHArr
 class PColPGeom_FieldOfHArray1OfBezierCurve  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom_FieldOfHArray1OfBezierCurve();
diff --git a/inc/PColPGeom_FieldOfHArray1OfBoundedCurve.hxx b/inc/PColPGeom_FieldOfHArray1OfBoundedCurve.hxx
index 39075d4..6853c34 100644
--- a/inc/PColPGeom_FieldOfHArray1OfBoundedCurve.hxx
+++ b/inc/PColPGeom_FieldOfHArray1OfBoundedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom_FieldOfHArr
 class PColPGeom_FieldOfHArray1OfBoundedCurve  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom_FieldOfHArray1OfBoundedCurve();
diff --git a/inc/PColPGeom_FieldOfHArray1OfBoundedSurface.hxx b/inc/PColPGeom_FieldOfHArray1OfBoundedSurface.hxx
index c876175..b80bd7b 100644
--- a/inc/PColPGeom_FieldOfHArray1OfBoundedSurface.hxx
+++ b/inc/PColPGeom_FieldOfHArray1OfBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom_FieldOfHArr
 class PColPGeom_FieldOfHArray1OfBoundedSurface  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom_FieldOfHArray1OfBoundedSurface();
diff --git a/inc/PColPGeom_FieldOfHArray1OfCurve.hxx b/inc/PColPGeom_FieldOfHArray1OfCurve.hxx
index 0020ea5..26db7fd 100644
--- a/inc/PColPGeom_FieldOfHArray1OfCurve.hxx
+++ b/inc/PColPGeom_FieldOfHArray1OfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom_FieldOfHArr
 class PColPGeom_FieldOfHArray1OfCurve  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom_FieldOfHArray1OfCurve();
diff --git a/inc/PColPGeom_FieldOfHArray1OfSurface.hxx b/inc/PColPGeom_FieldOfHArray1OfSurface.hxx
index 3df7cb2..fcede5a 100644
--- a/inc/PColPGeom_FieldOfHArray1OfSurface.hxx
+++ b/inc/PColPGeom_FieldOfHArray1OfSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom_FieldOfHArr
 class PColPGeom_FieldOfHArray1OfSurface  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom_FieldOfHArray1OfSurface();
diff --git a/inc/PColPGeom_FieldOfHArray2OfBSplineSurface.hxx b/inc/PColPGeom_FieldOfHArray2OfBSplineSurface.hxx
index 79d7bb7..f3275f0 100644
--- a/inc/PColPGeom_FieldOfHArray2OfBSplineSurface.hxx
+++ b/inc/PColPGeom_FieldOfHArray2OfBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom_FieldOfHArr
 class PColPGeom_FieldOfHArray2OfBSplineSurface  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom_FieldOfHArray2OfBSplineSurface();
diff --git a/inc/PColPGeom_FieldOfHArray2OfBezierSurface.hxx b/inc/PColPGeom_FieldOfHArray2OfBezierSurface.hxx
index d901044..b08fcf9 100644
--- a/inc/PColPGeom_FieldOfHArray2OfBezierSurface.hxx
+++ b/inc/PColPGeom_FieldOfHArray2OfBezierSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom_FieldOfHArr
 class PColPGeom_FieldOfHArray2OfBezierSurface  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom_FieldOfHArray2OfBezierSurface();
diff --git a/inc/PColPGeom_FieldOfHArray2OfBoundedSurface.hxx b/inc/PColPGeom_FieldOfHArray2OfBoundedSurface.hxx
index 0661d7f..fc75787 100644
--- a/inc/PColPGeom_FieldOfHArray2OfBoundedSurface.hxx
+++ b/inc/PColPGeom_FieldOfHArray2OfBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom_FieldOfHArr
 class PColPGeom_FieldOfHArray2OfBoundedSurface  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom_FieldOfHArray2OfBoundedSurface();
diff --git a/inc/PColPGeom_FieldOfHArray2OfSurface.hxx b/inc/PColPGeom_FieldOfHArray2OfSurface.hxx
index e5d47f7..11bd3f7 100644
--- a/inc/PColPGeom_FieldOfHArray2OfSurface.hxx
+++ b/inc/PColPGeom_FieldOfHArray2OfSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColPGeom_FieldOfHArr
 class PColPGeom_FieldOfHArray2OfSurface  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColPGeom_FieldOfHArray2OfSurface();
diff --git a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBSplineCurve.hxx b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBSplineCurve.hxx
index 29b3f67..6fa5379 100644
--- a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBSplineCurve.hxx
+++ b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom_VArrayNodeOfFieldOfHArray1OfBSplineCurve;
 class PColPGeom_VArrayTNodeOfFieldOfHArray1OfBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom_VArrayTNodeOfFieldOfHArray1OfBSplineCurve();
   
diff --git a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBezierCurve.hxx b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBezierCurve.hxx
index ce66db6..a1444bd 100644
--- a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBezierCurve.hxx
+++ b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBezierCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom_VArrayNodeOfFieldOfHArray1OfBezierCurve;
 class PColPGeom_VArrayTNodeOfFieldOfHArray1OfBezierCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom_VArrayTNodeOfFieldOfHArray1OfBezierCurve();
   
diff --git a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBoundedCurve.hxx b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBoundedCurve.hxx
index dd47ac5..0b3fb1c 100644
--- a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBoundedCurve.hxx
+++ b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBoundedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom_VArrayNodeOfFieldOfHArray1OfBoundedCurve;
 class PColPGeom_VArrayTNodeOfFieldOfHArray1OfBoundedCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom_VArrayTNodeOfFieldOfHArray1OfBoundedCurve();
   
diff --git a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBoundedSurface.hxx b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBoundedSurface.hxx
index 9d99adf..ddbfac6 100644
--- a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBoundedSurface.hxx
+++ b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom_VArrayNodeOfFieldOfHArray1OfBoundedSurface;
 class PColPGeom_VArrayTNodeOfFieldOfHArray1OfBoundedSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom_VArrayTNodeOfFieldOfHArray1OfBoundedSurface();
   
diff --git a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfCurve.hxx b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfCurve.hxx
index ba82d8e..546e5b2 100644
--- a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfCurve.hxx
+++ b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom_VArrayNodeOfFieldOfHArray1OfCurve;
 class PColPGeom_VArrayTNodeOfFieldOfHArray1OfCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom_VArrayTNodeOfFieldOfHArray1OfCurve();
   
diff --git a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfSurface.hxx b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfSurface.hxx
index 42b2738..f254d01 100644
--- a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfSurface.hxx
+++ b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray1OfSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom_VArrayNodeOfFieldOfHArray1OfSurface;
 class PColPGeom_VArrayTNodeOfFieldOfHArray1OfSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom_VArrayTNodeOfFieldOfHArray1OfSurface();
   
diff --git a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfBSplineSurface.hxx b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfBSplineSurface.hxx
index 543e18e..c32ba87 100644
--- a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfBSplineSurface.hxx
+++ b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom_VArrayNodeOfFieldOfHArray2OfBSplineSurface;
 class PColPGeom_VArrayTNodeOfFieldOfHArray2OfBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom_VArrayTNodeOfFieldOfHArray2OfBSplineSurface();
   
diff --git a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfBezierSurface.hxx b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfBezierSurface.hxx
index 4ac3a86..4b97777 100644
--- a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfBezierSurface.hxx
+++ b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfBezierSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom_VArrayNodeOfFieldOfHArray2OfBezierSurface;
 class PColPGeom_VArrayTNodeOfFieldOfHArray2OfBezierSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom_VArrayTNodeOfFieldOfHArray2OfBezierSurface();
   
diff --git a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfBoundedSurface.hxx b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfBoundedSurface.hxx
index fb80adc..89793f6 100644
--- a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfBoundedSurface.hxx
+++ b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom_VArrayNodeOfFieldOfHArray2OfBoundedSurface;
 class PColPGeom_VArrayTNodeOfFieldOfHArray2OfBoundedSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom_VArrayTNodeOfFieldOfHArray2OfBoundedSurface();
   
diff --git a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfSurface.hxx b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfSurface.hxx
index 757af83..b013abe 100644
--- a/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfSurface.hxx
+++ b/inc/PColPGeom_VArrayTNodeOfFieldOfHArray2OfSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColPGeom_VArrayNodeOfFieldOfHArray2OfSurface;
 class PColPGeom_VArrayTNodeOfFieldOfHArray2OfSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColPGeom_VArrayTNodeOfFieldOfHArray2OfSurface();
   
diff --git a/inc/PColStd_FieldOfHArray1OfExtendedString.hxx b/inc/PColStd_FieldOfHArray1OfExtendedString.hxx
index f760761..06e56d8 100644
--- a/inc/PColStd_FieldOfHArray1OfExtendedString.hxx
+++ b/inc/PColStd_FieldOfHArray1OfExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_FieldOfHArray
 class PColStd_FieldOfHArray1OfExtendedString  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_FieldOfHArray1OfExtendedString();
diff --git a/inc/PColStd_FieldOfHArray1OfInteger.hxx b/inc/PColStd_FieldOfHArray1OfInteger.hxx
index 37c33f6..283d195 100644
--- a/inc/PColStd_FieldOfHArray1OfInteger.hxx
+++ b/inc/PColStd_FieldOfHArray1OfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_FieldOfHArray
 class PColStd_FieldOfHArray1OfInteger  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_FieldOfHArray1OfInteger();
diff --git a/inc/PColStd_FieldOfHArray1OfPersistent.hxx b/inc/PColStd_FieldOfHArray1OfPersistent.hxx
index 92849a2..aaae276 100644
--- a/inc/PColStd_FieldOfHArray1OfPersistent.hxx
+++ b/inc/PColStd_FieldOfHArray1OfPersistent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_FieldOfHArray
 class PColStd_FieldOfHArray1OfPersistent  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_FieldOfHArray1OfPersistent();
diff --git a/inc/PColStd_FieldOfHArray1OfReal.hxx b/inc/PColStd_FieldOfHArray1OfReal.hxx
index c054c01..4efc9a5 100644
--- a/inc/PColStd_FieldOfHArray1OfReal.hxx
+++ b/inc/PColStd_FieldOfHArray1OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_FieldOfHArray
 class PColStd_FieldOfHArray1OfReal  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_FieldOfHArray1OfReal();
diff --git a/inc/PColStd_FieldOfHArray2OfInteger.hxx b/inc/PColStd_FieldOfHArray2OfInteger.hxx
index c575308..9a43daa 100644
--- a/inc/PColStd_FieldOfHArray2OfInteger.hxx
+++ b/inc/PColStd_FieldOfHArray2OfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_FieldOfHArray
 class PColStd_FieldOfHArray2OfInteger  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_FieldOfHArray2OfInteger();
diff --git a/inc/PColStd_FieldOfHArray2OfPersistent.hxx b/inc/PColStd_FieldOfHArray2OfPersistent.hxx
index 44613f8..5ed085d 100644
--- a/inc/PColStd_FieldOfHArray2OfPersistent.hxx
+++ b/inc/PColStd_FieldOfHArray2OfPersistent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_FieldOfHArray
 class PColStd_FieldOfHArray2OfPersistent  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_FieldOfHArray2OfPersistent();
diff --git a/inc/PColStd_FieldOfHArray2OfReal.hxx b/inc/PColStd_FieldOfHArray2OfReal.hxx
index 96c21a1..b5dfd05 100644
--- a/inc/PColStd_FieldOfHArray2OfReal.hxx
+++ b/inc/PColStd_FieldOfHArray2OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_FieldOfHArray
 class PColStd_FieldOfHArray2OfReal  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_FieldOfHArray2OfReal();
diff --git a/inc/PColStd_HOfAsciiString.hxx b/inc/PColStd_HOfAsciiString.hxx
index 5289a45..3c73cd8 100644
--- a/inc/PColStd_HOfAsciiString.hxx
+++ b/inc/PColStd_HOfAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_HOfAsciiStrin
 class PColStd_HOfAsciiString  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_HOfAsciiString();
diff --git a/inc/PColStd_HOfExtendedString.hxx b/inc/PColStd_HOfExtendedString.hxx
index c5942ef..9712686 100644
--- a/inc/PColStd_HOfExtendedString.hxx
+++ b/inc/PColStd_HOfExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_HOfExtendedSt
 class PColStd_HOfExtendedString  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_HOfExtendedString();
diff --git a/inc/PColStd_HOfInteger.hxx b/inc/PColStd_HOfInteger.hxx
index 7349a3a..a03d70d 100644
--- a/inc/PColStd_HOfInteger.hxx
+++ b/inc/PColStd_HOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_HOfInteger);
 class PColStd_HOfInteger  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_HOfInteger();
diff --git a/inc/PColStd_HOfReal.hxx b/inc/PColStd_HOfReal.hxx
index 69cdaa7..14b4526 100644
--- a/inc/PColStd_HOfReal.hxx
+++ b/inc/PColStd_HOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_HOfReal);
 class PColStd_HOfReal  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_HOfReal();
diff --git a/inc/PColStd_HashAsciiString.hxx b/inc/PColStd_HashAsciiString.hxx
index 41d0e66..71f06c1 100644
--- a/inc/PColStd_HashAsciiString.hxx
+++ b/inc/PColStd_HashAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_HashAsciiStri
 class PColStd_HashAsciiString  : public PColStd_HOfAsciiString {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   PColStd_HashAsciiString();
diff --git a/inc/PColStd_HashExtendedString.hxx b/inc/PColStd_HashExtendedString.hxx
index bada0d3..7da84f9 100644
--- a/inc/PColStd_HashExtendedString.hxx
+++ b/inc/PColStd_HashExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColStd_HashExtendedS
 class PColStd_HashExtendedString  : public PColStd_HOfExtendedString {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   PColStd_HashExtendedString();
diff --git a/inc/PColStd_SeqExplorerOfHSequenceOfHAsciiString.hxx b/inc/PColStd_SeqExplorerOfHSequenceOfHAsciiString.hxx
index f6e3bfd..4af2096 100644
--- a/inc/PColStd_SeqExplorerOfHSequenceOfHAsciiString.hxx
+++ b/inc/PColStd_SeqExplorerOfHSequenceOfHAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class PCollection_HAsciiString;
 class PColStd_SeqExplorerOfHSequenceOfHAsciiString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_SeqExplorerOfHSequenceOfHAsciiString(const Handle(PColStd_HSequenceOfHAsciiString)& S);
diff --git a/inc/PColStd_SeqExplorerOfHSequenceOfHExtendedString.hxx b/inc/PColStd_SeqExplorerOfHSequenceOfHExtendedString.hxx
index 799a49a..91a24ef 100644
--- a/inc/PColStd_SeqExplorerOfHSequenceOfHExtendedString.hxx
+++ b/inc/PColStd_SeqExplorerOfHSequenceOfHExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class PCollection_HExtendedString;
 class PColStd_SeqExplorerOfHSequenceOfHExtendedString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_SeqExplorerOfHSequenceOfHExtendedString(const Handle(PColStd_HSequenceOfHExtendedString)& S);
diff --git a/inc/PColStd_SeqExplorerOfHSequenceOfInteger.hxx b/inc/PColStd_SeqExplorerOfHSequenceOfInteger.hxx
index d7d508a..858af0a 100644
--- a/inc/PColStd_SeqExplorerOfHSequenceOfInteger.hxx
+++ b/inc/PColStd_SeqExplorerOfHSequenceOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_OutOfRange;
 class PColStd_SeqExplorerOfHSequenceOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_SeqExplorerOfHSequenceOfInteger(const Handle(PColStd_HSequenceOfInteger)& S);
diff --git a/inc/PColStd_SeqExplorerOfHSequenceOfPersistent.hxx b/inc/PColStd_SeqExplorerOfHSequenceOfPersistent.hxx
index 0b32795..ad7c10d 100644
--- a/inc/PColStd_SeqExplorerOfHSequenceOfPersistent.hxx
+++ b/inc/PColStd_SeqExplorerOfHSequenceOfPersistent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Standard_Persistent;
 class PColStd_SeqExplorerOfHSequenceOfPersistent  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_SeqExplorerOfHSequenceOfPersistent(const Handle(PColStd_HSequenceOfPersistent)& S);
diff --git a/inc/PColStd_SeqExplorerOfHSequenceOfReal.hxx b/inc/PColStd_SeqExplorerOfHSequenceOfReal.hxx
index 97101d6..8a1bcf0 100644
--- a/inc/PColStd_SeqExplorerOfHSequenceOfReal.hxx
+++ b/inc/PColStd_SeqExplorerOfHSequenceOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Standard_OutOfRange;
 class PColStd_SeqExplorerOfHSequenceOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColStd_SeqExplorerOfHSequenceOfReal(const Handle(PColStd_HSequenceOfReal)& S);
diff --git a/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfExtendedString.hxx b/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfExtendedString.hxx
index 3c06ccc..318eece 100644
--- a/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfExtendedString.hxx
+++ b/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColStd_VArrayNodeOfFieldOfHArray1OfExtendedString;
 class PColStd_VArrayTNodeOfFieldOfHArray1OfExtendedString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColStd_VArrayTNodeOfFieldOfHArray1OfExtendedString();
   
diff --git a/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfInteger.hxx b/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfInteger.hxx
index 018b6df..d488c69 100644
--- a/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfInteger.hxx
+++ b/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,22 +33,8 @@ class PColStd_VArrayNodeOfFieldOfHArray1OfInteger;
 class PColStd_VArrayTNodeOfFieldOfHArray1OfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColStd_VArrayTNodeOfFieldOfHArray1OfInteger();
   
diff --git a/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfPersistent.hxx b/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfPersistent.hxx
index f166def..04af422 100644
--- a/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfPersistent.hxx
+++ b/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfPersistent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColStd_VArrayNodeOfFieldOfHArray1OfPersistent;
 class PColStd_VArrayTNodeOfFieldOfHArray1OfPersistent  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColStd_VArrayTNodeOfFieldOfHArray1OfPersistent();
   
diff --git a/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfReal.hxx b/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfReal.hxx
index cf43a96..96aff48 100644
--- a/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfReal.hxx
+++ b/inc/PColStd_VArrayTNodeOfFieldOfHArray1OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,22 +33,8 @@ class PColStd_VArrayNodeOfFieldOfHArray1OfReal;
 class PColStd_VArrayTNodeOfFieldOfHArray1OfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColStd_VArrayTNodeOfFieldOfHArray1OfReal();
   
diff --git a/inc/PColStd_VArrayTNodeOfFieldOfHArray2OfInteger.hxx b/inc/PColStd_VArrayTNodeOfFieldOfHArray2OfInteger.hxx
index af278db..864a18f 100644
--- a/inc/PColStd_VArrayTNodeOfFieldOfHArray2OfInteger.hxx
+++ b/inc/PColStd_VArrayTNodeOfFieldOfHArray2OfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,22 +33,8 @@ class PColStd_VArrayNodeOfFieldOfHArray2OfInteger;
 class PColStd_VArrayTNodeOfFieldOfHArray2OfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColStd_VArrayTNodeOfFieldOfHArray2OfInteger();
   
diff --git a/inc/PColStd_VArrayTNodeOfFieldOfHArray2OfPersistent.hxx b/inc/PColStd_VArrayTNodeOfFieldOfHArray2OfPersistent.hxx
index dfaa521..b3c89d1 100644
--- a/inc/PColStd_VArrayTNodeOfFieldOfHArray2OfPersistent.hxx
+++ b/inc/PColStd_VArrayTNodeOfFieldOfHArray2OfPersistent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColStd_VArrayNodeOfFieldOfHArray2OfPersistent;
 class PColStd_VArrayTNodeOfFieldOfHArray2OfPersistent  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColStd_VArrayTNodeOfFieldOfHArray2OfPersistent();
   
diff --git a/inc/PColStd_VArrayTNodeOfFieldOfHArray2OfReal.hxx b/inc/PColStd_VArrayTNodeOfFieldOfHArray2OfReal.hxx
index b78e7e2..678f998 100644
--- a/inc/PColStd_VArrayTNodeOfFieldOfHArray2OfReal.hxx
+++ b/inc/PColStd_VArrayTNodeOfFieldOfHArray2OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,22 +33,8 @@ class PColStd_VArrayNodeOfFieldOfHArray2OfReal;
 class PColStd_VArrayTNodeOfFieldOfHArray2OfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColStd_VArrayTNodeOfFieldOfHArray2OfReal();
   
diff --git a/inc/PColgp_FieldOfHArray1OfCirc2d.hxx b/inc/PColgp_FieldOfHArray1OfCirc2d.hxx
index ca69281..31001cd 100644
--- a/inc/PColgp_FieldOfHArray1OfCirc2d.hxx
+++ b/inc/PColgp_FieldOfHArray1OfCirc2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray1
 class PColgp_FieldOfHArray1OfCirc2d  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray1OfCirc2d();
diff --git a/inc/PColgp_FieldOfHArray1OfDir.hxx b/inc/PColgp_FieldOfHArray1OfDir.hxx
index 967a580..1053448 100644
--- a/inc/PColgp_FieldOfHArray1OfDir.hxx
+++ b/inc/PColgp_FieldOfHArray1OfDir.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray1
 class PColgp_FieldOfHArray1OfDir  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray1OfDir();
diff --git a/inc/PColgp_FieldOfHArray1OfDir2d.hxx b/inc/PColgp_FieldOfHArray1OfDir2d.hxx
index 8e5dad1..069fdd2 100644
--- a/inc/PColgp_FieldOfHArray1OfDir2d.hxx
+++ b/inc/PColgp_FieldOfHArray1OfDir2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray1
 class PColgp_FieldOfHArray1OfDir2d  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray1OfDir2d();
diff --git a/inc/PColgp_FieldOfHArray1OfLin2d.hxx b/inc/PColgp_FieldOfHArray1OfLin2d.hxx
index 80f617f..a25c8e7 100644
--- a/inc/PColgp_FieldOfHArray1OfLin2d.hxx
+++ b/inc/PColgp_FieldOfHArray1OfLin2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray1
 class PColgp_FieldOfHArray1OfLin2d  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray1OfLin2d();
diff --git a/inc/PColgp_FieldOfHArray1OfPnt.hxx b/inc/PColgp_FieldOfHArray1OfPnt.hxx
index 43ab096..f0bc470 100644
--- a/inc/PColgp_FieldOfHArray1OfPnt.hxx
+++ b/inc/PColgp_FieldOfHArray1OfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray1
 class PColgp_FieldOfHArray1OfPnt  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray1OfPnt();
diff --git a/inc/PColgp_FieldOfHArray1OfPnt2d.hxx b/inc/PColgp_FieldOfHArray1OfPnt2d.hxx
index de030a4..b0e7780 100644
--- a/inc/PColgp_FieldOfHArray1OfPnt2d.hxx
+++ b/inc/PColgp_FieldOfHArray1OfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray1
 class PColgp_FieldOfHArray1OfPnt2d  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray1OfPnt2d();
diff --git a/inc/PColgp_FieldOfHArray1OfVec.hxx b/inc/PColgp_FieldOfHArray1OfVec.hxx
index 263db61..2a481bd 100644
--- a/inc/PColgp_FieldOfHArray1OfVec.hxx
+++ b/inc/PColgp_FieldOfHArray1OfVec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray1
 class PColgp_FieldOfHArray1OfVec  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray1OfVec();
diff --git a/inc/PColgp_FieldOfHArray1OfVec2d.hxx b/inc/PColgp_FieldOfHArray1OfVec2d.hxx
index 3ae46dc..4a73645 100644
--- a/inc/PColgp_FieldOfHArray1OfVec2d.hxx
+++ b/inc/PColgp_FieldOfHArray1OfVec2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray1
 class PColgp_FieldOfHArray1OfVec2d  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray1OfVec2d();
diff --git a/inc/PColgp_FieldOfHArray1OfXY.hxx b/inc/PColgp_FieldOfHArray1OfXY.hxx
index 6c77f66..a1e83be 100644
--- a/inc/PColgp_FieldOfHArray1OfXY.hxx
+++ b/inc/PColgp_FieldOfHArray1OfXY.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray1
 class PColgp_FieldOfHArray1OfXY  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray1OfXY();
diff --git a/inc/PColgp_FieldOfHArray1OfXYZ.hxx b/inc/PColgp_FieldOfHArray1OfXYZ.hxx
index 2dd049c..0a61745 100644
--- a/inc/PColgp_FieldOfHArray1OfXYZ.hxx
+++ b/inc/PColgp_FieldOfHArray1OfXYZ.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray1
 class PColgp_FieldOfHArray1OfXYZ  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray1OfXYZ();
diff --git a/inc/PColgp_FieldOfHArray2OfCirc2d.hxx b/inc/PColgp_FieldOfHArray2OfCirc2d.hxx
index 12de1fd..e63485a 100644
--- a/inc/PColgp_FieldOfHArray2OfCirc2d.hxx
+++ b/inc/PColgp_FieldOfHArray2OfCirc2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray2
 class PColgp_FieldOfHArray2OfCirc2d  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray2OfCirc2d();
diff --git a/inc/PColgp_FieldOfHArray2OfDir.hxx b/inc/PColgp_FieldOfHArray2OfDir.hxx
index 3dde797..61d14b1 100644
--- a/inc/PColgp_FieldOfHArray2OfDir.hxx
+++ b/inc/PColgp_FieldOfHArray2OfDir.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray2
 class PColgp_FieldOfHArray2OfDir  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray2OfDir();
diff --git a/inc/PColgp_FieldOfHArray2OfDir2d.hxx b/inc/PColgp_FieldOfHArray2OfDir2d.hxx
index bbccfe9..421fdc0 100644
--- a/inc/PColgp_FieldOfHArray2OfDir2d.hxx
+++ b/inc/PColgp_FieldOfHArray2OfDir2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray2
 class PColgp_FieldOfHArray2OfDir2d  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray2OfDir2d();
diff --git a/inc/PColgp_FieldOfHArray2OfLin2d.hxx b/inc/PColgp_FieldOfHArray2OfLin2d.hxx
index 1b9d1b9..634e7da 100644
--- a/inc/PColgp_FieldOfHArray2OfLin2d.hxx
+++ b/inc/PColgp_FieldOfHArray2OfLin2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray2
 class PColgp_FieldOfHArray2OfLin2d  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray2OfLin2d();
diff --git a/inc/PColgp_FieldOfHArray2OfPnt.hxx b/inc/PColgp_FieldOfHArray2OfPnt.hxx
index 03e90c8..43a0229 100644
--- a/inc/PColgp_FieldOfHArray2OfPnt.hxx
+++ b/inc/PColgp_FieldOfHArray2OfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray2
 class PColgp_FieldOfHArray2OfPnt  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray2OfPnt();
diff --git a/inc/PColgp_FieldOfHArray2OfPnt2d.hxx b/inc/PColgp_FieldOfHArray2OfPnt2d.hxx
index 1b90887..1879f76 100644
--- a/inc/PColgp_FieldOfHArray2OfPnt2d.hxx
+++ b/inc/PColgp_FieldOfHArray2OfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray2
 class PColgp_FieldOfHArray2OfPnt2d  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray2OfPnt2d();
diff --git a/inc/PColgp_FieldOfHArray2OfVec.hxx b/inc/PColgp_FieldOfHArray2OfVec.hxx
index db38e14..7ba8377 100644
--- a/inc/PColgp_FieldOfHArray2OfVec.hxx
+++ b/inc/PColgp_FieldOfHArray2OfVec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray2
 class PColgp_FieldOfHArray2OfVec  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray2OfVec();
diff --git a/inc/PColgp_FieldOfHArray2OfVec2d.hxx b/inc/PColgp_FieldOfHArray2OfVec2d.hxx
index 2e957a2..ab8bdf1 100644
--- a/inc/PColgp_FieldOfHArray2OfVec2d.hxx
+++ b/inc/PColgp_FieldOfHArray2OfVec2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray2
 class PColgp_FieldOfHArray2OfVec2d  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray2OfVec2d();
diff --git a/inc/PColgp_FieldOfHArray2OfXY.hxx b/inc/PColgp_FieldOfHArray2OfXY.hxx
index 043a3c9..3d8eca8 100644
--- a/inc/PColgp_FieldOfHArray2OfXY.hxx
+++ b/inc/PColgp_FieldOfHArray2OfXY.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray2
 class PColgp_FieldOfHArray2OfXY  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray2OfXY();
diff --git a/inc/PColgp_FieldOfHArray2OfXYZ.hxx b/inc/PColgp_FieldOfHArray2OfXYZ.hxx
index a42501d..57a2e07 100644
--- a/inc/PColgp_FieldOfHArray2OfXYZ.hxx
+++ b/inc/PColgp_FieldOfHArray2OfXYZ.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PColgp_FieldOfHArray2
 class PColgp_FieldOfHArray2OfXYZ  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_FieldOfHArray2OfXYZ();
diff --git a/inc/PColgp_SeqExplorerOfHSequenceOfDir.hxx b/inc/PColgp_SeqExplorerOfHSequenceOfDir.hxx
index ee26812..4979825 100644
--- a/inc/PColgp_SeqExplorerOfHSequenceOfDir.hxx
+++ b/inc/PColgp_SeqExplorerOfHSequenceOfDir.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_Dir;
 class PColgp_SeqExplorerOfHSequenceOfDir  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_SeqExplorerOfHSequenceOfDir(const Handle(PColgp_HSequenceOfDir)& S);
diff --git a/inc/PColgp_SeqExplorerOfHSequenceOfPnt.hxx b/inc/PColgp_SeqExplorerOfHSequenceOfPnt.hxx
index 4a29d9c..956a570 100644
--- a/inc/PColgp_SeqExplorerOfHSequenceOfPnt.hxx
+++ b/inc/PColgp_SeqExplorerOfHSequenceOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_Pnt;
 class PColgp_SeqExplorerOfHSequenceOfPnt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_SeqExplorerOfHSequenceOfPnt(const Handle(PColgp_HSequenceOfPnt)& S);
diff --git a/inc/PColgp_SeqExplorerOfHSequenceOfVec.hxx b/inc/PColgp_SeqExplorerOfHSequenceOfVec.hxx
index 2324b3f..28adf48 100644
--- a/inc/PColgp_SeqExplorerOfHSequenceOfVec.hxx
+++ b/inc/PColgp_SeqExplorerOfHSequenceOfVec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_Vec;
 class PColgp_SeqExplorerOfHSequenceOfVec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_SeqExplorerOfHSequenceOfVec(const Handle(PColgp_HSequenceOfVec)& S);
diff --git a/inc/PColgp_SeqExplorerOfHSequenceOfXYZ.hxx b/inc/PColgp_SeqExplorerOfHSequenceOfXYZ.hxx
index 89955de..1da5f9e 100644
--- a/inc/PColgp_SeqExplorerOfHSequenceOfXYZ.hxx
+++ b/inc/PColgp_SeqExplorerOfHSequenceOfXYZ.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_XYZ;
 class PColgp_SeqExplorerOfHSequenceOfXYZ  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PColgp_SeqExplorerOfHSequenceOfXYZ(const Handle(PColgp_HSequenceOfXYZ)& S);
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfCirc2d.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfCirc2d.hxx
index 7c30889..b8bb3a1 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfCirc2d.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfCirc2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray1OfCirc2d;
 class PColgp_VArrayTNodeOfFieldOfHArray1OfCirc2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray1OfCirc2d();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfDir.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfDir.hxx
index bd7e403..7f1e4ae 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfDir.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfDir.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray1OfDir;
 class PColgp_VArrayTNodeOfFieldOfHArray1OfDir  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray1OfDir();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfDir2d.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfDir2d.hxx
index 3a0f2a9..e96574c 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfDir2d.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfDir2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray1OfDir2d;
 class PColgp_VArrayTNodeOfFieldOfHArray1OfDir2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray1OfDir2d();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfLin2d.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfLin2d.hxx
index 33b1d01..e20364c 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfLin2d.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfLin2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray1OfLin2d;
 class PColgp_VArrayTNodeOfFieldOfHArray1OfLin2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray1OfLin2d();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfPnt.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfPnt.hxx
index a66a907..d887605 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfPnt.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray1OfPnt;
 class PColgp_VArrayTNodeOfFieldOfHArray1OfPnt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray1OfPnt();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfPnt2d.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfPnt2d.hxx
index fcefa0a..82b4fd5 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfPnt2d.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray1OfPnt2d;
 class PColgp_VArrayTNodeOfFieldOfHArray1OfPnt2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray1OfPnt2d();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfVec.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfVec.hxx
index 2dacb4e..a0f8941 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfVec.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfVec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray1OfVec;
 class PColgp_VArrayTNodeOfFieldOfHArray1OfVec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray1OfVec();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfVec2d.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfVec2d.hxx
index 6cf2c7f..8e98648 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfVec2d.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfVec2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray1OfVec2d;
 class PColgp_VArrayTNodeOfFieldOfHArray1OfVec2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray1OfVec2d();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfXY.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfXY.hxx
index 863a589..3bf7a91 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfXY.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfXY.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray1OfXY;
 class PColgp_VArrayTNodeOfFieldOfHArray1OfXY  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray1OfXY();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfXYZ.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfXYZ.hxx
index 996ed9c..5dc1db0 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfXYZ.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray1OfXYZ.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray1OfXYZ;
 class PColgp_VArrayTNodeOfFieldOfHArray1OfXYZ  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray1OfXYZ();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfCirc2d.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfCirc2d.hxx
index f1dee30..84375d4 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfCirc2d.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfCirc2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray2OfCirc2d;
 class PColgp_VArrayTNodeOfFieldOfHArray2OfCirc2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray2OfCirc2d();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfDir.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfDir.hxx
index 11dad54..01340fa 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfDir.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfDir.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray2OfDir;
 class PColgp_VArrayTNodeOfFieldOfHArray2OfDir  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray2OfDir();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfDir2d.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfDir2d.hxx
index 99ed9a4..24a7385 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfDir2d.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfDir2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray2OfDir2d;
 class PColgp_VArrayTNodeOfFieldOfHArray2OfDir2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray2OfDir2d();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfLin2d.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfLin2d.hxx
index 7915507..a9b3d96 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfLin2d.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfLin2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray2OfLin2d;
 class PColgp_VArrayTNodeOfFieldOfHArray2OfLin2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray2OfLin2d();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfPnt.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfPnt.hxx
index 5bdcad3..b72fcec 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfPnt.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray2OfPnt;
 class PColgp_VArrayTNodeOfFieldOfHArray2OfPnt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray2OfPnt();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfPnt2d.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfPnt2d.hxx
index c2ce097..fed1d4c 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfPnt2d.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray2OfPnt2d;
 class PColgp_VArrayTNodeOfFieldOfHArray2OfPnt2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray2OfPnt2d();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfVec.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfVec.hxx
index 8a1bf4b..3c808f2 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfVec.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfVec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray2OfVec;
 class PColgp_VArrayTNodeOfFieldOfHArray2OfVec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray2OfVec();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfVec2d.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfVec2d.hxx
index 27c6afb..4cd5326 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfVec2d.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfVec2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray2OfVec2d;
 class PColgp_VArrayTNodeOfFieldOfHArray2OfVec2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray2OfVec2d();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfXY.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfXY.hxx
index 21cbcc5..f348a75 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfXY.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfXY.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray2OfXY;
 class PColgp_VArrayTNodeOfFieldOfHArray2OfXY  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray2OfXY();
   
diff --git a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfXYZ.hxx b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfXYZ.hxx
index c554748..f803ad3 100644
--- a/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfXYZ.hxx
+++ b/inc/PColgp_VArrayTNodeOfFieldOfHArray2OfXYZ.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PColgp_VArrayNodeOfFieldOfHArray2OfXYZ;
 class PColgp_VArrayTNodeOfFieldOfHArray2OfXYZ  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PColgp_VArrayTNodeOfFieldOfHArray2OfXYZ();
   
diff --git a/inc/PCollection_CompareOfInteger.hxx b/inc/PCollection_CompareOfInteger.hxx
index cc6f528..950ade9 100644
--- a/inc/PCollection_CompareOfInteger.hxx
+++ b/inc/PCollection_CompareOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PCollection_CompareOf
 class PCollection_CompareOfInteger  : public PCollection_PrivCompareOfInteger {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PCollection_CompareOfInteger();
diff --git a/inc/PCollection_CompareOfReal.hxx b/inc/PCollection_CompareOfReal.hxx
index 3038dd2..038bf42 100644
--- a/inc/PCollection_CompareOfReal.hxx
+++ b/inc/PCollection_CompareOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PCollection_CompareOf
 class PCollection_CompareOfReal  : public PCollection_PrivCompareOfReal {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PCollection_CompareOfReal();
diff --git a/inc/PCollection_PrivCompareOfInteger.hxx b/inc/PCollection_PrivCompareOfInteger.hxx
index 0fedb78..94a0e5e 100644
--- a/inc/PCollection_PrivCompareOfInteger.hxx
+++ b/inc/PCollection_PrivCompareOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PCollection_PrivCompa
 class PCollection_PrivCompareOfInteger  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  Standard_Boolean IsLower(const Standard_Integer& Left,const Standard_Integer& Right) const;
diff --git a/inc/PCollection_PrivCompareOfReal.hxx b/inc/PCollection_PrivCompareOfReal.hxx
index 007eca7..94e6751 100644
--- a/inc/PCollection_PrivCompareOfReal.hxx
+++ b/inc/PCollection_PrivCompareOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PCollection_PrivCompa
 class PCollection_PrivCompareOfReal  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  Standard_Boolean IsLower(const Standard_Real& Left,const Standard_Real& Right) const;
diff --git a/inc/PDF_FieldOfHAttributeArray1.hxx b/inc/PDF_FieldOfHAttributeArray1.hxx
index 0922f5c..c15ed0e 100644
--- a/inc/PDF_FieldOfHAttributeArray1.hxx
+++ b/inc/PDF_FieldOfHAttributeArray1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PDF_FieldOfHAttribute
 class PDF_FieldOfHAttributeArray1  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PDF_FieldOfHAttributeArray1();
diff --git a/inc/PDF_VArrayTNodeOfFieldOfHAttributeArray1.hxx b/inc/PDF_VArrayTNodeOfFieldOfHAttributeArray1.hxx
index cc8921e..81b3d82 100644
--- a/inc/PDF_VArrayTNodeOfFieldOfHAttributeArray1.hxx
+++ b/inc/PDF_VArrayTNodeOfFieldOfHAttributeArray1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PDF_VArrayNodeOfFieldOfHAttributeArray1;
 class PDF_VArrayTNodeOfFieldOfHAttributeArray1  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PDF_VArrayTNodeOfFieldOfHAttributeArray1();
   
diff --git a/inc/PDataStd_FieldOfHArray1OfByte.hxx b/inc/PDataStd_FieldOfHArray1OfByte.hxx
index 938450e..9d683d5 100644
--- a/inc/PDataStd_FieldOfHArray1OfByte.hxx
+++ b/inc/PDataStd_FieldOfHArray1OfByte.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PDataStd_FieldOfHArra
 class PDataStd_FieldOfHArray1OfByte  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PDataStd_FieldOfHArray1OfByte();
diff --git a/inc/PDataStd_FieldOfHArray1OfHArray1OfInteger.hxx b/inc/PDataStd_FieldOfHArray1OfHArray1OfInteger.hxx
index 9e0b5fb..bc01047 100644
--- a/inc/PDataStd_FieldOfHArray1OfHArray1OfInteger.hxx
+++ b/inc/PDataStd_FieldOfHArray1OfHArray1OfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PDataStd_FieldOfHArra
 class PDataStd_FieldOfHArray1OfHArray1OfInteger  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PDataStd_FieldOfHArray1OfHArray1OfInteger();
diff --git a/inc/PDataStd_FieldOfHArray1OfHArray1OfReal.hxx b/inc/PDataStd_FieldOfHArray1OfHArray1OfReal.hxx
index c7d35d7..350ac38 100644
--- a/inc/PDataStd_FieldOfHArray1OfHArray1OfReal.hxx
+++ b/inc/PDataStd_FieldOfHArray1OfHArray1OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PDataStd_FieldOfHArra
 class PDataStd_FieldOfHArray1OfHArray1OfReal  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PDataStd_FieldOfHArray1OfHArray1OfReal();
diff --git a/inc/PDataStd_FieldOfHArray1OfHAsciiString.hxx b/inc/PDataStd_FieldOfHArray1OfHAsciiString.hxx
index 1bd8872..9deba25 100644
--- a/inc/PDataStd_FieldOfHArray1OfHAsciiString.hxx
+++ b/inc/PDataStd_FieldOfHArray1OfHAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PDataStd_FieldOfHArra
 class PDataStd_FieldOfHArray1OfHAsciiString  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PDataStd_FieldOfHArray1OfHAsciiString();
diff --git a/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfByte.hxx b/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfByte.hxx
index dcc8044..c0e293d 100644
--- a/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfByte.hxx
+++ b/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfByte.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,22 +33,8 @@ class PDataStd_VArrayNodeOfFieldOfHArray1OfByte;
 class PDataStd_VArrayTNodeOfFieldOfHArray1OfByte  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PDataStd_VArrayTNodeOfFieldOfHArray1OfByte();
   
diff --git a/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfHArray1OfInteger.hxx b/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfHArray1OfInteger.hxx
index f526fd4..d781d7b 100644
--- a/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfHArray1OfInteger.hxx
+++ b/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfHArray1OfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PDataStd_VArrayNodeOfFieldOfHArray1OfHArray1OfInteger;
 class PDataStd_VArrayTNodeOfFieldOfHArray1OfHArray1OfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PDataStd_VArrayTNodeOfFieldOfHArray1OfHArray1OfInteger();
   
diff --git a/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfHArray1OfReal.hxx b/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfHArray1OfReal.hxx
index 2bcd4eb..40bda9e 100644
--- a/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfHArray1OfReal.hxx
+++ b/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfHArray1OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PDataStd_VArrayNodeOfFieldOfHArray1OfHArray1OfReal;
 class PDataStd_VArrayTNodeOfFieldOfHArray1OfHArray1OfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PDataStd_VArrayTNodeOfFieldOfHArray1OfHArray1OfReal();
   
diff --git a/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfHAsciiString.hxx b/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfHAsciiString.hxx
index 92dc503..49e4d61 100644
--- a/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfHAsciiString.hxx
+++ b/inc/PDataStd_VArrayTNodeOfFieldOfHArray1OfHAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PDataStd_VArrayNodeOfFieldOfHArray1OfHAsciiString;
 class PDataStd_VArrayTNodeOfFieldOfHArray1OfHAsciiString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PDataStd_VArrayTNodeOfFieldOfHArray1OfHAsciiString();
   
diff --git a/inc/PLib.hxx b/inc/PLib.hxx
index 709260d..6aaefd8 100644
--- a/inc/PLib.hxx
+++ b/inc/PLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class PLib_DoubleJacobiPolynomial;
 class PLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Used as argument for a non rational functions <br>
 //! <br>
diff --git a/inc/PLib_DoubleJacobiPolynomial.hxx b/inc/PLib_DoubleJacobiPolynomial.hxx
index f56cdff..0756659 100644
--- a/inc/PLib_DoubleJacobiPolynomial.hxx
+++ b/inc/PLib_DoubleJacobiPolynomial.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColStd_Array1OfReal;
 class PLib_DoubleJacobiPolynomial  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PLib_DoubleJacobiPolynomial();
diff --git a/inc/PNaming_FieldOfHArray1OfNamedShape.hxx b/inc/PNaming_FieldOfHArray1OfNamedShape.hxx
index 5e895d7..150dfa0 100644
--- a/inc/PNaming_FieldOfHArray1OfNamedShape.hxx
+++ b/inc/PNaming_FieldOfHArray1OfNamedShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PNaming_FieldOfHArray
 class PNaming_FieldOfHArray1OfNamedShape  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PNaming_FieldOfHArray1OfNamedShape();
diff --git a/inc/PNaming_VArrayTNodeOfFieldOfHArray1OfNamedShape.hxx b/inc/PNaming_VArrayTNodeOfFieldOfHArray1OfNamedShape.hxx
index 3e44748..45708db 100644
--- a/inc/PNaming_VArrayTNodeOfFieldOfHArray1OfNamedShape.hxx
+++ b/inc/PNaming_VArrayTNodeOfFieldOfHArray1OfNamedShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,7 @@ class PNaming_VArrayNodeOfFieldOfHArray1OfNamedShape;
 class PNaming_VArrayTNodeOfFieldOfHArray1OfNamedShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       PNaming_VArrayTNodeOfFieldOfHArray1OfNamedShape();
diff --git a/inc/PPoly_FieldOfHArray1OfTriangle.hxx b/inc/PPoly_FieldOfHArray1OfTriangle.hxx
index b9173b2..73e127f 100644
--- a/inc/PPoly_FieldOfHArray1OfTriangle.hxx
+++ b/inc/PPoly_FieldOfHArray1OfTriangle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PPoly_FieldOfHArray1O
 class PPoly_FieldOfHArray1OfTriangle  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PPoly_FieldOfHArray1OfTriangle();
diff --git a/inc/PPoly_Triangle.hxx b/inc/PPoly_Triangle.hxx
index 4ca1933..f45652d 100644
--- a/inc/PPoly_Triangle.hxx
+++ b/inc/PPoly_Triangle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PPoly_Triangle);
 class PPoly_Triangle  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PPoly_Triangle(const Standard_Integer N1,const Standard_Integer N2,const Standard_Integer N3);
diff --git a/inc/PPoly_VArrayTNodeOfFieldOfHArray1OfTriangle.hxx b/inc/PPoly_VArrayTNodeOfFieldOfHArray1OfTriangle.hxx
index 05bbd41..ba4facb 100644
--- a/inc/PPoly_VArrayTNodeOfFieldOfHArray1OfTriangle.hxx
+++ b/inc/PPoly_VArrayTNodeOfFieldOfHArray1OfTriangle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PPoly_VArrayNodeOfFieldOfHArray1OfTriangle;
 class PPoly_VArrayTNodeOfFieldOfHArray1OfTriangle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PPoly_VArrayTNodeOfFieldOfHArray1OfTriangle();
   
diff --git a/inc/PShort_FieldOfHArray1OfShortReal.hxx b/inc/PShort_FieldOfHArray1OfShortReal.hxx
index 18828ab..bf1b99e 100644
--- a/inc/PShort_FieldOfHArray1OfShortReal.hxx
+++ b/inc/PShort_FieldOfHArray1OfShortReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PShort_FieldOfHArray1
 class PShort_FieldOfHArray1OfShortReal  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PShort_FieldOfHArray1OfShortReal();
diff --git a/inc/PShort_FieldOfHArray2OfShortReal.hxx b/inc/PShort_FieldOfHArray2OfShortReal.hxx
index 977e0a5..164781e 100644
--- a/inc/PShort_FieldOfHArray2OfShortReal.hxx
+++ b/inc/PShort_FieldOfHArray2OfShortReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PShort_FieldOfHArray2
 class PShort_FieldOfHArray2OfShortReal  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PShort_FieldOfHArray2OfShortReal();
diff --git a/inc/PShort_SeqExplorerOfHSequenceOfShortReal.hxx b/inc/PShort_SeqExplorerOfHSequenceOfShortReal.hxx
index 3c29e66..be0f69c 100644
--- a/inc/PShort_SeqExplorerOfHSequenceOfShortReal.hxx
+++ b/inc/PShort_SeqExplorerOfHSequenceOfShortReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Standard_OutOfRange;
 class PShort_SeqExplorerOfHSequenceOfShortReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PShort_SeqExplorerOfHSequenceOfShortReal(const Handle(PShort_HSequenceOfShortReal)& S);
diff --git a/inc/PShort_VArrayTNodeOfFieldOfHArray1OfShortReal.hxx b/inc/PShort_VArrayTNodeOfFieldOfHArray1OfShortReal.hxx
index bafdfe0..dbd7f64 100644
--- a/inc/PShort_VArrayTNodeOfFieldOfHArray1OfShortReal.hxx
+++ b/inc/PShort_VArrayTNodeOfFieldOfHArray1OfShortReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,22 +33,8 @@ class PShort_VArrayNodeOfFieldOfHArray1OfShortReal;
 class PShort_VArrayTNodeOfFieldOfHArray1OfShortReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PShort_VArrayTNodeOfFieldOfHArray1OfShortReal();
   
diff --git a/inc/PShort_VArrayTNodeOfFieldOfHArray2OfShortReal.hxx b/inc/PShort_VArrayTNodeOfFieldOfHArray2OfShortReal.hxx
index 4fa184d..9169a89 100644
--- a/inc/PShort_VArrayTNodeOfFieldOfHArray2OfShortReal.hxx
+++ b/inc/PShort_VArrayTNodeOfFieldOfHArray2OfShortReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,22 +33,8 @@ class PShort_VArrayNodeOfFieldOfHArray2OfShortReal;
 class PShort_VArrayTNodeOfFieldOfHArray2OfShortReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PShort_VArrayTNodeOfFieldOfHArray2OfShortReal();
   
diff --git a/inc/PTColStd_DataMapIteratorOfPersistentTransientMap.hxx b/inc/PTColStd_DataMapIteratorOfPersistentTransientMap.hxx
index 08233b1..ee3de3d 100644
--- a/inc/PTColStd_DataMapIteratorOfPersistentTransientMap.hxx
+++ b/inc/PTColStd_DataMapIteratorOfPersistentTransientMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class PTColStd_DataMapNodeOfPersistentTransientMap;
 class PTColStd_DataMapIteratorOfPersistentTransientMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PTColStd_DataMapIteratorOfPersistentTransientMap();
diff --git a/inc/PTColStd_DataMapIteratorOfTransientPersistentMap.hxx b/inc/PTColStd_DataMapIteratorOfTransientPersistentMap.hxx
index a5821c1..26d2df7 100644
--- a/inc/PTColStd_DataMapIteratorOfTransientPersistentMap.hxx
+++ b/inc/PTColStd_DataMapIteratorOfTransientPersistentMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class PTColStd_DataMapNodeOfTransientPersistentMap;
 class PTColStd_DataMapIteratorOfTransientPersistentMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PTColStd_DataMapIteratorOfTransientPersistentMap();
diff --git a/inc/PTColStd_DoubleMapIteratorOfDoubleMapOfTransientPersistent.hxx b/inc/PTColStd_DoubleMapIteratorOfDoubleMapOfTransientPersistent.hxx
index 1baa00d..1042a3c 100644
--- a/inc/PTColStd_DoubleMapIteratorOfDoubleMapOfTransientPersistent.hxx
+++ b/inc/PTColStd_DoubleMapIteratorOfDoubleMapOfTransientPersistent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class PTColStd_DoubleMapNodeOfDoubleMapOfTransientPersistent;
 class PTColStd_DoubleMapIteratorOfDoubleMapOfTransientPersistent  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PTColStd_DoubleMapIteratorOfDoubleMapOfTransientPersistent();
diff --git a/inc/PTColStd_DoubleMapOfTransientPersistent.hxx b/inc/PTColStd_DoubleMapOfTransientPersistent.hxx
index b40c859..0790d28 100644
--- a/inc/PTColStd_DoubleMapOfTransientPersistent.hxx
+++ b/inc/PTColStd_DoubleMapOfTransientPersistent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class PTColStd_DoubleMapIteratorOfDoubleMapOfTransientPersistent;
 class PTColStd_DoubleMapOfTransientPersistent  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PTColStd_DoubleMapOfTransientPersistent(const Standard_Integer NbBuckets = 1);
diff --git a/inc/PTColStd_MapPersistentHasher.hxx b/inc/PTColStd_MapPersistentHasher.hxx
index 8fc02ae..46ee249 100644
--- a/inc/PTColStd_MapPersistentHasher.hxx
+++ b/inc/PTColStd_MapPersistentHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Standard_Persistent;
 class PTColStd_MapPersistentHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const Handle(Standard_Persistent)& K,const Standard_Integer Upper) ;
diff --git a/inc/PTColStd_PersistentTransientMap.hxx b/inc/PTColStd_PersistentTransientMap.hxx
index da0fe92..f1fc270 100644
--- a/inc/PTColStd_PersistentTransientMap.hxx
+++ b/inc/PTColStd_PersistentTransientMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class PTColStd_DataMapIteratorOfPersistentTransientMap;
 class PTColStd_PersistentTransientMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PTColStd_PersistentTransientMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/PTColStd_TransientPersistentMap.hxx b/inc/PTColStd_TransientPersistentMap.hxx
index 3b6eb37..a54e5e2 100644
--- a/inc/PTColStd_TransientPersistentMap.hxx
+++ b/inc/PTColStd_TransientPersistentMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class PTColStd_DataMapIteratorOfTransientPersistentMap;
 class PTColStd_TransientPersistentMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PTColStd_TransientPersistentMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/PTopLoc_Location.hxx b/inc/PTopLoc_Location.hxx
index a789eda..319d232 100644
--- a/inc/PTopLoc_Location.hxx
+++ b/inc/PTopLoc_Location.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PTopLoc_Location);
 class PTopLoc_Location  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an Identity Location. <br>
   Standard_EXPORT   PTopLoc_Location();
diff --git a/inc/PTopoDS_FieldOfHArray1OfHShape.hxx b/inc/PTopoDS_FieldOfHArray1OfHShape.hxx
index 72889aa..616ab70 100644
--- a/inc/PTopoDS_FieldOfHArray1OfHShape.hxx
+++ b/inc/PTopoDS_FieldOfHArray1OfHShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PTopoDS_FieldOfHArray
 class PTopoDS_FieldOfHArray1OfHShape  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PTopoDS_FieldOfHArray1OfHShape();
diff --git a/inc/PTopoDS_FieldOfHArray1OfShape1.hxx b/inc/PTopoDS_FieldOfHArray1OfShape1.hxx
index b99ed76..7d53edd 100644
--- a/inc/PTopoDS_FieldOfHArray1OfShape1.hxx
+++ b/inc/PTopoDS_FieldOfHArray1OfShape1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PTopoDS_FieldOfHArray
 class PTopoDS_FieldOfHArray1OfShape1  : public DBC_BaseArray {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PTopoDS_FieldOfHArray1OfShape1();
diff --git a/inc/PTopoDS_Shape1.hxx b/inc/PTopoDS_Shape1.hxx
index 8c6ff4e..330bc7c 100644
--- a/inc/PTopoDS_Shape1.hxx
+++ b/inc/PTopoDS_Shape1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(PTopoDS_Shape1);
 class PTopoDS_Shape1  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PTopoDS_Shape1();
diff --git a/inc/PTopoDS_VArrayTNodeOfFieldOfHArray1OfHShape.hxx b/inc/PTopoDS_VArrayTNodeOfFieldOfHArray1OfHShape.hxx
index c21a2fe..055b60b 100644
--- a/inc/PTopoDS_VArrayTNodeOfFieldOfHArray1OfHShape.hxx
+++ b/inc/PTopoDS_VArrayTNodeOfFieldOfHArray1OfHShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PTopoDS_VArrayNodeOfFieldOfHArray1OfHShape;
 class PTopoDS_VArrayTNodeOfFieldOfHArray1OfHShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PTopoDS_VArrayTNodeOfFieldOfHArray1OfHShape();
   
diff --git a/inc/PTopoDS_VArrayTNodeOfFieldOfHArray1OfShape1.hxx b/inc/PTopoDS_VArrayTNodeOfFieldOfHArray1OfShape1.hxx
index 2f7961c..64f9fd0 100644
--- a/inc/PTopoDS_VArrayTNodeOfFieldOfHArray1OfShape1.hxx
+++ b/inc/PTopoDS_VArrayTNodeOfFieldOfHArray1OfShape1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,22 +34,8 @@ class PTopoDS_VArrayNodeOfFieldOfHArray1OfShape1;
 class PTopoDS_VArrayTNodeOfFieldOfHArray1OfShape1  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   
       PTopoDS_VArrayTNodeOfFieldOfHArray1OfShape1();
   
diff --git a/inc/PXCAFDoc_SeqExplorerOfGraphNodeSequence.hxx b/inc/PXCAFDoc_SeqExplorerOfGraphNodeSequence.hxx
index 0925117..e0a7eaa 100644
--- a/inc/PXCAFDoc_SeqExplorerOfGraphNodeSequence.hxx
+++ b/inc/PXCAFDoc_SeqExplorerOfGraphNodeSequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class PXCAFDoc_GraphNode;
 class PXCAFDoc_SeqExplorerOfGraphNodeSequence  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PXCAFDoc_SeqExplorerOfGraphNodeSequence(const Handle(PXCAFDoc_GraphNodeSequence)& S);
diff --git a/inc/Plate_Array1OfPinpointConstraint.hxx b/inc/Plate_Array1OfPinpointConstraint.hxx
index 1f0245a..45665cc 100644
--- a/inc/Plate_Array1OfPinpointConstraint.hxx
+++ b/inc/Plate_Array1OfPinpointConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Plate_PinpointConstraint;
 class Plate_Array1OfPinpointConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_Array1OfPinpointConstraint(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Plate_D1.hxx b/inc/Plate_D1.hxx
index fb729fd..40edad6 100644
--- a/inc/Plate_D1.hxx
+++ b/inc/Plate_D1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class gp_XYZ;
 class Plate_D1  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_D1(const gp_XYZ& du,const gp_XYZ& dv);
diff --git a/inc/Plate_D2.hxx b/inc/Plate_D2.hxx
index 3d85158..2967d53 100644
--- a/inc/Plate_D2.hxx
+++ b/inc/Plate_D2.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class gp_XYZ;
 class Plate_D2  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_D2(const gp_XYZ& duu,const gp_XYZ& duv,const gp_XYZ& dvv);
diff --git a/inc/Plate_D3.hxx b/inc/Plate_D3.hxx
index b0dba38..bed9404 100644
--- a/inc/Plate_D3.hxx
+++ b/inc/Plate_D3.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class gp_XYZ;
 class Plate_D3  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_D3(const gp_XYZ& duuu,const gp_XYZ& duuv,const gp_XYZ& duvv,const gp_XYZ& dvvv);
diff --git a/inc/Plate_FreeGtoCConstraint.hxx b/inc/Plate_FreeGtoCConstraint.hxx
index 9a72ad8..b9a2d01 100644
--- a/inc/Plate_FreeGtoCConstraint.hxx
+++ b/inc/Plate_FreeGtoCConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Plate_LinearScalarConstraint;
 class Plate_FreeGtoCConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_FreeGtoCConstraint(const gp_XY& point2d,const Plate_D1& D1S,const Plate_D1& D1T,const Standard_Real IncrementalLoad = 1.0,const Standard_Integer orientation = 0);
diff --git a/inc/Plate_GlobalTranslationConstraint.hxx b/inc/Plate_GlobalTranslationConstraint.hxx
index 8f75c8b..cddbf58 100644
--- a/inc/Plate_GlobalTranslationConstraint.hxx
+++ b/inc/Plate_GlobalTranslationConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Plate_LinearXYZConstraint;
 class Plate_GlobalTranslationConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_GlobalTranslationConstraint(const TColgp_SequenceOfXY& SOfXY);
diff --git a/inc/Plate_GtoCConstraint.hxx b/inc/Plate_GtoCConstraint.hxx
index acbae3e..409365d 100644
--- a/inc/Plate_GtoCConstraint.hxx
+++ b/inc/Plate_GtoCConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Plate_PinpointConstraint;
 class Plate_GtoCConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_GtoCConstraint(const Plate_GtoCConstraint& ref);
diff --git a/inc/Plate_LineConstraint.hxx b/inc/Plate_LineConstraint.hxx
index 966776a..f53486a 100644
--- a/inc/Plate_LineConstraint.hxx
+++ b/inc/Plate_LineConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class Plate_LinearScalarConstraint;
 class Plate_LineConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_LineConstraint(const gp_XY& point2d,const gp_Lin& lin,const Standard_Integer iu = 0,const Standard_Integer iv = 0);
diff --git a/inc/Plate_LinearScalarConstraint.hxx b/inc/Plate_LinearScalarConstraint.hxx
index 6b025be..bb47ff1 100644
--- a/inc/Plate_LinearScalarConstraint.hxx
+++ b/inc/Plate_LinearScalarConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TColgp_Array2OfXYZ;
 class Plate_LinearScalarConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_LinearScalarConstraint();
diff --git a/inc/Plate_LinearXYZConstraint.hxx b/inc/Plate_LinearXYZConstraint.hxx
index 3773e22..d5c1a00 100644
--- a/inc/Plate_LinearXYZConstraint.hxx
+++ b/inc/Plate_LinearXYZConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Plate_PinpointConstraint;
 class Plate_LinearXYZConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_LinearXYZConstraint();
diff --git a/inc/Plate_PinpointConstraint.hxx b/inc/Plate_PinpointConstraint.hxx
index cbf8c5c..fe2cac8 100644
--- a/inc/Plate_PinpointConstraint.hxx
+++ b/inc/Plate_PinpointConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class gp_XYZ;
 class Plate_PinpointConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_PinpointConstraint();
diff --git a/inc/Plate_PlaneConstraint.hxx b/inc/Plate_PlaneConstraint.hxx
index 59533da..c66e5b8 100644
--- a/inc/Plate_PlaneConstraint.hxx
+++ b/inc/Plate_PlaneConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Plate_LinearScalarConstraint;
 class Plate_PlaneConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_PlaneConstraint(const gp_XY& point2d,const gp_Pln& pln,const Standard_Integer iu = 0,const Standard_Integer iv = 0);
diff --git a/inc/Plate_Plate.hxx b/inc/Plate_Plate.hxx
index ba17dd2..0c5f043 100644
--- a/inc/Plate_Plate.hxx
+++ b/inc/Plate_Plate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class math_Matrix;
 class Plate_Plate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_Plate();
diff --git a/inc/Plate_SampledCurveConstraint.hxx b/inc/Plate_SampledCurveConstraint.hxx
index a01c139..a6c7ed1 100644
--- a/inc/Plate_SampledCurveConstraint.hxx
+++ b/inc/Plate_SampledCurveConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Plate_LinearXYZConstraint;
 class Plate_SampledCurveConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plate_SampledCurveConstraint(const Plate_SequenceOfPinpointConstraint& SOPPC,const Standard_Integer n);
diff --git a/inc/Plate_SequenceOfLinearScalarConstraint.hxx b/inc/Plate_SequenceOfLinearScalarConstraint.hxx
index 1a5884e..e6c0b75 100644
--- a/inc/Plate_SequenceOfLinearScalarConstraint.hxx
+++ b/inc/Plate_SequenceOfLinearScalarConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Plate_SequenceNodeOfSequenceOfLinearScalarConstraint;
 class Plate_SequenceOfLinearScalarConstraint  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Plate_SequenceOfLinearScalarConstraint();
diff --git a/inc/Plate_SequenceOfLinearXYZConstraint.hxx b/inc/Plate_SequenceOfLinearXYZConstraint.hxx
index 2757e60..cc07355 100644
--- a/inc/Plate_SequenceOfLinearXYZConstraint.hxx
+++ b/inc/Plate_SequenceOfLinearXYZConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Plate_SequenceNodeOfSequenceOfLinearXYZConstraint;
 class Plate_SequenceOfLinearXYZConstraint  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Plate_SequenceOfLinearXYZConstraint();
diff --git a/inc/Plate_SequenceOfPinpointConstraint.hxx b/inc/Plate_SequenceOfPinpointConstraint.hxx
index acabe94..90182d9 100644
--- a/inc/Plate_SequenceOfPinpointConstraint.hxx
+++ b/inc/Plate_SequenceOfPinpointConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Plate_SequenceNodeOfSequenceOfPinpointConstraint;
 class Plate_SequenceOfPinpointConstraint  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Plate_SequenceOfPinpointConstraint();
diff --git a/inc/PlotMgt.hxx b/inc/PlotMgt.hxx
index ee1f9be..136bc74 100644
--- a/inc/PlotMgt.hxx
+++ b/inc/PlotMgt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class PlotMgt_SequenceNodeOfListOfPlotterParameter;
 class PlotMgt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_TColStd_HSequenceOfAsciiString DeviceList() ;
diff --git a/inc/PlotMgt_ListOfMFTFonts.hxx b/inc/PlotMgt_ListOfMFTFonts.hxx
index 7f54e23..b655c3e 100644
--- a/inc/PlotMgt_ListOfMFTFonts.hxx
+++ b/inc/PlotMgt_ListOfMFTFonts.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MFT_FontManager;
 class PlotMgt_ListOfMFTFonts  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PlotMgt_ListOfMFTFonts(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/PlotMgt_ListOfPlotterParameter.hxx b/inc/PlotMgt_ListOfPlotterParameter.hxx
index d20c3ca..342d32f 100644
--- a/inc/PlotMgt_ListOfPlotterParameter.hxx
+++ b/inc/PlotMgt_ListOfPlotterParameter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class PlotMgt_SequenceNodeOfListOfPlotterParameter;
 class PlotMgt_ListOfPlotterParameter  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       PlotMgt_ListOfPlotterParameter();
diff --git a/inc/Plugin.hxx b/inc/Plugin.hxx
index 22d52d1..b4215d8 100644
--- a/inc/Plugin.hxx
+++ b/inc/Plugin.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class Plugin_DataMapIteratorOfMapOfFunctions;
 class Plugin  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Standard_Transient Load(const Standard_GUID& aGUID) ;
diff --git a/inc/Plugin_DataMapIteratorOfMapOfFunctions.hxx b/inc/Plugin_DataMapIteratorOfMapOfFunctions.hxx
index 2649a37..7c2943b 100644
--- a/inc/Plugin_DataMapIteratorOfMapOfFunctions.hxx
+++ b/inc/Plugin_DataMapIteratorOfMapOfFunctions.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Plugin_DataMapNodeOfMapOfFunctions;
 class Plugin_DataMapIteratorOfMapOfFunctions  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plugin_DataMapIteratorOfMapOfFunctions();
diff --git a/inc/Plugin_MapOfFunctions.hxx b/inc/Plugin_MapOfFunctions.hxx
index c4ca71b..41e6bc5 100644
--- a/inc/Plugin_MapOfFunctions.hxx
+++ b/inc/Plugin_MapOfFunctions.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Plugin_DataMapIteratorOfMapOfFunctions;
 class Plugin_MapOfFunctions  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Plugin_MapOfFunctions(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Poly.hxx b/inc/Poly.hxx
index fce2a58..4326f4d 100644
--- a/inc/Poly.hxx
+++ b/inc/Poly.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class Poly_Connect;
 class Poly  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Join several triangulations to one new triangulation object. <br>
 //!          The new triangulation is just a mechanical sum of input <br>
diff --git a/inc/Poly_Array1OfTriangle.hxx b/inc/Poly_Array1OfTriangle.hxx
index 72de994..1b06932 100644
--- a/inc/Poly_Array1OfTriangle.hxx
+++ b/inc/Poly_Array1OfTriangle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Poly_Triangle;
 class Poly_Array1OfTriangle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Poly_Array1OfTriangle(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Poly_Connect.hxx b/inc/Poly_Connect.hxx
index 2c9a49b..667882a 100644
--- a/inc/Poly_Connect.hxx
+++ b/inc/Poly_Connect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class Poly_Triangulation;
 class Poly_Connect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an algorithm to explore the adjacency data of <br>
 //! nodes or triangles for the triangulation T. <br>
diff --git a/inc/Poly_MakeLoops.hxx b/inc/Poly_MakeLoops.hxx
index fde78aa..a26ce91 100644
--- a/inc/Poly_MakeLoops.hxx
+++ b/inc/Poly_MakeLoops.hxx
@@ -212,7 +212,7 @@ public:
   }
 
   //! Fills in the list of hanging links
-  void GetHangingLinks(ListOfLink& theLinks) const;
+  Standard_EXPORT void GetHangingLinks(ListOfLink& theLinks) const;
 
 protected:
   virtual Standard_Integer chooseLeftWay
diff --git a/inc/Poly_Triangle.hxx b/inc/Poly_Triangle.hxx
index 9009600..2172c2d 100644
--- a/inc/Poly_Triangle.hxx
+++ b/inc/Poly_Triangle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class Standard_OutOfRange;
 class Poly_Triangle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a triangle and sets all indices to zero. <br>
   Standard_EXPORT   Poly_Triangle();
diff --git a/inc/Precision.hxx b/inc/Precision.hxx
index 19da88b..be6d7ae 100644
--- a/inc/Precision.hxx
+++ b/inc/Precision.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -96,18 +99,7 @@
 class Precision  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Returns the recommended precision value <br>
 //!  when checking the equality of two angles (given in radians). <br>
@@ -171,6 +163,10 @@ public:
 //!   becomes easily measurable, but only within a restricted <br>
 //! space which contains some small objects of the complete scene. <br>
   Standard_EXPORT   static  Standard_Real Confusion() ;
+  
+//! Returns square of Confusion. <br>
+//! Created for speed and convenience. <br>
+  Standard_EXPORT   static  Standard_Real SquareConfusion() ;
   //!Returns the precision value in real space, frequently <br>
 //! used by intersection algorithms to decide that a solution is reached. <br>
 //! This function provides an acceptable level of precision <br>
diff --git a/inc/Precision.lxx b/inc/Precision.lxx
index 8df3e3f..18ce197 100644
--- a/inc/Precision.lxx
+++ b/inc/Precision.lxx
@@ -53,6 +53,16 @@ inline Standard_Real  Precision::Confusion()
 
 
 //=======================================================================
+//function : SquareConfusion
+//purpose  : 
+//=======================================================================
+inline Standard_Real Precision::SquareConfusion()
+{
+  return Confusion() * Confusion();
+}
+
+
+//=======================================================================
 //function : Intersection
 //purpose  : 
 //=======================================================================
diff --git a/inc/ProjLib.hxx b/inc/ProjLib.hxx
index b9e4ec2..9a10781 100644
--- a/inc/ProjLib.hxx
+++ b/inc/ProjLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -88,18 +91,7 @@ class ProjLib_SequenceNodeOfSequenceOfHSequenceOfPnt;
 class ProjLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  gp_Pnt2d Project(const gp_Pln& Pl,const gp_Pnt& P) ;
diff --git a/inc/ProjLib_CompProjectedCurve.hxx b/inc/ProjLib_CompProjectedCurve.hxx
index a1c9f01..0e513a9 100644
--- a/inc/ProjLib_CompProjectedCurve.hxx
+++ b/inc/ProjLib_CompProjectedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class TColStd_Array1OfReal;
 class ProjLib_CompProjectedCurve  : public Adaptor2d_Curve2d {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ProjLib_CompProjectedCurve();
diff --git a/inc/ProjLib_ComputeApprox.hxx b/inc/ProjLib_ComputeApprox.hxx
index 1bbac46..06f301d 100644
--- a/inc/ProjLib_ComputeApprox.hxx
+++ b/inc/ProjLib_ComputeApprox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Adaptor3d_HSurface;
 class ProjLib_ComputeApprox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! <Tol>    is   the   tolerance   with  which    the <br>
 //!          approximation is performed. <br>
diff --git a/inc/ProjLib_ComputeApproxOnPolarSurface.hxx b/inc/ProjLib_ComputeApproxOnPolarSurface.hxx
index 576c017..5b823a7 100644
--- a/inc/ProjLib_ComputeApproxOnPolarSurface.hxx
+++ b/inc/ProjLib_ComputeApproxOnPolarSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class Adaptor2d_HCurve2d;
 class ProjLib_ComputeApproxOnPolarSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ProjLib_ComputeApproxOnPolarSurface();
diff --git a/inc/ProjLib_Cone.hxx b/inc/ProjLib_Cone.hxx
index b2e78ff..fce26d5 100644
--- a/inc/ProjLib_Cone.hxx
+++ b/inc/ProjLib_Cone.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Hypr;
 class ProjLib_Cone  : public ProjLib_Projector {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Undefined projection. <br>
   Standard_EXPORT   ProjLib_Cone();
diff --git a/inc/ProjLib_Cylinder.hxx b/inc/ProjLib_Cylinder.hxx
index 10dbf64..93a7e75 100644
--- a/inc/ProjLib_Cylinder.hxx
+++ b/inc/ProjLib_Cylinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Hypr;
 class ProjLib_Cylinder  : public ProjLib_Projector {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Undefined projection. <br>
   Standard_EXPORT   ProjLib_Cylinder();
diff --git a/inc/ProjLib_Plane.hxx b/inc/ProjLib_Plane.hxx
index e8fc6bc..5c27c35 100644
--- a/inc/ProjLib_Plane.hxx
+++ b/inc/ProjLib_Plane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Hypr;
 class ProjLib_Plane  : public ProjLib_Projector {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Undefined projection. <br>
   Standard_EXPORT   ProjLib_Plane();
diff --git a/inc/ProjLib_PrjFunc.hxx b/inc/ProjLib_PrjFunc.hxx
index c6aad87..092748d 100644
--- a/inc/ProjLib_PrjFunc.hxx
+++ b/inc/ProjLib_PrjFunc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Pnt2d;
 class ProjLib_PrjFunc  : public math_FunctionSetWithDerivatives {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ProjLib_PrjFunc(const Adaptor3d_CurvePtr& C,const Standard_Real FixVal,const Adaptor3d_SurfacePtr& S,const Standard_Integer Fix);
diff --git a/inc/ProjLib_PrjResolve.hxx b/inc/ProjLib_PrjResolve.hxx
index a0227a5..7e48897 100644
--- a/inc/ProjLib_PrjResolve.hxx
+++ b/inc/ProjLib_PrjResolve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Pnt2d;
 class ProjLib_PrjResolve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ProjLib_PrjResolve(const Adaptor3d_Curve& C,const Adaptor3d_Surface& S,const Standard_Integer Fix);
diff --git a/inc/ProjLib_ProjectOnPlane.hxx b/inc/ProjLib_ProjectOnPlane.hxx
index cb36768..741ecfd 100644
--- a/inc/ProjLib_ProjectOnPlane.hxx
+++ b/inc/ProjLib_ProjectOnPlane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -82,18 +85,7 @@ class Geom_BSplineCurve;
 class ProjLib_ProjectOnPlane  : public Adaptor3d_Curve {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   ProjLib_ProjectOnPlane();
diff --git a/inc/ProjLib_ProjectOnSurface.hxx b/inc/ProjLib_ProjectOnSurface.hxx
index 441e6d1..d91ac5a 100644
--- a/inc/ProjLib_ProjectOnSurface.hxx
+++ b/inc/ProjLib_ProjectOnSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Geom_BSplineCurve;
 class ProjLib_ProjectOnSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Create an empty projector. <br>
   Standard_EXPORT   ProjLib_ProjectOnSurface();
diff --git a/inc/ProjLib_ProjectedCurve.hxx b/inc/ProjLib_ProjectedCurve.hxx
index ece27c9..e038e41 100644
--- a/inc/ProjLib_ProjectedCurve.hxx
+++ b/inc/ProjLib_ProjectedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -72,18 +75,7 @@ class Geom2d_BSplineCurve;
 class ProjLib_ProjectedCurve  : public Adaptor2d_Curve2d {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ProjLib_ProjectedCurve();
diff --git a/inc/ProjLib_Projector.hxx b/inc/ProjLib_Projector.hxx
index 78366c0..6de84f9 100644
--- a/inc/ProjLib_Projector.hxx
+++ b/inc/ProjLib_Projector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class gp_Hypr;
 class ProjLib_Projector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Sets the type to OtherCurve <br>
   Standard_EXPORT   ProjLib_Projector();
diff --git a/inc/ProjLib_SequenceOfHSequenceOfPnt.hxx b/inc/ProjLib_SequenceOfHSequenceOfPnt.hxx
index b8b669b..97b3783 100644
--- a/inc/ProjLib_SequenceOfHSequenceOfPnt.hxx
+++ b/inc/ProjLib_SequenceOfHSequenceOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class ProjLib_SequenceNodeOfSequenceOfHSequenceOfPnt;
 class ProjLib_SequenceOfHSequenceOfPnt  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       ProjLib_SequenceOfHSequenceOfPnt();
diff --git a/inc/ProjLib_Sphere.hxx b/inc/ProjLib_Sphere.hxx
index e7dfe55..306a13e 100644
--- a/inc/ProjLib_Sphere.hxx
+++ b/inc/ProjLib_Sphere.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class gp_Hypr;
 class ProjLib_Sphere  : public ProjLib_Projector {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Undefined projection. <br>
   Standard_EXPORT   ProjLib_Sphere();
diff --git a/inc/ProjLib_Torus.hxx b/inc/ProjLib_Torus.hxx
index c83a61d..8218517 100644
--- a/inc/ProjLib_Torus.hxx
+++ b/inc/ProjLib_Torus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Hypr;
 class ProjLib_Torus  : public ProjLib_Projector {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Undefined projection. <br>
   Standard_EXPORT   ProjLib_Torus();
diff --git a/inc/Prs2d_DataMapIteratorOfDataMapOfAspectRoot.hxx b/inc/Prs2d_DataMapIteratorOfDataMapOfAspectRoot.hxx
index 56d461f..e05009a 100644
--- a/inc/Prs2d_DataMapIteratorOfDataMapOfAspectRoot.hxx
+++ b/inc/Prs2d_DataMapIteratorOfDataMapOfAspectRoot.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Prs2d_DataMapNodeOfDataMapOfAspectRoot;
 class Prs2d_DataMapIteratorOfDataMapOfAspectRoot  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Prs2d_DataMapIteratorOfDataMapOfAspectRoot();
diff --git a/inc/Prs2d_DataMapOfAspectRoot.hxx b/inc/Prs2d_DataMapOfAspectRoot.hxx
index 7198e41..e1070f8 100644
--- a/inc/Prs2d_DataMapOfAspectRoot.hxx
+++ b/inc/Prs2d_DataMapOfAspectRoot.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Prs2d_DataMapIteratorOfDataMapOfAspectRoot;
 class Prs2d_DataMapOfAspectRoot  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Prs2d_DataMapOfAspectRoot(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Prs3d.hxx b/inc/Prs3d.hxx
index ec44212..93ceac4 100644
--- a/inc/Prs3d.hxx
+++ b/inc/Prs3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -77,18 +80,7 @@ class Prs3d_Arrow;
 class Prs3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean MatchSegment(const Quantity_Length X,const Quantity_Length Y,const Quantity_Length Z,const Quantity_Length aDistance,const gp_Pnt& p1,const gp_Pnt& p2,Quantity_Length& dist) ;
diff --git a/inc/Prs3d_AnglePresentation.hxx b/inc/Prs3d_AnglePresentation.hxx
index 3bd428c..3bf9222 100644
--- a/inc/Prs3d_AnglePresentation.hxx
+++ b/inc/Prs3d_AnglePresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Pnt;
 class Prs3d_AnglePresentation  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines the representation of the angle between the <br>
 //! line defined by the points AttachmentPoint1 and <br>
diff --git a/inc/Prs3d_Arrow.hxx b/inc/Prs3d_Arrow.hxx
index 14edb0b..b24ee67 100644
--- a/inc/Prs3d_Arrow.hxx
+++ b/inc/Prs3d_Arrow.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_Dir;
 class Prs3d_Arrow  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines the representation of the arrow defined by <br>
 //! the location point aLocation, the direction <br>
diff --git a/inc/Prs3d_Drawer.hxx b/inc/Prs3d_Drawer.hxx
index bc060fd..0264c82 100644
--- a/inc/Prs3d_Drawer.hxx
+++ b/inc/Prs3d_Drawer.hxx
@@ -356,6 +356,17 @@ public:
   Standard_EXPORT   virtual  Handle_Prs3d_LineAspect SectionAspect() ;
   //! Sets the parameter anAspect for display attributes of sections. <br>
   Standard_EXPORT   virtual  void SetSectionAspect(const Handle(Prs3d_LineAspect)& anAspect) ;
+  //! Enables or disables face boundary drawing for shading presentations. <br>
+//! theIsEnabled is a boolean flag indicating whether the face boundaries should be <br>
+//! drawn or not. <br>
+  Standard_EXPORT   virtual  void SetFaceBoundaryDraw(const Standard_Boolean theIsEnabled) ;
+  //! Checks whether the face boundary drawing is enabled or not. <br>
+  Standard_EXPORT   virtual  Standard_Boolean IsFaceBoundaryDraw() const;
+  //! Sets line aspect for face boundaries. <br>
+//! theAspect is the line aspect that determines the look of the face boundaries. <br>
+  Standard_EXPORT   virtual  void SetFaceBoundaryAspect(const Handle(Prs3d_LineAspect)& theAspect) ;
+  //! Returns line aspect of face boundaries. <br>
+  Standard_EXPORT   virtual  Handle_Prs3d_LineAspect FaceBoundaryAspect() ;
 
 
 
@@ -400,6 +411,8 @@ Handle_Prs3d_LengthAspect myLengthAspect;
 Handle_Prs3d_AngleAspect myAngleAspect;
 Handle_Prs3d_RadiusAspect myRadiusAspect;
 Handle_Prs3d_LineAspect mySectionAspect;
+Standard_Boolean myFaceBoundaryDraw;
+Handle_Prs3d_LineAspect myFaceBoundaryAspect;
 
 
 private: 
diff --git a/inc/Prs3d_LengthPresentation.hxx b/inc/Prs3d_LengthPresentation.hxx
index 10304a3..41bb5d3 100644
--- a/inc/Prs3d_LengthPresentation.hxx
+++ b/inc/Prs3d_LengthPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Pnt;
 class Prs3d_LengthPresentation  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines the display of the length between the points <br>
 //! AttachmentPoint1 and AttachmentPoint2. <br>
diff --git a/inc/Prs3d_Root.hxx b/inc/Prs3d_Root.hxx
index 0830689..2fbf949 100644
--- a/inc/Prs3d_Root.hxx
+++ b/inc/Prs3d_Root.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Prs3d_Presentation;
 class Prs3d_Root  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the current group of primititves inside graphic <br>
 //! objects in the display. <br>
diff --git a/inc/Prs3d_ShapeTool.hxx b/inc/Prs3d_ShapeTool.hxx
index 9663580..b3b5a34 100644
--- a/inc/Prs3d_ShapeTool.hxx
+++ b/inc/Prs3d_ShapeTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class Poly_Polygon3D;
 class Prs3d_ShapeTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Prs3d_ShapeTool(const TopoDS_Shape& TheShape);
diff --git a/inc/Prs3d_Text.hxx b/inc/Prs3d_Text.hxx
index f01e293..dc719f9 100644
--- a/inc/Prs3d_Text.hxx
+++ b/inc/Prs3d_Text.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Prs3d_TextAspect;
 class Prs3d_Text  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines the display of the text aText at the point AttachmentPoint. <br>
 //! The drawer aDrawer specifies the display attributes which texts will have. <br>
diff --git a/inc/PrsMgr_ModedPresentation.hxx b/inc/PrsMgr_ModedPresentation.hxx
index 8ee5411..6804178 100644
--- a/inc/PrsMgr_ModedPresentation.hxx
+++ b/inc/PrsMgr_ModedPresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class PrsMgr_Presentation;
 class PrsMgr_ModedPresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   PrsMgr_ModedPresentation();
diff --git a/inc/PrsMgr_Presentations.hxx b/inc/PrsMgr_Presentations.hxx
index f6da5bd..751d512 100644
--- a/inc/PrsMgr_Presentations.hxx
+++ b/inc/PrsMgr_Presentations.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class PrsMgr_SequenceNodeOfPresentations;
 class PrsMgr_Presentations  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       PrsMgr_Presentations();
diff --git a/inc/QABugs.hxx b/inc/QABugs.hxx
index 7aade6c..ab115d7 100644
--- a/inc/QABugs.hxx
+++ b/inc/QABugs.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@ class QABugs_PresentableObject;
 class QABugs  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Commands(Draw_Interpretor& DI) ;
diff --git a/inc/QADNaming.hxx b/inc/QADNaming.hxx
index f1ccfdb..dcf6f7f 100644
--- a/inc/QADNaming.hxx
+++ b/inc/QADNaming.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class QADNaming_DataMapIteratorOfDataMapOfShapeOfName;
 class QADNaming  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  TopoDS_Shape CurrentShape(const Standard_CString ShapeEntry,const Handle(TDF_Data)& Data) ;
diff --git a/inc/QADNaming_DataMapIteratorOfDataMapOfShapeOfName.hxx b/inc/QADNaming_DataMapIteratorOfDataMapOfShapeOfName.hxx
index 9a7f524..fbdf6a0 100644
--- a/inc/QADNaming_DataMapIteratorOfDataMapOfShapeOfName.hxx
+++ b/inc/QADNaming_DataMapIteratorOfDataMapOfShapeOfName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class QADNaming_DataMapNodeOfDataMapOfShapeOfName;
 class QADNaming_DataMapIteratorOfDataMapOfShapeOfName  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QADNaming_DataMapIteratorOfDataMapOfShapeOfName();
diff --git a/inc/QADNaming_DataMapOfShapeOfName.hxx b/inc/QADNaming_DataMapOfShapeOfName.hxx
index e5cf4aa..4aaf23a 100644
--- a/inc/QADNaming_DataMapOfShapeOfName.hxx
+++ b/inc/QADNaming_DataMapOfShapeOfName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class QADNaming_DataMapIteratorOfDataMapOfShapeOfName;
 class QADNaming_DataMapOfShapeOfName  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QADNaming_DataMapOfShapeOfName(const Standard_Integer NbBuckets = 1);
diff --git a/inc/QADraw.hxx b/inc/QADraw.hxx
index 57a4c93..1384ad9 100644
--- a/inc/QADraw.hxx
+++ b/inc/QADraw.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@ class QADraw_DataMapIteratorOfDataMapOfAsciiStringOfAddress;
 class QADraw  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Define specicial commands for AIS. <br>
   Standard_EXPORT   static  void CommonCommands(Draw_Interpretor& DI) ;
diff --git a/inc/QADraw_DataMapIteratorOfDataMapOfAsciiStringOfAddress.hxx b/inc/QADraw_DataMapIteratorOfDataMapOfAsciiStringOfAddress.hxx
index 5d29012..c48c176 100644
--- a/inc/QADraw_DataMapIteratorOfDataMapOfAsciiStringOfAddress.hxx
+++ b/inc/QADraw_DataMapIteratorOfDataMapOfAsciiStringOfAddress.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class QADraw_DataMapNodeOfDataMapOfAsciiStringOfAddress;
 class QADraw_DataMapIteratorOfDataMapOfAsciiStringOfAddress  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QADraw_DataMapIteratorOfDataMapOfAsciiStringOfAddress();
diff --git a/inc/QADraw_DataMapOfAsciiStringOfAddress.hxx b/inc/QADraw_DataMapOfAsciiStringOfAddress.hxx
index dc99aab..64075c8 100644
--- a/inc/QADraw_DataMapOfAsciiStringOfAddress.hxx
+++ b/inc/QADraw_DataMapOfAsciiStringOfAddress.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class QADraw_DataMapIteratorOfDataMapOfAsciiStringOfAddress;
 class QADraw_DataMapOfAsciiStringOfAddress  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QADraw_DataMapOfAsciiStringOfAddress(const Standard_Integer NbBuckets = 1);
diff --git a/inc/QANCollection.hxx b/inc/QANCollection.hxx
index 8817c76..3ed8b72 100644
--- a/inc/QANCollection.hxx
+++ b/inc/QANCollection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class QANCollection_DoubleMapIteratorOfDoubleMapOfRealInteger;
 class QANCollection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Commands(Draw_Interpretor& DI) ;
diff --git a/inc/QANCollection_DataMapIteratorOfDataMapOfRealPnt.hxx b/inc/QANCollection_DataMapIteratorOfDataMapOfRealPnt.hxx
index 3eab51f..1ed72d8 100644
--- a/inc/QANCollection_DataMapIteratorOfDataMapOfRealPnt.hxx
+++ b/inc/QANCollection_DataMapIteratorOfDataMapOfRealPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class QANCollection_DataMapNodeOfDataMapOfRealPnt;
 class QANCollection_DataMapIteratorOfDataMapOfRealPnt  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANCollection_DataMapIteratorOfDataMapOfRealPnt();
diff --git a/inc/QANCollection_DataMapOfRealPnt.hxx b/inc/QANCollection_DataMapOfRealPnt.hxx
index 62caea6..0b03b8c 100644
--- a/inc/QANCollection_DataMapOfRealPnt.hxx
+++ b/inc/QANCollection_DataMapOfRealPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class QANCollection_DataMapIteratorOfDataMapOfRealPnt;
 class QANCollection_DataMapOfRealPnt  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANCollection_DataMapOfRealPnt(const Standard_Integer NbBuckets = 1);
diff --git a/inc/QANCollection_DoubleMapIteratorOfDoubleMapOfRealInteger.hxx b/inc/QANCollection_DoubleMapIteratorOfDoubleMapOfRealInteger.hxx
index 11ccf67..d8ed136 100644
--- a/inc/QANCollection_DoubleMapIteratorOfDoubleMapOfRealInteger.hxx
+++ b/inc/QANCollection_DoubleMapIteratorOfDoubleMapOfRealInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class QANCollection_DoubleMapNodeOfDoubleMapOfRealInteger;
 class QANCollection_DoubleMapIteratorOfDoubleMapOfRealInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANCollection_DoubleMapIteratorOfDoubleMapOfRealInteger();
diff --git a/inc/QANCollection_DoubleMapOfRealInteger.hxx b/inc/QANCollection_DoubleMapOfRealInteger.hxx
index c48e14f..42653bd 100644
--- a/inc/QANCollection_DoubleMapOfRealInteger.hxx
+++ b/inc/QANCollection_DoubleMapOfRealInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class QANCollection_DoubleMapIteratorOfDoubleMapOfRealInteger;
 class QANCollection_DoubleMapOfRealInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANCollection_DoubleMapOfRealInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/QANCollection_IndexedDataMapOfRealPnt.hxx b/inc/QANCollection_IndexedDataMapOfRealPnt.hxx
index 78d2eae..0530870 100644
--- a/inc/QANCollection_IndexedDataMapOfRealPnt.hxx
+++ b/inc/QANCollection_IndexedDataMapOfRealPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class QANCollection_IndexedDataMapNodeOfIndexedDataMapOfRealPnt;
 class QANCollection_IndexedDataMapOfRealPnt  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANCollection_IndexedDataMapOfRealPnt(const Standard_Integer NbBuckets = 1);
diff --git a/inc/QANCollection_ListIteratorOfListOfPnt.hxx b/inc/QANCollection_ListIteratorOfListOfPnt.hxx
index fb382d2..40953f8 100644
--- a/inc/QANCollection_ListIteratorOfListOfPnt.hxx
+++ b/inc/QANCollection_ListIteratorOfListOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class QANCollection_ListNodeOfListOfPnt;
 class QANCollection_ListIteratorOfListOfPnt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANCollection_ListIteratorOfListOfPnt();
diff --git a/inc/QANCollection_ListOfPnt.hxx b/inc/QANCollection_ListOfPnt.hxx
index c552246..478f084 100644
--- a/inc/QANCollection_ListOfPnt.hxx
+++ b/inc/QANCollection_ListOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class QANCollection_ListNodeOfListOfPnt;
 class QANCollection_ListOfPnt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANCollection_ListOfPnt();
diff --git a/inc/QANCollection_QueueOfPnt.hxx b/inc/QANCollection_QueueOfPnt.hxx
index af015f7..836ae0a 100644
--- a/inc/QANCollection_QueueOfPnt.hxx
+++ b/inc/QANCollection_QueueOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class QANCollection_QueueNodeOfQueueOfPnt;
 class QANCollection_QueueOfPnt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANCollection_QueueOfPnt();
diff --git a/inc/QANCollection_SListOfPnt.hxx b/inc/QANCollection_SListOfPnt.hxx
index 34f9b0a..5f7a589 100644
--- a/inc/QANCollection_SListOfPnt.hxx
+++ b/inc/QANCollection_SListOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_Pnt;
 class QANCollection_SListOfPnt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANCollection_SListOfPnt();
diff --git a/inc/QANCollection_StackIteratorOfStackOfPnt.hxx b/inc/QANCollection_StackIteratorOfStackOfPnt.hxx
index cc50b03..5ad9c49 100644
--- a/inc/QANCollection_StackIteratorOfStackOfPnt.hxx
+++ b/inc/QANCollection_StackIteratorOfStackOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class QANCollection_StackNodeOfStackOfPnt;
 class QANCollection_StackIteratorOfStackOfPnt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANCollection_StackIteratorOfStackOfPnt();
diff --git a/inc/QANCollection_StackOfPnt.hxx b/inc/QANCollection_StackOfPnt.hxx
index b0038a1..6d807d5 100644
--- a/inc/QANCollection_StackOfPnt.hxx
+++ b/inc/QANCollection_StackOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class QANCollection_StackNodeOfStackOfPnt;
 class QANCollection_StackOfPnt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANCollection_StackOfPnt();
diff --git a/inc/QANewBRepNaming.hxx b/inc/QANewBRepNaming.hxx
index 8011c69..b2b94fe 100644
--- a/inc/QANewBRepNaming.hxx
+++ b/inc/QANewBRepNaming.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class QANewBRepNaming_Limitation;
 class QANewBRepNaming  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void CleanStructure(const TDF_Label& theLabel) ;
diff --git a/inc/QANewBRepNaming_BooleanOperation.hxx b/inc/QANewBRepNaming_BooleanOperation.hxx
index a1e17a0..ed9ab02 100644
--- a/inc/QANewBRepNaming_BooleanOperation.hxx
+++ b/inc/QANewBRepNaming_BooleanOperation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class BRepAlgo_BooleanOperation;
 class QANewBRepNaming_BooleanOperation  : public QANewBRepNaming_TopNaming {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_BooleanOperation();
diff --git a/inc/QANewBRepNaming_BooleanOperationFeat.hxx b/inc/QANewBRepNaming_BooleanOperationFeat.hxx
index a928ec3..addbec2 100644
--- a/inc/QANewBRepNaming_BooleanOperationFeat.hxx
+++ b/inc/QANewBRepNaming_BooleanOperationFeat.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopoDS_Shape;
 class QANewBRepNaming_BooleanOperationFeat  : public QANewBRepNaming_TopNaming {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT     void Init(const TDF_Label& ResultLabel) ;
diff --git a/inc/QANewBRepNaming_Box.hxx b/inc/QANewBRepNaming_Box.hxx
index e361b56..4255b86 100644
--- a/inc/QANewBRepNaming_Box.hxx
+++ b/inc/QANewBRepNaming_Box.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class BRepPrimAPI_MakeBox;
 class QANewBRepNaming_Box  : public QANewBRepNaming_TopNaming {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Box();
diff --git a/inc/QANewBRepNaming_Chamfer.hxx b/inc/QANewBRepNaming_Chamfer.hxx
index 692d379..7de6410 100644
--- a/inc/QANewBRepNaming_Chamfer.hxx
+++ b/inc/QANewBRepNaming_Chamfer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class BRepFilletAPI_MakeChamfer;
 class QANewBRepNaming_Chamfer  : public QANewBRepNaming_TopNaming {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Chamfer();
diff --git a/inc/QANewBRepNaming_Common.hxx b/inc/QANewBRepNaming_Common.hxx
index 3bc2884..c9aa3c2 100644
--- a/inc/QANewBRepNaming_Common.hxx
+++ b/inc/QANewBRepNaming_Common.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class BRepAlgoAPI_BooleanOperation;
 class QANewBRepNaming_Common  : public QANewBRepNaming_BooleanOperationFeat {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Common();
diff --git a/inc/QANewBRepNaming_Cut.hxx b/inc/QANewBRepNaming_Cut.hxx
index d557bee..6fe5e64 100644
--- a/inc/QANewBRepNaming_Cut.hxx
+++ b/inc/QANewBRepNaming_Cut.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class BRepAlgoAPI_BooleanOperation;
 class QANewBRepNaming_Cut  : public QANewBRepNaming_BooleanOperationFeat {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Cut();
diff --git a/inc/QANewBRepNaming_Cylinder.hxx b/inc/QANewBRepNaming_Cylinder.hxx
index e0c96fa..de8df22 100644
--- a/inc/QANewBRepNaming_Cylinder.hxx
+++ b/inc/QANewBRepNaming_Cylinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class BRepPrimAPI_MakeCylinder;
 class QANewBRepNaming_Cylinder  : public QANewBRepNaming_TopNaming {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Cylinder();
diff --git a/inc/QANewBRepNaming_Fillet.hxx b/inc/QANewBRepNaming_Fillet.hxx
index 1657a84..d433fbd 100644
--- a/inc/QANewBRepNaming_Fillet.hxx
+++ b/inc/QANewBRepNaming_Fillet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class BRepFilletAPI_MakeFillet;
 class QANewBRepNaming_Fillet  : public QANewBRepNaming_TopNaming {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Fillet();
diff --git a/inc/QANewBRepNaming_Fuse.hxx b/inc/QANewBRepNaming_Fuse.hxx
index 02db4c7..5a7e7d7 100644
--- a/inc/QANewBRepNaming_Fuse.hxx
+++ b/inc/QANewBRepNaming_Fuse.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class BRepAlgoAPI_BooleanOperation;
 class QANewBRepNaming_Fuse  : public QANewBRepNaming_BooleanOperationFeat {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Fuse();
diff --git a/inc/QANewBRepNaming_Gluing.hxx b/inc/QANewBRepNaming_Gluing.hxx
index 2e3730b..e42b11c 100644
--- a/inc/QANewBRepNaming_Gluing.hxx
+++ b/inc/QANewBRepNaming_Gluing.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TopTools_DataMapOfShapeInteger;
 class QANewBRepNaming_Gluing  : public QANewBRepNaming_TopNaming {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Gluing();
diff --git a/inc/QANewBRepNaming_ImportShape.hxx b/inc/QANewBRepNaming_ImportShape.hxx
index 507812d..2135513 100644
--- a/inc/QANewBRepNaming_ImportShape.hxx
+++ b/inc/QANewBRepNaming_ImportShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TDF_LabelMap;
 class QANewBRepNaming_ImportShape  : public QANewBRepNaming_TopNaming {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_ImportShape();
diff --git a/inc/QANewBRepNaming_Intersection.hxx b/inc/QANewBRepNaming_Intersection.hxx
index 8a9a346..265347e 100644
--- a/inc/QANewBRepNaming_Intersection.hxx
+++ b/inc/QANewBRepNaming_Intersection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class BRepAlgoAPI_BooleanOperation;
 class QANewBRepNaming_Intersection  : public QANewBRepNaming_BooleanOperationFeat {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Intersection();
diff --git a/inc/QANewBRepNaming_Limitation.hxx b/inc/QANewBRepNaming_Limitation.hxx
index 63bb568..a9cf79a 100644
--- a/inc/QANewBRepNaming_Limitation.hxx
+++ b/inc/QANewBRepNaming_Limitation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class QANewModTopOpe_Limitation;
 class QANewBRepNaming_Limitation  : public QANewBRepNaming_BooleanOperationFeat {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Limitation();
diff --git a/inc/QANewBRepNaming_Loader.hxx b/inc/QANewBRepNaming_Loader.hxx
index ef6a2a6..3e8b2d3 100644
--- a/inc/QANewBRepNaming_Loader.hxx
+++ b/inc/QANewBRepNaming_Loader.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopTools_MapOfShape;
 class QANewBRepNaming_Loader  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Load in   the naming data-structure   the  shape <br>
 //!          generated  from FACE,  EDGE, VERTEX,..., after the <br>
diff --git a/inc/QANewBRepNaming_LoaderParent.hxx b/inc/QANewBRepNaming_LoaderParent.hxx
index f4a99a4..7a78ad5 100644
--- a/inc/QANewBRepNaming_LoaderParent.hxx
+++ b/inc/QANewBRepNaming_LoaderParent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class TopTools_DataMapOfShapeShape;
 class QANewBRepNaming_LoaderParent  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void LoadGeneratedDangleShapes(const TopoDS_Shape& ShapeIn,const TopAbs_ShapeEnum GeneratedFrom,TNaming_Builder& GenBuider) ;
diff --git a/inc/QANewBRepNaming_Prism.hxx b/inc/QANewBRepNaming_Prism.hxx
index c02df72..39b3234 100644
--- a/inc/QANewBRepNaming_Prism.hxx
+++ b/inc/QANewBRepNaming_Prism.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class TopoDS_Shape;
 class QANewBRepNaming_Prism  : public QANewBRepNaming_TopNaming {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Prism();
diff --git a/inc/QANewBRepNaming_Revol.hxx b/inc/QANewBRepNaming_Revol.hxx
index 69aa16d..a4fde52 100644
--- a/inc/QANewBRepNaming_Revol.hxx
+++ b/inc/QANewBRepNaming_Revol.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class TopoDS_Shape;
 class QANewBRepNaming_Revol  : public QANewBRepNaming_TopNaming {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Revol();
diff --git a/inc/QANewBRepNaming_Sphere.hxx b/inc/QANewBRepNaming_Sphere.hxx
index 6583b0d..019ad5d 100644
--- a/inc/QANewBRepNaming_Sphere.hxx
+++ b/inc/QANewBRepNaming_Sphere.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class BRepPrimAPI_MakeSphere;
 class QANewBRepNaming_Sphere  : public QANewBRepNaming_TopNaming {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewBRepNaming_Sphere();
diff --git a/inc/QANewBRepNaming_TopNaming.hxx b/inc/QANewBRepNaming_TopNaming.hxx
index f62eb1e..2e0031b 100644
--- a/inc/QANewBRepNaming_TopNaming.hxx
+++ b/inc/QANewBRepNaming_TopNaming.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@ class TDF_Label;
 class QANewBRepNaming_TopNaming  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the result label. <br>
        const TDF_Label& ResultLabel() const;
diff --git a/inc/QANewDBRepNaming.hxx b/inc/QANewDBRepNaming.hxx
index b7ec187..730982b 100644
--- a/inc/QANewDBRepNaming.hxx
+++ b/inc/QANewDBRepNaming.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -20,18 +23,7 @@ class Draw_Interpretor;
 class QANewDBRepNaming  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void AllCommands(Draw_Interpretor& Di) ;
diff --git a/inc/QANewModTopOpe.hxx b/inc/QANewModTopOpe.hxx
index 1ac3361..6d26600 100644
--- a/inc/QANewModTopOpe.hxx
+++ b/inc/QANewModTopOpe.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class QANewModTopOpe_ReShaper;
 class QANewModTopOpe  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! to check if TheS is valid or not. <br>
 //! in difference with BRepCheck_Analizer, this method allows <br>
diff --git a/inc/QANewModTopOpe_Glue.hxx b/inc/QANewModTopOpe_Glue.hxx
index e895e74..62be3a8 100644
--- a/inc/QANewModTopOpe_Glue.hxx
+++ b/inc/QANewModTopOpe_Glue.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class TopTools_IndexedDataMapOfShapeListOfShape;
 class QANewModTopOpe_Glue  : public BRepAlgoAPI_BooleanOperation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines 2 operands. <br>
 //!          If one of operands is Solid and another is Shell and Shell <br>
diff --git a/inc/QANewModTopOpe_Intersection.hxx b/inc/QANewModTopOpe_Intersection.hxx
index e17f684..8f7acea 100644
--- a/inc/QANewModTopOpe_Intersection.hxx
+++ b/inc/QANewModTopOpe_Intersection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopTools_ListOfShape;
 class QANewModTopOpe_Intersection  : public BRepAlgoAPI_BooleanOperation {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   QANewModTopOpe_Intersection(const TopoDS_Shape& theObject1,const TopoDS_Shape& theObject2);
diff --git a/inc/QANewModTopOpe_Limitation.hxx b/inc/QANewModTopOpe_Limitation.hxx
index 65c902c..c000f25 100644
--- a/inc/QANewModTopOpe_Limitation.hxx
+++ b/inc/QANewModTopOpe_Limitation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TopTools_ListOfShape;
 class QANewModTopOpe_Limitation  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! initializes and  fills data structure for  cutting and <br>
 //!          makes  cutting according to orientation theCutTool and <br>
diff --git a/inc/QANewModTopOpe_Tools.hxx b/inc/QANewModTopOpe_Tools.hxx
index 4cb9c58..7d876ed 100644
--- a/inc/QANewModTopOpe_Tools.hxx
+++ b/inc/QANewModTopOpe_Tools.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopTools_IndexedDataMapOfShapeListOfShape;
 class QANewModTopOpe_Tools  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer NbPoints(const BOPTools_PDSFiller& theDSFiller) ;
diff --git a/inc/QAViewer2dTest.hxx b/inc/QAViewer2dTest.hxx
new file mode 100644
index 0000000..77f8ab3
--- /dev/null
+++ b/inc/QAViewer2dTest.hxx
@@ -0,0 +1,66 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#ifndef _QAViewer2dTest_HeaderFile
+#define _QAViewer2dTest_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+class Draw_Interpretor;
+
+
+
+class QAViewer2dTest  {
+public:
+
+  DEFINE_STANDARD_ALLOC
+
+  
+  Standard_EXPORT   static  void Commands(Draw_Interpretor& theCommands) ;
+  
+  Standard_EXPORT   static  void MyCommands(Draw_Interpretor& theCommands) ;
+  
+  Standard_EXPORT   static  void GeneralCommands(Draw_Interpretor& theCommands) ;
+  
+  Standard_EXPORT   static  void ViewerCommands(Draw_Interpretor& theCommands) ;
+  
+  Standard_EXPORT   static  void DisplayCommands(Draw_Interpretor& theCommands) ;
+  
+  Standard_EXPORT   static  void ObjectCommands(Draw_Interpretor& theCommands) ;
+
+
+
+
+
+protected:
+
+
+
+
+
+private:
+
+
+
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+
+
+#endif
diff --git a/inc/Quantity_Array1OfCoefficient.hxx b/inc/Quantity_Array1OfCoefficient.hxx
index e716488..9363f15 100644
--- a/inc/Quantity_Array1OfCoefficient.hxx
+++ b/inc/Quantity_Array1OfCoefficient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_OutOfMemory;
 class Quantity_Array1OfCoefficient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Quantity_Array1OfCoefficient(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Quantity_Array1OfColor.hxx b/inc/Quantity_Array1OfColor.hxx
index a33ee6a..3639990 100644
--- a/inc/Quantity_Array1OfColor.hxx
+++ b/inc/Quantity_Array1OfColor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Quantity_Color;
 class Quantity_Array1OfColor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Quantity_Array1OfColor(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Quantity_Array2OfColor.hxx b/inc/Quantity_Array2OfColor.hxx
index cf2f692..bd953f8 100644
--- a/inc/Quantity_Array2OfColor.hxx
+++ b/inc/Quantity_Array2OfColor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Quantity_Color;
 class Quantity_Array2OfColor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Quantity_Array2OfColor(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/Quantity_Color.hxx b/inc/Quantity_Color.hxx
index 861ec07..86e0499 100644
--- a/inc/Quantity_Color.hxx
+++ b/inc/Quantity_Color.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Quantity_Color);
 class Quantity_Color  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a colour with the default value of <br>
 //!	    Colour name : YELLOW <br>
diff --git a/inc/Quantity_Convert.hxx b/inc/Quantity_Convert.hxx
index f674273..0dd9b07 100644
--- a/inc/Quantity_Convert.hxx
+++ b/inc/Quantity_Convert.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TCollection_AsciiString;
 class Quantity_Convert  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an object; <br>
   Standard_EXPORT   Quantity_Convert();
diff --git a/inc/Quantity_Date.hxx b/inc/Quantity_Date.hxx
index c6e515a..7e60095 100644
--- a/inc/Quantity_Date.hxx
+++ b/inc/Quantity_Date.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Quantity_Date);
 class Quantity_Date  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //!  Constructs a default date <br>
 //! (00:00 GMT, January 1, 1979 (zero hour)); use the function <br>
diff --git a/inc/Quantity_Period.hxx b/inc/Quantity_Period.hxx
index 4b0f62f..9147ff9 100644
--- a/inc/Quantity_Period.hxx
+++ b/inc/Quantity_Period.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Quantity_Period);
 class Quantity_Period  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Period <br>
 //!          With:      0 <= dd <br>
diff --git a/inc/RWHeaderSection.hxx b/inc/RWHeaderSection.hxx
index 8b097b1..e0354fd 100644
--- a/inc/RWHeaderSection.hxx
+++ b/inc/RWHeaderSection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class RWHeaderSection_RWFileSchema;
 class RWHeaderSection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! enforced the initialisation of the  libraries <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/RWHeaderSection_RWFileDescription.hxx b/inc/RWHeaderSection_RWFileDescription.hxx
index 3492d1b..fc6c44b 100644
--- a/inc/RWHeaderSection_RWFileDescription.hxx
+++ b/inc/RWHeaderSection_RWFileDescription.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWHeaderSection_RWFileDescription  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWHeaderSection_RWFileDescription();
diff --git a/inc/RWHeaderSection_RWFileName.hxx b/inc/RWHeaderSection_RWFileName.hxx
index 2b3a2a5..8ee38c6 100644
--- a/inc/RWHeaderSection_RWFileName.hxx
+++ b/inc/RWHeaderSection_RWFileName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWHeaderSection_RWFileName  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWHeaderSection_RWFileName();
diff --git a/inc/RWHeaderSection_RWFileSchema.hxx b/inc/RWHeaderSection_RWFileSchema.hxx
index 3a52e88..f6997da 100644
--- a/inc/RWHeaderSection_RWFileSchema.hxx
+++ b/inc/RWHeaderSection_RWFileSchema.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWHeaderSection_RWFileSchema  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWHeaderSection_RWFileSchema();
diff --git a/inc/RWStepAP203_RWCcDesignApproval.hxx b/inc/RWStepAP203_RWCcDesignApproval.hxx
index 7596ccf..dbb28ab 100644
--- a/inc/RWStepAP203_RWCcDesignApproval.hxx
+++ b/inc/RWStepAP203_RWCcDesignApproval.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP203_RWCcDesignApproval  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP203_RWCcDesignApproval();
diff --git a/inc/RWStepAP203_RWCcDesignCertification.hxx b/inc/RWStepAP203_RWCcDesignCertification.hxx
index a8382b1..080a371 100644
--- a/inc/RWStepAP203_RWCcDesignCertification.hxx
+++ b/inc/RWStepAP203_RWCcDesignCertification.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP203_RWCcDesignCertification  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP203_RWCcDesignCertification();
diff --git a/inc/RWStepAP203_RWCcDesignContract.hxx b/inc/RWStepAP203_RWCcDesignContract.hxx
index 9830c4c..b049130 100644
--- a/inc/RWStepAP203_RWCcDesignContract.hxx
+++ b/inc/RWStepAP203_RWCcDesignContract.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP203_RWCcDesignContract  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP203_RWCcDesignContract();
diff --git a/inc/RWStepAP203_RWCcDesignDateAndTimeAssignment.hxx b/inc/RWStepAP203_RWCcDesignDateAndTimeAssignment.hxx
index 7792f31..2e6df1b 100644
--- a/inc/RWStepAP203_RWCcDesignDateAndTimeAssignment.hxx
+++ b/inc/RWStepAP203_RWCcDesignDateAndTimeAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP203_RWCcDesignDateAndTimeAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP203_RWCcDesignDateAndTimeAssignment();
diff --git a/inc/RWStepAP203_RWCcDesignPersonAndOrganizationAssignment.hxx b/inc/RWStepAP203_RWCcDesignPersonAndOrganizationAssignment.hxx
index 952d91e..81da33a 100644
--- a/inc/RWStepAP203_RWCcDesignPersonAndOrganizationAssignment.hxx
+++ b/inc/RWStepAP203_RWCcDesignPersonAndOrganizationAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP203_RWCcDesignPersonAndOrganizationAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP203_RWCcDesignPersonAndOrganizationAssignment();
diff --git a/inc/RWStepAP203_RWCcDesignSecurityClassification.hxx b/inc/RWStepAP203_RWCcDesignSecurityClassification.hxx
index 7c0f83f..884fd28 100644
--- a/inc/RWStepAP203_RWCcDesignSecurityClassification.hxx
+++ b/inc/RWStepAP203_RWCcDesignSecurityClassification.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP203_RWCcDesignSecurityClassification  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP203_RWCcDesignSecurityClassification();
diff --git a/inc/RWStepAP203_RWCcDesignSpecificationReference.hxx b/inc/RWStepAP203_RWCcDesignSpecificationReference.hxx
index 7dae816..8a30618 100644
--- a/inc/RWStepAP203_RWCcDesignSpecificationReference.hxx
+++ b/inc/RWStepAP203_RWCcDesignSpecificationReference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP203_RWCcDesignSpecificationReference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP203_RWCcDesignSpecificationReference();
diff --git a/inc/RWStepAP203_RWChange.hxx b/inc/RWStepAP203_RWChange.hxx
index 9f9b319..a8bdb60 100644
--- a/inc/RWStepAP203_RWChange.hxx
+++ b/inc/RWStepAP203_RWChange.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP203_RWChange  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP203_RWChange();
diff --git a/inc/RWStepAP203_RWChangeRequest.hxx b/inc/RWStepAP203_RWChangeRequest.hxx
index b56327e..2dec0c2 100644
--- a/inc/RWStepAP203_RWChangeRequest.hxx
+++ b/inc/RWStepAP203_RWChangeRequest.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP203_RWChangeRequest  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP203_RWChangeRequest();
diff --git a/inc/RWStepAP203_RWStartRequest.hxx b/inc/RWStepAP203_RWStartRequest.hxx
index 9929823..b671141 100644
--- a/inc/RWStepAP203_RWStartRequest.hxx
+++ b/inc/RWStepAP203_RWStartRequest.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP203_RWStartRequest  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP203_RWStartRequest();
diff --git a/inc/RWStepAP203_RWStartWork.hxx b/inc/RWStepAP203_RWStartWork.hxx
index 678f192..b5adc92 100644
--- a/inc/RWStepAP203_RWStartWork.hxx
+++ b/inc/RWStepAP203_RWStartWork.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP203_RWStartWork  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP203_RWStartWork();
diff --git a/inc/RWStepAP214.hxx b/inc/RWStepAP214.hxx
index 0d4ed00..d8bc8cb 100644
--- a/inc/RWStepAP214.hxx
+++ b/inc/RWStepAP214.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class RWStepAP214_RWRepItemGroup;
 class RWStepAP214  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! enforced the initialisation of the  libraries <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/RWStepAP214_RWAppliedApprovalAssignment.hxx b/inc/RWStepAP214_RWAppliedApprovalAssignment.hxx
index fa71d8b..43a876d 100644
--- a/inc/RWStepAP214_RWAppliedApprovalAssignment.hxx
+++ b/inc/RWStepAP214_RWAppliedApprovalAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAppliedApprovalAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAppliedApprovalAssignment();
diff --git a/inc/RWStepAP214_RWAppliedDateAndTimeAssignment.hxx b/inc/RWStepAP214_RWAppliedDateAndTimeAssignment.hxx
index 51fd628..c80844b 100644
--- a/inc/RWStepAP214_RWAppliedDateAndTimeAssignment.hxx
+++ b/inc/RWStepAP214_RWAppliedDateAndTimeAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAppliedDateAndTimeAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAppliedDateAndTimeAssignment();
diff --git a/inc/RWStepAP214_RWAppliedDateAssignment.hxx b/inc/RWStepAP214_RWAppliedDateAssignment.hxx
index 7339400..ce26fc7 100644
--- a/inc/RWStepAP214_RWAppliedDateAssignment.hxx
+++ b/inc/RWStepAP214_RWAppliedDateAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAppliedDateAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAppliedDateAssignment();
diff --git a/inc/RWStepAP214_RWAppliedDocumentReference.hxx b/inc/RWStepAP214_RWAppliedDocumentReference.hxx
index 4268ccd..88eb603 100644
--- a/inc/RWStepAP214_RWAppliedDocumentReference.hxx
+++ b/inc/RWStepAP214_RWAppliedDocumentReference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAppliedDocumentReference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAppliedDocumentReference();
diff --git a/inc/RWStepAP214_RWAppliedExternalIdentificationAssignment.hxx b/inc/RWStepAP214_RWAppliedExternalIdentificationAssignment.hxx
index 78f4355..400a1ab 100644
--- a/inc/RWStepAP214_RWAppliedExternalIdentificationAssignment.hxx
+++ b/inc/RWStepAP214_RWAppliedExternalIdentificationAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAppliedExternalIdentificationAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP214_RWAppliedExternalIdentificationAssignment();
diff --git a/inc/RWStepAP214_RWAppliedGroupAssignment.hxx b/inc/RWStepAP214_RWAppliedGroupAssignment.hxx
index cfda0c3..84b4222 100644
--- a/inc/RWStepAP214_RWAppliedGroupAssignment.hxx
+++ b/inc/RWStepAP214_RWAppliedGroupAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAppliedGroupAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP214_RWAppliedGroupAssignment();
diff --git a/inc/RWStepAP214_RWAppliedOrganizationAssignment.hxx b/inc/RWStepAP214_RWAppliedOrganizationAssignment.hxx
index 4e85022..1a3f9b8 100644
--- a/inc/RWStepAP214_RWAppliedOrganizationAssignment.hxx
+++ b/inc/RWStepAP214_RWAppliedOrganizationAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAppliedOrganizationAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAppliedOrganizationAssignment();
diff --git a/inc/RWStepAP214_RWAppliedPersonAndOrganizationAssignment.hxx b/inc/RWStepAP214_RWAppliedPersonAndOrganizationAssignment.hxx
index 0c0d96d..2772536 100644
--- a/inc/RWStepAP214_RWAppliedPersonAndOrganizationAssignment.hxx
+++ b/inc/RWStepAP214_RWAppliedPersonAndOrganizationAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAppliedPersonAndOrganizationAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAppliedPersonAndOrganizationAssignment();
diff --git a/inc/RWStepAP214_RWAppliedPresentedItem.hxx b/inc/RWStepAP214_RWAppliedPresentedItem.hxx
index c48f4f3..70f71b4 100644
--- a/inc/RWStepAP214_RWAppliedPresentedItem.hxx
+++ b/inc/RWStepAP214_RWAppliedPresentedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAppliedPresentedItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAppliedPresentedItem();
diff --git a/inc/RWStepAP214_RWAppliedSecurityClassificationAssignment.hxx b/inc/RWStepAP214_RWAppliedSecurityClassificationAssignment.hxx
index bccc7a7..d50ebf2 100644
--- a/inc/RWStepAP214_RWAppliedSecurityClassificationAssignment.hxx
+++ b/inc/RWStepAP214_RWAppliedSecurityClassificationAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAppliedSecurityClassificationAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAppliedSecurityClassificationAssignment();
diff --git a/inc/RWStepAP214_RWAutoDesignActualDateAndTimeAssignment.hxx b/inc/RWStepAP214_RWAutoDesignActualDateAndTimeAssignment.hxx
index 87d4ef5..2066c34 100644
--- a/inc/RWStepAP214_RWAutoDesignActualDateAndTimeAssignment.hxx
+++ b/inc/RWStepAP214_RWAutoDesignActualDateAndTimeAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAutoDesignActualDateAndTimeAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAutoDesignActualDateAndTimeAssignment();
diff --git a/inc/RWStepAP214_RWAutoDesignActualDateAssignment.hxx b/inc/RWStepAP214_RWAutoDesignActualDateAssignment.hxx
index 74c5b94..928806c 100644
--- a/inc/RWStepAP214_RWAutoDesignActualDateAssignment.hxx
+++ b/inc/RWStepAP214_RWAutoDesignActualDateAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAutoDesignActualDateAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAutoDesignActualDateAssignment();
diff --git a/inc/RWStepAP214_RWAutoDesignApprovalAssignment.hxx b/inc/RWStepAP214_RWAutoDesignApprovalAssignment.hxx
index e49c4fe..f452ea5 100644
--- a/inc/RWStepAP214_RWAutoDesignApprovalAssignment.hxx
+++ b/inc/RWStepAP214_RWAutoDesignApprovalAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAutoDesignApprovalAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAutoDesignApprovalAssignment();
diff --git a/inc/RWStepAP214_RWAutoDesignDateAndPersonAssignment.hxx b/inc/RWStepAP214_RWAutoDesignDateAndPersonAssignment.hxx
index 7304250..ebfa206 100644
--- a/inc/RWStepAP214_RWAutoDesignDateAndPersonAssignment.hxx
+++ b/inc/RWStepAP214_RWAutoDesignDateAndPersonAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAutoDesignDateAndPersonAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAutoDesignDateAndPersonAssignment();
diff --git a/inc/RWStepAP214_RWAutoDesignDocumentReference.hxx b/inc/RWStepAP214_RWAutoDesignDocumentReference.hxx
index 82f1ce3..b9e0723 100644
--- a/inc/RWStepAP214_RWAutoDesignDocumentReference.hxx
+++ b/inc/RWStepAP214_RWAutoDesignDocumentReference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAutoDesignDocumentReference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAutoDesignDocumentReference();
diff --git a/inc/RWStepAP214_RWAutoDesignGroupAssignment.hxx b/inc/RWStepAP214_RWAutoDesignGroupAssignment.hxx
index a6455e6..8208778 100644
--- a/inc/RWStepAP214_RWAutoDesignGroupAssignment.hxx
+++ b/inc/RWStepAP214_RWAutoDesignGroupAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAutoDesignGroupAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAutoDesignGroupAssignment();
diff --git a/inc/RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment.hxx b/inc/RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment.hxx
index bb8f3f7..eac16be 100644
--- a/inc/RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment.hxx
+++ b/inc/RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment();
diff --git a/inc/RWStepAP214_RWAutoDesignNominalDateAssignment.hxx b/inc/RWStepAP214_RWAutoDesignNominalDateAssignment.hxx
index ac901a3..dd86d68 100644
--- a/inc/RWStepAP214_RWAutoDesignNominalDateAssignment.hxx
+++ b/inc/RWStepAP214_RWAutoDesignNominalDateAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAutoDesignNominalDateAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAutoDesignNominalDateAssignment();
diff --git a/inc/RWStepAP214_RWAutoDesignOrganizationAssignment.hxx b/inc/RWStepAP214_RWAutoDesignOrganizationAssignment.hxx
index f1177c1..aabd1fa 100644
--- a/inc/RWStepAP214_RWAutoDesignOrganizationAssignment.hxx
+++ b/inc/RWStepAP214_RWAutoDesignOrganizationAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAutoDesignOrganizationAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAutoDesignOrganizationAssignment();
diff --git a/inc/RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment.hxx b/inc/RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment.hxx
index 72a37c8..f8a578d 100644
--- a/inc/RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment.hxx
+++ b/inc/RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment();
diff --git a/inc/RWStepAP214_RWAutoDesignPresentedItem.hxx b/inc/RWStepAP214_RWAutoDesignPresentedItem.hxx
index 74d7b80..19b6a41 100644
--- a/inc/RWStepAP214_RWAutoDesignPresentedItem.hxx
+++ b/inc/RWStepAP214_RWAutoDesignPresentedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAutoDesignPresentedItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAutoDesignPresentedItem();
diff --git a/inc/RWStepAP214_RWAutoDesignSecurityClassificationAssignment.hxx b/inc/RWStepAP214_RWAutoDesignSecurityClassificationAssignment.hxx
index badaa0e..3b0e072 100644
--- a/inc/RWStepAP214_RWAutoDesignSecurityClassificationAssignment.hxx
+++ b/inc/RWStepAP214_RWAutoDesignSecurityClassificationAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWAutoDesignSecurityClassificationAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepAP214_RWAutoDesignSecurityClassificationAssignment();
diff --git a/inc/RWStepAP214_RWClass.hxx b/inc/RWStepAP214_RWClass.hxx
index e2b028e..bae0848 100644
--- a/inc/RWStepAP214_RWClass.hxx
+++ b/inc/RWStepAP214_RWClass.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWClass  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP214_RWClass();
diff --git a/inc/RWStepAP214_RWExternallyDefinedClass.hxx b/inc/RWStepAP214_RWExternallyDefinedClass.hxx
index f57f36c..d6326fa 100644
--- a/inc/RWStepAP214_RWExternallyDefinedClass.hxx
+++ b/inc/RWStepAP214_RWExternallyDefinedClass.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWExternallyDefinedClass  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP214_RWExternallyDefinedClass();
diff --git a/inc/RWStepAP214_RWExternallyDefinedGeneralProperty.hxx b/inc/RWStepAP214_RWExternallyDefinedGeneralProperty.hxx
index 8f91cd0..7214b09 100644
--- a/inc/RWStepAP214_RWExternallyDefinedGeneralProperty.hxx
+++ b/inc/RWStepAP214_RWExternallyDefinedGeneralProperty.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWExternallyDefinedGeneralProperty  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP214_RWExternallyDefinedGeneralProperty();
diff --git a/inc/RWStepAP214_RWRepItemGroup.hxx b/inc/RWStepAP214_RWRepItemGroup.hxx
index 8e548d7..593cdc4 100644
--- a/inc/RWStepAP214_RWRepItemGroup.hxx
+++ b/inc/RWStepAP214_RWRepItemGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepAP214_RWRepItemGroup  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepAP214_RWRepItemGroup();
diff --git a/inc/RWStepBasic_RWAction.hxx b/inc/RWStepBasic_RWAction.hxx
index d731f4e..d1b5e45 100644
--- a/inc/RWStepBasic_RWAction.hxx
+++ b/inc/RWStepBasic_RWAction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWAction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWAction();
diff --git a/inc/RWStepBasic_RWActionAssignment.hxx b/inc/RWStepBasic_RWActionAssignment.hxx
index cd19f98..a677f83 100644
--- a/inc/RWStepBasic_RWActionAssignment.hxx
+++ b/inc/RWStepBasic_RWActionAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWActionAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWActionAssignment();
diff --git a/inc/RWStepBasic_RWActionMethod.hxx b/inc/RWStepBasic_RWActionMethod.hxx
index 1807cc2..a46cd1c 100644
--- a/inc/RWStepBasic_RWActionMethod.hxx
+++ b/inc/RWStepBasic_RWActionMethod.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWActionMethod  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWActionMethod();
diff --git a/inc/RWStepBasic_RWActionRequestAssignment.hxx b/inc/RWStepBasic_RWActionRequestAssignment.hxx
index 604fd29..148869d 100644
--- a/inc/RWStepBasic_RWActionRequestAssignment.hxx
+++ b/inc/RWStepBasic_RWActionRequestAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWActionRequestAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWActionRequestAssignment();
diff --git a/inc/RWStepBasic_RWActionRequestSolution.hxx b/inc/RWStepBasic_RWActionRequestSolution.hxx
index 3f39621..e1fa375 100644
--- a/inc/RWStepBasic_RWActionRequestSolution.hxx
+++ b/inc/RWStepBasic_RWActionRequestSolution.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWActionRequestSolution  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWActionRequestSolution();
diff --git a/inc/RWStepBasic_RWAddress.hxx b/inc/RWStepBasic_RWAddress.hxx
index 9eeeaf2..c3f6de5 100644
--- a/inc/RWStepBasic_RWAddress.hxx
+++ b/inc/RWStepBasic_RWAddress.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWAddress  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWAddress();
diff --git a/inc/RWStepBasic_RWApplicationContext.hxx b/inc/RWStepBasic_RWApplicationContext.hxx
index 2911418..7a1f021 100644
--- a/inc/RWStepBasic_RWApplicationContext.hxx
+++ b/inc/RWStepBasic_RWApplicationContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWApplicationContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWApplicationContext();
diff --git a/inc/RWStepBasic_RWApplicationContextElement.hxx b/inc/RWStepBasic_RWApplicationContextElement.hxx
index d301fdb..e271b3c 100644
--- a/inc/RWStepBasic_RWApplicationContextElement.hxx
+++ b/inc/RWStepBasic_RWApplicationContextElement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWApplicationContextElement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWApplicationContextElement();
diff --git a/inc/RWStepBasic_RWApplicationProtocolDefinition.hxx b/inc/RWStepBasic_RWApplicationProtocolDefinition.hxx
index 0acfbac..f444f04 100644
--- a/inc/RWStepBasic_RWApplicationProtocolDefinition.hxx
+++ b/inc/RWStepBasic_RWApplicationProtocolDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWApplicationProtocolDefinition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWApplicationProtocolDefinition();
diff --git a/inc/RWStepBasic_RWApproval.hxx b/inc/RWStepBasic_RWApproval.hxx
index 05618fa..968fd8a 100644
--- a/inc/RWStepBasic_RWApproval.hxx
+++ b/inc/RWStepBasic_RWApproval.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWApproval  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWApproval();
diff --git a/inc/RWStepBasic_RWApprovalDateTime.hxx b/inc/RWStepBasic_RWApprovalDateTime.hxx
index 5c145fe..20fde39 100644
--- a/inc/RWStepBasic_RWApprovalDateTime.hxx
+++ b/inc/RWStepBasic_RWApprovalDateTime.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWApprovalDateTime  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWApprovalDateTime();
diff --git a/inc/RWStepBasic_RWApprovalPersonOrganization.hxx b/inc/RWStepBasic_RWApprovalPersonOrganization.hxx
index 4534ce7..81b1dcb 100644
--- a/inc/RWStepBasic_RWApprovalPersonOrganization.hxx
+++ b/inc/RWStepBasic_RWApprovalPersonOrganization.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWApprovalPersonOrganization  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWApprovalPersonOrganization();
diff --git a/inc/RWStepBasic_RWApprovalRelationship.hxx b/inc/RWStepBasic_RWApprovalRelationship.hxx
index 3f6f301..d16f7b6 100644
--- a/inc/RWStepBasic_RWApprovalRelationship.hxx
+++ b/inc/RWStepBasic_RWApprovalRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWApprovalRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWApprovalRelationship();
diff --git a/inc/RWStepBasic_RWApprovalRole.hxx b/inc/RWStepBasic_RWApprovalRole.hxx
index e9ff757..84fc913 100644
--- a/inc/RWStepBasic_RWApprovalRole.hxx
+++ b/inc/RWStepBasic_RWApprovalRole.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWApprovalRole  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWApprovalRole();
diff --git a/inc/RWStepBasic_RWApprovalStatus.hxx b/inc/RWStepBasic_RWApprovalStatus.hxx
index 9145cc1..c05ac93 100644
--- a/inc/RWStepBasic_RWApprovalStatus.hxx
+++ b/inc/RWStepBasic_RWApprovalStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWApprovalStatus  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWApprovalStatus();
diff --git a/inc/RWStepBasic_RWCalendarDate.hxx b/inc/RWStepBasic_RWCalendarDate.hxx
index a71c4c3..4e70c4f 100644
--- a/inc/RWStepBasic_RWCalendarDate.hxx
+++ b/inc/RWStepBasic_RWCalendarDate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWCalendarDate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWCalendarDate();
diff --git a/inc/RWStepBasic_RWCertification.hxx b/inc/RWStepBasic_RWCertification.hxx
index 2b80444..8967bd8 100644
--- a/inc/RWStepBasic_RWCertification.hxx
+++ b/inc/RWStepBasic_RWCertification.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWCertification  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWCertification();
diff --git a/inc/RWStepBasic_RWCertificationAssignment.hxx b/inc/RWStepBasic_RWCertificationAssignment.hxx
index 3191d61..0c60448 100644
--- a/inc/RWStepBasic_RWCertificationAssignment.hxx
+++ b/inc/RWStepBasic_RWCertificationAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWCertificationAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWCertificationAssignment();
diff --git a/inc/RWStepBasic_RWCertificationType.hxx b/inc/RWStepBasic_RWCertificationType.hxx
index 43549d6..e19e881 100644
--- a/inc/RWStepBasic_RWCertificationType.hxx
+++ b/inc/RWStepBasic_RWCertificationType.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWCertificationType  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWCertificationType();
diff --git a/inc/RWStepBasic_RWCharacterizedObject.hxx b/inc/RWStepBasic_RWCharacterizedObject.hxx
index 1bff23e..83901af 100644
--- a/inc/RWStepBasic_RWCharacterizedObject.hxx
+++ b/inc/RWStepBasic_RWCharacterizedObject.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWCharacterizedObject  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWCharacterizedObject();
diff --git a/inc/RWStepBasic_RWContract.hxx b/inc/RWStepBasic_RWContract.hxx
index 7846fb7..a98ce9e 100644
--- a/inc/RWStepBasic_RWContract.hxx
+++ b/inc/RWStepBasic_RWContract.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWContract  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWContract();
diff --git a/inc/RWStepBasic_RWContractAssignment.hxx b/inc/RWStepBasic_RWContractAssignment.hxx
index 06c9c1c..b9c61ff 100644
--- a/inc/RWStepBasic_RWContractAssignment.hxx
+++ b/inc/RWStepBasic_RWContractAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWContractAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWContractAssignment();
diff --git a/inc/RWStepBasic_RWContractType.hxx b/inc/RWStepBasic_RWContractType.hxx
index c882ac4..24a6529 100644
--- a/inc/RWStepBasic_RWContractType.hxx
+++ b/inc/RWStepBasic_RWContractType.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWContractType  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWContractType();
diff --git a/inc/RWStepBasic_RWConversionBasedUnit.hxx b/inc/RWStepBasic_RWConversionBasedUnit.hxx
index 51240a5..8caa0e9 100644
--- a/inc/RWStepBasic_RWConversionBasedUnit.hxx
+++ b/inc/RWStepBasic_RWConversionBasedUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWConversionBasedUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWConversionBasedUnit();
diff --git a/inc/RWStepBasic_RWConversionBasedUnitAndAreaUnit.hxx b/inc/RWStepBasic_RWConversionBasedUnitAndAreaUnit.hxx
index 28f4854..82f06a6 100644
--- a/inc/RWStepBasic_RWConversionBasedUnitAndAreaUnit.hxx
+++ b/inc/RWStepBasic_RWConversionBasedUnitAndAreaUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWConversionBasedUnitAndAreaUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWConversionBasedUnitAndAreaUnit();
diff --git a/inc/RWStepBasic_RWConversionBasedUnitAndLengthUnit.hxx b/inc/RWStepBasic_RWConversionBasedUnitAndLengthUnit.hxx
index 4f699c1..1b583df 100644
--- a/inc/RWStepBasic_RWConversionBasedUnitAndLengthUnit.hxx
+++ b/inc/RWStepBasic_RWConversionBasedUnitAndLengthUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWConversionBasedUnitAndLengthUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWConversionBasedUnitAndLengthUnit();
diff --git a/inc/RWStepBasic_RWConversionBasedUnitAndMassUnit.hxx b/inc/RWStepBasic_RWConversionBasedUnitAndMassUnit.hxx
index 4fd6b95..1f11ed1 100644
--- a/inc/RWStepBasic_RWConversionBasedUnitAndMassUnit.hxx
+++ b/inc/RWStepBasic_RWConversionBasedUnitAndMassUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWConversionBasedUnitAndMassUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWConversionBasedUnitAndMassUnit();
diff --git a/inc/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.hxx b/inc/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.hxx
index c3c8b0a..539ba52 100644
--- a/inc/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.hxx
+++ b/inc/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit();
diff --git a/inc/RWStepBasic_RWConversionBasedUnitAndRatioUnit.hxx b/inc/RWStepBasic_RWConversionBasedUnitAndRatioUnit.hxx
index 126f942..7594d24 100644
--- a/inc/RWStepBasic_RWConversionBasedUnitAndRatioUnit.hxx
+++ b/inc/RWStepBasic_RWConversionBasedUnitAndRatioUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWConversionBasedUnitAndRatioUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWConversionBasedUnitAndRatioUnit();
diff --git a/inc/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.hxx b/inc/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.hxx
index 0f024db..34faf38 100644
--- a/inc/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.hxx
+++ b/inc/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit();
diff --git a/inc/RWStepBasic_RWConversionBasedUnitAndTimeUnit.hxx b/inc/RWStepBasic_RWConversionBasedUnitAndTimeUnit.hxx
index df74a5f..b17a3f6 100644
--- a/inc/RWStepBasic_RWConversionBasedUnitAndTimeUnit.hxx
+++ b/inc/RWStepBasic_RWConversionBasedUnitAndTimeUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWConversionBasedUnitAndTimeUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWConversionBasedUnitAndTimeUnit();
diff --git a/inc/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.hxx b/inc/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.hxx
index dc399a4..80a3fd5 100644
--- a/inc/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.hxx
+++ b/inc/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWConversionBasedUnitAndVolumeUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWConversionBasedUnitAndVolumeUnit();
diff --git a/inc/RWStepBasic_RWCoordinatedUniversalTimeOffset.hxx b/inc/RWStepBasic_RWCoordinatedUniversalTimeOffset.hxx
index 9f383e8..8cfee5b 100644
--- a/inc/RWStepBasic_RWCoordinatedUniversalTimeOffset.hxx
+++ b/inc/RWStepBasic_RWCoordinatedUniversalTimeOffset.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWCoordinatedUniversalTimeOffset  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWCoordinatedUniversalTimeOffset();
diff --git a/inc/RWStepBasic_RWDate.hxx b/inc/RWStepBasic_RWDate.hxx
index 2c38462..0dff4d0 100644
--- a/inc/RWStepBasic_RWDate.hxx
+++ b/inc/RWStepBasic_RWDate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWDate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWDate();
diff --git a/inc/RWStepBasic_RWDateAndTime.hxx b/inc/RWStepBasic_RWDateAndTime.hxx
index ee1cfaa..e0c976d 100644
--- a/inc/RWStepBasic_RWDateAndTime.hxx
+++ b/inc/RWStepBasic_RWDateAndTime.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWDateAndTime  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWDateAndTime();
diff --git a/inc/RWStepBasic_RWDateRole.hxx b/inc/RWStepBasic_RWDateRole.hxx
index 38abacf..de0b9ff 100644
--- a/inc/RWStepBasic_RWDateRole.hxx
+++ b/inc/RWStepBasic_RWDateRole.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWDateRole  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWDateRole();
diff --git a/inc/RWStepBasic_RWDateTimeRole.hxx b/inc/RWStepBasic_RWDateTimeRole.hxx
index 7bae2f2..376b86b 100644
--- a/inc/RWStepBasic_RWDateTimeRole.hxx
+++ b/inc/RWStepBasic_RWDateTimeRole.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWDateTimeRole  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWDateTimeRole();
diff --git a/inc/RWStepBasic_RWDerivedUnit.hxx b/inc/RWStepBasic_RWDerivedUnit.hxx
index 3d31bf9..6436c29 100644
--- a/inc/RWStepBasic_RWDerivedUnit.hxx
+++ b/inc/RWStepBasic_RWDerivedUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWDerivedUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWDerivedUnit();
diff --git a/inc/RWStepBasic_RWDerivedUnitElement.hxx b/inc/RWStepBasic_RWDerivedUnitElement.hxx
index 884d2ec..9cada9f 100644
--- a/inc/RWStepBasic_RWDerivedUnitElement.hxx
+++ b/inc/RWStepBasic_RWDerivedUnitElement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWDerivedUnitElement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWDerivedUnitElement();
diff --git a/inc/RWStepBasic_RWDimensionalExponents.hxx b/inc/RWStepBasic_RWDimensionalExponents.hxx
index f1d4f59..0abbe39 100644
--- a/inc/RWStepBasic_RWDimensionalExponents.hxx
+++ b/inc/RWStepBasic_RWDimensionalExponents.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWDimensionalExponents  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWDimensionalExponents();
diff --git a/inc/RWStepBasic_RWDocument.hxx b/inc/RWStepBasic_RWDocument.hxx
index 4585612..5bb1d73 100644
--- a/inc/RWStepBasic_RWDocument.hxx
+++ b/inc/RWStepBasic_RWDocument.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWDocument  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWDocument();
diff --git a/inc/RWStepBasic_RWDocumentFile.hxx b/inc/RWStepBasic_RWDocumentFile.hxx
index edb76a6..2e6bdc4 100644
--- a/inc/RWStepBasic_RWDocumentFile.hxx
+++ b/inc/RWStepBasic_RWDocumentFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWDocumentFile  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWDocumentFile();
diff --git a/inc/RWStepBasic_RWDocumentProductAssociation.hxx b/inc/RWStepBasic_RWDocumentProductAssociation.hxx
index 68744ea..c7c7bc5 100644
--- a/inc/RWStepBasic_RWDocumentProductAssociation.hxx
+++ b/inc/RWStepBasic_RWDocumentProductAssociation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWDocumentProductAssociation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWDocumentProductAssociation();
diff --git a/inc/RWStepBasic_RWDocumentProductEquivalence.hxx b/inc/RWStepBasic_RWDocumentProductEquivalence.hxx
index 92c3b09..c4a2d8e 100644
--- a/inc/RWStepBasic_RWDocumentProductEquivalence.hxx
+++ b/inc/RWStepBasic_RWDocumentProductEquivalence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWDocumentProductEquivalence  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWDocumentProductEquivalence();
diff --git a/inc/RWStepBasic_RWDocumentRelationship.hxx b/inc/RWStepBasic_RWDocumentRelationship.hxx
index 107f700..8c5f543 100644
--- a/inc/RWStepBasic_RWDocumentRelationship.hxx
+++ b/inc/RWStepBasic_RWDocumentRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWDocumentRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWDocumentRelationship();
diff --git a/inc/RWStepBasic_RWDocumentRepresentationType.hxx b/inc/RWStepBasic_RWDocumentRepresentationType.hxx
index ba3dbba..6bc2ba8 100644
--- a/inc/RWStepBasic_RWDocumentRepresentationType.hxx
+++ b/inc/RWStepBasic_RWDocumentRepresentationType.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWDocumentRepresentationType  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWDocumentRepresentationType();
diff --git a/inc/RWStepBasic_RWDocumentType.hxx b/inc/RWStepBasic_RWDocumentType.hxx
index e652db6..1464800 100644
--- a/inc/RWStepBasic_RWDocumentType.hxx
+++ b/inc/RWStepBasic_RWDocumentType.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWDocumentType  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWDocumentType();
diff --git a/inc/RWStepBasic_RWDocumentUsageConstraint.hxx b/inc/RWStepBasic_RWDocumentUsageConstraint.hxx
index e888fcd..d94963e 100644
--- a/inc/RWStepBasic_RWDocumentUsageConstraint.hxx
+++ b/inc/RWStepBasic_RWDocumentUsageConstraint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWDocumentUsageConstraint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWDocumentUsageConstraint();
diff --git a/inc/RWStepBasic_RWEffectivity.hxx b/inc/RWStepBasic_RWEffectivity.hxx
index e1310c0..a30774b 100644
--- a/inc/RWStepBasic_RWEffectivity.hxx
+++ b/inc/RWStepBasic_RWEffectivity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWEffectivity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWEffectivity();
diff --git a/inc/RWStepBasic_RWEffectivityAssignment.hxx b/inc/RWStepBasic_RWEffectivityAssignment.hxx
index f34caae..4c51c15 100644
--- a/inc/RWStepBasic_RWEffectivityAssignment.hxx
+++ b/inc/RWStepBasic_RWEffectivityAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWEffectivityAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWEffectivityAssignment();
diff --git a/inc/RWStepBasic_RWEulerAngles.hxx b/inc/RWStepBasic_RWEulerAngles.hxx
index 89ff215..4affd7f 100644
--- a/inc/RWStepBasic_RWEulerAngles.hxx
+++ b/inc/RWStepBasic_RWEulerAngles.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWEulerAngles  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWEulerAngles();
diff --git a/inc/RWStepBasic_RWExternalIdentificationAssignment.hxx b/inc/RWStepBasic_RWExternalIdentificationAssignment.hxx
index 6205997..459fadb 100644
--- a/inc/RWStepBasic_RWExternalIdentificationAssignment.hxx
+++ b/inc/RWStepBasic_RWExternalIdentificationAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWExternalIdentificationAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWExternalIdentificationAssignment();
diff --git a/inc/RWStepBasic_RWExternalSource.hxx b/inc/RWStepBasic_RWExternalSource.hxx
index 92263b5..91129d9 100644
--- a/inc/RWStepBasic_RWExternalSource.hxx
+++ b/inc/RWStepBasic_RWExternalSource.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWExternalSource  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWExternalSource();
diff --git a/inc/RWStepBasic_RWExternallyDefinedItem.hxx b/inc/RWStepBasic_RWExternallyDefinedItem.hxx
index 5127e35..d8fc41b 100644
--- a/inc/RWStepBasic_RWExternallyDefinedItem.hxx
+++ b/inc/RWStepBasic_RWExternallyDefinedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWExternallyDefinedItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWExternallyDefinedItem();
diff --git a/inc/RWStepBasic_RWGeneralProperty.hxx b/inc/RWStepBasic_RWGeneralProperty.hxx
index 079da8a..1b3c336 100644
--- a/inc/RWStepBasic_RWGeneralProperty.hxx
+++ b/inc/RWStepBasic_RWGeneralProperty.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWGeneralProperty  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWGeneralProperty();
diff --git a/inc/RWStepBasic_RWGroup.hxx b/inc/RWStepBasic_RWGroup.hxx
index d1f03da..7f67e37 100644
--- a/inc/RWStepBasic_RWGroup.hxx
+++ b/inc/RWStepBasic_RWGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWGroup  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWGroup();
diff --git a/inc/RWStepBasic_RWGroupAssignment.hxx b/inc/RWStepBasic_RWGroupAssignment.hxx
index 9da3c7e..f68913f 100644
--- a/inc/RWStepBasic_RWGroupAssignment.hxx
+++ b/inc/RWStepBasic_RWGroupAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWGroupAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWGroupAssignment();
diff --git a/inc/RWStepBasic_RWGroupRelationship.hxx b/inc/RWStepBasic_RWGroupRelationship.hxx
index 595681c..0a419eb 100644
--- a/inc/RWStepBasic_RWGroupRelationship.hxx
+++ b/inc/RWStepBasic_RWGroupRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWGroupRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWGroupRelationship();
diff --git a/inc/RWStepBasic_RWIdentificationAssignment.hxx b/inc/RWStepBasic_RWIdentificationAssignment.hxx
index de8d155..feeee06 100644
--- a/inc/RWStepBasic_RWIdentificationAssignment.hxx
+++ b/inc/RWStepBasic_RWIdentificationAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWIdentificationAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWIdentificationAssignment();
diff --git a/inc/RWStepBasic_RWIdentificationRole.hxx b/inc/RWStepBasic_RWIdentificationRole.hxx
index 80ca5b8..c253118 100644
--- a/inc/RWStepBasic_RWIdentificationRole.hxx
+++ b/inc/RWStepBasic_RWIdentificationRole.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWIdentificationRole  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWIdentificationRole();
diff --git a/inc/RWStepBasic_RWLengthMeasureWithUnit.hxx b/inc/RWStepBasic_RWLengthMeasureWithUnit.hxx
index 4cbb1b6..8518f29 100644
--- a/inc/RWStepBasic_RWLengthMeasureWithUnit.hxx
+++ b/inc/RWStepBasic_RWLengthMeasureWithUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWLengthMeasureWithUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWLengthMeasureWithUnit();
diff --git a/inc/RWStepBasic_RWLengthUnit.hxx b/inc/RWStepBasic_RWLengthUnit.hxx
index d24ae2e..2525169 100644
--- a/inc/RWStepBasic_RWLengthUnit.hxx
+++ b/inc/RWStepBasic_RWLengthUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWLengthUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWLengthUnit();
diff --git a/inc/RWStepBasic_RWLocalTime.hxx b/inc/RWStepBasic_RWLocalTime.hxx
index 799fccd..e186a10 100644
--- a/inc/RWStepBasic_RWLocalTime.hxx
+++ b/inc/RWStepBasic_RWLocalTime.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWLocalTime  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWLocalTime();
diff --git a/inc/RWStepBasic_RWMassMeasureWithUnit.hxx b/inc/RWStepBasic_RWMassMeasureWithUnit.hxx
index 8897247..31f3ffd 100644
--- a/inc/RWStepBasic_RWMassMeasureWithUnit.hxx
+++ b/inc/RWStepBasic_RWMassMeasureWithUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWMassMeasureWithUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWMassMeasureWithUnit();
diff --git a/inc/RWStepBasic_RWMassUnit.hxx b/inc/RWStepBasic_RWMassUnit.hxx
index ca67a6d..c0576cb 100644
--- a/inc/RWStepBasic_RWMassUnit.hxx
+++ b/inc/RWStepBasic_RWMassUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWMassUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWMassUnit();
diff --git a/inc/RWStepBasic_RWMeasureWithUnit.hxx b/inc/RWStepBasic_RWMeasureWithUnit.hxx
index 6fdba36..bedacc2 100644
--- a/inc/RWStepBasic_RWMeasureWithUnit.hxx
+++ b/inc/RWStepBasic_RWMeasureWithUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWMeasureWithUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWMeasureWithUnit();
diff --git a/inc/RWStepBasic_RWMechanicalContext.hxx b/inc/RWStepBasic_RWMechanicalContext.hxx
index be92f1a..24fa46f 100644
--- a/inc/RWStepBasic_RWMechanicalContext.hxx
+++ b/inc/RWStepBasic_RWMechanicalContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWMechanicalContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWMechanicalContext();
diff --git a/inc/RWStepBasic_RWNameAssignment.hxx b/inc/RWStepBasic_RWNameAssignment.hxx
index 2fe5470..ab19e8c 100644
--- a/inc/RWStepBasic_RWNameAssignment.hxx
+++ b/inc/RWStepBasic_RWNameAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWNameAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWNameAssignment();
diff --git a/inc/RWStepBasic_RWNamedUnit.hxx b/inc/RWStepBasic_RWNamedUnit.hxx
index 9014491..2aebc74 100644
--- a/inc/RWStepBasic_RWNamedUnit.hxx
+++ b/inc/RWStepBasic_RWNamedUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWNamedUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWNamedUnit();
diff --git a/inc/RWStepBasic_RWObjectRole.hxx b/inc/RWStepBasic_RWObjectRole.hxx
index 0958fff..b65a27e 100644
--- a/inc/RWStepBasic_RWObjectRole.hxx
+++ b/inc/RWStepBasic_RWObjectRole.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWObjectRole  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWObjectRole();
diff --git a/inc/RWStepBasic_RWOrdinalDate.hxx b/inc/RWStepBasic_RWOrdinalDate.hxx
index 6261abd..5dd017c 100644
--- a/inc/RWStepBasic_RWOrdinalDate.hxx
+++ b/inc/RWStepBasic_RWOrdinalDate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWOrdinalDate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWOrdinalDate();
diff --git a/inc/RWStepBasic_RWOrganization.hxx b/inc/RWStepBasic_RWOrganization.hxx
index 3429f85..6adb0a0 100644
--- a/inc/RWStepBasic_RWOrganization.hxx
+++ b/inc/RWStepBasic_RWOrganization.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWOrganization  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWOrganization();
diff --git a/inc/RWStepBasic_RWOrganizationRole.hxx b/inc/RWStepBasic_RWOrganizationRole.hxx
index 676405d..ea2324a 100644
--- a/inc/RWStepBasic_RWOrganizationRole.hxx
+++ b/inc/RWStepBasic_RWOrganizationRole.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWOrganizationRole  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWOrganizationRole();
diff --git a/inc/RWStepBasic_RWOrganizationalAddress.hxx b/inc/RWStepBasic_RWOrganizationalAddress.hxx
index eb89c0d..49b7dda 100644
--- a/inc/RWStepBasic_RWOrganizationalAddress.hxx
+++ b/inc/RWStepBasic_RWOrganizationalAddress.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWOrganizationalAddress  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWOrganizationalAddress();
diff --git a/inc/RWStepBasic_RWPerson.hxx b/inc/RWStepBasic_RWPerson.hxx
index 8c0a7e3..6d64829 100644
--- a/inc/RWStepBasic_RWPerson.hxx
+++ b/inc/RWStepBasic_RWPerson.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWPerson  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWPerson();
diff --git a/inc/RWStepBasic_RWPersonAndOrganization.hxx b/inc/RWStepBasic_RWPersonAndOrganization.hxx
index 72c26f5..df093b7 100644
--- a/inc/RWStepBasic_RWPersonAndOrganization.hxx
+++ b/inc/RWStepBasic_RWPersonAndOrganization.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWPersonAndOrganization  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWPersonAndOrganization();
diff --git a/inc/RWStepBasic_RWPersonAndOrganizationRole.hxx b/inc/RWStepBasic_RWPersonAndOrganizationRole.hxx
index e438bfd..ad65741 100644
--- a/inc/RWStepBasic_RWPersonAndOrganizationRole.hxx
+++ b/inc/RWStepBasic_RWPersonAndOrganizationRole.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWPersonAndOrganizationRole  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWPersonAndOrganizationRole();
diff --git a/inc/RWStepBasic_RWPersonalAddress.hxx b/inc/RWStepBasic_RWPersonalAddress.hxx
index 63dbaac..9ca700d 100644
--- a/inc/RWStepBasic_RWPersonalAddress.hxx
+++ b/inc/RWStepBasic_RWPersonalAddress.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWPersonalAddress  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWPersonalAddress();
diff --git a/inc/RWStepBasic_RWPlaneAngleMeasureWithUnit.hxx b/inc/RWStepBasic_RWPlaneAngleMeasureWithUnit.hxx
index 6b25117..5ec83de 100644
--- a/inc/RWStepBasic_RWPlaneAngleMeasureWithUnit.hxx
+++ b/inc/RWStepBasic_RWPlaneAngleMeasureWithUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWPlaneAngleMeasureWithUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWPlaneAngleMeasureWithUnit();
diff --git a/inc/RWStepBasic_RWPlaneAngleUnit.hxx b/inc/RWStepBasic_RWPlaneAngleUnit.hxx
index c5490f9..20eb764 100644
--- a/inc/RWStepBasic_RWPlaneAngleUnit.hxx
+++ b/inc/RWStepBasic_RWPlaneAngleUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWPlaneAngleUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWPlaneAngleUnit();
diff --git a/inc/RWStepBasic_RWProduct.hxx b/inc/RWStepBasic_RWProduct.hxx
index b34b94d..b2d9c5a 100644
--- a/inc/RWStepBasic_RWProduct.hxx
+++ b/inc/RWStepBasic_RWProduct.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProduct  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWProduct();
diff --git a/inc/RWStepBasic_RWProductCategory.hxx b/inc/RWStepBasic_RWProductCategory.hxx
index 6c2d5cd..aa1ffe2 100644
--- a/inc/RWStepBasic_RWProductCategory.hxx
+++ b/inc/RWStepBasic_RWProductCategory.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWProductCategory  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWProductCategory();
diff --git a/inc/RWStepBasic_RWProductCategoryRelationship.hxx b/inc/RWStepBasic_RWProductCategoryRelationship.hxx
index ce0e42c..b9aeda9 100644
--- a/inc/RWStepBasic_RWProductCategoryRelationship.hxx
+++ b/inc/RWStepBasic_RWProductCategoryRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductCategoryRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWProductCategoryRelationship();
diff --git a/inc/RWStepBasic_RWProductConceptContext.hxx b/inc/RWStepBasic_RWProductConceptContext.hxx
index e1aa559..8906fcf 100644
--- a/inc/RWStepBasic_RWProductConceptContext.hxx
+++ b/inc/RWStepBasic_RWProductConceptContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductConceptContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWProductConceptContext();
diff --git a/inc/RWStepBasic_RWProductContext.hxx b/inc/RWStepBasic_RWProductContext.hxx
index de0e9fd..0038569 100644
--- a/inc/RWStepBasic_RWProductContext.hxx
+++ b/inc/RWStepBasic_RWProductContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWProductContext();
diff --git a/inc/RWStepBasic_RWProductDefinition.hxx b/inc/RWStepBasic_RWProductDefinition.hxx
index 970758d..7df6edb 100644
--- a/inc/RWStepBasic_RWProductDefinition.hxx
+++ b/inc/RWStepBasic_RWProductDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductDefinition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWProductDefinition();
diff --git a/inc/RWStepBasic_RWProductDefinitionContext.hxx b/inc/RWStepBasic_RWProductDefinitionContext.hxx
index faf2df6..41bc376 100644
--- a/inc/RWStepBasic_RWProductDefinitionContext.hxx
+++ b/inc/RWStepBasic_RWProductDefinitionContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductDefinitionContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWProductDefinitionContext();
diff --git a/inc/RWStepBasic_RWProductDefinitionEffectivity.hxx b/inc/RWStepBasic_RWProductDefinitionEffectivity.hxx
index acca1d0..6563a7f 100644
--- a/inc/RWStepBasic_RWProductDefinitionEffectivity.hxx
+++ b/inc/RWStepBasic_RWProductDefinitionEffectivity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductDefinitionEffectivity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWProductDefinitionEffectivity();
diff --git a/inc/RWStepBasic_RWProductDefinitionFormation.hxx b/inc/RWStepBasic_RWProductDefinitionFormation.hxx
index afe1f19..3ef79c9 100644
--- a/inc/RWStepBasic_RWProductDefinitionFormation.hxx
+++ b/inc/RWStepBasic_RWProductDefinitionFormation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductDefinitionFormation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWProductDefinitionFormation();
diff --git a/inc/RWStepBasic_RWProductDefinitionFormationRelationship.hxx b/inc/RWStepBasic_RWProductDefinitionFormationRelationship.hxx
index b1c1f6e..1ba8d77 100644
--- a/inc/RWStepBasic_RWProductDefinitionFormationRelationship.hxx
+++ b/inc/RWStepBasic_RWProductDefinitionFormationRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductDefinitionFormationRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWProductDefinitionFormationRelationship();
diff --git a/inc/RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.hxx b/inc/RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.hxx
index cd0cb71..57f064a 100644
--- a/inc/RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.hxx
+++ b/inc/RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource();
diff --git a/inc/RWStepBasic_RWProductDefinitionRelationship.hxx b/inc/RWStepBasic_RWProductDefinitionRelationship.hxx
index 5362848..399058a 100644
--- a/inc/RWStepBasic_RWProductDefinitionRelationship.hxx
+++ b/inc/RWStepBasic_RWProductDefinitionRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductDefinitionRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWProductDefinitionRelationship();
diff --git a/inc/RWStepBasic_RWProductDefinitionWithAssociatedDocuments.hxx b/inc/RWStepBasic_RWProductDefinitionWithAssociatedDocuments.hxx
index d887273..7f06fa0 100644
--- a/inc/RWStepBasic_RWProductDefinitionWithAssociatedDocuments.hxx
+++ b/inc/RWStepBasic_RWProductDefinitionWithAssociatedDocuments.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductDefinitionWithAssociatedDocuments  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWProductDefinitionWithAssociatedDocuments();
diff --git a/inc/RWStepBasic_RWProductRelatedProductCategory.hxx b/inc/RWStepBasic_RWProductRelatedProductCategory.hxx
index b094e39..6320a70 100644
--- a/inc/RWStepBasic_RWProductRelatedProductCategory.hxx
+++ b/inc/RWStepBasic_RWProductRelatedProductCategory.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductRelatedProductCategory  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWProductRelatedProductCategory();
diff --git a/inc/RWStepBasic_RWProductType.hxx b/inc/RWStepBasic_RWProductType.hxx
index 61f9e80..fe8e850 100644
--- a/inc/RWStepBasic_RWProductType.hxx
+++ b/inc/RWStepBasic_RWProductType.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWProductType  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWProductType();
diff --git a/inc/RWStepBasic_RWRatioMeasureWithUnit.hxx b/inc/RWStepBasic_RWRatioMeasureWithUnit.hxx
index 3232dd1..2949d36 100644
--- a/inc/RWStepBasic_RWRatioMeasureWithUnit.hxx
+++ b/inc/RWStepBasic_RWRatioMeasureWithUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWRatioMeasureWithUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWRatioMeasureWithUnit();
diff --git a/inc/RWStepBasic_RWRoleAssociation.hxx b/inc/RWStepBasic_RWRoleAssociation.hxx
index 394f37c..16d3f0d 100644
--- a/inc/RWStepBasic_RWRoleAssociation.hxx
+++ b/inc/RWStepBasic_RWRoleAssociation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWRoleAssociation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWRoleAssociation();
diff --git a/inc/RWStepBasic_RWSecurityClassification.hxx b/inc/RWStepBasic_RWSecurityClassification.hxx
index 7065a20..7b91de6 100644
--- a/inc/RWStepBasic_RWSecurityClassification.hxx
+++ b/inc/RWStepBasic_RWSecurityClassification.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWSecurityClassification  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSecurityClassification();
diff --git a/inc/RWStepBasic_RWSecurityClassificationLevel.hxx b/inc/RWStepBasic_RWSecurityClassificationLevel.hxx
index 45318d4..8f3d432 100644
--- a/inc/RWStepBasic_RWSecurityClassificationLevel.hxx
+++ b/inc/RWStepBasic_RWSecurityClassificationLevel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWSecurityClassificationLevel  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSecurityClassificationLevel();
diff --git a/inc/RWStepBasic_RWSiUnit.hxx b/inc/RWStepBasic_RWSiUnit.hxx
index 1498093..2929725 100644
--- a/inc/RWStepBasic_RWSiUnit.hxx
+++ b/inc/RWStepBasic_RWSiUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class TCollection_AsciiString;
 class RWStepBasic_RWSiUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSiUnit();
diff --git a/inc/RWStepBasic_RWSiUnitAndAreaUnit.hxx b/inc/RWStepBasic_RWSiUnitAndAreaUnit.hxx
index 799c910..e3520ef 100644
--- a/inc/RWStepBasic_RWSiUnitAndAreaUnit.hxx
+++ b/inc/RWStepBasic_RWSiUnitAndAreaUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWSiUnitAndAreaUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSiUnitAndAreaUnit();
diff --git a/inc/RWStepBasic_RWSiUnitAndLengthUnit.hxx b/inc/RWStepBasic_RWSiUnitAndLengthUnit.hxx
index 6812660..9128c6b 100644
--- a/inc/RWStepBasic_RWSiUnitAndLengthUnit.hxx
+++ b/inc/RWStepBasic_RWSiUnitAndLengthUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWSiUnitAndLengthUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSiUnitAndLengthUnit();
diff --git a/inc/RWStepBasic_RWSiUnitAndMassUnit.hxx b/inc/RWStepBasic_RWSiUnitAndMassUnit.hxx
index a414f97..e0f06d1 100644
--- a/inc/RWStepBasic_RWSiUnitAndMassUnit.hxx
+++ b/inc/RWStepBasic_RWSiUnitAndMassUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWSiUnitAndMassUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSiUnitAndMassUnit();
diff --git a/inc/RWStepBasic_RWSiUnitAndPlaneAngleUnit.hxx b/inc/RWStepBasic_RWSiUnitAndPlaneAngleUnit.hxx
index 64bc86e..2211000 100644
--- a/inc/RWStepBasic_RWSiUnitAndPlaneAngleUnit.hxx
+++ b/inc/RWStepBasic_RWSiUnitAndPlaneAngleUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWSiUnitAndPlaneAngleUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSiUnitAndPlaneAngleUnit();
diff --git a/inc/RWStepBasic_RWSiUnitAndRatioUnit.hxx b/inc/RWStepBasic_RWSiUnitAndRatioUnit.hxx
index 26cfef6..e713891 100644
--- a/inc/RWStepBasic_RWSiUnitAndRatioUnit.hxx
+++ b/inc/RWStepBasic_RWSiUnitAndRatioUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWSiUnitAndRatioUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSiUnitAndRatioUnit();
diff --git a/inc/RWStepBasic_RWSiUnitAndSolidAngleUnit.hxx b/inc/RWStepBasic_RWSiUnitAndSolidAngleUnit.hxx
index 9e555ad..fd526b2 100644
--- a/inc/RWStepBasic_RWSiUnitAndSolidAngleUnit.hxx
+++ b/inc/RWStepBasic_RWSiUnitAndSolidAngleUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWSiUnitAndSolidAngleUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSiUnitAndSolidAngleUnit();
diff --git a/inc/RWStepBasic_RWSiUnitAndThermodynamicTemperatureUnit.hxx b/inc/RWStepBasic_RWSiUnitAndThermodynamicTemperatureUnit.hxx
index 85c2256..5c08dae 100644
--- a/inc/RWStepBasic_RWSiUnitAndThermodynamicTemperatureUnit.hxx
+++ b/inc/RWStepBasic_RWSiUnitAndThermodynamicTemperatureUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWSiUnitAndThermodynamicTemperatureUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSiUnitAndThermodynamicTemperatureUnit();
diff --git a/inc/RWStepBasic_RWSiUnitAndTimeUnit.hxx b/inc/RWStepBasic_RWSiUnitAndTimeUnit.hxx
index e418f55..da2b752 100644
--- a/inc/RWStepBasic_RWSiUnitAndTimeUnit.hxx
+++ b/inc/RWStepBasic_RWSiUnitAndTimeUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWSiUnitAndTimeUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSiUnitAndTimeUnit();
diff --git a/inc/RWStepBasic_RWSiUnitAndVolumeUnit.hxx b/inc/RWStepBasic_RWSiUnitAndVolumeUnit.hxx
index 1141d59..9ad7950 100644
--- a/inc/RWStepBasic_RWSiUnitAndVolumeUnit.hxx
+++ b/inc/RWStepBasic_RWSiUnitAndVolumeUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWSiUnitAndVolumeUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSiUnitAndVolumeUnit();
diff --git a/inc/RWStepBasic_RWSolidAngleMeasureWithUnit.hxx b/inc/RWStepBasic_RWSolidAngleMeasureWithUnit.hxx
index 08559c7..8fcfeb0 100644
--- a/inc/RWStepBasic_RWSolidAngleMeasureWithUnit.hxx
+++ b/inc/RWStepBasic_RWSolidAngleMeasureWithUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWSolidAngleMeasureWithUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSolidAngleMeasureWithUnit();
diff --git a/inc/RWStepBasic_RWSolidAngleUnit.hxx b/inc/RWStepBasic_RWSolidAngleUnit.hxx
index 9e0a091..391991b 100644
--- a/inc/RWStepBasic_RWSolidAngleUnit.hxx
+++ b/inc/RWStepBasic_RWSolidAngleUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWSolidAngleUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWSolidAngleUnit();
diff --git a/inc/RWStepBasic_RWThermodynamicTemperatureUnit.hxx b/inc/RWStepBasic_RWThermodynamicTemperatureUnit.hxx
index 129a149..bce0705 100644
--- a/inc/RWStepBasic_RWThermodynamicTemperatureUnit.hxx
+++ b/inc/RWStepBasic_RWThermodynamicTemperatureUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWThermodynamicTemperatureUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWThermodynamicTemperatureUnit();
diff --git a/inc/RWStepBasic_RWUncertaintyMeasureWithUnit.hxx b/inc/RWStepBasic_RWUncertaintyMeasureWithUnit.hxx
index b7fa1d1..bc37109 100644
--- a/inc/RWStepBasic_RWUncertaintyMeasureWithUnit.hxx
+++ b/inc/RWStepBasic_RWUncertaintyMeasureWithUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWUncertaintyMeasureWithUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWUncertaintyMeasureWithUnit();
diff --git a/inc/RWStepBasic_RWVersionedActionRequest.hxx b/inc/RWStepBasic_RWVersionedActionRequest.hxx
index ff54096..00f4a4f 100644
--- a/inc/RWStepBasic_RWVersionedActionRequest.hxx
+++ b/inc/RWStepBasic_RWVersionedActionRequest.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepBasic_RWVersionedActionRequest  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepBasic_RWVersionedActionRequest();
diff --git a/inc/RWStepBasic_RWWeekOfYearAndDayDate.hxx b/inc/RWStepBasic_RWWeekOfYearAndDayDate.hxx
index 05443c9..5e5b356 100644
--- a/inc/RWStepBasic_RWWeekOfYearAndDayDate.hxx
+++ b/inc/RWStepBasic_RWWeekOfYearAndDayDate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepBasic_RWWeekOfYearAndDayDate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepBasic_RWWeekOfYearAndDayDate();
diff --git a/inc/RWStepDimTol_RWAngularityTolerance.hxx b/inc/RWStepDimTol_RWAngularityTolerance.hxx
index 513be76..e915566 100644
--- a/inc/RWStepDimTol_RWAngularityTolerance.hxx
+++ b/inc/RWStepDimTol_RWAngularityTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWAngularityTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWAngularityTolerance();
diff --git a/inc/RWStepDimTol_RWCircularRunoutTolerance.hxx b/inc/RWStepDimTol_RWCircularRunoutTolerance.hxx
index 346b242..3ca0849 100644
--- a/inc/RWStepDimTol_RWCircularRunoutTolerance.hxx
+++ b/inc/RWStepDimTol_RWCircularRunoutTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWCircularRunoutTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWCircularRunoutTolerance();
diff --git a/inc/RWStepDimTol_RWCoaxialityTolerance.hxx b/inc/RWStepDimTol_RWCoaxialityTolerance.hxx
index 43f3283..b9555c1 100644
--- a/inc/RWStepDimTol_RWCoaxialityTolerance.hxx
+++ b/inc/RWStepDimTol_RWCoaxialityTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWCoaxialityTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWCoaxialityTolerance();
diff --git a/inc/RWStepDimTol_RWCommonDatum.hxx b/inc/RWStepDimTol_RWCommonDatum.hxx
index 4a9f7fb..a93ae5c 100644
--- a/inc/RWStepDimTol_RWCommonDatum.hxx
+++ b/inc/RWStepDimTol_RWCommonDatum.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWCommonDatum  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWCommonDatum();
diff --git a/inc/RWStepDimTol_RWConcentricityTolerance.hxx b/inc/RWStepDimTol_RWConcentricityTolerance.hxx
index 549850a..e88e4b8 100644
--- a/inc/RWStepDimTol_RWConcentricityTolerance.hxx
+++ b/inc/RWStepDimTol_RWConcentricityTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWConcentricityTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWConcentricityTolerance();
diff --git a/inc/RWStepDimTol_RWCylindricityTolerance.hxx b/inc/RWStepDimTol_RWCylindricityTolerance.hxx
index 90e85eb..7adb5d6 100644
--- a/inc/RWStepDimTol_RWCylindricityTolerance.hxx
+++ b/inc/RWStepDimTol_RWCylindricityTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWCylindricityTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWCylindricityTolerance();
diff --git a/inc/RWStepDimTol_RWDatum.hxx b/inc/RWStepDimTol_RWDatum.hxx
index 6cb4124..b9c5de8 100644
--- a/inc/RWStepDimTol_RWDatum.hxx
+++ b/inc/RWStepDimTol_RWDatum.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWDatum  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWDatum();
diff --git a/inc/RWStepDimTol_RWDatumFeature.hxx b/inc/RWStepDimTol_RWDatumFeature.hxx
index 485636f..35252bf 100644
--- a/inc/RWStepDimTol_RWDatumFeature.hxx
+++ b/inc/RWStepDimTol_RWDatumFeature.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWDatumFeature  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWDatumFeature();
diff --git a/inc/RWStepDimTol_RWDatumReference.hxx b/inc/RWStepDimTol_RWDatumReference.hxx
index 06e51b3..b8ea5fd 100644
--- a/inc/RWStepDimTol_RWDatumReference.hxx
+++ b/inc/RWStepDimTol_RWDatumReference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWDatumReference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWDatumReference();
diff --git a/inc/RWStepDimTol_RWDatumTarget.hxx b/inc/RWStepDimTol_RWDatumTarget.hxx
index be098ef..33b18c7 100644
--- a/inc/RWStepDimTol_RWDatumTarget.hxx
+++ b/inc/RWStepDimTol_RWDatumTarget.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWDatumTarget  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWDatumTarget();
diff --git a/inc/RWStepDimTol_RWFlatnessTolerance.hxx b/inc/RWStepDimTol_RWFlatnessTolerance.hxx
index 997e75a..924368c 100644
--- a/inc/RWStepDimTol_RWFlatnessTolerance.hxx
+++ b/inc/RWStepDimTol_RWFlatnessTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWFlatnessTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWFlatnessTolerance();
diff --git a/inc/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx b/inc/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx
index 009bd6d..d14d24d 100644
--- a/inc/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx
+++ b/inc/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol();
diff --git a/inc/RWStepDimTol_RWGeometricTolerance.hxx b/inc/RWStepDimTol_RWGeometricTolerance.hxx
index d63f019..063501c 100644
--- a/inc/RWStepDimTol_RWGeometricTolerance.hxx
+++ b/inc/RWStepDimTol_RWGeometricTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWGeometricTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWGeometricTolerance();
diff --git a/inc/RWStepDimTol_RWGeometricToleranceRelationship.hxx b/inc/RWStepDimTol_RWGeometricToleranceRelationship.hxx
index 4d018de..840c9b2 100644
--- a/inc/RWStepDimTol_RWGeometricToleranceRelationship.hxx
+++ b/inc/RWStepDimTol_RWGeometricToleranceRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWGeometricToleranceRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWGeometricToleranceRelationship();
diff --git a/inc/RWStepDimTol_RWGeometricToleranceWithDatumReference.hxx b/inc/RWStepDimTol_RWGeometricToleranceWithDatumReference.hxx
index b99d132..5ac848d 100644
--- a/inc/RWStepDimTol_RWGeometricToleranceWithDatumReference.hxx
+++ b/inc/RWStepDimTol_RWGeometricToleranceWithDatumReference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWGeometricToleranceWithDatumReference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWGeometricToleranceWithDatumReference();
diff --git a/inc/RWStepDimTol_RWLineProfileTolerance.hxx b/inc/RWStepDimTol_RWLineProfileTolerance.hxx
index 34aed20..215cf8b 100644
--- a/inc/RWStepDimTol_RWLineProfileTolerance.hxx
+++ b/inc/RWStepDimTol_RWLineProfileTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWLineProfileTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWLineProfileTolerance();
diff --git a/inc/RWStepDimTol_RWModifiedGeometricTolerance.hxx b/inc/RWStepDimTol_RWModifiedGeometricTolerance.hxx
index b52b062..916009d 100644
--- a/inc/RWStepDimTol_RWModifiedGeometricTolerance.hxx
+++ b/inc/RWStepDimTol_RWModifiedGeometricTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWModifiedGeometricTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWModifiedGeometricTolerance();
diff --git a/inc/RWStepDimTol_RWParallelismTolerance.hxx b/inc/RWStepDimTol_RWParallelismTolerance.hxx
index 7710695..ed28022 100644
--- a/inc/RWStepDimTol_RWParallelismTolerance.hxx
+++ b/inc/RWStepDimTol_RWParallelismTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWParallelismTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWParallelismTolerance();
diff --git a/inc/RWStepDimTol_RWPerpendicularityTolerance.hxx b/inc/RWStepDimTol_RWPerpendicularityTolerance.hxx
index 617beea..60ae921 100644
--- a/inc/RWStepDimTol_RWPerpendicularityTolerance.hxx
+++ b/inc/RWStepDimTol_RWPerpendicularityTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWPerpendicularityTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWPerpendicularityTolerance();
diff --git a/inc/RWStepDimTol_RWPlacedDatumTargetFeature.hxx b/inc/RWStepDimTol_RWPlacedDatumTargetFeature.hxx
index 9ccea84..664e5f5 100644
--- a/inc/RWStepDimTol_RWPlacedDatumTargetFeature.hxx
+++ b/inc/RWStepDimTol_RWPlacedDatumTargetFeature.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWPlacedDatumTargetFeature  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWPlacedDatumTargetFeature();
diff --git a/inc/RWStepDimTol_RWPositionTolerance.hxx b/inc/RWStepDimTol_RWPositionTolerance.hxx
index fe2b943..938979e 100644
--- a/inc/RWStepDimTol_RWPositionTolerance.hxx
+++ b/inc/RWStepDimTol_RWPositionTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWPositionTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWPositionTolerance();
diff --git a/inc/RWStepDimTol_RWRoundnessTolerance.hxx b/inc/RWStepDimTol_RWRoundnessTolerance.hxx
index d731f43..ec68a8e 100644
--- a/inc/RWStepDimTol_RWRoundnessTolerance.hxx
+++ b/inc/RWStepDimTol_RWRoundnessTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWRoundnessTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWRoundnessTolerance();
diff --git a/inc/RWStepDimTol_RWStraightnessTolerance.hxx b/inc/RWStepDimTol_RWStraightnessTolerance.hxx
index 0ca3ae5..84b7bad 100644
--- a/inc/RWStepDimTol_RWStraightnessTolerance.hxx
+++ b/inc/RWStepDimTol_RWStraightnessTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWStraightnessTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWStraightnessTolerance();
diff --git a/inc/RWStepDimTol_RWSurfaceProfileTolerance.hxx b/inc/RWStepDimTol_RWSurfaceProfileTolerance.hxx
index aee58ee..7c7f743 100644
--- a/inc/RWStepDimTol_RWSurfaceProfileTolerance.hxx
+++ b/inc/RWStepDimTol_RWSurfaceProfileTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWSurfaceProfileTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWSurfaceProfileTolerance();
diff --git a/inc/RWStepDimTol_RWSymmetryTolerance.hxx b/inc/RWStepDimTol_RWSymmetryTolerance.hxx
index 2243912..2051001 100644
--- a/inc/RWStepDimTol_RWSymmetryTolerance.hxx
+++ b/inc/RWStepDimTol_RWSymmetryTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWSymmetryTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWSymmetryTolerance();
diff --git a/inc/RWStepDimTol_RWTotalRunoutTolerance.hxx b/inc/RWStepDimTol_RWTotalRunoutTolerance.hxx
index 42c411d..294b495 100644
--- a/inc/RWStepDimTol_RWTotalRunoutTolerance.hxx
+++ b/inc/RWStepDimTol_RWTotalRunoutTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepDimTol_RWTotalRunoutTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepDimTol_RWTotalRunoutTolerance();
diff --git a/inc/RWStepElement_RWAnalysisItemWithinRepresentation.hxx b/inc/RWStepElement_RWAnalysisItemWithinRepresentation.hxx
index 84482ff..a1b0914 100644
--- a/inc/RWStepElement_RWAnalysisItemWithinRepresentation.hxx
+++ b/inc/RWStepElement_RWAnalysisItemWithinRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWAnalysisItemWithinRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWAnalysisItemWithinRepresentation();
diff --git a/inc/RWStepElement_RWCurve3dElementDescriptor.hxx b/inc/RWStepElement_RWCurve3dElementDescriptor.hxx
index 3fe990c..f4ed38c 100644
--- a/inc/RWStepElement_RWCurve3dElementDescriptor.hxx
+++ b/inc/RWStepElement_RWCurve3dElementDescriptor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWCurve3dElementDescriptor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWCurve3dElementDescriptor();
diff --git a/inc/RWStepElement_RWCurveElementEndReleasePacket.hxx b/inc/RWStepElement_RWCurveElementEndReleasePacket.hxx
index d57df53..ec3476a 100644
--- a/inc/RWStepElement_RWCurveElementEndReleasePacket.hxx
+++ b/inc/RWStepElement_RWCurveElementEndReleasePacket.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWCurveElementEndReleasePacket  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWCurveElementEndReleasePacket();
diff --git a/inc/RWStepElement_RWCurveElementSectionDefinition.hxx b/inc/RWStepElement_RWCurveElementSectionDefinition.hxx
index 7482baa..419e0ae 100644
--- a/inc/RWStepElement_RWCurveElementSectionDefinition.hxx
+++ b/inc/RWStepElement_RWCurveElementSectionDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWCurveElementSectionDefinition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWCurveElementSectionDefinition();
diff --git a/inc/RWStepElement_RWCurveElementSectionDerivedDefinitions.hxx b/inc/RWStepElement_RWCurveElementSectionDerivedDefinitions.hxx
index cfd458e..4865f89 100644
--- a/inc/RWStepElement_RWCurveElementSectionDerivedDefinitions.hxx
+++ b/inc/RWStepElement_RWCurveElementSectionDerivedDefinitions.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWCurveElementSectionDerivedDefinitions  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWCurveElementSectionDerivedDefinitions();
diff --git a/inc/RWStepElement_RWElementDescriptor.hxx b/inc/RWStepElement_RWElementDescriptor.hxx
index 163e5d3..68f1e82 100644
--- a/inc/RWStepElement_RWElementDescriptor.hxx
+++ b/inc/RWStepElement_RWElementDescriptor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWElementDescriptor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWElementDescriptor();
diff --git a/inc/RWStepElement_RWElementMaterial.hxx b/inc/RWStepElement_RWElementMaterial.hxx
index d3fff73..d1f5235 100644
--- a/inc/RWStepElement_RWElementMaterial.hxx
+++ b/inc/RWStepElement_RWElementMaterial.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWElementMaterial  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWElementMaterial();
diff --git a/inc/RWStepElement_RWSurface3dElementDescriptor.hxx b/inc/RWStepElement_RWSurface3dElementDescriptor.hxx
index fefc1ec..20f9b04 100644
--- a/inc/RWStepElement_RWSurface3dElementDescriptor.hxx
+++ b/inc/RWStepElement_RWSurface3dElementDescriptor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWSurface3dElementDescriptor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWSurface3dElementDescriptor();
diff --git a/inc/RWStepElement_RWSurfaceElementProperty.hxx b/inc/RWStepElement_RWSurfaceElementProperty.hxx
index 1d8debd..62db439 100644
--- a/inc/RWStepElement_RWSurfaceElementProperty.hxx
+++ b/inc/RWStepElement_RWSurfaceElementProperty.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWSurfaceElementProperty  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWSurfaceElementProperty();
diff --git a/inc/RWStepElement_RWSurfaceSection.hxx b/inc/RWStepElement_RWSurfaceSection.hxx
index 9f9c26e..8d77287 100644
--- a/inc/RWStepElement_RWSurfaceSection.hxx
+++ b/inc/RWStepElement_RWSurfaceSection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWSurfaceSection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWSurfaceSection();
diff --git a/inc/RWStepElement_RWSurfaceSectionField.hxx b/inc/RWStepElement_RWSurfaceSectionField.hxx
index 0519bba..968a33e 100644
--- a/inc/RWStepElement_RWSurfaceSectionField.hxx
+++ b/inc/RWStepElement_RWSurfaceSectionField.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWSurfaceSectionField  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWSurfaceSectionField();
diff --git a/inc/RWStepElement_RWSurfaceSectionFieldConstant.hxx b/inc/RWStepElement_RWSurfaceSectionFieldConstant.hxx
index a59d34f..b0138b8 100644
--- a/inc/RWStepElement_RWSurfaceSectionFieldConstant.hxx
+++ b/inc/RWStepElement_RWSurfaceSectionFieldConstant.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWSurfaceSectionFieldConstant  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWSurfaceSectionFieldConstant();
diff --git a/inc/RWStepElement_RWSurfaceSectionFieldVarying.hxx b/inc/RWStepElement_RWSurfaceSectionFieldVarying.hxx
index cc8aa34..936e8a7 100644
--- a/inc/RWStepElement_RWSurfaceSectionFieldVarying.hxx
+++ b/inc/RWStepElement_RWSurfaceSectionFieldVarying.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWSurfaceSectionFieldVarying  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWSurfaceSectionFieldVarying();
diff --git a/inc/RWStepElement_RWUniformSurfaceSection.hxx b/inc/RWStepElement_RWUniformSurfaceSection.hxx
index b842b69..42450d1 100644
--- a/inc/RWStepElement_RWUniformSurfaceSection.hxx
+++ b/inc/RWStepElement_RWUniformSurfaceSection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWUniformSurfaceSection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWUniformSurfaceSection();
diff --git a/inc/RWStepElement_RWVolume3dElementDescriptor.hxx b/inc/RWStepElement_RWVolume3dElementDescriptor.hxx
index 2f22ecb..50888b1 100644
--- a/inc/RWStepElement_RWVolume3dElementDescriptor.hxx
+++ b/inc/RWStepElement_RWVolume3dElementDescriptor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepElement_RWVolume3dElementDescriptor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepElement_RWVolume3dElementDescriptor();
diff --git a/inc/RWStepFEA_RWAlignedCurve3dElementCoordinateSystem.hxx b/inc/RWStepFEA_RWAlignedCurve3dElementCoordinateSystem.hxx
index 6a08344..ea04cc7 100644
--- a/inc/RWStepFEA_RWAlignedCurve3dElementCoordinateSystem.hxx
+++ b/inc/RWStepFEA_RWAlignedCurve3dElementCoordinateSystem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWAlignedCurve3dElementCoordinateSystem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWAlignedCurve3dElementCoordinateSystem();
diff --git a/inc/RWStepFEA_RWAlignedSurface3dElementCoordinateSystem.hxx b/inc/RWStepFEA_RWAlignedSurface3dElementCoordinateSystem.hxx
index b5b1a36..7ea28bf 100644
--- a/inc/RWStepFEA_RWAlignedSurface3dElementCoordinateSystem.hxx
+++ b/inc/RWStepFEA_RWAlignedSurface3dElementCoordinateSystem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWAlignedSurface3dElementCoordinateSystem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWAlignedSurface3dElementCoordinateSystem();
diff --git a/inc/RWStepFEA_RWArbitraryVolume3dElementCoordinateSystem.hxx b/inc/RWStepFEA_RWArbitraryVolume3dElementCoordinateSystem.hxx
index 60260c5..467c6a4 100644
--- a/inc/RWStepFEA_RWArbitraryVolume3dElementCoordinateSystem.hxx
+++ b/inc/RWStepFEA_RWArbitraryVolume3dElementCoordinateSystem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWArbitraryVolume3dElementCoordinateSystem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWArbitraryVolume3dElementCoordinateSystem();
diff --git a/inc/RWStepFEA_RWConstantSurface3dElementCoordinateSystem.hxx b/inc/RWStepFEA_RWConstantSurface3dElementCoordinateSystem.hxx
index cd7cb3d..3372a95 100644
--- a/inc/RWStepFEA_RWConstantSurface3dElementCoordinateSystem.hxx
+++ b/inc/RWStepFEA_RWConstantSurface3dElementCoordinateSystem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWConstantSurface3dElementCoordinateSystem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWConstantSurface3dElementCoordinateSystem();
diff --git a/inc/RWStepFEA_RWCurve3dElementProperty.hxx b/inc/RWStepFEA_RWCurve3dElementProperty.hxx
index 72028fa..5439c1a 100644
--- a/inc/RWStepFEA_RWCurve3dElementProperty.hxx
+++ b/inc/RWStepFEA_RWCurve3dElementProperty.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWCurve3dElementProperty  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWCurve3dElementProperty();
diff --git a/inc/RWStepFEA_RWCurve3dElementRepresentation.hxx b/inc/RWStepFEA_RWCurve3dElementRepresentation.hxx
index 7c2dbec..50d2dc7 100644
--- a/inc/RWStepFEA_RWCurve3dElementRepresentation.hxx
+++ b/inc/RWStepFEA_RWCurve3dElementRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWCurve3dElementRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWCurve3dElementRepresentation();
diff --git a/inc/RWStepFEA_RWCurveElementEndOffset.hxx b/inc/RWStepFEA_RWCurveElementEndOffset.hxx
index b502c1c..f58e455 100644
--- a/inc/RWStepFEA_RWCurveElementEndOffset.hxx
+++ b/inc/RWStepFEA_RWCurveElementEndOffset.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWCurveElementEndOffset  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWCurveElementEndOffset();
diff --git a/inc/RWStepFEA_RWCurveElementEndRelease.hxx b/inc/RWStepFEA_RWCurveElementEndRelease.hxx
index aba3e26..11b57b9 100644
--- a/inc/RWStepFEA_RWCurveElementEndRelease.hxx
+++ b/inc/RWStepFEA_RWCurveElementEndRelease.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWCurveElementEndRelease  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWCurveElementEndRelease();
diff --git a/inc/RWStepFEA_RWCurveElementInterval.hxx b/inc/RWStepFEA_RWCurveElementInterval.hxx
index c0dd7a1..f082e2a 100644
--- a/inc/RWStepFEA_RWCurveElementInterval.hxx
+++ b/inc/RWStepFEA_RWCurveElementInterval.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWCurveElementInterval  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWCurveElementInterval();
diff --git a/inc/RWStepFEA_RWCurveElementIntervalConstant.hxx b/inc/RWStepFEA_RWCurveElementIntervalConstant.hxx
index 745adc2..7899d63 100644
--- a/inc/RWStepFEA_RWCurveElementIntervalConstant.hxx
+++ b/inc/RWStepFEA_RWCurveElementIntervalConstant.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWCurveElementIntervalConstant  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWCurveElementIntervalConstant();
diff --git a/inc/RWStepFEA_RWCurveElementIntervalLinearlyVarying.hxx b/inc/RWStepFEA_RWCurveElementIntervalLinearlyVarying.hxx
index 9097c6b..9e8d857 100644
--- a/inc/RWStepFEA_RWCurveElementIntervalLinearlyVarying.hxx
+++ b/inc/RWStepFEA_RWCurveElementIntervalLinearlyVarying.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWCurveElementIntervalLinearlyVarying  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWCurveElementIntervalLinearlyVarying();
diff --git a/inc/RWStepFEA_RWCurveElementLocation.hxx b/inc/RWStepFEA_RWCurveElementLocation.hxx
index 7385673..464d4e9 100644
--- a/inc/RWStepFEA_RWCurveElementLocation.hxx
+++ b/inc/RWStepFEA_RWCurveElementLocation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWCurveElementLocation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWCurveElementLocation();
diff --git a/inc/RWStepFEA_RWDummyNode.hxx b/inc/RWStepFEA_RWDummyNode.hxx
index 586e0e3..6b8b1c0 100644
--- a/inc/RWStepFEA_RWDummyNode.hxx
+++ b/inc/RWStepFEA_RWDummyNode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWDummyNode  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWDummyNode();
diff --git a/inc/RWStepFEA_RWElementGeometricRelationship.hxx b/inc/RWStepFEA_RWElementGeometricRelationship.hxx
index 7746d18..21ff09b 100644
--- a/inc/RWStepFEA_RWElementGeometricRelationship.hxx
+++ b/inc/RWStepFEA_RWElementGeometricRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWElementGeometricRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWElementGeometricRelationship();
diff --git a/inc/RWStepFEA_RWElementGroup.hxx b/inc/RWStepFEA_RWElementGroup.hxx
index 8f48751..8b4fd89 100644
--- a/inc/RWStepFEA_RWElementGroup.hxx
+++ b/inc/RWStepFEA_RWElementGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWElementGroup  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWElementGroup();
diff --git a/inc/RWStepFEA_RWElementRepresentation.hxx b/inc/RWStepFEA_RWElementRepresentation.hxx
index 8cdb09e..04a0325 100644
--- a/inc/RWStepFEA_RWElementRepresentation.hxx
+++ b/inc/RWStepFEA_RWElementRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWElementRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWElementRepresentation();
diff --git a/inc/RWStepFEA_RWFeaAreaDensity.hxx b/inc/RWStepFEA_RWFeaAreaDensity.hxx
index 26194f7..d3abb7d 100644
--- a/inc/RWStepFEA_RWFeaAreaDensity.hxx
+++ b/inc/RWStepFEA_RWFeaAreaDensity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaAreaDensity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaAreaDensity();
diff --git a/inc/RWStepFEA_RWFeaAxis2Placement3d.hxx b/inc/RWStepFEA_RWFeaAxis2Placement3d.hxx
index 20b2a46..5b55bef 100644
--- a/inc/RWStepFEA_RWFeaAxis2Placement3d.hxx
+++ b/inc/RWStepFEA_RWFeaAxis2Placement3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaAxis2Placement3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaAxis2Placement3d();
diff --git a/inc/RWStepFEA_RWFeaCurveSectionGeometricRelationship.hxx b/inc/RWStepFEA_RWFeaCurveSectionGeometricRelationship.hxx
index 4efe886..ee11998 100644
--- a/inc/RWStepFEA_RWFeaCurveSectionGeometricRelationship.hxx
+++ b/inc/RWStepFEA_RWFeaCurveSectionGeometricRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaCurveSectionGeometricRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaCurveSectionGeometricRelationship();
diff --git a/inc/RWStepFEA_RWFeaGroup.hxx b/inc/RWStepFEA_RWFeaGroup.hxx
index dda1934..e19c345 100644
--- a/inc/RWStepFEA_RWFeaGroup.hxx
+++ b/inc/RWStepFEA_RWFeaGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaGroup  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaGroup();
diff --git a/inc/RWStepFEA_RWFeaLinearElasticity.hxx b/inc/RWStepFEA_RWFeaLinearElasticity.hxx
index d32e7c5..861ae9f 100644
--- a/inc/RWStepFEA_RWFeaLinearElasticity.hxx
+++ b/inc/RWStepFEA_RWFeaLinearElasticity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaLinearElasticity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaLinearElasticity();
diff --git a/inc/RWStepFEA_RWFeaMassDensity.hxx b/inc/RWStepFEA_RWFeaMassDensity.hxx
index 3eb7521..a92f2f3 100644
--- a/inc/RWStepFEA_RWFeaMassDensity.hxx
+++ b/inc/RWStepFEA_RWFeaMassDensity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaMassDensity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaMassDensity();
diff --git a/inc/RWStepFEA_RWFeaMaterialPropertyRepresentation.hxx b/inc/RWStepFEA_RWFeaMaterialPropertyRepresentation.hxx
index 086b16a..f54f322 100644
--- a/inc/RWStepFEA_RWFeaMaterialPropertyRepresentation.hxx
+++ b/inc/RWStepFEA_RWFeaMaterialPropertyRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaMaterialPropertyRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaMaterialPropertyRepresentation();
diff --git a/inc/RWStepFEA_RWFeaMaterialPropertyRepresentationItem.hxx b/inc/RWStepFEA_RWFeaMaterialPropertyRepresentationItem.hxx
index 769eb04..80adf71 100644
--- a/inc/RWStepFEA_RWFeaMaterialPropertyRepresentationItem.hxx
+++ b/inc/RWStepFEA_RWFeaMaterialPropertyRepresentationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaMaterialPropertyRepresentationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaMaterialPropertyRepresentationItem();
diff --git a/inc/RWStepFEA_RWFeaModel.hxx b/inc/RWStepFEA_RWFeaModel.hxx
index e16f52e..c9f78e5 100644
--- a/inc/RWStepFEA_RWFeaModel.hxx
+++ b/inc/RWStepFEA_RWFeaModel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaModel  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaModel();
diff --git a/inc/RWStepFEA_RWFeaModel3d.hxx b/inc/RWStepFEA_RWFeaModel3d.hxx
index 3d6cdf3..4845478 100644
--- a/inc/RWStepFEA_RWFeaModel3d.hxx
+++ b/inc/RWStepFEA_RWFeaModel3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaModel3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaModel3d();
diff --git a/inc/RWStepFEA_RWFeaModelDefinition.hxx b/inc/RWStepFEA_RWFeaModelDefinition.hxx
index 96587c1..8e11c06 100644
--- a/inc/RWStepFEA_RWFeaModelDefinition.hxx
+++ b/inc/RWStepFEA_RWFeaModelDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaModelDefinition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaModelDefinition();
diff --git a/inc/RWStepFEA_RWFeaMoistureAbsorption.hxx b/inc/RWStepFEA_RWFeaMoistureAbsorption.hxx
index 5af251d..2a6def0 100644
--- a/inc/RWStepFEA_RWFeaMoistureAbsorption.hxx
+++ b/inc/RWStepFEA_RWFeaMoistureAbsorption.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaMoistureAbsorption  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaMoistureAbsorption();
diff --git a/inc/RWStepFEA_RWFeaParametricPoint.hxx b/inc/RWStepFEA_RWFeaParametricPoint.hxx
index 181435e..05a8d11 100644
--- a/inc/RWStepFEA_RWFeaParametricPoint.hxx
+++ b/inc/RWStepFEA_RWFeaParametricPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaParametricPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaParametricPoint();
diff --git a/inc/RWStepFEA_RWFeaRepresentationItem.hxx b/inc/RWStepFEA_RWFeaRepresentationItem.hxx
index 8141f45..d30ad0b 100644
--- a/inc/RWStepFEA_RWFeaRepresentationItem.hxx
+++ b/inc/RWStepFEA_RWFeaRepresentationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaRepresentationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaRepresentationItem();
diff --git a/inc/RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion.hxx b/inc/RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion.hxx
index 653df18..803fce1 100644
--- a/inc/RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion.hxx
+++ b/inc/RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion();
diff --git a/inc/RWStepFEA_RWFeaShellBendingStiffness.hxx b/inc/RWStepFEA_RWFeaShellBendingStiffness.hxx
index bc352f6..7f3e64f 100644
--- a/inc/RWStepFEA_RWFeaShellBendingStiffness.hxx
+++ b/inc/RWStepFEA_RWFeaShellBendingStiffness.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaShellBendingStiffness  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaShellBendingStiffness();
diff --git a/inc/RWStepFEA_RWFeaShellMembraneBendingCouplingStiffness.hxx b/inc/RWStepFEA_RWFeaShellMembraneBendingCouplingStiffness.hxx
index e2dabf2..e09abb7 100644
--- a/inc/RWStepFEA_RWFeaShellMembraneBendingCouplingStiffness.hxx
+++ b/inc/RWStepFEA_RWFeaShellMembraneBendingCouplingStiffness.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaShellMembraneBendingCouplingStiffness  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaShellMembraneBendingCouplingStiffness();
diff --git a/inc/RWStepFEA_RWFeaShellMembraneStiffness.hxx b/inc/RWStepFEA_RWFeaShellMembraneStiffness.hxx
index ad687e6..81dc243 100644
--- a/inc/RWStepFEA_RWFeaShellMembraneStiffness.hxx
+++ b/inc/RWStepFEA_RWFeaShellMembraneStiffness.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaShellMembraneStiffness  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaShellMembraneStiffness();
diff --git a/inc/RWStepFEA_RWFeaShellShearStiffness.hxx b/inc/RWStepFEA_RWFeaShellShearStiffness.hxx
index 96ac197..fa8b1f5 100644
--- a/inc/RWStepFEA_RWFeaShellShearStiffness.hxx
+++ b/inc/RWStepFEA_RWFeaShellShearStiffness.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaShellShearStiffness  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaShellShearStiffness();
diff --git a/inc/RWStepFEA_RWFeaSurfaceSectionGeometricRelationship.hxx b/inc/RWStepFEA_RWFeaSurfaceSectionGeometricRelationship.hxx
index b8b649b..7f68b7a 100644
--- a/inc/RWStepFEA_RWFeaSurfaceSectionGeometricRelationship.hxx
+++ b/inc/RWStepFEA_RWFeaSurfaceSectionGeometricRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaSurfaceSectionGeometricRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaSurfaceSectionGeometricRelationship();
diff --git a/inc/RWStepFEA_RWFeaTangentialCoefficientOfLinearThermalExpansion.hxx b/inc/RWStepFEA_RWFeaTangentialCoefficientOfLinearThermalExpansion.hxx
index 2b83481..0aa6869 100644
--- a/inc/RWStepFEA_RWFeaTangentialCoefficientOfLinearThermalExpansion.hxx
+++ b/inc/RWStepFEA_RWFeaTangentialCoefficientOfLinearThermalExpansion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFeaTangentialCoefficientOfLinearThermalExpansion  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFeaTangentialCoefficientOfLinearThermalExpansion();
diff --git a/inc/RWStepFEA_RWFreedomAndCoefficient.hxx b/inc/RWStepFEA_RWFreedomAndCoefficient.hxx
index 4d395ab..ec37cb5 100644
--- a/inc/RWStepFEA_RWFreedomAndCoefficient.hxx
+++ b/inc/RWStepFEA_RWFreedomAndCoefficient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFreedomAndCoefficient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFreedomAndCoefficient();
diff --git a/inc/RWStepFEA_RWFreedomsList.hxx b/inc/RWStepFEA_RWFreedomsList.hxx
index eac4e88..ae0c0f4 100644
--- a/inc/RWStepFEA_RWFreedomsList.hxx
+++ b/inc/RWStepFEA_RWFreedomsList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWFreedomsList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWFreedomsList();
diff --git a/inc/RWStepFEA_RWGeometricNode.hxx b/inc/RWStepFEA_RWGeometricNode.hxx
index dbe7960..4495f41 100644
--- a/inc/RWStepFEA_RWGeometricNode.hxx
+++ b/inc/RWStepFEA_RWGeometricNode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWGeometricNode  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWGeometricNode();
diff --git a/inc/RWStepFEA_RWNode.hxx b/inc/RWStepFEA_RWNode.hxx
index ae44712..0c8b169 100644
--- a/inc/RWStepFEA_RWNode.hxx
+++ b/inc/RWStepFEA_RWNode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWNode  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWNode();
diff --git a/inc/RWStepFEA_RWNodeDefinition.hxx b/inc/RWStepFEA_RWNodeDefinition.hxx
index 79d5c2d..5557780 100644
--- a/inc/RWStepFEA_RWNodeDefinition.hxx
+++ b/inc/RWStepFEA_RWNodeDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWNodeDefinition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWNodeDefinition();
diff --git a/inc/RWStepFEA_RWNodeGroup.hxx b/inc/RWStepFEA_RWNodeGroup.hxx
index 6635860..422564f 100644
--- a/inc/RWStepFEA_RWNodeGroup.hxx
+++ b/inc/RWStepFEA_RWNodeGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWNodeGroup  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWNodeGroup();
diff --git a/inc/RWStepFEA_RWNodeRepresentation.hxx b/inc/RWStepFEA_RWNodeRepresentation.hxx
index c62d8f7..b349986 100644
--- a/inc/RWStepFEA_RWNodeRepresentation.hxx
+++ b/inc/RWStepFEA_RWNodeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWNodeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWNodeRepresentation();
diff --git a/inc/RWStepFEA_RWNodeSet.hxx b/inc/RWStepFEA_RWNodeSet.hxx
index 279544f..cb53c34 100644
--- a/inc/RWStepFEA_RWNodeSet.hxx
+++ b/inc/RWStepFEA_RWNodeSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWNodeSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWNodeSet();
diff --git a/inc/RWStepFEA_RWNodeWithSolutionCoordinateSystem.hxx b/inc/RWStepFEA_RWNodeWithSolutionCoordinateSystem.hxx
index 9384444..65a49c3 100644
--- a/inc/RWStepFEA_RWNodeWithSolutionCoordinateSystem.hxx
+++ b/inc/RWStepFEA_RWNodeWithSolutionCoordinateSystem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWNodeWithSolutionCoordinateSystem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWNodeWithSolutionCoordinateSystem();
diff --git a/inc/RWStepFEA_RWNodeWithVector.hxx b/inc/RWStepFEA_RWNodeWithVector.hxx
index 8c233de..c7b3849 100644
--- a/inc/RWStepFEA_RWNodeWithVector.hxx
+++ b/inc/RWStepFEA_RWNodeWithVector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWNodeWithVector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWNodeWithVector();
diff --git a/inc/RWStepFEA_RWParametricCurve3dElementCoordinateDirection.hxx b/inc/RWStepFEA_RWParametricCurve3dElementCoordinateDirection.hxx
index 9cdd937..3373b5b 100644
--- a/inc/RWStepFEA_RWParametricCurve3dElementCoordinateDirection.hxx
+++ b/inc/RWStepFEA_RWParametricCurve3dElementCoordinateDirection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWParametricCurve3dElementCoordinateDirection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWParametricCurve3dElementCoordinateDirection();
diff --git a/inc/RWStepFEA_RWParametricCurve3dElementCoordinateSystem.hxx b/inc/RWStepFEA_RWParametricCurve3dElementCoordinateSystem.hxx
index 1f67bd0..dd9c8ce 100644
--- a/inc/RWStepFEA_RWParametricCurve3dElementCoordinateSystem.hxx
+++ b/inc/RWStepFEA_RWParametricCurve3dElementCoordinateSystem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWParametricCurve3dElementCoordinateSystem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWParametricCurve3dElementCoordinateSystem();
diff --git a/inc/RWStepFEA_RWParametricSurface3dElementCoordinateSystem.hxx b/inc/RWStepFEA_RWParametricSurface3dElementCoordinateSystem.hxx
index 9fed76a..455a165 100644
--- a/inc/RWStepFEA_RWParametricSurface3dElementCoordinateSystem.hxx
+++ b/inc/RWStepFEA_RWParametricSurface3dElementCoordinateSystem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWParametricSurface3dElementCoordinateSystem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWParametricSurface3dElementCoordinateSystem();
diff --git a/inc/RWStepFEA_RWSurface3dElementRepresentation.hxx b/inc/RWStepFEA_RWSurface3dElementRepresentation.hxx
index 366df13..cdb61fb 100644
--- a/inc/RWStepFEA_RWSurface3dElementRepresentation.hxx
+++ b/inc/RWStepFEA_RWSurface3dElementRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWSurface3dElementRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWSurface3dElementRepresentation();
diff --git a/inc/RWStepFEA_RWVolume3dElementRepresentation.hxx b/inc/RWStepFEA_RWVolume3dElementRepresentation.hxx
index f5185e5..d6e4016 100644
--- a/inc/RWStepFEA_RWVolume3dElementRepresentation.hxx
+++ b/inc/RWStepFEA_RWVolume3dElementRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepFEA_RWVolume3dElementRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepFEA_RWVolume3dElementRepresentation();
diff --git a/inc/RWStepGeom_RWAxis1Placement.hxx b/inc/RWStepGeom_RWAxis1Placement.hxx
index ad008d5..2a02fac 100644
--- a/inc/RWStepGeom_RWAxis1Placement.hxx
+++ b/inc/RWStepGeom_RWAxis1Placement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWAxis1Placement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWAxis1Placement();
diff --git a/inc/RWStepGeom_RWAxis2Placement2d.hxx b/inc/RWStepGeom_RWAxis2Placement2d.hxx
index 33e2938..e71ce6a 100644
--- a/inc/RWStepGeom_RWAxis2Placement2d.hxx
+++ b/inc/RWStepGeom_RWAxis2Placement2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWAxis2Placement2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWAxis2Placement2d();
diff --git a/inc/RWStepGeom_RWAxis2Placement3d.hxx b/inc/RWStepGeom_RWAxis2Placement3d.hxx
index 96c43d5..28dda22 100644
--- a/inc/RWStepGeom_RWAxis2Placement3d.hxx
+++ b/inc/RWStepGeom_RWAxis2Placement3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWAxis2Placement3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWAxis2Placement3d();
diff --git a/inc/RWStepGeom_RWBSplineCurve.hxx b/inc/RWStepGeom_RWBSplineCurve.hxx
index c3962cf..48843ac 100644
--- a/inc/RWStepGeom_RWBSplineCurve.hxx
+++ b/inc/RWStepGeom_RWBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBSplineCurve();
diff --git a/inc/RWStepGeom_RWBSplineCurveWithKnots.hxx b/inc/RWStepGeom_RWBSplineCurveWithKnots.hxx
index 6245835..d868ceb 100644
--- a/inc/RWStepGeom_RWBSplineCurveWithKnots.hxx
+++ b/inc/RWStepGeom_RWBSplineCurveWithKnots.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_ShareTool;
 class RWStepGeom_RWBSplineCurveWithKnots  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBSplineCurveWithKnots();
diff --git a/inc/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.hxx b/inc/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.hxx
index c3dce39..15206ed 100644
--- a/inc/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.hxx
+++ b/inc/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_ShareTool;
 class RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve();
diff --git a/inc/RWStepGeom_RWBSplineSurface.hxx b/inc/RWStepGeom_RWBSplineSurface.hxx
index ea69ff0..59d6e55 100644
--- a/inc/RWStepGeom_RWBSplineSurface.hxx
+++ b/inc/RWStepGeom_RWBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBSplineSurface();
diff --git a/inc/RWStepGeom_RWBSplineSurfaceWithKnots.hxx b/inc/RWStepGeom_RWBSplineSurfaceWithKnots.hxx
index 0fe7288..83fed1b 100644
--- a/inc/RWStepGeom_RWBSplineSurfaceWithKnots.hxx
+++ b/inc/RWStepGeom_RWBSplineSurfaceWithKnots.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_ShareTool;
 class RWStepGeom_RWBSplineSurfaceWithKnots  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBSplineSurfaceWithKnots();
diff --git a/inc/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx b/inc/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx
index 3539991..f611966 100644
--- a/inc/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx
+++ b/inc/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_ShareTool;
 class RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface();
diff --git a/inc/RWStepGeom_RWBezierCurve.hxx b/inc/RWStepGeom_RWBezierCurve.hxx
index dac3531..6dec5cc 100644
--- a/inc/RWStepGeom_RWBezierCurve.hxx
+++ b/inc/RWStepGeom_RWBezierCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWBezierCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBezierCurve();
diff --git a/inc/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.hxx b/inc/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.hxx
index 41ad359..236b35b 100644
--- a/inc/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.hxx
+++ b/inc/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWBezierCurveAndRationalBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBezierCurveAndRationalBSplineCurve();
diff --git a/inc/RWStepGeom_RWBezierSurface.hxx b/inc/RWStepGeom_RWBezierSurface.hxx
index 9c33055..a08333b 100644
--- a/inc/RWStepGeom_RWBezierSurface.hxx
+++ b/inc/RWStepGeom_RWBezierSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWBezierSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBezierSurface();
diff --git a/inc/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.hxx b/inc/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.hxx
index 041f52c..df73e2c 100644
--- a/inc/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.hxx
+++ b/inc/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface();
diff --git a/inc/RWStepGeom_RWBoundaryCurve.hxx b/inc/RWStepGeom_RWBoundaryCurve.hxx
index 57b1bf0..2f4fa65 100644
--- a/inc/RWStepGeom_RWBoundaryCurve.hxx
+++ b/inc/RWStepGeom_RWBoundaryCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWBoundaryCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBoundaryCurve();
diff --git a/inc/RWStepGeom_RWBoundedCurve.hxx b/inc/RWStepGeom_RWBoundedCurve.hxx
index 7fa3295..caf39f8 100644
--- a/inc/RWStepGeom_RWBoundedCurve.hxx
+++ b/inc/RWStepGeom_RWBoundedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepGeom_RWBoundedCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBoundedCurve();
diff --git a/inc/RWStepGeom_RWBoundedSurface.hxx b/inc/RWStepGeom_RWBoundedSurface.hxx
index bfeaf2e..f308187 100644
--- a/inc/RWStepGeom_RWBoundedSurface.hxx
+++ b/inc/RWStepGeom_RWBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepGeom_RWBoundedSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWBoundedSurface();
diff --git a/inc/RWStepGeom_RWCartesianPoint.hxx b/inc/RWStepGeom_RWCartesianPoint.hxx
index 3f7dfe2..c15b3ae 100644
--- a/inc/RWStepGeom_RWCartesianPoint.hxx
+++ b/inc/RWStepGeom_RWCartesianPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepGeom_RWCartesianPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWCartesianPoint();
diff --git a/inc/RWStepGeom_RWCartesianTransformationOperator.hxx b/inc/RWStepGeom_RWCartesianTransformationOperator.hxx
index bb7c98f..375a0b5 100644
--- a/inc/RWStepGeom_RWCartesianTransformationOperator.hxx
+++ b/inc/RWStepGeom_RWCartesianTransformationOperator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWCartesianTransformationOperator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWCartesianTransformationOperator();
diff --git a/inc/RWStepGeom_RWCartesianTransformationOperator3d.hxx b/inc/RWStepGeom_RWCartesianTransformationOperator3d.hxx
index a6771cb..5675b06 100644
--- a/inc/RWStepGeom_RWCartesianTransformationOperator3d.hxx
+++ b/inc/RWStepGeom_RWCartesianTransformationOperator3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWCartesianTransformationOperator3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWCartesianTransformationOperator3d();
diff --git a/inc/RWStepGeom_RWCircle.hxx b/inc/RWStepGeom_RWCircle.hxx
index 619d7b5..b7ca4f6 100644
--- a/inc/RWStepGeom_RWCircle.hxx
+++ b/inc/RWStepGeom_RWCircle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWCircle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWCircle();
diff --git a/inc/RWStepGeom_RWCompositeCurve.hxx b/inc/RWStepGeom_RWCompositeCurve.hxx
index a37445b..92064a9 100644
--- a/inc/RWStepGeom_RWCompositeCurve.hxx
+++ b/inc/RWStepGeom_RWCompositeCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWCompositeCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWCompositeCurve();
diff --git a/inc/RWStepGeom_RWCompositeCurveOnSurface.hxx b/inc/RWStepGeom_RWCompositeCurveOnSurface.hxx
index fdbe4ba..669f76d 100644
--- a/inc/RWStepGeom_RWCompositeCurveOnSurface.hxx
+++ b/inc/RWStepGeom_RWCompositeCurveOnSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWCompositeCurveOnSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWCompositeCurveOnSurface();
diff --git a/inc/RWStepGeom_RWCompositeCurveSegment.hxx b/inc/RWStepGeom_RWCompositeCurveSegment.hxx
index 9b8341b..5933417 100644
--- a/inc/RWStepGeom_RWCompositeCurveSegment.hxx
+++ b/inc/RWStepGeom_RWCompositeCurveSegment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWCompositeCurveSegment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWCompositeCurveSegment();
diff --git a/inc/RWStepGeom_RWConic.hxx b/inc/RWStepGeom_RWConic.hxx
index 0be7d00..cf734c8 100644
--- a/inc/RWStepGeom_RWConic.hxx
+++ b/inc/RWStepGeom_RWConic.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWConic  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWConic();
diff --git a/inc/RWStepGeom_RWConicalSurface.hxx b/inc/RWStepGeom_RWConicalSurface.hxx
index c142bb3..8d393a9 100644
--- a/inc/RWStepGeom_RWConicalSurface.hxx
+++ b/inc/RWStepGeom_RWConicalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWConicalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWConicalSurface();
diff --git a/inc/RWStepGeom_RWCurve.hxx b/inc/RWStepGeom_RWCurve.hxx
index 07c31f7..88ea4ac 100644
--- a/inc/RWStepGeom_RWCurve.hxx
+++ b/inc/RWStepGeom_RWCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepGeom_RWCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWCurve();
diff --git a/inc/RWStepGeom_RWCurveBoundedSurface.hxx b/inc/RWStepGeom_RWCurveBoundedSurface.hxx
index 30186e1..8a8cba7 100644
--- a/inc/RWStepGeom_RWCurveBoundedSurface.hxx
+++ b/inc/RWStepGeom_RWCurveBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWCurveBoundedSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepGeom_RWCurveBoundedSurface();
diff --git a/inc/RWStepGeom_RWCurveReplica.hxx b/inc/RWStepGeom_RWCurveReplica.hxx
index 4f02ee7..0bb6e5c 100644
--- a/inc/RWStepGeom_RWCurveReplica.hxx
+++ b/inc/RWStepGeom_RWCurveReplica.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWCurveReplica  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWCurveReplica();
diff --git a/inc/RWStepGeom_RWCylindricalSurface.hxx b/inc/RWStepGeom_RWCylindricalSurface.hxx
index 28027a8..43955bb 100644
--- a/inc/RWStepGeom_RWCylindricalSurface.hxx
+++ b/inc/RWStepGeom_RWCylindricalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWCylindricalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWCylindricalSurface();
diff --git a/inc/RWStepGeom_RWDegeneratePcurve.hxx b/inc/RWStepGeom_RWDegeneratePcurve.hxx
index 769545e..45a57e1 100644
--- a/inc/RWStepGeom_RWDegeneratePcurve.hxx
+++ b/inc/RWStepGeom_RWDegeneratePcurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWDegeneratePcurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWDegeneratePcurve();
diff --git a/inc/RWStepGeom_RWDegenerateToroidalSurface.hxx b/inc/RWStepGeom_RWDegenerateToroidalSurface.hxx
index 5f6f19c..2fbfc1c 100644
--- a/inc/RWStepGeom_RWDegenerateToroidalSurface.hxx
+++ b/inc/RWStepGeom_RWDegenerateToroidalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWDegenerateToroidalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWDegenerateToroidalSurface();
diff --git a/inc/RWStepGeom_RWDirection.hxx b/inc/RWStepGeom_RWDirection.hxx
index 5b42f1c..508d11f 100644
--- a/inc/RWStepGeom_RWDirection.hxx
+++ b/inc/RWStepGeom_RWDirection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Interface_ShareTool;
 class RWStepGeom_RWDirection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWDirection();
diff --git a/inc/RWStepGeom_RWElementarySurface.hxx b/inc/RWStepGeom_RWElementarySurface.hxx
index 5001e9d..ee68a24 100644
--- a/inc/RWStepGeom_RWElementarySurface.hxx
+++ b/inc/RWStepGeom_RWElementarySurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWElementarySurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWElementarySurface();
diff --git a/inc/RWStepGeom_RWEllipse.hxx b/inc/RWStepGeom_RWEllipse.hxx
index 12c664f..27e1740 100644
--- a/inc/RWStepGeom_RWEllipse.hxx
+++ b/inc/RWStepGeom_RWEllipse.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_ShareTool;
 class RWStepGeom_RWEllipse  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWEllipse();
diff --git a/inc/RWStepGeom_RWEvaluatedDegeneratePcurve.hxx b/inc/RWStepGeom_RWEvaluatedDegeneratePcurve.hxx
index 552b943..2d93c58 100644
--- a/inc/RWStepGeom_RWEvaluatedDegeneratePcurve.hxx
+++ b/inc/RWStepGeom_RWEvaluatedDegeneratePcurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWEvaluatedDegeneratePcurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWEvaluatedDegeneratePcurve();
diff --git a/inc/RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.hxx b/inc/RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.hxx
index 693f24a..01385a3 100644
--- a/inc/RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.hxx
+++ b/inc/RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx();
diff --git a/inc/RWStepGeom_RWGeometricRepresentationContext.hxx b/inc/RWStepGeom_RWGeometricRepresentationContext.hxx
index afa0e0d..e9aff1c 100644
--- a/inc/RWStepGeom_RWGeometricRepresentationContext.hxx
+++ b/inc/RWStepGeom_RWGeometricRepresentationContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepGeom_RWGeometricRepresentationContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWGeometricRepresentationContext();
diff --git a/inc/RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext.hxx b/inc/RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext.hxx
index 57336de..fe5c250 100644
--- a/inc/RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext.hxx
+++ b/inc/RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext();
diff --git a/inc/RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.hxx b/inc/RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.hxx
index 8c50cc7..35bdc78 100644
--- a/inc/RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.hxx
+++ b/inc/RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext();
diff --git a/inc/RWStepGeom_RWGeometricRepresentationItem.hxx b/inc/RWStepGeom_RWGeometricRepresentationItem.hxx
index d8f314f..cda28df 100644
--- a/inc/RWStepGeom_RWGeometricRepresentationItem.hxx
+++ b/inc/RWStepGeom_RWGeometricRepresentationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepGeom_RWGeometricRepresentationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWGeometricRepresentationItem();
diff --git a/inc/RWStepGeom_RWHyperbola.hxx b/inc/RWStepGeom_RWHyperbola.hxx
index cd11108..4ec37a8 100644
--- a/inc/RWStepGeom_RWHyperbola.hxx
+++ b/inc/RWStepGeom_RWHyperbola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWHyperbola  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWHyperbola();
diff --git a/inc/RWStepGeom_RWIntersectionCurve.hxx b/inc/RWStepGeom_RWIntersectionCurve.hxx
index 73db8bc..7db06b2 100644
--- a/inc/RWStepGeom_RWIntersectionCurve.hxx
+++ b/inc/RWStepGeom_RWIntersectionCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWIntersectionCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWIntersectionCurve();
diff --git a/inc/RWStepGeom_RWLine.hxx b/inc/RWStepGeom_RWLine.hxx
index 69e0e69..ee9809d 100644
--- a/inc/RWStepGeom_RWLine.hxx
+++ b/inc/RWStepGeom_RWLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWLine();
diff --git a/inc/RWStepGeom_RWOffsetCurve3d.hxx b/inc/RWStepGeom_RWOffsetCurve3d.hxx
index 78576c7..57c4cbc 100644
--- a/inc/RWStepGeom_RWOffsetCurve3d.hxx
+++ b/inc/RWStepGeom_RWOffsetCurve3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWOffsetCurve3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWOffsetCurve3d();
diff --git a/inc/RWStepGeom_RWOffsetSurface.hxx b/inc/RWStepGeom_RWOffsetSurface.hxx
index bf311fb..894cb2b 100644
--- a/inc/RWStepGeom_RWOffsetSurface.hxx
+++ b/inc/RWStepGeom_RWOffsetSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWOffsetSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWOffsetSurface();
diff --git a/inc/RWStepGeom_RWOrientedSurface.hxx b/inc/RWStepGeom_RWOrientedSurface.hxx
index 86a8a37..9ffd56d 100644
--- a/inc/RWStepGeom_RWOrientedSurface.hxx
+++ b/inc/RWStepGeom_RWOrientedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWOrientedSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepGeom_RWOrientedSurface();
diff --git a/inc/RWStepGeom_RWOuterBoundaryCurve.hxx b/inc/RWStepGeom_RWOuterBoundaryCurve.hxx
index 6719696..4cc8959 100644
--- a/inc/RWStepGeom_RWOuterBoundaryCurve.hxx
+++ b/inc/RWStepGeom_RWOuterBoundaryCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWOuterBoundaryCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWOuterBoundaryCurve();
diff --git a/inc/RWStepGeom_RWParabola.hxx b/inc/RWStepGeom_RWParabola.hxx
index f7f1518..afba938 100644
--- a/inc/RWStepGeom_RWParabola.hxx
+++ b/inc/RWStepGeom_RWParabola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWParabola  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWParabola();
diff --git a/inc/RWStepGeom_RWPcurve.hxx b/inc/RWStepGeom_RWPcurve.hxx
index 54cfeab..21ebc4f 100644
--- a/inc/RWStepGeom_RWPcurve.hxx
+++ b/inc/RWStepGeom_RWPcurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWPcurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWPcurve();
diff --git a/inc/RWStepGeom_RWPlacement.hxx b/inc/RWStepGeom_RWPlacement.hxx
index f81d2ca..738ea24 100644
--- a/inc/RWStepGeom_RWPlacement.hxx
+++ b/inc/RWStepGeom_RWPlacement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWPlacement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWPlacement();
diff --git a/inc/RWStepGeom_RWPlane.hxx b/inc/RWStepGeom_RWPlane.hxx
index 2216c01..8836185 100644
--- a/inc/RWStepGeom_RWPlane.hxx
+++ b/inc/RWStepGeom_RWPlane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWPlane  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWPlane();
diff --git a/inc/RWStepGeom_RWPoint.hxx b/inc/RWStepGeom_RWPoint.hxx
index dc7da64..254ba97 100644
--- a/inc/RWStepGeom_RWPoint.hxx
+++ b/inc/RWStepGeom_RWPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepGeom_RWPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWPoint();
diff --git a/inc/RWStepGeom_RWPointOnCurve.hxx b/inc/RWStepGeom_RWPointOnCurve.hxx
index 9539fd3..319e13b 100644
--- a/inc/RWStepGeom_RWPointOnCurve.hxx
+++ b/inc/RWStepGeom_RWPointOnCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWPointOnCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWPointOnCurve();
diff --git a/inc/RWStepGeom_RWPointOnSurface.hxx b/inc/RWStepGeom_RWPointOnSurface.hxx
index c19169a..06b18ce 100644
--- a/inc/RWStepGeom_RWPointOnSurface.hxx
+++ b/inc/RWStepGeom_RWPointOnSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWPointOnSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWPointOnSurface();
diff --git a/inc/RWStepGeom_RWPointReplica.hxx b/inc/RWStepGeom_RWPointReplica.hxx
index be8e778..281c38a 100644
--- a/inc/RWStepGeom_RWPointReplica.hxx
+++ b/inc/RWStepGeom_RWPointReplica.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWPointReplica  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWPointReplica();
diff --git a/inc/RWStepGeom_RWPolyline.hxx b/inc/RWStepGeom_RWPolyline.hxx
index 35d0a4e..3835e1b 100644
--- a/inc/RWStepGeom_RWPolyline.hxx
+++ b/inc/RWStepGeom_RWPolyline.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWPolyline  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWPolyline();
diff --git a/inc/RWStepGeom_RWQuasiUniformCurve.hxx b/inc/RWStepGeom_RWQuasiUniformCurve.hxx
index a480d0b..a88c620 100644
--- a/inc/RWStepGeom_RWQuasiUniformCurve.hxx
+++ b/inc/RWStepGeom_RWQuasiUniformCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWQuasiUniformCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWQuasiUniformCurve();
diff --git a/inc/RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve.hxx b/inc/RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve.hxx
index ab1f86c..9b5b1e3 100644
--- a/inc/RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve.hxx
+++ b/inc/RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve();
diff --git a/inc/RWStepGeom_RWQuasiUniformSurface.hxx b/inc/RWStepGeom_RWQuasiUniformSurface.hxx
index a445795..bd16470 100644
--- a/inc/RWStepGeom_RWQuasiUniformSurface.hxx
+++ b/inc/RWStepGeom_RWQuasiUniformSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWQuasiUniformSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWQuasiUniformSurface();
diff --git a/inc/RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface.hxx b/inc/RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface.hxx
index 0414cba..16039c7 100644
--- a/inc/RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface.hxx
+++ b/inc/RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface();
diff --git a/inc/RWStepGeom_RWRationalBSplineCurve.hxx b/inc/RWStepGeom_RWRationalBSplineCurve.hxx
index cc46a1f..85504bc 100644
--- a/inc/RWStepGeom_RWRationalBSplineCurve.hxx
+++ b/inc/RWStepGeom_RWRationalBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_ShareTool;
 class RWStepGeom_RWRationalBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWRationalBSplineCurve();
diff --git a/inc/RWStepGeom_RWRationalBSplineSurface.hxx b/inc/RWStepGeom_RWRationalBSplineSurface.hxx
index 198343b..9433ddf 100644
--- a/inc/RWStepGeom_RWRationalBSplineSurface.hxx
+++ b/inc/RWStepGeom_RWRationalBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_ShareTool;
 class RWStepGeom_RWRationalBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWRationalBSplineSurface();
diff --git a/inc/RWStepGeom_RWRectangularCompositeSurface.hxx b/inc/RWStepGeom_RWRectangularCompositeSurface.hxx
index 54c59ad..57433b0 100644
--- a/inc/RWStepGeom_RWRectangularCompositeSurface.hxx
+++ b/inc/RWStepGeom_RWRectangularCompositeSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWRectangularCompositeSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWRectangularCompositeSurface();
diff --git a/inc/RWStepGeom_RWRectangularTrimmedSurface.hxx b/inc/RWStepGeom_RWRectangularTrimmedSurface.hxx
index 7123dcf..b6ff2bd 100644
--- a/inc/RWStepGeom_RWRectangularTrimmedSurface.hxx
+++ b/inc/RWStepGeom_RWRectangularTrimmedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWRectangularTrimmedSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWRectangularTrimmedSurface();
diff --git a/inc/RWStepGeom_RWReparametrisedCompositeCurveSegment.hxx b/inc/RWStepGeom_RWReparametrisedCompositeCurveSegment.hxx
index 1baa9ac..03317fa 100644
--- a/inc/RWStepGeom_RWReparametrisedCompositeCurveSegment.hxx
+++ b/inc/RWStepGeom_RWReparametrisedCompositeCurveSegment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWReparametrisedCompositeCurveSegment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWReparametrisedCompositeCurveSegment();
diff --git a/inc/RWStepGeom_RWSeamCurve.hxx b/inc/RWStepGeom_RWSeamCurve.hxx
index d547327..d1a9878 100644
--- a/inc/RWStepGeom_RWSeamCurve.hxx
+++ b/inc/RWStepGeom_RWSeamCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWSeamCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWSeamCurve();
diff --git a/inc/RWStepGeom_RWSphericalSurface.hxx b/inc/RWStepGeom_RWSphericalSurface.hxx
index d2d40b1..61291ff 100644
--- a/inc/RWStepGeom_RWSphericalSurface.hxx
+++ b/inc/RWStepGeom_RWSphericalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWSphericalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWSphericalSurface();
diff --git a/inc/RWStepGeom_RWSurface.hxx b/inc/RWStepGeom_RWSurface.hxx
index 8dd51be..f78dc76 100644
--- a/inc/RWStepGeom_RWSurface.hxx
+++ b/inc/RWStepGeom_RWSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepGeom_RWSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWSurface();
diff --git a/inc/RWStepGeom_RWSurfaceCurve.hxx b/inc/RWStepGeom_RWSurfaceCurve.hxx
index f768c10..a0600e5 100644
--- a/inc/RWStepGeom_RWSurfaceCurve.hxx
+++ b/inc/RWStepGeom_RWSurfaceCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWSurfaceCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWSurfaceCurve();
diff --git a/inc/RWStepGeom_RWSurfaceCurveAndBoundedCurve.hxx b/inc/RWStepGeom_RWSurfaceCurveAndBoundedCurve.hxx
index f985c70..b66ba56 100644
--- a/inc/RWStepGeom_RWSurfaceCurveAndBoundedCurve.hxx
+++ b/inc/RWStepGeom_RWSurfaceCurveAndBoundedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWSurfaceCurveAndBoundedCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWSurfaceCurveAndBoundedCurve();
diff --git a/inc/RWStepGeom_RWSurfaceOfLinearExtrusion.hxx b/inc/RWStepGeom_RWSurfaceOfLinearExtrusion.hxx
index 0c55566..75a96e6 100644
--- a/inc/RWStepGeom_RWSurfaceOfLinearExtrusion.hxx
+++ b/inc/RWStepGeom_RWSurfaceOfLinearExtrusion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWSurfaceOfLinearExtrusion  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWSurfaceOfLinearExtrusion();
diff --git a/inc/RWStepGeom_RWSurfaceOfRevolution.hxx b/inc/RWStepGeom_RWSurfaceOfRevolution.hxx
index c722def..bbab909 100644
--- a/inc/RWStepGeom_RWSurfaceOfRevolution.hxx
+++ b/inc/RWStepGeom_RWSurfaceOfRevolution.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWSurfaceOfRevolution  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWSurfaceOfRevolution();
diff --git a/inc/RWStepGeom_RWSurfacePatch.hxx b/inc/RWStepGeom_RWSurfacePatch.hxx
index 2740f9d..95fe92b 100644
--- a/inc/RWStepGeom_RWSurfacePatch.hxx
+++ b/inc/RWStepGeom_RWSurfacePatch.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWSurfacePatch  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWSurfacePatch();
diff --git a/inc/RWStepGeom_RWSurfaceReplica.hxx b/inc/RWStepGeom_RWSurfaceReplica.hxx
index ed39c3c..12876c3 100644
--- a/inc/RWStepGeom_RWSurfaceReplica.hxx
+++ b/inc/RWStepGeom_RWSurfaceReplica.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWSurfaceReplica  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWSurfaceReplica();
diff --git a/inc/RWStepGeom_RWSweptSurface.hxx b/inc/RWStepGeom_RWSweptSurface.hxx
index 905ba69..211fb67 100644
--- a/inc/RWStepGeom_RWSweptSurface.hxx
+++ b/inc/RWStepGeom_RWSweptSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWSweptSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWSweptSurface();
diff --git a/inc/RWStepGeom_RWToroidalSurface.hxx b/inc/RWStepGeom_RWToroidalSurface.hxx
index 98ba37d..31b4cae 100644
--- a/inc/RWStepGeom_RWToroidalSurface.hxx
+++ b/inc/RWStepGeom_RWToroidalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_ShareTool;
 class RWStepGeom_RWToroidalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWToroidalSurface();
diff --git a/inc/RWStepGeom_RWTrimmedCurve.hxx b/inc/RWStepGeom_RWTrimmedCurve.hxx
index d7288af..5a748be 100644
--- a/inc/RWStepGeom_RWTrimmedCurve.hxx
+++ b/inc/RWStepGeom_RWTrimmedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWTrimmedCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWTrimmedCurve();
diff --git a/inc/RWStepGeom_RWUniformCurve.hxx b/inc/RWStepGeom_RWUniformCurve.hxx
index 52bd1be..62eaec2 100644
--- a/inc/RWStepGeom_RWUniformCurve.hxx
+++ b/inc/RWStepGeom_RWUniformCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWUniformCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWUniformCurve();
diff --git a/inc/RWStepGeom_RWUniformCurveAndRationalBSplineCurve.hxx b/inc/RWStepGeom_RWUniformCurveAndRationalBSplineCurve.hxx
index 3f4573d..bca38aa 100644
--- a/inc/RWStepGeom_RWUniformCurveAndRationalBSplineCurve.hxx
+++ b/inc/RWStepGeom_RWUniformCurveAndRationalBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWUniformCurveAndRationalBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWUniformCurveAndRationalBSplineCurve();
diff --git a/inc/RWStepGeom_RWUniformSurface.hxx b/inc/RWStepGeom_RWUniformSurface.hxx
index 0468936..be0e5c5 100644
--- a/inc/RWStepGeom_RWUniformSurface.hxx
+++ b/inc/RWStepGeom_RWUniformSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWUniformSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWUniformSurface();
diff --git a/inc/RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface.hxx b/inc/RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface.hxx
index 270c2ae..ab711e1 100644
--- a/inc/RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface.hxx
+++ b/inc/RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface();
diff --git a/inc/RWStepGeom_RWVector.hxx b/inc/RWStepGeom_RWVector.hxx
index 4d93266..adf5f26 100644
--- a/inc/RWStepGeom_RWVector.hxx
+++ b/inc/RWStepGeom_RWVector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_ShareTool;
 class RWStepGeom_RWVector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepGeom_RWVector();
diff --git a/inc/RWStepRepr_RWAssemblyComponentUsage.hxx b/inc/RWStepRepr_RWAssemblyComponentUsage.hxx
index a67a990..37955c3 100644
--- a/inc/RWStepRepr_RWAssemblyComponentUsage.hxx
+++ b/inc/RWStepRepr_RWAssemblyComponentUsage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWAssemblyComponentUsage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWAssemblyComponentUsage();
diff --git a/inc/RWStepRepr_RWAssemblyComponentUsageSubstitute.hxx b/inc/RWStepRepr_RWAssemblyComponentUsageSubstitute.hxx
index 103f8b2..2e101f8 100644
--- a/inc/RWStepRepr_RWAssemblyComponentUsageSubstitute.hxx
+++ b/inc/RWStepRepr_RWAssemblyComponentUsageSubstitute.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWAssemblyComponentUsageSubstitute  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWAssemblyComponentUsageSubstitute();
diff --git a/inc/RWStepRepr_RWCompositeShapeAspect.hxx b/inc/RWStepRepr_RWCompositeShapeAspect.hxx
index 36031dd..b6323bc 100644
--- a/inc/RWStepRepr_RWCompositeShapeAspect.hxx
+++ b/inc/RWStepRepr_RWCompositeShapeAspect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWCompositeShapeAspect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWCompositeShapeAspect();
diff --git a/inc/RWStepRepr_RWCompoundRepresentationItem.hxx b/inc/RWStepRepr_RWCompoundRepresentationItem.hxx
index 0073f29..0efd57d 100644
--- a/inc/RWStepRepr_RWCompoundRepresentationItem.hxx
+++ b/inc/RWStepRepr_RWCompoundRepresentationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWCompoundRepresentationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWCompoundRepresentationItem();
diff --git a/inc/RWStepRepr_RWConfigurationDesign.hxx b/inc/RWStepRepr_RWConfigurationDesign.hxx
index 9956f31..082c34b 100644
--- a/inc/RWStepRepr_RWConfigurationDesign.hxx
+++ b/inc/RWStepRepr_RWConfigurationDesign.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWConfigurationDesign  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWConfigurationDesign();
diff --git a/inc/RWStepRepr_RWConfigurationEffectivity.hxx b/inc/RWStepRepr_RWConfigurationEffectivity.hxx
index 39f2083..1970423 100644
--- a/inc/RWStepRepr_RWConfigurationEffectivity.hxx
+++ b/inc/RWStepRepr_RWConfigurationEffectivity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWConfigurationEffectivity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWConfigurationEffectivity();
diff --git a/inc/RWStepRepr_RWConfigurationItem.hxx b/inc/RWStepRepr_RWConfigurationItem.hxx
index 47bfb31..5ff2343 100644
--- a/inc/RWStepRepr_RWConfigurationItem.hxx
+++ b/inc/RWStepRepr_RWConfigurationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWConfigurationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWConfigurationItem();
diff --git a/inc/RWStepRepr_RWDataEnvironment.hxx b/inc/RWStepRepr_RWDataEnvironment.hxx
index 9cd61d8..3fe4e51 100644
--- a/inc/RWStepRepr_RWDataEnvironment.hxx
+++ b/inc/RWStepRepr_RWDataEnvironment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWDataEnvironment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWDataEnvironment();
diff --git a/inc/RWStepRepr_RWDefinitionalRepresentation.hxx b/inc/RWStepRepr_RWDefinitionalRepresentation.hxx
index 20c0185..1deead5 100644
--- a/inc/RWStepRepr_RWDefinitionalRepresentation.hxx
+++ b/inc/RWStepRepr_RWDefinitionalRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWDefinitionalRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWDefinitionalRepresentation();
diff --git a/inc/RWStepRepr_RWDerivedShapeAspect.hxx b/inc/RWStepRepr_RWDerivedShapeAspect.hxx
index 31c99b7..99796ed 100644
--- a/inc/RWStepRepr_RWDerivedShapeAspect.hxx
+++ b/inc/RWStepRepr_RWDerivedShapeAspect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWDerivedShapeAspect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWDerivedShapeAspect();
diff --git a/inc/RWStepRepr_RWDescriptiveRepresentationItem.hxx b/inc/RWStepRepr_RWDescriptiveRepresentationItem.hxx
index c62a5b4..d12020f 100644
--- a/inc/RWStepRepr_RWDescriptiveRepresentationItem.hxx
+++ b/inc/RWStepRepr_RWDescriptiveRepresentationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepRepr_RWDescriptiveRepresentationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWDescriptiveRepresentationItem();
diff --git a/inc/RWStepRepr_RWExtension.hxx b/inc/RWStepRepr_RWExtension.hxx
index 7f2184e..906e3c6 100644
--- a/inc/RWStepRepr_RWExtension.hxx
+++ b/inc/RWStepRepr_RWExtension.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWExtension  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWExtension();
diff --git a/inc/RWStepRepr_RWFunctionallyDefinedTransformation.hxx b/inc/RWStepRepr_RWFunctionallyDefinedTransformation.hxx
index 45dff8b..436ea67 100644
--- a/inc/RWStepRepr_RWFunctionallyDefinedTransformation.hxx
+++ b/inc/RWStepRepr_RWFunctionallyDefinedTransformation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepRepr_RWFunctionallyDefinedTransformation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWFunctionallyDefinedTransformation();
diff --git a/inc/RWStepRepr_RWGlobalUncertaintyAssignedContext.hxx b/inc/RWStepRepr_RWGlobalUncertaintyAssignedContext.hxx
index 695d8d0..891aa08 100644
--- a/inc/RWStepRepr_RWGlobalUncertaintyAssignedContext.hxx
+++ b/inc/RWStepRepr_RWGlobalUncertaintyAssignedContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWGlobalUncertaintyAssignedContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWGlobalUncertaintyAssignedContext();
diff --git a/inc/RWStepRepr_RWGlobalUnitAssignedContext.hxx b/inc/RWStepRepr_RWGlobalUnitAssignedContext.hxx
index 010b0f7..4944cad 100644
--- a/inc/RWStepRepr_RWGlobalUnitAssignedContext.hxx
+++ b/inc/RWStepRepr_RWGlobalUnitAssignedContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWGlobalUnitAssignedContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWGlobalUnitAssignedContext();
diff --git a/inc/RWStepRepr_RWItemDefinedTransformation.hxx b/inc/RWStepRepr_RWItemDefinedTransformation.hxx
index 6e4fe77..6f5017b 100644
--- a/inc/RWStepRepr_RWItemDefinedTransformation.hxx
+++ b/inc/RWStepRepr_RWItemDefinedTransformation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWItemDefinedTransformation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWItemDefinedTransformation();
diff --git a/inc/RWStepRepr_RWMakeFromUsageOption.hxx b/inc/RWStepRepr_RWMakeFromUsageOption.hxx
index 925dcc7..e0f097a 100644
--- a/inc/RWStepRepr_RWMakeFromUsageOption.hxx
+++ b/inc/RWStepRepr_RWMakeFromUsageOption.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWMakeFromUsageOption  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWMakeFromUsageOption();
diff --git a/inc/RWStepRepr_RWMappedItem.hxx b/inc/RWStepRepr_RWMappedItem.hxx
index 49f8e21..83afa33 100644
--- a/inc/RWStepRepr_RWMappedItem.hxx
+++ b/inc/RWStepRepr_RWMappedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWMappedItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWMappedItem();
diff --git a/inc/RWStepRepr_RWMaterialDesignation.hxx b/inc/RWStepRepr_RWMaterialDesignation.hxx
index 1c45bda..685f78c 100644
--- a/inc/RWStepRepr_RWMaterialDesignation.hxx
+++ b/inc/RWStepRepr_RWMaterialDesignation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWMaterialDesignation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWMaterialDesignation();
diff --git a/inc/RWStepRepr_RWMaterialProperty.hxx b/inc/RWStepRepr_RWMaterialProperty.hxx
index 7689cee..88415ce 100644
--- a/inc/RWStepRepr_RWMaterialProperty.hxx
+++ b/inc/RWStepRepr_RWMaterialProperty.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWMaterialProperty  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWMaterialProperty();
diff --git a/inc/RWStepRepr_RWMaterialPropertyRepresentation.hxx b/inc/RWStepRepr_RWMaterialPropertyRepresentation.hxx
index e8fd431..2350ef2 100644
--- a/inc/RWStepRepr_RWMaterialPropertyRepresentation.hxx
+++ b/inc/RWStepRepr_RWMaterialPropertyRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWMaterialPropertyRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWMaterialPropertyRepresentation();
diff --git a/inc/RWStepRepr_RWMeasureRepresentationItem.hxx b/inc/RWStepRepr_RWMeasureRepresentationItem.hxx
index 0ac1c40..7dfe562 100644
--- a/inc/RWStepRepr_RWMeasureRepresentationItem.hxx
+++ b/inc/RWStepRepr_RWMeasureRepresentationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWMeasureRepresentationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWMeasureRepresentationItem();
diff --git a/inc/RWStepRepr_RWParametricRepresentationContext.hxx b/inc/RWStepRepr_RWParametricRepresentationContext.hxx
index 9e446bb..2537223 100644
--- a/inc/RWStepRepr_RWParametricRepresentationContext.hxx
+++ b/inc/RWStepRepr_RWParametricRepresentationContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepRepr_RWParametricRepresentationContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWParametricRepresentationContext();
diff --git a/inc/RWStepRepr_RWProductConcept.hxx b/inc/RWStepRepr_RWProductConcept.hxx
index 961d6ce..4b9bf6f 100644
--- a/inc/RWStepRepr_RWProductConcept.hxx
+++ b/inc/RWStepRepr_RWProductConcept.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWProductConcept  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWProductConcept();
diff --git a/inc/RWStepRepr_RWProductDefinitionShape.hxx b/inc/RWStepRepr_RWProductDefinitionShape.hxx
index 70107e1..7334371 100644
--- a/inc/RWStepRepr_RWProductDefinitionShape.hxx
+++ b/inc/RWStepRepr_RWProductDefinitionShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWProductDefinitionShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWProductDefinitionShape();
diff --git a/inc/RWStepRepr_RWPropertyDefinition.hxx b/inc/RWStepRepr_RWPropertyDefinition.hxx
index a858bc4..75c09eb 100644
--- a/inc/RWStepRepr_RWPropertyDefinition.hxx
+++ b/inc/RWStepRepr_RWPropertyDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWPropertyDefinition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWPropertyDefinition();
diff --git a/inc/RWStepRepr_RWPropertyDefinitionRelationship.hxx b/inc/RWStepRepr_RWPropertyDefinitionRelationship.hxx
index cf05e69..5aa51ab 100644
--- a/inc/RWStepRepr_RWPropertyDefinitionRelationship.hxx
+++ b/inc/RWStepRepr_RWPropertyDefinitionRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWPropertyDefinitionRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWPropertyDefinitionRelationship();
diff --git a/inc/RWStepRepr_RWPropertyDefinitionRepresentation.hxx b/inc/RWStepRepr_RWPropertyDefinitionRepresentation.hxx
index 3eb0e71..b32ea60 100644
--- a/inc/RWStepRepr_RWPropertyDefinitionRepresentation.hxx
+++ b/inc/RWStepRepr_RWPropertyDefinitionRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWPropertyDefinitionRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWPropertyDefinitionRepresentation();
diff --git a/inc/RWStepRepr_RWQuantifiedAssemblyComponentUsage.hxx b/inc/RWStepRepr_RWQuantifiedAssemblyComponentUsage.hxx
index 78d98fb..c944004 100644
--- a/inc/RWStepRepr_RWQuantifiedAssemblyComponentUsage.hxx
+++ b/inc/RWStepRepr_RWQuantifiedAssemblyComponentUsage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWQuantifiedAssemblyComponentUsage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWQuantifiedAssemblyComponentUsage();
diff --git a/inc/RWStepRepr_RWReprItemAndLengthMeasureWithUnit.hxx b/inc/RWStepRepr_RWReprItemAndLengthMeasureWithUnit.hxx
index 50c4655..524c0b4 100644
--- a/inc/RWStepRepr_RWReprItemAndLengthMeasureWithUnit.hxx
+++ b/inc/RWStepRepr_RWReprItemAndLengthMeasureWithUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepRepr_RWReprItemAndLengthMeasureWithUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWReprItemAndLengthMeasureWithUnit();
diff --git a/inc/RWStepRepr_RWRepresentation.hxx b/inc/RWStepRepr_RWRepresentation.hxx
index 6f0da58..0ac121e 100644
--- a/inc/RWStepRepr_RWRepresentation.hxx
+++ b/inc/RWStepRepr_RWRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWRepresentation();
diff --git a/inc/RWStepRepr_RWRepresentationContext.hxx b/inc/RWStepRepr_RWRepresentationContext.hxx
index 5a51f76..d5acf4d 100644
--- a/inc/RWStepRepr_RWRepresentationContext.hxx
+++ b/inc/RWStepRepr_RWRepresentationContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepRepr_RWRepresentationContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWRepresentationContext();
diff --git a/inc/RWStepRepr_RWRepresentationItem.hxx b/inc/RWStepRepr_RWRepresentationItem.hxx
index fe72f34..9f2d529 100644
--- a/inc/RWStepRepr_RWRepresentationItem.hxx
+++ b/inc/RWStepRepr_RWRepresentationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepRepr_RWRepresentationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWRepresentationItem();
diff --git a/inc/RWStepRepr_RWRepresentationMap.hxx b/inc/RWStepRepr_RWRepresentationMap.hxx
index 88cc207..d7c9b54 100644
--- a/inc/RWStepRepr_RWRepresentationMap.hxx
+++ b/inc/RWStepRepr_RWRepresentationMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWRepresentationMap  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWRepresentationMap();
diff --git a/inc/RWStepRepr_RWRepresentationRelationship.hxx b/inc/RWStepRepr_RWRepresentationRelationship.hxx
index 7518fee..07fafb4 100644
--- a/inc/RWStepRepr_RWRepresentationRelationship.hxx
+++ b/inc/RWStepRepr_RWRepresentationRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWRepresentationRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWRepresentationRelationship();
diff --git a/inc/RWStepRepr_RWRepresentationRelationshipWithTransformation.hxx b/inc/RWStepRepr_RWRepresentationRelationshipWithTransformation.hxx
index 00024a9..fd26d28 100644
--- a/inc/RWStepRepr_RWRepresentationRelationshipWithTransformation.hxx
+++ b/inc/RWStepRepr_RWRepresentationRelationshipWithTransformation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWRepresentationRelationshipWithTransformation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWRepresentationRelationshipWithTransformation();
diff --git a/inc/RWStepRepr_RWShapeAspect.hxx b/inc/RWStepRepr_RWShapeAspect.hxx
index 34a416f..c8fd4bd 100644
--- a/inc/RWStepRepr_RWShapeAspect.hxx
+++ b/inc/RWStepRepr_RWShapeAspect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWShapeAspect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWShapeAspect();
diff --git a/inc/RWStepRepr_RWShapeAspectDerivingRelationship.hxx b/inc/RWStepRepr_RWShapeAspectDerivingRelationship.hxx
index 38493e6..d437c94 100644
--- a/inc/RWStepRepr_RWShapeAspectDerivingRelationship.hxx
+++ b/inc/RWStepRepr_RWShapeAspectDerivingRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWShapeAspectDerivingRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWShapeAspectDerivingRelationship();
diff --git a/inc/RWStepRepr_RWShapeAspectRelationship.hxx b/inc/RWStepRepr_RWShapeAspectRelationship.hxx
index 58f0c98..66bff3b 100644
--- a/inc/RWStepRepr_RWShapeAspectRelationship.hxx
+++ b/inc/RWStepRepr_RWShapeAspectRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWShapeAspectRelationship  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWShapeAspectRelationship();
diff --git a/inc/RWStepRepr_RWShapeAspectTransition.hxx b/inc/RWStepRepr_RWShapeAspectTransition.hxx
index 0c592ab..c67beac 100644
--- a/inc/RWStepRepr_RWShapeAspectTransition.hxx
+++ b/inc/RWStepRepr_RWShapeAspectTransition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWShapeAspectTransition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWShapeAspectTransition();
diff --git a/inc/RWStepRepr_RWShapeRepresentationRelationshipWithTransformation.hxx b/inc/RWStepRepr_RWShapeRepresentationRelationshipWithTransformation.hxx
index 70bdaf2..2ea3597 100644
--- a/inc/RWStepRepr_RWShapeRepresentationRelationshipWithTransformation.hxx
+++ b/inc/RWStepRepr_RWShapeRepresentationRelationshipWithTransformation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWShapeRepresentationRelationshipWithTransformation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepRepr_RWShapeRepresentationRelationshipWithTransformation();
diff --git a/inc/RWStepRepr_RWSpecifiedHigherUsageOccurrence.hxx b/inc/RWStepRepr_RWSpecifiedHigherUsageOccurrence.hxx
index f0dfa62..d0d68ae 100644
--- a/inc/RWStepRepr_RWSpecifiedHigherUsageOccurrence.hxx
+++ b/inc/RWStepRepr_RWSpecifiedHigherUsageOccurrence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWSpecifiedHigherUsageOccurrence  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWSpecifiedHigherUsageOccurrence();
diff --git a/inc/RWStepRepr_RWStructuralResponseProperty.hxx b/inc/RWStepRepr_RWStructuralResponseProperty.hxx
index 9f428f3..c829a6b 100644
--- a/inc/RWStepRepr_RWStructuralResponseProperty.hxx
+++ b/inc/RWStepRepr_RWStructuralResponseProperty.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWStructuralResponseProperty  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWStructuralResponseProperty();
diff --git a/inc/RWStepRepr_RWStructuralResponsePropertyDefinitionRepresentation.hxx b/inc/RWStepRepr_RWStructuralResponsePropertyDefinitionRepresentation.hxx
index 869e584..9b7ae38 100644
--- a/inc/RWStepRepr_RWStructuralResponsePropertyDefinitionRepresentation.hxx
+++ b/inc/RWStepRepr_RWStructuralResponsePropertyDefinitionRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepRepr_RWStructuralResponsePropertyDefinitionRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepRepr_RWStructuralResponsePropertyDefinitionRepresentation();
diff --git a/inc/RWStepShape_RWAdvancedBrepShapeRepresentation.hxx b/inc/RWStepShape_RWAdvancedBrepShapeRepresentation.hxx
index b559fc1..4966079 100644
--- a/inc/RWStepShape_RWAdvancedBrepShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWAdvancedBrepShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWAdvancedBrepShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWAdvancedBrepShapeRepresentation();
diff --git a/inc/RWStepShape_RWAdvancedFace.hxx b/inc/RWStepShape_RWAdvancedFace.hxx
index a3bb528..95d5633 100644
--- a/inc/RWStepShape_RWAdvancedFace.hxx
+++ b/inc/RWStepShape_RWAdvancedFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWAdvancedFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWAdvancedFace();
diff --git a/inc/RWStepShape_RWAngularLocation.hxx b/inc/RWStepShape_RWAngularLocation.hxx
index b5c8a1d..fcb314e 100644
--- a/inc/RWStepShape_RWAngularLocation.hxx
+++ b/inc/RWStepShape_RWAngularLocation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWAngularLocation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWAngularLocation();
diff --git a/inc/RWStepShape_RWAngularSize.hxx b/inc/RWStepShape_RWAngularSize.hxx
index dbb6a54..0d2121f 100644
--- a/inc/RWStepShape_RWAngularSize.hxx
+++ b/inc/RWStepShape_RWAngularSize.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWAngularSize  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWAngularSize();
diff --git a/inc/RWStepShape_RWBlock.hxx b/inc/RWStepShape_RWBlock.hxx
index c562f36..06959be 100644
--- a/inc/RWStepShape_RWBlock.hxx
+++ b/inc/RWStepShape_RWBlock.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWBlock  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWBlock();
diff --git a/inc/RWStepShape_RWBooleanResult.hxx b/inc/RWStepShape_RWBooleanResult.hxx
index 8e5a8ed..ec47454 100644
--- a/inc/RWStepShape_RWBooleanResult.hxx
+++ b/inc/RWStepShape_RWBooleanResult.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWBooleanResult  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWBooleanResult();
diff --git a/inc/RWStepShape_RWBoxDomain.hxx b/inc/RWStepShape_RWBoxDomain.hxx
index e143ee5..ce41852 100644
--- a/inc/RWStepShape_RWBoxDomain.hxx
+++ b/inc/RWStepShape_RWBoxDomain.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWBoxDomain  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWBoxDomain();
diff --git a/inc/RWStepShape_RWBoxedHalfSpace.hxx b/inc/RWStepShape_RWBoxedHalfSpace.hxx
index 5d70209..851f204 100644
--- a/inc/RWStepShape_RWBoxedHalfSpace.hxx
+++ b/inc/RWStepShape_RWBoxedHalfSpace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWBoxedHalfSpace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWBoxedHalfSpace();
diff --git a/inc/RWStepShape_RWBrepWithVoids.hxx b/inc/RWStepShape_RWBrepWithVoids.hxx
index 4bf1d66..0c01f78 100644
--- a/inc/RWStepShape_RWBrepWithVoids.hxx
+++ b/inc/RWStepShape_RWBrepWithVoids.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Interface_ShareTool;
 class RWStepShape_RWBrepWithVoids  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWBrepWithVoids();
diff --git a/inc/RWStepShape_RWClosedShell.hxx b/inc/RWStepShape_RWClosedShell.hxx
index f701e6e..dd46560 100644
--- a/inc/RWStepShape_RWClosedShell.hxx
+++ b/inc/RWStepShape_RWClosedShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWClosedShell  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWClosedShell();
diff --git a/inc/RWStepShape_RWCompoundShapeRepresentation.hxx b/inc/RWStepShape_RWCompoundShapeRepresentation.hxx
index 5a14751..2c6fb51 100644
--- a/inc/RWStepShape_RWCompoundShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWCompoundShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWCompoundShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWCompoundShapeRepresentation();
diff --git a/inc/RWStepShape_RWConnectedEdgeSet.hxx b/inc/RWStepShape_RWConnectedEdgeSet.hxx
index 08b6245..6c50fe8 100644
--- a/inc/RWStepShape_RWConnectedEdgeSet.hxx
+++ b/inc/RWStepShape_RWConnectedEdgeSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWConnectedEdgeSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWConnectedEdgeSet();
diff --git a/inc/RWStepShape_RWConnectedFaceSet.hxx b/inc/RWStepShape_RWConnectedFaceSet.hxx
index 0bda484..d1d49cc 100644
--- a/inc/RWStepShape_RWConnectedFaceSet.hxx
+++ b/inc/RWStepShape_RWConnectedFaceSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWConnectedFaceSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWConnectedFaceSet();
diff --git a/inc/RWStepShape_RWConnectedFaceShapeRepresentation.hxx b/inc/RWStepShape_RWConnectedFaceShapeRepresentation.hxx
index dcb36c1..6337277 100644
--- a/inc/RWStepShape_RWConnectedFaceShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWConnectedFaceShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWConnectedFaceShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWConnectedFaceShapeRepresentation();
diff --git a/inc/RWStepShape_RWConnectedFaceSubSet.hxx b/inc/RWStepShape_RWConnectedFaceSubSet.hxx
index 43c732f..a226e60 100644
--- a/inc/RWStepShape_RWConnectedFaceSubSet.hxx
+++ b/inc/RWStepShape_RWConnectedFaceSubSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWConnectedFaceSubSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWConnectedFaceSubSet();
diff --git a/inc/RWStepShape_RWContextDependentShapeRepresentation.hxx b/inc/RWStepShape_RWContextDependentShapeRepresentation.hxx
index c753af5..6b31806 100644
--- a/inc/RWStepShape_RWContextDependentShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWContextDependentShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWContextDependentShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWContextDependentShapeRepresentation();
diff --git a/inc/RWStepShape_RWCsgShapeRepresentation.hxx b/inc/RWStepShape_RWCsgShapeRepresentation.hxx
index 23d77ff..2f734f4 100644
--- a/inc/RWStepShape_RWCsgShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWCsgShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWCsgShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWCsgShapeRepresentation();
diff --git a/inc/RWStepShape_RWCsgSolid.hxx b/inc/RWStepShape_RWCsgSolid.hxx
index 1c5e6e0..68420e3 100644
--- a/inc/RWStepShape_RWCsgSolid.hxx
+++ b/inc/RWStepShape_RWCsgSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWCsgSolid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWCsgSolid();
diff --git a/inc/RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation.hxx b/inc/RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation.hxx
index 4d378b3..1b30abc 100644
--- a/inc/RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation();
diff --git a/inc/RWStepShape_RWDimensionalCharacteristicRepresentation.hxx b/inc/RWStepShape_RWDimensionalCharacteristicRepresentation.hxx
index 60b1ec9..c883eed 100644
--- a/inc/RWStepShape_RWDimensionalCharacteristicRepresentation.hxx
+++ b/inc/RWStepShape_RWDimensionalCharacteristicRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWDimensionalCharacteristicRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWDimensionalCharacteristicRepresentation();
diff --git a/inc/RWStepShape_RWDimensionalLocation.hxx b/inc/RWStepShape_RWDimensionalLocation.hxx
index ee79437..41a41c2 100644
--- a/inc/RWStepShape_RWDimensionalLocation.hxx
+++ b/inc/RWStepShape_RWDimensionalLocation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWDimensionalLocation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWDimensionalLocation();
diff --git a/inc/RWStepShape_RWDimensionalLocationWithPath.hxx b/inc/RWStepShape_RWDimensionalLocationWithPath.hxx
index 9d4f2ef..db13049 100644
--- a/inc/RWStepShape_RWDimensionalLocationWithPath.hxx
+++ b/inc/RWStepShape_RWDimensionalLocationWithPath.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWDimensionalLocationWithPath  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWDimensionalLocationWithPath();
diff --git a/inc/RWStepShape_RWDimensionalSize.hxx b/inc/RWStepShape_RWDimensionalSize.hxx
index 2fd127b..81757af 100644
--- a/inc/RWStepShape_RWDimensionalSize.hxx
+++ b/inc/RWStepShape_RWDimensionalSize.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWDimensionalSize  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWDimensionalSize();
diff --git a/inc/RWStepShape_RWDimensionalSizeWithPath.hxx b/inc/RWStepShape_RWDimensionalSizeWithPath.hxx
index 398f030..1b10fb5 100644
--- a/inc/RWStepShape_RWDimensionalSizeWithPath.hxx
+++ b/inc/RWStepShape_RWDimensionalSizeWithPath.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWDimensionalSizeWithPath  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWDimensionalSizeWithPath();
diff --git a/inc/RWStepShape_RWEdge.hxx b/inc/RWStepShape_RWEdge.hxx
index 9d1ad58..cf667db 100644
--- a/inc/RWStepShape_RWEdge.hxx
+++ b/inc/RWStepShape_RWEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWEdge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWEdge();
diff --git a/inc/RWStepShape_RWEdgeBasedWireframeModel.hxx b/inc/RWStepShape_RWEdgeBasedWireframeModel.hxx
index 9949c00..240ac19 100644
--- a/inc/RWStepShape_RWEdgeBasedWireframeModel.hxx
+++ b/inc/RWStepShape_RWEdgeBasedWireframeModel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWEdgeBasedWireframeModel  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWEdgeBasedWireframeModel();
diff --git a/inc/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.hxx b/inc/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.hxx
index 99ac11b..3498ea1 100644
--- a/inc/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWEdgeBasedWireframeShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWEdgeBasedWireframeShapeRepresentation();
diff --git a/inc/RWStepShape_RWEdgeCurve.hxx b/inc/RWStepShape_RWEdgeCurve.hxx
index 7fbe827..f108ce7 100644
--- a/inc/RWStepShape_RWEdgeCurve.hxx
+++ b/inc/RWStepShape_RWEdgeCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_ShareTool;
 class RWStepShape_RWEdgeCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWEdgeCurve();
diff --git a/inc/RWStepShape_RWEdgeLoop.hxx b/inc/RWStepShape_RWEdgeLoop.hxx
index 38c7f08..57b799f 100644
--- a/inc/RWStepShape_RWEdgeLoop.hxx
+++ b/inc/RWStepShape_RWEdgeLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_ShareTool;
 class RWStepShape_RWEdgeLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWEdgeLoop();
diff --git a/inc/RWStepShape_RWExtrudedAreaSolid.hxx b/inc/RWStepShape_RWExtrudedAreaSolid.hxx
index 7f1d9b3..985980f 100644
--- a/inc/RWStepShape_RWExtrudedAreaSolid.hxx
+++ b/inc/RWStepShape_RWExtrudedAreaSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWExtrudedAreaSolid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWExtrudedAreaSolid();
diff --git a/inc/RWStepShape_RWExtrudedFaceSolid.hxx b/inc/RWStepShape_RWExtrudedFaceSolid.hxx
index 3c91fbe..fd13247 100644
--- a/inc/RWStepShape_RWExtrudedFaceSolid.hxx
+++ b/inc/RWStepShape_RWExtrudedFaceSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWExtrudedFaceSolid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWExtrudedFaceSolid();
diff --git a/inc/RWStepShape_RWFace.hxx b/inc/RWStepShape_RWFace.hxx
index a8b3385..c789ed6 100644
--- a/inc/RWStepShape_RWFace.hxx
+++ b/inc/RWStepShape_RWFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWFace();
diff --git a/inc/RWStepShape_RWFaceBasedSurfaceModel.hxx b/inc/RWStepShape_RWFaceBasedSurfaceModel.hxx
index 2a5d274..b9671b6 100644
--- a/inc/RWStepShape_RWFaceBasedSurfaceModel.hxx
+++ b/inc/RWStepShape_RWFaceBasedSurfaceModel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWFaceBasedSurfaceModel  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWFaceBasedSurfaceModel();
diff --git a/inc/RWStepShape_RWFaceBound.hxx b/inc/RWStepShape_RWFaceBound.hxx
index e3b2be3..522bf18 100644
--- a/inc/RWStepShape_RWFaceBound.hxx
+++ b/inc/RWStepShape_RWFaceBound.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Interface_ShareTool;
 class RWStepShape_RWFaceBound  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWFaceBound();
diff --git a/inc/RWStepShape_RWFaceOuterBound.hxx b/inc/RWStepShape_RWFaceOuterBound.hxx
index 9021fa7..ea31846 100644
--- a/inc/RWStepShape_RWFaceOuterBound.hxx
+++ b/inc/RWStepShape_RWFaceOuterBound.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWFaceOuterBound  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWFaceOuterBound();
diff --git a/inc/RWStepShape_RWFaceSurface.hxx b/inc/RWStepShape_RWFaceSurface.hxx
index 1c3492a..1756a8c 100644
--- a/inc/RWStepShape_RWFaceSurface.hxx
+++ b/inc/RWStepShape_RWFaceSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWFaceSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWFaceSurface();
diff --git a/inc/RWStepShape_RWFacetedBrep.hxx b/inc/RWStepShape_RWFacetedBrep.hxx
index 221f91c..53be464 100644
--- a/inc/RWStepShape_RWFacetedBrep.hxx
+++ b/inc/RWStepShape_RWFacetedBrep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWFacetedBrep  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWFacetedBrep();
diff --git a/inc/RWStepShape_RWFacetedBrepAndBrepWithVoids.hxx b/inc/RWStepShape_RWFacetedBrepAndBrepWithVoids.hxx
index 1c75ff7..9f5f0cd 100644
--- a/inc/RWStepShape_RWFacetedBrepAndBrepWithVoids.hxx
+++ b/inc/RWStepShape_RWFacetedBrepAndBrepWithVoids.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWFacetedBrepAndBrepWithVoids  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWFacetedBrepAndBrepWithVoids();
diff --git a/inc/RWStepShape_RWFacetedBrepShapeRepresentation.hxx b/inc/RWStepShape_RWFacetedBrepShapeRepresentation.hxx
index 72baf17..c357e46 100644
--- a/inc/RWStepShape_RWFacetedBrepShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWFacetedBrepShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWFacetedBrepShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWFacetedBrepShapeRepresentation();
diff --git a/inc/RWStepShape_RWGeometricCurveSet.hxx b/inc/RWStepShape_RWGeometricCurveSet.hxx
index 2da1f47..6d1cd46 100644
--- a/inc/RWStepShape_RWGeometricCurveSet.hxx
+++ b/inc/RWStepShape_RWGeometricCurveSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWGeometricCurveSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWGeometricCurveSet();
diff --git a/inc/RWStepShape_RWGeometricSet.hxx b/inc/RWStepShape_RWGeometricSet.hxx
index 665ba0c..fea82b7 100644
--- a/inc/RWStepShape_RWGeometricSet.hxx
+++ b/inc/RWStepShape_RWGeometricSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWGeometricSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWGeometricSet();
diff --git a/inc/RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation.hxx b/inc/RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation.hxx
index 6b5d3ad..9a7b781 100644
--- a/inc/RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation();
diff --git a/inc/RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.hxx b/inc/RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.hxx
index bda929d..d5ceb18 100644
--- a/inc/RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation();
diff --git a/inc/RWStepShape_RWHalfSpaceSolid.hxx b/inc/RWStepShape_RWHalfSpaceSolid.hxx
index 6173e5a..04598a1 100644
--- a/inc/RWStepShape_RWHalfSpaceSolid.hxx
+++ b/inc/RWStepShape_RWHalfSpaceSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWHalfSpaceSolid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWHalfSpaceSolid();
diff --git a/inc/RWStepShape_RWLimitsAndFits.hxx b/inc/RWStepShape_RWLimitsAndFits.hxx
index 993d2d1..6227825 100644
--- a/inc/RWStepShape_RWLimitsAndFits.hxx
+++ b/inc/RWStepShape_RWLimitsAndFits.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepShape_RWLimitsAndFits  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWLimitsAndFits();
diff --git a/inc/RWStepShape_RWLoop.hxx b/inc/RWStepShape_RWLoop.hxx
index 349cbb1..fc405a8 100644
--- a/inc/RWStepShape_RWLoop.hxx
+++ b/inc/RWStepShape_RWLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepShape_RWLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWLoop();
diff --git a/inc/RWStepShape_RWLoopAndPath.hxx b/inc/RWStepShape_RWLoopAndPath.hxx
index 68fe118..12d1c16 100644
--- a/inc/RWStepShape_RWLoopAndPath.hxx
+++ b/inc/RWStepShape_RWLoopAndPath.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWLoopAndPath  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWLoopAndPath();
diff --git a/inc/RWStepShape_RWManifoldSolidBrep.hxx b/inc/RWStepShape_RWManifoldSolidBrep.hxx
index f873b35..d08625e 100644
--- a/inc/RWStepShape_RWManifoldSolidBrep.hxx
+++ b/inc/RWStepShape_RWManifoldSolidBrep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWManifoldSolidBrep  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWManifoldSolidBrep();
diff --git a/inc/RWStepShape_RWManifoldSurfaceShapeRepresentation.hxx b/inc/RWStepShape_RWManifoldSurfaceShapeRepresentation.hxx
index c769847..1a50a7a 100644
--- a/inc/RWStepShape_RWManifoldSurfaceShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWManifoldSurfaceShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWManifoldSurfaceShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWManifoldSurfaceShapeRepresentation();
diff --git a/inc/RWStepShape_RWMeasureQualification.hxx b/inc/RWStepShape_RWMeasureQualification.hxx
index 5afce11..726c3fe 100644
--- a/inc/RWStepShape_RWMeasureQualification.hxx
+++ b/inc/RWStepShape_RWMeasureQualification.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWMeasureQualification  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWMeasureQualification();
diff --git a/inc/RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem.hxx b/inc/RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem.hxx
index c9f04d0..c8ee23d 100644
--- a/inc/RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem.hxx
+++ b/inc/RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem();
diff --git a/inc/RWStepShape_RWNonManifoldSurfaceShapeRepresentation.hxx b/inc/RWStepShape_RWNonManifoldSurfaceShapeRepresentation.hxx
index bd904d5..31d9fb8 100644
--- a/inc/RWStepShape_RWNonManifoldSurfaceShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWNonManifoldSurfaceShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWNonManifoldSurfaceShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWNonManifoldSurfaceShapeRepresentation();
diff --git a/inc/RWStepShape_RWOpenShell.hxx b/inc/RWStepShape_RWOpenShell.hxx
index 78c2a59..1a4dc8d 100644
--- a/inc/RWStepShape_RWOpenShell.hxx
+++ b/inc/RWStepShape_RWOpenShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWOpenShell  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWOpenShell();
diff --git a/inc/RWStepShape_RWOrientedClosedShell.hxx b/inc/RWStepShape_RWOrientedClosedShell.hxx
index 277dc3a..65ed836 100644
--- a/inc/RWStepShape_RWOrientedClosedShell.hxx
+++ b/inc/RWStepShape_RWOrientedClosedShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWOrientedClosedShell  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWOrientedClosedShell();
diff --git a/inc/RWStepShape_RWOrientedEdge.hxx b/inc/RWStepShape_RWOrientedEdge.hxx
index afb0684..a53137e 100644
--- a/inc/RWStepShape_RWOrientedEdge.hxx
+++ b/inc/RWStepShape_RWOrientedEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWOrientedEdge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWOrientedEdge();
diff --git a/inc/RWStepShape_RWOrientedFace.hxx b/inc/RWStepShape_RWOrientedFace.hxx
index 048e328..07b1ba5 100644
--- a/inc/RWStepShape_RWOrientedFace.hxx
+++ b/inc/RWStepShape_RWOrientedFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWOrientedFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWOrientedFace();
diff --git a/inc/RWStepShape_RWOrientedOpenShell.hxx b/inc/RWStepShape_RWOrientedOpenShell.hxx
index 2c59693..6224ea5 100644
--- a/inc/RWStepShape_RWOrientedOpenShell.hxx
+++ b/inc/RWStepShape_RWOrientedOpenShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWOrientedOpenShell  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWOrientedOpenShell();
diff --git a/inc/RWStepShape_RWOrientedPath.hxx b/inc/RWStepShape_RWOrientedPath.hxx
index d10cb04..8611dff 100644
--- a/inc/RWStepShape_RWOrientedPath.hxx
+++ b/inc/RWStepShape_RWOrientedPath.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWOrientedPath  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWOrientedPath();
diff --git a/inc/RWStepShape_RWPath.hxx b/inc/RWStepShape_RWPath.hxx
index 46cf7d5..70bf80a 100644
--- a/inc/RWStepShape_RWPath.hxx
+++ b/inc/RWStepShape_RWPath.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWPath  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWPath();
diff --git a/inc/RWStepShape_RWPlusMinusTolerance.hxx b/inc/RWStepShape_RWPlusMinusTolerance.hxx
index 2c585b3..051b53d 100644
--- a/inc/RWStepShape_RWPlusMinusTolerance.hxx
+++ b/inc/RWStepShape_RWPlusMinusTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWPlusMinusTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWPlusMinusTolerance();
diff --git a/inc/RWStepShape_RWPointRepresentation.hxx b/inc/RWStepShape_RWPointRepresentation.hxx
index ed87d24..3eaf7f1 100644
--- a/inc/RWStepShape_RWPointRepresentation.hxx
+++ b/inc/RWStepShape_RWPointRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWPointRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWPointRepresentation();
diff --git a/inc/RWStepShape_RWPolyLoop.hxx b/inc/RWStepShape_RWPolyLoop.hxx
index e870856..6550fa4 100644
--- a/inc/RWStepShape_RWPolyLoop.hxx
+++ b/inc/RWStepShape_RWPolyLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWPolyLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWPolyLoop();
diff --git a/inc/RWStepShape_RWPrecisionQualifier.hxx b/inc/RWStepShape_RWPrecisionQualifier.hxx
index 579ce07..4812f99 100644
--- a/inc/RWStepShape_RWPrecisionQualifier.hxx
+++ b/inc/RWStepShape_RWPrecisionQualifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepShape_RWPrecisionQualifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWPrecisionQualifier();
diff --git a/inc/RWStepShape_RWQualifiedRepresentationItem.hxx b/inc/RWStepShape_RWQualifiedRepresentationItem.hxx
index e2596cc..899667e 100644
--- a/inc/RWStepShape_RWQualifiedRepresentationItem.hxx
+++ b/inc/RWStepShape_RWQualifiedRepresentationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWQualifiedRepresentationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWQualifiedRepresentationItem();
diff --git a/inc/RWStepShape_RWRevolvedAreaSolid.hxx b/inc/RWStepShape_RWRevolvedAreaSolid.hxx
index 3f7b25c..178a81d 100644
--- a/inc/RWStepShape_RWRevolvedAreaSolid.hxx
+++ b/inc/RWStepShape_RWRevolvedAreaSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWRevolvedAreaSolid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWRevolvedAreaSolid();
diff --git a/inc/RWStepShape_RWRevolvedFaceSolid.hxx b/inc/RWStepShape_RWRevolvedFaceSolid.hxx
index 6cb112c..4a1a235 100644
--- a/inc/RWStepShape_RWRevolvedFaceSolid.hxx
+++ b/inc/RWStepShape_RWRevolvedFaceSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWRevolvedFaceSolid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWRevolvedFaceSolid();
diff --git a/inc/RWStepShape_RWRightAngularWedge.hxx b/inc/RWStepShape_RWRightAngularWedge.hxx
index f0a671a..848ba19 100644
--- a/inc/RWStepShape_RWRightAngularWedge.hxx
+++ b/inc/RWStepShape_RWRightAngularWedge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWRightAngularWedge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWRightAngularWedge();
diff --git a/inc/RWStepShape_RWRightCircularCone.hxx b/inc/RWStepShape_RWRightCircularCone.hxx
index 0894529..247e63f 100644
--- a/inc/RWStepShape_RWRightCircularCone.hxx
+++ b/inc/RWStepShape_RWRightCircularCone.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWRightCircularCone  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWRightCircularCone();
diff --git a/inc/RWStepShape_RWRightCircularCylinder.hxx b/inc/RWStepShape_RWRightCircularCylinder.hxx
index b8b79e9..4184575 100644
--- a/inc/RWStepShape_RWRightCircularCylinder.hxx
+++ b/inc/RWStepShape_RWRightCircularCylinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWRightCircularCylinder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWRightCircularCylinder();
diff --git a/inc/RWStepShape_RWSeamEdge.hxx b/inc/RWStepShape_RWSeamEdge.hxx
index 80fadb9..b7befc6 100644
--- a/inc/RWStepShape_RWSeamEdge.hxx
+++ b/inc/RWStepShape_RWSeamEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWSeamEdge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWSeamEdge();
diff --git a/inc/RWStepShape_RWShapeDefinitionRepresentation.hxx b/inc/RWStepShape_RWShapeDefinitionRepresentation.hxx
index 9fd066a..6e3b512 100644
--- a/inc/RWStepShape_RWShapeDefinitionRepresentation.hxx
+++ b/inc/RWStepShape_RWShapeDefinitionRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWShapeDefinitionRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWShapeDefinitionRepresentation();
diff --git a/inc/RWStepShape_RWShapeDimensionRepresentation.hxx b/inc/RWStepShape_RWShapeDimensionRepresentation.hxx
index fc2cd05..ef4f380 100644
--- a/inc/RWStepShape_RWShapeDimensionRepresentation.hxx
+++ b/inc/RWStepShape_RWShapeDimensionRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWShapeDimensionRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWShapeDimensionRepresentation();
diff --git a/inc/RWStepShape_RWShapeRepresentation.hxx b/inc/RWStepShape_RWShapeRepresentation.hxx
index 635fb78..6dd0c8c 100644
--- a/inc/RWStepShape_RWShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWShapeRepresentation();
diff --git a/inc/RWStepShape_RWShapeRepresentationWithParameters.hxx b/inc/RWStepShape_RWShapeRepresentationWithParameters.hxx
index a5317ea..798ec31 100644
--- a/inc/RWStepShape_RWShapeRepresentationWithParameters.hxx
+++ b/inc/RWStepShape_RWShapeRepresentationWithParameters.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWShapeRepresentationWithParameters  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWShapeRepresentationWithParameters();
diff --git a/inc/RWStepShape_RWShellBasedSurfaceModel.hxx b/inc/RWStepShape_RWShellBasedSurfaceModel.hxx
index 0ac6287..770c2c6 100644
--- a/inc/RWStepShape_RWShellBasedSurfaceModel.hxx
+++ b/inc/RWStepShape_RWShellBasedSurfaceModel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWShellBasedSurfaceModel  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWShellBasedSurfaceModel();
diff --git a/inc/RWStepShape_RWSolidModel.hxx b/inc/RWStepShape_RWSolidModel.hxx
index f028d60..2579e20 100644
--- a/inc/RWStepShape_RWSolidModel.hxx
+++ b/inc/RWStepShape_RWSolidModel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepShape_RWSolidModel  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWSolidModel();
diff --git a/inc/RWStepShape_RWSolidReplica.hxx b/inc/RWStepShape_RWSolidReplica.hxx
index 3e38071..92d53bc 100644
--- a/inc/RWStepShape_RWSolidReplica.hxx
+++ b/inc/RWStepShape_RWSolidReplica.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWSolidReplica  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWSolidReplica();
diff --git a/inc/RWStepShape_RWSphere.hxx b/inc/RWStepShape_RWSphere.hxx
index 91fdb68..eb795ab 100644
--- a/inc/RWStepShape_RWSphere.hxx
+++ b/inc/RWStepShape_RWSphere.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWSphere  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWSphere();
diff --git a/inc/RWStepShape_RWSubedge.hxx b/inc/RWStepShape_RWSubedge.hxx
index 68f51d4..420c97e 100644
--- a/inc/RWStepShape_RWSubedge.hxx
+++ b/inc/RWStepShape_RWSubedge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWSubedge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWSubedge();
diff --git a/inc/RWStepShape_RWSubface.hxx b/inc/RWStepShape_RWSubface.hxx
index 6490b63..7a81b9b 100644
--- a/inc/RWStepShape_RWSubface.hxx
+++ b/inc/RWStepShape_RWSubface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWSubface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepShape_RWSubface();
diff --git a/inc/RWStepShape_RWSweptAreaSolid.hxx b/inc/RWStepShape_RWSweptAreaSolid.hxx
index a565253..4b5e506 100644
--- a/inc/RWStepShape_RWSweptAreaSolid.hxx
+++ b/inc/RWStepShape_RWSweptAreaSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWSweptAreaSolid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWSweptAreaSolid();
diff --git a/inc/RWStepShape_RWSweptFaceSolid.hxx b/inc/RWStepShape_RWSweptFaceSolid.hxx
index fc9b46f..f09410d 100644
--- a/inc/RWStepShape_RWSweptFaceSolid.hxx
+++ b/inc/RWStepShape_RWSweptFaceSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWSweptFaceSolid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWSweptFaceSolid();
diff --git a/inc/RWStepShape_RWToleranceValue.hxx b/inc/RWStepShape_RWToleranceValue.hxx
index d017d05..5b19377 100644
--- a/inc/RWStepShape_RWToleranceValue.hxx
+++ b/inc/RWStepShape_RWToleranceValue.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWToleranceValue  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWToleranceValue();
diff --git a/inc/RWStepShape_RWTopologicalRepresentationItem.hxx b/inc/RWStepShape_RWTopologicalRepresentationItem.hxx
index 6f85f3f..5b88e0d 100644
--- a/inc/RWStepShape_RWTopologicalRepresentationItem.hxx
+++ b/inc/RWStepShape_RWTopologicalRepresentationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepShape_RWTopologicalRepresentationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWTopologicalRepresentationItem();
diff --git a/inc/RWStepShape_RWTorus.hxx b/inc/RWStepShape_RWTorus.hxx
index 406dd8c..4c59cef 100644
--- a/inc/RWStepShape_RWTorus.hxx
+++ b/inc/RWStepShape_RWTorus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWTorus  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWTorus();
diff --git a/inc/RWStepShape_RWTransitionalShapeRepresentation.hxx b/inc/RWStepShape_RWTransitionalShapeRepresentation.hxx
index e8a73b5..d45a9f5 100644
--- a/inc/RWStepShape_RWTransitionalShapeRepresentation.hxx
+++ b/inc/RWStepShape_RWTransitionalShapeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWTransitionalShapeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWTransitionalShapeRepresentation();
diff --git a/inc/RWStepShape_RWTypeQualifier.hxx b/inc/RWStepShape_RWTypeQualifier.hxx
index bffc829..6d1fc55 100644
--- a/inc/RWStepShape_RWTypeQualifier.hxx
+++ b/inc/RWStepShape_RWTypeQualifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepShape_RWTypeQualifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWTypeQualifier();
diff --git a/inc/RWStepShape_RWVertex.hxx b/inc/RWStepShape_RWVertex.hxx
index 74883f2..4efec82 100644
--- a/inc/RWStepShape_RWVertex.hxx
+++ b/inc/RWStepShape_RWVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepShape_RWVertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWVertex();
diff --git a/inc/RWStepShape_RWVertexLoop.hxx b/inc/RWStepShape_RWVertexLoop.hxx
index b4f7a25..14de197 100644
--- a/inc/RWStepShape_RWVertexLoop.hxx
+++ b/inc/RWStepShape_RWVertexLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWVertexLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWVertexLoop();
diff --git a/inc/RWStepShape_RWVertexPoint.hxx b/inc/RWStepShape_RWVertexPoint.hxx
index fddcaeb..837c114 100644
--- a/inc/RWStepShape_RWVertexPoint.hxx
+++ b/inc/RWStepShape_RWVertexPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepShape_RWVertexPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepShape_RWVertexPoint();
diff --git a/inc/RWStepVisual_RWAreaInSet.hxx b/inc/RWStepVisual_RWAreaInSet.hxx
index facde87..fff671d 100644
--- a/inc/RWStepVisual_RWAreaInSet.hxx
+++ b/inc/RWStepVisual_RWAreaInSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWAreaInSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWAreaInSet();
diff --git a/inc/RWStepVisual_RWBackgroundColour.hxx b/inc/RWStepVisual_RWBackgroundColour.hxx
index 1d03534..f29e6f0 100644
--- a/inc/RWStepVisual_RWBackgroundColour.hxx
+++ b/inc/RWStepVisual_RWBackgroundColour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWBackgroundColour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWBackgroundColour();
diff --git a/inc/RWStepVisual_RWCameraImage.hxx b/inc/RWStepVisual_RWCameraImage.hxx
index 19edcc8..602e14d 100644
--- a/inc/RWStepVisual_RWCameraImage.hxx
+++ b/inc/RWStepVisual_RWCameraImage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWCameraImage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWCameraImage();
diff --git a/inc/RWStepVisual_RWCameraModel.hxx b/inc/RWStepVisual_RWCameraModel.hxx
index 432d9a1..8b90c0f 100644
--- a/inc/RWStepVisual_RWCameraModel.hxx
+++ b/inc/RWStepVisual_RWCameraModel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepVisual_RWCameraModel  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWCameraModel();
diff --git a/inc/RWStepVisual_RWCameraModelD2.hxx b/inc/RWStepVisual_RWCameraModelD2.hxx
index cbe69cf..cddbb27 100644
--- a/inc/RWStepVisual_RWCameraModelD2.hxx
+++ b/inc/RWStepVisual_RWCameraModelD2.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWCameraModelD2  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWCameraModelD2();
diff --git a/inc/RWStepVisual_RWCameraModelD3.hxx b/inc/RWStepVisual_RWCameraModelD3.hxx
index 0d96991..efb3fe3 100644
--- a/inc/RWStepVisual_RWCameraModelD3.hxx
+++ b/inc/RWStepVisual_RWCameraModelD3.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWCameraModelD3  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWCameraModelD3();
diff --git a/inc/RWStepVisual_RWCameraUsage.hxx b/inc/RWStepVisual_RWCameraUsage.hxx
index 164c8bc..4f5868d 100644
--- a/inc/RWStepVisual_RWCameraUsage.hxx
+++ b/inc/RWStepVisual_RWCameraUsage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWCameraUsage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWCameraUsage();
diff --git a/inc/RWStepVisual_RWColour.hxx b/inc/RWStepVisual_RWColour.hxx
index ea296b5..c8c5838 100644
--- a/inc/RWStepVisual_RWColour.hxx
+++ b/inc/RWStepVisual_RWColour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepVisual_RWColour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWColour();
diff --git a/inc/RWStepVisual_RWColourRgb.hxx b/inc/RWStepVisual_RWColourRgb.hxx
index b70c1f1..f58c17b 100644
--- a/inc/RWStepVisual_RWColourRgb.hxx
+++ b/inc/RWStepVisual_RWColourRgb.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepVisual_RWColourRgb  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWColourRgb();
diff --git a/inc/RWStepVisual_RWColourSpecification.hxx b/inc/RWStepVisual_RWColourSpecification.hxx
index 7b9cfb4..e2c1a48 100644
--- a/inc/RWStepVisual_RWColourSpecification.hxx
+++ b/inc/RWStepVisual_RWColourSpecification.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepVisual_RWColourSpecification  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWColourSpecification();
diff --git a/inc/RWStepVisual_RWCompositeText.hxx b/inc/RWStepVisual_RWCompositeText.hxx
index d08b8cf..a3821bc 100644
--- a/inc/RWStepVisual_RWCompositeText.hxx
+++ b/inc/RWStepVisual_RWCompositeText.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWCompositeText  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWCompositeText();
diff --git a/inc/RWStepVisual_RWCompositeTextWithExtent.hxx b/inc/RWStepVisual_RWCompositeTextWithExtent.hxx
index d79e003..113c923 100644
--- a/inc/RWStepVisual_RWCompositeTextWithExtent.hxx
+++ b/inc/RWStepVisual_RWCompositeTextWithExtent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWCompositeTextWithExtent  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWCompositeTextWithExtent();
diff --git a/inc/RWStepVisual_RWContextDependentInvisibility.hxx b/inc/RWStepVisual_RWContextDependentInvisibility.hxx
index 063b0d2..9b4f309 100644
--- a/inc/RWStepVisual_RWContextDependentInvisibility.hxx
+++ b/inc/RWStepVisual_RWContextDependentInvisibility.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWContextDependentInvisibility  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWContextDependentInvisibility();
diff --git a/inc/RWStepVisual_RWContextDependentOverRidingStyledItem.hxx b/inc/RWStepVisual_RWContextDependentOverRidingStyledItem.hxx
index 1715113..6a1897d 100644
--- a/inc/RWStepVisual_RWContextDependentOverRidingStyledItem.hxx
+++ b/inc/RWStepVisual_RWContextDependentOverRidingStyledItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWContextDependentOverRidingStyledItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWContextDependentOverRidingStyledItem();
diff --git a/inc/RWStepVisual_RWCurveStyle.hxx b/inc/RWStepVisual_RWCurveStyle.hxx
index f6b9d7d..1b667ba 100644
--- a/inc/RWStepVisual_RWCurveStyle.hxx
+++ b/inc/RWStepVisual_RWCurveStyle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWCurveStyle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWCurveStyle();
diff --git a/inc/RWStepVisual_RWCurveStyleFont.hxx b/inc/RWStepVisual_RWCurveStyleFont.hxx
index 769ff88..32f0d9f 100644
--- a/inc/RWStepVisual_RWCurveStyleFont.hxx
+++ b/inc/RWStepVisual_RWCurveStyleFont.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWCurveStyleFont  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWCurveStyleFont();
diff --git a/inc/RWStepVisual_RWCurveStyleFontPattern.hxx b/inc/RWStepVisual_RWCurveStyleFontPattern.hxx
index 338f007..85391c3 100644
--- a/inc/RWStepVisual_RWCurveStyleFontPattern.hxx
+++ b/inc/RWStepVisual_RWCurveStyleFontPattern.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepVisual_RWCurveStyleFontPattern  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWCurveStyleFontPattern();
diff --git a/inc/RWStepVisual_RWDraughtingModel.hxx b/inc/RWStepVisual_RWDraughtingModel.hxx
index 13d68ae..a1e4d64 100644
--- a/inc/RWStepVisual_RWDraughtingModel.hxx
+++ b/inc/RWStepVisual_RWDraughtingModel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWDraughtingModel  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepVisual_RWDraughtingModel();
diff --git a/inc/RWStepVisual_RWDraughtingPreDefinedColour.hxx b/inc/RWStepVisual_RWDraughtingPreDefinedColour.hxx
index f8c88c2..1e0d118 100644
--- a/inc/RWStepVisual_RWDraughtingPreDefinedColour.hxx
+++ b/inc/RWStepVisual_RWDraughtingPreDefinedColour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepVisual_RWDraughtingPreDefinedColour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWDraughtingPreDefinedColour();
diff --git a/inc/RWStepVisual_RWDraughtingPreDefinedCurveFont.hxx b/inc/RWStepVisual_RWDraughtingPreDefinedCurveFont.hxx
index 912e57c..3df2bb1 100644
--- a/inc/RWStepVisual_RWDraughtingPreDefinedCurveFont.hxx
+++ b/inc/RWStepVisual_RWDraughtingPreDefinedCurveFont.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepVisual_RWDraughtingPreDefinedCurveFont  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWDraughtingPreDefinedCurveFont();
diff --git a/inc/RWStepVisual_RWExternallyDefinedCurveFont.hxx b/inc/RWStepVisual_RWExternallyDefinedCurveFont.hxx
index bab24e0..5f03474 100644
--- a/inc/RWStepVisual_RWExternallyDefinedCurveFont.hxx
+++ b/inc/RWStepVisual_RWExternallyDefinedCurveFont.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWExternallyDefinedCurveFont  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   RWStepVisual_RWExternallyDefinedCurveFont();
diff --git a/inc/RWStepVisual_RWFillAreaStyle.hxx b/inc/RWStepVisual_RWFillAreaStyle.hxx
index 5ab64b0..610e9b7 100644
--- a/inc/RWStepVisual_RWFillAreaStyle.hxx
+++ b/inc/RWStepVisual_RWFillAreaStyle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWFillAreaStyle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWFillAreaStyle();
diff --git a/inc/RWStepVisual_RWFillAreaStyleColour.hxx b/inc/RWStepVisual_RWFillAreaStyleColour.hxx
index 336cc94..2abc656 100644
--- a/inc/RWStepVisual_RWFillAreaStyleColour.hxx
+++ b/inc/RWStepVisual_RWFillAreaStyleColour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWFillAreaStyleColour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWFillAreaStyleColour();
diff --git a/inc/RWStepVisual_RWInvisibility.hxx b/inc/RWStepVisual_RWInvisibility.hxx
index acedfec..aa65dc6 100644
--- a/inc/RWStepVisual_RWInvisibility.hxx
+++ b/inc/RWStepVisual_RWInvisibility.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWInvisibility  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWInvisibility();
diff --git a/inc/RWStepVisual_RWMechanicalDesignGeometricPresentationArea.hxx b/inc/RWStepVisual_RWMechanicalDesignGeometricPresentationArea.hxx
index 75451be..995c09c 100644
--- a/inc/RWStepVisual_RWMechanicalDesignGeometricPresentationArea.hxx
+++ b/inc/RWStepVisual_RWMechanicalDesignGeometricPresentationArea.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWMechanicalDesignGeometricPresentationArea  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWMechanicalDesignGeometricPresentationArea();
diff --git a/inc/RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.hxx b/inc/RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.hxx
index 10f4403..7929b70 100644
--- a/inc/RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.hxx
+++ b/inc/RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation();
diff --git a/inc/RWStepVisual_RWOverRidingStyledItem.hxx b/inc/RWStepVisual_RWOverRidingStyledItem.hxx
index 4f22a9c..8c860e9 100644
--- a/inc/RWStepVisual_RWOverRidingStyledItem.hxx
+++ b/inc/RWStepVisual_RWOverRidingStyledItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWOverRidingStyledItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWOverRidingStyledItem();
diff --git a/inc/RWStepVisual_RWPlanarBox.hxx b/inc/RWStepVisual_RWPlanarBox.hxx
index 85900ac..5a5d2c3 100644
--- a/inc/RWStepVisual_RWPlanarBox.hxx
+++ b/inc/RWStepVisual_RWPlanarBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWPlanarBox  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPlanarBox();
diff --git a/inc/RWStepVisual_RWPlanarExtent.hxx b/inc/RWStepVisual_RWPlanarExtent.hxx
index 13de669..311a903 100644
--- a/inc/RWStepVisual_RWPlanarExtent.hxx
+++ b/inc/RWStepVisual_RWPlanarExtent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepVisual_RWPlanarExtent  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPlanarExtent();
diff --git a/inc/RWStepVisual_RWPointStyle.hxx b/inc/RWStepVisual_RWPointStyle.hxx
index 99f549c..584c016 100644
--- a/inc/RWStepVisual_RWPointStyle.hxx
+++ b/inc/RWStepVisual_RWPointStyle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWPointStyle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPointStyle();
diff --git a/inc/RWStepVisual_RWPreDefinedColour.hxx b/inc/RWStepVisual_RWPreDefinedColour.hxx
index a6c48a7..2448396 100644
--- a/inc/RWStepVisual_RWPreDefinedColour.hxx
+++ b/inc/RWStepVisual_RWPreDefinedColour.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepVisual_RWPreDefinedColour  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPreDefinedColour();
diff --git a/inc/RWStepVisual_RWPreDefinedCurveFont.hxx b/inc/RWStepVisual_RWPreDefinedCurveFont.hxx
index a53db65..b1062ce 100644
--- a/inc/RWStepVisual_RWPreDefinedCurveFont.hxx
+++ b/inc/RWStepVisual_RWPreDefinedCurveFont.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepVisual_RWPreDefinedCurveFont  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPreDefinedCurveFont();
diff --git a/inc/RWStepVisual_RWPreDefinedItem.hxx b/inc/RWStepVisual_RWPreDefinedItem.hxx
index 50961f2..61db482 100644
--- a/inc/RWStepVisual_RWPreDefinedItem.hxx
+++ b/inc/RWStepVisual_RWPreDefinedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepVisual_RWPreDefinedItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPreDefinedItem();
diff --git a/inc/RWStepVisual_RWPresentationArea.hxx b/inc/RWStepVisual_RWPresentationArea.hxx
index 878cc66..708b244 100644
--- a/inc/RWStepVisual_RWPresentationArea.hxx
+++ b/inc/RWStepVisual_RWPresentationArea.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWPresentationArea  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPresentationArea();
diff --git a/inc/RWStepVisual_RWPresentationLayerAssignment.hxx b/inc/RWStepVisual_RWPresentationLayerAssignment.hxx
index e0a6d2a..376bd8b 100644
--- a/inc/RWStepVisual_RWPresentationLayerAssignment.hxx
+++ b/inc/RWStepVisual_RWPresentationLayerAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWPresentationLayerAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPresentationLayerAssignment();
diff --git a/inc/RWStepVisual_RWPresentationLayerUsage.hxx b/inc/RWStepVisual_RWPresentationLayerUsage.hxx
index ec6fcbe..08a9661 100644
--- a/inc/RWStepVisual_RWPresentationLayerUsage.hxx
+++ b/inc/RWStepVisual_RWPresentationLayerUsage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWPresentationLayerUsage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPresentationLayerUsage();
diff --git a/inc/RWStepVisual_RWPresentationRepresentation.hxx b/inc/RWStepVisual_RWPresentationRepresentation.hxx
index 8b3bc60..a74368d 100644
--- a/inc/RWStepVisual_RWPresentationRepresentation.hxx
+++ b/inc/RWStepVisual_RWPresentationRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWPresentationRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPresentationRepresentation();
diff --git a/inc/RWStepVisual_RWPresentationSet.hxx b/inc/RWStepVisual_RWPresentationSet.hxx
index c9f655f..0d65e59 100644
--- a/inc/RWStepVisual_RWPresentationSet.hxx
+++ b/inc/RWStepVisual_RWPresentationSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepData_StepWriter;
 class RWStepVisual_RWPresentationSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPresentationSet();
diff --git a/inc/RWStepVisual_RWPresentationSize.hxx b/inc/RWStepVisual_RWPresentationSize.hxx
index 483531a..e7713cd 100644
--- a/inc/RWStepVisual_RWPresentationSize.hxx
+++ b/inc/RWStepVisual_RWPresentationSize.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWPresentationSize  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPresentationSize();
diff --git a/inc/RWStepVisual_RWPresentationStyleAssignment.hxx b/inc/RWStepVisual_RWPresentationStyleAssignment.hxx
index 63c734c..f08b492 100644
--- a/inc/RWStepVisual_RWPresentationStyleAssignment.hxx
+++ b/inc/RWStepVisual_RWPresentationStyleAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWPresentationStyleAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPresentationStyleAssignment();
diff --git a/inc/RWStepVisual_RWPresentationStyleByContext.hxx b/inc/RWStepVisual_RWPresentationStyleByContext.hxx
index aecfd97..8c1db2c 100644
--- a/inc/RWStepVisual_RWPresentationStyleByContext.hxx
+++ b/inc/RWStepVisual_RWPresentationStyleByContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWPresentationStyleByContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPresentationStyleByContext();
diff --git a/inc/RWStepVisual_RWPresentationView.hxx b/inc/RWStepVisual_RWPresentationView.hxx
index a663cc5..68c1f0a 100644
--- a/inc/RWStepVisual_RWPresentationView.hxx
+++ b/inc/RWStepVisual_RWPresentationView.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWPresentationView  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPresentationView();
diff --git a/inc/RWStepVisual_RWPresentedItemRepresentation.hxx b/inc/RWStepVisual_RWPresentedItemRepresentation.hxx
index 0dcfc14..c46d163 100644
--- a/inc/RWStepVisual_RWPresentedItemRepresentation.hxx
+++ b/inc/RWStepVisual_RWPresentedItemRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWPresentedItemRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWPresentedItemRepresentation();
diff --git a/inc/RWStepVisual_RWStyledItem.hxx b/inc/RWStepVisual_RWStyledItem.hxx
index 852cfe0..8ffb931 100644
--- a/inc/RWStepVisual_RWStyledItem.hxx
+++ b/inc/RWStepVisual_RWStyledItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWStyledItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWStyledItem();
diff --git a/inc/RWStepVisual_RWSurfaceSideStyle.hxx b/inc/RWStepVisual_RWSurfaceSideStyle.hxx
index e707a09..c1d1227 100644
--- a/inc/RWStepVisual_RWSurfaceSideStyle.hxx
+++ b/inc/RWStepVisual_RWSurfaceSideStyle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWSurfaceSideStyle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWSurfaceSideStyle();
diff --git a/inc/RWStepVisual_RWSurfaceStyleBoundary.hxx b/inc/RWStepVisual_RWSurfaceStyleBoundary.hxx
index 869ea15..d44e76d 100644
--- a/inc/RWStepVisual_RWSurfaceStyleBoundary.hxx
+++ b/inc/RWStepVisual_RWSurfaceStyleBoundary.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWSurfaceStyleBoundary  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWSurfaceStyleBoundary();
diff --git a/inc/RWStepVisual_RWSurfaceStyleControlGrid.hxx b/inc/RWStepVisual_RWSurfaceStyleControlGrid.hxx
index e8d0a18..c1715a4 100644
--- a/inc/RWStepVisual_RWSurfaceStyleControlGrid.hxx
+++ b/inc/RWStepVisual_RWSurfaceStyleControlGrid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWSurfaceStyleControlGrid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWSurfaceStyleControlGrid();
diff --git a/inc/RWStepVisual_RWSurfaceStyleFillArea.hxx b/inc/RWStepVisual_RWSurfaceStyleFillArea.hxx
index 3a86783..7330267 100644
--- a/inc/RWStepVisual_RWSurfaceStyleFillArea.hxx
+++ b/inc/RWStepVisual_RWSurfaceStyleFillArea.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWSurfaceStyleFillArea  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWSurfaceStyleFillArea();
diff --git a/inc/RWStepVisual_RWSurfaceStyleParameterLine.hxx b/inc/RWStepVisual_RWSurfaceStyleParameterLine.hxx
index 7925502..b0871a1 100644
--- a/inc/RWStepVisual_RWSurfaceStyleParameterLine.hxx
+++ b/inc/RWStepVisual_RWSurfaceStyleParameterLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWSurfaceStyleParameterLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWSurfaceStyleParameterLine();
diff --git a/inc/RWStepVisual_RWSurfaceStyleSegmentationCurve.hxx b/inc/RWStepVisual_RWSurfaceStyleSegmentationCurve.hxx
index d508c68..ca717f9 100644
--- a/inc/RWStepVisual_RWSurfaceStyleSegmentationCurve.hxx
+++ b/inc/RWStepVisual_RWSurfaceStyleSegmentationCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWSurfaceStyleSegmentationCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWSurfaceStyleSegmentationCurve();
diff --git a/inc/RWStepVisual_RWSurfaceStyleSilhouette.hxx b/inc/RWStepVisual_RWSurfaceStyleSilhouette.hxx
index 647a482..06ed1f8 100644
--- a/inc/RWStepVisual_RWSurfaceStyleSilhouette.hxx
+++ b/inc/RWStepVisual_RWSurfaceStyleSilhouette.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWSurfaceStyleSilhouette  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWSurfaceStyleSilhouette();
diff --git a/inc/RWStepVisual_RWSurfaceStyleUsage.hxx b/inc/RWStepVisual_RWSurfaceStyleUsage.hxx
index 1da9a3b..01d810b 100644
--- a/inc/RWStepVisual_RWSurfaceStyleUsage.hxx
+++ b/inc/RWStepVisual_RWSurfaceStyleUsage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWSurfaceStyleUsage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWSurfaceStyleUsage();
diff --git a/inc/RWStepVisual_RWTemplate.hxx b/inc/RWStepVisual_RWTemplate.hxx
index a4190fd..8af8dba 100644
--- a/inc/RWStepVisual_RWTemplate.hxx
+++ b/inc/RWStepVisual_RWTemplate.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWTemplate  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWTemplate();
diff --git a/inc/RWStepVisual_RWTemplateInstance.hxx b/inc/RWStepVisual_RWTemplateInstance.hxx
index d765d8f..cabcea6 100644
--- a/inc/RWStepVisual_RWTemplateInstance.hxx
+++ b/inc/RWStepVisual_RWTemplateInstance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWTemplateInstance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWTemplateInstance();
diff --git a/inc/RWStepVisual_RWTextLiteral.hxx b/inc/RWStepVisual_RWTextLiteral.hxx
index e7cf303..a379133 100644
--- a/inc/RWStepVisual_RWTextLiteral.hxx
+++ b/inc/RWStepVisual_RWTextLiteral.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWTextLiteral  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWTextLiteral();
diff --git a/inc/RWStepVisual_RWTextStyle.hxx b/inc/RWStepVisual_RWTextStyle.hxx
index 23ceffa..c7f9141 100644
--- a/inc/RWStepVisual_RWTextStyle.hxx
+++ b/inc/RWStepVisual_RWTextStyle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWTextStyle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWTextStyle();
diff --git a/inc/RWStepVisual_RWTextStyleForDefinedFont.hxx b/inc/RWStepVisual_RWTextStyleForDefinedFont.hxx
index 791044a..9038ce0 100644
--- a/inc/RWStepVisual_RWTextStyleForDefinedFont.hxx
+++ b/inc/RWStepVisual_RWTextStyleForDefinedFont.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWTextStyleForDefinedFont  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWTextStyleForDefinedFont();
diff --git a/inc/RWStepVisual_RWTextStyleWithBoxCharacteristics.hxx b/inc/RWStepVisual_RWTextStyleWithBoxCharacteristics.hxx
index d2038c0..56bdc5f 100644
--- a/inc/RWStepVisual_RWTextStyleWithBoxCharacteristics.hxx
+++ b/inc/RWStepVisual_RWTextStyleWithBoxCharacteristics.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWTextStyleWithBoxCharacteristics  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWTextStyleWithBoxCharacteristics();
diff --git a/inc/RWStepVisual_RWViewVolume.hxx b/inc/RWStepVisual_RWViewVolume.hxx
index e225ae6..a3887f1 100644
--- a/inc/RWStepVisual_RWViewVolume.hxx
+++ b/inc/RWStepVisual_RWViewVolume.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Interface_EntityIterator;
 class RWStepVisual_RWViewVolume  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   RWStepVisual_RWViewVolume();
diff --git a/inc/RWStl.hxx b/inc/RWStl.hxx
index 15cdfa6..4776880 100644
--- a/inc/RWStl.hxx
+++ b/inc/RWStl.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Message_ProgressIndicator;
 class RWStl  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! write the meshing in a file following the <br>
 //!         binary format of an STL file. <br>
diff --git a/inc/Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx b/inc/Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx
index 14ddf37..bcd446e 100644
--- a/inc/Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx
+++ b/inc/Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Resource_DataMapNodeOfDataMapOfAsciiStringAsciiString;
 class Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString();
diff --git a/inc/Resource_DataMapIteratorOfDataMapOfAsciiStringExtendedString.hxx b/inc/Resource_DataMapIteratorOfDataMapOfAsciiStringExtendedString.hxx
index f3c62c3..878ae44 100644
--- a/inc/Resource_DataMapIteratorOfDataMapOfAsciiStringExtendedString.hxx
+++ b/inc/Resource_DataMapIteratorOfDataMapOfAsciiStringExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class Resource_DataMapNodeOfDataMapOfAsciiStringExtendedString;
 class Resource_DataMapIteratorOfDataMapOfAsciiStringExtendedString  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Resource_DataMapIteratorOfDataMapOfAsciiStringExtendedString();
diff --git a/inc/Resource_DataMapOfAsciiStringAsciiString.hxx b/inc/Resource_DataMapOfAsciiStringAsciiString.hxx
index db6d77d..1e78d6b 100644
--- a/inc/Resource_DataMapOfAsciiStringAsciiString.hxx
+++ b/inc/Resource_DataMapOfAsciiStringAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString;
 class Resource_DataMapOfAsciiStringAsciiString  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Resource_DataMapOfAsciiStringAsciiString(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Resource_DataMapOfAsciiStringExtendedString.hxx b/inc/Resource_DataMapOfAsciiStringExtendedString.hxx
index 27cba49..eea9adf 100644
--- a/inc/Resource_DataMapOfAsciiStringExtendedString.hxx
+++ b/inc/Resource_DataMapOfAsciiStringExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Resource_DataMapIteratorOfDataMapOfAsciiStringExtendedString;
 class Resource_DataMapOfAsciiStringExtendedString  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Resource_DataMapOfAsciiStringExtendedString(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Resource_LexicalCompare.hxx b/inc/Resource_LexicalCompare.hxx
index eb8e35a..aa72509 100644
--- a/inc/Resource_LexicalCompare.hxx
+++ b/inc/Resource_LexicalCompare.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@ class TCollection_AsciiString;
 class Resource_LexicalCompare  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Resource_LexicalCompare();
diff --git a/inc/Resource_QuickSortOfArray1.hxx b/inc/Resource_QuickSortOfArray1.hxx
index 6906c98..a1e20a2 100644
--- a/inc/Resource_QuickSortOfArray1.hxx
+++ b/inc/Resource_QuickSortOfArray1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@ class Resource_LexicalCompare;
 class Resource_QuickSortOfArray1  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(TColStd_Array1OfAsciiString& TheArray,const Resource_LexicalCompare& Comp) ;
diff --git a/inc/Resource_Unicode.hxx b/inc/Resource_Unicode.hxx
index 526a630..bf4a023 100644
--- a/inc/Resource_Unicode.hxx
+++ b/inc/Resource_Unicode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TCollection_ExtendedString;
 class Resource_Unicode  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Converts non-ASCII CString <fromstr> in SJIS format <br>
 //!          to Unicode ExtendedString <tostr>. <br>
diff --git a/inc/STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile.hxx b/inc/STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile.hxx
index 8035a18..7cc8e97 100644
--- a/inc/STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile.hxx
+++ b/inc/STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class STEPCAFControl_DataMapNodeOfDataMapOfLabelExternFile;
 class STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile();
diff --git a/inc/STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape.hxx b/inc/STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape.hxx
index 2435645..9ad9065 100644
--- a/inc/STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape.hxx
+++ b/inc/STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class STEPCAFControl_DataMapNodeOfDataMapOfLabelShape;
 class STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape();
diff --git a/inc/STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile.hxx b/inc/STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile.hxx
index a8f0ca2..ed9ec15 100644
--- a/inc/STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile.hxx
+++ b/inc/STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class STEPCAFControl_DataMapNodeOfDataMapOfPDExternFile;
 class STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile();
diff --git a/inc/STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile.hxx b/inc/STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile.hxx
index 9a70073..36798e3 100644
--- a/inc/STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile.hxx
+++ b/inc/STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class STEPCAFControl_DataMapNodeOfDataMapOfSDRExternFile;
 class STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile();
diff --git a/inc/STEPCAFControl_DataMapIteratorOfDataMapOfShapePD.hxx b/inc/STEPCAFControl_DataMapIteratorOfDataMapOfShapePD.hxx
index dc356ec..479f9a4 100644
--- a/inc/STEPCAFControl_DataMapIteratorOfDataMapOfShapePD.hxx
+++ b/inc/STEPCAFControl_DataMapIteratorOfDataMapOfShapePD.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class STEPCAFControl_DataMapNodeOfDataMapOfShapePD;
 class STEPCAFControl_DataMapIteratorOfDataMapOfShapePD  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_DataMapIteratorOfDataMapOfShapePD();
diff --git a/inc/STEPCAFControl_DataMapIteratorOfDataMapOfShapeSDR.hxx b/inc/STEPCAFControl_DataMapIteratorOfDataMapOfShapeSDR.hxx
index 47da548..d61609d 100644
--- a/inc/STEPCAFControl_DataMapIteratorOfDataMapOfShapeSDR.hxx
+++ b/inc/STEPCAFControl_DataMapIteratorOfDataMapOfShapeSDR.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class STEPCAFControl_DataMapNodeOfDataMapOfShapeSDR;
 class STEPCAFControl_DataMapIteratorOfDataMapOfShapeSDR  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_DataMapIteratorOfDataMapOfShapeSDR();
diff --git a/inc/STEPCAFControl_DataMapOfLabelExternFile.hxx b/inc/STEPCAFControl_DataMapOfLabelExternFile.hxx
index 7683f47..bce2abc 100644
--- a/inc/STEPCAFControl_DataMapOfLabelExternFile.hxx
+++ b/inc/STEPCAFControl_DataMapOfLabelExternFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile;
 class STEPCAFControl_DataMapOfLabelExternFile  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_DataMapOfLabelExternFile(const Standard_Integer NbBuckets = 1);
diff --git a/inc/STEPCAFControl_DataMapOfLabelShape.hxx b/inc/STEPCAFControl_DataMapOfLabelShape.hxx
index 8c1b6bb..ac74e8d 100644
--- a/inc/STEPCAFControl_DataMapOfLabelShape.hxx
+++ b/inc/STEPCAFControl_DataMapOfLabelShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape;
 class STEPCAFControl_DataMapOfLabelShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_DataMapOfLabelShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/STEPCAFControl_DataMapOfPDExternFile.hxx b/inc/STEPCAFControl_DataMapOfPDExternFile.hxx
index 4648ead..4ed99ee 100644
--- a/inc/STEPCAFControl_DataMapOfPDExternFile.hxx
+++ b/inc/STEPCAFControl_DataMapOfPDExternFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile;
 class STEPCAFControl_DataMapOfPDExternFile  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_DataMapOfPDExternFile(const Standard_Integer NbBuckets = 1);
diff --git a/inc/STEPCAFControl_DataMapOfSDRExternFile.hxx b/inc/STEPCAFControl_DataMapOfSDRExternFile.hxx
index 0b2a818..15f3165 100644
--- a/inc/STEPCAFControl_DataMapOfSDRExternFile.hxx
+++ b/inc/STEPCAFControl_DataMapOfSDRExternFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile;
 class STEPCAFControl_DataMapOfSDRExternFile  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_DataMapOfSDRExternFile(const Standard_Integer NbBuckets = 1);
diff --git a/inc/STEPCAFControl_DataMapOfShapePD.hxx b/inc/STEPCAFControl_DataMapOfShapePD.hxx
index 88b480b..3818c01 100644
--- a/inc/STEPCAFControl_DataMapOfShapePD.hxx
+++ b/inc/STEPCAFControl_DataMapOfShapePD.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class STEPCAFControl_DataMapIteratorOfDataMapOfShapePD;
 class STEPCAFControl_DataMapOfShapePD  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_DataMapOfShapePD(const Standard_Integer NbBuckets = 1);
diff --git a/inc/STEPCAFControl_DataMapOfShapeSDR.hxx b/inc/STEPCAFControl_DataMapOfShapeSDR.hxx
index 0218e0b..509c14f 100644
--- a/inc/STEPCAFControl_DataMapOfShapeSDR.hxx
+++ b/inc/STEPCAFControl_DataMapOfShapeSDR.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class STEPCAFControl_DataMapIteratorOfDataMapOfShapeSDR;
 class STEPCAFControl_DataMapOfShapeSDR  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_DataMapOfShapeSDR(const Standard_Integer NbBuckets = 1);
diff --git a/inc/STEPCAFControl_DictionaryOfExternFile.hxx b/inc/STEPCAFControl_DictionaryOfExternFile.hxx
index 1d22339..af9bf15 100644
--- a/inc/STEPCAFControl_DictionaryOfExternFile.hxx
+++ b/inc/STEPCAFControl_DictionaryOfExternFile.hxx
@@ -37,6 +37,9 @@
 #ifndef _Standard_CString_HeaderFile
 #include <Standard_CString.hxx>
 #endif
+#ifndef _Standard_Size_HeaderFile
+#include <Standard_Size.hxx>
+#endif
 #ifndef _Standard_Integer_HeaderFile
 #include <Standard_Integer.hxx>
 #endif
@@ -117,9 +120,9 @@ private:
   
   Standard_EXPORT     void SetNext(const Handle(STEPCAFControl_DictionaryOfExternFile)& acell) ;
   
-  Standard_EXPORT     void SearchCell(const Standard_CString name,const Standard_Integer lmax,const Standard_Character car,const Standard_Integer level,Handle(STEPCAFControl_DictionaryOfExternFile)& acell,Standard_Integer& reslev,Standard_Integer& stat) const;
+  Standard_EXPORT     void SearchCell(const Standard_CString name,const Standard_Size lmax,const Standard_Character car,const Standard_Size level,Handle(STEPCAFControl_DictionaryOfExternFile)& acell,Standard_Size& reslev,Standard_Integer& stat) const;
   
-  Standard_EXPORT     void NewCell(const Standard_CString name,const Standard_Integer namlen,Handle(STEPCAFControl_DictionaryOfExternFile)& acell,const Standard_Integer reslev,const Standard_Integer stat) ;
+  Standard_EXPORT     void NewCell(const Standard_CString name,const Standard_Size namlen,Handle(STEPCAFControl_DictionaryOfExternFile)& acell,const Standard_Size reslev,const Standard_Integer stat) ;
   
   Standard_EXPORT     Standard_Boolean HasIt() const;
   
diff --git a/inc/STEPCAFControl_IteratorOfDictionaryOfExternFile.hxx b/inc/STEPCAFControl_IteratorOfDictionaryOfExternFile.hxx
index 04f1a4e..81523ef 100644
--- a/inc/STEPCAFControl_IteratorOfDictionaryOfExternFile.hxx
+++ b/inc/STEPCAFControl_IteratorOfDictionaryOfExternFile.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TCollection_AsciiString;
 class STEPCAFControl_IteratorOfDictionaryOfExternFile  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPCAFControl_IteratorOfDictionaryOfExternFile(const Handle(STEPCAFControl_DictionaryOfExternFile)& acell);
diff --git a/inc/STEPCAFControl_Reader.hxx b/inc/STEPCAFControl_Reader.hxx
index 7099b0d..398d55b 100644
--- a/inc/STEPCAFControl_Reader.hxx
+++ b/inc/STEPCAFControl_Reader.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,6 +49,15 @@
 #ifndef _Handle_TColStd_HSequenceOfTransient_HeaderFile
 #include <Handle_TColStd_HSequenceOfTransient.hxx>
 #endif
+#ifndef _Handle_StepRepr_RepresentationItem_HeaderFile
+#include <Handle_StepRepr_RepresentationItem.hxx>
+#endif
+#ifndef _Handle_Transfer_TransientProcess_HeaderFile
+#include <Handle_Transfer_TransientProcess.hxx>
+#endif
+#ifndef _Handle_StepShape_ConnectedFaceSet_HeaderFile
+#include <Handle_StepShape_ConnectedFaceSet.hxx>
+#endif
 #ifndef _Handle_StepRepr_NextAssemblyUsageOccurrence_HeaderFile
 #include <Handle_StepRepr_NextAssemblyUsageOccurrence.hxx>
 #endif
@@ -64,6 +76,9 @@ class STEPCAFControl_DataMapOfShapePD;
 class STEPCAFControl_DataMapOfPDExternFile;
 class XCAFDoc_DataMapOfShapeLabel;
 class TColStd_HSequenceOfTransient;
+class StepRepr_RepresentationItem;
+class Transfer_TransientProcess;
+class StepShape_ConnectedFaceSet;
 class StepRepr_NextAssemblyUsageOccurrence;
 class STEPConstruct_Tool;
 
@@ -75,18 +90,7 @@ class STEPConstruct_Tool;
 class STEPCAFControl_Reader  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a reader with an empty <br>
 //! STEP model and sets ColorMode, LayerMode, NameMode and <br>
@@ -202,6 +206,27 @@ protected:
   //! Reads materials for instances defined in the STEP model and <br>
 //!          set reference between shape instances from different assemblyes <br>
   Standard_EXPORT     Standard_Boolean ReadMaterials(const Handle(XSControl_WorkSession)& WS,Handle(TDocStd_Document)& doc,const Handle(TColStd_HSequenceOfTransient)& SeqPDS) const;
+  //! Populates the sub-Label of the passed TDF Label with shape <br>
+//!          data associated with the given STEP Representation Item, <br>
+//!          including naming and topological information. <br>
+  Standard_EXPORT     TDF_Label SettleShapeData(const Handle(StepRepr_RepresentationItem)& theItem,TDF_Label& theLab,const Handle(XCAFDoc_ShapeTool)& theShapeTool,const Handle(Transfer_TransientProcess)& theTP) const;
+  //! Given the maps of already translated shapes, this method <br>
+//!          expands their correspondent Labels in XDE Document so that <br>
+//!          to have a dedicated sub-Label for each sub-shape coming <br>
+//!          with associated name in its STEP Representation Item. <br>
+  Standard_EXPORT     void ExpandSubShapes(const Handle(XCAFDoc_ShapeTool)& theShapeTool,const XCAFDoc_DataMapOfShapeLabel& theShapeLabelMap,const STEPCAFControl_DataMapOfShapePD& theShapePDMap) const;
+  //! Expands the topological structure of Manifold Solid BRep <br>
+//!           STEP entity to OCAF sub-tree. Entities having no names <br>
+//!           associated via their Representation Items are skipped. <br>
+  Standard_EXPORT     void ExpandManifoldSolidBrep(TDF_Label& theLab,const Handle(StepRepr_RepresentationItem)& theItem,const Handle(Transfer_TransientProcess)& theTP,const Handle(XCAFDoc_ShapeTool)& theShapeTool) const;
+  //! Expands the topological structure of Shell-Based Surface <br>
+//!           Model STEP entity to OCAF sub-tree. Entities having no names <br>
+//!           associated via their Representation Items are skipped. <br>
+  Standard_EXPORT     void ExpandSBSM(TDF_Label& theLab,const Handle(StepRepr_RepresentationItem)& theItem,const Handle(Transfer_TransientProcess)& theTP,const Handle(XCAFDoc_ShapeTool)& theShapeTool) const;
+  //! Expands STEP Shell structure to OCAF sub-tree. Entities <br>
+//!           having no names associated via their Representation Items <br>
+//!           are skipped. <br>
+  Standard_EXPORT     void ExpandShell(const Handle(StepShape_ConnectedFaceSet)& theShell,TDF_Label& theLab,const Handle(Transfer_TransientProcess)& theTP,const Handle(XCAFDoc_ShapeTool)& theShapeTool) const;
 
 
 
diff --git a/inc/STEPCAFControl_Writer.hxx b/inc/STEPCAFControl_Writer.hxx
index c5f8c1e..5bc98a6 100644
--- a/inc/STEPCAFControl_Writer.hxx
+++ b/inc/STEPCAFControl_Writer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class TopoDS_Shape;
 class STEPCAFControl_Writer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a writer with an empty <br>
 //! STEP model and sets ColorMode, LayerMode, NameMode and <br>
diff --git a/inc/STEPConstruct.hxx b/inc/STEPConstruct.hxx
index c0661fa..4610c61 100644
--- a/inc/STEPConstruct.hxx
+++ b/inc/STEPConstruct.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class STEPConstruct_DataMapIteratorOfDataMapOfPointTransient;
 class STEPConstruct  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns STEP entity of the (sub)type of RepresentationItem <br>
 //!          which is a result of the tranalation of the Shape, or Null if <br>
diff --git a/inc/STEPConstruct_AP203Context.hxx b/inc/STEPConstruct_AP203Context.hxx
index a6cfa22..eafc6b0 100644
--- a/inc/STEPConstruct_AP203Context.hxx
+++ b/inc/STEPConstruct_AP203Context.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -88,18 +91,7 @@ class StepRepr_NextAssemblyUsageOccurrence;
 class STEPConstruct_AP203Context  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates tool and fills constant fields <br>
   Standard_EXPORT   STEPConstruct_AP203Context();
diff --git a/inc/STEPConstruct_Assembly.hxx b/inc/STEPConstruct_Assembly.hxx
index 77c90c0..f8daf7d 100644
--- a/inc/STEPConstruct_Assembly.hxx
+++ b/inc/STEPConstruct_Assembly.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class StepShape_ContextDependentShapeRepresentation;
 class STEPConstruct_Assembly  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPConstruct_Assembly();
diff --git a/inc/STEPConstruct_ContextTool.hxx b/inc/STEPConstruct_ContextTool.hxx
index 1acfa8e..aa655c0 100644
--- a/inc/STEPConstruct_ContextTool.hxx
+++ b/inc/STEPConstruct_ContextTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class STEPConstruct_Assembly;
 class STEPConstruct_ContextTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPConstruct_ContextTool();
diff --git a/inc/STEPConstruct_DataMapIteratorOfDataMapOfAsciiStringTransient.hxx b/inc/STEPConstruct_DataMapIteratorOfDataMapOfAsciiStringTransient.hxx
index 35371a0..2bb6e3a 100644
--- a/inc/STEPConstruct_DataMapIteratorOfDataMapOfAsciiStringTransient.hxx
+++ b/inc/STEPConstruct_DataMapIteratorOfDataMapOfAsciiStringTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class STEPConstruct_DataMapNodeOfDataMapOfAsciiStringTransient;
 class STEPConstruct_DataMapIteratorOfDataMapOfAsciiStringTransient  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPConstruct_DataMapIteratorOfDataMapOfAsciiStringTransient();
diff --git a/inc/STEPConstruct_DataMapIteratorOfDataMapOfPointTransient.hxx b/inc/STEPConstruct_DataMapIteratorOfDataMapOfPointTransient.hxx
index 4ba9d7d..a40adf1 100644
--- a/inc/STEPConstruct_DataMapIteratorOfDataMapOfPointTransient.hxx
+++ b/inc/STEPConstruct_DataMapIteratorOfDataMapOfPointTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class STEPConstruct_DataMapNodeOfDataMapOfPointTransient;
 class STEPConstruct_DataMapIteratorOfDataMapOfPointTransient  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPConstruct_DataMapIteratorOfDataMapOfPointTransient();
diff --git a/inc/STEPConstruct_DataMapOfAsciiStringTransient.hxx b/inc/STEPConstruct_DataMapOfAsciiStringTransient.hxx
index cd84396..71e7c46 100644
--- a/inc/STEPConstruct_DataMapOfAsciiStringTransient.hxx
+++ b/inc/STEPConstruct_DataMapOfAsciiStringTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class STEPConstruct_DataMapIteratorOfDataMapOfAsciiStringTransient;
 class STEPConstruct_DataMapOfAsciiStringTransient  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPConstruct_DataMapOfAsciiStringTransient(const Standard_Integer NbBuckets = 1);
diff --git a/inc/STEPConstruct_DataMapOfPointTransient.hxx b/inc/STEPConstruct_DataMapOfPointTransient.hxx
index 80fad63..e95bb6f 100644
--- a/inc/STEPConstruct_DataMapOfPointTransient.hxx
+++ b/inc/STEPConstruct_DataMapOfPointTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class STEPConstruct_DataMapIteratorOfDataMapOfPointTransient;
 class STEPConstruct_DataMapOfPointTransient  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPConstruct_DataMapOfPointTransient(const Standard_Integer NbBuckets = 1);
diff --git a/inc/STEPConstruct_ExternRefs.hxx b/inc/STEPConstruct_ExternRefs.hxx
index b1d6b5d..2d371cc 100644
--- a/inc/STEPConstruct_ExternRefs.hxx
+++ b/inc/STEPConstruct_ExternRefs.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -78,18 +81,7 @@ class StepBasic_DocumentFile;
 class STEPConstruct_ExternRefs  : public STEPConstruct_Tool {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty tool <br>
   Standard_EXPORT   STEPConstruct_ExternRefs();
diff --git a/inc/STEPConstruct_Part.hxx b/inc/STEPConstruct_Part.hxx
index ba6e1bb..542d20e 100644
--- a/inc/STEPConstruct_Part.hxx
+++ b/inc/STEPConstruct_Part.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class StepRepr_ProductDefinitionShape;
 class STEPConstruct_Part  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPConstruct_Part();
diff --git a/inc/STEPConstruct_PointHasher.hxx b/inc/STEPConstruct_PointHasher.hxx
index 6a8fc15..54de843 100644
--- a/inc/STEPConstruct_PointHasher.hxx
+++ b/inc/STEPConstruct_PointHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class gp_Pnt;
 class STEPConstruct_PointHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HasCode value  for  the  Key <K>  in the <br>
 //!          range 0..Upper. <br>
diff --git a/inc/STEPConstruct_Styles.hxx b/inc/STEPConstruct_Styles.hxx
index c7b5995..4796296 100644
--- a/inc/STEPConstruct_Styles.hxx
+++ b/inc/STEPConstruct_Styles.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -85,18 +88,7 @@ class STEPConstruct_DataMapOfPointTransient;
 class STEPConstruct_Styles  : public STEPConstruct_Tool {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty tool <br>
   Standard_EXPORT   STEPConstruct_Styles();
diff --git a/inc/STEPConstruct_Tool.hxx b/inc/STEPConstruct_Tool.hxx
index aa2c550..2848de8 100644
--- a/inc/STEPConstruct_Tool.hxx
+++ b/inc/STEPConstruct_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class Interface_Graph;
 class STEPConstruct_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty tool <br>
   Standard_EXPORT   STEPConstruct_Tool();
diff --git a/inc/STEPConstruct_UnitContext.hxx b/inc/STEPConstruct_UnitContext.hxx
index 60e6334..74410c9 100644
--- a/inc/STEPConstruct_UnitContext.hxx
+++ b/inc/STEPConstruct_UnitContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class StepBasic_SiUnit;
 class STEPConstruct_UnitContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates empty tool <br>
   Standard_EXPORT   STEPConstruct_UnitContext();
diff --git a/inc/STEPConstruct_ValidationProps.hxx b/inc/STEPConstruct_ValidationProps.hxx
index 39b6af0..8f64d13 100644
--- a/inc/STEPConstruct_ValidationProps.hxx
+++ b/inc/STEPConstruct_ValidationProps.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class StepRepr_PropertyDefinition;
 class STEPConstruct_ValidationProps  : public STEPConstruct_Tool {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty tool <br>
   Standard_EXPORT   STEPConstruct_ValidationProps();
diff --git a/inc/STEPControl_Reader.hxx b/inc/STEPControl_Reader.hxx
index 72e32c4..ce73f0e 100644
--- a/inc/STEPControl_Reader.hxx
+++ b/inc/STEPControl_Reader.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -77,18 +80,7 @@ class TColStd_Array1OfReal;
 class STEPControl_Reader  : public XSControl_Reader {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a reader object with an empty STEP model. <br>
   Standard_EXPORT   STEPControl_Reader();
diff --git a/inc/STEPControl_Writer.hxx b/inc/STEPControl_Writer.hxx
index ef38bac..9e5018f 100644
--- a/inc/STEPControl_Writer.hxx
+++ b/inc/STEPControl_Writer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopoDS_Shape;
 class STEPControl_Writer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Writer from scratch <br>
   Standard_EXPORT   STEPControl_Writer();
diff --git a/inc/STEPEdit.hxx b/inc/STEPEdit.hxx
index b15cd18..ce60acb 100644
--- a/inc/STEPEdit.hxx
+++ b/inc/STEPEdit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class STEPEdit_EditSDR;
 class STEPEdit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a Protocol fit for STEP (creates the first time) <br>
   Standard_EXPORT   static  Handle_Interface_Protocol Protocol() ;
diff --git a/inc/STEPSelections_AssemblyExplorer.hxx b/inc/STEPSelections_AssemblyExplorer.hxx
index d62c796..5ea9015 100644
--- a/inc/STEPSelections_AssemblyExplorer.hxx
+++ b/inc/STEPSelections_AssemblyExplorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class StepRepr_NextAssemblyUsageOccurrence;
 class STEPSelections_AssemblyExplorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPSelections_AssemblyExplorer(const Interface_Graph& G);
diff --git a/inc/STEPSelections_Counter.hxx b/inc/STEPSelections_Counter.hxx
index a2ffd61..cbcda9c 100644
--- a/inc/STEPSelections_Counter.hxx
+++ b/inc/STEPSelections_Counter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class StepGeom_CompositeCurve;
 class STEPSelections_Counter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   STEPSelections_Counter();
diff --git a/inc/STEPSelections_SequenceOfAssemblyComponent.hxx b/inc/STEPSelections_SequenceOfAssemblyComponent.hxx
index 531ca18..64cc89a 100644
--- a/inc/STEPSelections_SequenceOfAssemblyComponent.hxx
+++ b/inc/STEPSelections_SequenceOfAssemblyComponent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class STEPSelections_SequenceNodeOfSequenceOfAssemblyComponent;
 class STEPSelections_SequenceOfAssemblyComponent  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       STEPSelections_SequenceOfAssemblyComponent();
diff --git a/inc/STEPSelections_SequenceOfAssemblyLink.hxx b/inc/STEPSelections_SequenceOfAssemblyLink.hxx
index 31a4a32..77ef493 100644
--- a/inc/STEPSelections_SequenceOfAssemblyLink.hxx
+++ b/inc/STEPSelections_SequenceOfAssemblyLink.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class STEPSelections_SequenceNodeOfSequenceOfAssemblyLink;
 class STEPSelections_SequenceOfAssemblyLink  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       STEPSelections_SequenceOfAssemblyLink();
diff --git a/inc/SWDRAW.hxx b/inc/SWDRAW.hxx
index 1082023..8ca1661 100644
--- a/inc/SWDRAW.hxx
+++ b/inc/SWDRAW.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class SWDRAW_ToVRML;
 class SWDRAW  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Loads commands defined in SWDRAW <br>
   Standard_EXPORT   static  void Init(Draw_Interpretor& theCommands) ;
diff --git a/inc/SWDRAW_ShapeAnalysis.hxx b/inc/SWDRAW_ShapeAnalysis.hxx
index 845d97a..a29051e 100644
--- a/inc/SWDRAW_ShapeAnalysis.hxx
+++ b/inc/SWDRAW_ShapeAnalysis.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class Draw_Interpretor;
 class SWDRAW_ShapeAnalysis  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Loads commands defined in ShapeAnalysis <br>
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/SWDRAW_ShapeBuild.hxx b/inc/SWDRAW_ShapeBuild.hxx
index cbde7d4..fc1cee5 100644
--- a/inc/SWDRAW_ShapeBuild.hxx
+++ b/inc/SWDRAW_ShapeBuild.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -21,18 +24,7 @@ class Draw_Interpretor;
 class SWDRAW_ShapeBuild  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Loads commands defined in ShapeBuild <br>
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/SWDRAW_ShapeConstruct.hxx b/inc/SWDRAW_ShapeConstruct.hxx
index 4a0c964..72166b9 100644
--- a/inc/SWDRAW_ShapeConstruct.hxx
+++ b/inc/SWDRAW_ShapeConstruct.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -21,18 +24,7 @@ class Draw_Interpretor;
 class SWDRAW_ShapeConstruct  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Loads commands defined in ShapeConstruct <br>
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/SWDRAW_ShapeCustom.hxx b/inc/SWDRAW_ShapeCustom.hxx
index 20a397c..17b046e 100644
--- a/inc/SWDRAW_ShapeCustom.hxx
+++ b/inc/SWDRAW_ShapeCustom.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@ class Draw_Interpretor;
 class SWDRAW_ShapeCustom  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Loads commands defined in ShapeCustom <br>
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/SWDRAW_ShapeExtend.hxx b/inc/SWDRAW_ShapeExtend.hxx
index fb653e8..f1a5ebf 100644
--- a/inc/SWDRAW_ShapeExtend.hxx
+++ b/inc/SWDRAW_ShapeExtend.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@ class Draw_Interpretor;
 class SWDRAW_ShapeExtend  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Loads commands defined in ShapeExtend <br>
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/SWDRAW_ShapeFix.hxx b/inc/SWDRAW_ShapeFix.hxx
index de70143..1c8b0f4 100644
--- a/inc/SWDRAW_ShapeFix.hxx
+++ b/inc/SWDRAW_ShapeFix.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Draw_Interpretor;
 class SWDRAW_ShapeFix  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Loads commands defined in ShapeFix <br>
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/SWDRAW_ShapeProcess.hxx b/inc/SWDRAW_ShapeProcess.hxx
index 680359a..2fdc716 100644
--- a/inc/SWDRAW_ShapeProcess.hxx
+++ b/inc/SWDRAW_ShapeProcess.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -20,18 +23,7 @@ class Draw_Interpretor;
 class SWDRAW_ShapeProcess  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Loads commands defined in ShapeProc <br>
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/SWDRAW_ShapeProcessAPI.hxx b/inc/SWDRAW_ShapeProcessAPI.hxx
index facb841..36a181e 100644
--- a/inc/SWDRAW_ShapeProcessAPI.hxx
+++ b/inc/SWDRAW_ShapeProcessAPI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -20,18 +23,7 @@ class Draw_Interpretor;
 class SWDRAW_ShapeProcessAPI  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Loads commands defined in ShapeProcessAPI <br>
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/SWDRAW_ShapeTool.hxx b/inc/SWDRAW_ShapeTool.hxx
index 7c4570f..3140b0b 100644
--- a/inc/SWDRAW_ShapeTool.hxx
+++ b/inc/SWDRAW_ShapeTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class Draw_Interpretor;
 class SWDRAW_ShapeTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines and loads all basic functions for SWDRAW on Shapes <br>
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/SWDRAW_ShapeUpgrade.hxx b/inc/SWDRAW_ShapeUpgrade.hxx
index 4860eab..f1a3b0f 100644
--- a/inc/SWDRAW_ShapeUpgrade.hxx
+++ b/inc/SWDRAW_ShapeUpgrade.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Draw_Interpretor;
 class SWDRAW_ShapeUpgrade  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Loads commands defined in ShapeUpgrade <br>
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/SWDRAW_ToVRML.hxx b/inc/SWDRAW_ToVRML.hxx
index 92fd007..2a4afa6 100644
--- a/inc/SWDRAW_ToVRML.hxx
+++ b/inc/SWDRAW_ToVRML.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopoDS_Shape;
 class SWDRAW_ToVRML  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SWDRAW_ToVRML();
diff --git a/inc/Select3D_ListIteratorOfListOfSensitive.hxx b/inc/Select3D_ListIteratorOfListOfSensitive.hxx
index 6f82ee3..bda190d 100644
--- a/inc/Select3D_ListIteratorOfListOfSensitive.hxx
+++ b/inc/Select3D_ListIteratorOfListOfSensitive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Select3D_ListNodeOfListOfSensitive;
 class Select3D_ListIteratorOfListOfSensitive  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Select3D_ListIteratorOfListOfSensitive();
diff --git a/inc/Select3D_ListIteratorOfListOfSensitiveTriangle.hxx b/inc/Select3D_ListIteratorOfListOfSensitiveTriangle.hxx
index dbc38c1..54b9bd8 100644
--- a/inc/Select3D_ListIteratorOfListOfSensitiveTriangle.hxx
+++ b/inc/Select3D_ListIteratorOfListOfSensitiveTriangle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Select3D_ListNodeOfListOfSensitiveTriangle;
 class Select3D_ListIteratorOfListOfSensitiveTriangle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Select3D_ListIteratorOfListOfSensitiveTriangle();
diff --git a/inc/Select3D_ListOfSensitive.hxx b/inc/Select3D_ListOfSensitive.hxx
index 12f6fad..38631f4 100644
--- a/inc/Select3D_ListOfSensitive.hxx
+++ b/inc/Select3D_ListOfSensitive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Select3D_ListNodeOfListOfSensitive;
 class Select3D_ListOfSensitive  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Select3D_ListOfSensitive();
diff --git a/inc/Select3D_ListOfSensitiveTriangle.hxx b/inc/Select3D_ListOfSensitiveTriangle.hxx
index 45535c7..855b178 100644
--- a/inc/Select3D_ListOfSensitiveTriangle.hxx
+++ b/inc/Select3D_ListOfSensitiveTriangle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Select3D_ListNodeOfListOfSensitiveTriangle;
 class Select3D_ListOfSensitiveTriangle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Select3D_ListOfSensitiveTriangle();
diff --git a/inc/Select3D_SensitiveEntitySequence.hxx b/inc/Select3D_SensitiveEntitySequence.hxx
index 1b01a6d..302c7b1 100644
--- a/inc/Select3D_SensitiveEntitySequence.hxx
+++ b/inc/Select3D_SensitiveEntitySequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Select3D_SequenceNodeOfSensitiveEntitySequence;
 class Select3D_SensitiveEntitySequence  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Select3D_SensitiveEntitySequence();
diff --git a/inc/SelectBasics.hxx b/inc/SelectBasics.hxx
index 20e713c..3f251db 100644
--- a/inc/SelectBasics.hxx
+++ b/inc/SelectBasics.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class SelectBasics_ListIteratorOfListOfSensitive;
 class SelectBasics  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer MaxOwnerPriority() ;
diff --git a/inc/SelectBasics_BasicTool.hxx b/inc/SelectBasics_BasicTool.hxx
index e3d6326..1f9709b 100644
--- a/inc/SelectBasics_BasicTool.hxx
+++ b/inc/SelectBasics_BasicTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TColgp_Array1OfPnt2d;
 class SelectBasics_BasicTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns True if The Segment {P1P2} is <br>
 //!          intersected by the segment {P3P4} <br>
diff --git a/inc/SelectBasics_ListIteratorOfListOfBox2d.hxx b/inc/SelectBasics_ListIteratorOfListOfBox2d.hxx
index 565d8d5..0eb1976 100644
--- a/inc/SelectBasics_ListIteratorOfListOfBox2d.hxx
+++ b/inc/SelectBasics_ListIteratorOfListOfBox2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class SelectBasics_ListNodeOfListOfBox2d;
 class SelectBasics_ListIteratorOfListOfBox2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectBasics_ListIteratorOfListOfBox2d();
diff --git a/inc/SelectBasics_ListIteratorOfListOfSensitive.hxx b/inc/SelectBasics_ListIteratorOfListOfSensitive.hxx
index d77991b..70e93fd 100644
--- a/inc/SelectBasics_ListIteratorOfListOfSensitive.hxx
+++ b/inc/SelectBasics_ListIteratorOfListOfSensitive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class SelectBasics_ListNodeOfListOfSensitive;
 class SelectBasics_ListIteratorOfListOfSensitive  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectBasics_ListIteratorOfListOfSensitive();
diff --git a/inc/SelectBasics_ListOfBox2d.hxx b/inc/SelectBasics_ListOfBox2d.hxx
index caa5734..2198cad 100644
--- a/inc/SelectBasics_ListOfBox2d.hxx
+++ b/inc/SelectBasics_ListOfBox2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class SelectBasics_ListNodeOfListOfBox2d;
 class SelectBasics_ListOfBox2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectBasics_ListOfBox2d();
diff --git a/inc/SelectBasics_ListOfSensitive.hxx b/inc/SelectBasics_ListOfSensitive.hxx
index 74823bb..2186162 100644
--- a/inc/SelectBasics_ListOfSensitive.hxx
+++ b/inc/SelectBasics_ListOfSensitive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class SelectBasics_ListNodeOfListOfSensitive;
 class SelectBasics_ListOfSensitive  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectBasics_ListOfSensitive();
diff --git a/inc/SelectBasics_SequenceOfOwner.hxx b/inc/SelectBasics_SequenceOfOwner.hxx
index b11166e..5e9825a 100644
--- a/inc/SelectBasics_SequenceOfOwner.hxx
+++ b/inc/SelectBasics_SequenceOfOwner.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class SelectBasics_SequenceNodeOfSequenceOfOwner;
 class SelectBasics_SequenceOfOwner  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       SelectBasics_SequenceOfOwner();
diff --git a/inc/SelectBasics_SortAlgo.hxx b/inc/SelectBasics_SortAlgo.hxx
index 29c11f7..ff39485 100644
--- a/inc/SelectBasics_SortAlgo.hxx
+++ b/inc/SelectBasics_SortAlgo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class Bnd_HArray1OfBox2d;
 class SelectBasics_SortAlgo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty rectangle selector. <br>
   Standard_EXPORT   SelectBasics_SortAlgo();
diff --git a/inc/SelectMgr_DataMapIteratorOfDataMapOfIntegerSensitive.hxx b/inc/SelectMgr_DataMapIteratorOfDataMapOfIntegerSensitive.hxx
index 06a4697..417af23 100644
--- a/inc/SelectMgr_DataMapIteratorOfDataMapOfIntegerSensitive.hxx
+++ b/inc/SelectMgr_DataMapIteratorOfDataMapOfIntegerSensitive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class SelectMgr_DataMapNodeOfDataMapOfIntegerSensitive;
 class SelectMgr_DataMapIteratorOfDataMapOfIntegerSensitive  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectMgr_DataMapIteratorOfDataMapOfIntegerSensitive();
diff --git a/inc/SelectMgr_DataMapIteratorOfDataMapOfObjectSelectors.hxx b/inc/SelectMgr_DataMapIteratorOfDataMapOfObjectSelectors.hxx
index 80ab8fc..e8ed8eb 100644
--- a/inc/SelectMgr_DataMapIteratorOfDataMapOfObjectSelectors.hxx
+++ b/inc/SelectMgr_DataMapIteratorOfDataMapOfObjectSelectors.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class SelectMgr_DataMapNodeOfDataMapOfObjectSelectors;
 class SelectMgr_DataMapIteratorOfDataMapOfObjectSelectors  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectMgr_DataMapIteratorOfDataMapOfObjectSelectors();
diff --git a/inc/SelectMgr_DataMapIteratorOfDataMapOfSelectionActivation.hxx b/inc/SelectMgr_DataMapIteratorOfDataMapOfSelectionActivation.hxx
index 6271197..586b6ef 100644
--- a/inc/SelectMgr_DataMapIteratorOfDataMapOfSelectionActivation.hxx
+++ b/inc/SelectMgr_DataMapIteratorOfDataMapOfSelectionActivation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class SelectMgr_DataMapNodeOfDataMapOfSelectionActivation;
 class SelectMgr_DataMapIteratorOfDataMapOfSelectionActivation  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectMgr_DataMapIteratorOfDataMapOfSelectionActivation();
diff --git a/inc/SelectMgr_DataMapOfIntegerSensitive.hxx b/inc/SelectMgr_DataMapOfIntegerSensitive.hxx
index b80ea49..d8c7920 100644
--- a/inc/SelectMgr_DataMapOfIntegerSensitive.hxx
+++ b/inc/SelectMgr_DataMapOfIntegerSensitive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class SelectMgr_DataMapIteratorOfDataMapOfIntegerSensitive;
 class SelectMgr_DataMapOfIntegerSensitive  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectMgr_DataMapOfIntegerSensitive(const Standard_Integer NbBuckets = 1);
diff --git a/inc/SelectMgr_DataMapOfObjectSelectors.hxx b/inc/SelectMgr_DataMapOfObjectSelectors.hxx
index fc2a7fc..db26edd 100644
--- a/inc/SelectMgr_DataMapOfObjectSelectors.hxx
+++ b/inc/SelectMgr_DataMapOfObjectSelectors.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class SelectMgr_DataMapIteratorOfDataMapOfObjectSelectors;
 class SelectMgr_DataMapOfObjectSelectors  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectMgr_DataMapOfObjectSelectors(const Standard_Integer NbBuckets = 1);
diff --git a/inc/SelectMgr_DataMapOfSelectionActivation.hxx b/inc/SelectMgr_DataMapOfSelectionActivation.hxx
index fdbb0b5..aa825b8 100644
--- a/inc/SelectMgr_DataMapOfSelectionActivation.hxx
+++ b/inc/SelectMgr_DataMapOfSelectionActivation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class SelectMgr_DataMapIteratorOfDataMapOfSelectionActivation;
 class SelectMgr_DataMapOfSelectionActivation  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectMgr_DataMapOfSelectionActivation(const Standard_Integer NbBuckets = 1);
diff --git a/inc/SelectMgr_IndexedDataMapOfOwnerCriterion.hxx b/inc/SelectMgr_IndexedDataMapOfOwnerCriterion.hxx
index f6703de..610de65 100644
--- a/inc/SelectMgr_IndexedDataMapOfOwnerCriterion.hxx
+++ b/inc/SelectMgr_IndexedDataMapOfOwnerCriterion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class SelectMgr_IndexedDataMapNodeOfIndexedDataMapOfOwnerCriterion;
 class SelectMgr_IndexedDataMapOfOwnerCriterion  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectMgr_IndexedDataMapOfOwnerCriterion(const Standard_Integer NbBuckets = 1);
diff --git a/inc/SelectMgr_IndexedMapOfOwner.hxx b/inc/SelectMgr_IndexedMapOfOwner.hxx
index ceb39a0..346eed0 100644
--- a/inc/SelectMgr_IndexedMapOfOwner.hxx
+++ b/inc/SelectMgr_IndexedMapOfOwner.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class SelectMgr_IndexedMapNodeOfIndexedMapOfOwner;
 class SelectMgr_IndexedMapOfOwner  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectMgr_IndexedMapOfOwner(const Standard_Integer NbBuckets = 1);
diff --git a/inc/SelectMgr_ListIteratorOfListOfFilter.hxx b/inc/SelectMgr_ListIteratorOfListOfFilter.hxx
index 1ebf526..9dbf014 100644
--- a/inc/SelectMgr_ListIteratorOfListOfFilter.hxx
+++ b/inc/SelectMgr_ListIteratorOfListOfFilter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class SelectMgr_ListNodeOfListOfFilter;
 class SelectMgr_ListIteratorOfListOfFilter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectMgr_ListIteratorOfListOfFilter();
diff --git a/inc/SelectMgr_ListOfFilter.hxx b/inc/SelectMgr_ListOfFilter.hxx
index 117f7ea..6dcafca 100644
--- a/inc/SelectMgr_ListOfFilter.hxx
+++ b/inc/SelectMgr_ListOfFilter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class SelectMgr_ListNodeOfListOfFilter;
 class SelectMgr_ListOfFilter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectMgr_ListOfFilter();
diff --git a/inc/SelectMgr_SequenceOfFilter.hxx b/inc/SelectMgr_SequenceOfFilter.hxx
index 2c58ee2..1013b5b 100644
--- a/inc/SelectMgr_SequenceOfFilter.hxx
+++ b/inc/SelectMgr_SequenceOfFilter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class SelectMgr_SequenceNodeOfSequenceOfFilter;
 class SelectMgr_SequenceOfFilter  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       SelectMgr_SequenceOfFilter();
diff --git a/inc/SelectMgr_SequenceOfOwner.hxx b/inc/SelectMgr_SequenceOfOwner.hxx
index cf98c05..17d83d7 100644
--- a/inc/SelectMgr_SequenceOfOwner.hxx
+++ b/inc/SelectMgr_SequenceOfOwner.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class SelectMgr_SequenceNodeOfSequenceOfOwner;
 class SelectMgr_SequenceOfOwner  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       SelectMgr_SequenceOfOwner();
diff --git a/inc/SelectMgr_SequenceOfSelection.hxx b/inc/SelectMgr_SequenceOfSelection.hxx
index dfda333..10298e3 100644
--- a/inc/SelectMgr_SequenceOfSelection.hxx
+++ b/inc/SelectMgr_SequenceOfSelection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class SelectMgr_SequenceNodeOfSequenceOfSelection;
 class SelectMgr_SequenceOfSelection  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       SelectMgr_SequenceOfSelection();
diff --git a/inc/SelectMgr_SequenceOfSelector.hxx b/inc/SelectMgr_SequenceOfSelector.hxx
index 8a4cf10..fae3169 100644
--- a/inc/SelectMgr_SequenceOfSelector.hxx
+++ b/inc/SelectMgr_SequenceOfSelector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class SelectMgr_SequenceNodeOfSequenceOfSelector;
 class SelectMgr_SequenceOfSelector  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       SelectMgr_SequenceOfSelector();
diff --git a/inc/SelectMgr_SortCriterion.hxx b/inc/SelectMgr_SortCriterion.hxx
index a2374e3..6a10128 100644
--- a/inc/SelectMgr_SortCriterion.hxx
+++ b/inc/SelectMgr_SortCriterion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@
 class SelectMgr_SortCriterion  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   SelectMgr_SortCriterion();
diff --git a/inc/ShapeAlgo.hxx b/inc/ShapeAlgo.hxx
index 5ba677b..523a9a0 100644
--- a/inc/ShapeAlgo.hxx
+++ b/inc/ShapeAlgo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class ShapeAlgo_AlgoContainer;
 class ShapeAlgo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Provides initerface to the algorithms from Shape Healing. <br>//! Creates and initializes default AlgoContainer. <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/ShapeAnalysis.hxx b/inc/ShapeAnalysis.hxx
index e936161..45450d6 100644
--- a/inc/ShapeAnalysis.hxx
+++ b/inc/ShapeAnalysis.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class ShapeAnalysis_DataMapIteratorOfDataMapOfShapeListOfReal;
 class ShapeAnalysis  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the outer wire on the face <Face>. <br>
 //!          This is replacement of the method BRepTools::OuterWire <br>
diff --git a/inc/ShapeAnalysis_CheckSmallFace.hxx b/inc/ShapeAnalysis_CheckSmallFace.hxx
index b71952a..280a685 100644
--- a/inc/ShapeAnalysis_CheckSmallFace.hxx
+++ b/inc/ShapeAnalysis_CheckSmallFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopTools_DataMapOfShapeShape;
 class ShapeAnalysis_CheckSmallFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!Creates an empty tool <br>//! Checks a Shape i.e. each of its faces, records checks as <br>
 //!           diagnostics in the <infos> <br>
diff --git a/inc/ShapeAnalysis_Curve.hxx b/inc/ShapeAnalysis_Curve.hxx
index 967cf30..d0f3722 100644
--- a/inc/ShapeAnalysis_Curve.hxx
+++ b/inc/ShapeAnalysis_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TColgp_SequenceOfPnt;
 class ShapeAnalysis_Curve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Projects a Point on a Curve. <br>
 //!           Computes the projected point and its parameter on the curve. <br>
diff --git a/inc/ShapeAnalysis_DataMapIteratorOfDataMapOfShapeListOfReal.hxx b/inc/ShapeAnalysis_DataMapIteratorOfDataMapOfShapeListOfReal.hxx
index 43ccda6..9ebc64f 100644
--- a/inc/ShapeAnalysis_DataMapIteratorOfDataMapOfShapeListOfReal.hxx
+++ b/inc/ShapeAnalysis_DataMapIteratorOfDataMapOfShapeListOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class ShapeAnalysis_DataMapNodeOfDataMapOfShapeListOfReal;
 class ShapeAnalysis_DataMapIteratorOfDataMapOfShapeListOfReal  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeAnalysis_DataMapIteratorOfDataMapOfShapeListOfReal();
diff --git a/inc/ShapeAnalysis_DataMapOfShapeListOfReal.hxx b/inc/ShapeAnalysis_DataMapOfShapeListOfReal.hxx
index 94f46a7..a0d9928 100644
--- a/inc/ShapeAnalysis_DataMapOfShapeListOfReal.hxx
+++ b/inc/ShapeAnalysis_DataMapOfShapeListOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class ShapeAnalysis_DataMapIteratorOfDataMapOfShapeListOfReal;
 class ShapeAnalysis_DataMapOfShapeListOfReal  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeAnalysis_DataMapOfShapeListOfReal(const Standard_Integer NbBuckets = 1);
diff --git a/inc/ShapeAnalysis_Edge.hxx b/inc/ShapeAnalysis_Edge.hxx
index 07c9a45..a9340f8 100644
--- a/inc/ShapeAnalysis_Edge.hxx
+++ b/inc/ShapeAnalysis_Edge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class gp_Pnt;
 class ShapeAnalysis_Edge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor; initialises Status to OK <br>
   Standard_EXPORT   ShapeAnalysis_Edge();
diff --git a/inc/ShapeAnalysis_FreeBounds.hxx b/inc/ShapeAnalysis_FreeBounds.hxx
index 61505d8..2e91624 100644
--- a/inc/ShapeAnalysis_FreeBounds.hxx
+++ b/inc/ShapeAnalysis_FreeBounds.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TopTools_DataMapOfShapeShape;
 class ShapeAnalysis_FreeBounds  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   ShapeAnalysis_FreeBounds();
diff --git a/inc/ShapeAnalysis_FreeBoundsProperties.hxx b/inc/ShapeAnalysis_FreeBoundsProperties.hxx
index 516a7ae..f243587 100644
--- a/inc/ShapeAnalysis_FreeBoundsProperties.hxx
+++ b/inc/ShapeAnalysis_FreeBoundsProperties.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopoDS_Wire;
 class ShapeAnalysis_FreeBoundsProperties  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   ShapeAnalysis_FreeBoundsProperties();
diff --git a/inc/ShapeAnalysis_Geom.hxx b/inc/ShapeAnalysis_Geom.hxx
index f63505d..fc05412 100644
--- a/inc/ShapeAnalysis_Geom.hxx
+++ b/inc/ShapeAnalysis_Geom.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Trsf;
 class ShapeAnalysis_Geom  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Builds a plane out of a set of points in array <br>
 //!           Returns in <dmax> the maximal distance between the produced <br>
diff --git a/inc/ShapeAnalysis_SequenceOfFreeBounds.hxx b/inc/ShapeAnalysis_SequenceOfFreeBounds.hxx
index 6dae76e..2e99958 100644
--- a/inc/ShapeAnalysis_SequenceOfFreeBounds.hxx
+++ b/inc/ShapeAnalysis_SequenceOfFreeBounds.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class ShapeAnalysis_SequenceNodeOfSequenceOfFreeBounds;
 class ShapeAnalysis_SequenceOfFreeBounds  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       ShapeAnalysis_SequenceOfFreeBounds();
diff --git a/inc/ShapeAnalysis_ShapeContents.hxx b/inc/ShapeAnalysis_ShapeContents.hxx
index cb9698f..c3275d0 100644
--- a/inc/ShapeAnalysis_ShapeContents.hxx
+++ b/inc/ShapeAnalysis_ShapeContents.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopoDS_Shape;
 class ShapeAnalysis_ShapeContents  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initialize fields and call ClearFlags() <br>
   Standard_EXPORT   ShapeAnalysis_ShapeContents();
diff --git a/inc/ShapeAnalysis_ShapeTolerance.hxx b/inc/ShapeAnalysis_ShapeTolerance.hxx
index e8b4bde..2628e2c 100644
--- a/inc/ShapeAnalysis_ShapeTolerance.hxx
+++ b/inc/ShapeAnalysis_ShapeTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopTools_HSequenceOfShape;
 class ShapeAnalysis_ShapeTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   ShapeAnalysis_ShapeTolerance();
diff --git a/inc/ShapeAnalysis_Shell.hxx b/inc/ShapeAnalysis_Shell.hxx
index a33e5a6..ada3965 100644
--- a/inc/ShapeAnalysis_Shell.hxx
+++ b/inc/ShapeAnalysis_Shell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopoDS_Compound;
 class ShapeAnalysis_Shell  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Clears data about loaded shells and performed checks <br>
   Standard_EXPORT     void Clear() ;
diff --git a/inc/ShapeAnalysis_WireOrder.hxx b/inc/ShapeAnalysis_WireOrder.hxx
index c908110..5e40970 100644
--- a/inc/ShapeAnalysis_WireOrder.hxx
+++ b/inc/ShapeAnalysis_WireOrder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class gp_XY;
 class ShapeAnalysis_WireOrder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   ShapeAnalysis_WireOrder();
diff --git a/inc/ShapeAnalysis_WireVertex.hxx b/inc/ShapeAnalysis_WireVertex.hxx
index 99368b1..3d0bc51 100644
--- a/inc/ShapeAnalysis_WireVertex.hxx
+++ b/inc/ShapeAnalysis_WireVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class gp_XYZ;
 class ShapeAnalysis_WireVertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   ShapeAnalysis_WireVertex();
diff --git a/inc/ShapeBuild.hxx b/inc/ShapeBuild.hxx
index 823e420..7b782ed 100644
--- a/inc/ShapeBuild.hxx
+++ b/inc/ShapeBuild.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class ShapeBuild_ReShape;
 class ShapeBuild  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a Geom_Surface which is the Plane XOY (Z positive) <br>
 //!          This allows to consider an UV space homologous to a 3D space, <br>
diff --git a/inc/ShapeBuild_Edge.hxx b/inc/ShapeBuild_Edge.hxx
index abfa608..7a19318 100644
--- a/inc/ShapeBuild_Edge.hxx
+++ b/inc/ShapeBuild_Edge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Geom_Curve;
 class ShapeBuild_Edge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Copy edge and replace one or both its vertices to a given <br>
 //!          one(s). Vertex V1 replaces FORWARD vertex, and V2 - REVERSED, <br>
diff --git a/inc/ShapeBuild_Vertex.hxx b/inc/ShapeBuild_Vertex.hxx
index 803c76c..095b7d1 100644
--- a/inc/ShapeBuild_Vertex.hxx
+++ b/inc/ShapeBuild_Vertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class gp_Pnt;
 class ShapeBuild_Vertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Combines new vertex from two others. This new one is the <br>
 //!          smallest vertex which comprises both of the source vertices. <br>
diff --git a/inc/ShapeConstruct.hxx b/inc/ShapeConstruct.hxx
index 62cc054..870b44b 100644
--- a/inc/ShapeConstruct.hxx
+++ b/inc/ShapeConstruct.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -76,18 +79,7 @@ class ShapeConstruct_MakeTriangulation;
 class ShapeConstruct  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Geom_BSplineCurve ConvertCurveToBSpline(const Handle(Geom_Curve)& C3D,const Standard_Real First,const Standard_Real Last,const Standard_Real Tol3d,const GeomAbs_Shape Continuity,const Standard_Integer MaxSegments,const Standard_Integer MaxDegree) ;
diff --git a/inc/ShapeConstruct_CompBezierCurves2dToBSplineCurve2d.hxx b/inc/ShapeConstruct_CompBezierCurves2dToBSplineCurve2d.hxx
index 5cebb83..e83e99d 100644
--- a/inc/ShapeConstruct_CompBezierCurves2dToBSplineCurve2d.hxx
+++ b/inc/ShapeConstruct_CompBezierCurves2dToBSplineCurve2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class TColStd_Array1OfInteger;
 class ShapeConstruct_CompBezierCurves2dToBSplineCurve2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeConstruct_CompBezierCurves2dToBSplineCurve2d(const Standard_Real AngularTolerance = 1.0e-4);
diff --git a/inc/ShapeConstruct_CompBezierCurvesToBSplineCurve.hxx b/inc/ShapeConstruct_CompBezierCurvesToBSplineCurve.hxx
index 6a206fd..c2a6488 100644
--- a/inc/ShapeConstruct_CompBezierCurvesToBSplineCurve.hxx
+++ b/inc/ShapeConstruct_CompBezierCurvesToBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class TColStd_Array1OfInteger;
 class ShapeConstruct_CompBezierCurvesToBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeConstruct_CompBezierCurvesToBSplineCurve(const Standard_Real AngularTolerance = 1.0e-4);
diff --git a/inc/ShapeConstruct_Curve.hxx b/inc/ShapeConstruct_Curve.hxx
index 7e0b392..985899f 100644
--- a/inc/ShapeConstruct_Curve.hxx
+++ b/inc/ShapeConstruct_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TColStd_Array1OfReal;
 class ShapeConstruct_Curve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Modifies a curve in order to make its bounds confused with <br>
 //!           given points. <br>
diff --git a/inc/ShapeConstruct_MakeTriangulation.hxx b/inc/ShapeConstruct_MakeTriangulation.hxx
index c810647..fbaae9a 100644
--- a/inc/ShapeConstruct_MakeTriangulation.hxx
+++ b/inc/ShapeConstruct_MakeTriangulation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopoDS_Wire;
 class ShapeConstruct_MakeTriangulation  : public BRepBuilderAPI_MakeShape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeConstruct_MakeTriangulation(const TColgp_Array1OfPnt& pnts,const Standard_Real prec = 0.0);
diff --git a/inc/ShapeCustom.hxx b/inc/ShapeCustom.hxx
index cae2a17..f0b5b82 100644
--- a/inc/ShapeCustom.hxx
+++ b/inc/ShapeCustom.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class ShapeCustom_ConvertToBSpline;
 class ShapeCustom  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Applies modifier to shape and checks sharing in the case assemblies. <br>
   Standard_EXPORT   static  TopoDS_Shape ApplyModifier(const TopoDS_Shape& S,const Handle(BRepTools_Modification)& M,TopTools_DataMapOfShapeShape& context,BRepTools_Modifier& MD) ;
diff --git a/inc/ShapeCustom_Curve.hxx b/inc/ShapeCustom_Curve.hxx
index 3a4124f..136c670 100644
--- a/inc/ShapeCustom_Curve.hxx
+++ b/inc/ShapeCustom_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Geom_Curve;
 class ShapeCustom_Curve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeCustom_Curve();
diff --git a/inc/ShapeCustom_Curve2d.hxx b/inc/ShapeCustom_Curve2d.hxx
index 7a89ac9..5b0e5ba 100644
--- a/inc/ShapeCustom_Curve2d.hxx
+++ b/inc/ShapeCustom_Curve2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Geom2d_BSplineCurve;
 class ShapeCustom_Curve2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Check if poleses is in the plane with given precision <br>
 //!          Returns false if no. <br>
diff --git a/inc/ShapeCustom_Surface.hxx b/inc/ShapeCustom_Surface.hxx
index 00b81f2..17c25ef 100644
--- a/inc/ShapeCustom_Surface.hxx
+++ b/inc/ShapeCustom_Surface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_Surface;
 class ShapeCustom_Surface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeCustom_Surface();
diff --git a/inc/ShapeExtend.hxx b/inc/ShapeExtend.hxx
index f0e70e1..f10d239 100644
--- a/inc/ShapeExtend.hxx
+++ b/inc/ShapeExtend.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class ShapeExtend_DataMapIteratorOfDataMapOfTransientListOfMsg;
 class ShapeExtend  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Inits using of ShapeExtend. <br>
 //!          Currently, loads messages output by ShapeHealing algorithms. <br>
diff --git a/inc/ShapeExtend_DataMapIteratorOfDataMapOfShapeListOfMsg.hxx b/inc/ShapeExtend_DataMapIteratorOfDataMapOfShapeListOfMsg.hxx
index 3ce3907..e704bd1 100644
--- a/inc/ShapeExtend_DataMapIteratorOfDataMapOfShapeListOfMsg.hxx
+++ b/inc/ShapeExtend_DataMapIteratorOfDataMapOfShapeListOfMsg.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class ShapeExtend_DataMapNodeOfDataMapOfShapeListOfMsg;
 class ShapeExtend_DataMapIteratorOfDataMapOfShapeListOfMsg  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeExtend_DataMapIteratorOfDataMapOfShapeListOfMsg();
diff --git a/inc/ShapeExtend_DataMapIteratorOfDataMapOfTransientListOfMsg.hxx b/inc/ShapeExtend_DataMapIteratorOfDataMapOfTransientListOfMsg.hxx
index c27439e..b48469c 100644
--- a/inc/ShapeExtend_DataMapIteratorOfDataMapOfTransientListOfMsg.hxx
+++ b/inc/ShapeExtend_DataMapIteratorOfDataMapOfTransientListOfMsg.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class ShapeExtend_DataMapNodeOfDataMapOfTransientListOfMsg;
 class ShapeExtend_DataMapIteratorOfDataMapOfTransientListOfMsg  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeExtend_DataMapIteratorOfDataMapOfTransientListOfMsg();
diff --git a/inc/ShapeExtend_DataMapOfShapeListOfMsg.hxx b/inc/ShapeExtend_DataMapOfShapeListOfMsg.hxx
index a908784..cab3f7f 100644
--- a/inc/ShapeExtend_DataMapOfShapeListOfMsg.hxx
+++ b/inc/ShapeExtend_DataMapOfShapeListOfMsg.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class ShapeExtend_DataMapIteratorOfDataMapOfShapeListOfMsg;
 class ShapeExtend_DataMapOfShapeListOfMsg  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeExtend_DataMapOfShapeListOfMsg(const Standard_Integer NbBuckets = 1);
diff --git a/inc/ShapeExtend_DataMapOfTransientListOfMsg.hxx b/inc/ShapeExtend_DataMapOfTransientListOfMsg.hxx
index 28a437b..be4eb7e 100644
--- a/inc/ShapeExtend_DataMapOfTransientListOfMsg.hxx
+++ b/inc/ShapeExtend_DataMapOfTransientListOfMsg.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class ShapeExtend_DataMapIteratorOfDataMapOfTransientListOfMsg;
 class ShapeExtend_DataMapOfTransientListOfMsg  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeExtend_DataMapOfTransientListOfMsg(const Standard_Integer NbBuckets = 1);
diff --git a/inc/ShapeExtend_Explorer.hxx b/inc/ShapeExtend_Explorer.hxx
index 54447ee..1249320 100644
--- a/inc/ShapeExtend_Explorer.hxx
+++ b/inc/ShapeExtend_Explorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TopTools_ListOfShape;
 class ShapeExtend_Explorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an object Explorer <br>
   Standard_EXPORT   ShapeExtend_Explorer();
diff --git a/inc/ShapeFix.hxx b/inc/ShapeFix.hxx
index ecf93b9..6d2858a 100644
--- a/inc/ShapeFix.hxx
+++ b/inc/ShapeFix.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class ShapeFix_DataMapIteratorOfDataMapOfShapeBox2d;
 class ShapeFix  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Runs SameParameter from BRepLib with these adaptations : <br>
 //!           <enforce> forces computations, else they are made only on <br>
diff --git a/inc/ShapeFix_DataMapIteratorOfDataMapOfShapeBox2d.hxx b/inc/ShapeFix_DataMapIteratorOfDataMapOfShapeBox2d.hxx
index 30695ff..e10952e 100644
--- a/inc/ShapeFix_DataMapIteratorOfDataMapOfShapeBox2d.hxx
+++ b/inc/ShapeFix_DataMapIteratorOfDataMapOfShapeBox2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class ShapeFix_DataMapNodeOfDataMapOfShapeBox2d;
 class ShapeFix_DataMapIteratorOfDataMapOfShapeBox2d  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeFix_DataMapIteratorOfDataMapOfShapeBox2d();
diff --git a/inc/ShapeFix_DataMapOfShapeBox2d.hxx b/inc/ShapeFix_DataMapOfShapeBox2d.hxx
index 0e2c5b5..04155cf 100644
--- a/inc/ShapeFix_DataMapOfShapeBox2d.hxx
+++ b/inc/ShapeFix_DataMapOfShapeBox2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class ShapeFix_DataMapIteratorOfDataMapOfShapeBox2d;
 class ShapeFix_DataMapOfShapeBox2d  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeFix_DataMapOfShapeBox2d(const Standard_Integer NbBuckets = 1);
diff --git a/inc/ShapeFix_EdgeConnect.hxx b/inc/ShapeFix_EdgeConnect.hxx
index 5c9e828..6cae2ff 100644
--- a/inc/ShapeFix_EdgeConnect.hxx
+++ b/inc/ShapeFix_EdgeConnect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Shape;
 class ShapeFix_EdgeConnect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeFix_EdgeConnect();
diff --git a/inc/ShapeFix_Face.lxx b/inc/ShapeFix_Face.lxx
index 27d817c..5c7cbd7 100644
--- a/inc/ShapeFix_Face.lxx
+++ b/inc/ShapeFix_Face.lxx
@@ -108,6 +108,16 @@ inline Standard_Integer& ShapeFix_Face::AutoCorrectPrecisionMode()
 }
 
 //=======================================================================
+//function : FixPeriodicDegeneratedMode
+//purpose  : 
+//=======================================================================
+
+inline Standard_Integer& ShapeFix_Face::FixPeriodicDegeneratedMode()
+{
+  return myFixPeriodicDegenerated;
+}
+
+//=======================================================================
 //function : Face
 //purpose  : 
 //=======================================================================
diff --git a/inc/ShapeFix_FaceConnect.hxx b/inc/ShapeFix_FaceConnect.hxx
index a65ac56..d08f535 100644
--- a/inc/ShapeFix_FaceConnect.hxx
+++ b/inc/ShapeFix_FaceConnect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopoDS_Shell;
 class ShapeFix_FaceConnect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeFix_FaceConnect();
diff --git a/inc/ShapeFix_FreeBounds.hxx b/inc/ShapeFix_FreeBounds.hxx
index 68b5302..5b62b74 100644
--- a/inc/ShapeFix_FreeBounds.hxx
+++ b/inc/ShapeFix_FreeBounds.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TopoDS_Compound;
 class ShapeFix_FreeBounds  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   ShapeFix_FreeBounds();
diff --git a/inc/ShapeFix_IntersectionTool.hxx b/inc/ShapeFix_IntersectionTool.hxx
index 0213af1..5d2cea9 100644
--- a/inc/ShapeFix_IntersectionTool.hxx
+++ b/inc/ShapeFix_IntersectionTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class Geom2d_Curve;
 class ShapeFix_IntersectionTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructor <br>
   Standard_EXPORT   ShapeFix_IntersectionTool(const Handle(ShapeBuild_ReShape)& context,const Standard_Real preci,const Standard_Real maxtol = 1.0);
diff --git a/inc/ShapeFix_SequenceOfWireSegment.hxx b/inc/ShapeFix_SequenceOfWireSegment.hxx
index 7a1d8bc..60ff17a 100644
--- a/inc/ShapeFix_SequenceOfWireSegment.hxx
+++ b/inc/ShapeFix_SequenceOfWireSegment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class ShapeFix_SequenceNodeOfSequenceOfWireSegment;
 class ShapeFix_SequenceOfWireSegment  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       ShapeFix_SequenceOfWireSegment();
diff --git a/inc/ShapeFix_ShapeTolerance.hxx b/inc/ShapeFix_ShapeTolerance.hxx
index 6aac8d8..602722b 100644
--- a/inc/ShapeFix_ShapeTolerance.hxx
+++ b/inc/ShapeFix_ShapeTolerance.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Shape;
 class ShapeFix_ShapeTolerance  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeFix_ShapeTolerance();
diff --git a/inc/ShapeFix_SplitTool.hxx b/inc/ShapeFix_SplitTool.hxx
index 4731e16..329d93f 100644
--- a/inc/ShapeFix_SplitTool.hxx
+++ b/inc/ShapeFix_SplitTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class ShapeBuild_ReShape;
 class ShapeFix_SplitTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   ShapeFix_SplitTool();
diff --git a/inc/ShapeFix_WireSegment.hxx b/inc/ShapeFix_WireSegment.hxx
index 50059fb..5ff5b58 100644
--- a/inc/ShapeFix_WireSegment.hxx
+++ b/inc/ShapeFix_WireSegment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TopoDS_Edge;
 class ShapeFix_WireSegment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates empty segment. <br>
   Standard_EXPORT   ShapeFix_WireSegment();
diff --git a/inc/ShapeFix_WireVertex.hxx b/inc/ShapeFix_WireVertex.hxx
index 0047837..bfb29ae 100644
--- a/inc/ShapeFix_WireVertex.hxx
+++ b/inc/ShapeFix_WireVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class ShapeAnalysis_WireVertex;
 class ShapeFix_WireVertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeFix_WireVertex();
diff --git a/inc/ShapeProcess.hxx b/inc/ShapeProcess.hxx
index 369dbfb..c61db2f 100644
--- a/inc/ShapeProcess.hxx
+++ b/inc/ShapeProcess.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class ShapeProcess_StackItemOfDictionaryOfOperator;
 class ShapeProcess  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Registers operator to make it visible for Performer <br>
   Standard_EXPORT   static  Standard_Boolean RegisterOperator(const Standard_CString name,const Handle(ShapeProcess_Operator)& op) ;
diff --git a/inc/ShapeProcessAPI_ApplySequence.hxx b/inc/ShapeProcessAPI_ApplySequence.hxx
index b2c4929..64845f7 100644
--- a/inc/ShapeProcessAPI_ApplySequence.hxx
+++ b/inc/ShapeProcessAPI_ApplySequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopTools_DataMapOfShapeShape;
 class ShapeProcessAPI_ApplySequence  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an object and loads resource file and sequence of <br>
 //!          operators given by their names. <br>
diff --git a/inc/ShapeProcess_DictionaryOfOperator.hxx b/inc/ShapeProcess_DictionaryOfOperator.hxx
index 9548c59..2d6db67 100644
--- a/inc/ShapeProcess_DictionaryOfOperator.hxx
+++ b/inc/ShapeProcess_DictionaryOfOperator.hxx
@@ -37,6 +37,9 @@
 #ifndef _Standard_CString_HeaderFile
 #include <Standard_CString.hxx>
 #endif
+#ifndef _Standard_Size_HeaderFile
+#include <Standard_Size.hxx>
+#endif
 #ifndef _Standard_Integer_HeaderFile
 #include <Standard_Integer.hxx>
 #endif
@@ -117,9 +120,9 @@ private:
   
   Standard_EXPORT     void SetNext(const Handle(ShapeProcess_DictionaryOfOperator)& acell) ;
   
-  Standard_EXPORT     void SearchCell(const Standard_CString name,const Standard_Integer lmax,const Standard_Character car,const Standard_Integer level,Handle(ShapeProcess_DictionaryOfOperator)& acell,Standard_Integer& reslev,Standard_Integer& stat) const;
+  Standard_EXPORT     void SearchCell(const Standard_CString name,const Standard_Size lmax,const Standard_Character car,const Standard_Size level,Handle(ShapeProcess_DictionaryOfOperator)& acell,Standard_Size& reslev,Standard_Integer& stat) const;
   
-  Standard_EXPORT     void NewCell(const Standard_CString name,const Standard_Integer namlen,Handle(ShapeProcess_DictionaryOfOperator)& acell,const Standard_Integer reslev,const Standard_Integer stat) ;
+  Standard_EXPORT     void NewCell(const Standard_CString name,const Standard_Size namlen,Handle(ShapeProcess_DictionaryOfOperator)& acell,const Standard_Size reslev,const Standard_Integer stat) ;
   
   Standard_EXPORT     Standard_Boolean HasIt() const;
   
diff --git a/inc/ShapeProcess_IteratorOfDictionaryOfOperator.hxx b/inc/ShapeProcess_IteratorOfDictionaryOfOperator.hxx
index 881014f..84a55ed 100644
--- a/inc/ShapeProcess_IteratorOfDictionaryOfOperator.hxx
+++ b/inc/ShapeProcess_IteratorOfDictionaryOfOperator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TCollection_AsciiString;
 class ShapeProcess_IteratorOfDictionaryOfOperator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeProcess_IteratorOfDictionaryOfOperator(const Handle(ShapeProcess_DictionaryOfOperator)& acell);
diff --git a/inc/ShapeProcess_OperLibrary.hxx b/inc/ShapeProcess_OperLibrary.hxx
index 61d0fa7..5b37db7 100644
--- a/inc/ShapeProcess_OperLibrary.hxx
+++ b/inc/ShapeProcess_OperLibrary.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopTools_DataMapOfShapeShape;
 class ShapeProcess_OperLibrary  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Registers all the operators <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/ShapeSchema.hxx b/inc/ShapeSchema.hxx
index 31804ea..e4e32a8 100644
--- a/inc/ShapeSchema.hxx
+++ b/inc/ShapeSchema.hxx
@@ -245,10 +245,26 @@ class PColStd_FieldOfHArray1OfReal;
 class PColStd_FieldOfHArray1OfInteger;
 class PColStd_FieldOfHArray2OfReal;
 class DBC_VArrayOfExtCharacter;
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Schema)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_HeaderFile
 #define _ShapeSchema_HeaderFile
diff --git a/inc/ShapeSchema_DBC_VArrayOfCharacter.hxx b/inc/ShapeSchema_DBC_VArrayOfCharacter.hxx
index 0bcc3be..2fb8ba9 100644
--- a/inc/ShapeSchema_DBC_VArrayOfCharacter.hxx
+++ b/inc/ShapeSchema_DBC_VArrayOfCharacter.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_DBC_VArrayOfCharacter_HeaderFile
 #define _ShapeSchema_DBC_VArrayOfCharacter_HeaderFile
diff --git a/inc/ShapeSchema_DBC_VArrayOfExtCharacter.hxx b/inc/ShapeSchema_DBC_VArrayOfExtCharacter.hxx
index b924bd8..cf8309f 100644
--- a/inc/ShapeSchema_DBC_VArrayOfExtCharacter.hxx
+++ b/inc/ShapeSchema_DBC_VArrayOfExtCharacter.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_DBC_VArrayOfExtCharacter_HeaderFile
 #define _ShapeSchema_DBC_VArrayOfExtCharacter_HeaderFile
diff --git a/inc/ShapeSchema_ObjMgt_ExternRef.hxx b/inc/ShapeSchema_ObjMgt_ExternRef.hxx
index afa5a16..f8e0316 100644
--- a/inc/ShapeSchema_ObjMgt_ExternRef.hxx
+++ b/inc/ShapeSchema_ObjMgt_ExternRef.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_ObjMgt_ExternRef_HeaderFile
 #define _ShapeSchema_ObjMgt_ExternRef_HeaderFile
diff --git a/inc/ShapeSchema_ObjMgt_ExternShareable.hxx b/inc/ShapeSchema_ObjMgt_ExternShareable.hxx
index 830f38b..3e5df37 100644
--- a/inc/ShapeSchema_ObjMgt_ExternShareable.hxx
+++ b/inc/ShapeSchema_ObjMgt_ExternShareable.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_ObjMgt_ExternShareable_HeaderFile
 #define _ShapeSchema_ObjMgt_ExternShareable_HeaderFile
diff --git a/inc/ShapeSchema_ObjMgt_PSeqOfExtRef.hxx b/inc/ShapeSchema_ObjMgt_PSeqOfExtRef.hxx
index 86e363e..bf88468 100644
--- a/inc/ShapeSchema_ObjMgt_PSeqOfExtRef.hxx
+++ b/inc/ShapeSchema_ObjMgt_PSeqOfExtRef.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_ObjMgt_PSeqOfExtRef_HeaderFile
 #define _ShapeSchema_ObjMgt_PSeqOfExtRef_HeaderFile
diff --git a/inc/ShapeSchema_ObjMgt_SeqNodeOfPSeqOfExtRef.hxx b/inc/ShapeSchema_ObjMgt_SeqNodeOfPSeqOfExtRef.hxx
index 5da4312..0b06e85 100644
--- a/inc/ShapeSchema_ObjMgt_SeqNodeOfPSeqOfExtRef.hxx
+++ b/inc/ShapeSchema_ObjMgt_SeqNodeOfPSeqOfExtRef.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_ObjMgt_SeqNodeOfPSeqOfExtRef_HeaderFile
 #define _ShapeSchema_ObjMgt_SeqNodeOfPSeqOfExtRef_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_Curve3D.hxx b/inc/ShapeSchema_PBRep_Curve3D.hxx
index 0bd70c0..a2b18a6 100644
--- a/inc/ShapeSchema_PBRep_Curve3D.hxx
+++ b/inc/ShapeSchema_PBRep_Curve3D.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_Curve3D_HeaderFile
 #define _ShapeSchema_PBRep_Curve3D_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_CurveOn2Surfaces.hxx b/inc/ShapeSchema_PBRep_CurveOn2Surfaces.hxx
index 9bfb619..70adf82 100644
--- a/inc/ShapeSchema_PBRep_CurveOn2Surfaces.hxx
+++ b/inc/ShapeSchema_PBRep_CurveOn2Surfaces.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_CurveOn2Surfaces_HeaderFile
 #define _ShapeSchema_PBRep_CurveOn2Surfaces_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_CurveOnClosedSurface.hxx b/inc/ShapeSchema_PBRep_CurveOnClosedSurface.hxx
index 0f0c387..18e6b79 100644
--- a/inc/ShapeSchema_PBRep_CurveOnClosedSurface.hxx
+++ b/inc/ShapeSchema_PBRep_CurveOnClosedSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_CurveOnClosedSurface_HeaderFile
 #define _ShapeSchema_PBRep_CurveOnClosedSurface_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_CurveOnSurface.hxx b/inc/ShapeSchema_PBRep_CurveOnSurface.hxx
index 8acaf31..0b28cf3 100644
--- a/inc/ShapeSchema_PBRep_CurveOnSurface.hxx
+++ b/inc/ShapeSchema_PBRep_CurveOnSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_CurveOnSurface_HeaderFile
 #define _ShapeSchema_PBRep_CurveOnSurface_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_CurveRepresentation.hxx b/inc/ShapeSchema_PBRep_CurveRepresentation.hxx
index dc782bf..1e04ea4 100644
--- a/inc/ShapeSchema_PBRep_CurveRepresentation.hxx
+++ b/inc/ShapeSchema_PBRep_CurveRepresentation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_CurveRepresentation_HeaderFile
 #define _ShapeSchema_PBRep_CurveRepresentation_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_GCurve.hxx b/inc/ShapeSchema_PBRep_GCurve.hxx
index 0a04741..b8e1db3 100644
--- a/inc/ShapeSchema_PBRep_GCurve.hxx
+++ b/inc/ShapeSchema_PBRep_GCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_GCurve_HeaderFile
 #define _ShapeSchema_PBRep_GCurve_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_PointOnCurve.hxx b/inc/ShapeSchema_PBRep_PointOnCurve.hxx
index 03f631c..59545c9 100644
--- a/inc/ShapeSchema_PBRep_PointOnCurve.hxx
+++ b/inc/ShapeSchema_PBRep_PointOnCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_PointOnCurve_HeaderFile
 #define _ShapeSchema_PBRep_PointOnCurve_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_PointOnCurveOnSurface.hxx b/inc/ShapeSchema_PBRep_PointOnCurveOnSurface.hxx
index 115cc54..ed48a87 100644
--- a/inc/ShapeSchema_PBRep_PointOnCurveOnSurface.hxx
+++ b/inc/ShapeSchema_PBRep_PointOnCurveOnSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_PointOnCurveOnSurface_HeaderFile
 #define _ShapeSchema_PBRep_PointOnCurveOnSurface_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_PointOnSurface.hxx b/inc/ShapeSchema_PBRep_PointOnSurface.hxx
index 6c7d1cc..1044b11 100644
--- a/inc/ShapeSchema_PBRep_PointOnSurface.hxx
+++ b/inc/ShapeSchema_PBRep_PointOnSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_PointOnSurface_HeaderFile
 #define _ShapeSchema_PBRep_PointOnSurface_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_PointRepresentation.hxx b/inc/ShapeSchema_PBRep_PointRepresentation.hxx
index e0fe658..27742a3 100644
--- a/inc/ShapeSchema_PBRep_PointRepresentation.hxx
+++ b/inc/ShapeSchema_PBRep_PointRepresentation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_PointRepresentation_HeaderFile
 #define _ShapeSchema_PBRep_PointRepresentation_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_PointsOnSurface.hxx b/inc/ShapeSchema_PBRep_PointsOnSurface.hxx
index b322ad7..e28499c 100644
--- a/inc/ShapeSchema_PBRep_PointsOnSurface.hxx
+++ b/inc/ShapeSchema_PBRep_PointsOnSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_PointsOnSurface_HeaderFile
 #define _ShapeSchema_PBRep_PointsOnSurface_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_Polygon3D.hxx b/inc/ShapeSchema_PBRep_Polygon3D.hxx
index 45a8a85..b7bb3d5 100644
--- a/inc/ShapeSchema_PBRep_Polygon3D.hxx
+++ b/inc/ShapeSchema_PBRep_Polygon3D.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_Polygon3D_HeaderFile
 #define _ShapeSchema_PBRep_Polygon3D_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_PolygonOnClosedSurface.hxx b/inc/ShapeSchema_PBRep_PolygonOnClosedSurface.hxx
index 9df21e2..c1df176 100644
--- a/inc/ShapeSchema_PBRep_PolygonOnClosedSurface.hxx
+++ b/inc/ShapeSchema_PBRep_PolygonOnClosedSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_PolygonOnClosedSurface_HeaderFile
 #define _ShapeSchema_PBRep_PolygonOnClosedSurface_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_PolygonOnClosedTriangulation.hxx b/inc/ShapeSchema_PBRep_PolygonOnClosedTriangulation.hxx
index 1135b16..8c766cd 100644
--- a/inc/ShapeSchema_PBRep_PolygonOnClosedTriangulation.hxx
+++ b/inc/ShapeSchema_PBRep_PolygonOnClosedTriangulation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_PolygonOnClosedTriangulation_HeaderFile
 #define _ShapeSchema_PBRep_PolygonOnClosedTriangulation_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_PolygonOnSurface.hxx b/inc/ShapeSchema_PBRep_PolygonOnSurface.hxx
index 20bdb44..23e2b2b 100644
--- a/inc/ShapeSchema_PBRep_PolygonOnSurface.hxx
+++ b/inc/ShapeSchema_PBRep_PolygonOnSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_PolygonOnSurface_HeaderFile
 #define _ShapeSchema_PBRep_PolygonOnSurface_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_PolygonOnTriangulation.hxx b/inc/ShapeSchema_PBRep_PolygonOnTriangulation.hxx
index 16dff58..ab048ca 100644
--- a/inc/ShapeSchema_PBRep_PolygonOnTriangulation.hxx
+++ b/inc/ShapeSchema_PBRep_PolygonOnTriangulation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_PolygonOnTriangulation_HeaderFile
 #define _ShapeSchema_PBRep_PolygonOnTriangulation_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_TEdge.hxx b/inc/ShapeSchema_PBRep_TEdge.hxx
index 987f9e8..081ba1a 100644
--- a/inc/ShapeSchema_PBRep_TEdge.hxx
+++ b/inc/ShapeSchema_PBRep_TEdge.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_TEdge_HeaderFile
 #define _ShapeSchema_PBRep_TEdge_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_TEdge1.hxx b/inc/ShapeSchema_PBRep_TEdge1.hxx
index e794971..efa7f13 100644
--- a/inc/ShapeSchema_PBRep_TEdge1.hxx
+++ b/inc/ShapeSchema_PBRep_TEdge1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_TEdge1_HeaderFile
 #define _ShapeSchema_PBRep_TEdge1_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_TFace.hxx b/inc/ShapeSchema_PBRep_TFace.hxx
index 56385ec..561e888 100644
--- a/inc/ShapeSchema_PBRep_TFace.hxx
+++ b/inc/ShapeSchema_PBRep_TFace.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_TFace_HeaderFile
 #define _ShapeSchema_PBRep_TFace_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_TFace1.hxx b/inc/ShapeSchema_PBRep_TFace1.hxx
index fa76ed1..65efbf2 100644
--- a/inc/ShapeSchema_PBRep_TFace1.hxx
+++ b/inc/ShapeSchema_PBRep_TFace1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_TFace1_HeaderFile
 #define _ShapeSchema_PBRep_TFace1_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_TVertex.hxx b/inc/ShapeSchema_PBRep_TVertex.hxx
index 2c55574..d096afd 100644
--- a/inc/ShapeSchema_PBRep_TVertex.hxx
+++ b/inc/ShapeSchema_PBRep_TVertex.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_TVertex_HeaderFile
 #define _ShapeSchema_PBRep_TVertex_HeaderFile
diff --git a/inc/ShapeSchema_PBRep_TVertex1.hxx b/inc/ShapeSchema_PBRep_TVertex1.hxx
index 4335a0e..e6334b6 100644
--- a/inc/ShapeSchema_PBRep_TVertex1.hxx
+++ b/inc/ShapeSchema_PBRep_TVertex1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PBRep_TVertex1_HeaderFile
 #define _ShapeSchema_PBRep_TVertex1_HeaderFile
diff --git a/inc/ShapeSchema_PCDMShape_Document.hxx b/inc/ShapeSchema_PCDMShape_Document.hxx
index 2bf0486..432ff5d 100644
--- a/inc/ShapeSchema_PCDMShape_Document.hxx
+++ b/inc/ShapeSchema_PCDMShape_Document.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PCDMShape_Document_HeaderFile
 #define _ShapeSchema_PCDMShape_Document_HeaderFile
diff --git a/inc/ShapeSchema_PCDM_Document.hxx b/inc/ShapeSchema_PCDM_Document.hxx
index 57fab99..4055187 100644
--- a/inc/ShapeSchema_PCDM_Document.hxx
+++ b/inc/ShapeSchema_PCDM_Document.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PCDM_Document_HeaderFile
 #define _ShapeSchema_PCDM_Document_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfBSplineCurve.hxx b/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfBSplineCurve.hxx
index be5f89d..3b6d0bd 100644
--- a/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfBSplineCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfBSplineCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom2d_FieldOfHArray1OfBSplineCurve_HeaderFile
 #define _ShapeSchema_PColPGeom2d_FieldOfHArray1OfBSplineCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfBezierCurve.hxx b/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfBezierCurve.hxx
index 885af7b..d07e41a 100644
--- a/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfBezierCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfBezierCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom2d_FieldOfHArray1OfBezierCurve_HeaderFile
 #define _ShapeSchema_PColPGeom2d_FieldOfHArray1OfBezierCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfBoundedCurve.hxx b/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfBoundedCurve.hxx
index 2ffbf68..13e5a5e 100644
--- a/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfBoundedCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfBoundedCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom2d_FieldOfHArray1OfBoundedCurve_HeaderFile
 #define _ShapeSchema_PColPGeom2d_FieldOfHArray1OfBoundedCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfCurve.hxx b/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfCurve.hxx
index 92cb7ca..a1d4434 100644
--- a/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom2d_FieldOfHArray1OfCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom2d_FieldOfHArray1OfCurve_HeaderFile
 #define _ShapeSchema_PColPGeom2d_FieldOfHArray1OfCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom2d_HArray1OfBSplineCurve.hxx b/inc/ShapeSchema_PColPGeom2d_HArray1OfBSplineCurve.hxx
index 2843a1c..c8d30d8 100644
--- a/inc/ShapeSchema_PColPGeom2d_HArray1OfBSplineCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom2d_HArray1OfBSplineCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom2d_HArray1OfBSplineCurve_HeaderFile
 #define _ShapeSchema_PColPGeom2d_HArray1OfBSplineCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom2d_HArray1OfBezierCurve.hxx b/inc/ShapeSchema_PColPGeom2d_HArray1OfBezierCurve.hxx
index 4f47fe3..2a60375 100644
--- a/inc/ShapeSchema_PColPGeom2d_HArray1OfBezierCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom2d_HArray1OfBezierCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom2d_HArray1OfBezierCurve_HeaderFile
 #define _ShapeSchema_PColPGeom2d_HArray1OfBezierCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom2d_HArray1OfBoundedCurve.hxx b/inc/ShapeSchema_PColPGeom2d_HArray1OfBoundedCurve.hxx
index d189a10..ade70be 100644
--- a/inc/ShapeSchema_PColPGeom2d_HArray1OfBoundedCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom2d_HArray1OfBoundedCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom2d_HArray1OfBoundedCurve_HeaderFile
 #define _ShapeSchema_PColPGeom2d_HArray1OfBoundedCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom2d_HArray1OfCurve.hxx b/inc/ShapeSchema_PColPGeom2d_HArray1OfCurve.hxx
index 3a76705..5e4cd88 100644
--- a/inc/ShapeSchema_PColPGeom2d_HArray1OfCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom2d_HArray1OfCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom2d_HArray1OfCurve_HeaderFile
 #define _ShapeSchema_PColPGeom2d_HArray1OfCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBSplineCurve.hxx b/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBSplineCurve.hxx
index cec5af9..083a97e 100644
--- a/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBSplineCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBSplineCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_FieldOfHArray1OfBSplineCurve_HeaderFile
 #define _ShapeSchema_PColPGeom_FieldOfHArray1OfBSplineCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBezierCurve.hxx b/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBezierCurve.hxx
index 0414789..8e2d5ab 100644
--- a/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBezierCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBezierCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_FieldOfHArray1OfBezierCurve_HeaderFile
 #define _ShapeSchema_PColPGeom_FieldOfHArray1OfBezierCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBoundedCurve.hxx b/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBoundedCurve.hxx
index cc0490b..b9a8465 100644
--- a/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBoundedCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBoundedCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_FieldOfHArray1OfBoundedCurve_HeaderFile
 #define _ShapeSchema_PColPGeom_FieldOfHArray1OfBoundedCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBoundedSurface.hxx b/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBoundedSurface.hxx
index 50405d8..14ca557 100644
--- a/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBoundedSurface.hxx
+++ b/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfBoundedSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_FieldOfHArray1OfBoundedSurface_HeaderFile
 #define _ShapeSchema_PColPGeom_FieldOfHArray1OfBoundedSurface_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfCurve.hxx b/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfCurve.hxx
index b975a3e..d679e41 100644
--- a/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_FieldOfHArray1OfCurve_HeaderFile
 #define _ShapeSchema_PColPGeom_FieldOfHArray1OfCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfSurface.hxx b/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfSurface.hxx
index 92758d0..8ad7d4a 100644
--- a/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfSurface.hxx
+++ b/inc/ShapeSchema_PColPGeom_FieldOfHArray1OfSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_FieldOfHArray1OfSurface_HeaderFile
 #define _ShapeSchema_PColPGeom_FieldOfHArray1OfSurface_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfBSplineSurface.hxx b/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfBSplineSurface.hxx
index 0535020..194b6da 100644
--- a/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfBSplineSurface.hxx
+++ b/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfBSplineSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_FieldOfHArray2OfBSplineSurface_HeaderFile
 #define _ShapeSchema_PColPGeom_FieldOfHArray2OfBSplineSurface_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfBezierSurface.hxx b/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfBezierSurface.hxx
index a7976bb..78e71d2 100644
--- a/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfBezierSurface.hxx
+++ b/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfBezierSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_FieldOfHArray2OfBezierSurface_HeaderFile
 #define _ShapeSchema_PColPGeom_FieldOfHArray2OfBezierSurface_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfBoundedSurface.hxx b/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfBoundedSurface.hxx
index 63a5af4..4ae0694 100644
--- a/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfBoundedSurface.hxx
+++ b/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfBoundedSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_FieldOfHArray2OfBoundedSurface_HeaderFile
 #define _ShapeSchema_PColPGeom_FieldOfHArray2OfBoundedSurface_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfSurface.hxx b/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfSurface.hxx
index 07edd48..2fdf955 100644
--- a/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfSurface.hxx
+++ b/inc/ShapeSchema_PColPGeom_FieldOfHArray2OfSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_FieldOfHArray2OfSurface_HeaderFile
 #define _ShapeSchema_PColPGeom_FieldOfHArray2OfSurface_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_HArray1OfBSplineCurve.hxx b/inc/ShapeSchema_PColPGeom_HArray1OfBSplineCurve.hxx
index 8c8173a..df45c43 100644
--- a/inc/ShapeSchema_PColPGeom_HArray1OfBSplineCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom_HArray1OfBSplineCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_HArray1OfBSplineCurve_HeaderFile
 #define _ShapeSchema_PColPGeom_HArray1OfBSplineCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_HArray1OfBezierCurve.hxx b/inc/ShapeSchema_PColPGeom_HArray1OfBezierCurve.hxx
index 71350f7..3c113c2 100644
--- a/inc/ShapeSchema_PColPGeom_HArray1OfBezierCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom_HArray1OfBezierCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_HArray1OfBezierCurve_HeaderFile
 #define _ShapeSchema_PColPGeom_HArray1OfBezierCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_HArray1OfBoundedCurve.hxx b/inc/ShapeSchema_PColPGeom_HArray1OfBoundedCurve.hxx
index 23c1691..098b974 100644
--- a/inc/ShapeSchema_PColPGeom_HArray1OfBoundedCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom_HArray1OfBoundedCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_HArray1OfBoundedCurve_HeaderFile
 #define _ShapeSchema_PColPGeom_HArray1OfBoundedCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_HArray1OfBoundedSurface.hxx b/inc/ShapeSchema_PColPGeom_HArray1OfBoundedSurface.hxx
index a4cd9d1..4a1cc5a 100644
--- a/inc/ShapeSchema_PColPGeom_HArray1OfBoundedSurface.hxx
+++ b/inc/ShapeSchema_PColPGeom_HArray1OfBoundedSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_HArray1OfBoundedSurface_HeaderFile
 #define _ShapeSchema_PColPGeom_HArray1OfBoundedSurface_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_HArray1OfCurve.hxx b/inc/ShapeSchema_PColPGeom_HArray1OfCurve.hxx
index 5823ce5..76967cc 100644
--- a/inc/ShapeSchema_PColPGeom_HArray1OfCurve.hxx
+++ b/inc/ShapeSchema_PColPGeom_HArray1OfCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_HArray1OfCurve_HeaderFile
 #define _ShapeSchema_PColPGeom_HArray1OfCurve_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_HArray1OfSurface.hxx b/inc/ShapeSchema_PColPGeom_HArray1OfSurface.hxx
index b4179fa..688fc01 100644
--- a/inc/ShapeSchema_PColPGeom_HArray1OfSurface.hxx
+++ b/inc/ShapeSchema_PColPGeom_HArray1OfSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_HArray1OfSurface_HeaderFile
 #define _ShapeSchema_PColPGeom_HArray1OfSurface_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_HArray2OfBSplineSurface.hxx b/inc/ShapeSchema_PColPGeom_HArray2OfBSplineSurface.hxx
index 146203d..efe4623 100644
--- a/inc/ShapeSchema_PColPGeom_HArray2OfBSplineSurface.hxx
+++ b/inc/ShapeSchema_PColPGeom_HArray2OfBSplineSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_HArray2OfBSplineSurface_HeaderFile
 #define _ShapeSchema_PColPGeom_HArray2OfBSplineSurface_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_HArray2OfBezierSurface.hxx b/inc/ShapeSchema_PColPGeom_HArray2OfBezierSurface.hxx
index 405d5cf..f8a0c7b 100644
--- a/inc/ShapeSchema_PColPGeom_HArray2OfBezierSurface.hxx
+++ b/inc/ShapeSchema_PColPGeom_HArray2OfBezierSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_HArray2OfBezierSurface_HeaderFile
 #define _ShapeSchema_PColPGeom_HArray2OfBezierSurface_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_HArray2OfBoundedSurface.hxx b/inc/ShapeSchema_PColPGeom_HArray2OfBoundedSurface.hxx
index f3e5f3d..8267b2f 100644
--- a/inc/ShapeSchema_PColPGeom_HArray2OfBoundedSurface.hxx
+++ b/inc/ShapeSchema_PColPGeom_HArray2OfBoundedSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_HArray2OfBoundedSurface_HeaderFile
 #define _ShapeSchema_PColPGeom_HArray2OfBoundedSurface_HeaderFile
diff --git a/inc/ShapeSchema_PColPGeom_HArray2OfSurface.hxx b/inc/ShapeSchema_PColPGeom_HArray2OfSurface.hxx
index 6255ffa..4c27d69 100644
--- a/inc/ShapeSchema_PColPGeom_HArray2OfSurface.hxx
+++ b/inc/ShapeSchema_PColPGeom_HArray2OfSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColPGeom_HArray2OfSurface_HeaderFile
 #define _ShapeSchema_PColPGeom_HArray2OfSurface_HeaderFile
diff --git a/inc/ShapeSchema_PColStd_FieldOfHArray1OfInteger.hxx b/inc/ShapeSchema_PColStd_FieldOfHArray1OfInteger.hxx
index 31ab32d..0520d15 100644
--- a/inc/ShapeSchema_PColStd_FieldOfHArray1OfInteger.hxx
+++ b/inc/ShapeSchema_PColStd_FieldOfHArray1OfInteger.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColStd_FieldOfHArray1OfInteger_HeaderFile
 #define _ShapeSchema_PColStd_FieldOfHArray1OfInteger_HeaderFile
diff --git a/inc/ShapeSchema_PColStd_FieldOfHArray1OfReal.hxx b/inc/ShapeSchema_PColStd_FieldOfHArray1OfReal.hxx
index 4e90c5c..b8fbcbb 100644
--- a/inc/ShapeSchema_PColStd_FieldOfHArray1OfReal.hxx
+++ b/inc/ShapeSchema_PColStd_FieldOfHArray1OfReal.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColStd_FieldOfHArray1OfReal_HeaderFile
 #define _ShapeSchema_PColStd_FieldOfHArray1OfReal_HeaderFile
diff --git a/inc/ShapeSchema_PColStd_FieldOfHArray2OfReal.hxx b/inc/ShapeSchema_PColStd_FieldOfHArray2OfReal.hxx
index 6d817fd..7900156 100644
--- a/inc/ShapeSchema_PColStd_FieldOfHArray2OfReal.hxx
+++ b/inc/ShapeSchema_PColStd_FieldOfHArray2OfReal.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColStd_FieldOfHArray2OfReal_HeaderFile
 #define _ShapeSchema_PColStd_FieldOfHArray2OfReal_HeaderFile
diff --git a/inc/ShapeSchema_PColStd_HArray1OfInteger.hxx b/inc/ShapeSchema_PColStd_HArray1OfInteger.hxx
index a3e29fd..3524266 100644
--- a/inc/ShapeSchema_PColStd_HArray1OfInteger.hxx
+++ b/inc/ShapeSchema_PColStd_HArray1OfInteger.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColStd_HArray1OfInteger_HeaderFile
 #define _ShapeSchema_PColStd_HArray1OfInteger_HeaderFile
diff --git a/inc/ShapeSchema_PColStd_HArray1OfReal.hxx b/inc/ShapeSchema_PColStd_HArray1OfReal.hxx
index 738eaa3..374a8cf 100644
--- a/inc/ShapeSchema_PColStd_HArray1OfReal.hxx
+++ b/inc/ShapeSchema_PColStd_HArray1OfReal.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColStd_HArray1OfReal_HeaderFile
 #define _ShapeSchema_PColStd_HArray1OfReal_HeaderFile
diff --git a/inc/ShapeSchema_PColStd_HArray2OfReal.hxx b/inc/ShapeSchema_PColStd_HArray2OfReal.hxx
index bd8c0da..eedf19e 100644
--- a/inc/ShapeSchema_PColStd_HArray2OfReal.hxx
+++ b/inc/ShapeSchema_PColStd_HArray2OfReal.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColStd_HArray2OfReal_HeaderFile
 #define _ShapeSchema_PColStd_HArray2OfReal_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray1OfCirc2d.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray1OfCirc2d.hxx
index bf77cc4..c87f511 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray1OfCirc2d.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray1OfCirc2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray1OfCirc2d_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray1OfCirc2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray1OfDir.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray1OfDir.hxx
index cb451e8..7209b99 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray1OfDir.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray1OfDir.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray1OfDir_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray1OfDir_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray1OfDir2d.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray1OfDir2d.hxx
index 3e2048c..f86336d 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray1OfDir2d.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray1OfDir2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray1OfDir2d_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray1OfDir2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray1OfLin2d.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray1OfLin2d.hxx
index c0cc0fc..896f3b0 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray1OfLin2d.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray1OfLin2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray1OfLin2d_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray1OfLin2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray1OfPnt.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray1OfPnt.hxx
index fa088f9..7855642 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray1OfPnt.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray1OfPnt.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray1OfPnt_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray1OfPnt_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray1OfPnt2d.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray1OfPnt2d.hxx
index d7b515d..610d757 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray1OfPnt2d.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray1OfPnt2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray1OfPnt2d_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray1OfPnt2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray1OfVec.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray1OfVec.hxx
index 0e1c524..bc7225b 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray1OfVec.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray1OfVec.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray1OfVec_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray1OfVec_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray1OfVec2d.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray1OfVec2d.hxx
index 20e4acb..da5e73c 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray1OfVec2d.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray1OfVec2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray1OfVec2d_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray1OfVec2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray1OfXY.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray1OfXY.hxx
index 2bf3d26..5696ccf 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray1OfXY.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray1OfXY.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray1OfXY_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray1OfXY_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray1OfXYZ.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray1OfXYZ.hxx
index 5340fe4..a8dae31 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray1OfXYZ.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray1OfXYZ.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray1OfXYZ_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray1OfXYZ_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray2OfCirc2d.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray2OfCirc2d.hxx
index c57136c..bbcdcdc 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray2OfCirc2d.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray2OfCirc2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray2OfCirc2d_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray2OfCirc2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray2OfDir.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray2OfDir.hxx
index b3f3ef9..994902a 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray2OfDir.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray2OfDir.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray2OfDir_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray2OfDir_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray2OfDir2d.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray2OfDir2d.hxx
index 553b300..58449a7 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray2OfDir2d.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray2OfDir2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray2OfDir2d_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray2OfDir2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray2OfLin2d.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray2OfLin2d.hxx
index 2a41d64..6b21f5d 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray2OfLin2d.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray2OfLin2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray2OfLin2d_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray2OfLin2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray2OfPnt.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray2OfPnt.hxx
index 69c00f3..7cb7d41 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray2OfPnt.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray2OfPnt.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray2OfPnt_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray2OfPnt_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray2OfPnt2d.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray2OfPnt2d.hxx
index 7e637bd..7de7723 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray2OfPnt2d.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray2OfPnt2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray2OfPnt2d_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray2OfPnt2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray2OfVec.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray2OfVec.hxx
index 581e573..464f3b3 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray2OfVec.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray2OfVec.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray2OfVec_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray2OfVec_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray2OfVec2d.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray2OfVec2d.hxx
index cc3cec9..162243f 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray2OfVec2d.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray2OfVec2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray2OfVec2d_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray2OfVec2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray2OfXY.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray2OfXY.hxx
index d24f24a..c8d1e30 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray2OfXY.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray2OfXY.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray2OfXY_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray2OfXY_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_FieldOfHArray2OfXYZ.hxx b/inc/ShapeSchema_PColgp_FieldOfHArray2OfXYZ.hxx
index ec5cd0e..bdc6eab 100644
--- a/inc/ShapeSchema_PColgp_FieldOfHArray2OfXYZ.hxx
+++ b/inc/ShapeSchema_PColgp_FieldOfHArray2OfXYZ.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_FieldOfHArray2OfXYZ_HeaderFile
 #define _ShapeSchema_PColgp_FieldOfHArray2OfXYZ_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray1OfCirc2d.hxx b/inc/ShapeSchema_PColgp_HArray1OfCirc2d.hxx
index cf317e5..9c820f7 100644
--- a/inc/ShapeSchema_PColgp_HArray1OfCirc2d.hxx
+++ b/inc/ShapeSchema_PColgp_HArray1OfCirc2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray1OfCirc2d_HeaderFile
 #define _ShapeSchema_PColgp_HArray1OfCirc2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray1OfDir.hxx b/inc/ShapeSchema_PColgp_HArray1OfDir.hxx
index 27eebb6..2ed0d33 100644
--- a/inc/ShapeSchema_PColgp_HArray1OfDir.hxx
+++ b/inc/ShapeSchema_PColgp_HArray1OfDir.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray1OfDir_HeaderFile
 #define _ShapeSchema_PColgp_HArray1OfDir_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray1OfDir2d.hxx b/inc/ShapeSchema_PColgp_HArray1OfDir2d.hxx
index a3d7c04..7393c50 100644
--- a/inc/ShapeSchema_PColgp_HArray1OfDir2d.hxx
+++ b/inc/ShapeSchema_PColgp_HArray1OfDir2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray1OfDir2d_HeaderFile
 #define _ShapeSchema_PColgp_HArray1OfDir2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray1OfLin2d.hxx b/inc/ShapeSchema_PColgp_HArray1OfLin2d.hxx
index c081c0b..5a26e10 100644
--- a/inc/ShapeSchema_PColgp_HArray1OfLin2d.hxx
+++ b/inc/ShapeSchema_PColgp_HArray1OfLin2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray1OfLin2d_HeaderFile
 #define _ShapeSchema_PColgp_HArray1OfLin2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray1OfPnt.hxx b/inc/ShapeSchema_PColgp_HArray1OfPnt.hxx
index c96cbd3..33479b7 100644
--- a/inc/ShapeSchema_PColgp_HArray1OfPnt.hxx
+++ b/inc/ShapeSchema_PColgp_HArray1OfPnt.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray1OfPnt_HeaderFile
 #define _ShapeSchema_PColgp_HArray1OfPnt_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray1OfPnt2d.hxx b/inc/ShapeSchema_PColgp_HArray1OfPnt2d.hxx
index 174e394..2e4aa7b 100644
--- a/inc/ShapeSchema_PColgp_HArray1OfPnt2d.hxx
+++ b/inc/ShapeSchema_PColgp_HArray1OfPnt2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray1OfPnt2d_HeaderFile
 #define _ShapeSchema_PColgp_HArray1OfPnt2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray1OfVec.hxx b/inc/ShapeSchema_PColgp_HArray1OfVec.hxx
index 081d7d6..60d9924 100644
--- a/inc/ShapeSchema_PColgp_HArray1OfVec.hxx
+++ b/inc/ShapeSchema_PColgp_HArray1OfVec.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray1OfVec_HeaderFile
 #define _ShapeSchema_PColgp_HArray1OfVec_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray1OfVec2d.hxx b/inc/ShapeSchema_PColgp_HArray1OfVec2d.hxx
index d85a4a0..5c61b32 100644
--- a/inc/ShapeSchema_PColgp_HArray1OfVec2d.hxx
+++ b/inc/ShapeSchema_PColgp_HArray1OfVec2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray1OfVec2d_HeaderFile
 #define _ShapeSchema_PColgp_HArray1OfVec2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray1OfXY.hxx b/inc/ShapeSchema_PColgp_HArray1OfXY.hxx
index 871a146..c4217c7 100644
--- a/inc/ShapeSchema_PColgp_HArray1OfXY.hxx
+++ b/inc/ShapeSchema_PColgp_HArray1OfXY.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray1OfXY_HeaderFile
 #define _ShapeSchema_PColgp_HArray1OfXY_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray1OfXYZ.hxx b/inc/ShapeSchema_PColgp_HArray1OfXYZ.hxx
index ba28dc3..f2589a1 100644
--- a/inc/ShapeSchema_PColgp_HArray1OfXYZ.hxx
+++ b/inc/ShapeSchema_PColgp_HArray1OfXYZ.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray1OfXYZ_HeaderFile
 #define _ShapeSchema_PColgp_HArray1OfXYZ_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray2OfCirc2d.hxx b/inc/ShapeSchema_PColgp_HArray2OfCirc2d.hxx
index d0c7935..ed69466 100644
--- a/inc/ShapeSchema_PColgp_HArray2OfCirc2d.hxx
+++ b/inc/ShapeSchema_PColgp_HArray2OfCirc2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray2OfCirc2d_HeaderFile
 #define _ShapeSchema_PColgp_HArray2OfCirc2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray2OfDir.hxx b/inc/ShapeSchema_PColgp_HArray2OfDir.hxx
index 03a8e10..cb79b43 100644
--- a/inc/ShapeSchema_PColgp_HArray2OfDir.hxx
+++ b/inc/ShapeSchema_PColgp_HArray2OfDir.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray2OfDir_HeaderFile
 #define _ShapeSchema_PColgp_HArray2OfDir_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray2OfDir2d.hxx b/inc/ShapeSchema_PColgp_HArray2OfDir2d.hxx
index 3d96a65..509b886 100644
--- a/inc/ShapeSchema_PColgp_HArray2OfDir2d.hxx
+++ b/inc/ShapeSchema_PColgp_HArray2OfDir2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray2OfDir2d_HeaderFile
 #define _ShapeSchema_PColgp_HArray2OfDir2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray2OfLin2d.hxx b/inc/ShapeSchema_PColgp_HArray2OfLin2d.hxx
index 7fdbc7e..97d8209 100644
--- a/inc/ShapeSchema_PColgp_HArray2OfLin2d.hxx
+++ b/inc/ShapeSchema_PColgp_HArray2OfLin2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray2OfLin2d_HeaderFile
 #define _ShapeSchema_PColgp_HArray2OfLin2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray2OfPnt.hxx b/inc/ShapeSchema_PColgp_HArray2OfPnt.hxx
index 8967050..c3ffd92 100644
--- a/inc/ShapeSchema_PColgp_HArray2OfPnt.hxx
+++ b/inc/ShapeSchema_PColgp_HArray2OfPnt.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray2OfPnt_HeaderFile
 #define _ShapeSchema_PColgp_HArray2OfPnt_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray2OfPnt2d.hxx b/inc/ShapeSchema_PColgp_HArray2OfPnt2d.hxx
index bbbe446..7b4ad05 100644
--- a/inc/ShapeSchema_PColgp_HArray2OfPnt2d.hxx
+++ b/inc/ShapeSchema_PColgp_HArray2OfPnt2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray2OfPnt2d_HeaderFile
 #define _ShapeSchema_PColgp_HArray2OfPnt2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray2OfVec.hxx b/inc/ShapeSchema_PColgp_HArray2OfVec.hxx
index 6ad4efd..e4a3279 100644
--- a/inc/ShapeSchema_PColgp_HArray2OfVec.hxx
+++ b/inc/ShapeSchema_PColgp_HArray2OfVec.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray2OfVec_HeaderFile
 #define _ShapeSchema_PColgp_HArray2OfVec_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray2OfVec2d.hxx b/inc/ShapeSchema_PColgp_HArray2OfVec2d.hxx
index 6074150..94fa8b6 100644
--- a/inc/ShapeSchema_PColgp_HArray2OfVec2d.hxx
+++ b/inc/ShapeSchema_PColgp_HArray2OfVec2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray2OfVec2d_HeaderFile
 #define _ShapeSchema_PColgp_HArray2OfVec2d_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray2OfXY.hxx b/inc/ShapeSchema_PColgp_HArray2OfXY.hxx
index 7cfc8cd..670bce9 100644
--- a/inc/ShapeSchema_PColgp_HArray2OfXY.hxx
+++ b/inc/ShapeSchema_PColgp_HArray2OfXY.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray2OfXY_HeaderFile
 #define _ShapeSchema_PColgp_HArray2OfXY_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HArray2OfXYZ.hxx b/inc/ShapeSchema_PColgp_HArray2OfXYZ.hxx
index 4c5a969..603c366 100644
--- a/inc/ShapeSchema_PColgp_HArray2OfXYZ.hxx
+++ b/inc/ShapeSchema_PColgp_HArray2OfXYZ.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HArray2OfXYZ_HeaderFile
 #define _ShapeSchema_PColgp_HArray2OfXYZ_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HSequenceOfDir.hxx b/inc/ShapeSchema_PColgp_HSequenceOfDir.hxx
index ab99612..6c8983a 100644
--- a/inc/ShapeSchema_PColgp_HSequenceOfDir.hxx
+++ b/inc/ShapeSchema_PColgp_HSequenceOfDir.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HSequenceOfDir_HeaderFile
 #define _ShapeSchema_PColgp_HSequenceOfDir_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HSequenceOfPnt.hxx b/inc/ShapeSchema_PColgp_HSequenceOfPnt.hxx
index 86819e9..068ea99 100644
--- a/inc/ShapeSchema_PColgp_HSequenceOfPnt.hxx
+++ b/inc/ShapeSchema_PColgp_HSequenceOfPnt.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HSequenceOfPnt_HeaderFile
 #define _ShapeSchema_PColgp_HSequenceOfPnt_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HSequenceOfVec.hxx b/inc/ShapeSchema_PColgp_HSequenceOfVec.hxx
index e5cca98..84bab64 100644
--- a/inc/ShapeSchema_PColgp_HSequenceOfVec.hxx
+++ b/inc/ShapeSchema_PColgp_HSequenceOfVec.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HSequenceOfVec_HeaderFile
 #define _ShapeSchema_PColgp_HSequenceOfVec_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_HSequenceOfXYZ.hxx b/inc/ShapeSchema_PColgp_HSequenceOfXYZ.hxx
index fb9a5f0..6af2b61 100644
--- a/inc/ShapeSchema_PColgp_HSequenceOfXYZ.hxx
+++ b/inc/ShapeSchema_PColgp_HSequenceOfXYZ.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_HSequenceOfXYZ_HeaderFile
 #define _ShapeSchema_PColgp_HSequenceOfXYZ_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfDir.hxx b/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfDir.hxx
index d250326..cac671a 100644
--- a/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfDir.hxx
+++ b/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfDir.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_SeqNodeOfHSequenceOfDir_HeaderFile
 #define _ShapeSchema_PColgp_SeqNodeOfHSequenceOfDir_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfPnt.hxx b/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfPnt.hxx
index 468b4e9..f2d6b48 100644
--- a/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfPnt.hxx
+++ b/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfPnt.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_SeqNodeOfHSequenceOfPnt_HeaderFile
 #define _ShapeSchema_PColgp_SeqNodeOfHSequenceOfPnt_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfVec.hxx b/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfVec.hxx
index c041cc4..515bd65 100644
--- a/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfVec.hxx
+++ b/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfVec.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_SeqNodeOfHSequenceOfVec_HeaderFile
 #define _ShapeSchema_PColgp_SeqNodeOfHSequenceOfVec_HeaderFile
diff --git a/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfXYZ.hxx b/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfXYZ.hxx
index 27f8c07..2db1212 100644
--- a/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfXYZ.hxx
+++ b/inc/ShapeSchema_PColgp_SeqNodeOfHSequenceOfXYZ.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PColgp_SeqNodeOfHSequenceOfXYZ_HeaderFile
 #define _ShapeSchema_PColgp_SeqNodeOfHSequenceOfXYZ_HeaderFile
diff --git a/inc/ShapeSchema_PCollection_HAsciiString.hxx b/inc/ShapeSchema_PCollection_HAsciiString.hxx
index 78098d5..9819ecc 100644
--- a/inc/ShapeSchema_PCollection_HAsciiString.hxx
+++ b/inc/ShapeSchema_PCollection_HAsciiString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PCollection_HAsciiString_HeaderFile
 #define _ShapeSchema_PCollection_HAsciiString_HeaderFile
diff --git a/inc/ShapeSchema_PCollection_HExtendedString.hxx b/inc/ShapeSchema_PCollection_HExtendedString.hxx
index 82aa55f..a8e85a5 100644
--- a/inc/ShapeSchema_PCollection_HExtendedString.hxx
+++ b/inc/ShapeSchema_PCollection_HExtendedString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PCollection_HExtendedString_HeaderFile
 #define _ShapeSchema_PCollection_HExtendedString_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_AxisPlacement.hxx b/inc/ShapeSchema_PGeom2d_AxisPlacement.hxx
index 32b0a0b..596e1fd 100644
--- a/inc/ShapeSchema_PGeom2d_AxisPlacement.hxx
+++ b/inc/ShapeSchema_PGeom2d_AxisPlacement.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_AxisPlacement_HeaderFile
 #define _ShapeSchema_PGeom2d_AxisPlacement_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_BSplineCurve.hxx b/inc/ShapeSchema_PGeom2d_BSplineCurve.hxx
index e0b187b..2954b03 100644
--- a/inc/ShapeSchema_PGeom2d_BSplineCurve.hxx
+++ b/inc/ShapeSchema_PGeom2d_BSplineCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_BSplineCurve_HeaderFile
 #define _ShapeSchema_PGeom2d_BSplineCurve_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_BezierCurve.hxx b/inc/ShapeSchema_PGeom2d_BezierCurve.hxx
index 10b980a..e659000 100644
--- a/inc/ShapeSchema_PGeom2d_BezierCurve.hxx
+++ b/inc/ShapeSchema_PGeom2d_BezierCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_BezierCurve_HeaderFile
 #define _ShapeSchema_PGeom2d_BezierCurve_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_BoundedCurve.hxx b/inc/ShapeSchema_PGeom2d_BoundedCurve.hxx
index f3fbc04..61fc7f1 100644
--- a/inc/ShapeSchema_PGeom2d_BoundedCurve.hxx
+++ b/inc/ShapeSchema_PGeom2d_BoundedCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_BoundedCurve_HeaderFile
 #define _ShapeSchema_PGeom2d_BoundedCurve_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_CartesianPoint.hxx b/inc/ShapeSchema_PGeom2d_CartesianPoint.hxx
index 16e093e..32ef709 100644
--- a/inc/ShapeSchema_PGeom2d_CartesianPoint.hxx
+++ b/inc/ShapeSchema_PGeom2d_CartesianPoint.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_CartesianPoint_HeaderFile
 #define _ShapeSchema_PGeom2d_CartesianPoint_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_Circle.hxx b/inc/ShapeSchema_PGeom2d_Circle.hxx
index d4ffcf0..27c5cb1 100644
--- a/inc/ShapeSchema_PGeom2d_Circle.hxx
+++ b/inc/ShapeSchema_PGeom2d_Circle.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_Circle_HeaderFile
 #define _ShapeSchema_PGeom2d_Circle_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_Conic.hxx b/inc/ShapeSchema_PGeom2d_Conic.hxx
index 81b6ef4..56444ce 100644
--- a/inc/ShapeSchema_PGeom2d_Conic.hxx
+++ b/inc/ShapeSchema_PGeom2d_Conic.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_Conic_HeaderFile
 #define _ShapeSchema_PGeom2d_Conic_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_Curve.hxx b/inc/ShapeSchema_PGeom2d_Curve.hxx
index 3f1cb7d..6a7314c 100644
--- a/inc/ShapeSchema_PGeom2d_Curve.hxx
+++ b/inc/ShapeSchema_PGeom2d_Curve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_Curve_HeaderFile
 #define _ShapeSchema_PGeom2d_Curve_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_Direction.hxx b/inc/ShapeSchema_PGeom2d_Direction.hxx
index 6ea3619..851dc4d 100644
--- a/inc/ShapeSchema_PGeom2d_Direction.hxx
+++ b/inc/ShapeSchema_PGeom2d_Direction.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_Direction_HeaderFile
 #define _ShapeSchema_PGeom2d_Direction_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_Ellipse.hxx b/inc/ShapeSchema_PGeom2d_Ellipse.hxx
index fc764df..64ccf4d 100644
--- a/inc/ShapeSchema_PGeom2d_Ellipse.hxx
+++ b/inc/ShapeSchema_PGeom2d_Ellipse.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_Ellipse_HeaderFile
 #define _ShapeSchema_PGeom2d_Ellipse_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_Geometry.hxx b/inc/ShapeSchema_PGeom2d_Geometry.hxx
index 79fbd08..39edd80 100644
--- a/inc/ShapeSchema_PGeom2d_Geometry.hxx
+++ b/inc/ShapeSchema_PGeom2d_Geometry.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_Geometry_HeaderFile
 #define _ShapeSchema_PGeom2d_Geometry_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_Hyperbola.hxx b/inc/ShapeSchema_PGeom2d_Hyperbola.hxx
index 18ab31a..a99c04c 100644
--- a/inc/ShapeSchema_PGeom2d_Hyperbola.hxx
+++ b/inc/ShapeSchema_PGeom2d_Hyperbola.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_Hyperbola_HeaderFile
 #define _ShapeSchema_PGeom2d_Hyperbola_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_Line.hxx b/inc/ShapeSchema_PGeom2d_Line.hxx
index cd20f9c..ec2d8c8 100644
--- a/inc/ShapeSchema_PGeom2d_Line.hxx
+++ b/inc/ShapeSchema_PGeom2d_Line.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_Line_HeaderFile
 #define _ShapeSchema_PGeom2d_Line_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_OffsetCurve.hxx b/inc/ShapeSchema_PGeom2d_OffsetCurve.hxx
index a531799..4921038 100644
--- a/inc/ShapeSchema_PGeom2d_OffsetCurve.hxx
+++ b/inc/ShapeSchema_PGeom2d_OffsetCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_OffsetCurve_HeaderFile
 #define _ShapeSchema_PGeom2d_OffsetCurve_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_Parabola.hxx b/inc/ShapeSchema_PGeom2d_Parabola.hxx
index f1b1a2b..50a1a4e 100644
--- a/inc/ShapeSchema_PGeom2d_Parabola.hxx
+++ b/inc/ShapeSchema_PGeom2d_Parabola.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_Parabola_HeaderFile
 #define _ShapeSchema_PGeom2d_Parabola_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_Point.hxx b/inc/ShapeSchema_PGeom2d_Point.hxx
index 95998df..4721dcd 100644
--- a/inc/ShapeSchema_PGeom2d_Point.hxx
+++ b/inc/ShapeSchema_PGeom2d_Point.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_Point_HeaderFile
 #define _ShapeSchema_PGeom2d_Point_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_Transformation.hxx b/inc/ShapeSchema_PGeom2d_Transformation.hxx
index c634c0d..59f2072 100644
--- a/inc/ShapeSchema_PGeom2d_Transformation.hxx
+++ b/inc/ShapeSchema_PGeom2d_Transformation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_Transformation_HeaderFile
 #define _ShapeSchema_PGeom2d_Transformation_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_TrimmedCurve.hxx b/inc/ShapeSchema_PGeom2d_TrimmedCurve.hxx
index b525bce..83401b0 100644
--- a/inc/ShapeSchema_PGeom2d_TrimmedCurve.hxx
+++ b/inc/ShapeSchema_PGeom2d_TrimmedCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_TrimmedCurve_HeaderFile
 #define _ShapeSchema_PGeom2d_TrimmedCurve_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_Vector.hxx b/inc/ShapeSchema_PGeom2d_Vector.hxx
index 3fae05b..e1950f8 100644
--- a/inc/ShapeSchema_PGeom2d_Vector.hxx
+++ b/inc/ShapeSchema_PGeom2d_Vector.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_Vector_HeaderFile
 #define _ShapeSchema_PGeom2d_Vector_HeaderFile
diff --git a/inc/ShapeSchema_PGeom2d_VectorWithMagnitude.hxx b/inc/ShapeSchema_PGeom2d_VectorWithMagnitude.hxx
index ef3a56a..0f47008 100644
--- a/inc/ShapeSchema_PGeom2d_VectorWithMagnitude.hxx
+++ b/inc/ShapeSchema_PGeom2d_VectorWithMagnitude.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom2d_VectorWithMagnitude_HeaderFile
 #define _ShapeSchema_PGeom2d_VectorWithMagnitude_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Axis1Placement.hxx b/inc/ShapeSchema_PGeom_Axis1Placement.hxx
index 02fe228..70c35f9 100644
--- a/inc/ShapeSchema_PGeom_Axis1Placement.hxx
+++ b/inc/ShapeSchema_PGeom_Axis1Placement.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Axis1Placement_HeaderFile
 #define _ShapeSchema_PGeom_Axis1Placement_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Axis2Placement.hxx b/inc/ShapeSchema_PGeom_Axis2Placement.hxx
index a22cf0c..decc21b 100644
--- a/inc/ShapeSchema_PGeom_Axis2Placement.hxx
+++ b/inc/ShapeSchema_PGeom_Axis2Placement.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Axis2Placement_HeaderFile
 #define _ShapeSchema_PGeom_Axis2Placement_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_AxisPlacement.hxx b/inc/ShapeSchema_PGeom_AxisPlacement.hxx
index bc5cd97..e13c4ea 100644
--- a/inc/ShapeSchema_PGeom_AxisPlacement.hxx
+++ b/inc/ShapeSchema_PGeom_AxisPlacement.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_AxisPlacement_HeaderFile
 #define _ShapeSchema_PGeom_AxisPlacement_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_BSplineCurve.hxx b/inc/ShapeSchema_PGeom_BSplineCurve.hxx
index 9fb3b1d..cf6353f 100644
--- a/inc/ShapeSchema_PGeom_BSplineCurve.hxx
+++ b/inc/ShapeSchema_PGeom_BSplineCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_BSplineCurve_HeaderFile
 #define _ShapeSchema_PGeom_BSplineCurve_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_BSplineSurface.hxx b/inc/ShapeSchema_PGeom_BSplineSurface.hxx
index b9454d3..e69ac26 100644
--- a/inc/ShapeSchema_PGeom_BSplineSurface.hxx
+++ b/inc/ShapeSchema_PGeom_BSplineSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_BSplineSurface_HeaderFile
 #define _ShapeSchema_PGeom_BSplineSurface_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_BezierCurve.hxx b/inc/ShapeSchema_PGeom_BezierCurve.hxx
index ba4d67e..ff64584 100644
--- a/inc/ShapeSchema_PGeom_BezierCurve.hxx
+++ b/inc/ShapeSchema_PGeom_BezierCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_BezierCurve_HeaderFile
 #define _ShapeSchema_PGeom_BezierCurve_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_BezierSurface.hxx b/inc/ShapeSchema_PGeom_BezierSurface.hxx
index d6ff6d4..75baf3d 100644
--- a/inc/ShapeSchema_PGeom_BezierSurface.hxx
+++ b/inc/ShapeSchema_PGeom_BezierSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_BezierSurface_HeaderFile
 #define _ShapeSchema_PGeom_BezierSurface_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_BoundedCurve.hxx b/inc/ShapeSchema_PGeom_BoundedCurve.hxx
index cc208ed..28ea2b8 100644
--- a/inc/ShapeSchema_PGeom_BoundedCurve.hxx
+++ b/inc/ShapeSchema_PGeom_BoundedCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_BoundedCurve_HeaderFile
 #define _ShapeSchema_PGeom_BoundedCurve_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_BoundedSurface.hxx b/inc/ShapeSchema_PGeom_BoundedSurface.hxx
index 5b2b139..65ffa3a 100644
--- a/inc/ShapeSchema_PGeom_BoundedSurface.hxx
+++ b/inc/ShapeSchema_PGeom_BoundedSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_BoundedSurface_HeaderFile
 #define _ShapeSchema_PGeom_BoundedSurface_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_CartesianPoint.hxx b/inc/ShapeSchema_PGeom_CartesianPoint.hxx
index 726a309..e72d779 100644
--- a/inc/ShapeSchema_PGeom_CartesianPoint.hxx
+++ b/inc/ShapeSchema_PGeom_CartesianPoint.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_CartesianPoint_HeaderFile
 #define _ShapeSchema_PGeom_CartesianPoint_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Circle.hxx b/inc/ShapeSchema_PGeom_Circle.hxx
index 1afb618..df7d7e4 100644
--- a/inc/ShapeSchema_PGeom_Circle.hxx
+++ b/inc/ShapeSchema_PGeom_Circle.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Circle_HeaderFile
 #define _ShapeSchema_PGeom_Circle_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Conic.hxx b/inc/ShapeSchema_PGeom_Conic.hxx
index 0a82da9..e71d33d 100644
--- a/inc/ShapeSchema_PGeom_Conic.hxx
+++ b/inc/ShapeSchema_PGeom_Conic.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Conic_HeaderFile
 #define _ShapeSchema_PGeom_Conic_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_ConicalSurface.hxx b/inc/ShapeSchema_PGeom_ConicalSurface.hxx
index 116075d..a74a110 100644
--- a/inc/ShapeSchema_PGeom_ConicalSurface.hxx
+++ b/inc/ShapeSchema_PGeom_ConicalSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_ConicalSurface_HeaderFile
 #define _ShapeSchema_PGeom_ConicalSurface_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Curve.hxx b/inc/ShapeSchema_PGeom_Curve.hxx
index 60f4add..e7fc717 100644
--- a/inc/ShapeSchema_PGeom_Curve.hxx
+++ b/inc/ShapeSchema_PGeom_Curve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Curve_HeaderFile
 #define _ShapeSchema_PGeom_Curve_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_CylindricalSurface.hxx b/inc/ShapeSchema_PGeom_CylindricalSurface.hxx
index f48f8c4..065ce6c 100644
--- a/inc/ShapeSchema_PGeom_CylindricalSurface.hxx
+++ b/inc/ShapeSchema_PGeom_CylindricalSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_CylindricalSurface_HeaderFile
 #define _ShapeSchema_PGeom_CylindricalSurface_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Direction.hxx b/inc/ShapeSchema_PGeom_Direction.hxx
index 4bd96c8..76bfb5e 100644
--- a/inc/ShapeSchema_PGeom_Direction.hxx
+++ b/inc/ShapeSchema_PGeom_Direction.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Direction_HeaderFile
 #define _ShapeSchema_PGeom_Direction_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_ElementarySurface.hxx b/inc/ShapeSchema_PGeom_ElementarySurface.hxx
index 0d9f512..bbbdd84 100644
--- a/inc/ShapeSchema_PGeom_ElementarySurface.hxx
+++ b/inc/ShapeSchema_PGeom_ElementarySurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_ElementarySurface_HeaderFile
 #define _ShapeSchema_PGeom_ElementarySurface_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Ellipse.hxx b/inc/ShapeSchema_PGeom_Ellipse.hxx
index fbdfdb4..84ad784 100644
--- a/inc/ShapeSchema_PGeom_Ellipse.hxx
+++ b/inc/ShapeSchema_PGeom_Ellipse.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Ellipse_HeaderFile
 #define _ShapeSchema_PGeom_Ellipse_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Geometry.hxx b/inc/ShapeSchema_PGeom_Geometry.hxx
index 9c029a3..86b7b7e 100644
--- a/inc/ShapeSchema_PGeom_Geometry.hxx
+++ b/inc/ShapeSchema_PGeom_Geometry.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Geometry_HeaderFile
 #define _ShapeSchema_PGeom_Geometry_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Hyperbola.hxx b/inc/ShapeSchema_PGeom_Hyperbola.hxx
index 70b3513..d3605ae 100644
--- a/inc/ShapeSchema_PGeom_Hyperbola.hxx
+++ b/inc/ShapeSchema_PGeom_Hyperbola.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Hyperbola_HeaderFile
 #define _ShapeSchema_PGeom_Hyperbola_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Line.hxx b/inc/ShapeSchema_PGeom_Line.hxx
index b74f1c0..4e5ff65 100644
--- a/inc/ShapeSchema_PGeom_Line.hxx
+++ b/inc/ShapeSchema_PGeom_Line.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Line_HeaderFile
 #define _ShapeSchema_PGeom_Line_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_OffsetCurve.hxx b/inc/ShapeSchema_PGeom_OffsetCurve.hxx
index 0993380..52942a9 100644
--- a/inc/ShapeSchema_PGeom_OffsetCurve.hxx
+++ b/inc/ShapeSchema_PGeom_OffsetCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_OffsetCurve_HeaderFile
 #define _ShapeSchema_PGeom_OffsetCurve_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_OffsetSurface.hxx b/inc/ShapeSchema_PGeom_OffsetSurface.hxx
index f59a821..14db40c 100644
--- a/inc/ShapeSchema_PGeom_OffsetSurface.hxx
+++ b/inc/ShapeSchema_PGeom_OffsetSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_OffsetSurface_HeaderFile
 #define _ShapeSchema_PGeom_OffsetSurface_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Parabola.hxx b/inc/ShapeSchema_PGeom_Parabola.hxx
index 6570cdf..b9cc9ef 100644
--- a/inc/ShapeSchema_PGeom_Parabola.hxx
+++ b/inc/ShapeSchema_PGeom_Parabola.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Parabola_HeaderFile
 #define _ShapeSchema_PGeom_Parabola_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Plane.hxx b/inc/ShapeSchema_PGeom_Plane.hxx
index fd6a3bf..56fa7ec 100644
--- a/inc/ShapeSchema_PGeom_Plane.hxx
+++ b/inc/ShapeSchema_PGeom_Plane.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Plane_HeaderFile
 #define _ShapeSchema_PGeom_Plane_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Point.hxx b/inc/ShapeSchema_PGeom_Point.hxx
index e162657..2877b99 100644
--- a/inc/ShapeSchema_PGeom_Point.hxx
+++ b/inc/ShapeSchema_PGeom_Point.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Point_HeaderFile
 #define _ShapeSchema_PGeom_Point_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_RectangularTrimmedSurface.hxx b/inc/ShapeSchema_PGeom_RectangularTrimmedSurface.hxx
index 0560443..fe2574c 100644
--- a/inc/ShapeSchema_PGeom_RectangularTrimmedSurface.hxx
+++ b/inc/ShapeSchema_PGeom_RectangularTrimmedSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_RectangularTrimmedSurface_HeaderFile
 #define _ShapeSchema_PGeom_RectangularTrimmedSurface_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_SphericalSurface.hxx b/inc/ShapeSchema_PGeom_SphericalSurface.hxx
index b7e539c..9a2a09a 100644
--- a/inc/ShapeSchema_PGeom_SphericalSurface.hxx
+++ b/inc/ShapeSchema_PGeom_SphericalSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_SphericalSurface_HeaderFile
 #define _ShapeSchema_PGeom_SphericalSurface_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Surface.hxx b/inc/ShapeSchema_PGeom_Surface.hxx
index e716506..d49f475 100644
--- a/inc/ShapeSchema_PGeom_Surface.hxx
+++ b/inc/ShapeSchema_PGeom_Surface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Surface_HeaderFile
 #define _ShapeSchema_PGeom_Surface_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_SurfaceOfLinearExtrusion.hxx b/inc/ShapeSchema_PGeom_SurfaceOfLinearExtrusion.hxx
index 22a0181..b38c264 100644
--- a/inc/ShapeSchema_PGeom_SurfaceOfLinearExtrusion.hxx
+++ b/inc/ShapeSchema_PGeom_SurfaceOfLinearExtrusion.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_SurfaceOfLinearExtrusion_HeaderFile
 #define _ShapeSchema_PGeom_SurfaceOfLinearExtrusion_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_SurfaceOfRevolution.hxx b/inc/ShapeSchema_PGeom_SurfaceOfRevolution.hxx
index 8cfb037..888c483 100644
--- a/inc/ShapeSchema_PGeom_SurfaceOfRevolution.hxx
+++ b/inc/ShapeSchema_PGeom_SurfaceOfRevolution.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_SurfaceOfRevolution_HeaderFile
 #define _ShapeSchema_PGeom_SurfaceOfRevolution_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_SweptSurface.hxx b/inc/ShapeSchema_PGeom_SweptSurface.hxx
index d7aa3d1..7c469cf 100644
--- a/inc/ShapeSchema_PGeom_SweptSurface.hxx
+++ b/inc/ShapeSchema_PGeom_SweptSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_SweptSurface_HeaderFile
 #define _ShapeSchema_PGeom_SweptSurface_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_ToroidalSurface.hxx b/inc/ShapeSchema_PGeom_ToroidalSurface.hxx
index 77fcd65..22120a9 100644
--- a/inc/ShapeSchema_PGeom_ToroidalSurface.hxx
+++ b/inc/ShapeSchema_PGeom_ToroidalSurface.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_ToroidalSurface_HeaderFile
 #define _ShapeSchema_PGeom_ToroidalSurface_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Transformation.hxx b/inc/ShapeSchema_PGeom_Transformation.hxx
index 2040705..2e17066 100644
--- a/inc/ShapeSchema_PGeom_Transformation.hxx
+++ b/inc/ShapeSchema_PGeom_Transformation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Transformation_HeaderFile
 #define _ShapeSchema_PGeom_Transformation_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_TrimmedCurve.hxx b/inc/ShapeSchema_PGeom_TrimmedCurve.hxx
index f837902..9843833 100644
--- a/inc/ShapeSchema_PGeom_TrimmedCurve.hxx
+++ b/inc/ShapeSchema_PGeom_TrimmedCurve.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_TrimmedCurve_HeaderFile
 #define _ShapeSchema_PGeom_TrimmedCurve_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_Vector.hxx b/inc/ShapeSchema_PGeom_Vector.hxx
index 5a355c1..1de6572 100644
--- a/inc/ShapeSchema_PGeom_Vector.hxx
+++ b/inc/ShapeSchema_PGeom_Vector.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_Vector_HeaderFile
 #define _ShapeSchema_PGeom_Vector_HeaderFile
diff --git a/inc/ShapeSchema_PGeom_VectorWithMagnitude.hxx b/inc/ShapeSchema_PGeom_VectorWithMagnitude.hxx
index 4491c47..c4cc381 100644
--- a/inc/ShapeSchema_PGeom_VectorWithMagnitude.hxx
+++ b/inc/ShapeSchema_PGeom_VectorWithMagnitude.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PGeom_VectorWithMagnitude_HeaderFile
 #define _ShapeSchema_PGeom_VectorWithMagnitude_HeaderFile
diff --git a/inc/ShapeSchema_PMMgt_PManaged.hxx b/inc/ShapeSchema_PMMgt_PManaged.hxx
index b91f994..4176702 100644
--- a/inc/ShapeSchema_PMMgt_PManaged.hxx
+++ b/inc/ShapeSchema_PMMgt_PManaged.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PMMgt_PManaged_HeaderFile
 #define _ShapeSchema_PMMgt_PManaged_HeaderFile
diff --git a/inc/ShapeSchema_PPoly_FieldOfHArray1OfTriangle.hxx b/inc/ShapeSchema_PPoly_FieldOfHArray1OfTriangle.hxx
index ed13b3a..3a16bf5 100644
--- a/inc/ShapeSchema_PPoly_FieldOfHArray1OfTriangle.hxx
+++ b/inc/ShapeSchema_PPoly_FieldOfHArray1OfTriangle.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PPoly_FieldOfHArray1OfTriangle_HeaderFile
 #define _ShapeSchema_PPoly_FieldOfHArray1OfTriangle_HeaderFile
diff --git a/inc/ShapeSchema_PPoly_HArray1OfTriangle.hxx b/inc/ShapeSchema_PPoly_HArray1OfTriangle.hxx
index ee09df7..f996082 100644
--- a/inc/ShapeSchema_PPoly_HArray1OfTriangle.hxx
+++ b/inc/ShapeSchema_PPoly_HArray1OfTriangle.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PPoly_HArray1OfTriangle_HeaderFile
 #define _ShapeSchema_PPoly_HArray1OfTriangle_HeaderFile
diff --git a/inc/ShapeSchema_PPoly_Polygon2D.hxx b/inc/ShapeSchema_PPoly_Polygon2D.hxx
index 8fc5e4b..830feb5 100644
--- a/inc/ShapeSchema_PPoly_Polygon2D.hxx
+++ b/inc/ShapeSchema_PPoly_Polygon2D.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PPoly_Polygon2D_HeaderFile
 #define _ShapeSchema_PPoly_Polygon2D_HeaderFile
diff --git a/inc/ShapeSchema_PPoly_Polygon3D.hxx b/inc/ShapeSchema_PPoly_Polygon3D.hxx
index 29e324f..e701c8a 100644
--- a/inc/ShapeSchema_PPoly_Polygon3D.hxx
+++ b/inc/ShapeSchema_PPoly_Polygon3D.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PPoly_Polygon3D_HeaderFile
 #define _ShapeSchema_PPoly_Polygon3D_HeaderFile
diff --git a/inc/ShapeSchema_PPoly_PolygonOnTriangulation.hxx b/inc/ShapeSchema_PPoly_PolygonOnTriangulation.hxx
index 291383e..e9312a5 100644
--- a/inc/ShapeSchema_PPoly_PolygonOnTriangulation.hxx
+++ b/inc/ShapeSchema_PPoly_PolygonOnTriangulation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PPoly_PolygonOnTriangulation_HeaderFile
 #define _ShapeSchema_PPoly_PolygonOnTriangulation_HeaderFile
diff --git a/inc/ShapeSchema_PPoly_Triangle.hxx b/inc/ShapeSchema_PPoly_Triangle.hxx
index 1898f54..434bfc7 100644
--- a/inc/ShapeSchema_PPoly_Triangle.hxx
+++ b/inc/ShapeSchema_PPoly_Triangle.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PPoly_Triangle_HeaderFile
 #define _ShapeSchema_PPoly_Triangle_HeaderFile
diff --git a/inc/ShapeSchema_PPoly_Triangulation.hxx b/inc/ShapeSchema_PPoly_Triangulation.hxx
index 59296fa..cd5d6a3 100644
--- a/inc/ShapeSchema_PPoly_Triangulation.hxx
+++ b/inc/ShapeSchema_PPoly_Triangulation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PPoly_Triangulation_HeaderFile
 #define _ShapeSchema_PPoly_Triangulation_HeaderFile
diff --git a/inc/ShapeSchema_PTopLoc_Datum3D.hxx b/inc/ShapeSchema_PTopLoc_Datum3D.hxx
index 7d461ce..b971015 100644
--- a/inc/ShapeSchema_PTopLoc_Datum3D.hxx
+++ b/inc/ShapeSchema_PTopLoc_Datum3D.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopLoc_Datum3D_HeaderFile
 #define _ShapeSchema_PTopLoc_Datum3D_HeaderFile
diff --git a/inc/ShapeSchema_PTopLoc_ItemLocation.hxx b/inc/ShapeSchema_PTopLoc_ItemLocation.hxx
index 6d8b65b..5cc6d45 100644
--- a/inc/ShapeSchema_PTopLoc_ItemLocation.hxx
+++ b/inc/ShapeSchema_PTopLoc_ItemLocation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopLoc_ItemLocation_HeaderFile
 #define _ShapeSchema_PTopLoc_ItemLocation_HeaderFile
diff --git a/inc/ShapeSchema_PTopLoc_Location.hxx b/inc/ShapeSchema_PTopLoc_Location.hxx
index c87415b..bce2aa5 100644
--- a/inc/ShapeSchema_PTopLoc_Location.hxx
+++ b/inc/ShapeSchema_PTopLoc_Location.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopLoc_Location_HeaderFile
 #define _ShapeSchema_PTopLoc_Location_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_CompSolid.hxx b/inc/ShapeSchema_PTopoDS_CompSolid.hxx
index 013b8f8..32cfd20 100644
--- a/inc/ShapeSchema_PTopoDS_CompSolid.hxx
+++ b/inc/ShapeSchema_PTopoDS_CompSolid.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_CompSolid_HeaderFile
 #define _ShapeSchema_PTopoDS_CompSolid_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_Compound.hxx b/inc/ShapeSchema_PTopoDS_Compound.hxx
index 8b57477..46b3ba8 100644
--- a/inc/ShapeSchema_PTopoDS_Compound.hxx
+++ b/inc/ShapeSchema_PTopoDS_Compound.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_Compound_HeaderFile
 #define _ShapeSchema_PTopoDS_Compound_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_Edge.hxx b/inc/ShapeSchema_PTopoDS_Edge.hxx
index f584693..ef1f972 100644
--- a/inc/ShapeSchema_PTopoDS_Edge.hxx
+++ b/inc/ShapeSchema_PTopoDS_Edge.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_Edge_HeaderFile
 #define _ShapeSchema_PTopoDS_Edge_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_Face.hxx b/inc/ShapeSchema_PTopoDS_Face.hxx
index 2c370c1..cddf36d 100644
--- a/inc/ShapeSchema_PTopoDS_Face.hxx
+++ b/inc/ShapeSchema_PTopoDS_Face.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_Face_HeaderFile
 #define _ShapeSchema_PTopoDS_Face_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_FieldOfHArray1OfHShape.hxx b/inc/ShapeSchema_PTopoDS_FieldOfHArray1OfHShape.hxx
index c72423a..f968659 100644
--- a/inc/ShapeSchema_PTopoDS_FieldOfHArray1OfHShape.hxx
+++ b/inc/ShapeSchema_PTopoDS_FieldOfHArray1OfHShape.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_FieldOfHArray1OfHShape_HeaderFile
 #define _ShapeSchema_PTopoDS_FieldOfHArray1OfHShape_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_FieldOfHArray1OfShape1.hxx b/inc/ShapeSchema_PTopoDS_FieldOfHArray1OfShape1.hxx
index c8f9072..8104bfb 100644
--- a/inc/ShapeSchema_PTopoDS_FieldOfHArray1OfShape1.hxx
+++ b/inc/ShapeSchema_PTopoDS_FieldOfHArray1OfShape1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_FieldOfHArray1OfShape1_HeaderFile
 #define _ShapeSchema_PTopoDS_FieldOfHArray1OfShape1_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_HArray1OfHShape.hxx b/inc/ShapeSchema_PTopoDS_HArray1OfHShape.hxx
index a9682ae..6d236e5 100644
--- a/inc/ShapeSchema_PTopoDS_HArray1OfHShape.hxx
+++ b/inc/ShapeSchema_PTopoDS_HArray1OfHShape.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_HArray1OfHShape_HeaderFile
 #define _ShapeSchema_PTopoDS_HArray1OfHShape_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_HArray1OfShape1.hxx b/inc/ShapeSchema_PTopoDS_HArray1OfShape1.hxx
index 77faac7..8d3b380 100644
--- a/inc/ShapeSchema_PTopoDS_HArray1OfShape1.hxx
+++ b/inc/ShapeSchema_PTopoDS_HArray1OfShape1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_HArray1OfShape1_HeaderFile
 #define _ShapeSchema_PTopoDS_HArray1OfShape1_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_HShape.hxx b/inc/ShapeSchema_PTopoDS_HShape.hxx
index 4e4f621..05e6d39 100644
--- a/inc/ShapeSchema_PTopoDS_HShape.hxx
+++ b/inc/ShapeSchema_PTopoDS_HShape.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_HShape_HeaderFile
 #define _ShapeSchema_PTopoDS_HShape_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_Shape1.hxx b/inc/ShapeSchema_PTopoDS_Shape1.hxx
index 9af8794..9188a4e 100644
--- a/inc/ShapeSchema_PTopoDS_Shape1.hxx
+++ b/inc/ShapeSchema_PTopoDS_Shape1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_Shape1_HeaderFile
 #define _ShapeSchema_PTopoDS_Shape1_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_Shell.hxx b/inc/ShapeSchema_PTopoDS_Shell.hxx
index 3ea37c1..99de1ad 100644
--- a/inc/ShapeSchema_PTopoDS_Shell.hxx
+++ b/inc/ShapeSchema_PTopoDS_Shell.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_Shell_HeaderFile
 #define _ShapeSchema_PTopoDS_Shell_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_Solid.hxx b/inc/ShapeSchema_PTopoDS_Solid.hxx
index 467104c..b878e2d 100644
--- a/inc/ShapeSchema_PTopoDS_Solid.hxx
+++ b/inc/ShapeSchema_PTopoDS_Solid.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_Solid_HeaderFile
 #define _ShapeSchema_PTopoDS_Solid_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TCompSolid.hxx b/inc/ShapeSchema_PTopoDS_TCompSolid.hxx
index 152012c..2ee12ca 100644
--- a/inc/ShapeSchema_PTopoDS_TCompSolid.hxx
+++ b/inc/ShapeSchema_PTopoDS_TCompSolid.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TCompSolid_HeaderFile
 #define _ShapeSchema_PTopoDS_TCompSolid_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TCompSolid1.hxx b/inc/ShapeSchema_PTopoDS_TCompSolid1.hxx
index 7b7a246..86a31dd 100644
--- a/inc/ShapeSchema_PTopoDS_TCompSolid1.hxx
+++ b/inc/ShapeSchema_PTopoDS_TCompSolid1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TCompSolid1_HeaderFile
 #define _ShapeSchema_PTopoDS_TCompSolid1_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TCompound.hxx b/inc/ShapeSchema_PTopoDS_TCompound.hxx
index 5045b84..54988db 100644
--- a/inc/ShapeSchema_PTopoDS_TCompound.hxx
+++ b/inc/ShapeSchema_PTopoDS_TCompound.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TCompound_HeaderFile
 #define _ShapeSchema_PTopoDS_TCompound_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TCompound1.hxx b/inc/ShapeSchema_PTopoDS_TCompound1.hxx
index 437d4ea..aac749b 100644
--- a/inc/ShapeSchema_PTopoDS_TCompound1.hxx
+++ b/inc/ShapeSchema_PTopoDS_TCompound1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TCompound1_HeaderFile
 #define _ShapeSchema_PTopoDS_TCompound1_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TEdge.hxx b/inc/ShapeSchema_PTopoDS_TEdge.hxx
index fcf0e24..3ea41c7 100644
--- a/inc/ShapeSchema_PTopoDS_TEdge.hxx
+++ b/inc/ShapeSchema_PTopoDS_TEdge.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TEdge_HeaderFile
 #define _ShapeSchema_PTopoDS_TEdge_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TEdge1.hxx b/inc/ShapeSchema_PTopoDS_TEdge1.hxx
index 1780c76..2a3b4c2 100644
--- a/inc/ShapeSchema_PTopoDS_TEdge1.hxx
+++ b/inc/ShapeSchema_PTopoDS_TEdge1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TEdge1_HeaderFile
 #define _ShapeSchema_PTopoDS_TEdge1_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TFace.hxx b/inc/ShapeSchema_PTopoDS_TFace.hxx
index 75545c7..561726a 100644
--- a/inc/ShapeSchema_PTopoDS_TFace.hxx
+++ b/inc/ShapeSchema_PTopoDS_TFace.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TFace_HeaderFile
 #define _ShapeSchema_PTopoDS_TFace_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TFace1.hxx b/inc/ShapeSchema_PTopoDS_TFace1.hxx
index 78bbbb2..a7ca37e 100644
--- a/inc/ShapeSchema_PTopoDS_TFace1.hxx
+++ b/inc/ShapeSchema_PTopoDS_TFace1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TFace1_HeaderFile
 #define _ShapeSchema_PTopoDS_TFace1_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TShape.hxx b/inc/ShapeSchema_PTopoDS_TShape.hxx
index 89c5a48..a81b7d4 100644
--- a/inc/ShapeSchema_PTopoDS_TShape.hxx
+++ b/inc/ShapeSchema_PTopoDS_TShape.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TShape_HeaderFile
 #define _ShapeSchema_PTopoDS_TShape_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TShape1.hxx b/inc/ShapeSchema_PTopoDS_TShape1.hxx
index dd2ffba..b7e7767 100644
--- a/inc/ShapeSchema_PTopoDS_TShape1.hxx
+++ b/inc/ShapeSchema_PTopoDS_TShape1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TShape1_HeaderFile
 #define _ShapeSchema_PTopoDS_TShape1_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TShell.hxx b/inc/ShapeSchema_PTopoDS_TShell.hxx
index 9e1d879..b07359f 100644
--- a/inc/ShapeSchema_PTopoDS_TShell.hxx
+++ b/inc/ShapeSchema_PTopoDS_TShell.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TShell_HeaderFile
 #define _ShapeSchema_PTopoDS_TShell_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TShell1.hxx b/inc/ShapeSchema_PTopoDS_TShell1.hxx
index 4fb372e..b247878 100644
--- a/inc/ShapeSchema_PTopoDS_TShell1.hxx
+++ b/inc/ShapeSchema_PTopoDS_TShell1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TShell1_HeaderFile
 #define _ShapeSchema_PTopoDS_TShell1_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TSolid.hxx b/inc/ShapeSchema_PTopoDS_TSolid.hxx
index 0c1293b..cd893b5 100644
--- a/inc/ShapeSchema_PTopoDS_TSolid.hxx
+++ b/inc/ShapeSchema_PTopoDS_TSolid.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TSolid_HeaderFile
 #define _ShapeSchema_PTopoDS_TSolid_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TSolid1.hxx b/inc/ShapeSchema_PTopoDS_TSolid1.hxx
index 17e91d0..a824b7b 100644
--- a/inc/ShapeSchema_PTopoDS_TSolid1.hxx
+++ b/inc/ShapeSchema_PTopoDS_TSolid1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TSolid1_HeaderFile
 #define _ShapeSchema_PTopoDS_TSolid1_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TVertex.hxx b/inc/ShapeSchema_PTopoDS_TVertex.hxx
index eabad8d..7619ee5 100644
--- a/inc/ShapeSchema_PTopoDS_TVertex.hxx
+++ b/inc/ShapeSchema_PTopoDS_TVertex.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TVertex_HeaderFile
 #define _ShapeSchema_PTopoDS_TVertex_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TVertex1.hxx b/inc/ShapeSchema_PTopoDS_TVertex1.hxx
index 2a095ef..d79ebbf 100644
--- a/inc/ShapeSchema_PTopoDS_TVertex1.hxx
+++ b/inc/ShapeSchema_PTopoDS_TVertex1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TVertex1_HeaderFile
 #define _ShapeSchema_PTopoDS_TVertex1_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TWire.hxx b/inc/ShapeSchema_PTopoDS_TWire.hxx
index a92f2ac..5944224 100644
--- a/inc/ShapeSchema_PTopoDS_TWire.hxx
+++ b/inc/ShapeSchema_PTopoDS_TWire.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TWire_HeaderFile
 #define _ShapeSchema_PTopoDS_TWire_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_TWire1.hxx b/inc/ShapeSchema_PTopoDS_TWire1.hxx
index 2947335..f88c44a 100644
--- a/inc/ShapeSchema_PTopoDS_TWire1.hxx
+++ b/inc/ShapeSchema_PTopoDS_TWire1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_TWire1_HeaderFile
 #define _ShapeSchema_PTopoDS_TWire1_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_Vertex.hxx b/inc/ShapeSchema_PTopoDS_Vertex.hxx
index aa4d7e5..47c5739 100644
--- a/inc/ShapeSchema_PTopoDS_Vertex.hxx
+++ b/inc/ShapeSchema_PTopoDS_Vertex.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_Vertex_HeaderFile
 #define _ShapeSchema_PTopoDS_Vertex_HeaderFile
diff --git a/inc/ShapeSchema_PTopoDS_Wire.hxx b/inc/ShapeSchema_PTopoDS_Wire.hxx
index 8637182..53adf4f 100644
--- a/inc/ShapeSchema_PTopoDS_Wire.hxx
+++ b/inc/ShapeSchema_PTopoDS_Wire.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_PTopoDS_Wire_HeaderFile
 #define _ShapeSchema_PTopoDS_Wire_HeaderFile
diff --git a/inc/ShapeSchema_Standard_Persistent.hxx b/inc/ShapeSchema_Standard_Persistent.hxx
index 9b02c6a..46a031f 100644
--- a/inc/ShapeSchema_Standard_Persistent.hxx
+++ b/inc/ShapeSchema_Standard_Persistent.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_Standard_Persistent_HeaderFile
 #define _ShapeSchema_Standard_Persistent_HeaderFile
diff --git a/inc/ShapeSchema_Standard_Storable.hxx b/inc/ShapeSchema_Standard_Storable.hxx
index cb6bce8..a41341d 100644
--- a/inc/ShapeSchema_Standard_Storable.hxx
+++ b/inc/ShapeSchema_Standard_Storable.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_Standard_Storable_HeaderFile
 #define _ShapeSchema_Standard_Storable_HeaderFile
diff --git a/inc/ShapeSchema_gp_Ax1.hxx b/inc/ShapeSchema_gp_Ax1.hxx
index 4913090..134107a 100644
--- a/inc/ShapeSchema_gp_Ax1.hxx
+++ b/inc/ShapeSchema_gp_Ax1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Ax1_HeaderFile
 #define _ShapeSchema_gp_Ax1_HeaderFile
diff --git a/inc/ShapeSchema_gp_Ax2.hxx b/inc/ShapeSchema_gp_Ax2.hxx
index 5c6cdc4..39163b1 100644
--- a/inc/ShapeSchema_gp_Ax2.hxx
+++ b/inc/ShapeSchema_gp_Ax2.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Ax2_HeaderFile
 #define _ShapeSchema_gp_Ax2_HeaderFile
diff --git a/inc/ShapeSchema_gp_Ax22d.hxx b/inc/ShapeSchema_gp_Ax22d.hxx
index 03746d1..b2a0433 100644
--- a/inc/ShapeSchema_gp_Ax22d.hxx
+++ b/inc/ShapeSchema_gp_Ax22d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Ax22d_HeaderFile
 #define _ShapeSchema_gp_Ax22d_HeaderFile
diff --git a/inc/ShapeSchema_gp_Ax2d.hxx b/inc/ShapeSchema_gp_Ax2d.hxx
index d4c48b9..9223605 100644
--- a/inc/ShapeSchema_gp_Ax2d.hxx
+++ b/inc/ShapeSchema_gp_Ax2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Ax2d_HeaderFile
 #define _ShapeSchema_gp_Ax2d_HeaderFile
diff --git a/inc/ShapeSchema_gp_Ax3.hxx b/inc/ShapeSchema_gp_Ax3.hxx
index 0af6f64..e9810a1 100644
--- a/inc/ShapeSchema_gp_Ax3.hxx
+++ b/inc/ShapeSchema_gp_Ax3.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Ax3_HeaderFile
 #define _ShapeSchema_gp_Ax3_HeaderFile
diff --git a/inc/ShapeSchema_gp_Circ2d.hxx b/inc/ShapeSchema_gp_Circ2d.hxx
index 3e9afb3..52f32df 100644
--- a/inc/ShapeSchema_gp_Circ2d.hxx
+++ b/inc/ShapeSchema_gp_Circ2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Circ2d_HeaderFile
 #define _ShapeSchema_gp_Circ2d_HeaderFile
diff --git a/inc/ShapeSchema_gp_Dir.hxx b/inc/ShapeSchema_gp_Dir.hxx
index eba6e49..44820da 100644
--- a/inc/ShapeSchema_gp_Dir.hxx
+++ b/inc/ShapeSchema_gp_Dir.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Dir_HeaderFile
 #define _ShapeSchema_gp_Dir_HeaderFile
diff --git a/inc/ShapeSchema_gp_Dir2d.hxx b/inc/ShapeSchema_gp_Dir2d.hxx
index 830c9a1..dea7387 100644
--- a/inc/ShapeSchema_gp_Dir2d.hxx
+++ b/inc/ShapeSchema_gp_Dir2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Dir2d_HeaderFile
 #define _ShapeSchema_gp_Dir2d_HeaderFile
diff --git a/inc/ShapeSchema_gp_Lin2d.hxx b/inc/ShapeSchema_gp_Lin2d.hxx
index 777aea5..2a6594d 100644
--- a/inc/ShapeSchema_gp_Lin2d.hxx
+++ b/inc/ShapeSchema_gp_Lin2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Lin2d_HeaderFile
 #define _ShapeSchema_gp_Lin2d_HeaderFile
diff --git a/inc/ShapeSchema_gp_Mat.hxx b/inc/ShapeSchema_gp_Mat.hxx
index 21cc5bc..661574b 100644
--- a/inc/ShapeSchema_gp_Mat.hxx
+++ b/inc/ShapeSchema_gp_Mat.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Mat_HeaderFile
 #define _ShapeSchema_gp_Mat_HeaderFile
diff --git a/inc/ShapeSchema_gp_Mat2d.hxx b/inc/ShapeSchema_gp_Mat2d.hxx
index b459aa7..138ac79 100644
--- a/inc/ShapeSchema_gp_Mat2d.hxx
+++ b/inc/ShapeSchema_gp_Mat2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Mat2d_HeaderFile
 #define _ShapeSchema_gp_Mat2d_HeaderFile
diff --git a/inc/ShapeSchema_gp_Pnt.hxx b/inc/ShapeSchema_gp_Pnt.hxx
index fc1b8ce..1b490b8 100644
--- a/inc/ShapeSchema_gp_Pnt.hxx
+++ b/inc/ShapeSchema_gp_Pnt.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Pnt_HeaderFile
 #define _ShapeSchema_gp_Pnt_HeaderFile
diff --git a/inc/ShapeSchema_gp_Pnt2d.hxx b/inc/ShapeSchema_gp_Pnt2d.hxx
index dd0df3f..bc50f64 100644
--- a/inc/ShapeSchema_gp_Pnt2d.hxx
+++ b/inc/ShapeSchema_gp_Pnt2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Pnt2d_HeaderFile
 #define _ShapeSchema_gp_Pnt2d_HeaderFile
diff --git a/inc/ShapeSchema_gp_Trsf.hxx b/inc/ShapeSchema_gp_Trsf.hxx
index d1ac5a0..09cac4f 100644
--- a/inc/ShapeSchema_gp_Trsf.hxx
+++ b/inc/ShapeSchema_gp_Trsf.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Trsf_HeaderFile
 #define _ShapeSchema_gp_Trsf_HeaderFile
diff --git a/inc/ShapeSchema_gp_Trsf2d.hxx b/inc/ShapeSchema_gp_Trsf2d.hxx
index 442eb89..909734d 100644
--- a/inc/ShapeSchema_gp_Trsf2d.hxx
+++ b/inc/ShapeSchema_gp_Trsf2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Trsf2d_HeaderFile
 #define _ShapeSchema_gp_Trsf2d_HeaderFile
diff --git a/inc/ShapeSchema_gp_Vec.hxx b/inc/ShapeSchema_gp_Vec.hxx
index 4e15e3b..07d542b 100644
--- a/inc/ShapeSchema_gp_Vec.hxx
+++ b/inc/ShapeSchema_gp_Vec.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Vec_HeaderFile
 #define _ShapeSchema_gp_Vec_HeaderFile
diff --git a/inc/ShapeSchema_gp_Vec2d.hxx b/inc/ShapeSchema_gp_Vec2d.hxx
index c818803..846cf97 100644
--- a/inc/ShapeSchema_gp_Vec2d.hxx
+++ b/inc/ShapeSchema_gp_Vec2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_Vec2d_HeaderFile
 #define _ShapeSchema_gp_Vec2d_HeaderFile
diff --git a/inc/ShapeSchema_gp_XY.hxx b/inc/ShapeSchema_gp_XY.hxx
index cc52f68..4c858eb 100644
--- a/inc/ShapeSchema_gp_XY.hxx
+++ b/inc/ShapeSchema_gp_XY.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_XY_HeaderFile
 #define _ShapeSchema_gp_XY_HeaderFile
diff --git a/inc/ShapeSchema_gp_XYZ.hxx b/inc/ShapeSchema_gp_XYZ.hxx
index 1254cd2..715659c 100644
--- a/inc/ShapeSchema_gp_XYZ.hxx
+++ b/inc/ShapeSchema_gp_XYZ.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _ShapeSchema_gp_XYZ_HeaderFile
 #define _ShapeSchema_gp_XYZ_HeaderFile
diff --git a/inc/ShapeUpgrade.hxx b/inc/ShapeUpgrade.hxx
index 69e7a59..1c3e13d 100644
--- a/inc/ShapeUpgrade.hxx
+++ b/inc/ShapeUpgrade.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,6 +66,7 @@ class ShapeUpgrade_FixSmallCurves;
 class ShapeUpgrade_FixSmallBezierCurves;
 class ShapeUpgrade_RemoveLocations;
 class ShapeUpgrade_RemoveInternalWires;
+class ShapeUpgrade_UnifySameDomain;
 
 
 //!  This package provides tools <br>
@@ -77,18 +81,7 @@ class ShapeUpgrade_RemoveInternalWires;
 class ShapeUpgrade  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean C0BSplineToSequenceOfC1BSplineCurve(const Handle(Geom_BSplineCurve)& BS,Handle(TColGeom_HSequenceOfBoundedCurve)& seqBS) ;
@@ -148,6 +141,7 @@ friend class ShapeUpgrade_FixSmallCurves;
 friend class ShapeUpgrade_FixSmallBezierCurves;
 friend class ShapeUpgrade_RemoveLocations;
 friend class ShapeUpgrade_RemoveInternalWires;
+friend class ShapeUpgrade_UnifySameDomain;
 
 };
 
diff --git a/inc/ShapeUpgrade_ShapeConvertToBezier.hxx b/inc/ShapeUpgrade_ShapeConvertToBezier.hxx
index 30f63bc..9b68683 100644
--- a/inc/ShapeUpgrade_ShapeConvertToBezier.hxx
+++ b/inc/ShapeUpgrade_ShapeConvertToBezier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class ShapeUpgrade_FaceDivide;
 class ShapeUpgrade_ShapeConvertToBezier  : public ShapeUpgrade_ShapeDivide {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   ShapeUpgrade_ShapeConvertToBezier();
diff --git a/inc/ShapeUpgrade_ShapeDivide.hxx b/inc/ShapeUpgrade_ShapeDivide.hxx
index 0ec0319..8e118fb 100644
--- a/inc/ShapeUpgrade_ShapeDivide.hxx
+++ b/inc/ShapeUpgrade_ShapeDivide.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TopoDS_Shape;
 class ShapeUpgrade_ShapeDivide  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeUpgrade_ShapeDivide();
diff --git a/inc/ShapeUpgrade_ShapeDivideAngle.hxx b/inc/ShapeUpgrade_ShapeDivideAngle.hxx
index 79ed729..714a537 100644
--- a/inc/ShapeUpgrade_ShapeDivideAngle.hxx
+++ b/inc/ShapeUpgrade_ShapeDivideAngle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Shape;
 class ShapeUpgrade_ShapeDivideAngle  : public ShapeUpgrade_ShapeDivide {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor. <br>
   Standard_EXPORT   ShapeUpgrade_ShapeDivideAngle(const Standard_Real MaxAngle);
diff --git a/inc/ShapeUpgrade_ShapeDivideArea.hxx b/inc/ShapeUpgrade_ShapeDivideArea.hxx
index d2be45c..25f6ad3 100644
--- a/inc/ShapeUpgrade_ShapeDivideArea.hxx
+++ b/inc/ShapeUpgrade_ShapeDivideArea.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class ShapeUpgrade_FaceDivide;
 class ShapeUpgrade_ShapeDivideArea  : public ShapeUpgrade_ShapeDivide {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeUpgrade_ShapeDivideArea();
diff --git a/inc/ShapeUpgrade_ShapeDivideClosed.hxx b/inc/ShapeUpgrade_ShapeDivideClosed.hxx
index be712df..9466185 100644
--- a/inc/ShapeUpgrade_ShapeDivideClosed.hxx
+++ b/inc/ShapeUpgrade_ShapeDivideClosed.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class TopoDS_Shape;
 class ShapeUpgrade_ShapeDivideClosed  : public ShapeUpgrade_ShapeDivide {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initialises tool with shape and default parameter. <br>
   Standard_EXPORT   ShapeUpgrade_ShapeDivideClosed(const TopoDS_Shape& S);
diff --git a/inc/ShapeUpgrade_ShapeDivideClosedEdges.hxx b/inc/ShapeUpgrade_ShapeDivideClosedEdges.hxx
index 44b88c2..ecb6a90 100644
--- a/inc/ShapeUpgrade_ShapeDivideClosedEdges.hxx
+++ b/inc/ShapeUpgrade_ShapeDivideClosedEdges.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TopoDS_Shape;
 class ShapeUpgrade_ShapeDivideClosedEdges  : public ShapeUpgrade_ShapeDivide {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initialises tool with shape and default parameter. <br>
   Standard_EXPORT   ShapeUpgrade_ShapeDivideClosedEdges(const TopoDS_Shape& S);
diff --git a/inc/ShapeUpgrade_ShapeDivideContinuity.hxx b/inc/ShapeUpgrade_ShapeDivideContinuity.hxx
index a306770..4c3dca1 100644
--- a/inc/ShapeUpgrade_ShapeDivideContinuity.hxx
+++ b/inc/ShapeUpgrade_ShapeDivideContinuity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class ShapeUpgrade_FaceDivide;
 class ShapeUpgrade_ShapeDivideContinuity  : public ShapeUpgrade_ShapeDivide {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ShapeUpgrade_ShapeDivideContinuity();
diff --git a/inc/ShapeUpgrade_ShellSewing.hxx b/inc/ShapeUpgrade_ShellSewing.hxx
index ce10728..8e08044 100644
--- a/inc/ShapeUpgrade_ShellSewing.hxx
+++ b/inc/ShapeUpgrade_ShellSewing.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopoDS_Shape;
 class ShapeUpgrade_ShellSewing  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a ShellSewing, empty <br>
   Standard_EXPORT   ShapeUpgrade_ShellSewing();
diff --git a/inc/ShapeUpgrade_UnifySameDomain.hxx b/inc/ShapeUpgrade_UnifySameDomain.hxx
new file mode 100644
index 0000000..4507917
--- /dev/null
+++ b/inc/ShapeUpgrade_UnifySameDomain.hxx
@@ -0,0 +1,91 @@
+// This file is generated by WOK (CPPExt).
+// Please do not edit this file; modify original file instead.
+// The copyright and license terms as defined for the original file apply to 
+// this header file considered to be the "object code" form of the original source.
+
+#ifndef _ShapeUpgrade_UnifySameDomain_HeaderFile
+#define _ShapeUpgrade_UnifySameDomain_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
+#ifndef _Handle_ShapeUpgrade_UnifySameDomain_HeaderFile
+#include <Handle_ShapeUpgrade_UnifySameDomain.hxx>
+#endif
+
+#ifndef _TopoDS_Shape_HeaderFile
+#include <TopoDS_Shape.hxx>
+#endif
+#ifndef _Standard_Boolean_HeaderFile
+#include <Standard_Boolean.hxx>
+#endif
+#ifndef _Handle_ShapeBuild_ReShape_HeaderFile
+#include <Handle_ShapeBuild_ReShape.hxx>
+#endif
+#ifndef _MMgt_TShared_HeaderFile
+#include <MMgt_TShared.hxx>
+#endif
+class ShapeBuild_ReShape;
+class TopoDS_Shape;
+
+
+//! Unifies same domain faces and edges of specified shape <br>
+class ShapeUpgrade_UnifySameDomain : public MMgt_TShared {
+
+public:
+
+  //! empty constructor <br>
+  Standard_EXPORT   ShapeUpgrade_UnifySameDomain();
+  
+  Standard_EXPORT   ShapeUpgrade_UnifySameDomain(const TopoDS_Shape& aShape,const Standard_Boolean UnifyEdges = Standard_True,const Standard_Boolean UnifyFaces = Standard_True,const Standard_Boolean ConcatBSplines = Standard_False);
+  
+  Standard_EXPORT     void Initialize(const TopoDS_Shape& aShape,const Standard_Boolean UnifyEdges = Standard_True,const Standard_Boolean UnifyFaces = Standard_True,const Standard_Boolean ConcatBSplines = Standard_False) ;
+  //! Builds the resulting shape <br>
+  Standard_EXPORT     void Build() ;
+  //! Gives the resulting shape <br>
+  Standard_EXPORT    const TopoDS_Shape& Shape() const;
+  
+  Standard_EXPORT     TopoDS_Shape Generated(const TopoDS_Shape& aShape) const;
+  //! this method makes if possible a common face from each <br>
+//!          group of faces lying on coincident surfaces <br>
+  Standard_EXPORT     void UnifyFaces() ;
+  //! this method makes if possible a common edge from each <br>
+//!          group of edges connecting common couple of faces <br>
+  Standard_EXPORT     void UnifyEdges() ;
+  //! this method unifies same domain faces and edges <br>
+  Standard_EXPORT     void UnifyFacesAndEdges() ;
+
+
+
+
+  DEFINE_STANDARD_RTTI(ShapeUpgrade_UnifySameDomain)
+
+protected:
+
+
+
+
+private: 
+
+
+TopoDS_Shape myInitShape;
+Standard_Boolean myUnifyFaces;
+Standard_Boolean myUnifyEdges;
+Standard_Boolean myConcatBSplines;
+TopoDS_Shape myShape;
+Handle_ShapeBuild_ReShape myContext;
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+
+
+#endif
diff --git a/inc/SortTools_HeapSortOfInteger.hxx b/inc/SortTools_HeapSortOfInteger.hxx
index 38e4da4..6f79a10 100644
--- a/inc/SortTools_HeapSortOfInteger.hxx
+++ b/inc/SortTools_HeapSortOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TCollection_CompareOfInteger;
 class SortTools_HeapSortOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(TColStd_Array1OfInteger& TheArray,const TCollection_CompareOfInteger& Comp) ;
diff --git a/inc/SortTools_HeapSortOfReal.hxx b/inc/SortTools_HeapSortOfReal.hxx
index 11ecc14..1412072 100644
--- a/inc/SortTools_HeapSortOfReal.hxx
+++ b/inc/SortTools_HeapSortOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TCollection_CompareOfReal;
 class SortTools_HeapSortOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(TColStd_Array1OfReal& TheArray,const TCollection_CompareOfReal& Comp) ;
diff --git a/inc/SortTools_QuickSortOfInteger.hxx b/inc/SortTools_QuickSortOfInteger.hxx
index 731a59d..535e039 100644
--- a/inc/SortTools_QuickSortOfInteger.hxx
+++ b/inc/SortTools_QuickSortOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TCollection_CompareOfInteger;
 class SortTools_QuickSortOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(TColStd_Array1OfInteger& TheArray,const TCollection_CompareOfInteger& Comp) ;
diff --git a/inc/SortTools_QuickSortOfReal.hxx b/inc/SortTools_QuickSortOfReal.hxx
index ba365da..07dec63 100644
--- a/inc/SortTools_QuickSortOfReal.hxx
+++ b/inc/SortTools_QuickSortOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TCollection_CompareOfReal;
 class SortTools_QuickSortOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(TColStd_Array1OfReal& TheArray,const TCollection_CompareOfReal& Comp) ;
diff --git a/inc/SortTools_ShellSortOfInteger.hxx b/inc/SortTools_ShellSortOfInteger.hxx
index 31a98d9..201b2d0 100644
--- a/inc/SortTools_ShellSortOfInteger.hxx
+++ b/inc/SortTools_ShellSortOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TCollection_CompareOfInteger;
 class SortTools_ShellSortOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(TColStd_Array1OfInteger& TheArray,const TCollection_CompareOfInteger& Comp) ;
diff --git a/inc/SortTools_ShellSortOfReal.hxx b/inc/SortTools_ShellSortOfReal.hxx
index 7db60bf..388df0b 100644
--- a/inc/SortTools_ShellSortOfReal.hxx
+++ b/inc/SortTools_ShellSortOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TCollection_CompareOfReal;
 class SortTools_ShellSortOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(TColStd_Array1OfReal& TheArray,const TCollection_CompareOfReal& Comp) ;
diff --git a/inc/SortTools_StraightInsertionSortOfInteger.hxx b/inc/SortTools_StraightInsertionSortOfInteger.hxx
index 266ab6e..21e0a95 100644
--- a/inc/SortTools_StraightInsertionSortOfInteger.hxx
+++ b/inc/SortTools_StraightInsertionSortOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TCollection_CompareOfInteger;
 class SortTools_StraightInsertionSortOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(TColStd_Array1OfInteger& TheArray,const TCollection_CompareOfInteger& Comp) ;
diff --git a/inc/SortTools_StraightInsertionSortOfReal.hxx b/inc/SortTools_StraightInsertionSortOfReal.hxx
index 2e5bde7..3bd0c01 100644
--- a/inc/SortTools_StraightInsertionSortOfReal.hxx
+++ b/inc/SortTools_StraightInsertionSortOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TCollection_CompareOfReal;
 class SortTools_StraightInsertionSortOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(TColStd_Array1OfReal& TheArray,const TCollection_CompareOfReal& Comp) ;
diff --git a/inc/Standard.hxx b/inc/Standard.hxx
index 6846c81..d7bfda6 100644
--- a/inc/Standard.hxx
+++ b/inc/Standard.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Standard_Failure;
 class Standard  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Allocates memory blocks <br>
 //!           aSize - bytes to  allocate <br>
diff --git a/inc/Standard_AncestorIterator.hxx b/inc/Standard_AncestorIterator.hxx
index fbbf541..e0d41c6 100644
--- a/inc/Standard_AncestorIterator.hxx
+++ b/inc/Standard_AncestorIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Standard_NoMoreObject;
 class Standard_AncestorIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!   The copy constructor for a AncestorIterator . <br>
diff --git a/inc/Standard_ErrorHandler.hxx b/inc/Standard_ErrorHandler.hxx
index d5a72bb..43ac136 100644
--- a/inc/Standard_ErrorHandler.hxx
+++ b/inc/Standard_ErrorHandler.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class Standard_Type;
 class Standard_ErrorHandler  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a ErrorHandler (to be used with try{}catch(){}). <br>
 //!           It uses the "setjmp" and "longjmp" routines. <br>
diff --git a/inc/Standard_ErrorHandlerCallback.hxx b/inc/Standard_ErrorHandlerCallback.hxx
index 6b3817a..989f79d 100644
--- a/inc/Standard_ErrorHandlerCallback.hxx
+++ b/inc/Standard_ErrorHandlerCallback.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class Standard_ErrorHandler;
 class Standard_ErrorHandlerCallback  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Registers this callback object in the current error handler <br>
 //!          (if found). <br>
diff --git a/inc/Standard_GUID.hxx b/inc/Standard_GUID.hxx
index b631956..732ccea 100644
--- a/inc/Standard_GUID.hxx
+++ b/inc/Standard_GUID.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Standard_GUID);
 class Standard_GUID  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Standard_GUID();
diff --git a/inc/Standard_Mutex.hxx b/inc/Standard_Mutex.hxx
index 0d76060..1411c06 100644
--- a/inc/Standard_Mutex.hxx
+++ b/inc/Standard_Mutex.hxx
@@ -198,6 +198,11 @@ private:
   //! Callback method to unlock the mutex if OCC exception or signal is raised
   virtual void DestroyCallback ();
   
+  //! This method should not be called (prohibited).
+  Standard_Mutex (const Standard_Mutex &);
+  //! This method should not be called (prohibited).
+  Standard_Mutex& operator = (const Standard_Mutex &);
+  
 private:
 #ifdef WNT
   CRITICAL_SECTION myMutex;
diff --git a/inc/Standard_Storable.hxx b/inc/Standard_Storable.hxx
index b484469..be4daeb 100644
--- a/inc/Standard_Storable.hxx
+++ b/inc/Standard_Storable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Standard_Storable);
 class Standard_Storable  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/Standard_Version.hxx b/inc/Standard_Version.hxx
index 4ae8c71..832beb8 100644
--- a/inc/Standard_Version.hxx
+++ b/inc/Standard_Version.hxx
@@ -39,7 +39,7 @@
 // Primary definitions
 #define OCC_VERSION_MAJOR         6
 #define OCC_VERSION_MINOR         5
-#define OCC_VERSION_MAINTENANCE   3
+#define OCC_VERSION_MAINTENANCE   4
 
 //! This macro must be commented in official release, and set to non-empty 
 //! string in other situations, to identify specifics of the version, e.g.:
@@ -51,7 +51,7 @@
 // Derived (manually): version as real and string (major.minor)
 #define OCC_VERSION               6.5
 #define OCC_VERSION_STRING       "6.5"
-#define OCC_VERSION_COMPLETE     "6.5.3"
+#define OCC_VERSION_COMPLETE     "6.5.4"
 
 //! Derived: extended version as string ("major.minor.maintenance.dev")
 #ifdef OCC_VERSION_DEVELOPMENT
diff --git a/inc/StdDrivers.hxx b/inc/StdDrivers.hxx
index 9052734..38f2782 100644
--- a/inc/StdDrivers.hxx
+++ b/inc/StdDrivers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class StdDrivers_DocumentStorageDriver;
 class StdDrivers  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Depending from the  ID, returns a list of  storage <br>
 //!          or retrieval attribute drivers. Used for plugin <br>
diff --git a/inc/StdLDrivers.hxx b/inc/StdLDrivers.hxx
index 36b7bfd..c29883b 100644
--- a/inc/StdLDrivers.hxx
+++ b/inc/StdLDrivers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class StdLDrivers_DocumentStorageDriver;
 class StdLDrivers  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Depending from the  ID, returns a list of  storage <br>
 //!          or retrieval attribute drivers. Used for plugin <br>
diff --git a/inc/StdLSchema.hxx b/inc/StdLSchema.hxx
index 69adb38..57ef164 100644
--- a/inc/StdLSchema.hxx
+++ b/inc/StdLSchema.hxx
@@ -74,10 +74,26 @@ class DBC_VArrayOfExtCharacter;
 class PColStd_FieldOfHArray1OfReal;
 class PColStd_FieldOfHArray1OfExtendedString;
 class PColStd_FieldOfHArray2OfInteger;
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Schema)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_HeaderFile
 #define _StdLSchema_HeaderFile
diff --git a/inc/StdLSchema_DBC_VArrayOfCharacter.hxx b/inc/StdLSchema_DBC_VArrayOfCharacter.hxx
index 4c9b921..242185f 100644
--- a/inc/StdLSchema_DBC_VArrayOfCharacter.hxx
+++ b/inc/StdLSchema_DBC_VArrayOfCharacter.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_DBC_VArrayOfCharacter_HeaderFile
 #define _StdLSchema_DBC_VArrayOfCharacter_HeaderFile
diff --git a/inc/StdLSchema_DBC_VArrayOfExtCharacter.hxx b/inc/StdLSchema_DBC_VArrayOfExtCharacter.hxx
index 35e8f9b..396c4e0 100644
--- a/inc/StdLSchema_DBC_VArrayOfExtCharacter.hxx
+++ b/inc/StdLSchema_DBC_VArrayOfExtCharacter.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_DBC_VArrayOfExtCharacter_HeaderFile
 #define _StdLSchema_DBC_VArrayOfExtCharacter_HeaderFile
diff --git a/inc/StdLSchema_PCDM_Document.hxx b/inc/StdLSchema_PCDM_Document.hxx
index b51d609..ecd6f0e 100644
--- a/inc/StdLSchema_PCDM_Document.hxx
+++ b/inc/StdLSchema_PCDM_Document.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PCDM_Document_HeaderFile
 #define _StdLSchema_PCDM_Document_HeaderFile
diff --git a/inc/StdLSchema_PColStd_FieldOfHArray1OfExtendedString.hxx b/inc/StdLSchema_PColStd_FieldOfHArray1OfExtendedString.hxx
index 405dbf2..58751c7 100644
--- a/inc/StdLSchema_PColStd_FieldOfHArray1OfExtendedString.hxx
+++ b/inc/StdLSchema_PColStd_FieldOfHArray1OfExtendedString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PColStd_FieldOfHArray1OfExtendedString_HeaderFile
 #define _StdLSchema_PColStd_FieldOfHArray1OfExtendedString_HeaderFile
diff --git a/inc/StdLSchema_PColStd_FieldOfHArray1OfInteger.hxx b/inc/StdLSchema_PColStd_FieldOfHArray1OfInteger.hxx
index 02ee361..b7f2cf5 100644
--- a/inc/StdLSchema_PColStd_FieldOfHArray1OfInteger.hxx
+++ b/inc/StdLSchema_PColStd_FieldOfHArray1OfInteger.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PColStd_FieldOfHArray1OfInteger_HeaderFile
 #define _StdLSchema_PColStd_FieldOfHArray1OfInteger_HeaderFile
diff --git a/inc/StdLSchema_PColStd_FieldOfHArray1OfReal.hxx b/inc/StdLSchema_PColStd_FieldOfHArray1OfReal.hxx
index 3b684d6..69afed4 100644
--- a/inc/StdLSchema_PColStd_FieldOfHArray1OfReal.hxx
+++ b/inc/StdLSchema_PColStd_FieldOfHArray1OfReal.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PColStd_FieldOfHArray1OfReal_HeaderFile
 #define _StdLSchema_PColStd_FieldOfHArray1OfReal_HeaderFile
diff --git a/inc/StdLSchema_PColStd_FieldOfHArray2OfInteger.hxx b/inc/StdLSchema_PColStd_FieldOfHArray2OfInteger.hxx
index 0030d28..45e8716 100644
--- a/inc/StdLSchema_PColStd_FieldOfHArray2OfInteger.hxx
+++ b/inc/StdLSchema_PColStd_FieldOfHArray2OfInteger.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PColStd_FieldOfHArray2OfInteger_HeaderFile
 #define _StdLSchema_PColStd_FieldOfHArray2OfInteger_HeaderFile
diff --git a/inc/StdLSchema_PColStd_HArray1OfExtendedString.hxx b/inc/StdLSchema_PColStd_HArray1OfExtendedString.hxx
index 844fa58..a6d2bf5 100644
--- a/inc/StdLSchema_PColStd_HArray1OfExtendedString.hxx
+++ b/inc/StdLSchema_PColStd_HArray1OfExtendedString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PColStd_HArray1OfExtendedString_HeaderFile
 #define _StdLSchema_PColStd_HArray1OfExtendedString_HeaderFile
diff --git a/inc/StdLSchema_PColStd_HArray1OfInteger.hxx b/inc/StdLSchema_PColStd_HArray1OfInteger.hxx
index f924830..27ba6ee 100644
--- a/inc/StdLSchema_PColStd_HArray1OfInteger.hxx
+++ b/inc/StdLSchema_PColStd_HArray1OfInteger.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PColStd_HArray1OfInteger_HeaderFile
 #define _StdLSchema_PColStd_HArray1OfInteger_HeaderFile
diff --git a/inc/StdLSchema_PColStd_HArray1OfReal.hxx b/inc/StdLSchema_PColStd_HArray1OfReal.hxx
index 26e832e..ad605b5 100644
--- a/inc/StdLSchema_PColStd_HArray1OfReal.hxx
+++ b/inc/StdLSchema_PColStd_HArray1OfReal.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PColStd_HArray1OfReal_HeaderFile
 #define _StdLSchema_PColStd_HArray1OfReal_HeaderFile
diff --git a/inc/StdLSchema_PColStd_HArray2OfInteger.hxx b/inc/StdLSchema_PColStd_HArray2OfInteger.hxx
index 16e9167..6749521 100644
--- a/inc/StdLSchema_PColStd_HArray2OfInteger.hxx
+++ b/inc/StdLSchema_PColStd_HArray2OfInteger.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PColStd_HArray2OfInteger_HeaderFile
 #define _StdLSchema_PColStd_HArray2OfInteger_HeaderFile
diff --git a/inc/StdLSchema_PCollection_HAsciiString.hxx b/inc/StdLSchema_PCollection_HAsciiString.hxx
index f188664..989b859 100644
--- a/inc/StdLSchema_PCollection_HAsciiString.hxx
+++ b/inc/StdLSchema_PCollection_HAsciiString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PCollection_HAsciiString_HeaderFile
 #define _StdLSchema_PCollection_HAsciiString_HeaderFile
diff --git a/inc/StdLSchema_PCollection_HExtendedString.hxx b/inc/StdLSchema_PCollection_HExtendedString.hxx
index e62f9e8..a5f0ae8 100644
--- a/inc/StdLSchema_PCollection_HExtendedString.hxx
+++ b/inc/StdLSchema_PCollection_HExtendedString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PCollection_HExtendedString_HeaderFile
 #define _StdLSchema_PCollection_HExtendedString_HeaderFile
diff --git a/inc/StdLSchema_PDF_Attribute.hxx b/inc/StdLSchema_PDF_Attribute.hxx
index 8a29afd..75134b3 100644
--- a/inc/StdLSchema_PDF_Attribute.hxx
+++ b/inc/StdLSchema_PDF_Attribute.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDF_Attribute_HeaderFile
 #define _StdLSchema_PDF_Attribute_HeaderFile
diff --git a/inc/StdLSchema_PDF_Data.hxx b/inc/StdLSchema_PDF_Data.hxx
index 3ee5736..abd7b3b 100644
--- a/inc/StdLSchema_PDF_Data.hxx
+++ b/inc/StdLSchema_PDF_Data.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDF_Data_HeaderFile
 #define _StdLSchema_PDF_Data_HeaderFile
diff --git a/inc/StdLSchema_PDF_FieldOfHAttributeArray1.hxx b/inc/StdLSchema_PDF_FieldOfHAttributeArray1.hxx
index 699cba5..5ff9845 100644
--- a/inc/StdLSchema_PDF_FieldOfHAttributeArray1.hxx
+++ b/inc/StdLSchema_PDF_FieldOfHAttributeArray1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDF_FieldOfHAttributeArray1_HeaderFile
 #define _StdLSchema_PDF_FieldOfHAttributeArray1_HeaderFile
diff --git a/inc/StdLSchema_PDF_HAttributeArray1.hxx b/inc/StdLSchema_PDF_HAttributeArray1.hxx
index 6834222..06d8e2e 100644
--- a/inc/StdLSchema_PDF_HAttributeArray1.hxx
+++ b/inc/StdLSchema_PDF_HAttributeArray1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDF_HAttributeArray1_HeaderFile
 #define _StdLSchema_PDF_HAttributeArray1_HeaderFile
diff --git a/inc/StdLSchema_PDF_Reference.hxx b/inc/StdLSchema_PDF_Reference.hxx
index d74ba20..2fcd3c0 100644
--- a/inc/StdLSchema_PDF_Reference.hxx
+++ b/inc/StdLSchema_PDF_Reference.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDF_Reference_HeaderFile
 #define _StdLSchema_PDF_Reference_HeaderFile
diff --git a/inc/StdLSchema_PDF_TagSource.hxx b/inc/StdLSchema_PDF_TagSource.hxx
index b4d70e1..bce44b0 100644
--- a/inc/StdLSchema_PDF_TagSource.hxx
+++ b/inc/StdLSchema_PDF_TagSource.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDF_TagSource_HeaderFile
 #define _StdLSchema_PDF_TagSource_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_AsciiString.hxx b/inc/StdLSchema_PDataStd_AsciiString.hxx
index 7254654..41cf3ef 100644
--- a/inc/StdLSchema_PDataStd_AsciiString.hxx
+++ b/inc/StdLSchema_PDataStd_AsciiString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_AsciiString_HeaderFile
 #define _StdLSchema_PDataStd_AsciiString_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_BooleanArray.hxx b/inc/StdLSchema_PDataStd_BooleanArray.hxx
index 25bc707..0199213 100644
--- a/inc/StdLSchema_PDataStd_BooleanArray.hxx
+++ b/inc/StdLSchema_PDataStd_BooleanArray.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_BooleanArray_HeaderFile
 #define _StdLSchema_PDataStd_BooleanArray_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_BooleanList.hxx b/inc/StdLSchema_PDataStd_BooleanList.hxx
index 308991d..ded9208 100644
--- a/inc/StdLSchema_PDataStd_BooleanList.hxx
+++ b/inc/StdLSchema_PDataStd_BooleanList.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_BooleanList_HeaderFile
 #define _StdLSchema_PDataStd_BooleanList_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_ByteArray.hxx b/inc/StdLSchema_PDataStd_ByteArray.hxx
index 593ff2c..3b9ad17 100644
--- a/inc/StdLSchema_PDataStd_ByteArray.hxx
+++ b/inc/StdLSchema_PDataStd_ByteArray.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_ByteArray_HeaderFile
 #define _StdLSchema_PDataStd_ByteArray_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_ByteArray_1.hxx b/inc/StdLSchema_PDataStd_ByteArray_1.hxx
index d2f1733..a1ee371 100644
--- a/inc/StdLSchema_PDataStd_ByteArray_1.hxx
+++ b/inc/StdLSchema_PDataStd_ByteArray_1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_ByteArray_1_HeaderFile
 #define _StdLSchema_PDataStd_ByteArray_1_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_Comment.hxx b/inc/StdLSchema_PDataStd_Comment.hxx
index 1ca0658..98a7865 100644
--- a/inc/StdLSchema_PDataStd_Comment.hxx
+++ b/inc/StdLSchema_PDataStd_Comment.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_Comment_HeaderFile
 #define _StdLSchema_PDataStd_Comment_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_Directory.hxx b/inc/StdLSchema_PDataStd_Directory.hxx
index bf80133..96f3f22 100644
--- a/inc/StdLSchema_PDataStd_Directory.hxx
+++ b/inc/StdLSchema_PDataStd_Directory.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_Directory_HeaderFile
 #define _StdLSchema_PDataStd_Directory_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_Expression.hxx b/inc/StdLSchema_PDataStd_Expression.hxx
index aa7df7d..660710f 100644
--- a/inc/StdLSchema_PDataStd_Expression.hxx
+++ b/inc/StdLSchema_PDataStd_Expression.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_Expression_HeaderFile
 #define _StdLSchema_PDataStd_Expression_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_ExtStringArray.hxx b/inc/StdLSchema_PDataStd_ExtStringArray.hxx
index ea154d4..05e9129 100644
--- a/inc/StdLSchema_PDataStd_ExtStringArray.hxx
+++ b/inc/StdLSchema_PDataStd_ExtStringArray.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_ExtStringArray_HeaderFile
 #define _StdLSchema_PDataStd_ExtStringArray_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_ExtStringArray_1.hxx b/inc/StdLSchema_PDataStd_ExtStringArray_1.hxx
index fb6dbbf..e3d9f09 100644
--- a/inc/StdLSchema_PDataStd_ExtStringArray_1.hxx
+++ b/inc/StdLSchema_PDataStd_ExtStringArray_1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_ExtStringArray_1_HeaderFile
 #define _StdLSchema_PDataStd_ExtStringArray_1_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_ExtStringList.hxx b/inc/StdLSchema_PDataStd_ExtStringList.hxx
index 10059b9..26aa491 100644
--- a/inc/StdLSchema_PDataStd_ExtStringList.hxx
+++ b/inc/StdLSchema_PDataStd_ExtStringList.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_ExtStringList_HeaderFile
 #define _StdLSchema_PDataStd_ExtStringList_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_FieldOfHArray1OfByte.hxx b/inc/StdLSchema_PDataStd_FieldOfHArray1OfByte.hxx
index 953d200..f28c5bb 100644
--- a/inc/StdLSchema_PDataStd_FieldOfHArray1OfByte.hxx
+++ b/inc/StdLSchema_PDataStd_FieldOfHArray1OfByte.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_FieldOfHArray1OfByte_HeaderFile
 #define _StdLSchema_PDataStd_FieldOfHArray1OfByte_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_FieldOfHArray1OfHArray1OfInteger.hxx b/inc/StdLSchema_PDataStd_FieldOfHArray1OfHArray1OfInteger.hxx
index 7b254b3..0198f16 100644
--- a/inc/StdLSchema_PDataStd_FieldOfHArray1OfHArray1OfInteger.hxx
+++ b/inc/StdLSchema_PDataStd_FieldOfHArray1OfHArray1OfInteger.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_FieldOfHArray1OfHArray1OfInteger_HeaderFile
 #define _StdLSchema_PDataStd_FieldOfHArray1OfHArray1OfInteger_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_FieldOfHArray1OfHArray1OfReal.hxx b/inc/StdLSchema_PDataStd_FieldOfHArray1OfHArray1OfReal.hxx
index 90d3067..441dcad 100644
--- a/inc/StdLSchema_PDataStd_FieldOfHArray1OfHArray1OfReal.hxx
+++ b/inc/StdLSchema_PDataStd_FieldOfHArray1OfHArray1OfReal.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_FieldOfHArray1OfHArray1OfReal_HeaderFile
 #define _StdLSchema_PDataStd_FieldOfHArray1OfHArray1OfReal_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_FieldOfHArray1OfHAsciiString.hxx b/inc/StdLSchema_PDataStd_FieldOfHArray1OfHAsciiString.hxx
index d054b44..46f028a 100644
--- a/inc/StdLSchema_PDataStd_FieldOfHArray1OfHAsciiString.hxx
+++ b/inc/StdLSchema_PDataStd_FieldOfHArray1OfHAsciiString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_FieldOfHArray1OfHAsciiString_HeaderFile
 #define _StdLSchema_PDataStd_FieldOfHArray1OfHAsciiString_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_HArray1OfByte.hxx b/inc/StdLSchema_PDataStd_HArray1OfByte.hxx
index 3129caf..8366b79 100644
--- a/inc/StdLSchema_PDataStd_HArray1OfByte.hxx
+++ b/inc/StdLSchema_PDataStd_HArray1OfByte.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_HArray1OfByte_HeaderFile
 #define _StdLSchema_PDataStd_HArray1OfByte_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_HArray1OfHArray1OfInteger.hxx b/inc/StdLSchema_PDataStd_HArray1OfHArray1OfInteger.hxx
index d9fe05c..3938bfc 100644
--- a/inc/StdLSchema_PDataStd_HArray1OfHArray1OfInteger.hxx
+++ b/inc/StdLSchema_PDataStd_HArray1OfHArray1OfInteger.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_HArray1OfHArray1OfInteger_HeaderFile
 #define _StdLSchema_PDataStd_HArray1OfHArray1OfInteger_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_HArray1OfHArray1OfReal.hxx b/inc/StdLSchema_PDataStd_HArray1OfHArray1OfReal.hxx
index 7984b8c..c8c4733 100644
--- a/inc/StdLSchema_PDataStd_HArray1OfHArray1OfReal.hxx
+++ b/inc/StdLSchema_PDataStd_HArray1OfHArray1OfReal.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_HArray1OfHArray1OfReal_HeaderFile
 #define _StdLSchema_PDataStd_HArray1OfHArray1OfReal_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_HArray1OfHAsciiString.hxx b/inc/StdLSchema_PDataStd_HArray1OfHAsciiString.hxx
index 9e05210..14d8069 100644
--- a/inc/StdLSchema_PDataStd_HArray1OfHAsciiString.hxx
+++ b/inc/StdLSchema_PDataStd_HArray1OfHAsciiString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_HArray1OfHAsciiString_HeaderFile
 #define _StdLSchema_PDataStd_HArray1OfHAsciiString_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_IntPackedMap.hxx b/inc/StdLSchema_PDataStd_IntPackedMap.hxx
index b510707..9f80ce7 100644
--- a/inc/StdLSchema_PDataStd_IntPackedMap.hxx
+++ b/inc/StdLSchema_PDataStd_IntPackedMap.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_IntPackedMap_HeaderFile
 #define _StdLSchema_PDataStd_IntPackedMap_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_IntPackedMap_1.hxx b/inc/StdLSchema_PDataStd_IntPackedMap_1.hxx
index 176c56c..fe233d8 100644
--- a/inc/StdLSchema_PDataStd_IntPackedMap_1.hxx
+++ b/inc/StdLSchema_PDataStd_IntPackedMap_1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_IntPackedMap_1_HeaderFile
 #define _StdLSchema_PDataStd_IntPackedMap_1_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_Integer.hxx b/inc/StdLSchema_PDataStd_Integer.hxx
index d3bf6a5..a83bcc3 100644
--- a/inc/StdLSchema_PDataStd_Integer.hxx
+++ b/inc/StdLSchema_PDataStd_Integer.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_Integer_HeaderFile
 #define _StdLSchema_PDataStd_Integer_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_IntegerArray.hxx b/inc/StdLSchema_PDataStd_IntegerArray.hxx
index 7861a53..f07fea4 100644
--- a/inc/StdLSchema_PDataStd_IntegerArray.hxx
+++ b/inc/StdLSchema_PDataStd_IntegerArray.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_IntegerArray_HeaderFile
 #define _StdLSchema_PDataStd_IntegerArray_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_IntegerArray_1.hxx b/inc/StdLSchema_PDataStd_IntegerArray_1.hxx
index 1971855..ea5ff88 100644
--- a/inc/StdLSchema_PDataStd_IntegerArray_1.hxx
+++ b/inc/StdLSchema_PDataStd_IntegerArray_1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_IntegerArray_1_HeaderFile
 #define _StdLSchema_PDataStd_IntegerArray_1_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_IntegerList.hxx b/inc/StdLSchema_PDataStd_IntegerList.hxx
index 3afc388..b754ffd 100644
--- a/inc/StdLSchema_PDataStd_IntegerList.hxx
+++ b/inc/StdLSchema_PDataStd_IntegerList.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_IntegerList_HeaderFile
 #define _StdLSchema_PDataStd_IntegerList_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_Name.hxx b/inc/StdLSchema_PDataStd_Name.hxx
index ed36b54..300bc71 100644
--- a/inc/StdLSchema_PDataStd_Name.hxx
+++ b/inc/StdLSchema_PDataStd_Name.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_Name_HeaderFile
 #define _StdLSchema_PDataStd_Name_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_NamedData.hxx b/inc/StdLSchema_PDataStd_NamedData.hxx
index 7903b48..83622b1 100644
--- a/inc/StdLSchema_PDataStd_NamedData.hxx
+++ b/inc/StdLSchema_PDataStd_NamedData.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_NamedData_HeaderFile
 #define _StdLSchema_PDataStd_NamedData_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_NoteBook.hxx b/inc/StdLSchema_PDataStd_NoteBook.hxx
index 9e32c8f..360978a 100644
--- a/inc/StdLSchema_PDataStd_NoteBook.hxx
+++ b/inc/StdLSchema_PDataStd_NoteBook.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_NoteBook_HeaderFile
 #define _StdLSchema_PDataStd_NoteBook_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_Real.hxx b/inc/StdLSchema_PDataStd_Real.hxx
index a539d77..3946cb3 100644
--- a/inc/StdLSchema_PDataStd_Real.hxx
+++ b/inc/StdLSchema_PDataStd_Real.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_Real_HeaderFile
 #define _StdLSchema_PDataStd_Real_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_RealArray.hxx b/inc/StdLSchema_PDataStd_RealArray.hxx
index 863726a..c9f614a 100644
--- a/inc/StdLSchema_PDataStd_RealArray.hxx
+++ b/inc/StdLSchema_PDataStd_RealArray.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_RealArray_HeaderFile
 #define _StdLSchema_PDataStd_RealArray_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_RealArray_1.hxx b/inc/StdLSchema_PDataStd_RealArray_1.hxx
index 43792a8..66891f3 100644
--- a/inc/StdLSchema_PDataStd_RealArray_1.hxx
+++ b/inc/StdLSchema_PDataStd_RealArray_1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_RealArray_1_HeaderFile
 #define _StdLSchema_PDataStd_RealArray_1_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_RealList.hxx b/inc/StdLSchema_PDataStd_RealList.hxx
index 03ffd48..281bdf7 100644
--- a/inc/StdLSchema_PDataStd_RealList.hxx
+++ b/inc/StdLSchema_PDataStd_RealList.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_RealList_HeaderFile
 #define _StdLSchema_PDataStd_RealList_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_ReferenceArray.hxx b/inc/StdLSchema_PDataStd_ReferenceArray.hxx
index b48390b..40cd214 100644
--- a/inc/StdLSchema_PDataStd_ReferenceArray.hxx
+++ b/inc/StdLSchema_PDataStd_ReferenceArray.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_ReferenceArray_HeaderFile
 #define _StdLSchema_PDataStd_ReferenceArray_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_ReferenceList.hxx b/inc/StdLSchema_PDataStd_ReferenceList.hxx
index 3c7bc27..c9383ce 100644
--- a/inc/StdLSchema_PDataStd_ReferenceList.hxx
+++ b/inc/StdLSchema_PDataStd_ReferenceList.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_ReferenceList_HeaderFile
 #define _StdLSchema_PDataStd_ReferenceList_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_Relation.hxx b/inc/StdLSchema_PDataStd_Relation.hxx
index 22167cf..db8f16e 100644
--- a/inc/StdLSchema_PDataStd_Relation.hxx
+++ b/inc/StdLSchema_PDataStd_Relation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_Relation_HeaderFile
 #define _StdLSchema_PDataStd_Relation_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_Tick.hxx b/inc/StdLSchema_PDataStd_Tick.hxx
index 7898b90..5d7f1fc 100644
--- a/inc/StdLSchema_PDataStd_Tick.hxx
+++ b/inc/StdLSchema_PDataStd_Tick.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_Tick_HeaderFile
 #define _StdLSchema_PDataStd_Tick_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_TreeNode.hxx b/inc/StdLSchema_PDataStd_TreeNode.hxx
index 19e2cbf..26cceef 100644
--- a/inc/StdLSchema_PDataStd_TreeNode.hxx
+++ b/inc/StdLSchema_PDataStd_TreeNode.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_TreeNode_HeaderFile
 #define _StdLSchema_PDataStd_TreeNode_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_UAttribute.hxx b/inc/StdLSchema_PDataStd_UAttribute.hxx
index c09958e..b262b2d 100644
--- a/inc/StdLSchema_PDataStd_UAttribute.hxx
+++ b/inc/StdLSchema_PDataStd_UAttribute.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_UAttribute_HeaderFile
 #define _StdLSchema_PDataStd_UAttribute_HeaderFile
diff --git a/inc/StdLSchema_PDataStd_Variable.hxx b/inc/StdLSchema_PDataStd_Variable.hxx
index 00ce086..7d815cc 100644
--- a/inc/StdLSchema_PDataStd_Variable.hxx
+++ b/inc/StdLSchema_PDataStd_Variable.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDataStd_Variable_HeaderFile
 #define _StdLSchema_PDataStd_Variable_HeaderFile
diff --git a/inc/StdLSchema_PDocStd_Document.hxx b/inc/StdLSchema_PDocStd_Document.hxx
index 26e3cbd..df2bc6b 100644
--- a/inc/StdLSchema_PDocStd_Document.hxx
+++ b/inc/StdLSchema_PDocStd_Document.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDocStd_Document_HeaderFile
 #define _StdLSchema_PDocStd_Document_HeaderFile
diff --git a/inc/StdLSchema_PDocStd_XLink.hxx b/inc/StdLSchema_PDocStd_XLink.hxx
index 16bd239..55a00ef 100644
--- a/inc/StdLSchema_PDocStd_XLink.hxx
+++ b/inc/StdLSchema_PDocStd_XLink.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PDocStd_XLink_HeaderFile
 #define _StdLSchema_PDocStd_XLink_HeaderFile
diff --git a/inc/StdLSchema_PFunction_Function.hxx b/inc/StdLSchema_PFunction_Function.hxx
index fd0fcef..055d54d 100644
--- a/inc/StdLSchema_PFunction_Function.hxx
+++ b/inc/StdLSchema_PFunction_Function.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_PFunction_Function_HeaderFile
 #define _StdLSchema_PFunction_Function_HeaderFile
diff --git a/inc/StdLSchema_Standard_GUID.hxx b/inc/StdLSchema_Standard_GUID.hxx
index 758a021..63a8da3 100644
--- a/inc/StdLSchema_Standard_GUID.hxx
+++ b/inc/StdLSchema_Standard_GUID.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_Standard_GUID_HeaderFile
 #define _StdLSchema_Standard_GUID_HeaderFile
diff --git a/inc/StdLSchema_Standard_Persistent.hxx b/inc/StdLSchema_Standard_Persistent.hxx
index dd117c1..3e003e5 100644
--- a/inc/StdLSchema_Standard_Persistent.hxx
+++ b/inc/StdLSchema_Standard_Persistent.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_Standard_Persistent_HeaderFile
 #define _StdLSchema_Standard_Persistent_HeaderFile
diff --git a/inc/StdLSchema_Standard_Storable.hxx b/inc/StdLSchema_Standard_Storable.hxx
index 4426f1d..52f6327 100644
--- a/inc/StdLSchema_Standard_Storable.hxx
+++ b/inc/StdLSchema_Standard_Storable.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdLSchema_Standard_Storable_HeaderFile
 #define _StdLSchema_Standard_Storable_HeaderFile
diff --git a/inc/StdPrs_Curve.hxx b/inc/StdPrs_Curve.hxx
index 743a164..92ede13 100644
--- a/inc/StdPrs_Curve.hxx
+++ b/inc/StdPrs_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TColgp_SequenceOfPnt;
 class StdPrs_Curve  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds to the presentation aPresentation the drawing of the curve aCurve. <br>
 //!          The aspect is defined by LineAspect in aDrawer. <br>
diff --git a/inc/StdPrs_DeflectionCurve.hxx b/inc/StdPrs_DeflectionCurve.hxx
index 0883596..af6fb14 100644
--- a/inc/StdPrs_DeflectionCurve.hxx
+++ b/inc/StdPrs_DeflectionCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TColgp_SequenceOfPnt;
 class StdPrs_DeflectionCurve  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! adds to the presentation aPresentation the drawing of the curve <br>
 //!          aCurve with respect to the maximal chordial deviation defined <br>
diff --git a/inc/StdPrs_HLRPolyShape.hxx b/inc/StdPrs_HLRPolyShape.hxx
index 165f040..aee5b82 100644
--- a/inc/StdPrs_HLRPolyShape.hxx
+++ b/inc/StdPrs_HLRPolyShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class Prs3d_Projector;
 class StdPrs_HLRPolyShape  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines the hidden line removal display of the <br>
 //! topology aShape in the projection defined by <br>
diff --git a/inc/StdPrs_HLRShape.hxx b/inc/StdPrs_HLRShape.hxx
index f54706f..764be88 100644
--- a/inc/StdPrs_HLRShape.hxx
+++ b/inc/StdPrs_HLRShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Prs3d_Projector;
 class StdPrs_HLRShape  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(const Handle(Prs3d_Presentation)& aPresentation,const TopoDS_Shape& aShape,const Handle(Prs3d_Drawer)& aDrawer,const Handle(Prs3d_Projector)& aProjector) ;
diff --git a/inc/StdPrs_HLRToolShape.hxx b/inc/StdPrs_HLRToolShape.hxx
index 7ac3070..0e13356 100644
--- a/inc/StdPrs_HLRToolShape.hxx
+++ b/inc/StdPrs_HLRToolShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class BRepAdaptor_Curve;
 class StdPrs_HLRToolShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StdPrs_HLRToolShape(const TopoDS_Shape& TheShape,const HLRAlgo_Projector& TheProjector);
diff --git a/inc/StdPrs_Plane.hxx b/inc/StdPrs_Plane.hxx
index b364006..92cfe81 100644
--- a/inc/StdPrs_Plane.hxx
+++ b/inc/StdPrs_Plane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Prs3d_Drawer;
 class StdPrs_Plane  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines display of infinite planes. <br>
 //! The infinite plane aPlane is added to the display <br>
diff --git a/inc/StdPrs_Point.hxx b/inc/StdPrs_Point.hxx
index a9a21ed..2b996f1 100644
--- a/inc/StdPrs_Point.hxx
+++ b/inc/StdPrs_Point.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class Prs3d_Drawer;
 class StdPrs_Point  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(const Handle(Prs3d_Presentation)& aPresentation,const Handle(Geom_Point)& aPoint,const Handle(Prs3d_Drawer)& aDrawer) ;
diff --git a/inc/StdPrs_PoleCurve.hxx b/inc/StdPrs_PoleCurve.hxx
index 0e610af..99ef76c 100644
--- a/inc/StdPrs_PoleCurve.hxx
+++ b/inc/StdPrs_PoleCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Prs3d_Drawer;
 class StdPrs_PoleCurve  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines display of BSpline and Bezier curves. <br>
 //! Adds the 3D curve aCurve to the <br>
diff --git a/inc/StdPrs_ShadedShape.hxx b/inc/StdPrs_ShadedShape.hxx
index 9f58843..3f0bab1 100644
--- a/inc/StdPrs_ShadedShape.hxx
+++ b/inc/StdPrs_ShadedShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class gp_Pnt2d;
 class StdPrs_ShadedShape  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Shades <theShape>. <br>
   Standard_EXPORT   static  void Add(const Handle(Prs3d_Presentation)& thePresentation,const TopoDS_Shape& theShape,const Handle(Prs3d_Drawer)& theDrawer) ;
diff --git a/inc/StdPrs_ShadedSurface.hxx b/inc/StdPrs_ShadedSurface.hxx
index c98e612..7a972da 100644
--- a/inc/StdPrs_ShadedSurface.hxx
+++ b/inc/StdPrs_ShadedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Prs3d_Drawer;
 class StdPrs_ShadedSurface  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the surface aSurface to the presentation object aPresentation. <br>
 //! The surface's display attributes are set in the attribute manager aDrawer. <br>
diff --git a/inc/StdPrs_ToolPoint.hxx b/inc/StdPrs_ToolPoint.hxx
index a5655b2..0319c69 100644
--- a/inc/StdPrs_ToolPoint.hxx
+++ b/inc/StdPrs_ToolPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Geom_Point;
 class StdPrs_ToolPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Coord(const Handle(Geom_Point)& aPoint,Quantity_Length& X,Quantity_Length& Y,Quantity_Length& Z) ;
diff --git a/inc/StdPrs_ToolRFace.hxx b/inc/StdPrs_ToolRFace.hxx
index cc20b89..d73f2ff 100644
--- a/inc/StdPrs_ToolRFace.hxx
+++ b/inc/StdPrs_ToolRFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class BRepAdaptor_HSurface;
 class StdPrs_ToolRFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StdPrs_ToolRFace();
diff --git a/inc/StdPrs_ToolShadedShape.hxx b/inc/StdPrs_ToolShadedShape.hxx
index bf0f969..f51b687 100644
--- a/inc/StdPrs_ToolShadedShape.hxx
+++ b/inc/StdPrs_ToolShadedShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColgp_Array1OfDir;
 class StdPrs_ToolShadedShape  : public BRepMesh_ShapeTool {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean IsClosed(const TopoDS_Shape& aShape) ;
diff --git a/inc/StdPrs_ToolVertex.hxx b/inc/StdPrs_ToolVertex.hxx
index 1f9b5c6..d7a4047 100644
--- a/inc/StdPrs_ToolVertex.hxx
+++ b/inc/StdPrs_ToolVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@ class TopoDS_Vertex;
 class StdPrs_ToolVertex  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Coord(const TopoDS_Vertex& aPoint,Quantity_Length& X,Quantity_Length& Y,Quantity_Length& Z) ;
diff --git a/inc/StdPrs_Vertex.hxx b/inc/StdPrs_Vertex.hxx
index 0bc47bb..aebef99 100644
--- a/inc/StdPrs_Vertex.hxx
+++ b/inc/StdPrs_Vertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Prs3d_Drawer;
 class StdPrs_Vertex  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(const Handle(Prs3d_Presentation)& aPresentation,const TopoDS_Vertex& aPoint,const Handle(Prs3d_Drawer)& aDrawer) ;
diff --git a/inc/StdPrs_WFDeflectionRestrictedFace.hxx b/inc/StdPrs_WFDeflectionRestrictedFace.hxx
index 099e9e9..0771e49 100644
--- a/inc/StdPrs_WFDeflectionRestrictedFace.hxx
+++ b/inc/StdPrs_WFDeflectionRestrictedFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class Prs3d_Drawer;
 class StdPrs_WFDeflectionRestrictedFace  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines a display featuring U and V isoparameters. <br>
 //! Adds the surface aFace to the <br>
diff --git a/inc/StdPrs_WFDeflectionShape.hxx b/inc/StdPrs_WFDeflectionShape.hxx
index 2860115..367dc17 100644
--- a/inc/StdPrs_WFDeflectionShape.hxx
+++ b/inc/StdPrs_WFDeflectionShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopTools_HSequenceOfShape;
 class StdPrs_WFDeflectionShape  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(const Handle(Prs3d_Presentation)& aPresentation,const TopoDS_Shape& aShape,const Handle(Prs3d_Drawer)& aDrawer) ;
diff --git a/inc/StdPrs_WFDeflectionSurface.hxx b/inc/StdPrs_WFDeflectionSurface.hxx
index 6f57de1..756028a 100644
--- a/inc/StdPrs_WFDeflectionSurface.hxx
+++ b/inc/StdPrs_WFDeflectionSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Prs3d_Drawer;
 class StdPrs_WFDeflectionSurface  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the surface aSurface to the presentation object <br>
 //! aPresentation, and defines its boundaries and isoparameters. <br>
diff --git a/inc/StdPrs_WFPoleSurface.hxx b/inc/StdPrs_WFPoleSurface.hxx
index e404652..1dd1010 100644
--- a/inc/StdPrs_WFPoleSurface.hxx
+++ b/inc/StdPrs_WFPoleSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Prs3d_Drawer;
 class StdPrs_WFPoleSurface  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the surface aSurface to the presentation object aPresentation. <br>
 //! The shape's display attributes are set in the attribute manager aDrawer. <br>
diff --git a/inc/StdPrs_WFRestrictedFace.hxx b/inc/StdPrs_WFRestrictedFace.hxx
index e2538a1..f457fd4 100644
--- a/inc/StdPrs_WFRestrictedFace.hxx
+++ b/inc/StdPrs_WFRestrictedFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class Prs3d_Drawer;
 class StdPrs_WFRestrictedFace  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(const Handle(Prs3d_Presentation)& aPresentation,const Handle(BRepAdaptor_HSurface)& aFace,const Handle(Prs3d_Drawer)& aDrawer) ;
diff --git a/inc/StdPrs_WFShape.hxx b/inc/StdPrs_WFShape.hxx
index c8e50aa..530f6c6 100644
--- a/inc/StdPrs_WFShape.hxx
+++ b/inc/StdPrs_WFShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopTools_HSequenceOfShape;
 class StdPrs_WFShape  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(const Handle(Prs3d_Presentation)& aPresentation,const TopoDS_Shape& aShape,const Handle(Prs3d_Drawer)& aDrawer) ;
diff --git a/inc/StdPrs_WFSurface.hxx b/inc/StdPrs_WFSurface.hxx
index 02a5451..c847e97 100644
--- a/inc/StdPrs_WFSurface.hxx
+++ b/inc/StdPrs_WFSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Prs3d_Drawer;
 class StdPrs_WFSurface  : public Prs3d_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Draws a surface by drawing the isoparametric curves with respect to <br>
 //! a fixed number of points given by the Drawer. <br>
diff --git a/inc/StdSchema.hxx b/inc/StdSchema.hxx
index 04fb0c3..ee7d918 100644
--- a/inc/StdSchema.hxx
+++ b/inc/StdSchema.hxx
@@ -64,10 +64,26 @@ class gp_XY;
 class Handle(PTopLoc_Datum3D);
 class Handle(PTopLoc_ItemLocation);
 class gp_Dir2d;
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Schema)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_HeaderFile
 #define _StdSchema_HeaderFile
diff --git a/inc/StdSchema_DBC_VArrayOfCharacter.hxx b/inc/StdSchema_DBC_VArrayOfCharacter.hxx
index efed384..4c04efe 100644
--- a/inc/StdSchema_DBC_VArrayOfCharacter.hxx
+++ b/inc/StdSchema_DBC_VArrayOfCharacter.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_DBC_VArrayOfCharacter_HeaderFile
 #define _StdSchema_DBC_VArrayOfCharacter_HeaderFile
diff --git a/inc/StdSchema_DBC_VArrayOfExtCharacter.hxx b/inc/StdSchema_DBC_VArrayOfExtCharacter.hxx
index a3161e7..5a6e292 100644
--- a/inc/StdSchema_DBC_VArrayOfExtCharacter.hxx
+++ b/inc/StdSchema_DBC_VArrayOfExtCharacter.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_DBC_VArrayOfExtCharacter_HeaderFile
 #define _StdSchema_DBC_VArrayOfExtCharacter_HeaderFile
diff --git a/inc/StdSchema_PColStd_FieldOfHArray1OfInteger.hxx b/inc/StdSchema_PColStd_FieldOfHArray1OfInteger.hxx
index 71fa046..c6626f8 100644
--- a/inc/StdSchema_PColStd_FieldOfHArray1OfInteger.hxx
+++ b/inc/StdSchema_PColStd_FieldOfHArray1OfInteger.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PColStd_FieldOfHArray1OfInteger_HeaderFile
 #define _StdSchema_PColStd_FieldOfHArray1OfInteger_HeaderFile
diff --git a/inc/StdSchema_PColStd_HArray1OfInteger.hxx b/inc/StdSchema_PColStd_HArray1OfInteger.hxx
index 53a86e3..b260554 100644
--- a/inc/StdSchema_PColStd_HArray1OfInteger.hxx
+++ b/inc/StdSchema_PColStd_HArray1OfInteger.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PColStd_HArray1OfInteger_HeaderFile
 #define _StdSchema_PColStd_HArray1OfInteger_HeaderFile
diff --git a/inc/StdSchema_PCollection_HAsciiString.hxx b/inc/StdSchema_PCollection_HAsciiString.hxx
index e3b6b8c..c3f2744 100644
--- a/inc/StdSchema_PCollection_HAsciiString.hxx
+++ b/inc/StdSchema_PCollection_HAsciiString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PCollection_HAsciiString_HeaderFile
 #define _StdSchema_PCollection_HAsciiString_HeaderFile
diff --git a/inc/StdSchema_PCollection_HExtendedString.hxx b/inc/StdSchema_PCollection_HExtendedString.hxx
index 5d8a1d6..e665c8b 100644
--- a/inc/StdSchema_PCollection_HExtendedString.hxx
+++ b/inc/StdSchema_PCollection_HExtendedString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PCollection_HExtendedString_HeaderFile
 #define _StdSchema_PCollection_HExtendedString_HeaderFile
diff --git a/inc/StdSchema_PDF_Attribute.hxx b/inc/StdSchema_PDF_Attribute.hxx
index ce0c3d1..7d45c0e 100644
--- a/inc/StdSchema_PDF_Attribute.hxx
+++ b/inc/StdSchema_PDF_Attribute.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDF_Attribute_HeaderFile
 #define _StdSchema_PDF_Attribute_HeaderFile
diff --git a/inc/StdSchema_PDF_FieldOfHAttributeArray1.hxx b/inc/StdSchema_PDF_FieldOfHAttributeArray1.hxx
index a1c3743..29b920e 100644
--- a/inc/StdSchema_PDF_FieldOfHAttributeArray1.hxx
+++ b/inc/StdSchema_PDF_FieldOfHAttributeArray1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDF_FieldOfHAttributeArray1_HeaderFile
 #define _StdSchema_PDF_FieldOfHAttributeArray1_HeaderFile
diff --git a/inc/StdSchema_PDF_HAttributeArray1.hxx b/inc/StdSchema_PDF_HAttributeArray1.hxx
index c424be3..b4fc1d2 100644
--- a/inc/StdSchema_PDF_HAttributeArray1.hxx
+++ b/inc/StdSchema_PDF_HAttributeArray1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDF_HAttributeArray1_HeaderFile
 #define _StdSchema_PDF_HAttributeArray1_HeaderFile
diff --git a/inc/StdSchema_PDataStd_Integer.hxx b/inc/StdSchema_PDataStd_Integer.hxx
index 9834a80..3840e3e 100644
--- a/inc/StdSchema_PDataStd_Integer.hxx
+++ b/inc/StdSchema_PDataStd_Integer.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDataStd_Integer_HeaderFile
 #define _StdSchema_PDataStd_Integer_HeaderFile
diff --git a/inc/StdSchema_PDataStd_Real.hxx b/inc/StdSchema_PDataStd_Real.hxx
index 3b2cb8c..8890348 100644
--- a/inc/StdSchema_PDataStd_Real.hxx
+++ b/inc/StdSchema_PDataStd_Real.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDataStd_Real_HeaderFile
 #define _StdSchema_PDataStd_Real_HeaderFile
diff --git a/inc/StdSchema_PDataXtd_Axis.hxx b/inc/StdSchema_PDataXtd_Axis.hxx
index 62db596..44eb811 100644
--- a/inc/StdSchema_PDataXtd_Axis.hxx
+++ b/inc/StdSchema_PDataXtd_Axis.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDataXtd_Axis_HeaderFile
 #define _StdSchema_PDataXtd_Axis_HeaderFile
diff --git a/inc/StdSchema_PDataXtd_Constraint.hxx b/inc/StdSchema_PDataXtd_Constraint.hxx
index 1d11a3e..4badfa0 100644
--- a/inc/StdSchema_PDataXtd_Constraint.hxx
+++ b/inc/StdSchema_PDataXtd_Constraint.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDataXtd_Constraint_HeaderFile
 #define _StdSchema_PDataXtd_Constraint_HeaderFile
diff --git a/inc/StdSchema_PDataXtd_Geometry.hxx b/inc/StdSchema_PDataXtd_Geometry.hxx
index 09cf42e..9f0d2ba 100644
--- a/inc/StdSchema_PDataXtd_Geometry.hxx
+++ b/inc/StdSchema_PDataXtd_Geometry.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDataXtd_Geometry_HeaderFile
 #define _StdSchema_PDataXtd_Geometry_HeaderFile
diff --git a/inc/StdSchema_PDataXtd_PatternStd.hxx b/inc/StdSchema_PDataXtd_PatternStd.hxx
index 83194eb..7e44396 100644
--- a/inc/StdSchema_PDataXtd_PatternStd.hxx
+++ b/inc/StdSchema_PDataXtd_PatternStd.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDataXtd_PatternStd_HeaderFile
 #define _StdSchema_PDataXtd_PatternStd_HeaderFile
diff --git a/inc/StdSchema_PDataXtd_Placement.hxx b/inc/StdSchema_PDataXtd_Placement.hxx
index 891fcc1..61c9a6c 100644
--- a/inc/StdSchema_PDataXtd_Placement.hxx
+++ b/inc/StdSchema_PDataXtd_Placement.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDataXtd_Placement_HeaderFile
 #define _StdSchema_PDataXtd_Placement_HeaderFile
diff --git a/inc/StdSchema_PDataXtd_Plane.hxx b/inc/StdSchema_PDataXtd_Plane.hxx
index f92c40e..a244d4c 100644
--- a/inc/StdSchema_PDataXtd_Plane.hxx
+++ b/inc/StdSchema_PDataXtd_Plane.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDataXtd_Plane_HeaderFile
 #define _StdSchema_PDataXtd_Plane_HeaderFile
diff --git a/inc/StdSchema_PDataXtd_Point.hxx b/inc/StdSchema_PDataXtd_Point.hxx
index 0c7dc09..3208306 100644
--- a/inc/StdSchema_PDataXtd_Point.hxx
+++ b/inc/StdSchema_PDataXtd_Point.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDataXtd_Point_HeaderFile
 #define _StdSchema_PDataXtd_Point_HeaderFile
diff --git a/inc/StdSchema_PDataXtd_Position.hxx b/inc/StdSchema_PDataXtd_Position.hxx
index cbd4df5..eecdb89 100644
--- a/inc/StdSchema_PDataXtd_Position.hxx
+++ b/inc/StdSchema_PDataXtd_Position.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDataXtd_Position_HeaderFile
 #define _StdSchema_PDataXtd_Position_HeaderFile
diff --git a/inc/StdSchema_PDataXtd_Shape.hxx b/inc/StdSchema_PDataXtd_Shape.hxx
index 681176c..c405ee3 100644
--- a/inc/StdSchema_PDataXtd_Shape.hxx
+++ b/inc/StdSchema_PDataXtd_Shape.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PDataXtd_Shape_HeaderFile
 #define _StdSchema_PDataXtd_Shape_HeaderFile
diff --git a/inc/StdSchema_PNaming_FieldOfHArray1OfNamedShape.hxx b/inc/StdSchema_PNaming_FieldOfHArray1OfNamedShape.hxx
index ac8dc31..db2ab7a 100644
--- a/inc/StdSchema_PNaming_FieldOfHArray1OfNamedShape.hxx
+++ b/inc/StdSchema_PNaming_FieldOfHArray1OfNamedShape.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PNaming_FieldOfHArray1OfNamedShape_HeaderFile
 #define _StdSchema_PNaming_FieldOfHArray1OfNamedShape_HeaderFile
diff --git a/inc/StdSchema_PNaming_HArray1OfNamedShape.hxx b/inc/StdSchema_PNaming_HArray1OfNamedShape.hxx
index b64d5e3..151edb3 100644
--- a/inc/StdSchema_PNaming_HArray1OfNamedShape.hxx
+++ b/inc/StdSchema_PNaming_HArray1OfNamedShape.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PNaming_HArray1OfNamedShape_HeaderFile
 #define _StdSchema_PNaming_HArray1OfNamedShape_HeaderFile
diff --git a/inc/StdSchema_PNaming_Name.hxx b/inc/StdSchema_PNaming_Name.hxx
index d86144c..39c8d93 100644
--- a/inc/StdSchema_PNaming_Name.hxx
+++ b/inc/StdSchema_PNaming_Name.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PNaming_Name_HeaderFile
 #define _StdSchema_PNaming_Name_HeaderFile
diff --git a/inc/StdSchema_PNaming_Name_1.hxx b/inc/StdSchema_PNaming_Name_1.hxx
index 1fa4dd9..a99beaf 100644
--- a/inc/StdSchema_PNaming_Name_1.hxx
+++ b/inc/StdSchema_PNaming_Name_1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PNaming_Name_1_HeaderFile
 #define _StdSchema_PNaming_Name_1_HeaderFile
diff --git a/inc/StdSchema_PNaming_NamedShape.hxx b/inc/StdSchema_PNaming_NamedShape.hxx
index 67bdddd..c49e62a 100644
--- a/inc/StdSchema_PNaming_NamedShape.hxx
+++ b/inc/StdSchema_PNaming_NamedShape.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PNaming_NamedShape_HeaderFile
 #define _StdSchema_PNaming_NamedShape_HeaderFile
diff --git a/inc/StdSchema_PNaming_Naming.hxx b/inc/StdSchema_PNaming_Naming.hxx
index 3901e20..155fd1c 100644
--- a/inc/StdSchema_PNaming_Naming.hxx
+++ b/inc/StdSchema_PNaming_Naming.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PNaming_Naming_HeaderFile
 #define _StdSchema_PNaming_Naming_HeaderFile
diff --git a/inc/StdSchema_PNaming_Naming_1.hxx b/inc/StdSchema_PNaming_Naming_1.hxx
index dc741da..73b4319 100644
--- a/inc/StdSchema_PNaming_Naming_1.hxx
+++ b/inc/StdSchema_PNaming_Naming_1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PNaming_Naming_1_HeaderFile
 #define _StdSchema_PNaming_Naming_1_HeaderFile
diff --git a/inc/StdSchema_PPrsStd_AISPresentation.hxx b/inc/StdSchema_PPrsStd_AISPresentation.hxx
index 6c32d70..4b4ea48 100644
--- a/inc/StdSchema_PPrsStd_AISPresentation.hxx
+++ b/inc/StdSchema_PPrsStd_AISPresentation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PPrsStd_AISPresentation_HeaderFile
 #define _StdSchema_PPrsStd_AISPresentation_HeaderFile
diff --git a/inc/StdSchema_PPrsStd_AISPresentation_1.hxx b/inc/StdSchema_PPrsStd_AISPresentation_1.hxx
index 230aed7..288ee60 100644
--- a/inc/StdSchema_PPrsStd_AISPresentation_1.hxx
+++ b/inc/StdSchema_PPrsStd_AISPresentation_1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PPrsStd_AISPresentation_1_HeaderFile
 #define _StdSchema_PPrsStd_AISPresentation_1_HeaderFile
diff --git a/inc/StdSchema_PTopLoc_Datum3D.hxx b/inc/StdSchema_PTopLoc_Datum3D.hxx
index ddecf30..cd14187 100644
--- a/inc/StdSchema_PTopLoc_Datum3D.hxx
+++ b/inc/StdSchema_PTopLoc_Datum3D.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PTopLoc_Datum3D_HeaderFile
 #define _StdSchema_PTopLoc_Datum3D_HeaderFile
diff --git a/inc/StdSchema_PTopLoc_ItemLocation.hxx b/inc/StdSchema_PTopLoc_ItemLocation.hxx
index a88b329..f7222bd 100644
--- a/inc/StdSchema_PTopLoc_ItemLocation.hxx
+++ b/inc/StdSchema_PTopLoc_ItemLocation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PTopLoc_ItemLocation_HeaderFile
 #define _StdSchema_PTopLoc_ItemLocation_HeaderFile
diff --git a/inc/StdSchema_PTopLoc_Location.hxx b/inc/StdSchema_PTopLoc_Location.hxx
index 2484c24..5febbc6 100644
--- a/inc/StdSchema_PTopLoc_Location.hxx
+++ b/inc/StdSchema_PTopLoc_Location.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PTopLoc_Location_HeaderFile
 #define _StdSchema_PTopLoc_Location_HeaderFile
diff --git a/inc/StdSchema_PTopoDS_FieldOfHArray1OfShape1.hxx b/inc/StdSchema_PTopoDS_FieldOfHArray1OfShape1.hxx
index 0cfbdcf..04e3c02 100644
--- a/inc/StdSchema_PTopoDS_FieldOfHArray1OfShape1.hxx
+++ b/inc/StdSchema_PTopoDS_FieldOfHArray1OfShape1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PTopoDS_FieldOfHArray1OfShape1_HeaderFile
 #define _StdSchema_PTopoDS_FieldOfHArray1OfShape1_HeaderFile
diff --git a/inc/StdSchema_PTopoDS_HArray1OfShape1.hxx b/inc/StdSchema_PTopoDS_HArray1OfShape1.hxx
index 3b63639..626cc7f 100644
--- a/inc/StdSchema_PTopoDS_HArray1OfShape1.hxx
+++ b/inc/StdSchema_PTopoDS_HArray1OfShape1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PTopoDS_HArray1OfShape1_HeaderFile
 #define _StdSchema_PTopoDS_HArray1OfShape1_HeaderFile
diff --git a/inc/StdSchema_PTopoDS_Shape1.hxx b/inc/StdSchema_PTopoDS_Shape1.hxx
index 343115e..36962bb 100644
--- a/inc/StdSchema_PTopoDS_Shape1.hxx
+++ b/inc/StdSchema_PTopoDS_Shape1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PTopoDS_Shape1_HeaderFile
 #define _StdSchema_PTopoDS_Shape1_HeaderFile
diff --git a/inc/StdSchema_PTopoDS_TShape1.hxx b/inc/StdSchema_PTopoDS_TShape1.hxx
index 4d88a8a..82c002b 100644
--- a/inc/StdSchema_PTopoDS_TShape1.hxx
+++ b/inc/StdSchema_PTopoDS_TShape1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_PTopoDS_TShape1_HeaderFile
 #define _StdSchema_PTopoDS_TShape1_HeaderFile
diff --git a/inc/StdSchema_Standard_Persistent.hxx b/inc/StdSchema_Standard_Persistent.hxx
index 384242b..44ba81d 100644
--- a/inc/StdSchema_Standard_Persistent.hxx
+++ b/inc/StdSchema_Standard_Persistent.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_Standard_Persistent_HeaderFile
 #define _StdSchema_Standard_Persistent_HeaderFile
diff --git a/inc/StdSchema_Standard_Storable.hxx b/inc/StdSchema_Standard_Storable.hxx
index 8366450..f1ab97b 100644
--- a/inc/StdSchema_Standard_Storable.hxx
+++ b/inc/StdSchema_Standard_Storable.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_Standard_Storable_HeaderFile
 #define _StdSchema_Standard_Storable_HeaderFile
diff --git a/inc/StdSchema_gp_Ax1.hxx b/inc/StdSchema_gp_Ax1.hxx
index 6b71c12..afe6958 100644
--- a/inc/StdSchema_gp_Ax1.hxx
+++ b/inc/StdSchema_gp_Ax1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Ax1_HeaderFile
 #define _StdSchema_gp_Ax1_HeaderFile
diff --git a/inc/StdSchema_gp_Ax2.hxx b/inc/StdSchema_gp_Ax2.hxx
index 39ec832..7303e5c 100644
--- a/inc/StdSchema_gp_Ax2.hxx
+++ b/inc/StdSchema_gp_Ax2.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Ax2_HeaderFile
 #define _StdSchema_gp_Ax2_HeaderFile
diff --git a/inc/StdSchema_gp_Ax2d.hxx b/inc/StdSchema_gp_Ax2d.hxx
index cec19ee..8a76ccb 100644
--- a/inc/StdSchema_gp_Ax2d.hxx
+++ b/inc/StdSchema_gp_Ax2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Ax2d_HeaderFile
 #define _StdSchema_gp_Ax2d_HeaderFile
diff --git a/inc/StdSchema_gp_Ax3.hxx b/inc/StdSchema_gp_Ax3.hxx
index f992365..a0cbefa 100644
--- a/inc/StdSchema_gp_Ax3.hxx
+++ b/inc/StdSchema_gp_Ax3.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Ax3_HeaderFile
 #define _StdSchema_gp_Ax3_HeaderFile
diff --git a/inc/StdSchema_gp_Dir.hxx b/inc/StdSchema_gp_Dir.hxx
index 886e32e..efbe106 100644
--- a/inc/StdSchema_gp_Dir.hxx
+++ b/inc/StdSchema_gp_Dir.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Dir_HeaderFile
 #define _StdSchema_gp_Dir_HeaderFile
diff --git a/inc/StdSchema_gp_Dir2d.hxx b/inc/StdSchema_gp_Dir2d.hxx
index 700873e..4fee2f9 100644
--- a/inc/StdSchema_gp_Dir2d.hxx
+++ b/inc/StdSchema_gp_Dir2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Dir2d_HeaderFile
 #define _StdSchema_gp_Dir2d_HeaderFile
diff --git a/inc/StdSchema_gp_Mat.hxx b/inc/StdSchema_gp_Mat.hxx
index 581186d..aa52834 100644
--- a/inc/StdSchema_gp_Mat.hxx
+++ b/inc/StdSchema_gp_Mat.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Mat_HeaderFile
 #define _StdSchema_gp_Mat_HeaderFile
diff --git a/inc/StdSchema_gp_Mat2d.hxx b/inc/StdSchema_gp_Mat2d.hxx
index 47d640c..e29ed48 100644
--- a/inc/StdSchema_gp_Mat2d.hxx
+++ b/inc/StdSchema_gp_Mat2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Mat2d_HeaderFile
 #define _StdSchema_gp_Mat2d_HeaderFile
diff --git a/inc/StdSchema_gp_Pnt.hxx b/inc/StdSchema_gp_Pnt.hxx
index 6ea7d17..28ba6f1 100644
--- a/inc/StdSchema_gp_Pnt.hxx
+++ b/inc/StdSchema_gp_Pnt.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Pnt_HeaderFile
 #define _StdSchema_gp_Pnt_HeaderFile
diff --git a/inc/StdSchema_gp_Pnt2d.hxx b/inc/StdSchema_gp_Pnt2d.hxx
index 54be094..6999556 100644
--- a/inc/StdSchema_gp_Pnt2d.hxx
+++ b/inc/StdSchema_gp_Pnt2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Pnt2d_HeaderFile
 #define _StdSchema_gp_Pnt2d_HeaderFile
diff --git a/inc/StdSchema_gp_Trsf.hxx b/inc/StdSchema_gp_Trsf.hxx
index fa84c2c..8ad890f 100644
--- a/inc/StdSchema_gp_Trsf.hxx
+++ b/inc/StdSchema_gp_Trsf.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Trsf_HeaderFile
 #define _StdSchema_gp_Trsf_HeaderFile
diff --git a/inc/StdSchema_gp_Trsf2d.hxx b/inc/StdSchema_gp_Trsf2d.hxx
index 4641d77..a293500 100644
--- a/inc/StdSchema_gp_Trsf2d.hxx
+++ b/inc/StdSchema_gp_Trsf2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Trsf2d_HeaderFile
 #define _StdSchema_gp_Trsf2d_HeaderFile
diff --git a/inc/StdSchema_gp_Vec.hxx b/inc/StdSchema_gp_Vec.hxx
index 7203a85..6cfb8a4 100644
--- a/inc/StdSchema_gp_Vec.hxx
+++ b/inc/StdSchema_gp_Vec.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Vec_HeaderFile
 #define _StdSchema_gp_Vec_HeaderFile
diff --git a/inc/StdSchema_gp_Vec2d.hxx b/inc/StdSchema_gp_Vec2d.hxx
index 007e335..928e7c1 100644
--- a/inc/StdSchema_gp_Vec2d.hxx
+++ b/inc/StdSchema_gp_Vec2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_Vec2d_HeaderFile
 #define _StdSchema_gp_Vec2d_HeaderFile
diff --git a/inc/StdSchema_gp_XY.hxx b/inc/StdSchema_gp_XY.hxx
index 6016ec0..1174ea3 100644
--- a/inc/StdSchema_gp_XY.hxx
+++ b/inc/StdSchema_gp_XY.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_XY_HeaderFile
 #define _StdSchema_gp_XY_HeaderFile
diff --git a/inc/StdSchema_gp_XYZ.hxx b/inc/StdSchema_gp_XYZ.hxx
index faeddfb..807fa23 100644
--- a/inc/StdSchema_gp_XYZ.hxx
+++ b/inc/StdSchema_gp_XYZ.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _StdSchema_gp_XYZ_HeaderFile
 #define _StdSchema_gp_XYZ_HeaderFile
diff --git a/inc/StdSelect.hxx b/inc/StdSelect.hxx
index 7da95a3..bc2af28 100644
--- a/inc/StdSelect.hxx
+++ b/inc/StdSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class StdSelect_IndexedDataMapNodeOfIndexedDataMapOfOwnerPrs;
 class StdSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the 3D projector for the view aView. <br>
   Standard_EXPORT   static  Handle_Select3D_Projector GetProjector(const Handle(V3d_View)& aView) ;
diff --git a/inc/StdSelect_BRepHilighter.hxx b/inc/StdSelect_BRepHilighter.hxx
index 9cb2d9e..ea95bf4 100644
--- a/inc/StdSelect_BRepHilighter.hxx
+++ b/inc/StdSelect_BRepHilighter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class V3d_View;
 class StdSelect_BRepHilighter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StdSelect_BRepHilighter();
diff --git a/inc/StdSelect_BRepSelectionTool.hxx b/inc/StdSelect_BRepSelectionTool.hxx
index cfd545c..947b7bf 100644
--- a/inc/StdSelect_BRepSelectionTool.hxx
+++ b/inc/StdSelect_BRepSelectionTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -79,18 +82,7 @@ class Select3D_ListOfSensitive;
 class StdSelect_BRepSelectionTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Decomposition of <aShape> into sensitive entities following <br>
 //!         a mode of decomposition <aType>. These entities are stored in <aSelection>. <br>
diff --git a/inc/StdSelect_IndexedDataMapOfOwnerPrs.hxx b/inc/StdSelect_IndexedDataMapOfOwnerPrs.hxx
index d6aef8a..678b859 100644
--- a/inc/StdSelect_IndexedDataMapOfOwnerPrs.hxx
+++ b/inc/StdSelect_IndexedDataMapOfOwnerPrs.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class StdSelect_IndexedDataMapNodeOfIndexedDataMapOfOwnerPrs;
 class StdSelect_IndexedDataMapOfOwnerPrs  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StdSelect_IndexedDataMapOfOwnerPrs(const Standard_Integer NbBuckets = 1);
diff --git a/inc/StepAP203_ApprovedItem.hxx b/inc/StepAP203_ApprovedItem.hxx
index a69d5f2..704f0a6 100644
--- a/inc/StepAP203_ApprovedItem.hxx
+++ b/inc/StepAP203_ApprovedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class StepBasic_Contract;
 class StepAP203_ApprovedItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepAP203_ApprovedItem();
diff --git a/inc/StepAP203_Array1OfApprovedItem.hxx b/inc/StepAP203_Array1OfApprovedItem.hxx
index 8cf1e38..9d21c00 100644
--- a/inc/StepAP203_Array1OfApprovedItem.hxx
+++ b/inc/StepAP203_Array1OfApprovedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP203_ApprovedItem;
 class StepAP203_Array1OfApprovedItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP203_Array1OfApprovedItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP203_Array1OfCertifiedItem.hxx b/inc/StepAP203_Array1OfCertifiedItem.hxx
index 0ae6b9c..3fdaf0b 100644
--- a/inc/StepAP203_Array1OfCertifiedItem.hxx
+++ b/inc/StepAP203_Array1OfCertifiedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP203_CertifiedItem;
 class StepAP203_Array1OfCertifiedItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP203_Array1OfCertifiedItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP203_Array1OfChangeRequestItem.hxx b/inc/StepAP203_Array1OfChangeRequestItem.hxx
index c4c5b24..2412f0d 100644
--- a/inc/StepAP203_Array1OfChangeRequestItem.hxx
+++ b/inc/StepAP203_Array1OfChangeRequestItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP203_ChangeRequestItem;
 class StepAP203_Array1OfChangeRequestItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP203_Array1OfChangeRequestItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP203_Array1OfClassifiedItem.hxx b/inc/StepAP203_Array1OfClassifiedItem.hxx
index 3576338..39dfc71 100644
--- a/inc/StepAP203_Array1OfClassifiedItem.hxx
+++ b/inc/StepAP203_Array1OfClassifiedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP203_ClassifiedItem;
 class StepAP203_Array1OfClassifiedItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP203_Array1OfClassifiedItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP203_Array1OfContractedItem.hxx b/inc/StepAP203_Array1OfContractedItem.hxx
index 8549ac6..89f54b8 100644
--- a/inc/StepAP203_Array1OfContractedItem.hxx
+++ b/inc/StepAP203_Array1OfContractedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP203_ContractedItem;
 class StepAP203_Array1OfContractedItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP203_Array1OfContractedItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP203_Array1OfDateTimeItem.hxx b/inc/StepAP203_Array1OfDateTimeItem.hxx
index e6ef62f..b542e56 100644
--- a/inc/StepAP203_Array1OfDateTimeItem.hxx
+++ b/inc/StepAP203_Array1OfDateTimeItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP203_DateTimeItem;
 class StepAP203_Array1OfDateTimeItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP203_Array1OfDateTimeItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP203_Array1OfPersonOrganizationItem.hxx b/inc/StepAP203_Array1OfPersonOrganizationItem.hxx
index b975f20..3c6851f 100644
--- a/inc/StepAP203_Array1OfPersonOrganizationItem.hxx
+++ b/inc/StepAP203_Array1OfPersonOrganizationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP203_PersonOrganizationItem;
 class StepAP203_Array1OfPersonOrganizationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP203_Array1OfPersonOrganizationItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP203_Array1OfSpecifiedItem.hxx b/inc/StepAP203_Array1OfSpecifiedItem.hxx
index 5a7960a..b1593a1 100644
--- a/inc/StepAP203_Array1OfSpecifiedItem.hxx
+++ b/inc/StepAP203_Array1OfSpecifiedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP203_SpecifiedItem;
 class StepAP203_Array1OfSpecifiedItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP203_Array1OfSpecifiedItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP203_Array1OfStartRequestItem.hxx b/inc/StepAP203_Array1OfStartRequestItem.hxx
index 3784f4e..c599131 100644
--- a/inc/StepAP203_Array1OfStartRequestItem.hxx
+++ b/inc/StepAP203_Array1OfStartRequestItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP203_StartRequestItem;
 class StepAP203_Array1OfStartRequestItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP203_Array1OfStartRequestItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP203_Array1OfWorkItem.hxx b/inc/StepAP203_Array1OfWorkItem.hxx
index a30ea0c..d0c6e6f 100644
--- a/inc/StepAP203_Array1OfWorkItem.hxx
+++ b/inc/StepAP203_Array1OfWorkItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP203_WorkItem;
 class StepAP203_Array1OfWorkItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP203_Array1OfWorkItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP203_CertifiedItem.hxx b/inc/StepAP203_CertifiedItem.hxx
index e50e76f..62ba9c7 100644
--- a/inc/StepAP203_CertifiedItem.hxx
+++ b/inc/StepAP203_CertifiedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepRepr_SuppliedPartRelationship;
 class StepAP203_CertifiedItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepAP203_CertifiedItem();
diff --git a/inc/StepAP203_ChangeRequestItem.hxx b/inc/StepAP203_ChangeRequestItem.hxx
index b89ed98..dc552b7 100644
--- a/inc/StepAP203_ChangeRequestItem.hxx
+++ b/inc/StepAP203_ChangeRequestItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepBasic_ProductDefinitionFormation;
 class StepAP203_ChangeRequestItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepAP203_ChangeRequestItem();
diff --git a/inc/StepAP203_ClassifiedItem.hxx b/inc/StepAP203_ClassifiedItem.hxx
index 7affcd8..81871ba 100644
--- a/inc/StepAP203_ClassifiedItem.hxx
+++ b/inc/StepAP203_ClassifiedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepRepr_AssemblyComponentUsage;
 class StepAP203_ClassifiedItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepAP203_ClassifiedItem();
diff --git a/inc/StepAP203_ContractedItem.hxx b/inc/StepAP203_ContractedItem.hxx
index 879837c..ec95524 100644
--- a/inc/StepAP203_ContractedItem.hxx
+++ b/inc/StepAP203_ContractedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepBasic_ProductDefinitionFormation;
 class StepAP203_ContractedItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepAP203_ContractedItem();
diff --git a/inc/StepAP203_DateTimeItem.hxx b/inc/StepAP203_DateTimeItem.hxx
index eadd36f..c0b3411 100644
--- a/inc/StepAP203_DateTimeItem.hxx
+++ b/inc/StepAP203_DateTimeItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class StepBasic_Certification;
 class StepAP203_DateTimeItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepAP203_DateTimeItem();
diff --git a/inc/StepAP203_PersonOrganizationItem.hxx b/inc/StepAP203_PersonOrganizationItem.hxx
index ea70aa3..d0075e5 100644
--- a/inc/StepAP203_PersonOrganizationItem.hxx
+++ b/inc/StepAP203_PersonOrganizationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class StepBasic_SecurityClassification;
 class StepAP203_PersonOrganizationItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepAP203_PersonOrganizationItem();
diff --git a/inc/StepAP203_SpecifiedItem.hxx b/inc/StepAP203_SpecifiedItem.hxx
index 8665577..066f714 100644
--- a/inc/StepAP203_SpecifiedItem.hxx
+++ b/inc/StepAP203_SpecifiedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepRepr_ShapeAspect;
 class StepAP203_SpecifiedItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepAP203_SpecifiedItem();
diff --git a/inc/StepAP203_StartRequestItem.hxx b/inc/StepAP203_StartRequestItem.hxx
index 8a7fd81..80fc610 100644
--- a/inc/StepAP203_StartRequestItem.hxx
+++ b/inc/StepAP203_StartRequestItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepBasic_ProductDefinitionFormation;
 class StepAP203_StartRequestItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepAP203_StartRequestItem();
diff --git a/inc/StepAP203_WorkItem.hxx b/inc/StepAP203_WorkItem.hxx
index de2f86f..acc33b5 100644
--- a/inc/StepAP203_WorkItem.hxx
+++ b/inc/StepAP203_WorkItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepBasic_ProductDefinitionFormation;
 class StepAP203_WorkItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepAP203_WorkItem();
diff --git a/inc/StepAP209_Construct.hxx b/inc/StepAP209_Construct.hxx
index cd01d6e..7f0a054 100644
--- a/inc/StepAP209_Construct.hxx
+++ b/inc/StepAP209_Construct.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -89,18 +92,7 @@ class StepRepr_ProductDefinitionShape;
 class StepAP209_Construct  : public STEPConstruct_Tool {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty tool <br>
   Standard_EXPORT   StepAP209_Construct();
diff --git a/inc/StepAP214.hxx b/inc/StepAP214.hxx
index 3630078..80fb55e 100644
--- a/inc/StepAP214.hxx
+++ b/inc/StepAP214.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -104,18 +107,7 @@ class StepAP214_HArray1OfExternalIdentificationItem;
 class StepAP214  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates a Protocol <br>
   Standard_EXPORT   static  Handle_StepAP214_Protocol Protocol() ;
diff --git a/inc/StepAP214_ApprovalItem.hxx b/inc/StepAP214_ApprovalItem.hxx
index 8bfb2f9..10c7f87 100644
--- a/inc/StepAP214_ApprovalItem.hxx
+++ b/inc/StepAP214_ApprovalItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -77,18 +80,7 @@ class StepBasic_SecurityClassification;
 class StepAP214_ApprovalItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ApprovalItem SelectType <br>
   Standard_EXPORT   StepAP214_ApprovalItem();
diff --git a/inc/StepAP214_Array1OfApprovalItem.hxx b/inc/StepAP214_Array1OfApprovalItem.hxx
index afcb8a4..50142d6 100644
--- a/inc/StepAP214_Array1OfApprovalItem.hxx
+++ b/inc/StepAP214_Array1OfApprovalItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_ApprovalItem;
 class StepAP214_Array1OfApprovalItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfApprovalItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfAutoDesignDateAndPersonItem.hxx b/inc/StepAP214_Array1OfAutoDesignDateAndPersonItem.hxx
index d632bbb..64cfd95 100644
--- a/inc/StepAP214_Array1OfAutoDesignDateAndPersonItem.hxx
+++ b/inc/StepAP214_Array1OfAutoDesignDateAndPersonItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_AutoDesignDateAndPersonItem;
 class StepAP214_Array1OfAutoDesignDateAndPersonItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfAutoDesignDateAndPersonItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfAutoDesignDateAndTimeItem.hxx b/inc/StepAP214_Array1OfAutoDesignDateAndTimeItem.hxx
index 5d040c1..4dbbee3 100644
--- a/inc/StepAP214_Array1OfAutoDesignDateAndTimeItem.hxx
+++ b/inc/StepAP214_Array1OfAutoDesignDateAndTimeItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_AutoDesignDateAndTimeItem;
 class StepAP214_Array1OfAutoDesignDateAndTimeItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfAutoDesignDateAndTimeItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfAutoDesignDatedItem.hxx b/inc/StepAP214_Array1OfAutoDesignDatedItem.hxx
index 9b5abf8..2ecf216 100644
--- a/inc/StepAP214_Array1OfAutoDesignDatedItem.hxx
+++ b/inc/StepAP214_Array1OfAutoDesignDatedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_AutoDesignDatedItem;
 class StepAP214_Array1OfAutoDesignDatedItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfAutoDesignDatedItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfAutoDesignGeneralOrgItem.hxx b/inc/StepAP214_Array1OfAutoDesignGeneralOrgItem.hxx
index f168290..6774788 100644
--- a/inc/StepAP214_Array1OfAutoDesignGeneralOrgItem.hxx
+++ b/inc/StepAP214_Array1OfAutoDesignGeneralOrgItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_AutoDesignGeneralOrgItem;
 class StepAP214_Array1OfAutoDesignGeneralOrgItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfAutoDesignGeneralOrgItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfAutoDesignGroupedItem.hxx b/inc/StepAP214_Array1OfAutoDesignGroupedItem.hxx
index b56dcb2..ced27ef 100644
--- a/inc/StepAP214_Array1OfAutoDesignGroupedItem.hxx
+++ b/inc/StepAP214_Array1OfAutoDesignGroupedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_AutoDesignGroupedItem;
 class StepAP214_Array1OfAutoDesignGroupedItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfAutoDesignGroupedItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfAutoDesignPresentedItemSelect.hxx b/inc/StepAP214_Array1OfAutoDesignPresentedItemSelect.hxx
index 337dae4..9ac55c5 100644
--- a/inc/StepAP214_Array1OfAutoDesignPresentedItemSelect.hxx
+++ b/inc/StepAP214_Array1OfAutoDesignPresentedItemSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_AutoDesignPresentedItemSelect;
 class StepAP214_Array1OfAutoDesignPresentedItemSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfAutoDesignPresentedItemSelect(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfAutoDesignReferencingItem.hxx b/inc/StepAP214_Array1OfAutoDesignReferencingItem.hxx
index 7b0f32c..29c11d3 100644
--- a/inc/StepAP214_Array1OfAutoDesignReferencingItem.hxx
+++ b/inc/StepAP214_Array1OfAutoDesignReferencingItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_AutoDesignReferencingItem;
 class StepAP214_Array1OfAutoDesignReferencingItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfAutoDesignReferencingItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfDateAndTimeItem.hxx b/inc/StepAP214_Array1OfDateAndTimeItem.hxx
index e50c27f..05bc631 100644
--- a/inc/StepAP214_Array1OfDateAndTimeItem.hxx
+++ b/inc/StepAP214_Array1OfDateAndTimeItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_DateAndTimeItem;
 class StepAP214_Array1OfDateAndTimeItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfDateAndTimeItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfDateItem.hxx b/inc/StepAP214_Array1OfDateItem.hxx
index 4ad3c2c..ef1cdfe 100644
--- a/inc/StepAP214_Array1OfDateItem.hxx
+++ b/inc/StepAP214_Array1OfDateItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_DateItem;
 class StepAP214_Array1OfDateItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfDateItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfDocumentReferenceItem.hxx b/inc/StepAP214_Array1OfDocumentReferenceItem.hxx
index 511f1a8..bcb8143 100644
--- a/inc/StepAP214_Array1OfDocumentReferenceItem.hxx
+++ b/inc/StepAP214_Array1OfDocumentReferenceItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_DocumentReferenceItem;
 class StepAP214_Array1OfDocumentReferenceItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfDocumentReferenceItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfExternalIdentificationItem.hxx b/inc/StepAP214_Array1OfExternalIdentificationItem.hxx
index 4534ddc..57a38d3 100644
--- a/inc/StepAP214_Array1OfExternalIdentificationItem.hxx
+++ b/inc/StepAP214_Array1OfExternalIdentificationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_ExternalIdentificationItem;
 class StepAP214_Array1OfExternalIdentificationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfExternalIdentificationItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfGroupItem.hxx b/inc/StepAP214_Array1OfGroupItem.hxx
index 1e5cb2c..bb3a65b 100644
--- a/inc/StepAP214_Array1OfGroupItem.hxx
+++ b/inc/StepAP214_Array1OfGroupItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_GroupItem;
 class StepAP214_Array1OfGroupItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfGroupItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfOrganizationItem.hxx b/inc/StepAP214_Array1OfOrganizationItem.hxx
index 2d6d127..38a6fa9 100644
--- a/inc/StepAP214_Array1OfOrganizationItem.hxx
+++ b/inc/StepAP214_Array1OfOrganizationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_OrganizationItem;
 class StepAP214_Array1OfOrganizationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfOrganizationItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfPersonAndOrganizationItem.hxx b/inc/StepAP214_Array1OfPersonAndOrganizationItem.hxx
index dca7328..700b9cd 100644
--- a/inc/StepAP214_Array1OfPersonAndOrganizationItem.hxx
+++ b/inc/StepAP214_Array1OfPersonAndOrganizationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_PersonAndOrganizationItem;
 class StepAP214_Array1OfPersonAndOrganizationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfPersonAndOrganizationItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfPresentedItemSelect.hxx b/inc/StepAP214_Array1OfPresentedItemSelect.hxx
index 55d6f7a..f09659b 100644
--- a/inc/StepAP214_Array1OfPresentedItemSelect.hxx
+++ b/inc/StepAP214_Array1OfPresentedItemSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_PresentedItemSelect;
 class StepAP214_Array1OfPresentedItemSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfPresentedItemSelect(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_Array1OfSecurityClassificationItem.hxx b/inc/StepAP214_Array1OfSecurityClassificationItem.hxx
index 13395c4..0d0a098 100644
--- a/inc/StepAP214_Array1OfSecurityClassificationItem.hxx
+++ b/inc/StepAP214_Array1OfSecurityClassificationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_SecurityClassificationItem;
 class StepAP214_Array1OfSecurityClassificationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_Array1OfSecurityClassificationItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepAP214_AutoDesignDateAndPersonItem.hxx b/inc/StepAP214_AutoDesignDateAndPersonItem.hxx
index 1eb53d9..5451911 100644
--- a/inc/StepAP214_AutoDesignDateAndPersonItem.hxx
+++ b/inc/StepAP214_AutoDesignDateAndPersonItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class StepBasic_ProductDefinitionWithAssociatedDocuments;
 class StepAP214_AutoDesignDateAndPersonItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a AutoDesignDateAndPersonItem SelectType <br>
   Standard_EXPORT   StepAP214_AutoDesignDateAndPersonItem();
diff --git a/inc/StepAP214_AutoDesignDateAndTimeItem.hxx b/inc/StepAP214_AutoDesignDateAndTimeItem.hxx
index 2bc9aaa..0a474bd 100644
--- a/inc/StepAP214_AutoDesignDateAndTimeItem.hxx
+++ b/inc/StepAP214_AutoDesignDateAndTimeItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepBasic_ProductDefinitionEffectivity;
 class StepAP214_AutoDesignDateAndTimeItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a AutoDesignDateAndTimeItem SelectType <br>
   Standard_EXPORT   StepAP214_AutoDesignDateAndTimeItem();
diff --git a/inc/StepAP214_AutoDesignDatedItem.hxx b/inc/StepAP214_AutoDesignDatedItem.hxx
index ab3348b..4fc3129 100644
--- a/inc/StepAP214_AutoDesignDatedItem.hxx
+++ b/inc/StepAP214_AutoDesignDatedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepBasic_ProductDefinitionEffectivity;
 class StepAP214_AutoDesignDatedItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a AutoDesignDatedItem SelectType <br>
   Standard_EXPORT   StepAP214_AutoDesignDatedItem();
diff --git a/inc/StepAP214_AutoDesignGeneralOrgItem.hxx b/inc/StepAP214_AutoDesignGeneralOrgItem.hxx
index 488489a..ef771c4 100644
--- a/inc/StepAP214_AutoDesignGeneralOrgItem.hxx
+++ b/inc/StepAP214_AutoDesignGeneralOrgItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class StepAP214_AutoDesignDocumentReference;
 class StepAP214_AutoDesignGeneralOrgItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a AutoDesignGeneralOrgItem SelectType <br>
   Standard_EXPORT   StepAP214_AutoDesignGeneralOrgItem();
diff --git a/inc/StepAP214_AutoDesignGroupedItem.hxx b/inc/StepAP214_AutoDesignGroupedItem.hxx
index e721482..2f1ebd5 100644
--- a/inc/StepAP214_AutoDesignGroupedItem.hxx
+++ b/inc/StepAP214_AutoDesignGroupedItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class StepVisual_TemplateInstance;
 class StepAP214_AutoDesignGroupedItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a AutoDesignGroupedItem SelectType <br>
   Standard_EXPORT   StepAP214_AutoDesignGroupedItem();
diff --git a/inc/StepAP214_AutoDesignOrganizationItem.hxx b/inc/StepAP214_AutoDesignOrganizationItem.hxx
index 86b54b1..9393f32 100644
--- a/inc/StepAP214_AutoDesignOrganizationItem.hxx
+++ b/inc/StepAP214_AutoDesignOrganizationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepBasic_PhysicallyModeledProductDefinition;
 class StepAP214_AutoDesignOrganizationItem  : public StepAP214_AutoDesignGeneralOrgItem {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepAP214_AutoDesignOrganizationItem();
diff --git a/inc/StepAP214_AutoDesignPresentedItemSelect.hxx b/inc/StepAP214_AutoDesignPresentedItemSelect.hxx
index de31424..d39b007 100644
--- a/inc/StepAP214_AutoDesignPresentedItemSelect.hxx
+++ b/inc/StepAP214_AutoDesignPresentedItemSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class StepBasic_DocumentRelationship;
 class StepAP214_AutoDesignPresentedItemSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a AutoDesignPresentedItemSelect SelectType <br>
   Standard_EXPORT   StepAP214_AutoDesignPresentedItemSelect();
diff --git a/inc/StepAP214_AutoDesignReferencingItem.hxx b/inc/StepAP214_AutoDesignReferencingItem.hxx
index 261bf6d..07c9076 100644
--- a/inc/StepAP214_AutoDesignReferencingItem.hxx
+++ b/inc/StepAP214_AutoDesignReferencingItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -85,18 +88,7 @@ class StepRepr_ShapeAspect;
 class StepAP214_AutoDesignReferencingItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a AutoDesignReferencingItem SelectType <br>
   Standard_EXPORT   StepAP214_AutoDesignReferencingItem();
diff --git a/inc/StepAP214_DateAndTimeItem.hxx b/inc/StepAP214_DateAndTimeItem.hxx
index 7c5195c..17e7dae 100644
--- a/inc/StepAP214_DateAndTimeItem.hxx
+++ b/inc/StepAP214_DateAndTimeItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class StepBasic_Effectivity;
 class StepAP214_DateAndTimeItem  : public StepAP214_ApprovalItem {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a DateAndTimeItem SelectType <br>
   Standard_EXPORT   StepAP214_DateAndTimeItem();
diff --git a/inc/StepAP214_DateItem.hxx b/inc/StepAP214_DateItem.hxx
index 97568ca..07ba12f 100644
--- a/inc/StepAP214_DateItem.hxx
+++ b/inc/StepAP214_DateItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class StepBasic_Effectivity;
 class StepAP214_DateItem  : public StepAP214_ApprovalItem {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a DateItem SelectType <br>
   Standard_EXPORT   StepAP214_DateItem();
diff --git a/inc/StepAP214_DocumentReferenceItem.hxx b/inc/StepAP214_DocumentReferenceItem.hxx
index f0e8313..07120a5 100644
--- a/inc/StepAP214_DocumentReferenceItem.hxx
+++ b/inc/StepAP214_DocumentReferenceItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class StepRepr_ShapeAspectRelationship;
 class StepAP214_DocumentReferenceItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a DocumentReferenceItem SelectType <br>
   Standard_EXPORT   StepAP214_DocumentReferenceItem();
diff --git a/inc/StepAP214_ExternalIdentificationItem.hxx b/inc/StepAP214_ExternalIdentificationItem.hxx
index 93ebec3..e2241fb 100644
--- a/inc/StepAP214_ExternalIdentificationItem.hxx
+++ b/inc/StepAP214_ExternalIdentificationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class StepBasic_ProductDefinition;
 class StepAP214_ExternalIdentificationItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepAP214_ExternalIdentificationItem();
diff --git a/inc/StepAP214_GroupItem.hxx b/inc/StepAP214_GroupItem.hxx
index bdaf946..3693a15 100644
--- a/inc/StepAP214_GroupItem.hxx
+++ b/inc/StepAP214_GroupItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepGeom_GeometricRepresentationItem;
 class StepAP214_GroupItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a GroupItem SelectType <br>
   Standard_EXPORT   StepAP214_GroupItem();
diff --git a/inc/StepAP214_OrganizationItem.hxx b/inc/StepAP214_OrganizationItem.hxx
index 5e22b7d..bd7d957 100644
--- a/inc/StepAP214_OrganizationItem.hxx
+++ b/inc/StepAP214_OrganizationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepBasic_Approval;
 class StepAP214_OrganizationItem  : public StepAP214_ApprovalItem {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a OrganizationItem SelectType <br>
   Standard_EXPORT   StepAP214_OrganizationItem();
diff --git a/inc/StepAP214_PersonAndOrganizationItem.hxx b/inc/StepAP214_PersonAndOrganizationItem.hxx
index 0838f46..d48c4bf 100644
--- a/inc/StepAP214_PersonAndOrganizationItem.hxx
+++ b/inc/StepAP214_PersonAndOrganizationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepAP214_AppliedOrganizationAssignment;
 class StepAP214_PersonAndOrganizationItem  : public StepAP214_ApprovalItem {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a PersonAndOrganizationItem SelectType <br>
   Standard_EXPORT   StepAP214_PersonAndOrganizationItem();
diff --git a/inc/StepAP214_PresentedItemSelect.hxx b/inc/StepAP214_PresentedItemSelect.hxx
index b1187a1..2fa89e5 100644
--- a/inc/StepAP214_PresentedItemSelect.hxx
+++ b/inc/StepAP214_PresentedItemSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepBasic_ProductDefinition;
 class StepAP214_PresentedItemSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a PresentedItemSelect SelectType <br>
   Standard_EXPORT   StepAP214_PresentedItemSelect();
diff --git a/inc/StepAP214_SecurityClassificationItem.hxx b/inc/StepAP214_SecurityClassificationItem.hxx
index 0ee4cb4..4a542d7 100644
--- a/inc/StepAP214_SecurityClassificationItem.hxx
+++ b/inc/StepAP214_SecurityClassificationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@
 class StepAP214_SecurityClassificationItem  : public StepAP214_ApprovalItem {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a SecurityClassificationItem SelectType <br>
   Standard_EXPORT   StepAP214_SecurityClassificationItem();
diff --git a/inc/StepBasic_Array1OfApproval.hxx b/inc/StepBasic_Array1OfApproval.hxx
index 0c00bc3..88e594c 100644
--- a/inc/StepBasic_Array1OfApproval.hxx
+++ b/inc/StepBasic_Array1OfApproval.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepBasic_Approval;
 class StepBasic_Array1OfApproval  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepBasic_Array1OfApproval(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepBasic_Array1OfDerivedUnitElement.hxx b/inc/StepBasic_Array1OfDerivedUnitElement.hxx
index a686ebb..1d9fc7b 100644
--- a/inc/StepBasic_Array1OfDerivedUnitElement.hxx
+++ b/inc/StepBasic_Array1OfDerivedUnitElement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepBasic_DerivedUnitElement;
 class StepBasic_Array1OfDerivedUnitElement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepBasic_Array1OfDerivedUnitElement(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepBasic_Array1OfDocument.hxx b/inc/StepBasic_Array1OfDocument.hxx
index 1d84ce4..be7fcc8 100644
--- a/inc/StepBasic_Array1OfDocument.hxx
+++ b/inc/StepBasic_Array1OfDocument.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepBasic_Document;
 class StepBasic_Array1OfDocument  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepBasic_Array1OfDocument(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepBasic_Array1OfNamedUnit.hxx b/inc/StepBasic_Array1OfNamedUnit.hxx
index 50369d4..2740813 100644
--- a/inc/StepBasic_Array1OfNamedUnit.hxx
+++ b/inc/StepBasic_Array1OfNamedUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepBasic_NamedUnit;
 class StepBasic_Array1OfNamedUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepBasic_Array1OfNamedUnit(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepBasic_Array1OfOrganization.hxx b/inc/StepBasic_Array1OfOrganization.hxx
index 595deca..99dbd8e 100644
--- a/inc/StepBasic_Array1OfOrganization.hxx
+++ b/inc/StepBasic_Array1OfOrganization.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepBasic_Organization;
 class StepBasic_Array1OfOrganization  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepBasic_Array1OfOrganization(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepBasic_Array1OfPerson.hxx b/inc/StepBasic_Array1OfPerson.hxx
index 439bb4c..64ab866 100644
--- a/inc/StepBasic_Array1OfPerson.hxx
+++ b/inc/StepBasic_Array1OfPerson.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepBasic_Person;
 class StepBasic_Array1OfPerson  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepBasic_Array1OfPerson(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepBasic_Array1OfProduct.hxx b/inc/StepBasic_Array1OfProduct.hxx
index ca01fed..3b9c721 100644
--- a/inc/StepBasic_Array1OfProduct.hxx
+++ b/inc/StepBasic_Array1OfProduct.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepBasic_Product;
 class StepBasic_Array1OfProduct  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepBasic_Array1OfProduct(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepBasic_Array1OfProductContext.hxx b/inc/StepBasic_Array1OfProductContext.hxx
index c508699..2add53f 100644
--- a/inc/StepBasic_Array1OfProductContext.hxx
+++ b/inc/StepBasic_Array1OfProductContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepBasic_ProductContext;
 class StepBasic_Array1OfProductContext  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepBasic_Array1OfProductContext(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepBasic_Array1OfProductDefinition.hxx b/inc/StepBasic_Array1OfProductDefinition.hxx
index ce970d3..56f8ef2 100644
--- a/inc/StepBasic_Array1OfProductDefinition.hxx
+++ b/inc/StepBasic_Array1OfProductDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepBasic_ProductDefinition;
 class StepBasic_Array1OfProductDefinition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepBasic_Array1OfProductDefinition(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepBasic_Array1OfUncertaintyMeasureWithUnit.hxx b/inc/StepBasic_Array1OfUncertaintyMeasureWithUnit.hxx
index d4f8824..773c92f 100644
--- a/inc/StepBasic_Array1OfUncertaintyMeasureWithUnit.hxx
+++ b/inc/StepBasic_Array1OfUncertaintyMeasureWithUnit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepBasic_UncertaintyMeasureWithUnit;
 class StepBasic_Array1OfUncertaintyMeasureWithUnit  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepBasic_Array1OfUncertaintyMeasureWithUnit(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepBasic_DateTimeSelect.hxx b/inc/StepBasic_DateTimeSelect.hxx
index 734b3d5..ef7282f 100644
--- a/inc/StepBasic_DateTimeSelect.hxx
+++ b/inc/StepBasic_DateTimeSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepBasic_DateAndTime;
 class StepBasic_DateTimeSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a DateTimeSelect SelectType <br>
   Standard_EXPORT   StepBasic_DateTimeSelect();
diff --git a/inc/StepBasic_PersonOrganizationSelect.hxx b/inc/StepBasic_PersonOrganizationSelect.hxx
index 53cd7d3..6bdd48d 100644
--- a/inc/StepBasic_PersonOrganizationSelect.hxx
+++ b/inc/StepBasic_PersonOrganizationSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepBasic_PersonAndOrganization;
 class StepBasic_PersonOrganizationSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a PersonOrganizationSelect SelectType <br>
   Standard_EXPORT   StepBasic_PersonOrganizationSelect();
diff --git a/inc/StepBasic_ProductOrFormationOrDefinition.hxx b/inc/StepBasic_ProductOrFormationOrDefinition.hxx
index 71fe5df..c81e0c1 100644
--- a/inc/StepBasic_ProductOrFormationOrDefinition.hxx
+++ b/inc/StepBasic_ProductOrFormationOrDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepBasic_ProductDefinition;
 class StepBasic_ProductOrFormationOrDefinition  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepBasic_ProductOrFormationOrDefinition();
diff --git a/inc/StepBasic_RoleSelect.hxx b/inc/StepBasic_RoleSelect.hxx
index 9f64713..550a8db 100644
--- a/inc/StepBasic_RoleSelect.hxx
+++ b/inc/StepBasic_RoleSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class StepBasic_SecurityClassificationAssignment;
 class StepBasic_RoleSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepBasic_RoleSelect();
diff --git a/inc/StepBasic_SizeSelect.hxx b/inc/StepBasic_SizeSelect.hxx
index cd6c277..566437c 100644
--- a/inc/StepBasic_SizeSelect.hxx
+++ b/inc/StepBasic_SizeSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepData_SelectMember;
 class StepBasic_SizeSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a SizeSelect SelectType <br>
   Standard_EXPORT   StepBasic_SizeSelect();
diff --git a/inc/StepBasic_SourceItem.hxx b/inc/StepBasic_SourceItem.hxx
index f2345ca..1fed133 100644
--- a/inc/StepBasic_SourceItem.hxx
+++ b/inc/StepBasic_SourceItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TCollection_HAsciiString;
 class StepBasic_SourceItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepBasic_SourceItem();
diff --git a/inc/StepBasic_Unit.hxx b/inc/StepBasic_Unit.hxx
index ac6218b..9a328ba 100644
--- a/inc/StepBasic_Unit.hxx
+++ b/inc/StepBasic_Unit.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepBasic_DerivedUnit;
 class StepBasic_Unit  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates empty object <br>
   Standard_EXPORT   StepBasic_Unit();
diff --git a/inc/StepData.hxx b/inc/StepData.hxx
index df93248..0cddfc8 100644
--- a/inc/StepData.hxx
+++ b/inc/StepData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class StepData_NodeOfWriterLib;
 class StepData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the recorded HeaderProtocol, which can be : <br>
 //!           - a Null Handle if no Header Protocol was yet defined <br>
diff --git a/inc/StepData_Array1OfField.hxx b/inc/StepData_Array1OfField.hxx
index 13ef6f3..fc975d3 100644
--- a/inc/StepData_Array1OfField.hxx
+++ b/inc/StepData_Array1OfField.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepData_Field;
 class StepData_Array1OfField  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepData_Array1OfField(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepData_EnumTool.hxx b/inc/StepData_EnumTool.hxx
index 445020f..ab760b5 100644
--- a/inc/StepData_EnumTool.hxx
+++ b/inc/StepData_EnumTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class TCollection_AsciiString;
 class StepData_EnumTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an EnumTool with definitions given by e0 .. e<max> <br>
 //!           Each definition string can bring one term, or several <br>
diff --git a/inc/StepData_Field.hxx b/inc/StepData_Field.hxx
index c6c84f9..f497c99 100644
--- a/inc/StepData_Field.hxx
+++ b/inc/StepData_Field.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class StepData_SelectMember;
 class StepData_Field  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Field, empty ("no value defined") <br>
   Standard_EXPORT   StepData_Field();
diff --git a/inc/StepData_FieldList.hxx b/inc/StepData_FieldList.hxx
index 93d95cc..e8e4d12 100644
--- a/inc/StepData_FieldList.hxx
+++ b/inc/StepData_FieldList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class Interface_EntityIterator;
 class StepData_FieldList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a FieldList of 0 Field <br>
   Standard_EXPORT   StepData_FieldList();
diff --git a/inc/StepData_FieldList1.hxx b/inc/StepData_FieldList1.hxx
index ece7881..a291276 100644
--- a/inc/StepData_FieldList1.hxx
+++ b/inc/StepData_FieldList1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class StepData_Field;
 class StepData_FieldList1  : public StepData_FieldList {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a FieldList of 1 Field <br>
   Standard_EXPORT   StepData_FieldList1();
diff --git a/inc/StepData_FieldListD.hxx b/inc/StepData_FieldListD.hxx
index dbf4d78..5881fc6 100644
--- a/inc/StepData_FieldListD.hxx
+++ b/inc/StepData_FieldListD.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepData_Field;
 class StepData_FieldListD  : public StepData_FieldList {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a FieldListD of <nb> Fields <br>
   Standard_EXPORT   StepData_FieldListD(const Standard_Integer nb);
diff --git a/inc/StepData_FieldListN.hxx b/inc/StepData_FieldListN.hxx
index 31ec314..0c8e65f 100644
--- a/inc/StepData_FieldListN.hxx
+++ b/inc/StepData_FieldListN.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class StepData_Field;
 class StepData_FieldListN  : public StepData_FieldList {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a FieldListN of <nb> Fields <br>
   Standard_EXPORT   StepData_FieldListN(const Standard_Integer nb);
diff --git a/inc/StepData_HeaderTool.hxx b/inc/StepData_HeaderTool.hxx
index 707d074..978c67a 100644
--- a/inc/StepData_HeaderTool.hxx
+++ b/inc/StepData_HeaderTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class StepData_FileProtocol;
 class StepData_HeaderTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a HeaderTool from data read from a File. Computes the <br>
 //!           list of Schema Names. The Protocol will be computed later <br>
diff --git a/inc/StepData_SelectType.hxx b/inc/StepData_SelectType.hxx
index 62ec15f..23c87db 100644
--- a/inc/StepData_SelectType.hxx
+++ b/inc/StepData_SelectType.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class StepData_SelectMember;
 class StepData_SelectType  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Recognizes the Type of an Entity. Returns a positive Number <br>
 //!           which identifies the Type in the definition List of the <br>
diff --git a/inc/StepData_StepDumper.hxx b/inc/StepData_StepDumper.hxx
index 0a25c71..70c52ce 100644
--- a/inc/StepData_StepDumper.hxx
+++ b/inc/StepData_StepDumper.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class Standard_Transient;
 class StepData_StepDumper  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a StepDumper, able to work on a given StepModel <br>
 //!           (which defines the total scope for dumping entities) and <br>
diff --git a/inc/StepData_StepReaderTool.hxx b/inc/StepData_StepReaderTool.hxx
index 0268db5..66567df 100644
--- a/inc/StepData_StepReaderTool.hxx
+++ b/inc/StepData_StepReaderTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class Interface_InterfaceModel;
 class StepData_StepReaderTool  : public Interface_FileReaderTool {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! creates StepReaderTool to work with a StepReaderData according <br>
 //!           to a Step Protocol. Defines the ReaderLib at this time <br>
diff --git a/inc/StepData_StepWriter.hxx b/inc/StepData_StepWriter.hxx
index 1f001ad..c9de464 100644
--- a/inc/StepData_StepWriter.hxx
+++ b/inc/StepData_StepWriter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -98,18 +101,7 @@ class Interface_CheckIterator;
 class StepData_StepWriter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty StepWriter from a StepModel. The StepModel <br>
 //!           provides the Number of Entities, as identifiers for File <br>
diff --git a/inc/StepData_WriterLib.hxx b/inc/StepData_WriterLib.hxx
index 2d6bbd5..37e6d1b 100644
--- a/inc/StepData_WriterLib.hxx
+++ b/inc/StepData_WriterLib.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class StepData_GlobalNodeOfWriterLib;
 class StepData_WriterLib  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void SetGlobal(const Handle(StepData_ReadWriteModule)& amodule,const Handle(StepData_Protocol)& aprotocol) ;
diff --git a/inc/StepDimTol_Array1OfDatumReference.hxx b/inc/StepDimTol_Array1OfDatumReference.hxx
index 951c23d..5716aa7 100644
--- a/inc/StepDimTol_Array1OfDatumReference.hxx
+++ b/inc/StepDimTol_Array1OfDatumReference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepDimTol_DatumReference;
 class StepDimTol_Array1OfDatumReference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepDimTol_Array1OfDatumReference(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepDimTol_ShapeToleranceSelect.hxx b/inc/StepDimTol_ShapeToleranceSelect.hxx
index 82869e2..0595c6c 100644
--- a/inc/StepDimTol_ShapeToleranceSelect.hxx
+++ b/inc/StepDimTol_ShapeToleranceSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepShape_PlusMinusTolerance;
 class StepDimTol_ShapeToleranceSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepDimTol_ShapeToleranceSelect();
diff --git a/inc/StepElement_Array1OfCurveElementEndReleasePacket.hxx b/inc/StepElement_Array1OfCurveElementEndReleasePacket.hxx
index c07faa5..9fa3e83 100644
--- a/inc/StepElement_Array1OfCurveElementEndReleasePacket.hxx
+++ b/inc/StepElement_Array1OfCurveElementEndReleasePacket.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepElement_CurveElementEndReleasePacket;
 class StepElement_Array1OfCurveElementEndReleasePacket  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepElement_Array1OfCurveElementEndReleasePacket(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepElement_Array1OfCurveElementSectionDefinition.hxx b/inc/StepElement_Array1OfCurveElementSectionDefinition.hxx
index c1a3399..fff1bbb 100644
--- a/inc/StepElement_Array1OfCurveElementSectionDefinition.hxx
+++ b/inc/StepElement_Array1OfCurveElementSectionDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepElement_CurveElementSectionDefinition;
 class StepElement_Array1OfCurveElementSectionDefinition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepElement_Array1OfCurveElementSectionDefinition(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepElement_Array1OfHSequenceOfCurveElementPurposeMember.hxx b/inc/StepElement_Array1OfHSequenceOfCurveElementPurposeMember.hxx
index 072b79e..0cc2914 100644
--- a/inc/StepElement_Array1OfHSequenceOfCurveElementPurposeMember.hxx
+++ b/inc/StepElement_Array1OfHSequenceOfCurveElementPurposeMember.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepElement_HSequenceOfCurveElementPurposeMember;
 class StepElement_Array1OfHSequenceOfCurveElementPurposeMember  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepElement_Array1OfHSequenceOfCurveElementPurposeMember(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepElement_Array1OfHSequenceOfSurfaceElementPurposeMember.hxx b/inc/StepElement_Array1OfHSequenceOfSurfaceElementPurposeMember.hxx
index bb4a1c5..45b4303 100644
--- a/inc/StepElement_Array1OfHSequenceOfSurfaceElementPurposeMember.hxx
+++ b/inc/StepElement_Array1OfHSequenceOfSurfaceElementPurposeMember.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepElement_HSequenceOfSurfaceElementPurposeMember;
 class StepElement_Array1OfHSequenceOfSurfaceElementPurposeMember  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepElement_Array1OfHSequenceOfSurfaceElementPurposeMember(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepElement_Array1OfMeasureOrUnspecifiedValue.hxx b/inc/StepElement_Array1OfMeasureOrUnspecifiedValue.hxx
index 5be8f99..9682035 100644
--- a/inc/StepElement_Array1OfMeasureOrUnspecifiedValue.hxx
+++ b/inc/StepElement_Array1OfMeasureOrUnspecifiedValue.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepElement_MeasureOrUnspecifiedValue;
 class StepElement_Array1OfMeasureOrUnspecifiedValue  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepElement_Array1OfMeasureOrUnspecifiedValue(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepElement_Array1OfSurfaceSection.hxx b/inc/StepElement_Array1OfSurfaceSection.hxx
index 2307c67..39ceea6 100644
--- a/inc/StepElement_Array1OfSurfaceSection.hxx
+++ b/inc/StepElement_Array1OfSurfaceSection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepElement_SurfaceSection;
 class StepElement_Array1OfSurfaceSection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepElement_Array1OfSurfaceSection(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepElement_Array1OfVolumeElementPurpose.hxx b/inc/StepElement_Array1OfVolumeElementPurpose.hxx
index 7a9b415..7fcabbe 100644
--- a/inc/StepElement_Array1OfVolumeElementPurpose.hxx
+++ b/inc/StepElement_Array1OfVolumeElementPurpose.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepElement_VolumeElementPurpose;
 class StepElement_Array1OfVolumeElementPurpose  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepElement_Array1OfVolumeElementPurpose(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepElement_Array1OfVolumeElementPurposeMember.hxx b/inc/StepElement_Array1OfVolumeElementPurposeMember.hxx
index c66b8c0..8b19ee7 100644
--- a/inc/StepElement_Array1OfVolumeElementPurposeMember.hxx
+++ b/inc/StepElement_Array1OfVolumeElementPurposeMember.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepElement_VolumeElementPurposeMember;
 class StepElement_Array1OfVolumeElementPurposeMember  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepElement_Array1OfVolumeElementPurposeMember(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepElement_Array2OfCurveElementPurposeMember.hxx b/inc/StepElement_Array2OfCurveElementPurposeMember.hxx
index 207aeaf..56c063d 100644
--- a/inc/StepElement_Array2OfCurveElementPurposeMember.hxx
+++ b/inc/StepElement_Array2OfCurveElementPurposeMember.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepElement_CurveElementPurposeMember;
 class StepElement_Array2OfCurveElementPurposeMember  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepElement_Array2OfCurveElementPurposeMember(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/StepElement_Array2OfSurfaceElementPurpose.hxx b/inc/StepElement_Array2OfSurfaceElementPurpose.hxx
index 928c957..2c732bc 100644
--- a/inc/StepElement_Array2OfSurfaceElementPurpose.hxx
+++ b/inc/StepElement_Array2OfSurfaceElementPurpose.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepElement_SurfaceElementPurpose;
 class StepElement_Array2OfSurfaceElementPurpose  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepElement_Array2OfSurfaceElementPurpose(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/StepElement_Array2OfSurfaceElementPurposeMember.hxx b/inc/StepElement_Array2OfSurfaceElementPurposeMember.hxx
index 396c266..b43a07a 100644
--- a/inc/StepElement_Array2OfSurfaceElementPurposeMember.hxx
+++ b/inc/StepElement_Array2OfSurfaceElementPurposeMember.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepElement_SurfaceElementPurposeMember;
 class StepElement_Array2OfSurfaceElementPurposeMember  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepElement_Array2OfSurfaceElementPurposeMember(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/StepElement_CurveElementFreedom.hxx b/inc/StepElement_CurveElementFreedom.hxx
index 93af6ee..0e8deef 100644
--- a/inc/StepElement_CurveElementFreedom.hxx
+++ b/inc/StepElement_CurveElementFreedom.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TCollection_HAsciiString;
 class StepElement_CurveElementFreedom  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepElement_CurveElementFreedom();
diff --git a/inc/StepElement_CurveElementPurpose.hxx b/inc/StepElement_CurveElementPurpose.hxx
index 978999d..a18eb92 100644
--- a/inc/StepElement_CurveElementPurpose.hxx
+++ b/inc/StepElement_CurveElementPurpose.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TCollection_HAsciiString;
 class StepElement_CurveElementPurpose  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepElement_CurveElementPurpose();
diff --git a/inc/StepElement_ElementAspect.hxx b/inc/StepElement_ElementAspect.hxx
index d3d8893..2d78b97 100644
--- a/inc/StepElement_ElementAspect.hxx
+++ b/inc/StepElement_ElementAspect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class StepData_SelectMember;
 class StepElement_ElementAspect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepElement_ElementAspect();
diff --git a/inc/StepElement_MeasureOrUnspecifiedValue.hxx b/inc/StepElement_MeasureOrUnspecifiedValue.hxx
index ef251e4..eac52e2 100644
--- a/inc/StepElement_MeasureOrUnspecifiedValue.hxx
+++ b/inc/StepElement_MeasureOrUnspecifiedValue.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class StepData_SelectMember;
 class StepElement_MeasureOrUnspecifiedValue  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepElement_MeasureOrUnspecifiedValue();
diff --git a/inc/StepElement_SequenceOfCurveElementPurposeMember.hxx b/inc/StepElement_SequenceOfCurveElementPurposeMember.hxx
index 6b140cc..aeadd35 100644
--- a/inc/StepElement_SequenceOfCurveElementPurposeMember.hxx
+++ b/inc/StepElement_SequenceOfCurveElementPurposeMember.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepElement_SequenceNodeOfSequenceOfCurveElementPurposeMember;
 class StepElement_SequenceOfCurveElementPurposeMember  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StepElement_SequenceOfCurveElementPurposeMember();
diff --git a/inc/StepElement_SequenceOfCurveElementSectionDefinition.hxx b/inc/StepElement_SequenceOfCurveElementSectionDefinition.hxx
index 8c28a77..dababb9 100644
--- a/inc/StepElement_SequenceOfCurveElementSectionDefinition.hxx
+++ b/inc/StepElement_SequenceOfCurveElementSectionDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepElement_SequenceNodeOfSequenceOfCurveElementSectionDefinition;
 class StepElement_SequenceOfCurveElementSectionDefinition  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StepElement_SequenceOfCurveElementSectionDefinition();
diff --git a/inc/StepElement_SequenceOfElementMaterial.hxx b/inc/StepElement_SequenceOfElementMaterial.hxx
index eea928a..5bfac0a 100644
--- a/inc/StepElement_SequenceOfElementMaterial.hxx
+++ b/inc/StepElement_SequenceOfElementMaterial.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepElement_SequenceNodeOfSequenceOfElementMaterial;
 class StepElement_SequenceOfElementMaterial  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StepElement_SequenceOfElementMaterial();
diff --git a/inc/StepElement_SequenceOfSurfaceElementPurposeMember.hxx b/inc/StepElement_SequenceOfSurfaceElementPurposeMember.hxx
index c30fd27..a162a35 100644
--- a/inc/StepElement_SequenceOfSurfaceElementPurposeMember.hxx
+++ b/inc/StepElement_SequenceOfSurfaceElementPurposeMember.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepElement_SequenceNodeOfSequenceOfSurfaceElementPurposeMember;
 class StepElement_SequenceOfSurfaceElementPurposeMember  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StepElement_SequenceOfSurfaceElementPurposeMember();
diff --git a/inc/StepElement_SurfaceElementPurpose.hxx b/inc/StepElement_SurfaceElementPurpose.hxx
index 8d44599..54ec924 100644
--- a/inc/StepElement_SurfaceElementPurpose.hxx
+++ b/inc/StepElement_SurfaceElementPurpose.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TCollection_HAsciiString;
 class StepElement_SurfaceElementPurpose  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepElement_SurfaceElementPurpose();
diff --git a/inc/StepElement_VolumeElementPurpose.hxx b/inc/StepElement_VolumeElementPurpose.hxx
index 573da31..c72ad81 100644
--- a/inc/StepElement_VolumeElementPurpose.hxx
+++ b/inc/StepElement_VolumeElementPurpose.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TCollection_HAsciiString;
 class StepElement_VolumeElementPurpose  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepElement_VolumeElementPurpose();
diff --git a/inc/StepFEA_Array1OfCurveElementEndOffset.hxx b/inc/StepFEA_Array1OfCurveElementEndOffset.hxx
index e4c27f3..ee078cc 100644
--- a/inc/StepFEA_Array1OfCurveElementEndOffset.hxx
+++ b/inc/StepFEA_Array1OfCurveElementEndOffset.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepFEA_CurveElementEndOffset;
 class StepFEA_Array1OfCurveElementEndOffset  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepFEA_Array1OfCurveElementEndOffset(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepFEA_Array1OfCurveElementEndRelease.hxx b/inc/StepFEA_Array1OfCurveElementEndRelease.hxx
index 009fe4e..45875e9 100644
--- a/inc/StepFEA_Array1OfCurveElementEndRelease.hxx
+++ b/inc/StepFEA_Array1OfCurveElementEndRelease.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepFEA_CurveElementEndRelease;
 class StepFEA_Array1OfCurveElementEndRelease  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepFEA_Array1OfCurveElementEndRelease(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepFEA_Array1OfCurveElementInterval.hxx b/inc/StepFEA_Array1OfCurveElementInterval.hxx
index fcc0e44..dd0e07b 100644
--- a/inc/StepFEA_Array1OfCurveElementInterval.hxx
+++ b/inc/StepFEA_Array1OfCurveElementInterval.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepFEA_CurveElementInterval;
 class StepFEA_Array1OfCurveElementInterval  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepFEA_Array1OfCurveElementInterval(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepFEA_Array1OfDegreeOfFreedom.hxx b/inc/StepFEA_Array1OfDegreeOfFreedom.hxx
index d5d256c..0d5d513 100644
--- a/inc/StepFEA_Array1OfDegreeOfFreedom.hxx
+++ b/inc/StepFEA_Array1OfDegreeOfFreedom.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepFEA_DegreeOfFreedom;
 class StepFEA_Array1OfDegreeOfFreedom  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepFEA_Array1OfDegreeOfFreedom(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepFEA_Array1OfElementRepresentation.hxx b/inc/StepFEA_Array1OfElementRepresentation.hxx
index e23e787..563384a 100644
--- a/inc/StepFEA_Array1OfElementRepresentation.hxx
+++ b/inc/StepFEA_Array1OfElementRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepFEA_ElementRepresentation;
 class StepFEA_Array1OfElementRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepFEA_Array1OfElementRepresentation(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepFEA_Array1OfNodeRepresentation.hxx b/inc/StepFEA_Array1OfNodeRepresentation.hxx
index 309f18b..695b798 100644
--- a/inc/StepFEA_Array1OfNodeRepresentation.hxx
+++ b/inc/StepFEA_Array1OfNodeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepFEA_NodeRepresentation;
 class StepFEA_Array1OfNodeRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepFEA_Array1OfNodeRepresentation(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepFEA_CurveElementEndCoordinateSystem.hxx b/inc/StepFEA_CurveElementEndCoordinateSystem.hxx
index 8383d14..fcf002a 100644
--- a/inc/StepFEA_CurveElementEndCoordinateSystem.hxx
+++ b/inc/StepFEA_CurveElementEndCoordinateSystem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepFEA_ParametricCurve3dElementCoordinateSystem;
 class StepFEA_CurveElementEndCoordinateSystem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepFEA_CurveElementEndCoordinateSystem();
diff --git a/inc/StepFEA_DegreeOfFreedom.hxx b/inc/StepFEA_DegreeOfFreedom.hxx
index 6d9f6da..d03ac9b 100644
--- a/inc/StepFEA_DegreeOfFreedom.hxx
+++ b/inc/StepFEA_DegreeOfFreedom.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TCollection_HAsciiString;
 class StepFEA_DegreeOfFreedom  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepFEA_DegreeOfFreedom();
diff --git a/inc/StepFEA_ElementOrElementGroup.hxx b/inc/StepFEA_ElementOrElementGroup.hxx
index ac5e8b9..36200d0 100644
--- a/inc/StepFEA_ElementOrElementGroup.hxx
+++ b/inc/StepFEA_ElementOrElementGroup.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepFEA_ElementGroup;
 class StepFEA_ElementOrElementGroup  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepFEA_ElementOrElementGroup();
diff --git a/inc/StepFEA_SequenceOfCurve3dElementProperty.hxx b/inc/StepFEA_SequenceOfCurve3dElementProperty.hxx
index afee094..4c4f8c2 100644
--- a/inc/StepFEA_SequenceOfCurve3dElementProperty.hxx
+++ b/inc/StepFEA_SequenceOfCurve3dElementProperty.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepFEA_SequenceNodeOfSequenceOfCurve3dElementProperty;
 class StepFEA_SequenceOfCurve3dElementProperty  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StepFEA_SequenceOfCurve3dElementProperty();
diff --git a/inc/StepFEA_SequenceOfElementGeometricRelationship.hxx b/inc/StepFEA_SequenceOfElementGeometricRelationship.hxx
index 0facd39..69852a0 100644
--- a/inc/StepFEA_SequenceOfElementGeometricRelationship.hxx
+++ b/inc/StepFEA_SequenceOfElementGeometricRelationship.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepFEA_SequenceNodeOfSequenceOfElementGeometricRelationship;
 class StepFEA_SequenceOfElementGeometricRelationship  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StepFEA_SequenceOfElementGeometricRelationship();
diff --git a/inc/StepFEA_SequenceOfElementRepresentation.hxx b/inc/StepFEA_SequenceOfElementRepresentation.hxx
index ffb9c2b..f3520a4 100644
--- a/inc/StepFEA_SequenceOfElementRepresentation.hxx
+++ b/inc/StepFEA_SequenceOfElementRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepFEA_SequenceNodeOfSequenceOfElementRepresentation;
 class StepFEA_SequenceOfElementRepresentation  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StepFEA_SequenceOfElementRepresentation();
diff --git a/inc/StepFEA_SequenceOfNodeRepresentation.hxx b/inc/StepFEA_SequenceOfNodeRepresentation.hxx
index aa8750c..4bdf607 100644
--- a/inc/StepFEA_SequenceOfNodeRepresentation.hxx
+++ b/inc/StepFEA_SequenceOfNodeRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepFEA_SequenceNodeOfSequenceOfNodeRepresentation;
 class StepFEA_SequenceOfNodeRepresentation  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StepFEA_SequenceOfNodeRepresentation();
diff --git a/inc/StepFEA_SymmetricTensor22d.hxx b/inc/StepFEA_SymmetricTensor22d.hxx
index c215964..7459ea1 100644
--- a/inc/StepFEA_SymmetricTensor22d.hxx
+++ b/inc/StepFEA_SymmetricTensor22d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColStd_HArray1OfReal;
 class StepFEA_SymmetricTensor22d  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepFEA_SymmetricTensor22d();
diff --git a/inc/StepFEA_SymmetricTensor23d.hxx b/inc/StepFEA_SymmetricTensor23d.hxx
index 6dd813a..a4bfc92 100644
--- a/inc/StepFEA_SymmetricTensor23d.hxx
+++ b/inc/StepFEA_SymmetricTensor23d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TColStd_HArray1OfReal;
 class StepFEA_SymmetricTensor23d  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepFEA_SymmetricTensor23d();
diff --git a/inc/StepFEA_SymmetricTensor42d.hxx b/inc/StepFEA_SymmetricTensor42d.hxx
index 6befbe0..d9f8f3d 100644
--- a/inc/StepFEA_SymmetricTensor42d.hxx
+++ b/inc/StepFEA_SymmetricTensor42d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColStd_HArray1OfReal;
 class StepFEA_SymmetricTensor42d  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepFEA_SymmetricTensor42d();
diff --git a/inc/StepFEA_SymmetricTensor43d.hxx b/inc/StepFEA_SymmetricTensor43d.hxx
index 4e71f7a..64a5eaa 100644
--- a/inc/StepFEA_SymmetricTensor43d.hxx
+++ b/inc/StepFEA_SymmetricTensor43d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TColStd_HArray1OfReal;
 class StepFEA_SymmetricTensor43d  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepFEA_SymmetricTensor43d();
diff --git a/inc/StepGeom_Array1OfBoundaryCurve.hxx b/inc/StepGeom_Array1OfBoundaryCurve.hxx
index a50fdfe..8b5d7cb 100644
--- a/inc/StepGeom_Array1OfBoundaryCurve.hxx
+++ b/inc/StepGeom_Array1OfBoundaryCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepGeom_BoundaryCurve;
 class StepGeom_Array1OfBoundaryCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepGeom_Array1OfBoundaryCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepGeom_Array1OfCartesianPoint.hxx b/inc/StepGeom_Array1OfCartesianPoint.hxx
index f0bd318..0fb2e15 100644
--- a/inc/StepGeom_Array1OfCartesianPoint.hxx
+++ b/inc/StepGeom_Array1OfCartesianPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepGeom_CartesianPoint;
 class StepGeom_Array1OfCartesianPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepGeom_Array1OfCartesianPoint(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepGeom_Array1OfCompositeCurveSegment.hxx b/inc/StepGeom_Array1OfCompositeCurveSegment.hxx
index 022db8a..4f5084b 100644
--- a/inc/StepGeom_Array1OfCompositeCurveSegment.hxx
+++ b/inc/StepGeom_Array1OfCompositeCurveSegment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepGeom_CompositeCurveSegment;
 class StepGeom_Array1OfCompositeCurveSegment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepGeom_Array1OfCompositeCurveSegment(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepGeom_Array1OfCurve.hxx b/inc/StepGeom_Array1OfCurve.hxx
index f44d51d..1172f10 100644
--- a/inc/StepGeom_Array1OfCurve.hxx
+++ b/inc/StepGeom_Array1OfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepGeom_Curve;
 class StepGeom_Array1OfCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepGeom_Array1OfCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepGeom_Array1OfPcurveOrSurface.hxx b/inc/StepGeom_Array1OfPcurveOrSurface.hxx
index 0a96a15..5d54ee6 100644
--- a/inc/StepGeom_Array1OfPcurveOrSurface.hxx
+++ b/inc/StepGeom_Array1OfPcurveOrSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepGeom_PcurveOrSurface;
 class StepGeom_Array1OfPcurveOrSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepGeom_Array1OfPcurveOrSurface(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepGeom_Array1OfSurfaceBoundary.hxx b/inc/StepGeom_Array1OfSurfaceBoundary.hxx
index 0ab56be..6d1c115 100644
--- a/inc/StepGeom_Array1OfSurfaceBoundary.hxx
+++ b/inc/StepGeom_Array1OfSurfaceBoundary.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepGeom_SurfaceBoundary;
 class StepGeom_Array1OfSurfaceBoundary  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepGeom_Array1OfSurfaceBoundary(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepGeom_Array1OfTrimmingSelect.hxx b/inc/StepGeom_Array1OfTrimmingSelect.hxx
index 91e7076..018f23b 100644
--- a/inc/StepGeom_Array1OfTrimmingSelect.hxx
+++ b/inc/StepGeom_Array1OfTrimmingSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepGeom_TrimmingSelect;
 class StepGeom_Array1OfTrimmingSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepGeom_Array1OfTrimmingSelect(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepGeom_Array2OfCartesianPoint.hxx b/inc/StepGeom_Array2OfCartesianPoint.hxx
index 570df06..77fa708 100644
--- a/inc/StepGeom_Array2OfCartesianPoint.hxx
+++ b/inc/StepGeom_Array2OfCartesianPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepGeom_CartesianPoint;
 class StepGeom_Array2OfCartesianPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepGeom_Array2OfCartesianPoint(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/StepGeom_Array2OfSurfacePatch.hxx b/inc/StepGeom_Array2OfSurfacePatch.hxx
index 182f92c..9608211 100644
--- a/inc/StepGeom_Array2OfSurfacePatch.hxx
+++ b/inc/StepGeom_Array2OfSurfacePatch.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepGeom_SurfacePatch;
 class StepGeom_Array2OfSurfacePatch  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepGeom_Array2OfSurfacePatch(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/StepGeom_Axis2Placement.hxx b/inc/StepGeom_Axis2Placement.hxx
index 7134815..6e0ea93 100644
--- a/inc/StepGeom_Axis2Placement.hxx
+++ b/inc/StepGeom_Axis2Placement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepGeom_Axis2Placement3d;
 class StepGeom_Axis2Placement  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a Axis2Placement SelectType <br>
   Standard_EXPORT   StepGeom_Axis2Placement();
diff --git a/inc/StepGeom_CurveOnSurface.hxx b/inc/StepGeom_CurveOnSurface.hxx
index a6979ee..44fe2d1 100644
--- a/inc/StepGeom_CurveOnSurface.hxx
+++ b/inc/StepGeom_CurveOnSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepGeom_CompositeCurveOnSurface;
 class StepGeom_CurveOnSurface  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a CurveOnSurface SelectType <br>
   Standard_EXPORT   StepGeom_CurveOnSurface();
diff --git a/inc/StepGeom_PcurveOrSurface.hxx b/inc/StepGeom_PcurveOrSurface.hxx
index e667798..03e7609 100644
--- a/inc/StepGeom_PcurveOrSurface.hxx
+++ b/inc/StepGeom_PcurveOrSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepGeom_Surface;
 class StepGeom_PcurveOrSurface  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a PcurveOrSurface SelectType <br>
   Standard_EXPORT   StepGeom_PcurveOrSurface();
diff --git a/inc/StepGeom_SurfaceBoundary.hxx b/inc/StepGeom_SurfaceBoundary.hxx
index ad6fd58..0e4a0ab 100644
--- a/inc/StepGeom_SurfaceBoundary.hxx
+++ b/inc/StepGeom_SurfaceBoundary.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepGeom_DegeneratePcurve;
 class StepGeom_SurfaceBoundary  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepGeom_SurfaceBoundary();
diff --git a/inc/StepGeom_TrimmingSelect.hxx b/inc/StepGeom_TrimmingSelect.hxx
index 5a98d78..8ebc4c0 100644
--- a/inc/StepGeom_TrimmingSelect.hxx
+++ b/inc/StepGeom_TrimmingSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class StepGeom_CartesianPoint;
 class StepGeom_TrimmingSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a TrimmingSelect SelectType <br>
   Standard_EXPORT   StepGeom_TrimmingSelect();
diff --git a/inc/StepGeom_VectorOrDirection.hxx b/inc/StepGeom_VectorOrDirection.hxx
index 22127fa..39fc71f 100644
--- a/inc/StepGeom_VectorOrDirection.hxx
+++ b/inc/StepGeom_VectorOrDirection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepGeom_Direction;
 class StepGeom_VectorOrDirection  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a VectorOrDirection SelectType <br>
   Standard_EXPORT   StepGeom_VectorOrDirection();
diff --git a/inc/StepRepr_Array1OfMaterialPropertyRepresentation.hxx b/inc/StepRepr_Array1OfMaterialPropertyRepresentation.hxx
index 723d0ec..60ecb32 100644
--- a/inc/StepRepr_Array1OfMaterialPropertyRepresentation.hxx
+++ b/inc/StepRepr_Array1OfMaterialPropertyRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepRepr_MaterialPropertyRepresentation;
 class StepRepr_Array1OfMaterialPropertyRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepRepr_Array1OfMaterialPropertyRepresentation(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepRepr_Array1OfPropertyDefinitionRepresentation.hxx b/inc/StepRepr_Array1OfPropertyDefinitionRepresentation.hxx
index 3f6120f..a40bf27 100644
--- a/inc/StepRepr_Array1OfPropertyDefinitionRepresentation.hxx
+++ b/inc/StepRepr_Array1OfPropertyDefinitionRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepRepr_PropertyDefinitionRepresentation;
 class StepRepr_Array1OfPropertyDefinitionRepresentation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepRepr_Array1OfPropertyDefinitionRepresentation(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepRepr_Array1OfRepresentationItem.hxx b/inc/StepRepr_Array1OfRepresentationItem.hxx
index 537607c..06e2e99 100644
--- a/inc/StepRepr_Array1OfRepresentationItem.hxx
+++ b/inc/StepRepr_Array1OfRepresentationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepRepr_RepresentationItem;
 class StepRepr_Array1OfRepresentationItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepRepr_Array1OfRepresentationItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepRepr_CharacterizedDefinition.hxx b/inc/StepRepr_CharacterizedDefinition.hxx
index 5cf92a3..ac48d5e 100644
--- a/inc/StepRepr_CharacterizedDefinition.hxx
+++ b/inc/StepRepr_CharacterizedDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class StepBasic_DocumentFile;
 class StepRepr_CharacterizedDefinition  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepRepr_CharacterizedDefinition();
diff --git a/inc/StepRepr_ConfigurationDesignItem.hxx b/inc/StepRepr_ConfigurationDesignItem.hxx
index 911e11e..e5f68ef 100644
--- a/inc/StepRepr_ConfigurationDesignItem.hxx
+++ b/inc/StepRepr_ConfigurationDesignItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepBasic_ProductDefinitionFormation;
 class StepRepr_ConfigurationDesignItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepRepr_ConfigurationDesignItem();
diff --git a/inc/StepRepr_RepresentedDefinition.hxx b/inc/StepRepr_RepresentedDefinition.hxx
index 54671cd..e775548 100644
--- a/inc/StepRepr_RepresentedDefinition.hxx
+++ b/inc/StepRepr_RepresentedDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class StepRepr_ShapeAspectRelationship;
 class StepRepr_RepresentedDefinition  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepRepr_RepresentedDefinition();
diff --git a/inc/StepRepr_SequenceOfMaterialPropertyRepresentation.hxx b/inc/StepRepr_SequenceOfMaterialPropertyRepresentation.hxx
index ac58ce5..cc3e941 100644
--- a/inc/StepRepr_SequenceOfMaterialPropertyRepresentation.hxx
+++ b/inc/StepRepr_SequenceOfMaterialPropertyRepresentation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepRepr_SequenceNodeOfSequenceOfMaterialPropertyRepresentation;
 class StepRepr_SequenceOfMaterialPropertyRepresentation  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StepRepr_SequenceOfMaterialPropertyRepresentation();
diff --git a/inc/StepRepr_SequenceOfRepresentationItem.hxx b/inc/StepRepr_SequenceOfRepresentationItem.hxx
index 8f811e8..c05ddd5 100644
--- a/inc/StepRepr_SequenceOfRepresentationItem.hxx
+++ b/inc/StepRepr_SequenceOfRepresentationItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StepRepr_SequenceNodeOfSequenceOfRepresentationItem;
 class StepRepr_SequenceOfRepresentationItem  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StepRepr_SequenceOfRepresentationItem();
diff --git a/inc/StepRepr_ShapeDefinition.hxx b/inc/StepRepr_ShapeDefinition.hxx
index 6c66970..3347483 100644
--- a/inc/StepRepr_ShapeDefinition.hxx
+++ b/inc/StepRepr_ShapeDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepRepr_ShapeAspectRelationship;
 class StepRepr_ShapeDefinition  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ShapeDefinition SelectType <br>
   Standard_EXPORT   StepRepr_ShapeDefinition();
diff --git a/inc/StepRepr_Transformation.hxx b/inc/StepRepr_Transformation.hxx
index 688efde..4da41f3 100644
--- a/inc/StepRepr_Transformation.hxx
+++ b/inc/StepRepr_Transformation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepRepr_FunctionallyDefinedTransformation;
 class StepRepr_Transformation  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a Transformation SelectType <br>
   Standard_EXPORT   StepRepr_Transformation();
diff --git a/inc/StepShape_Array1OfConnectedEdgeSet.hxx b/inc/StepShape_Array1OfConnectedEdgeSet.hxx
index 20425a8..1c195fa 100644
--- a/inc/StepShape_Array1OfConnectedEdgeSet.hxx
+++ b/inc/StepShape_Array1OfConnectedEdgeSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepShape_ConnectedEdgeSet;
 class StepShape_Array1OfConnectedEdgeSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepShape_Array1OfConnectedEdgeSet(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepShape_Array1OfConnectedFaceSet.hxx b/inc/StepShape_Array1OfConnectedFaceSet.hxx
index bf6f1e9..9d2b8a8 100644
--- a/inc/StepShape_Array1OfConnectedFaceSet.hxx
+++ b/inc/StepShape_Array1OfConnectedFaceSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepShape_ConnectedFaceSet;
 class StepShape_Array1OfConnectedFaceSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepShape_Array1OfConnectedFaceSet(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepShape_Array1OfEdge.hxx b/inc/StepShape_Array1OfEdge.hxx
index aa0c2a0..0d53f0f 100644
--- a/inc/StepShape_Array1OfEdge.hxx
+++ b/inc/StepShape_Array1OfEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepShape_Edge;
 class StepShape_Array1OfEdge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepShape_Array1OfEdge(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepShape_Array1OfFace.hxx b/inc/StepShape_Array1OfFace.hxx
index 5cf6742..0c6e815 100644
--- a/inc/StepShape_Array1OfFace.hxx
+++ b/inc/StepShape_Array1OfFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepShape_Face;
 class StepShape_Array1OfFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepShape_Array1OfFace(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepShape_Array1OfFaceBound.hxx b/inc/StepShape_Array1OfFaceBound.hxx
index 8715feb..cbb9b45 100644
--- a/inc/StepShape_Array1OfFaceBound.hxx
+++ b/inc/StepShape_Array1OfFaceBound.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepShape_FaceBound;
 class StepShape_Array1OfFaceBound  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepShape_Array1OfFaceBound(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepShape_Array1OfGeometricSetSelect.hxx b/inc/StepShape_Array1OfGeometricSetSelect.hxx
index 4971eef..29b7b1e 100644
--- a/inc/StepShape_Array1OfGeometricSetSelect.hxx
+++ b/inc/StepShape_Array1OfGeometricSetSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepShape_GeometricSetSelect;
 class StepShape_Array1OfGeometricSetSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepShape_Array1OfGeometricSetSelect(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepShape_Array1OfOrientedClosedShell.hxx b/inc/StepShape_Array1OfOrientedClosedShell.hxx
index ef5ef8e..de010ad 100644
--- a/inc/StepShape_Array1OfOrientedClosedShell.hxx
+++ b/inc/StepShape_Array1OfOrientedClosedShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepShape_OrientedClosedShell;
 class StepShape_Array1OfOrientedClosedShell  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepShape_Array1OfOrientedClosedShell(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepShape_Array1OfOrientedEdge.hxx b/inc/StepShape_Array1OfOrientedEdge.hxx
index 43a991e..8ff27ac 100644
--- a/inc/StepShape_Array1OfOrientedEdge.hxx
+++ b/inc/StepShape_Array1OfOrientedEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepShape_OrientedEdge;
 class StepShape_Array1OfOrientedEdge  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepShape_Array1OfOrientedEdge(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepShape_Array1OfShell.hxx b/inc/StepShape_Array1OfShell.hxx
index 8381753..a140bb2 100644
--- a/inc/StepShape_Array1OfShell.hxx
+++ b/inc/StepShape_Array1OfShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepShape_Shell;
 class StepShape_Array1OfShell  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepShape_Array1OfShell(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepShape_Array1OfValueQualifier.hxx b/inc/StepShape_Array1OfValueQualifier.hxx
index 0951fd4..2fdc289 100644
--- a/inc/StepShape_Array1OfValueQualifier.hxx
+++ b/inc/StepShape_Array1OfValueQualifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepShape_ValueQualifier;
 class StepShape_Array1OfValueQualifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepShape_Array1OfValueQualifier(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepShape_BooleanOperand.hxx b/inc/StepShape_BooleanOperand.hxx
index e92cfaf..9acb980 100644
--- a/inc/StepShape_BooleanOperand.hxx
+++ b/inc/StepShape_BooleanOperand.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class StepShape_CsgPrimitive;
 class StepShape_BooleanOperand  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a BooleanOperand SelectType <br>
   Standard_EXPORT   StepShape_BooleanOperand();
diff --git a/inc/StepShape_CsgPrimitive.hxx b/inc/StepShape_CsgPrimitive.hxx
index a7370bd..33c3109 100644
--- a/inc/StepShape_CsgPrimitive.hxx
+++ b/inc/StepShape_CsgPrimitive.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class StepShape_RightCircularCylinder;
 class StepShape_CsgPrimitive  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a CsgPrimitive SelectType <br>
   Standard_EXPORT   StepShape_CsgPrimitive();
diff --git a/inc/StepShape_CsgSelect.hxx b/inc/StepShape_CsgSelect.hxx
index 0094c07..eca6756 100644
--- a/inc/StepShape_CsgSelect.hxx
+++ b/inc/StepShape_CsgSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class StepShape_CsgPrimitive;
 class StepShape_CsgSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a CsgSelect SelectType <br>
   Standard_EXPORT   StepShape_CsgSelect();
diff --git a/inc/StepShape_DimensionalCharacteristic.hxx b/inc/StepShape_DimensionalCharacteristic.hxx
index d6e0b32..8b5e30a 100644
--- a/inc/StepShape_DimensionalCharacteristic.hxx
+++ b/inc/StepShape_DimensionalCharacteristic.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepShape_DimensionalSize;
 class StepShape_DimensionalCharacteristic  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepShape_DimensionalCharacteristic();
diff --git a/inc/StepShape_GeometricSetSelect.hxx b/inc/StepShape_GeometricSetSelect.hxx
index 01fcb19..ea66a04 100644
--- a/inc/StepShape_GeometricSetSelect.hxx
+++ b/inc/StepShape_GeometricSetSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepGeom_Surface;
 class StepShape_GeometricSetSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a GeometricSetSelect SelectType <br>
   Standard_EXPORT   StepShape_GeometricSetSelect();
diff --git a/inc/StepShape_ReversibleTopologyItem.hxx b/inc/StepShape_ReversibleTopologyItem.hxx
index d0d0dc5..d5755da 100644
--- a/inc/StepShape_ReversibleTopologyItem.hxx
+++ b/inc/StepShape_ReversibleTopologyItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class StepShape_OpenShell;
 class StepShape_ReversibleTopologyItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a ReversibleTopologyItem SelectType <br>
   Standard_EXPORT   StepShape_ReversibleTopologyItem();
diff --git a/inc/StepShape_Shell.hxx b/inc/StepShape_Shell.hxx
index 1ad30e6..4ee2403 100644
--- a/inc/StepShape_Shell.hxx
+++ b/inc/StepShape_Shell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepShape_ClosedShell;
 class StepShape_Shell  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a Shell SelectType <br>
   Standard_EXPORT   StepShape_Shell();
diff --git a/inc/StepShape_SurfaceModel.hxx b/inc/StepShape_SurfaceModel.hxx
index 3bce7cb..16300b0 100644
--- a/inc/StepShape_SurfaceModel.hxx
+++ b/inc/StepShape_SurfaceModel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepShape_ShellBasedSurfaceModel;
 class StepShape_SurfaceModel  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a SurfaceModel SelectType <br>
   Standard_EXPORT   StepShape_SurfaceModel();
diff --git a/inc/StepShape_ToleranceMethodDefinition.hxx b/inc/StepShape_ToleranceMethodDefinition.hxx
index ba08bc2..7b47ba5 100644
--- a/inc/StepShape_ToleranceMethodDefinition.hxx
+++ b/inc/StepShape_ToleranceMethodDefinition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepShape_LimitsAndFits;
 class StepShape_ToleranceMethodDefinition  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepShape_ToleranceMethodDefinition();
diff --git a/inc/StepShape_ValueQualifier.hxx b/inc/StepShape_ValueQualifier.hxx
index 8dea031..6d9f6d9 100644
--- a/inc/StepShape_ValueQualifier.hxx
+++ b/inc/StepShape_ValueQualifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepShape_TypeQualifier;
 class StepShape_ValueQualifier  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepShape_ValueQualifier();
diff --git a/inc/StepToGeom_MakeAxis1Placement.hxx b/inc/StepToGeom_MakeAxis1Placement.hxx
index 4c766ea..c5b1687 100644
--- a/inc/StepToGeom_MakeAxis1Placement.hxx
+++ b/inc/StepToGeom_MakeAxis1Placement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Geom_Axis1Placement;
 class StepToGeom_MakeAxis1Placement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Axis1Placement)& SA,Handle(Geom_Axis1Placement)& CA) ;
diff --git a/inc/StepToGeom_MakeAxis2Placement.hxx b/inc/StepToGeom_MakeAxis2Placement.hxx
index 3364f09..89d9cbb 100644
--- a/inc/StepToGeom_MakeAxis2Placement.hxx
+++ b/inc/StepToGeom_MakeAxis2Placement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Geom_Axis2Placement;
 class StepToGeom_MakeAxis2Placement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Axis2Placement3d)& SA,Handle(Geom_Axis2Placement)& CA) ;
diff --git a/inc/StepToGeom_MakeAxisPlacement.hxx b/inc/StepToGeom_MakeAxisPlacement.hxx
index 9cd5291..7578f0c 100644
--- a/inc/StepToGeom_MakeAxisPlacement.hxx
+++ b/inc/StepToGeom_MakeAxisPlacement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Geom2d_AxisPlacement;
 class StepToGeom_MakeAxisPlacement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Axis2Placement2d)& SA,Handle(Geom2d_AxisPlacement)& CA) ;
diff --git a/inc/StepToGeom_MakeBSplineCurve.hxx b/inc/StepToGeom_MakeBSplineCurve.hxx
index 1428149..b92cecd 100644
--- a/inc/StepToGeom_MakeBSplineCurve.hxx
+++ b/inc/StepToGeom_MakeBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Geom_BSplineCurve;
 class StepToGeom_MakeBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_BSplineCurve)& SC,Handle(Geom_BSplineCurve)& CC) ;
diff --git a/inc/StepToGeom_MakeBSplineCurve2d.hxx b/inc/StepToGeom_MakeBSplineCurve2d.hxx
index 07978d6..d65eea4 100644
--- a/inc/StepToGeom_MakeBSplineCurve2d.hxx
+++ b/inc/StepToGeom_MakeBSplineCurve2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Geom2d_BSplineCurve;
 class StepToGeom_MakeBSplineCurve2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_BSplineCurve)& SC,Handle(Geom2d_BSplineCurve)& CC) ;
diff --git a/inc/StepToGeom_MakeBSplineSurface.hxx b/inc/StepToGeom_MakeBSplineSurface.hxx
index 7ce0f63..5942dfc 100644
--- a/inc/StepToGeom_MakeBSplineSurface.hxx
+++ b/inc/StepToGeom_MakeBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_BSplineSurface;
 class StepToGeom_MakeBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_BSplineSurface)& SS,Handle(Geom_BSplineSurface)& CS) ;
diff --git a/inc/StepToGeom_MakeBoundedCurve.hxx b/inc/StepToGeom_MakeBoundedCurve.hxx
index 14c9b74..d3cc1f8 100644
--- a/inc/StepToGeom_MakeBoundedCurve.hxx
+++ b/inc/StepToGeom_MakeBoundedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom_BoundedCurve;
 class StepToGeom_MakeBoundedCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_BoundedCurve)& SC,Handle(Geom_BoundedCurve)& CC) ;
diff --git a/inc/StepToGeom_MakeBoundedCurve2d.hxx b/inc/StepToGeom_MakeBoundedCurve2d.hxx
index 9ff1e6c..5ef5ba9 100644
--- a/inc/StepToGeom_MakeBoundedCurve2d.hxx
+++ b/inc/StepToGeom_MakeBoundedCurve2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom2d_BoundedCurve;
 class StepToGeom_MakeBoundedCurve2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_BoundedCurve)& SC,Handle(Geom2d_BoundedCurve)& CC) ;
diff --git a/inc/StepToGeom_MakeBoundedSurface.hxx b/inc/StepToGeom_MakeBoundedSurface.hxx
index 6006e85..99b5c97 100644
--- a/inc/StepToGeom_MakeBoundedSurface.hxx
+++ b/inc/StepToGeom_MakeBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Geom_BoundedSurface;
 class StepToGeom_MakeBoundedSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_BoundedSurface)& SS,Handle(Geom_BoundedSurface)& CS) ;
diff --git a/inc/StepToGeom_MakeCartesianPoint.hxx b/inc/StepToGeom_MakeCartesianPoint.hxx
index 514e3d5..9dcdeaf 100644
--- a/inc/StepToGeom_MakeCartesianPoint.hxx
+++ b/inc/StepToGeom_MakeCartesianPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_CartesianPoint;
 class StepToGeom_MakeCartesianPoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_CartesianPoint)& SP,Handle(Geom_CartesianPoint)& CP) ;
diff --git a/inc/StepToGeom_MakeCartesianPoint2d.hxx b/inc/StepToGeom_MakeCartesianPoint2d.hxx
index 0aad7ae..bf5acdd 100644
--- a/inc/StepToGeom_MakeCartesianPoint2d.hxx
+++ b/inc/StepToGeom_MakeCartesianPoint2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom2d_CartesianPoint;
 class StepToGeom_MakeCartesianPoint2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_CartesianPoint)& SP,Handle(Geom2d_CartesianPoint)& CP) ;
diff --git a/inc/StepToGeom_MakeCircle.hxx b/inc/StepToGeom_MakeCircle.hxx
index 03c5a10..575aba7 100644
--- a/inc/StepToGeom_MakeCircle.hxx
+++ b/inc/StepToGeom_MakeCircle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_Circle;
 class StepToGeom_MakeCircle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Circle)& SC,Handle(Geom_Circle)& CC) ;
diff --git a/inc/StepToGeom_MakeCircle2d.hxx b/inc/StepToGeom_MakeCircle2d.hxx
index ff59a56..f69c037 100644
--- a/inc/StepToGeom_MakeCircle2d.hxx
+++ b/inc/StepToGeom_MakeCircle2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom2d_Circle;
 class StepToGeom_MakeCircle2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Circle)& SC,Handle(Geom2d_Circle)& CC) ;
diff --git a/inc/StepToGeom_MakeConic.hxx b/inc/StepToGeom_MakeConic.hxx
index 8cfdfde..a07df43 100644
--- a/inc/StepToGeom_MakeConic.hxx
+++ b/inc/StepToGeom_MakeConic.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_Conic;
 class StepToGeom_MakeConic  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Conic)& SC,Handle(Geom_Conic)& CC) ;
diff --git a/inc/StepToGeom_MakeConic2d.hxx b/inc/StepToGeom_MakeConic2d.hxx
index aea172b..99022ab 100644
--- a/inc/StepToGeom_MakeConic2d.hxx
+++ b/inc/StepToGeom_MakeConic2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom2d_Conic;
 class StepToGeom_MakeConic2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Conic)& SC,Handle(Geom2d_Conic)& CC) ;
diff --git a/inc/StepToGeom_MakeConicalSurface.hxx b/inc/StepToGeom_MakeConicalSurface.hxx
index c4ff234..e2c6707 100644
--- a/inc/StepToGeom_MakeConicalSurface.hxx
+++ b/inc/StepToGeom_MakeConicalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_ConicalSurface;
 class StepToGeom_MakeConicalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_ConicalSurface)& SS,Handle(Geom_ConicalSurface)& CS) ;
diff --git a/inc/StepToGeom_MakeCurve.hxx b/inc/StepToGeom_MakeCurve.hxx
index 4f1397f..0a97fbe 100644
--- a/inc/StepToGeom_MakeCurve.hxx
+++ b/inc/StepToGeom_MakeCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_Curve;
 class StepToGeom_MakeCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Curve)& SC,Handle(Geom_Curve)& CC) ;
diff --git a/inc/StepToGeom_MakeCurve2d.hxx b/inc/StepToGeom_MakeCurve2d.hxx
index 29e8346..c4fd124 100644
--- a/inc/StepToGeom_MakeCurve2d.hxx
+++ b/inc/StepToGeom_MakeCurve2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom2d_Curve;
 class StepToGeom_MakeCurve2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Curve)& SC,Handle(Geom2d_Curve)& CC) ;
diff --git a/inc/StepToGeom_MakeCylindricalSurface.hxx b/inc/StepToGeom_MakeCylindricalSurface.hxx
index b7d4fec..8302cc4 100644
--- a/inc/StepToGeom_MakeCylindricalSurface.hxx
+++ b/inc/StepToGeom_MakeCylindricalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Geom_CylindricalSurface;
 class StepToGeom_MakeCylindricalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_CylindricalSurface)& SS,Handle(Geom_CylindricalSurface)& CS) ;
diff --git a/inc/StepToGeom_MakeDirection.hxx b/inc/StepToGeom_MakeDirection.hxx
index 5273a8d..14b7366 100644
--- a/inc/StepToGeom_MakeDirection.hxx
+++ b/inc/StepToGeom_MakeDirection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_Direction;
 class StepToGeom_MakeDirection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Direction)& SD,Handle(Geom_Direction)& CD) ;
diff --git a/inc/StepToGeom_MakeDirection2d.hxx b/inc/StepToGeom_MakeDirection2d.hxx
index de9a7d3..e0c162f 100644
--- a/inc/StepToGeom_MakeDirection2d.hxx
+++ b/inc/StepToGeom_MakeDirection2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom2d_Direction;
 class StepToGeom_MakeDirection2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Direction)& SD,Handle(Geom2d_Direction)& CD) ;
diff --git a/inc/StepToGeom_MakeElementarySurface.hxx b/inc/StepToGeom_MakeElementarySurface.hxx
index ac48535..7036ce2 100644
--- a/inc/StepToGeom_MakeElementarySurface.hxx
+++ b/inc/StepToGeom_MakeElementarySurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_ElementarySurface;
 class StepToGeom_MakeElementarySurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_ElementarySurface)& SS,Handle(Geom_ElementarySurface)& CS) ;
diff --git a/inc/StepToGeom_MakeEllipse.hxx b/inc/StepToGeom_MakeEllipse.hxx
index b9993ec..d0d445a 100644
--- a/inc/StepToGeom_MakeEllipse.hxx
+++ b/inc/StepToGeom_MakeEllipse.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_Ellipse;
 class StepToGeom_MakeEllipse  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Ellipse)& SC,Handle(Geom_Ellipse)& CC) ;
diff --git a/inc/StepToGeom_MakeEllipse2d.hxx b/inc/StepToGeom_MakeEllipse2d.hxx
index 8de1f0b..3669574 100644
--- a/inc/StepToGeom_MakeEllipse2d.hxx
+++ b/inc/StepToGeom_MakeEllipse2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom2d_Ellipse;
 class StepToGeom_MakeEllipse2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Ellipse)& SC,Handle(Geom2d_Ellipse)& CC) ;
diff --git a/inc/StepToGeom_MakeHyperbola.hxx b/inc/StepToGeom_MakeHyperbola.hxx
index 258ec1c..5128690 100644
--- a/inc/StepToGeom_MakeHyperbola.hxx
+++ b/inc/StepToGeom_MakeHyperbola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_Hyperbola;
 class StepToGeom_MakeHyperbola  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Hyperbola)& SC,Handle(Geom_Hyperbola)& CC) ;
diff --git a/inc/StepToGeom_MakeHyperbola2d.hxx b/inc/StepToGeom_MakeHyperbola2d.hxx
index f9184df..c478c47 100644
--- a/inc/StepToGeom_MakeHyperbola2d.hxx
+++ b/inc/StepToGeom_MakeHyperbola2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom2d_Hyperbola;
 class StepToGeom_MakeHyperbola2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Hyperbola)& SC,Handle(Geom2d_Hyperbola)& CC) ;
diff --git a/inc/StepToGeom_MakeLine.hxx b/inc/StepToGeom_MakeLine.hxx
index dfd722a..5bd8524 100644
--- a/inc/StepToGeom_MakeLine.hxx
+++ b/inc/StepToGeom_MakeLine.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_Line;
 class StepToGeom_MakeLine  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Line)& SC,Handle(Geom_Line)& CC) ;
diff --git a/inc/StepToGeom_MakeLine2d.hxx b/inc/StepToGeom_MakeLine2d.hxx
index 1aca7e6..fd238a6 100644
--- a/inc/StepToGeom_MakeLine2d.hxx
+++ b/inc/StepToGeom_MakeLine2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom2d_Line;
 class StepToGeom_MakeLine2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Line)& SC,Handle(Geom2d_Line)& CC) ;
diff --git a/inc/StepToGeom_MakeParabola.hxx b/inc/StepToGeom_MakeParabola.hxx
index 3327c47..2ef12c9 100644
--- a/inc/StepToGeom_MakeParabola.hxx
+++ b/inc/StepToGeom_MakeParabola.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_Parabola;
 class StepToGeom_MakeParabola  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Parabola)& SC,Handle(Geom_Parabola)& CC) ;
diff --git a/inc/StepToGeom_MakeParabola2d.hxx b/inc/StepToGeom_MakeParabola2d.hxx
index ed4d845..6def68f 100644
--- a/inc/StepToGeom_MakeParabola2d.hxx
+++ b/inc/StepToGeom_MakeParabola2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom2d_Parabola;
 class StepToGeom_MakeParabola2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Parabola)& SC,Handle(Geom2d_Parabola)& CC) ;
diff --git a/inc/StepToGeom_MakePlane.hxx b/inc/StepToGeom_MakePlane.hxx
index a36a9a9..ae08118 100644
--- a/inc/StepToGeom_MakePlane.hxx
+++ b/inc/StepToGeom_MakePlane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_Plane;
 class StepToGeom_MakePlane  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Plane)& SP,Handle(Geom_Plane)& CP) ;
diff --git a/inc/StepToGeom_MakePolyline.hxx b/inc/StepToGeom_MakePolyline.hxx
index 0301c89..56a07ad 100644
--- a/inc/StepToGeom_MakePolyline.hxx
+++ b/inc/StepToGeom_MakePolyline.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_BSplineCurve;
 class StepToGeom_MakePolyline  : public StepToGeom_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Polyline)& SPL,Handle(Geom_BSplineCurve)& CC) ;
diff --git a/inc/StepToGeom_MakePolyline2d.hxx b/inc/StepToGeom_MakePolyline2d.hxx
index fa46c09..3ab081e 100644
--- a/inc/StepToGeom_MakePolyline2d.hxx
+++ b/inc/StepToGeom_MakePolyline2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Geom2d_BSplineCurve;
 class StepToGeom_MakePolyline2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Polyline)& SPL,Handle(Geom2d_BSplineCurve)& CC) ;
diff --git a/inc/StepToGeom_MakeRectangularTrimmedSurface.hxx b/inc/StepToGeom_MakeRectangularTrimmedSurface.hxx
index 0bfe972..8e854f4 100644
--- a/inc/StepToGeom_MakeRectangularTrimmedSurface.hxx
+++ b/inc/StepToGeom_MakeRectangularTrimmedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_RectangularTrimmedSurface;
 class StepToGeom_MakeRectangularTrimmedSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_RectangularTrimmedSurface)& SS,Handle(Geom_RectangularTrimmedSurface)& CS) ;
diff --git a/inc/StepToGeom_MakeSphericalSurface.hxx b/inc/StepToGeom_MakeSphericalSurface.hxx
index ddea13b..5ab21ae 100644
--- a/inc/StepToGeom_MakeSphericalSurface.hxx
+++ b/inc/StepToGeom_MakeSphericalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_SphericalSurface;
 class StepToGeom_MakeSphericalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_SphericalSurface)& Surf,Handle(Geom_SphericalSurface)& CS) ;
diff --git a/inc/StepToGeom_MakeSurface.hxx b/inc/StepToGeom_MakeSurface.hxx
index 98b7a28..d1ed315 100644
--- a/inc/StepToGeom_MakeSurface.hxx
+++ b/inc/StepToGeom_MakeSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_Surface;
 class StepToGeom_MakeSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Surface)& SS,Handle(Geom_Surface)& CS) ;
diff --git a/inc/StepToGeom_MakeSurfaceOfLinearExtrusion.hxx b/inc/StepToGeom_MakeSurfaceOfLinearExtrusion.hxx
index 2517123..b12249e 100644
--- a/inc/StepToGeom_MakeSurfaceOfLinearExtrusion.hxx
+++ b/inc/StepToGeom_MakeSurfaceOfLinearExtrusion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Geom_SurfaceOfLinearExtrusion;
 class StepToGeom_MakeSurfaceOfLinearExtrusion  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_SurfaceOfLinearExtrusion)& SS,Handle(Geom_SurfaceOfLinearExtrusion)& CS) ;
diff --git a/inc/StepToGeom_MakeSurfaceOfRevolution.hxx b/inc/StepToGeom_MakeSurfaceOfRevolution.hxx
index 0541d79..357f2b5 100644
--- a/inc/StepToGeom_MakeSurfaceOfRevolution.hxx
+++ b/inc/StepToGeom_MakeSurfaceOfRevolution.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Geom_SurfaceOfRevolution;
 class StepToGeom_MakeSurfaceOfRevolution  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_SurfaceOfRevolution)& SS,Handle(Geom_SurfaceOfRevolution)& CS) ;
diff --git a/inc/StepToGeom_MakeSweptSurface.hxx b/inc/StepToGeom_MakeSweptSurface.hxx
index b4c9e8d..59433e7 100644
--- a/inc/StepToGeom_MakeSweptSurface.hxx
+++ b/inc/StepToGeom_MakeSweptSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Geom_SweptSurface;
 class StepToGeom_MakeSweptSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_SweptSurface)& SS,Handle(Geom_SweptSurface)& CS) ;
diff --git a/inc/StepToGeom_MakeToroidalSurface.hxx b/inc/StepToGeom_MakeToroidalSurface.hxx
index 942df10..f9e1d8d 100644
--- a/inc/StepToGeom_MakeToroidalSurface.hxx
+++ b/inc/StepToGeom_MakeToroidalSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_ToroidalSurface;
 class StepToGeom_MakeToroidalSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_ToroidalSurface)& SS,Handle(Geom_ToroidalSurface)& CS) ;
diff --git a/inc/StepToGeom_MakeTransformation2d.hxx b/inc/StepToGeom_MakeTransformation2d.hxx
index 396b420..a03ecac 100644
--- a/inc/StepToGeom_MakeTransformation2d.hxx
+++ b/inc/StepToGeom_MakeTransformation2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class gp_Trsf2d;
 class StepToGeom_MakeTransformation2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_CartesianTransformationOperator2d)& SCTO,gp_Trsf2d& CT) ;
diff --git a/inc/StepToGeom_MakeTransformation3d.hxx b/inc/StepToGeom_MakeTransformation3d.hxx
index 2fd9436..fc9980b 100644
--- a/inc/StepToGeom_MakeTransformation3d.hxx
+++ b/inc/StepToGeom_MakeTransformation3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class gp_Trsf;
 class StepToGeom_MakeTransformation3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_CartesianTransformationOperator3d)& SCTO,gp_Trsf& CT) ;
diff --git a/inc/StepToGeom_MakeTrimmedCurve.hxx b/inc/StepToGeom_MakeTrimmedCurve.hxx
index b29392d..64ee52b 100644
--- a/inc/StepToGeom_MakeTrimmedCurve.hxx
+++ b/inc/StepToGeom_MakeTrimmedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Geom_TrimmedCurve;
 class StepToGeom_MakeTrimmedCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_TrimmedCurve)& SC,Handle(Geom_TrimmedCurve)& CC) ;
diff --git a/inc/StepToGeom_MakeTrimmedCurve2d.hxx b/inc/StepToGeom_MakeTrimmedCurve2d.hxx
index 6e2068d..0b63ff6 100644
--- a/inc/StepToGeom_MakeTrimmedCurve2d.hxx
+++ b/inc/StepToGeom_MakeTrimmedCurve2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Geom2d_BSplineCurve;
 class StepToGeom_MakeTrimmedCurve2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_TrimmedCurve)& SC,Handle(Geom2d_BSplineCurve)& CC) ;
diff --git a/inc/StepToGeom_MakeVectorWithMagnitude.hxx b/inc/StepToGeom_MakeVectorWithMagnitude.hxx
index e632d1b..26f8ba5 100644
--- a/inc/StepToGeom_MakeVectorWithMagnitude.hxx
+++ b/inc/StepToGeom_MakeVectorWithMagnitude.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom_VectorWithMagnitude;
 class StepToGeom_MakeVectorWithMagnitude  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Vector)& SV,Handle(Geom_VectorWithMagnitude)& CV) ;
diff --git a/inc/StepToGeom_MakeVectorWithMagnitude2d.hxx b/inc/StepToGeom_MakeVectorWithMagnitude2d.hxx
index f5cf9e2..ad4c7f3 100644
--- a/inc/StepToGeom_MakeVectorWithMagnitude2d.hxx
+++ b/inc/StepToGeom_MakeVectorWithMagnitude2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Geom2d_VectorWithMagnitude;
 class StepToGeom_MakeVectorWithMagnitude2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Boolean Convert(const Handle(StepGeom_Vector)& SV,Handle(Geom2d_VectorWithMagnitude)& CV) ;
diff --git a/inc/StepToGeom_Root.hxx b/inc/StepToGeom_Root.hxx
index 8476e97..6dcafdc 100644
--- a/inc/StepToGeom_Root.hxx
+++ b/inc/StepToGeom_Root.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@
 class StepToGeom_Root  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT     Standard_Boolean IsDone() const;
diff --git a/inc/StepToTopoDS.hxx b/inc/StepToTopoDS.hxx
index 8004c35..ceff8a7 100644
--- a/inc/StepToTopoDS.hxx
+++ b/inc/StepToTopoDS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -85,18 +88,7 @@ class StepToTopoDS_DataMapIteratorOfPointVertexMap;
 class StepToTopoDS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_TCollection_HAsciiString DecodeBuilderError(const StepToTopoDS_BuilderError Error) ;
diff --git a/inc/StepToTopoDS_Builder.hxx b/inc/StepToTopoDS_Builder.hxx
index 6d3fc0f..2600aff 100644
--- a/inc/StepToTopoDS_Builder.hxx
+++ b/inc/StepToTopoDS_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class TopoDS_Shape;
 class StepToTopoDS_Builder  : public StepToTopoDS_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_Builder();
diff --git a/inc/StepToTopoDS_CartesianPointHasher.hxx b/inc/StepToTopoDS_CartesianPointHasher.hxx
index e6006f9..8a88867 100644
--- a/inc/StepToTopoDS_CartesianPointHasher.hxx
+++ b/inc/StepToTopoDS_CartesianPointHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class StepGeom_CartesianPoint;
 class StepToTopoDS_CartesianPointHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HasCode value  for  the  CartesianPoint <br>
   Standard_EXPORT   static  Standard_Integer HashCode(const Handle(StepGeom_CartesianPoint)& K,const Standard_Integer Upper) ;
diff --git a/inc/StepToTopoDS_DataMapIteratorOfDataMapOfRI.hxx b/inc/StepToTopoDS_DataMapIteratorOfDataMapOfRI.hxx
index 53997b4..ca50d76 100644
--- a/inc/StepToTopoDS_DataMapIteratorOfDataMapOfRI.hxx
+++ b/inc/StepToTopoDS_DataMapIteratorOfDataMapOfRI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class StepToTopoDS_DataMapNodeOfDataMapOfRI;
 class StepToTopoDS_DataMapIteratorOfDataMapOfRI  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_DataMapIteratorOfDataMapOfRI();
diff --git a/inc/StepToTopoDS_DataMapIteratorOfDataMapOfRINames.hxx b/inc/StepToTopoDS_DataMapIteratorOfDataMapOfRINames.hxx
index 16309f2..ba60db9 100644
--- a/inc/StepToTopoDS_DataMapIteratorOfDataMapOfRINames.hxx
+++ b/inc/StepToTopoDS_DataMapIteratorOfDataMapOfRINames.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class StepToTopoDS_DataMapNodeOfDataMapOfRINames;
 class StepToTopoDS_DataMapIteratorOfDataMapOfRINames  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_DataMapIteratorOfDataMapOfRINames();
diff --git a/inc/StepToTopoDS_DataMapIteratorOfDataMapOfTRI.hxx b/inc/StepToTopoDS_DataMapIteratorOfDataMapOfTRI.hxx
index 88accc8..e3b2dce 100644
--- a/inc/StepToTopoDS_DataMapIteratorOfDataMapOfTRI.hxx
+++ b/inc/StepToTopoDS_DataMapIteratorOfDataMapOfTRI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class StepToTopoDS_DataMapNodeOfDataMapOfTRI;
 class StepToTopoDS_DataMapIteratorOfDataMapOfTRI  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_DataMapIteratorOfDataMapOfTRI();
diff --git a/inc/StepToTopoDS_DataMapIteratorOfPointEdgeMap.hxx b/inc/StepToTopoDS_DataMapIteratorOfPointEdgeMap.hxx
index f82b918..1a0a39c 100644
--- a/inc/StepToTopoDS_DataMapIteratorOfPointEdgeMap.hxx
+++ b/inc/StepToTopoDS_DataMapIteratorOfPointEdgeMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class StepToTopoDS_DataMapNodeOfPointEdgeMap;
 class StepToTopoDS_DataMapIteratorOfPointEdgeMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_DataMapIteratorOfPointEdgeMap();
diff --git a/inc/StepToTopoDS_DataMapIteratorOfPointVertexMap.hxx b/inc/StepToTopoDS_DataMapIteratorOfPointVertexMap.hxx
index 1b57afb..ba43c2c 100644
--- a/inc/StepToTopoDS_DataMapIteratorOfPointVertexMap.hxx
+++ b/inc/StepToTopoDS_DataMapIteratorOfPointVertexMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class StepToTopoDS_DataMapNodeOfPointVertexMap;
 class StepToTopoDS_DataMapIteratorOfPointVertexMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_DataMapIteratorOfPointVertexMap();
diff --git a/inc/StepToTopoDS_DataMapOfRI.hxx b/inc/StepToTopoDS_DataMapOfRI.hxx
index 2d8a63a..bef9665 100644
--- a/inc/StepToTopoDS_DataMapOfRI.hxx
+++ b/inc/StepToTopoDS_DataMapOfRI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class StepToTopoDS_DataMapIteratorOfDataMapOfRI;
 class StepToTopoDS_DataMapOfRI  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_DataMapOfRI(const Standard_Integer NbBuckets = 1);
diff --git a/inc/StepToTopoDS_DataMapOfRINames.hxx b/inc/StepToTopoDS_DataMapOfRINames.hxx
index 3bc2f39..61a4da6 100644
--- a/inc/StepToTopoDS_DataMapOfRINames.hxx
+++ b/inc/StepToTopoDS_DataMapOfRINames.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class StepToTopoDS_DataMapIteratorOfDataMapOfRINames;
 class StepToTopoDS_DataMapOfRINames  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_DataMapOfRINames(const Standard_Integer NbBuckets = 1);
diff --git a/inc/StepToTopoDS_DataMapOfTRI.hxx b/inc/StepToTopoDS_DataMapOfTRI.hxx
index 3125156..8034969 100644
--- a/inc/StepToTopoDS_DataMapOfTRI.hxx
+++ b/inc/StepToTopoDS_DataMapOfTRI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class StepToTopoDS_DataMapIteratorOfDataMapOfTRI;
 class StepToTopoDS_DataMapOfTRI  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_DataMapOfTRI(const Standard_Integer NbBuckets = 1);
diff --git a/inc/StepToTopoDS_GeometricTool.hxx b/inc/StepToTopoDS_GeometricTool.hxx
index b1a78bc..206cc7d 100644
--- a/inc/StepToTopoDS_GeometricTool.hxx
+++ b/inc/StepToTopoDS_GeometricTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class Geom_Curve;
 class StepToTopoDS_GeometricTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer PCurve(const Handle(StepGeom_SurfaceCurve)& SC,const Handle(StepGeom_Surface)& S,Handle(StepGeom_Pcurve)& PC,const Standard_Integer last = 0) ;
diff --git a/inc/StepToTopoDS_MakeTransformed.hxx b/inc/StepToTopoDS_MakeTransformed.hxx
index cdea0ae..73449e0 100644
--- a/inc/StepToTopoDS_MakeTransformed.hxx
+++ b/inc/StepToTopoDS_MakeTransformed.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class Transfer_TransientProcess;
 class StepToTopoDS_MakeTransformed  : public StepToTopoDS_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_MakeTransformed();
diff --git a/inc/StepToTopoDS_NMTool.hxx b/inc/StepToTopoDS_NMTool.hxx
index 9a90a90..d4c6cfd 100644
--- a/inc/StepToTopoDS_NMTool.hxx
+++ b/inc/StepToTopoDS_NMTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopoDS_Shape;
 class StepToTopoDS_NMTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_NMTool();
diff --git a/inc/StepToTopoDS_PointEdgeMap.hxx b/inc/StepToTopoDS_PointEdgeMap.hxx
index 861d9e2..ac332ad 100644
--- a/inc/StepToTopoDS_PointEdgeMap.hxx
+++ b/inc/StepToTopoDS_PointEdgeMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepToTopoDS_DataMapIteratorOfPointEdgeMap;
 class StepToTopoDS_PointEdgeMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_PointEdgeMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/StepToTopoDS_PointPair.hxx b/inc/StepToTopoDS_PointPair.hxx
index 4c05397..da26014 100644
--- a/inc/StepToTopoDS_PointPair.hxx
+++ b/inc/StepToTopoDS_PointPair.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class StepToTopoDS_PointPairHasher;
 class StepToTopoDS_PointPair  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_PointPair(const Handle(StepGeom_CartesianPoint)& P1,const Handle(StepGeom_CartesianPoint)& P2);
diff --git a/inc/StepToTopoDS_PointPairHasher.hxx b/inc/StepToTopoDS_PointPairHasher.hxx
index 4ab5150..4cc6e69 100644
--- a/inc/StepToTopoDS_PointPairHasher.hxx
+++ b/inc/StepToTopoDS_PointPairHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class StepToTopoDS_PointPair;
 class StepToTopoDS_PointPairHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HasCode value  for  the  PointPair <br>
   Standard_EXPORT   static  Standard_Integer HashCode(const StepToTopoDS_PointPair& K,const Standard_Integer Upper) ;
diff --git a/inc/StepToTopoDS_PointVertexMap.hxx b/inc/StepToTopoDS_PointVertexMap.hxx
index b466c3b..19da17e 100644
--- a/inc/StepToTopoDS_PointVertexMap.hxx
+++ b/inc/StepToTopoDS_PointVertexMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class StepToTopoDS_DataMapIteratorOfPointVertexMap;
 class StepToTopoDS_PointVertexMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_PointVertexMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/StepToTopoDS_Root.hxx b/inc/StepToTopoDS_Root.hxx
index a3270fc..b8428bd 100644
--- a/inc/StepToTopoDS_Root.hxx
+++ b/inc/StepToTopoDS_Root.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@
 class StepToTopoDS_Root  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
         Standard_Boolean IsDone() const;
diff --git a/inc/StepToTopoDS_Tool.hxx b/inc/StepToTopoDS_Tool.hxx
index 8aa90fe..a06d89e 100644
--- a/inc/StepToTopoDS_Tool.hxx
+++ b/inc/StepToTopoDS_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class Geom2d_Curve;
 class StepToTopoDS_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_Tool();
diff --git a/inc/StepToTopoDS_TranslateCompositeCurve.hxx b/inc/StepToTopoDS_TranslateCompositeCurve.hxx
index 9cf714e..c8d8e8d 100644
--- a/inc/StepToTopoDS_TranslateCompositeCurve.hxx
+++ b/inc/StepToTopoDS_TranslateCompositeCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class TopoDS_Wire;
 class StepToTopoDS_TranslateCompositeCurve  : public StepToTopoDS_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty constructor <br>
   Standard_EXPORT   StepToTopoDS_TranslateCompositeCurve();
diff --git a/inc/StepToTopoDS_TranslateCurveBoundedSurface.hxx b/inc/StepToTopoDS_TranslateCurveBoundedSurface.hxx
index a279424..ab5d264 100644
--- a/inc/StepToTopoDS_TranslateCurveBoundedSurface.hxx
+++ b/inc/StepToTopoDS_TranslateCurveBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TopoDS_Face;
 class StepToTopoDS_TranslateCurveBoundedSurface  : public StepToTopoDS_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create empty tool <br>
   Standard_EXPORT   StepToTopoDS_TranslateCurveBoundedSurface();
diff --git a/inc/StepToTopoDS_TranslateEdge.hxx b/inc/StepToTopoDS_TranslateEdge.hxx
index b2c59a7..3993bef 100644
--- a/inc/StepToTopoDS_TranslateEdge.hxx
+++ b/inc/StepToTopoDS_TranslateEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class TopoDS_Shape;
 class StepToTopoDS_TranslateEdge  : public StepToTopoDS_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_TranslateEdge();
diff --git a/inc/StepToTopoDS_TranslateEdgeLoop.hxx b/inc/StepToTopoDS_TranslateEdgeLoop.hxx
index 05ef363..e11be11 100644
--- a/inc/StepToTopoDS_TranslateEdgeLoop.hxx
+++ b/inc/StepToTopoDS_TranslateEdgeLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TopoDS_Shape;
 class StepToTopoDS_TranslateEdgeLoop  : public StepToTopoDS_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_TranslateEdgeLoop();
diff --git a/inc/StepToTopoDS_TranslateFace.hxx b/inc/StepToTopoDS_TranslateFace.hxx
index 69553e4..bb7e9c0 100644
--- a/inc/StepToTopoDS_TranslateFace.hxx
+++ b/inc/StepToTopoDS_TranslateFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TopoDS_Shape;
 class StepToTopoDS_TranslateFace  : public StepToTopoDS_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_TranslateFace();
diff --git a/inc/StepToTopoDS_TranslatePolyLoop.hxx b/inc/StepToTopoDS_TranslatePolyLoop.hxx
index ced0c29..d122547 100644
--- a/inc/StepToTopoDS_TranslatePolyLoop.hxx
+++ b/inc/StepToTopoDS_TranslatePolyLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopoDS_Shape;
 class StepToTopoDS_TranslatePolyLoop  : public StepToTopoDS_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_TranslatePolyLoop();
diff --git a/inc/StepToTopoDS_TranslateShell.hxx b/inc/StepToTopoDS_TranslateShell.hxx
index ac1cf87..fd3970d 100644
--- a/inc/StepToTopoDS_TranslateShell.hxx
+++ b/inc/StepToTopoDS_TranslateShell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TopoDS_Shape;
 class StepToTopoDS_TranslateShell  : public StepToTopoDS_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_TranslateShell();
diff --git a/inc/StepToTopoDS_TranslateVertex.hxx b/inc/StepToTopoDS_TranslateVertex.hxx
index a144bff..549653c 100644
--- a/inc/StepToTopoDS_TranslateVertex.hxx
+++ b/inc/StepToTopoDS_TranslateVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TopoDS_Shape;
 class StepToTopoDS_TranslateVertex  : public StepToTopoDS_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_TranslateVertex();
diff --git a/inc/StepToTopoDS_TranslateVertexLoop.hxx b/inc/StepToTopoDS_TranslateVertexLoop.hxx
index cd36588..d79c296 100644
--- a/inc/StepToTopoDS_TranslateVertexLoop.hxx
+++ b/inc/StepToTopoDS_TranslateVertexLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TopoDS_Shape;
 class StepToTopoDS_TranslateVertexLoop  : public StepToTopoDS_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepToTopoDS_TranslateVertexLoop();
diff --git a/inc/StepVisual_AreaOrView.hxx b/inc/StepVisual_AreaOrView.hxx
index 121be8c..30a7cc2 100644
--- a/inc/StepVisual_AreaOrView.hxx
+++ b/inc/StepVisual_AreaOrView.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepVisual_PresentationView;
 class StepVisual_AreaOrView  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a AreaOrView SelectType <br>
   Standard_EXPORT   StepVisual_AreaOrView();
diff --git a/inc/StepVisual_Array1OfBoxCharacteristicSelect.hxx b/inc/StepVisual_Array1OfBoxCharacteristicSelect.hxx
index 3d25148..1355e87 100644
--- a/inc/StepVisual_Array1OfBoxCharacteristicSelect.hxx
+++ b/inc/StepVisual_Array1OfBoxCharacteristicSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepVisual_BoxCharacteristicSelect;
 class StepVisual_Array1OfBoxCharacteristicSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_Array1OfBoxCharacteristicSelect(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepVisual_Array1OfCurveStyleFontPattern.hxx b/inc/StepVisual_Array1OfCurveStyleFontPattern.hxx
index b99e961..7ce8733 100644
--- a/inc/StepVisual_Array1OfCurveStyleFontPattern.hxx
+++ b/inc/StepVisual_Array1OfCurveStyleFontPattern.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepVisual_CurveStyleFontPattern;
 class StepVisual_Array1OfCurveStyleFontPattern  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_Array1OfCurveStyleFontPattern(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepVisual_Array1OfDirectionCountSelect.hxx b/inc/StepVisual_Array1OfDirectionCountSelect.hxx
index cb6040c..35a721f 100644
--- a/inc/StepVisual_Array1OfDirectionCountSelect.hxx
+++ b/inc/StepVisual_Array1OfDirectionCountSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepVisual_DirectionCountSelect;
 class StepVisual_Array1OfDirectionCountSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_Array1OfDirectionCountSelect(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepVisual_Array1OfFillStyleSelect.hxx b/inc/StepVisual_Array1OfFillStyleSelect.hxx
index a67618f..9adca8b 100644
--- a/inc/StepVisual_Array1OfFillStyleSelect.hxx
+++ b/inc/StepVisual_Array1OfFillStyleSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepVisual_FillStyleSelect;
 class StepVisual_Array1OfFillStyleSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_Array1OfFillStyleSelect(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepVisual_Array1OfInvisibleItem.hxx b/inc/StepVisual_Array1OfInvisibleItem.hxx
index 4e8422b..f02503c 100644
--- a/inc/StepVisual_Array1OfInvisibleItem.hxx
+++ b/inc/StepVisual_Array1OfInvisibleItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepVisual_InvisibleItem;
 class StepVisual_Array1OfInvisibleItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_Array1OfInvisibleItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepVisual_Array1OfLayeredItem.hxx b/inc/StepVisual_Array1OfLayeredItem.hxx
index fdc9447..0ac65c4 100644
--- a/inc/StepVisual_Array1OfLayeredItem.hxx
+++ b/inc/StepVisual_Array1OfLayeredItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepVisual_LayeredItem;
 class StepVisual_Array1OfLayeredItem  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_Array1OfLayeredItem(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepVisual_Array1OfPresentationStyleAssignment.hxx b/inc/StepVisual_Array1OfPresentationStyleAssignment.hxx
index 8ed47be..cda4b8d 100644
--- a/inc/StepVisual_Array1OfPresentationStyleAssignment.hxx
+++ b/inc/StepVisual_Array1OfPresentationStyleAssignment.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StepVisual_PresentationStyleAssignment;
 class StepVisual_Array1OfPresentationStyleAssignment  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_Array1OfPresentationStyleAssignment(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepVisual_Array1OfPresentationStyleSelect.hxx b/inc/StepVisual_Array1OfPresentationStyleSelect.hxx
index 2563faf..5870ce0 100644
--- a/inc/StepVisual_Array1OfPresentationStyleSelect.hxx
+++ b/inc/StepVisual_Array1OfPresentationStyleSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepVisual_PresentationStyleSelect;
 class StepVisual_Array1OfPresentationStyleSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_Array1OfPresentationStyleSelect(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepVisual_Array1OfStyleContextSelect.hxx b/inc/StepVisual_Array1OfStyleContextSelect.hxx
index 72b7665..b31903f 100644
--- a/inc/StepVisual_Array1OfStyleContextSelect.hxx
+++ b/inc/StepVisual_Array1OfStyleContextSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepVisual_StyleContextSelect;
 class StepVisual_Array1OfStyleContextSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_Array1OfStyleContextSelect(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepVisual_Array1OfSurfaceStyleElementSelect.hxx b/inc/StepVisual_Array1OfSurfaceStyleElementSelect.hxx
index 2ca6c23..b4956cc 100644
--- a/inc/StepVisual_Array1OfSurfaceStyleElementSelect.hxx
+++ b/inc/StepVisual_Array1OfSurfaceStyleElementSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepVisual_SurfaceStyleElementSelect;
 class StepVisual_Array1OfSurfaceStyleElementSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_Array1OfSurfaceStyleElementSelect(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepVisual_Array1OfTextOrCharacter.hxx b/inc/StepVisual_Array1OfTextOrCharacter.hxx
index 8fc36c1..4516883 100644
--- a/inc/StepVisual_Array1OfTextOrCharacter.hxx
+++ b/inc/StepVisual_Array1OfTextOrCharacter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepVisual_TextOrCharacter;
 class StepVisual_Array1OfTextOrCharacter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_Array1OfTextOrCharacter(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/StepVisual_BoxCharacteristicSelect.hxx b/inc/StepVisual_BoxCharacteristicSelect.hxx
index eead3d5..505d835 100644
--- a/inc/StepVisual_BoxCharacteristicSelect.hxx
+++ b/inc/StepVisual_BoxCharacteristicSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class StepVisual_BoxCharacteristicSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_BoxCharacteristicSelect();
diff --git a/inc/StepVisual_CurveStyleFontSelect.hxx b/inc/StepVisual_CurveStyleFontSelect.hxx
index a2c6c22..e0c637b 100644
--- a/inc/StepVisual_CurveStyleFontSelect.hxx
+++ b/inc/StepVisual_CurveStyleFontSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepVisual_ExternallyDefinedCurveFont;
 class StepVisual_CurveStyleFontSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a CurveStyleFontSelect SelectType <br>
   Standard_EXPORT   StepVisual_CurveStyleFontSelect();
diff --git a/inc/StepVisual_DirectionCountSelect.hxx b/inc/StepVisual_DirectionCountSelect.hxx
index 101b199..495060e 100644
--- a/inc/StepVisual_DirectionCountSelect.hxx
+++ b/inc/StepVisual_DirectionCountSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@
 class StepVisual_DirectionCountSelect  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StepVisual_DirectionCountSelect();
diff --git a/inc/StepVisual_FillStyleSelect.hxx b/inc/StepVisual_FillStyleSelect.hxx
index 47b0eb4..895c0ac 100644
--- a/inc/StepVisual_FillStyleSelect.hxx
+++ b/inc/StepVisual_FillStyleSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class StepVisual_FillAreaStyleColour;
 class StepVisual_FillStyleSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a FillStyleSelect SelectType <br>
   Standard_EXPORT   StepVisual_FillStyleSelect();
diff --git a/inc/StepVisual_FontSelect.hxx b/inc/StepVisual_FontSelect.hxx
index c830972..cf1c162 100644
--- a/inc/StepVisual_FontSelect.hxx
+++ b/inc/StepVisual_FontSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepVisual_ExternallyDefinedTextFont;
 class StepVisual_FontSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a FontSelect SelectType <br>
   Standard_EXPORT   StepVisual_FontSelect();
diff --git a/inc/StepVisual_InvisibilityContext.hxx b/inc/StepVisual_InvisibilityContext.hxx
index d2b2e77..cd7ebf3 100644
--- a/inc/StepVisual_InvisibilityContext.hxx
+++ b/inc/StepVisual_InvisibilityContext.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepVisual_PresentationSet;
 class StepVisual_InvisibilityContext  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a InvisibilityContext SelectType <br>
   Standard_EXPORT   StepVisual_InvisibilityContext();
diff --git a/inc/StepVisual_InvisibleItem.hxx b/inc/StepVisual_InvisibleItem.hxx
index 4c552bd..07f0f46 100644
--- a/inc/StepVisual_InvisibleItem.hxx
+++ b/inc/StepVisual_InvisibleItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepVisual_PresentationRepresentation;
 class StepVisual_InvisibleItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a InvisibleItem SelectType <br>
   Standard_EXPORT   StepVisual_InvisibleItem();
diff --git a/inc/StepVisual_LayeredItem.hxx b/inc/StepVisual_LayeredItem.hxx
index ba7b571..f421cd6 100644
--- a/inc/StepVisual_LayeredItem.hxx
+++ b/inc/StepVisual_LayeredItem.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepRepr_RepresentationItem;
 class StepVisual_LayeredItem  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a LayeredItem SelectType <br>
   Standard_EXPORT   StepVisual_LayeredItem();
diff --git a/inc/StepVisual_MarkerSelect.hxx b/inc/StepVisual_MarkerSelect.hxx
index 214d679..7d389af 100644
--- a/inc/StepVisual_MarkerSelect.hxx
+++ b/inc/StepVisual_MarkerSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepVisual_MarkerMember;
 class StepVisual_MarkerSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a MarkerSelect SelectType <br>
   Standard_EXPORT   StepVisual_MarkerSelect();
diff --git a/inc/StepVisual_PresentationRepresentationSelect.hxx b/inc/StepVisual_PresentationRepresentationSelect.hxx
index f1e8844..6abe3b9 100644
--- a/inc/StepVisual_PresentationRepresentationSelect.hxx
+++ b/inc/StepVisual_PresentationRepresentationSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StepVisual_PresentationSet;
 class StepVisual_PresentationRepresentationSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a PresentationRepresentationSelect SelectType <br>
   Standard_EXPORT   StepVisual_PresentationRepresentationSelect();
diff --git a/inc/StepVisual_PresentationSizeAssignmentSelect.hxx b/inc/StepVisual_PresentationSizeAssignmentSelect.hxx
index be82338..870b0d8 100644
--- a/inc/StepVisual_PresentationSizeAssignmentSelect.hxx
+++ b/inc/StepVisual_PresentationSizeAssignmentSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepVisual_AreaInSet;
 class StepVisual_PresentationSizeAssignmentSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a PresentationSizeAssignmentSelect SelectType <br>
   Standard_EXPORT   StepVisual_PresentationSizeAssignmentSelect();
diff --git a/inc/StepVisual_PresentationStyleSelect.hxx b/inc/StepVisual_PresentationStyleSelect.hxx
index b8e76d5..6070645 100644
--- a/inc/StepVisual_PresentationStyleSelect.hxx
+++ b/inc/StepVisual_PresentationStyleSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepVisual_SurfaceStyleUsage;
 class StepVisual_PresentationStyleSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a PresentationStyleSelect SelectType <br>
   Standard_EXPORT   StepVisual_PresentationStyleSelect();
diff --git a/inc/StepVisual_StyleContextSelect.hxx b/inc/StepVisual_StyleContextSelect.hxx
index caedbc3..f8e1fda 100644
--- a/inc/StepVisual_StyleContextSelect.hxx
+++ b/inc/StepVisual_StyleContextSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepVisual_PresentationSet;
 class StepVisual_StyleContextSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a StyleContextSelect SelectType <br>
   Standard_EXPORT   StepVisual_StyleContextSelect();
diff --git a/inc/StepVisual_SurfaceStyleElementSelect.hxx b/inc/StepVisual_SurfaceStyleElementSelect.hxx
index 3b92b7f..dbc7de4 100644
--- a/inc/StepVisual_SurfaceStyleElementSelect.hxx
+++ b/inc/StepVisual_SurfaceStyleElementSelect.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepVisual_SurfaceStyleParameterLine;
 class StepVisual_SurfaceStyleElementSelect  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a SurfaceStyleElementSelect SelectType <br>
   Standard_EXPORT   StepVisual_SurfaceStyleElementSelect();
diff --git a/inc/StepVisual_TextOrCharacter.hxx b/inc/StepVisual_TextOrCharacter.hxx
index c70d1ac..ea395ca 100644
--- a/inc/StepVisual_TextOrCharacter.hxx
+++ b/inc/StepVisual_TextOrCharacter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class StepVisual_TextLiteral;
 class StepVisual_TextOrCharacter  : public StepData_SelectType {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a TextOrCharacter SelectType <br>
   Standard_EXPORT   StepVisual_TextOrCharacter();
diff --git a/inc/StlAPI.hxx b/inc/StlAPI.hxx
index 92015b3..b0a5843 100644
--- a/inc/StlAPI.hxx
+++ b/inc/StlAPI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class StlAPI_Reader;
 class StlAPI  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Convert and write shape to STL format. <br>
 //!         file is written in binary if aAsciiMode is False <br>
diff --git a/inc/StlAPI_Reader.hxx b/inc/StlAPI_Reader.hxx
index bbfe4fd..9524eda 100644
--- a/inc/StlAPI_Reader.hxx
+++ b/inc/StlAPI_Reader.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@ class TopoDS_Shape;
 class StlAPI_Reader  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StlAPI_Reader();
diff --git a/inc/StlAPI_Writer.hxx b/inc/StlAPI_Writer.hxx
index 5e58990..ccfb1a6 100644
--- a/inc/StlAPI_Writer.hxx
+++ b/inc/StlAPI_Writer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopoDS_Shape;
 class StlAPI_Writer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a writer object with <br>
 //! default parameters: ASCIIMode, RelativeMode, SetCoefficent, <br>
diff --git a/inc/StlMesh.hxx b/inc/StlMesh.hxx
index 21927e6..7c78783 100644
--- a/inc/StlMesh.hxx
+++ b/inc/StlMesh.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StlMesh_SequenceNodeOfSequenceOfMesh;
 class StlMesh  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make a merge of two Mesh and returns a new Mesh. <br>
 //!          Very useful if you want to merge partMesh and CheckSurfaceMesh <br>
diff --git a/inc/StlMesh_MeshExplorer.hxx b/inc/StlMesh_MeshExplorer.hxx
index fcf5c00..078a418 100644
--- a/inc/StlMesh_MeshExplorer.hxx
+++ b/inc/StlMesh_MeshExplorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Standard_NoSuchObject;
 class StlMesh_MeshExplorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   StlMesh_MeshExplorer(const Handle(StlMesh_Mesh)& M);
diff --git a/inc/StlMesh_SequenceOfMesh.hxx b/inc/StlMesh_SequenceOfMesh.hxx
index ff07de2..042d4f9 100644
--- a/inc/StlMesh_SequenceOfMesh.hxx
+++ b/inc/StlMesh_SequenceOfMesh.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StlMesh_SequenceNodeOfSequenceOfMesh;
 class StlMesh_SequenceOfMesh  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StlMesh_SequenceOfMesh();
diff --git a/inc/StlMesh_SequenceOfMeshDomain.hxx b/inc/StlMesh_SequenceOfMeshDomain.hxx
index b019f61..d953224 100644
--- a/inc/StlMesh_SequenceOfMeshDomain.hxx
+++ b/inc/StlMesh_SequenceOfMeshDomain.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StlMesh_SequenceNodeOfSequenceOfMeshDomain;
 class StlMesh_SequenceOfMeshDomain  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StlMesh_SequenceOfMeshDomain();
diff --git a/inc/StlMesh_SequenceOfMeshTriangle.hxx b/inc/StlMesh_SequenceOfMeshTriangle.hxx
index b02364a..408c8df 100644
--- a/inc/StlMesh_SequenceOfMeshTriangle.hxx
+++ b/inc/StlMesh_SequenceOfMeshTriangle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class StlMesh_SequenceNodeOfSequenceOfMeshTriangle;
 class StlMesh_SequenceOfMeshTriangle  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       StlMesh_SequenceOfMeshTriangle();
diff --git a/inc/StlTransfer.hxx b/inc/StlTransfer.hxx
index 3546cdf..f01d1f2 100644
--- a/inc/StlTransfer.hxx
+++ b/inc/StlTransfer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class StlMesh_Mesh;
 class StlTransfer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void BuildIncrementalMesh(const TopoDS_Shape& Shape,const Standard_Real Deflection,const Standard_Boolean InParallel,const Handle(StlMesh_Mesh)& Mesh) ;
diff --git a/inc/Storage.hxx b/inc/Storage.hxx
index 03f30f9..356cb81 100644
--- a/inc/Storage.hxx
+++ b/inc/Storage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -74,18 +77,7 @@ class Storage_SequenceNodeOfSeqOfCallBack;
 class Storage  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns the version of Storage's read/write routines <br>
   Standard_EXPORT   static  TCollection_AsciiString Version() ;
diff --git a/inc/Storage_ArrayOfCallBack.hxx b/inc/Storage_ArrayOfCallBack.hxx
index 9434fd3..259c1c1 100644
--- a/inc/Storage_ArrayOfCallBack.hxx
+++ b/inc/Storage_ArrayOfCallBack.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Storage_CallBack;
 class Storage_ArrayOfCallBack  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Storage_ArrayOfCallBack(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Storage_ArrayOfSchema.hxx b/inc/Storage_ArrayOfSchema.hxx
index 989c5e4..2be4dd5 100644
--- a/inc/Storage_ArrayOfSchema.hxx
+++ b/inc/Storage_ArrayOfSchema.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Storage_Schema;
 class Storage_ArrayOfSchema  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Storage_ArrayOfSchema(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Storage_BaseDriver.hxx b/inc/Storage_BaseDriver.hxx
index c402987..aea21eb 100644
--- a/inc/Storage_BaseDriver.hxx
+++ b/inc/Storage_BaseDriver.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class TColStd_SequenceOfExtendedString;
 class Storage_BaseDriver  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT     void Delete() ;
diff --git a/inc/Storage_DataMapIteratorOfMapOfCallBack.hxx b/inc/Storage_DataMapIteratorOfMapOfCallBack.hxx
index 3218b55..499e089 100644
--- a/inc/Storage_DataMapIteratorOfMapOfCallBack.hxx
+++ b/inc/Storage_DataMapIteratorOfMapOfCallBack.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Storage_DataMapNodeOfMapOfCallBack;
 class Storage_DataMapIteratorOfMapOfCallBack  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Storage_DataMapIteratorOfMapOfCallBack();
diff --git a/inc/Storage_DataMapIteratorOfMapOfPers.hxx b/inc/Storage_DataMapIteratorOfMapOfPers.hxx
index 1a215d0..1248d1c 100644
--- a/inc/Storage_DataMapIteratorOfMapOfPers.hxx
+++ b/inc/Storage_DataMapIteratorOfMapOfPers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Storage_DataMapNodeOfMapOfPers;
 class Storage_DataMapIteratorOfMapOfPers  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Storage_DataMapIteratorOfMapOfPers();
diff --git a/inc/Storage_MapOfCallBack.hxx b/inc/Storage_MapOfCallBack.hxx
index 4a113e2..9b9b639 100644
--- a/inc/Storage_MapOfCallBack.hxx
+++ b/inc/Storage_MapOfCallBack.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Storage_DataMapIteratorOfMapOfCallBack;
 class Storage_MapOfCallBack  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Storage_MapOfCallBack(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Storage_MapOfPers.hxx b/inc/Storage_MapOfPers.hxx
index 818dcaa..87d183b 100644
--- a/inc/Storage_MapOfPers.hxx
+++ b/inc/Storage_MapOfPers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Storage_DataMapIteratorOfMapOfPers;
 class Storage_MapOfPers  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Storage_MapOfPers(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Storage_MapPSDHasher.hxx b/inc/Storage_MapPSDHasher.hxx
index 8bc2a68..5571c3e 100644
--- a/inc/Storage_MapPSDHasher.hxx
+++ b/inc/Storage_MapPSDHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Standard_Persistent;
 class Storage_MapPSDHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const Handle(Standard_Persistent)& K,const Standard_Integer Upper) ;
diff --git a/inc/Storage_PArray.hxx b/inc/Storage_PArray.hxx
index 428a499..5264baf 100644
--- a/inc/Storage_PArray.hxx
+++ b/inc/Storage_PArray.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Standard_Persistent;
 class Storage_PArray  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Storage_PArray(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Storage_PType.hxx b/inc/Storage_PType.hxx
index e3851d2..2b4bc4b 100644
--- a/inc/Storage_PType.hxx
+++ b/inc/Storage_PType.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Storage_IndexedDataMapNodeOfPType;
 class Storage_PType  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Storage_PType(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Storage_SeqOfCallBack.hxx b/inc/Storage_SeqOfCallBack.hxx
index 812985f..dae38cf 100644
--- a/inc/Storage_SeqOfCallBack.hxx
+++ b/inc/Storage_SeqOfCallBack.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Storage_SequenceNodeOfSeqOfCallBack;
 class Storage_SeqOfCallBack  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Storage_SeqOfCallBack();
diff --git a/inc/Storage_SeqOfPersistent.hxx b/inc/Storage_SeqOfPersistent.hxx
index 54d5d68..03effdb 100644
--- a/inc/Storage_SeqOfPersistent.hxx
+++ b/inc/Storage_SeqOfPersistent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Storage_SequenceNodeOfSeqOfPersistent;
 class Storage_SeqOfPersistent  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Storage_SeqOfPersistent();
diff --git a/inc/Storage_SeqOfRoot.hxx b/inc/Storage_SeqOfRoot.hxx
index ddef499..6dd8176 100644
--- a/inc/Storage_SeqOfRoot.hxx
+++ b/inc/Storage_SeqOfRoot.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Storage_SequenceNodeOfSeqOfRoot;
 class Storage_SeqOfRoot  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Storage_SeqOfRoot();
diff --git a/inc/Storage_stCONSTclCOM.hxx b/inc/Storage_stCONSTclCOM.hxx
index 76cb6f5..8645258 100644
--- a/inc/Storage_stCONSTclCOM.hxx
+++ b/inc/Storage_stCONSTclCOM.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -19,18 +22,7 @@
 class Storage_stCONSTclCOM  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
 
 
diff --git a/inc/Sweep_NumShape.hxx b/inc/Sweep_NumShape.hxx
index 16a1bbc..abffd4e 100644
--- a/inc/Sweep_NumShape.hxx
+++ b/inc/Sweep_NumShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@
 class Sweep_NumShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a dummy indexed edge. <br>
   Standard_EXPORT   Sweep_NumShape();
diff --git a/inc/Sweep_NumShapeIterator.hxx b/inc/Sweep_NumShapeIterator.hxx
index 28d4dac..d66e4dd 100644
--- a/inc/Sweep_NumShapeIterator.hxx
+++ b/inc/Sweep_NumShapeIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Sweep_NumShape;
 class Sweep_NumShapeIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Sweep_NumShapeIterator();
diff --git a/inc/Sweep_NumShapeTool.hxx b/inc/Sweep_NumShapeTool.hxx
index 41df3a5..b8e73c4 100644
--- a/inc/Sweep_NumShapeTool.hxx
+++ b/inc/Sweep_NumShapeTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Sweep_NumShape;
 class Sweep_NumShapeTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a new NumShapeTool with <aShape>.  The Tool <br>
 //!          must prepare an indexation  for  all the subshapes <br>
diff --git a/inc/TColGeom2d_Array1OfBSplineCurve.hxx b/inc/TColGeom2d_Array1OfBSplineCurve.hxx
index a6d55c6..b4ba41b 100644
--- a/inc/TColGeom2d_Array1OfBSplineCurve.hxx
+++ b/inc/TColGeom2d_Array1OfBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom2d_BSplineCurve;
 class TColGeom2d_Array1OfBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom2d_Array1OfBSplineCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColGeom2d_Array1OfBezierCurve.hxx b/inc/TColGeom2d_Array1OfBezierCurve.hxx
index 18f9d8a..e920e93 100644
--- a/inc/TColGeom2d_Array1OfBezierCurve.hxx
+++ b/inc/TColGeom2d_Array1OfBezierCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom2d_BezierCurve;
 class TColGeom2d_Array1OfBezierCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom2d_Array1OfBezierCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColGeom2d_Array1OfBoundedCurve.hxx b/inc/TColGeom2d_Array1OfBoundedCurve.hxx
index f4a1a42..55f1bb2 100644
--- a/inc/TColGeom2d_Array1OfBoundedCurve.hxx
+++ b/inc/TColGeom2d_Array1OfBoundedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom2d_BoundedCurve;
 class TColGeom2d_Array1OfBoundedCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom2d_Array1OfBoundedCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColGeom2d_Array1OfCurve.hxx b/inc/TColGeom2d_Array1OfCurve.hxx
index 07c420b..9263093 100644
--- a/inc/TColGeom2d_Array1OfCurve.hxx
+++ b/inc/TColGeom2d_Array1OfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom2d_Curve;
 class TColGeom2d_Array1OfCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom2d_Array1OfCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColGeom2d_Array1OfGeometry.hxx b/inc/TColGeom2d_Array1OfGeometry.hxx
index 9832208..faf7e7b 100644
--- a/inc/TColGeom2d_Array1OfGeometry.hxx
+++ b/inc/TColGeom2d_Array1OfGeometry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom2d_Geometry;
 class TColGeom2d_Array1OfGeometry  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom2d_Array1OfGeometry(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColGeom2d_SequenceOfBoundedCurve.hxx b/inc/TColGeom2d_SequenceOfBoundedCurve.hxx
index 36a6edc..0311ae2 100644
--- a/inc/TColGeom2d_SequenceOfBoundedCurve.hxx
+++ b/inc/TColGeom2d_SequenceOfBoundedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColGeom2d_SequenceNodeOfSequenceOfBoundedCurve;
 class TColGeom2d_SequenceOfBoundedCurve  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColGeom2d_SequenceOfBoundedCurve();
diff --git a/inc/TColGeom2d_SequenceOfCurve.hxx b/inc/TColGeom2d_SequenceOfCurve.hxx
index 1f905d0..032852e 100644
--- a/inc/TColGeom2d_SequenceOfCurve.hxx
+++ b/inc/TColGeom2d_SequenceOfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColGeom2d_SequenceNodeOfSequenceOfCurve;
 class TColGeom2d_SequenceOfCurve  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColGeom2d_SequenceOfCurve();
diff --git a/inc/TColGeom2d_SequenceOfGeometry.hxx b/inc/TColGeom2d_SequenceOfGeometry.hxx
index 2f2d54d..6648a4c 100644
--- a/inc/TColGeom2d_SequenceOfGeometry.hxx
+++ b/inc/TColGeom2d_SequenceOfGeometry.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColGeom2d_SequenceNodeOfSequenceOfGeometry;
 class TColGeom2d_SequenceOfGeometry  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColGeom2d_SequenceOfGeometry();
diff --git a/inc/TColGeom_Array1OfBSplineCurve.hxx b/inc/TColGeom_Array1OfBSplineCurve.hxx
index a6f9f94..46d02e0 100644
--- a/inc/TColGeom_Array1OfBSplineCurve.hxx
+++ b/inc/TColGeom_Array1OfBSplineCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_BSplineCurve;
 class TColGeom_Array1OfBSplineCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom_Array1OfBSplineCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColGeom_Array1OfBezierCurve.hxx b/inc/TColGeom_Array1OfBezierCurve.hxx
index fb69b45..e95b8e0 100644
--- a/inc/TColGeom_Array1OfBezierCurve.hxx
+++ b/inc/TColGeom_Array1OfBezierCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_BezierCurve;
 class TColGeom_Array1OfBezierCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom_Array1OfBezierCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColGeom_Array1OfBoundedCurve.hxx b/inc/TColGeom_Array1OfBoundedCurve.hxx
index c50049e..857a5aa 100644
--- a/inc/TColGeom_Array1OfBoundedCurve.hxx
+++ b/inc/TColGeom_Array1OfBoundedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_BoundedCurve;
 class TColGeom_Array1OfBoundedCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom_Array1OfBoundedCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColGeom_Array1OfBoundedSurface.hxx b/inc/TColGeom_Array1OfBoundedSurface.hxx
index 01db875..ca79f69 100644
--- a/inc/TColGeom_Array1OfBoundedSurface.hxx
+++ b/inc/TColGeom_Array1OfBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_BoundedSurface;
 class TColGeom_Array1OfBoundedSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom_Array1OfBoundedSurface(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColGeom_Array1OfCurve.hxx b/inc/TColGeom_Array1OfCurve.hxx
index f4bd839..1f7eb82 100644
--- a/inc/TColGeom_Array1OfCurve.hxx
+++ b/inc/TColGeom_Array1OfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_Curve;
 class TColGeom_Array1OfCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom_Array1OfCurve(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColGeom_Array1OfSurface.hxx b/inc/TColGeom_Array1OfSurface.hxx
index 27bc882..a2b14e9 100644
--- a/inc/TColGeom_Array1OfSurface.hxx
+++ b/inc/TColGeom_Array1OfSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_Surface;
 class TColGeom_Array1OfSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom_Array1OfSurface(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColGeom_Array2OfBSplineSurface.hxx b/inc/TColGeom_Array2OfBSplineSurface.hxx
index b95169b..3ffa920 100644
--- a/inc/TColGeom_Array2OfBSplineSurface.hxx
+++ b/inc/TColGeom_Array2OfBSplineSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_BSplineSurface;
 class TColGeom_Array2OfBSplineSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom_Array2OfBSplineSurface(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColGeom_Array2OfBezierSurface.hxx b/inc/TColGeom_Array2OfBezierSurface.hxx
index 1f52ef5..6153a38 100644
--- a/inc/TColGeom_Array2OfBezierSurface.hxx
+++ b/inc/TColGeom_Array2OfBezierSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_BezierSurface;
 class TColGeom_Array2OfBezierSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom_Array2OfBezierSurface(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColGeom_Array2OfBoundedSurface.hxx b/inc/TColGeom_Array2OfBoundedSurface.hxx
index a8943fb..c12d2f5 100644
--- a/inc/TColGeom_Array2OfBoundedSurface.hxx
+++ b/inc/TColGeom_Array2OfBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_BoundedSurface;
 class TColGeom_Array2OfBoundedSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom_Array2OfBoundedSurface(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColGeom_Array2OfSurface.hxx b/inc/TColGeom_Array2OfSurface.hxx
index cec3565..feae091 100644
--- a/inc/TColGeom_Array2OfSurface.hxx
+++ b/inc/TColGeom_Array2OfSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_Surface;
 class TColGeom_Array2OfSurface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColGeom_Array2OfSurface(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColGeom_SequenceOfBoundedCurve.hxx b/inc/TColGeom_SequenceOfBoundedCurve.hxx
index ffea1ca..cfc957d 100644
--- a/inc/TColGeom_SequenceOfBoundedCurve.hxx
+++ b/inc/TColGeom_SequenceOfBoundedCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColGeom_SequenceNodeOfSequenceOfBoundedCurve;
 class TColGeom_SequenceOfBoundedCurve  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColGeom_SequenceOfBoundedCurve();
diff --git a/inc/TColGeom_SequenceOfBoundedSurface.hxx b/inc/TColGeom_SequenceOfBoundedSurface.hxx
index ab1a05b..a169378 100644
--- a/inc/TColGeom_SequenceOfBoundedSurface.hxx
+++ b/inc/TColGeom_SequenceOfBoundedSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColGeom_SequenceNodeOfSequenceOfBoundedSurface;
 class TColGeom_SequenceOfBoundedSurface  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColGeom_SequenceOfBoundedSurface();
diff --git a/inc/TColGeom_SequenceOfCurve.hxx b/inc/TColGeom_SequenceOfCurve.hxx
index 332f78c..a6c77e7 100644
--- a/inc/TColGeom_SequenceOfCurve.hxx
+++ b/inc/TColGeom_SequenceOfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColGeom_SequenceNodeOfSequenceOfCurve;
 class TColGeom_SequenceOfCurve  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColGeom_SequenceOfCurve();
diff --git a/inc/TColGeom_SequenceOfSurface.hxx b/inc/TColGeom_SequenceOfSurface.hxx
index be06007..7b2f8ab 100644
--- a/inc/TColGeom_SequenceOfSurface.hxx
+++ b/inc/TColGeom_SequenceOfSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColGeom_SequenceNodeOfSequenceOfSurface;
 class TColGeom_SequenceOfSurface  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColGeom_SequenceOfSurface();
diff --git a/inc/TColQuantity_Array1OfLength.hxx b/inc/TColQuantity_Array1OfLength.hxx
index 21fef97..6498afb 100644
--- a/inc/TColQuantity_Array1OfLength.hxx
+++ b/inc/TColQuantity_Array1OfLength.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_OutOfMemory;
 class TColQuantity_Array1OfLength  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColQuantity_Array1OfLength(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColQuantity_Array2OfLength.hxx b/inc/TColQuantity_Array2OfLength.hxx
index 3274ceb..6c93119 100644
--- a/inc/TColQuantity_Array2OfLength.hxx
+++ b/inc/TColQuantity_Array2OfLength.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_DimensionMismatch;
 class TColQuantity_Array2OfLength  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColQuantity_Array2OfLength(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColStd_Array1OfAsciiString.hxx b/inc/TColStd_Array1OfAsciiString.hxx
index ff83939..88d658e 100644
--- a/inc/TColStd_Array1OfAsciiString.hxx
+++ b/inc/TColStd_Array1OfAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TCollection_AsciiString;
 class TColStd_Array1OfAsciiString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array1OfAsciiString(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColStd_Array1OfBoolean.hxx b/inc/TColStd_Array1OfBoolean.hxx
index e734482..0a623c5 100644
--- a/inc/TColStd_Array1OfBoolean.hxx
+++ b/inc/TColStd_Array1OfBoolean.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Standard_OutOfMemory;
 class TColStd_Array1OfBoolean  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array1OfBoolean(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColStd_Array1OfByte.hxx b/inc/TColStd_Array1OfByte.hxx
index 51af59c..1a70474 100644
--- a/inc/TColStd_Array1OfByte.hxx
+++ b/inc/TColStd_Array1OfByte.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_OutOfMemory;
 class TColStd_Array1OfByte  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array1OfByte(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColStd_Array1OfCharacter.hxx b/inc/TColStd_Array1OfCharacter.hxx
index c98bd28..96b85b1 100644
--- a/inc/TColStd_Array1OfCharacter.hxx
+++ b/inc/TColStd_Array1OfCharacter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_OutOfMemory;
 class TColStd_Array1OfCharacter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array1OfCharacter(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColStd_Array1OfExtendedString.hxx b/inc/TColStd_Array1OfExtendedString.hxx
index 7417fc9..8d40fc7 100644
--- a/inc/TColStd_Array1OfExtendedString.hxx
+++ b/inc/TColStd_Array1OfExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TCollection_ExtendedString;
 class TColStd_Array1OfExtendedString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array1OfExtendedString(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColStd_Array1OfInteger.hxx b/inc/TColStd_Array1OfInteger.hxx
index d4fca2e..3f37e07 100644
--- a/inc/TColStd_Array1OfInteger.hxx
+++ b/inc/TColStd_Array1OfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Standard_OutOfMemory;
 class TColStd_Array1OfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array1OfInteger(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColStd_Array1OfListOfInteger.hxx b/inc/TColStd_Array1OfListOfInteger.hxx
index f1303a0..d55a979 100644
--- a/inc/TColStd_Array1OfListOfInteger.hxx
+++ b/inc/TColStd_Array1OfListOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColStd_ListOfInteger;
 class TColStd_Array1OfListOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array1OfListOfInteger(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColStd_Array1OfReal.hxx b/inc/TColStd_Array1OfReal.hxx
index f7adf18..4d2e5cb 100644
--- a/inc/TColStd_Array1OfReal.hxx
+++ b/inc/TColStd_Array1OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_OutOfMemory;
 class TColStd_Array1OfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array1OfReal(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColStd_Array1OfTransient.hxx b/inc/TColStd_Array1OfTransient.hxx
index afcfe2f..de93738 100644
--- a/inc/TColStd_Array1OfTransient.hxx
+++ b/inc/TColStd_Array1OfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Standard_Transient;
 class TColStd_Array1OfTransient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array1OfTransient(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColStd_Array2OfBoolean.hxx b/inc/TColStd_Array2OfBoolean.hxx
index 144f9b3..8fa5b59 100644
--- a/inc/TColStd_Array2OfBoolean.hxx
+++ b/inc/TColStd_Array2OfBoolean.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Standard_DimensionMismatch;
 class TColStd_Array2OfBoolean  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array2OfBoolean(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColStd_Array2OfCharacter.hxx b/inc/TColStd_Array2OfCharacter.hxx
index 89ede65..d1b2d61 100644
--- a/inc/TColStd_Array2OfCharacter.hxx
+++ b/inc/TColStd_Array2OfCharacter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_DimensionMismatch;
 class TColStd_Array2OfCharacter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array2OfCharacter(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColStd_Array2OfInteger.hxx b/inc/TColStd_Array2OfInteger.hxx
index 99d5d6e..203df21 100644
--- a/inc/TColStd_Array2OfInteger.hxx
+++ b/inc/TColStd_Array2OfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Standard_DimensionMismatch;
 class TColStd_Array2OfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array2OfInteger(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColStd_Array2OfReal.hxx b/inc/TColStd_Array2OfReal.hxx
index 3a59f45..6fda705 100644
--- a/inc/TColStd_Array2OfReal.hxx
+++ b/inc/TColStd_Array2OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_DimensionMismatch;
 class TColStd_Array2OfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array2OfReal(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColStd_Array2OfTransient.hxx b/inc/TColStd_Array2OfTransient.hxx
index 6d41fd4..747558c 100644
--- a/inc/TColStd_Array2OfTransient.hxx
+++ b/inc/TColStd_Array2OfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Standard_Transient;
 class TColStd_Array2OfTransient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_Array2OfTransient(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColStd_DataMapIteratorOfDataMapOfAsciiStringInteger.hxx b/inc/TColStd_DataMapIteratorOfDataMapOfAsciiStringInteger.hxx
index 84237cf..5818ac2 100644
--- a/inc/TColStd_DataMapIteratorOfDataMapOfAsciiStringInteger.hxx
+++ b/inc/TColStd_DataMapIteratorOfDataMapOfAsciiStringInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColStd_DataMapNodeOfDataMapOfAsciiStringInteger;
 class TColStd_DataMapIteratorOfDataMapOfAsciiStringInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapIteratorOfDataMapOfAsciiStringInteger();
diff --git a/inc/TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx b/inc/TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx
index e8f258a..fc031d7 100644
--- a/inc/TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx
+++ b/inc/TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColStd_DataMapNodeOfDataMapOfIntegerInteger;
 class TColStd_DataMapIteratorOfDataMapOfIntegerInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapIteratorOfDataMapOfIntegerInteger();
diff --git a/inc/TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx b/inc/TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx
index f9ae2a1..4b1d893 100644
--- a/inc/TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx
+++ b/inc/TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColStd_DataMapNodeOfDataMapOfIntegerListOfInteger;
 class TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger();
diff --git a/inc/TColStd_DataMapIteratorOfDataMapOfIntegerReal.hxx b/inc/TColStd_DataMapIteratorOfDataMapOfIntegerReal.hxx
index a4d65e7..4d1918b 100644
--- a/inc/TColStd_DataMapIteratorOfDataMapOfIntegerReal.hxx
+++ b/inc/TColStd_DataMapIteratorOfDataMapOfIntegerReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_DataMapNodeOfDataMapOfIntegerReal;
 class TColStd_DataMapIteratorOfDataMapOfIntegerReal  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapIteratorOfDataMapOfIntegerReal();
diff --git a/inc/TColStd_DataMapIteratorOfDataMapOfIntegerTransient.hxx b/inc/TColStd_DataMapIteratorOfDataMapOfIntegerTransient.hxx
index 5890e7c..1fa9d07 100644
--- a/inc/TColStd_DataMapIteratorOfDataMapOfIntegerTransient.hxx
+++ b/inc/TColStd_DataMapIteratorOfDataMapOfIntegerTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColStd_DataMapNodeOfDataMapOfIntegerTransient;
 class TColStd_DataMapIteratorOfDataMapOfIntegerTransient  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapIteratorOfDataMapOfIntegerTransient();
diff --git a/inc/TColStd_DataMapIteratorOfDataMapOfStringInteger.hxx b/inc/TColStd_DataMapIteratorOfDataMapOfStringInteger.hxx
index 88ca332..28ea42e 100644
--- a/inc/TColStd_DataMapIteratorOfDataMapOfStringInteger.hxx
+++ b/inc/TColStd_DataMapIteratorOfDataMapOfStringInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColStd_DataMapNodeOfDataMapOfStringInteger;
 class TColStd_DataMapIteratorOfDataMapOfStringInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapIteratorOfDataMapOfStringInteger();
diff --git a/inc/TColStd_DataMapIteratorOfDataMapOfTransientTransient.hxx b/inc/TColStd_DataMapIteratorOfDataMapOfTransientTransient.hxx
index 97d548c..9bd7109 100644
--- a/inc/TColStd_DataMapIteratorOfDataMapOfTransientTransient.hxx
+++ b/inc/TColStd_DataMapIteratorOfDataMapOfTransientTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColStd_DataMapNodeOfDataMapOfTransientTransient;
 class TColStd_DataMapIteratorOfDataMapOfTransientTransient  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapIteratorOfDataMapOfTransientTransient();
diff --git a/inc/TColStd_DataMapOfAsciiStringInteger.hxx b/inc/TColStd_DataMapOfAsciiStringInteger.hxx
index 8d31081..bfb2eac 100644
--- a/inc/TColStd_DataMapOfAsciiStringInteger.hxx
+++ b/inc/TColStd_DataMapOfAsciiStringInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TColStd_DataMapIteratorOfDataMapOfAsciiStringInteger;
 class TColStd_DataMapOfAsciiStringInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapOfAsciiStringInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_DataMapOfIntegerInteger.hxx b/inc/TColStd_DataMapOfIntegerInteger.hxx
index d0ef1ea..466e7ba 100644
--- a/inc/TColStd_DataMapOfIntegerInteger.hxx
+++ b/inc/TColStd_DataMapOfIntegerInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TColStd_DataMapIteratorOfDataMapOfIntegerInteger;
 class TColStd_DataMapOfIntegerInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapOfIntegerInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_DataMapOfIntegerListOfInteger.hxx b/inc/TColStd_DataMapOfIntegerListOfInteger.hxx
index a3ec85f..d8a6ba8 100644
--- a/inc/TColStd_DataMapOfIntegerListOfInteger.hxx
+++ b/inc/TColStd_DataMapOfIntegerListOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger;
 class TColStd_DataMapOfIntegerListOfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapOfIntegerListOfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_DataMapOfIntegerReal.hxx b/inc/TColStd_DataMapOfIntegerReal.hxx
index 5f778a1..54525ee 100644
--- a/inc/TColStd_DataMapOfIntegerReal.hxx
+++ b/inc/TColStd_DataMapOfIntegerReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class TColStd_DataMapIteratorOfDataMapOfIntegerReal;
 class TColStd_DataMapOfIntegerReal  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapOfIntegerReal(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_DataMapOfIntegerTransient.hxx b/inc/TColStd_DataMapOfIntegerTransient.hxx
index 3b73ec4..09cf4b1 100644
--- a/inc/TColStd_DataMapOfIntegerTransient.hxx
+++ b/inc/TColStd_DataMapOfIntegerTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TColStd_DataMapIteratorOfDataMapOfIntegerTransient;
 class TColStd_DataMapOfIntegerTransient  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapOfIntegerTransient(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_DataMapOfStringInteger.hxx b/inc/TColStd_DataMapOfStringInteger.hxx
index 181f227..28e6fe1 100644
--- a/inc/TColStd_DataMapOfStringInteger.hxx
+++ b/inc/TColStd_DataMapOfStringInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TColStd_DataMapIteratorOfDataMapOfStringInteger;
 class TColStd_DataMapOfStringInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapOfStringInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_DataMapOfTransientTransient.hxx b/inc/TColStd_DataMapOfTransientTransient.hxx
index fcdf1f1..84c1ac5 100644
--- a/inc/TColStd_DataMapOfTransientTransient.hxx
+++ b/inc/TColStd_DataMapOfTransientTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TColStd_DataMapIteratorOfDataMapOfTransientTransient;
 class TColStd_DataMapOfTransientTransient  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_DataMapOfTransientTransient(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_IndexedDataMapOfTransientTransient.hxx b/inc/TColStd_IndexedDataMapOfTransientTransient.hxx
index e7e6666..31c1953 100644
--- a/inc/TColStd_IndexedDataMapOfTransientTransient.hxx
+++ b/inc/TColStd_IndexedDataMapOfTransientTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TColStd_IndexedDataMapNodeOfIndexedDataMapOfTransientTransient;
 class TColStd_IndexedDataMapOfTransientTransient  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_IndexedDataMapOfTransientTransient(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_IndexedMapOfInteger.hxx b/inc/TColStd_IndexedMapOfInteger.hxx
index 07bafad..ac2ce1e 100644
--- a/inc/TColStd_IndexedMapOfInteger.hxx
+++ b/inc/TColStd_IndexedMapOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_IndexedMapNodeOfIndexedMapOfInteger;
 class TColStd_IndexedMapOfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_IndexedMapOfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_IndexedMapOfReal.hxx b/inc/TColStd_IndexedMapOfReal.hxx
index 2270376..9103348 100644
--- a/inc/TColStd_IndexedMapOfReal.hxx
+++ b/inc/TColStd_IndexedMapOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TColStd_IndexedMapNodeOfIndexedMapOfReal;
 class TColStd_IndexedMapOfReal  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_IndexedMapOfReal(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_IndexedMapOfTransient.hxx b/inc/TColStd_IndexedMapOfTransient.hxx
index 95f7ce9..ce44d72 100644
--- a/inc/TColStd_IndexedMapOfTransient.hxx
+++ b/inc/TColStd_IndexedMapOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TColStd_IndexedMapNodeOfIndexedMapOfTransient;
 class TColStd_IndexedMapOfTransient  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_IndexedMapOfTransient(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_ListIteratorOfListOfAsciiString.hxx b/inc/TColStd_ListIteratorOfListOfAsciiString.hxx
index d1f8e2f..69220c8 100644
--- a/inc/TColStd_ListIteratorOfListOfAsciiString.hxx
+++ b/inc/TColStd_ListIteratorOfListOfAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColStd_ListNodeOfListOfAsciiString;
 class TColStd_ListIteratorOfListOfAsciiString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_ListIteratorOfListOfAsciiString();
diff --git a/inc/TColStd_ListIteratorOfListOfInteger.hxx b/inc/TColStd_ListIteratorOfListOfInteger.hxx
index 767ba8f..e3eecc6 100644
--- a/inc/TColStd_ListIteratorOfListOfInteger.hxx
+++ b/inc/TColStd_ListIteratorOfListOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_ListNodeOfListOfInteger;
 class TColStd_ListIteratorOfListOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_ListIteratorOfListOfInteger();
diff --git a/inc/TColStd_ListIteratorOfListOfReal.hxx b/inc/TColStd_ListIteratorOfListOfReal.hxx
index 1c3fb85..48987ad 100644
--- a/inc/TColStd_ListIteratorOfListOfReal.hxx
+++ b/inc/TColStd_ListIteratorOfListOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_ListNodeOfListOfReal;
 class TColStd_ListIteratorOfListOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_ListIteratorOfListOfReal();
diff --git a/inc/TColStd_ListIteratorOfListOfTransient.hxx b/inc/TColStd_ListIteratorOfListOfTransient.hxx
index 3784964..d7bdbfc 100644
--- a/inc/TColStd_ListIteratorOfListOfTransient.hxx
+++ b/inc/TColStd_ListIteratorOfListOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColStd_ListNodeOfListOfTransient;
 class TColStd_ListIteratorOfListOfTransient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_ListIteratorOfListOfTransient();
diff --git a/inc/TColStd_ListIteratorOfSetListOfSetOfInteger.hxx b/inc/TColStd_ListIteratorOfSetListOfSetOfInteger.hxx
index 80fd3a3..3ad003f 100644
--- a/inc/TColStd_ListIteratorOfSetListOfSetOfInteger.hxx
+++ b/inc/TColStd_ListIteratorOfSetListOfSetOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_ListNodeOfSetListOfSetOfInteger;
 class TColStd_ListIteratorOfSetListOfSetOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_ListIteratorOfSetListOfSetOfInteger();
diff --git a/inc/TColStd_ListIteratorOfSetListOfSetOfReal.hxx b/inc/TColStd_ListIteratorOfSetListOfSetOfReal.hxx
index 91f8b9e..0dc7dbb 100644
--- a/inc/TColStd_ListIteratorOfSetListOfSetOfReal.hxx
+++ b/inc/TColStd_ListIteratorOfSetListOfSetOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_ListNodeOfSetListOfSetOfReal;
 class TColStd_ListIteratorOfSetListOfSetOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_ListIteratorOfSetListOfSetOfReal();
diff --git a/inc/TColStd_ListIteratorOfSetListOfSetOfTransient.hxx b/inc/TColStd_ListIteratorOfSetListOfSetOfTransient.hxx
index 62de512..58915d0 100644
--- a/inc/TColStd_ListIteratorOfSetListOfSetOfTransient.hxx
+++ b/inc/TColStd_ListIteratorOfSetListOfSetOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColStd_ListNodeOfSetListOfSetOfTransient;
 class TColStd_ListIteratorOfSetListOfSetOfTransient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_ListIteratorOfSetListOfSetOfTransient();
diff --git a/inc/TColStd_ListOfAsciiString.hxx b/inc/TColStd_ListOfAsciiString.hxx
index 95f4017..bb1e771 100644
--- a/inc/TColStd_ListOfAsciiString.hxx
+++ b/inc/TColStd_ListOfAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_ListNodeOfListOfAsciiString;
 class TColStd_ListOfAsciiString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_ListOfAsciiString();
diff --git a/inc/TColStd_ListOfInteger.hxx b/inc/TColStd_ListOfInteger.hxx
index fd0e067..507b3f0 100644
--- a/inc/TColStd_ListOfInteger.hxx
+++ b/inc/TColStd_ListOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColStd_ListNodeOfListOfInteger;
 class TColStd_ListOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_ListOfInteger();
diff --git a/inc/TColStd_ListOfReal.hxx b/inc/TColStd_ListOfReal.hxx
index f825043..a4a580c 100644
--- a/inc/TColStd_ListOfReal.hxx
+++ b/inc/TColStd_ListOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TColStd_ListNodeOfListOfReal;
 class TColStd_ListOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_ListOfReal();
diff --git a/inc/TColStd_ListOfTransient.hxx b/inc/TColStd_ListOfTransient.hxx
index f0d677a..82de085 100644
--- a/inc/TColStd_ListOfTransient.hxx
+++ b/inc/TColStd_ListOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TColStd_ListNodeOfListOfTransient;
 class TColStd_ListOfTransient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_ListOfTransient();
diff --git a/inc/TColStd_MapIntegerHasher.hxx b/inc/TColStd_MapIntegerHasher.hxx
index 2b5c2c2..04ccb5b 100644
--- a/inc/TColStd_MapIntegerHasher.hxx
+++ b/inc/TColStd_MapIntegerHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class TColStd_MapIntegerHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const Standard_Integer& K,const Standard_Integer Upper) ;
diff --git a/inc/TColStd_MapIteratorOfMapOfAsciiString.hxx b/inc/TColStd_MapIteratorOfMapOfAsciiString.hxx
index b7f2ea8..c37919f 100644
--- a/inc/TColStd_MapIteratorOfMapOfAsciiString.hxx
+++ b/inc/TColStd_MapIteratorOfMapOfAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TColStd_StdMapNodeOfMapOfAsciiString;
 class TColStd_MapIteratorOfMapOfAsciiString  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_MapIteratorOfMapOfAsciiString();
diff --git a/inc/TColStd_MapIteratorOfMapOfInteger.hxx b/inc/TColStd_MapIteratorOfMapOfInteger.hxx
index 3f0340f..bb7e3e5 100644
--- a/inc/TColStd_MapIteratorOfMapOfInteger.hxx
+++ b/inc/TColStd_MapIteratorOfMapOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColStd_StdMapNodeOfMapOfInteger;
 class TColStd_MapIteratorOfMapOfInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_MapIteratorOfMapOfInteger();
diff --git a/inc/TColStd_MapIteratorOfMapOfReal.hxx b/inc/TColStd_MapIteratorOfMapOfReal.hxx
index 3d704a7..0cf693f 100644
--- a/inc/TColStd_MapIteratorOfMapOfReal.hxx
+++ b/inc/TColStd_MapIteratorOfMapOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColStd_StdMapNodeOfMapOfReal;
 class TColStd_MapIteratorOfMapOfReal  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_MapIteratorOfMapOfReal();
diff --git a/inc/TColStd_MapIteratorOfMapOfTransient.hxx b/inc/TColStd_MapIteratorOfMapOfTransient.hxx
index 9eab3a5..fa6b11c 100644
--- a/inc/TColStd_MapIteratorOfMapOfTransient.hxx
+++ b/inc/TColStd_MapIteratorOfMapOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColStd_StdMapNodeOfMapOfTransient;
 class TColStd_MapIteratorOfMapOfTransient  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_MapIteratorOfMapOfTransient();
diff --git a/inc/TColStd_MapOfAsciiString.hxx b/inc/TColStd_MapOfAsciiString.hxx
index 0640aa2..e50a972 100644
--- a/inc/TColStd_MapOfAsciiString.hxx
+++ b/inc/TColStd_MapOfAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_MapIteratorOfMapOfAsciiString;
 class TColStd_MapOfAsciiString  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_MapOfAsciiString(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_MapOfInteger.hxx b/inc/TColStd_MapOfInteger.hxx
index 1bd3297..f2f2531 100644
--- a/inc/TColStd_MapOfInteger.hxx
+++ b/inc/TColStd_MapOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_MapIteratorOfMapOfInteger;
 class TColStd_MapOfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_MapOfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_MapOfReal.hxx b/inc/TColStd_MapOfReal.hxx
index 0891db2..15c32e6 100644
--- a/inc/TColStd_MapOfReal.hxx
+++ b/inc/TColStd_MapOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TColStd_MapIteratorOfMapOfReal;
 class TColStd_MapOfReal  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_MapOfReal(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_MapOfTransient.hxx b/inc/TColStd_MapOfTransient.hxx
index 25940aa..1703191 100644
--- a/inc/TColStd_MapOfTransient.hxx
+++ b/inc/TColStd_MapOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TColStd_MapIteratorOfMapOfTransient;
 class TColStd_MapOfTransient  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_MapOfTransient(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColStd_MapRealHasher.hxx b/inc/TColStd_MapRealHasher.hxx
index 0bdfc7e..ffc135c 100644
--- a/inc/TColStd_MapRealHasher.hxx
+++ b/inc/TColStd_MapRealHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class TColStd_MapRealHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const Standard_Real& K,const Standard_Integer Upper) ;
diff --git a/inc/TColStd_MapTransientHasher.hxx b/inc/TColStd_MapTransientHasher.hxx
index a754a6f..a0a50a3 100644
--- a/inc/TColStd_MapTransientHasher.hxx
+++ b/inc/TColStd_MapTransientHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Standard_Transient;
 class TColStd_MapTransientHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const Handle(Standard_Transient)& K,const Standard_Integer Upper) ;
diff --git a/inc/TColStd_QueueOfInteger.hxx b/inc/TColStd_QueueOfInteger.hxx
index aa1e8d3..383cc13 100644
--- a/inc/TColStd_QueueOfInteger.hxx
+++ b/inc/TColStd_QueueOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColStd_QueueNodeOfQueueOfInteger;
 class TColStd_QueueOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_QueueOfInteger();
diff --git a/inc/TColStd_QueueOfReal.hxx b/inc/TColStd_QueueOfReal.hxx
index 6114034..1ed5d54 100644
--- a/inc/TColStd_QueueOfReal.hxx
+++ b/inc/TColStd_QueueOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColStd_QueueNodeOfQueueOfReal;
 class TColStd_QueueOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_QueueOfReal();
diff --git a/inc/TColStd_QueueOfTransient.hxx b/inc/TColStd_QueueOfTransient.hxx
index d368af6..db8dfcd 100644
--- a/inc/TColStd_QueueOfTransient.hxx
+++ b/inc/TColStd_QueueOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TColStd_QueueNodeOfQueueOfTransient;
 class TColStd_QueueOfTransient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_QueueOfTransient();
diff --git a/inc/TColStd_SequenceOfAddress.hxx b/inc/TColStd_SequenceOfAddress.hxx
index 56e4e86..e2992ff 100644
--- a/inc/TColStd_SequenceOfAddress.hxx
+++ b/inc/TColStd_SequenceOfAddress.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColStd_SequenceNodeOfSequenceOfAddress;
 class TColStd_SequenceOfAddress  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColStd_SequenceOfAddress();
diff --git a/inc/TColStd_SequenceOfAsciiString.hxx b/inc/TColStd_SequenceOfAsciiString.hxx
index 035cffc..176b093 100644
--- a/inc/TColStd_SequenceOfAsciiString.hxx
+++ b/inc/TColStd_SequenceOfAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColStd_SequenceNodeOfSequenceOfAsciiString;
 class TColStd_SequenceOfAsciiString  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColStd_SequenceOfAsciiString();
diff --git a/inc/TColStd_SequenceOfBoolean.hxx b/inc/TColStd_SequenceOfBoolean.hxx
index 33ce37d..e0bbbc3 100644
--- a/inc/TColStd_SequenceOfBoolean.hxx
+++ b/inc/TColStd_SequenceOfBoolean.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColStd_SequenceNodeOfSequenceOfBoolean;
 class TColStd_SequenceOfBoolean  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColStd_SequenceOfBoolean();
diff --git a/inc/TColStd_SequenceOfExtendedString.hxx b/inc/TColStd_SequenceOfExtendedString.hxx
index b164e29..40f3549 100644
--- a/inc/TColStd_SequenceOfExtendedString.hxx
+++ b/inc/TColStd_SequenceOfExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColStd_SequenceNodeOfSequenceOfExtendedString;
 class TColStd_SequenceOfExtendedString  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColStd_SequenceOfExtendedString();
diff --git a/inc/TColStd_SequenceOfHAsciiString.hxx b/inc/TColStd_SequenceOfHAsciiString.hxx
index 3bf1be9..431ae6a 100644
--- a/inc/TColStd_SequenceOfHAsciiString.hxx
+++ b/inc/TColStd_SequenceOfHAsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_SequenceNodeOfSequenceOfHAsciiString;
 class TColStd_SequenceOfHAsciiString  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColStd_SequenceOfHAsciiString();
diff --git a/inc/TColStd_SequenceOfHExtendedString.hxx b/inc/TColStd_SequenceOfHExtendedString.hxx
index d346152..c2b036e 100644
--- a/inc/TColStd_SequenceOfHExtendedString.hxx
+++ b/inc/TColStd_SequenceOfHExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_SequenceNodeOfSequenceOfHExtendedString;
 class TColStd_SequenceOfHExtendedString  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColStd_SequenceOfHExtendedString();
diff --git a/inc/TColStd_SequenceOfInteger.hxx b/inc/TColStd_SequenceOfInteger.hxx
index 7501283..5543403 100644
--- a/inc/TColStd_SequenceOfInteger.hxx
+++ b/inc/TColStd_SequenceOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TColStd_SequenceNodeOfSequenceOfInteger;
 class TColStd_SequenceOfInteger  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColStd_SequenceOfInteger();
diff --git a/inc/TColStd_SequenceOfReal.hxx b/inc/TColStd_SequenceOfReal.hxx
index 4a82e1e..a65a700 100644
--- a/inc/TColStd_SequenceOfReal.hxx
+++ b/inc/TColStd_SequenceOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColStd_SequenceNodeOfSequenceOfReal;
 class TColStd_SequenceOfReal  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColStd_SequenceOfReal();
diff --git a/inc/TColStd_SequenceOfTransient.hxx b/inc/TColStd_SequenceOfTransient.hxx
index 361917d..2c52528 100644
--- a/inc/TColStd_SequenceOfTransient.hxx
+++ b/inc/TColStd_SequenceOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_SequenceNodeOfSequenceOfTransient;
 class TColStd_SequenceOfTransient  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColStd_SequenceOfTransient();
diff --git a/inc/TColStd_SetIteratorOfSetOfInteger.hxx b/inc/TColStd_SetIteratorOfSetOfInteger.hxx
index 51b22a4..fb838f9 100644
--- a/inc/TColStd_SetIteratorOfSetOfInteger.hxx
+++ b/inc/TColStd_SetIteratorOfSetOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColStd_ListIteratorOfSetListOfSetOfInteger;
 class TColStd_SetIteratorOfSetOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_SetIteratorOfSetOfInteger();
diff --git a/inc/TColStd_SetIteratorOfSetOfReal.hxx b/inc/TColStd_SetIteratorOfSetOfReal.hxx
index d1826c6..39b33ce 100644
--- a/inc/TColStd_SetIteratorOfSetOfReal.hxx
+++ b/inc/TColStd_SetIteratorOfSetOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColStd_ListIteratorOfSetListOfSetOfReal;
 class TColStd_SetIteratorOfSetOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_SetIteratorOfSetOfReal();
diff --git a/inc/TColStd_SetIteratorOfSetOfTransient.hxx b/inc/TColStd_SetIteratorOfSetOfTransient.hxx
index ae5af9a..d9817e4 100644
--- a/inc/TColStd_SetIteratorOfSetOfTransient.hxx
+++ b/inc/TColStd_SetIteratorOfSetOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TColStd_ListIteratorOfSetListOfSetOfTransient;
 class TColStd_SetIteratorOfSetOfTransient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_SetIteratorOfSetOfTransient();
diff --git a/inc/TColStd_SetListOfSetOfInteger.hxx b/inc/TColStd_SetListOfSetOfInteger.hxx
index 27c08f2..fe23e26 100644
--- a/inc/TColStd_SetListOfSetOfInteger.hxx
+++ b/inc/TColStd_SetListOfSetOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColStd_ListNodeOfSetListOfSetOfInteger;
 class TColStd_SetListOfSetOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_SetListOfSetOfInteger();
diff --git a/inc/TColStd_SetListOfSetOfReal.hxx b/inc/TColStd_SetListOfSetOfReal.hxx
index 49c8c45..57f41f0 100644
--- a/inc/TColStd_SetListOfSetOfReal.hxx
+++ b/inc/TColStd_SetListOfSetOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TColStd_ListNodeOfSetListOfSetOfReal;
 class TColStd_SetListOfSetOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_SetListOfSetOfReal();
diff --git a/inc/TColStd_SetListOfSetOfTransient.hxx b/inc/TColStd_SetListOfSetOfTransient.hxx
index 627f05a..9b4bc67 100644
--- a/inc/TColStd_SetListOfSetOfTransient.hxx
+++ b/inc/TColStd_SetListOfSetOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TColStd_ListNodeOfSetListOfSetOfTransient;
 class TColStd_SetListOfSetOfTransient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_SetListOfSetOfTransient();
diff --git a/inc/TColStd_SetOfInteger.hxx b/inc/TColStd_SetOfInteger.hxx
index 5de5bf9..f096bd3 100644
--- a/inc/TColStd_SetOfInteger.hxx
+++ b/inc/TColStd_SetOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColStd_ListIteratorOfSetListOfSetOfInteger;
 class TColStd_SetOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_SetOfInteger();
diff --git a/inc/TColStd_SetOfReal.hxx b/inc/TColStd_SetOfReal.hxx
index 4e3cbb9..e6f6add 100644
--- a/inc/TColStd_SetOfReal.hxx
+++ b/inc/TColStd_SetOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TColStd_ListIteratorOfSetListOfSetOfReal;
 class TColStd_SetOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_SetOfReal();
diff --git a/inc/TColStd_SetOfTransient.hxx b/inc/TColStd_SetOfTransient.hxx
index 877333b..a8d8788 100644
--- a/inc/TColStd_SetOfTransient.hxx
+++ b/inc/TColStd_SetOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TColStd_ListIteratorOfSetListOfSetOfTransient;
 class TColStd_SetOfTransient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_SetOfTransient();
diff --git a/inc/TColStd_StackIteratorOfStackOfInteger.hxx b/inc/TColStd_StackIteratorOfStackOfInteger.hxx
index cc4b596..b523ee9 100644
--- a/inc/TColStd_StackIteratorOfStackOfInteger.hxx
+++ b/inc/TColStd_StackIteratorOfStackOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColStd_StackNodeOfStackOfInteger;
 class TColStd_StackIteratorOfStackOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_StackIteratorOfStackOfInteger();
diff --git a/inc/TColStd_StackIteratorOfStackOfReal.hxx b/inc/TColStd_StackIteratorOfStackOfReal.hxx
index 28ba0c4..025e6c2 100644
--- a/inc/TColStd_StackIteratorOfStackOfReal.hxx
+++ b/inc/TColStd_StackIteratorOfStackOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColStd_StackNodeOfStackOfReal;
 class TColStd_StackIteratorOfStackOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_StackIteratorOfStackOfReal();
diff --git a/inc/TColStd_StackIteratorOfStackOfTransient.hxx b/inc/TColStd_StackIteratorOfStackOfTransient.hxx
index 59d1893..a42fac9 100644
--- a/inc/TColStd_StackIteratorOfStackOfTransient.hxx
+++ b/inc/TColStd_StackIteratorOfStackOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColStd_StackNodeOfStackOfTransient;
 class TColStd_StackIteratorOfStackOfTransient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_StackIteratorOfStackOfTransient();
diff --git a/inc/TColStd_StackOfInteger.hxx b/inc/TColStd_StackOfInteger.hxx
index 4c7d1ac..2d69d43 100644
--- a/inc/TColStd_StackOfInteger.hxx
+++ b/inc/TColStd_StackOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TColStd_StackNodeOfStackOfInteger;
 class TColStd_StackOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_StackOfInteger();
diff --git a/inc/TColStd_StackOfReal.hxx b/inc/TColStd_StackOfReal.hxx
index 85c0e93..b448afc 100644
--- a/inc/TColStd_StackOfReal.hxx
+++ b/inc/TColStd_StackOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TColStd_StackNodeOfStackOfReal;
 class TColStd_StackOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_StackOfReal();
diff --git a/inc/TColStd_StackOfTransient.hxx b/inc/TColStd_StackOfTransient.hxx
index fb28e3f..11a74c7 100644
--- a/inc/TColStd_StackOfTransient.hxx
+++ b/inc/TColStd_StackOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TColStd_StackNodeOfStackOfTransient;
 class TColStd_StackOfTransient  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColStd_StackOfTransient();
diff --git a/inc/TColgp_Array1OfCirc2d.hxx b/inc/TColgp_Array1OfCirc2d.hxx
index 073f24b..b4043fa 100644
--- a/inc/TColgp_Array1OfCirc2d.hxx
+++ b/inc/TColgp_Array1OfCirc2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Circ2d;
 class TColgp_Array1OfCirc2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array1OfCirc2d(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColgp_Array1OfDir.hxx b/inc/TColgp_Array1OfDir.hxx
index b32010b..9ab5775 100644
--- a/inc/TColgp_Array1OfDir.hxx
+++ b/inc/TColgp_Array1OfDir.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Dir;
 class TColgp_Array1OfDir  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array1OfDir(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColgp_Array1OfDir2d.hxx b/inc/TColgp_Array1OfDir2d.hxx
index e72adc8..91cb661 100644
--- a/inc/TColgp_Array1OfDir2d.hxx
+++ b/inc/TColgp_Array1OfDir2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Dir2d;
 class TColgp_Array1OfDir2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array1OfDir2d(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColgp_Array1OfLin2d.hxx b/inc/TColgp_Array1OfLin2d.hxx
index 69f19b8..b163128 100644
--- a/inc/TColgp_Array1OfLin2d.hxx
+++ b/inc/TColgp_Array1OfLin2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Lin2d;
 class TColgp_Array1OfLin2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array1OfLin2d(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColgp_Array1OfPnt.hxx b/inc/TColgp_Array1OfPnt.hxx
index a42beb6..7e84e49 100644
--- a/inc/TColgp_Array1OfPnt.hxx
+++ b/inc/TColgp_Array1OfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Pnt;
 class TColgp_Array1OfPnt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array1OfPnt(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColgp_Array1OfPnt2d.hxx b/inc/TColgp_Array1OfPnt2d.hxx
index 8142ef9..3e5c8bf 100644
--- a/inc/TColgp_Array1OfPnt2d.hxx
+++ b/inc/TColgp_Array1OfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Pnt2d;
 class TColgp_Array1OfPnt2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array1OfPnt2d(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColgp_Array1OfVec.hxx b/inc/TColgp_Array1OfVec.hxx
index f507f44..c449170 100644
--- a/inc/TColgp_Array1OfVec.hxx
+++ b/inc/TColgp_Array1OfVec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Vec;
 class TColgp_Array1OfVec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array1OfVec(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColgp_Array1OfVec2d.hxx b/inc/TColgp_Array1OfVec2d.hxx
index 02337a7..fc0b286 100644
--- a/inc/TColgp_Array1OfVec2d.hxx
+++ b/inc/TColgp_Array1OfVec2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Vec2d;
 class TColgp_Array1OfVec2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array1OfVec2d(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColgp_Array1OfXY.hxx b/inc/TColgp_Array1OfXY.hxx
index e36b438..16d1bff 100644
--- a/inc/TColgp_Array1OfXY.hxx
+++ b/inc/TColgp_Array1OfXY.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_XY;
 class TColgp_Array1OfXY  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array1OfXY(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColgp_Array1OfXYZ.hxx b/inc/TColgp_Array1OfXYZ.hxx
index 105b4fc..bbdbbca 100644
--- a/inc/TColgp_Array1OfXYZ.hxx
+++ b/inc/TColgp_Array1OfXYZ.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_XYZ;
 class TColgp_Array1OfXYZ  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array1OfXYZ(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TColgp_Array2OfCirc2d.hxx b/inc/TColgp_Array2OfCirc2d.hxx
index 7268b34..5e88f52 100644
--- a/inc/TColgp_Array2OfCirc2d.hxx
+++ b/inc/TColgp_Array2OfCirc2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Circ2d;
 class TColgp_Array2OfCirc2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array2OfCirc2d(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColgp_Array2OfDir.hxx b/inc/TColgp_Array2OfDir.hxx
index c0d4d19..1ad0166 100644
--- a/inc/TColgp_Array2OfDir.hxx
+++ b/inc/TColgp_Array2OfDir.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Dir;
 class TColgp_Array2OfDir  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array2OfDir(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColgp_Array2OfDir2d.hxx b/inc/TColgp_Array2OfDir2d.hxx
index 8b4b4f7..5425c74 100644
--- a/inc/TColgp_Array2OfDir2d.hxx
+++ b/inc/TColgp_Array2OfDir2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Dir2d;
 class TColgp_Array2OfDir2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array2OfDir2d(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColgp_Array2OfLin2d.hxx b/inc/TColgp_Array2OfLin2d.hxx
index 6c82cea..bee9048 100644
--- a/inc/TColgp_Array2OfLin2d.hxx
+++ b/inc/TColgp_Array2OfLin2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Lin2d;
 class TColgp_Array2OfLin2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array2OfLin2d(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColgp_Array2OfPnt.hxx b/inc/TColgp_Array2OfPnt.hxx
index f8d97ca..abbcf1f 100644
--- a/inc/TColgp_Array2OfPnt.hxx
+++ b/inc/TColgp_Array2OfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Pnt;
 class TColgp_Array2OfPnt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array2OfPnt(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColgp_Array2OfPnt2d.hxx b/inc/TColgp_Array2OfPnt2d.hxx
index 5ed5971..0699b0a 100644
--- a/inc/TColgp_Array2OfPnt2d.hxx
+++ b/inc/TColgp_Array2OfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Pnt2d;
 class TColgp_Array2OfPnt2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array2OfPnt2d(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColgp_Array2OfVec.hxx b/inc/TColgp_Array2OfVec.hxx
index 772b8b0..5fe4cc0 100644
--- a/inc/TColgp_Array2OfVec.hxx
+++ b/inc/TColgp_Array2OfVec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Vec;
 class TColgp_Array2OfVec  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array2OfVec(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColgp_Array2OfVec2d.hxx b/inc/TColgp_Array2OfVec2d.hxx
index 2f31204..ba9fec5 100644
--- a/inc/TColgp_Array2OfVec2d.hxx
+++ b/inc/TColgp_Array2OfVec2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Vec2d;
 class TColgp_Array2OfVec2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array2OfVec2d(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColgp_Array2OfXY.hxx b/inc/TColgp_Array2OfXY.hxx
index f1cfcba..cb79919 100644
--- a/inc/TColgp_Array2OfXY.hxx
+++ b/inc/TColgp_Array2OfXY.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_XY;
 class TColgp_Array2OfXY  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array2OfXY(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColgp_Array2OfXYZ.hxx b/inc/TColgp_Array2OfXYZ.hxx
index 02e1e4f..f73afe1 100644
--- a/inc/TColgp_Array2OfXYZ.hxx
+++ b/inc/TColgp_Array2OfXYZ.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_XYZ;
 class TColgp_Array2OfXYZ  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_Array2OfXYZ(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TColgp_DataMapIteratorOfDataMapOfIntegerCirc2d.hxx b/inc/TColgp_DataMapIteratorOfDataMapOfIntegerCirc2d.hxx
index c6d4670..9e0a723 100644
--- a/inc/TColgp_DataMapIteratorOfDataMapOfIntegerCirc2d.hxx
+++ b/inc/TColgp_DataMapIteratorOfDataMapOfIntegerCirc2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TColgp_DataMapNodeOfDataMapOfIntegerCirc2d;
 class TColgp_DataMapIteratorOfDataMapOfIntegerCirc2d  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_DataMapIteratorOfDataMapOfIntegerCirc2d();
diff --git a/inc/TColgp_DataMapOfIntegerCirc2d.hxx b/inc/TColgp_DataMapOfIntegerCirc2d.hxx
index 604a231..0a4947c 100644
--- a/inc/TColgp_DataMapOfIntegerCirc2d.hxx
+++ b/inc/TColgp_DataMapOfIntegerCirc2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TColgp_DataMapIteratorOfDataMapOfIntegerCirc2d;
 class TColgp_DataMapOfIntegerCirc2d  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TColgp_DataMapOfIntegerCirc2d(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TColgp_SequenceOfArray1OfPnt2d.hxx b/inc/TColgp_SequenceOfArray1OfPnt2d.hxx
index ae2d38c..dd984fd 100644
--- a/inc/TColgp_SequenceOfArray1OfPnt2d.hxx
+++ b/inc/TColgp_SequenceOfArray1OfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TColgp_SequenceNodeOfSequenceOfArray1OfPnt2d;
 class TColgp_SequenceOfArray1OfPnt2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColgp_SequenceOfArray1OfPnt2d();
diff --git a/inc/TColgp_SequenceOfDir.hxx b/inc/TColgp_SequenceOfDir.hxx
index 34e5168..a8e2a0d 100644
--- a/inc/TColgp_SequenceOfDir.hxx
+++ b/inc/TColgp_SequenceOfDir.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColgp_SequenceNodeOfSequenceOfDir;
 class TColgp_SequenceOfDir  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColgp_SequenceOfDir();
diff --git a/inc/TColgp_SequenceOfDir2d.hxx b/inc/TColgp_SequenceOfDir2d.hxx
index da02151..0935ff8 100644
--- a/inc/TColgp_SequenceOfDir2d.hxx
+++ b/inc/TColgp_SequenceOfDir2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColgp_SequenceNodeOfSequenceOfDir2d;
 class TColgp_SequenceOfDir2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColgp_SequenceOfDir2d();
diff --git a/inc/TColgp_SequenceOfPnt.hxx b/inc/TColgp_SequenceOfPnt.hxx
index eebd420..c30de72 100644
--- a/inc/TColgp_SequenceOfPnt.hxx
+++ b/inc/TColgp_SequenceOfPnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColgp_SequenceNodeOfSequenceOfPnt;
 class TColgp_SequenceOfPnt  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColgp_SequenceOfPnt();
diff --git a/inc/TColgp_SequenceOfPnt2d.hxx b/inc/TColgp_SequenceOfPnt2d.hxx
index 2320dfc..e0f2d51 100644
--- a/inc/TColgp_SequenceOfPnt2d.hxx
+++ b/inc/TColgp_SequenceOfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColgp_SequenceNodeOfSequenceOfPnt2d;
 class TColgp_SequenceOfPnt2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColgp_SequenceOfPnt2d();
diff --git a/inc/TColgp_SequenceOfVec.hxx b/inc/TColgp_SequenceOfVec.hxx
index 50ceabd..be6e6a8 100644
--- a/inc/TColgp_SequenceOfVec.hxx
+++ b/inc/TColgp_SequenceOfVec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColgp_SequenceNodeOfSequenceOfVec;
 class TColgp_SequenceOfVec  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColgp_SequenceOfVec();
diff --git a/inc/TColgp_SequenceOfVec2d.hxx b/inc/TColgp_SequenceOfVec2d.hxx
index 476e26f..894bca3 100644
--- a/inc/TColgp_SequenceOfVec2d.hxx
+++ b/inc/TColgp_SequenceOfVec2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColgp_SequenceNodeOfSequenceOfVec2d;
 class TColgp_SequenceOfVec2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColgp_SequenceOfVec2d();
diff --git a/inc/TColgp_SequenceOfXY.hxx b/inc/TColgp_SequenceOfXY.hxx
index 3eac7ae..51f210d 100644
--- a/inc/TColgp_SequenceOfXY.hxx
+++ b/inc/TColgp_SequenceOfXY.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColgp_SequenceNodeOfSequenceOfXY;
 class TColgp_SequenceOfXY  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColgp_SequenceOfXY();
diff --git a/inc/TColgp_SequenceOfXYZ.hxx b/inc/TColgp_SequenceOfXYZ.hxx
index 662e5cc..d5585f7 100644
--- a/inc/TColgp_SequenceOfXYZ.hxx
+++ b/inc/TColgp_SequenceOfXYZ.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TColgp_SequenceNodeOfSequenceOfXYZ;
 class TColgp_SequenceOfXYZ  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TColgp_SequenceOfXYZ();
diff --git a/inc/TCollection.hxx b/inc/TCollection.hxx
index 055560e..e9430ac 100644
--- a/inc/TCollection.hxx
+++ b/inc/TCollection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -79,18 +82,7 @@ class TCollection_AVLIterator;
 class TCollection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a  prime number greater than  <I> suitable <br>
 //! to dimension a Map.  When  <I> becomes great there <br>
diff --git a/inc/TCollection_Array1Descriptor.hxx b/inc/TCollection_Array1Descriptor.hxx
index bfd63ec..eee6724 100644
--- a/inc/TCollection_Array1Descriptor.hxx
+++ b/inc/TCollection_Array1Descriptor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class TCollection_Array1Descriptor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT     Standard_Integer Upper() const;
diff --git a/inc/TCollection_Array2Descriptor.hxx b/inc/TCollection_Array2Descriptor.hxx
index 9b4c5e8..8129fe1 100644
--- a/inc/TCollection_Array2Descriptor.hxx
+++ b/inc/TCollection_Array2Descriptor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class TCollection_Array2Descriptor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT     Standard_Integer UpperRow() const;
diff --git a/inc/TCollection_AsciiString.hxx b/inc/TCollection_AsciiString.hxx
index aa583e7..7ef5992 100644
--- a/inc/TCollection_AsciiString.hxx
+++ b/inc/TCollection_AsciiString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class TCollection_ExtendedString;
 class TCollection_AsciiString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes a AsciiString to an empty AsciiString. <br>
   Standard_EXPORT   TCollection_AsciiString();
diff --git a/inc/TCollection_BaseSequence.hxx b/inc/TCollection_BaseSequence.hxx
index b80f41d..e5ef5d0 100644
--- a/inc/TCollection_BaseSequence.hxx
+++ b/inc/TCollection_BaseSequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Standard_OutOfRange;
 class TCollection_BaseSequence  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns True if the sequence <me> contains no elements. <br>
         Standard_Boolean IsEmpty() const;
diff --git a/inc/TCollection_BasicMap.hxx b/inc/TCollection_BasicMap.hxx
index 39ca357..7295296 100644
--- a/inc/TCollection_BasicMap.hxx
+++ b/inc/TCollection_BasicMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -89,18 +92,7 @@ class TCollection_BasicMapIterator;
 class TCollection_BasicMap  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the number of buckets in <me>. <br>
         Standard_Integer NbBuckets() const;
diff --git a/inc/TCollection_BasicMapIterator.hxx b/inc/TCollection_BasicMapIterator.hxx
index 3b371ad..84105bc 100644
--- a/inc/TCollection_BasicMapIterator.hxx
+++ b/inc/TCollection_BasicMapIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class TCollection_BasicMap;
 class TCollection_BasicMapIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Resets the iterator to the first node. <br>
   Standard_EXPORT     void Reset() ;
diff --git a/inc/TCollection_CompareOfInteger.hxx b/inc/TCollection_CompareOfInteger.hxx
index d179fad..682f7fe 100644
--- a/inc/TCollection_CompareOfInteger.hxx
+++ b/inc/TCollection_CompareOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class TCollection_CompareOfInteger  : public TCollection_PrivCompareOfInteger {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TCollection_CompareOfInteger();
diff --git a/inc/TCollection_CompareOfReal.hxx b/inc/TCollection_CompareOfReal.hxx
index 3c6c975..13e4bc1 100644
--- a/inc/TCollection_CompareOfReal.hxx
+++ b/inc/TCollection_CompareOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class TCollection_CompareOfReal  : public TCollection_PrivCompareOfReal {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TCollection_CompareOfReal();
diff --git a/inc/TCollection_ExtendedString.hxx b/inc/TCollection_ExtendedString.hxx
index 704cf2c..20f2b84 100644
--- a/inc/TCollection_ExtendedString.hxx
+++ b/inc/TCollection_ExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class TCollection_AsciiString;
 class TCollection_ExtendedString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes a ExtendedString to an empty ExtendedString. <br>
   Standard_EXPORT   TCollection_ExtendedString();
diff --git a/inc/TCollection_PrivCompareOfInteger.hxx b/inc/TCollection_PrivCompareOfInteger.hxx
index 02baea0..812af96 100644
--- a/inc/TCollection_PrivCompareOfInteger.hxx
+++ b/inc/TCollection_PrivCompareOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class TCollection_PrivCompareOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  Standard_Boolean IsLower(const Standard_Integer& Left,const Standard_Integer& Right) const;
diff --git a/inc/TCollection_PrivCompareOfReal.hxx b/inc/TCollection_PrivCompareOfReal.hxx
index 4e6d9e2..507cc58 100644
--- a/inc/TCollection_PrivCompareOfReal.hxx
+++ b/inc/TCollection_PrivCompareOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class TCollection_PrivCompareOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  Standard_Boolean IsLower(const Standard_Real& Left,const Standard_Real& Right) const;
diff --git a/inc/TDF.hxx b/inc/TDF.hxx
index 1986fc5..7a86062 100644
--- a/inc/TDF.hxx
+++ b/inc/TDF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -115,18 +118,7 @@ class TDF_DoubleMapIteratorOfGUIDProgIDMap;
 class TDF  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns ID "00000000-0000-0000-0000-000000000000", <br>
 //!          sometimes used as null ID. <br>
diff --git a/inc/TDF_AttributeArray1.hxx b/inc/TDF_AttributeArray1.hxx
index 2e08f20..3d68a37 100644
--- a/inc/TDF_AttributeArray1.hxx
+++ b/inc/TDF_AttributeArray1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TDF_Attribute;
 class TDF_AttributeArray1  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_AttributeArray1(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TDF_AttributeDataMap.hxx b/inc/TDF_AttributeDataMap.hxx
index 3ef99af..ca279f7 100644
--- a/inc/TDF_AttributeDataMap.hxx
+++ b/inc/TDF_AttributeDataMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TDF_DataMapIteratorOfAttributeDataMap;
 class TDF_AttributeDataMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_AttributeDataMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDF_AttributeDeltaList.hxx b/inc/TDF_AttributeDeltaList.hxx
index 9fc47a5..cdbf6b9 100644
--- a/inc/TDF_AttributeDeltaList.hxx
+++ b/inc/TDF_AttributeDeltaList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TDF_ListNodeOfAttributeDeltaList;
 class TDF_AttributeDeltaList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_AttributeDeltaList();
diff --git a/inc/TDF_AttributeDoubleMap.hxx b/inc/TDF_AttributeDoubleMap.hxx
index b122a93..7c37cc6 100644
--- a/inc/TDF_AttributeDoubleMap.hxx
+++ b/inc/TDF_AttributeDoubleMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TDF_DoubleMapIteratorOfAttributeDoubleMap;
 class TDF_AttributeDoubleMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_AttributeDoubleMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDF_AttributeIndexedMap.hxx b/inc/TDF_AttributeIndexedMap.hxx
index 1e388ec..82f4b24 100644
--- a/inc/TDF_AttributeIndexedMap.hxx
+++ b/inc/TDF_AttributeIndexedMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TDF_IndexedMapNodeOfAttributeIndexedMap;
 class TDF_AttributeIndexedMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_AttributeIndexedMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDF_AttributeList.hxx b/inc/TDF_AttributeList.hxx
index 4d3a5c1..2b24cdb 100644
--- a/inc/TDF_AttributeList.hxx
+++ b/inc/TDF_AttributeList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TDF_ListNodeOfAttributeList;
 class TDF_AttributeList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_AttributeList();
diff --git a/inc/TDF_AttributeMap.hxx b/inc/TDF_AttributeMap.hxx
index 1b194cb..0da53ca 100644
--- a/inc/TDF_AttributeMap.hxx
+++ b/inc/TDF_AttributeMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TDF_MapIteratorOfAttributeMap;
 class TDF_AttributeMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_AttributeMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDF_AttributeSequence.hxx b/inc/TDF_AttributeSequence.hxx
index cb8384f..f320bec 100644
--- a/inc/TDF_AttributeSequence.hxx
+++ b/inc/TDF_AttributeSequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TDF_SequenceNodeOfAttributeSequence;
 class TDF_AttributeSequence  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TDF_AttributeSequence();
diff --git a/inc/TDF_ChildIDIterator.hxx b/inc/TDF_ChildIDIterator.hxx
index d30bf98..51887f8 100644
--- a/inc/TDF_ChildIDIterator.hxx
+++ b/inc/TDF_ChildIDIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Standard_GUID;
 class TDF_ChildIDIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty iterator. <br>
   Standard_EXPORT   TDF_ChildIDIterator();
diff --git a/inc/TDF_ChildIterator.hxx b/inc/TDF_ChildIterator.hxx
index edff0a4..b101e03 100644
--- a/inc/TDF_ChildIterator.hxx
+++ b/inc/TDF_ChildIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TDF_Label;
 class TDF_ChildIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty iterator  object to <br>
 //!  explore the children of a label. <br>
diff --git a/inc/TDF_ClosureMode.hxx b/inc/TDF_ClosureMode.hxx
index 9e56db8..1669dcc 100644
--- a/inc/TDF_ClosureMode.hxx
+++ b/inc/TDF_ClosureMode.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class TDF_ClosureMode  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an objet with all modes set to <aMode>. <br>
   Standard_EXPORT   TDF_ClosureMode(const Standard_Boolean aMode = Standard_True);
diff --git a/inc/TDF_ClosureTool.hxx b/inc/TDF_ClosureTool.hxx
index 037ee78..2eacd75 100644
--- a/inc/TDF_ClosureTool.hxx
+++ b/inc/TDF_ClosureTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TDF_AttributeMap;
 class TDF_ClosureTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Builds the transitive closure of label and <br>
 //!          attribute sets into <aDataSet>. <br>
diff --git a/inc/TDF_ComparisonTool.hxx b/inc/TDF_ComparisonTool.hxx
index 12fbe4d..9e4129e 100644
--- a/inc/TDF_ComparisonTool.hxx
+++ b/inc/TDF_ComparisonTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class TDF_Label;
 class TDF_ComparisonTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Compares <aSourceDataSet> with <aTargetDataSet>, <br>
 //!          updating <aRelocationTable> with labels and <br>
diff --git a/inc/TDF_CopyLabel.hxx b/inc/TDF_CopyLabel.hxx
index 0644da1..9c1f9f1 100644
--- a/inc/TDF_CopyLabel.hxx
+++ b/inc/TDF_CopyLabel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class TDF_DataSet;
 class TDF_CopyLabel  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty  constructor <br>
   Standard_EXPORT   TDF_CopyLabel();
diff --git a/inc/TDF_CopyTool.hxx b/inc/TDF_CopyTool.hxx
index 924e1ea..260b663 100644
--- a/inc/TDF_CopyTool.hxx
+++ b/inc/TDF_CopyTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -71,18 +74,7 @@ class TDF_AttributeMap;
 class TDF_CopyTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Copy   <aSourceDataSet> with using  and  updating <br>
 //!           <aRelocationTable>. This  method ignores   target <br>
diff --git a/inc/TDF_DataMapIteratorOfAttributeDataMap.hxx b/inc/TDF_DataMapIteratorOfAttributeDataMap.hxx
index e91da09..f39530d 100644
--- a/inc/TDF_DataMapIteratorOfAttributeDataMap.hxx
+++ b/inc/TDF_DataMapIteratorOfAttributeDataMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TDF_DataMapNodeOfAttributeDataMap;
 class TDF_DataMapIteratorOfAttributeDataMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_DataMapIteratorOfAttributeDataMap();
diff --git a/inc/TDF_DataMapIteratorOfLabelDataMap.hxx b/inc/TDF_DataMapIteratorOfLabelDataMap.hxx
index 45a3ffd..c9931df 100644
--- a/inc/TDF_DataMapIteratorOfLabelDataMap.hxx
+++ b/inc/TDF_DataMapIteratorOfLabelDataMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TDF_DataMapNodeOfLabelDataMap;
 class TDF_DataMapIteratorOfLabelDataMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_DataMapIteratorOfLabelDataMap();
diff --git a/inc/TDF_DataMapIteratorOfLabelIntegerMap.hxx b/inc/TDF_DataMapIteratorOfLabelIntegerMap.hxx
index 46c6ff3..1a77daf 100644
--- a/inc/TDF_DataMapIteratorOfLabelIntegerMap.hxx
+++ b/inc/TDF_DataMapIteratorOfLabelIntegerMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TDF_DataMapNodeOfLabelIntegerMap;
 class TDF_DataMapIteratorOfLabelIntegerMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_DataMapIteratorOfLabelIntegerMap();
diff --git a/inc/TDF_DataMapIteratorOfLabelLabelMap.hxx b/inc/TDF_DataMapIteratorOfLabelLabelMap.hxx
index 58d8d06..c2ee031 100644
--- a/inc/TDF_DataMapIteratorOfLabelLabelMap.hxx
+++ b/inc/TDF_DataMapIteratorOfLabelLabelMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TDF_DataMapNodeOfLabelLabelMap;
 class TDF_DataMapIteratorOfLabelLabelMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_DataMapIteratorOfLabelLabelMap();
diff --git a/inc/TDF_DeltaList.hxx b/inc/TDF_DeltaList.hxx
index 0a04ace..5afbc9b 100644
--- a/inc/TDF_DeltaList.hxx
+++ b/inc/TDF_DeltaList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TDF_ListNodeOfDeltaList;
 class TDF_DeltaList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_DeltaList();
diff --git a/inc/TDF_DoubleMapIteratorOfAttributeDoubleMap.hxx b/inc/TDF_DoubleMapIteratorOfAttributeDoubleMap.hxx
index 531d957..fc8c269 100644
--- a/inc/TDF_DoubleMapIteratorOfAttributeDoubleMap.hxx
+++ b/inc/TDF_DoubleMapIteratorOfAttributeDoubleMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TDF_DoubleMapNodeOfAttributeDoubleMap;
 class TDF_DoubleMapIteratorOfAttributeDoubleMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_DoubleMapIteratorOfAttributeDoubleMap();
diff --git a/inc/TDF_DoubleMapIteratorOfGUIDProgIDMap.hxx b/inc/TDF_DoubleMapIteratorOfGUIDProgIDMap.hxx
index 7d38fbf..d6bc421 100644
--- a/inc/TDF_DoubleMapIteratorOfGUIDProgIDMap.hxx
+++ b/inc/TDF_DoubleMapIteratorOfGUIDProgIDMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TDF_DoubleMapNodeOfGUIDProgIDMap;
 class TDF_DoubleMapIteratorOfGUIDProgIDMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_DoubleMapIteratorOfGUIDProgIDMap();
diff --git a/inc/TDF_DoubleMapIteratorOfLabelDoubleMap.hxx b/inc/TDF_DoubleMapIteratorOfLabelDoubleMap.hxx
index 6d1f0c3..211c80d 100644
--- a/inc/TDF_DoubleMapIteratorOfLabelDoubleMap.hxx
+++ b/inc/TDF_DoubleMapIteratorOfLabelDoubleMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TDF_DoubleMapNodeOfLabelDoubleMap;
 class TDF_DoubleMapIteratorOfLabelDoubleMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_DoubleMapIteratorOfLabelDoubleMap();
diff --git a/inc/TDF_GUIDProgIDMap.hxx b/inc/TDF_GUIDProgIDMap.hxx
index bf16e60..79ca7ad 100644
--- a/inc/TDF_GUIDProgIDMap.hxx
+++ b/inc/TDF_GUIDProgIDMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TDF_DoubleMapIteratorOfGUIDProgIDMap;
 class TDF_GUIDProgIDMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_GUIDProgIDMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDF_IDFilter.hxx b/inc/TDF_IDFilter.hxx
index 2695873..86300a1 100644
--- a/inc/TDF_IDFilter.hxx
+++ b/inc/TDF_IDFilter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TDF_Attribute;
 class TDF_IDFilter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an ID/attribute filter based on an ID <br>
 //!          list. The default mode is "ignore all but...". <br>
diff --git a/inc/TDF_IDList.hxx b/inc/TDF_IDList.hxx
index 8d01507..a1aba8f 100644
--- a/inc/TDF_IDList.hxx
+++ b/inc/TDF_IDList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TDF_ListNodeOfIDList;
 class TDF_IDList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_IDList();
diff --git a/inc/TDF_IDMap.hxx b/inc/TDF_IDMap.hxx
index d82f23a..3c1d20b 100644
--- a/inc/TDF_IDMap.hxx
+++ b/inc/TDF_IDMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TDF_MapIteratorOfIDMap;
 class TDF_IDMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_IDMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDF_Label.hxx b/inc/TDF_Label.hxx
index c55cec8..c51ea16 100644
--- a/inc/TDF_Label.hxx
+++ b/inc/TDF_Label.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class TDF_AttributeIndexedMap;
 class TDF_Label  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty label object. <br>
   Standard_EXPORT   TDF_Label();
diff --git a/inc/TDF_LabelDataMap.hxx b/inc/TDF_LabelDataMap.hxx
index efc421c..50b2c75 100644
--- a/inc/TDF_LabelDataMap.hxx
+++ b/inc/TDF_LabelDataMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TDF_DataMapIteratorOfLabelDataMap;
 class TDF_LabelDataMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_LabelDataMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDF_LabelDoubleMap.hxx b/inc/TDF_LabelDoubleMap.hxx
index 32be11d..735b0e1 100644
--- a/inc/TDF_LabelDoubleMap.hxx
+++ b/inc/TDF_LabelDoubleMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TDF_DoubleMapIteratorOfLabelDoubleMap;
 class TDF_LabelDoubleMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_LabelDoubleMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDF_LabelIndexedMap.hxx b/inc/TDF_LabelIndexedMap.hxx
index 1d51a39..d729a16 100644
--- a/inc/TDF_LabelIndexedMap.hxx
+++ b/inc/TDF_LabelIndexedMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TDF_IndexedMapNodeOfLabelIndexedMap;
 class TDF_LabelIndexedMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_LabelIndexedMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDF_LabelIntegerMap.hxx b/inc/TDF_LabelIntegerMap.hxx
index dee3876..79ef1ab 100644
--- a/inc/TDF_LabelIntegerMap.hxx
+++ b/inc/TDF_LabelIntegerMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TDF_DataMapIteratorOfLabelIntegerMap;
 class TDF_LabelIntegerMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_LabelIntegerMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDF_LabelLabelMap.hxx b/inc/TDF_LabelLabelMap.hxx
index 3f22d20..6621ffa 100644
--- a/inc/TDF_LabelLabelMap.hxx
+++ b/inc/TDF_LabelLabelMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TDF_DataMapIteratorOfLabelLabelMap;
 class TDF_LabelLabelMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_LabelLabelMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDF_LabelList.hxx b/inc/TDF_LabelList.hxx
index 604d6bb..e10c0a4 100644
--- a/inc/TDF_LabelList.hxx
+++ b/inc/TDF_LabelList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TDF_ListNodeOfLabelList;
 class TDF_LabelList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_LabelList();
diff --git a/inc/TDF_LabelMap.hxx b/inc/TDF_LabelMap.hxx
index d05a843..183be64 100644
--- a/inc/TDF_LabelMap.hxx
+++ b/inc/TDF_LabelMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TDF_MapIteratorOfLabelMap;
 class TDF_LabelMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_LabelMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDF_LabelMapHasher.hxx b/inc/TDF_LabelMapHasher.hxx
index 44351c8..66aa07e 100644
--- a/inc/TDF_LabelMapHasher.hxx
+++ b/inc/TDF_LabelMapHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TDF_Label;
 class TDF_LabelMapHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HasCode value  for  the  Key <K>  in the <br>
 //!          range 0..Upper. <br>
diff --git a/inc/TDF_LabelNode.hxx b/inc/TDF_LabelNode.hxx
index 948d9e6..81758f8 100644
--- a/inc/TDF_LabelNode.hxx
+++ b/inc/TDF_LabelNode.hxx
@@ -180,4 +180,4 @@ class TDF_LabelNode {
 #endif
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/inc/TDF_LabelSequence.hxx b/inc/TDF_LabelSequence.hxx
index 6cd3557..e7c0609 100644
--- a/inc/TDF_LabelSequence.hxx
+++ b/inc/TDF_LabelSequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TDF_SequenceNodeOfLabelSequence;
 class TDF_LabelSequence  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TDF_LabelSequence();
diff --git a/inc/TDF_ListIteratorOfAttributeDeltaList.hxx b/inc/TDF_ListIteratorOfAttributeDeltaList.hxx
index 7c81bd3..338f7e3 100644
--- a/inc/TDF_ListIteratorOfAttributeDeltaList.hxx
+++ b/inc/TDF_ListIteratorOfAttributeDeltaList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TDF_ListNodeOfAttributeDeltaList;
 class TDF_ListIteratorOfAttributeDeltaList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_ListIteratorOfAttributeDeltaList();
diff --git a/inc/TDF_ListIteratorOfAttributeList.hxx b/inc/TDF_ListIteratorOfAttributeList.hxx
index c2b61ff..03864b5 100644
--- a/inc/TDF_ListIteratorOfAttributeList.hxx
+++ b/inc/TDF_ListIteratorOfAttributeList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TDF_ListNodeOfAttributeList;
 class TDF_ListIteratorOfAttributeList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_ListIteratorOfAttributeList();
diff --git a/inc/TDF_ListIteratorOfDeltaList.hxx b/inc/TDF_ListIteratorOfDeltaList.hxx
index 2961c2a..151103b 100644
--- a/inc/TDF_ListIteratorOfDeltaList.hxx
+++ b/inc/TDF_ListIteratorOfDeltaList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TDF_ListNodeOfDeltaList;
 class TDF_ListIteratorOfDeltaList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_ListIteratorOfDeltaList();
diff --git a/inc/TDF_ListIteratorOfIDList.hxx b/inc/TDF_ListIteratorOfIDList.hxx
index 5eb44e5..b4127c3 100644
--- a/inc/TDF_ListIteratorOfIDList.hxx
+++ b/inc/TDF_ListIteratorOfIDList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TDF_ListNodeOfIDList;
 class TDF_ListIteratorOfIDList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_ListIteratorOfIDList();
diff --git a/inc/TDF_ListIteratorOfLabelList.hxx b/inc/TDF_ListIteratorOfLabelList.hxx
index 0bf70bd..331d7eb 100644
--- a/inc/TDF_ListIteratorOfLabelList.hxx
+++ b/inc/TDF_ListIteratorOfLabelList.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TDF_ListNodeOfLabelList;
 class TDF_ListIteratorOfLabelList  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_ListIteratorOfLabelList();
diff --git a/inc/TDF_MapIteratorOfAttributeMap.hxx b/inc/TDF_MapIteratorOfAttributeMap.hxx
index 7a7df2a..59566fc 100644
--- a/inc/TDF_MapIteratorOfAttributeMap.hxx
+++ b/inc/TDF_MapIteratorOfAttributeMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TDF_StdMapNodeOfAttributeMap;
 class TDF_MapIteratorOfAttributeMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_MapIteratorOfAttributeMap();
diff --git a/inc/TDF_MapIteratorOfIDMap.hxx b/inc/TDF_MapIteratorOfIDMap.hxx
index efc8a04..0121c5a 100644
--- a/inc/TDF_MapIteratorOfIDMap.hxx
+++ b/inc/TDF_MapIteratorOfIDMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TDF_StdMapNodeOfIDMap;
 class TDF_MapIteratorOfIDMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_MapIteratorOfIDMap();
diff --git a/inc/TDF_MapIteratorOfLabelMap.hxx b/inc/TDF_MapIteratorOfLabelMap.hxx
index 0ea831d..69a374d 100644
--- a/inc/TDF_MapIteratorOfLabelMap.hxx
+++ b/inc/TDF_MapIteratorOfLabelMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TDF_StdMapNodeOfLabelMap;
 class TDF_MapIteratorOfLabelMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDF_MapIteratorOfLabelMap();
diff --git a/inc/TDF_Tool.hxx b/inc/TDF_Tool.hxx
index c86d57c..ce4c21b 100644
--- a/inc/TDF_Tool.hxx
+++ b/inc/TDF_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class TDF_LabelIntegerMap;
 class TDF_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the number of labels of the tree, <br>
 //! including <aLabel>. aLabel is also included in this figure. <br>
diff --git a/inc/TDF_Transaction.hxx b/inc/TDF_Transaction.hxx
index 87bb3a1..6960080 100644
--- a/inc/TDF_Transaction.hxx
+++ b/inc/TDF_Transaction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class TCollection_AsciiString;
 class TDF_Transaction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty transaction context, unable to be <br>
 //!          opened. <br>
diff --git a/inc/TDataStd.hxx b/inc/TDataStd.hxx
index 61832bd..0040440 100644
--- a/inc/TDataStd.hxx
+++ b/inc/TDataStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -105,18 +108,7 @@ class TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal;
 class TDataStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Appends to <anIDList> the list of the attributes <br>
 //!          IDs of this package. CAUTION: <anIDList> is NOT <br>
diff --git a/inc/TDataStd_ChildNodeIterator.hxx b/inc/TDataStd_ChildNodeIterator.hxx
index 20d3f3b..31420ff 100644
--- a/inc/TDataStd_ChildNodeIterator.hxx
+++ b/inc/TDataStd_ChildNodeIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TDataStd_TreeNode;
 class TDataStd_ChildNodeIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty iterator. <br>
   Standard_EXPORT   TDataStd_ChildNodeIterator();
diff --git a/inc/TDataStd_DataMapIteratorOfDataMapOfStringByte.hxx b/inc/TDataStd_DataMapIteratorOfDataMapOfStringByte.hxx
index 33b86b1..5bdb875 100644
--- a/inc/TDataStd_DataMapIteratorOfDataMapOfStringByte.hxx
+++ b/inc/TDataStd_DataMapIteratorOfDataMapOfStringByte.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TDataStd_DataMapNodeOfDataMapOfStringByte;
 class TDataStd_DataMapIteratorOfDataMapOfStringByte  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_DataMapIteratorOfDataMapOfStringByte();
diff --git a/inc/TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger.hxx b/inc/TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger.hxx
index 98ab9d3..da3c3a0 100644
--- a/inc/TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger.hxx
+++ b/inc/TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TDataStd_DataMapNodeOfDataMapOfStringHArray1OfInteger;
 class TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger();
diff --git a/inc/TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal.hxx b/inc/TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal.hxx
index 2eba478..a78852d 100644
--- a/inc/TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal.hxx
+++ b/inc/TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TDataStd_DataMapNodeOfDataMapOfStringHArray1OfReal;
 class TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal();
diff --git a/inc/TDataStd_DataMapIteratorOfDataMapOfStringReal.hxx b/inc/TDataStd_DataMapIteratorOfDataMapOfStringReal.hxx
index 37b37f9..3f5253a 100644
--- a/inc/TDataStd_DataMapIteratorOfDataMapOfStringReal.hxx
+++ b/inc/TDataStd_DataMapIteratorOfDataMapOfStringReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TDataStd_DataMapNodeOfDataMapOfStringReal;
 class TDataStd_DataMapIteratorOfDataMapOfStringReal  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_DataMapIteratorOfDataMapOfStringReal();
diff --git a/inc/TDataStd_DataMapIteratorOfDataMapOfStringString.hxx b/inc/TDataStd_DataMapIteratorOfDataMapOfStringString.hxx
index 9c26a67..2d16334 100644
--- a/inc/TDataStd_DataMapIteratorOfDataMapOfStringString.hxx
+++ b/inc/TDataStd_DataMapIteratorOfDataMapOfStringString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TDataStd_DataMapNodeOfDataMapOfStringString;
 class TDataStd_DataMapIteratorOfDataMapOfStringString  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_DataMapIteratorOfDataMapOfStringString();
diff --git a/inc/TDataStd_DataMapOfStringByte.hxx b/inc/TDataStd_DataMapOfStringByte.hxx
index b82283f..65429ef 100644
--- a/inc/TDataStd_DataMapOfStringByte.hxx
+++ b/inc/TDataStd_DataMapOfStringByte.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class TDataStd_DataMapIteratorOfDataMapOfStringByte;
 class TDataStd_DataMapOfStringByte  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_DataMapOfStringByte(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDataStd_DataMapOfStringHArray1OfInteger.hxx b/inc/TDataStd_DataMapOfStringHArray1OfInteger.hxx
index 4d47b28..35722ff 100644
--- a/inc/TDataStd_DataMapOfStringHArray1OfInteger.hxx
+++ b/inc/TDataStd_DataMapOfStringHArray1OfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger;
 class TDataStd_DataMapOfStringHArray1OfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_DataMapOfStringHArray1OfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDataStd_DataMapOfStringHArray1OfReal.hxx b/inc/TDataStd_DataMapOfStringHArray1OfReal.hxx
index dd595c2..4557844 100644
--- a/inc/TDataStd_DataMapOfStringHArray1OfReal.hxx
+++ b/inc/TDataStd_DataMapOfStringHArray1OfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal;
 class TDataStd_DataMapOfStringHArray1OfReal  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_DataMapOfStringHArray1OfReal(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDataStd_DataMapOfStringReal.hxx b/inc/TDataStd_DataMapOfStringReal.hxx
index a0c5166..1975f12 100644
--- a/inc/TDataStd_DataMapOfStringReal.hxx
+++ b/inc/TDataStd_DataMapOfStringReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class TDataStd_DataMapIteratorOfDataMapOfStringReal;
 class TDataStd_DataMapOfStringReal  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_DataMapOfStringReal(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDataStd_DataMapOfStringString.hxx b/inc/TDataStd_DataMapOfStringString.hxx
index 20e1f2e..f4b72dd 100644
--- a/inc/TDataStd_DataMapOfStringString.hxx
+++ b/inc/TDataStd_DataMapOfStringString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TDataStd_DataMapIteratorOfDataMapOfStringString;
 class TDataStd_DataMapOfStringString  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_DataMapOfStringString(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDataStd_LabelArray1.hxx b/inc/TDataStd_LabelArray1.hxx
index 288792b..78b72c7 100644
--- a/inc/TDataStd_LabelArray1.hxx
+++ b/inc/TDataStd_LabelArray1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TDF_Label;
 class TDataStd_LabelArray1  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_LabelArray1(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TDataStd_ListIteratorOfListOfByte.hxx b/inc/TDataStd_ListIteratorOfListOfByte.hxx
index 059b00a..2dd3722 100644
--- a/inc/TDataStd_ListIteratorOfListOfByte.hxx
+++ b/inc/TDataStd_ListIteratorOfListOfByte.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TDataStd_ListNodeOfListOfByte;
 class TDataStd_ListIteratorOfListOfByte  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_ListIteratorOfListOfByte();
diff --git a/inc/TDataStd_ListIteratorOfListOfExtendedString.hxx b/inc/TDataStd_ListIteratorOfListOfExtendedString.hxx
index f069c6b..29c69fa 100644
--- a/inc/TDataStd_ListIteratorOfListOfExtendedString.hxx
+++ b/inc/TDataStd_ListIteratorOfListOfExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TDataStd_ListNodeOfListOfExtendedString;
 class TDataStd_ListIteratorOfListOfExtendedString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_ListIteratorOfListOfExtendedString();
diff --git a/inc/TDataStd_ListOfByte.hxx b/inc/TDataStd_ListOfByte.hxx
index 771fbcd..bb0766d 100644
--- a/inc/TDataStd_ListOfByte.hxx
+++ b/inc/TDataStd_ListOfByte.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TDataStd_ListNodeOfListOfByte;
 class TDataStd_ListOfByte  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_ListOfByte();
diff --git a/inc/TDataStd_ListOfExtendedString.hxx b/inc/TDataStd_ListOfExtendedString.hxx
index 4e4ba58..45cecb2 100644
--- a/inc/TDataStd_ListOfExtendedString.hxx
+++ b/inc/TDataStd_ListOfExtendedString.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TDataStd_ListNodeOfListOfExtendedString;
 class TDataStd_ListOfExtendedString  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataStd_ListOfExtendedString();
diff --git a/inc/TDataXtd.hxx b/inc/TDataXtd.hxx
index 3db3ec2..72e8340 100644
--- a/inc/TDataXtd.hxx
+++ b/inc/TDataXtd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class TDataXtd_HArray1OfTrsf;
 class TDataXtd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Appends to <anIDList> the list of the attributes <br>
 //!          IDs of this package. CAUTION: <anIDList> is NOT <br>
diff --git a/inc/TDataXtd_Array1OfTrsf.hxx b/inc/TDataXtd_Array1OfTrsf.hxx
index 6ea60bd..29b2e78 100644
--- a/inc/TDataXtd_Array1OfTrsf.hxx
+++ b/inc/TDataXtd_Array1OfTrsf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class gp_Trsf;
 class TDataXtd_Array1OfTrsf  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDataXtd_Array1OfTrsf(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TDocStd.hxx b/inc/TDocStd.hxx
index 15a49a3..0eea14b 100644
--- a/inc/TDocStd.hxx
+++ b/inc/TDocStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,7 @@ class TDocStd_SequenceNodeOfSequenceOfDocument;
 class TDocStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Appends to <anIDList> the list of the attributes <br>
 //!          IDs of this package. CAUTION: <anIDList> is NOT <br>
diff --git a/inc/TDocStd_Context.hxx b/inc/TDocStd_Context.hxx
index 3e1239c..e26cd16 100644
--- a/inc/TDocStd_Context.hxx
+++ b/inc/TDocStd_Context.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@
 class TDocStd_Context  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDocStd_Context();
diff --git a/inc/TDocStd_DataMapIteratorOfLabelIDMapDataMap.hxx b/inc/TDocStd_DataMapIteratorOfLabelIDMapDataMap.hxx
index b122b69..102dfbf 100644
--- a/inc/TDocStd_DataMapIteratorOfLabelIDMapDataMap.hxx
+++ b/inc/TDocStd_DataMapIteratorOfLabelIDMapDataMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TDocStd_DataMapNodeOfLabelIDMapDataMap;
 class TDocStd_DataMapIteratorOfLabelIDMapDataMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDocStd_DataMapIteratorOfLabelIDMapDataMap();
diff --git a/inc/TDocStd_LabelIDMapDataMap.hxx b/inc/TDocStd_LabelIDMapDataMap.hxx
index 20eca6b..6842737 100644
--- a/inc/TDocStd_LabelIDMapDataMap.hxx
+++ b/inc/TDocStd_LabelIDMapDataMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TDocStd_DataMapIteratorOfLabelIDMapDataMap;
 class TDocStd_LabelIDMapDataMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDocStd_LabelIDMapDataMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TDocStd_PathParser.hxx b/inc/TDocStd_PathParser.hxx
index 6c1e142..8008a65 100644
--- a/inc/TDocStd_PathParser.hxx
+++ b/inc/TDocStd_PathParser.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TCollection_ExtendedString;
 class TDocStd_PathParser  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDocStd_PathParser(const TCollection_ExtendedString& path);
diff --git a/inc/TDocStd_SequenceOfApplicationDelta.hxx b/inc/TDocStd_SequenceOfApplicationDelta.hxx
index 77239b3..69e7779 100644
--- a/inc/TDocStd_SequenceOfApplicationDelta.hxx
+++ b/inc/TDocStd_SequenceOfApplicationDelta.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TDocStd_SequenceNodeOfSequenceOfApplicationDelta;
 class TDocStd_SequenceOfApplicationDelta  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TDocStd_SequenceOfApplicationDelta();
diff --git a/inc/TDocStd_SequenceOfDocument.hxx b/inc/TDocStd_SequenceOfDocument.hxx
index bb62e33..b094b01 100644
--- a/inc/TDocStd_SequenceOfDocument.hxx
+++ b/inc/TDocStd_SequenceOfDocument.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TDocStd_SequenceNodeOfSequenceOfDocument;
 class TDocStd_SequenceOfDocument  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TDocStd_SequenceOfDocument();
diff --git a/inc/TDocStd_XLinkIterator.hxx b/inc/TDocStd_XLinkIterator.hxx
index aadaa68..550ae0d 100644
--- a/inc/TDocStd_XLinkIterator.hxx
+++ b/inc/TDocStd_XLinkIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TDocStd_Document;
 class TDocStd_XLinkIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns an empty iterator; <br>
   Standard_EXPORT   TDocStd_XLinkIterator();
diff --git a/inc/TDocStd_XLinkTool.hxx b/inc/TDocStd_XLinkTool.hxx
index 92a19bb..f2d8c5d 100644
--- a/inc/TDocStd_XLinkTool.hxx
+++ b/inc/TDocStd_XLinkTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TDF_Label;
 class TDocStd_XLinkTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TDocStd_XLinkTool();
diff --git a/inc/TFunction_Array1OfDataMapOfGUIDDriver.hxx b/inc/TFunction_Array1OfDataMapOfGUIDDriver.hxx
index 62173c0..0bf8355 100644
--- a/inc/TFunction_Array1OfDataMapOfGUIDDriver.hxx
+++ b/inc/TFunction_Array1OfDataMapOfGUIDDriver.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TFunction_DataMapOfGUIDDriver;
 class TFunction_Array1OfDataMapOfGUIDDriver  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TFunction_Array1OfDataMapOfGUIDDriver(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TFunction_DataMapIteratorOfDataMapOfGUIDDriver.hxx b/inc/TFunction_DataMapIteratorOfDataMapOfGUIDDriver.hxx
index 424879b..c283dfd 100644
--- a/inc/TFunction_DataMapIteratorOfDataMapOfGUIDDriver.hxx
+++ b/inc/TFunction_DataMapIteratorOfDataMapOfGUIDDriver.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TFunction_DataMapNodeOfDataMapOfGUIDDriver;
 class TFunction_DataMapIteratorOfDataMapOfGUIDDriver  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TFunction_DataMapIteratorOfDataMapOfGUIDDriver();
diff --git a/inc/TFunction_DataMapIteratorOfDataMapOfLabelListOfLabel.hxx b/inc/TFunction_DataMapIteratorOfDataMapOfLabelListOfLabel.hxx
index b383d7c..a2470f9 100644
--- a/inc/TFunction_DataMapIteratorOfDataMapOfLabelListOfLabel.hxx
+++ b/inc/TFunction_DataMapIteratorOfDataMapOfLabelListOfLabel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TFunction_DataMapNodeOfDataMapOfLabelListOfLabel;
 class TFunction_DataMapIteratorOfDataMapOfLabelListOfLabel  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TFunction_DataMapIteratorOfDataMapOfLabelListOfLabel();
diff --git a/inc/TFunction_DataMapOfGUIDDriver.hxx b/inc/TFunction_DataMapOfGUIDDriver.hxx
index 5cc603b..f48a596 100644
--- a/inc/TFunction_DataMapOfGUIDDriver.hxx
+++ b/inc/TFunction_DataMapOfGUIDDriver.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TFunction_DataMapIteratorOfDataMapOfGUIDDriver;
 class TFunction_DataMapOfGUIDDriver  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TFunction_DataMapOfGUIDDriver(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TFunction_DataMapOfLabelListOfLabel.hxx b/inc/TFunction_DataMapOfLabelListOfLabel.hxx
index b9b1eb4..fefce87 100644
--- a/inc/TFunction_DataMapOfLabelListOfLabel.hxx
+++ b/inc/TFunction_DataMapOfLabelListOfLabel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TFunction_DataMapIteratorOfDataMapOfLabelListOfLabel;
 class TFunction_DataMapOfLabelListOfLabel  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TFunction_DataMapOfLabelListOfLabel(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TFunction_DoubleMapIteratorOfDoubleMapOfIntegerLabel.hxx b/inc/TFunction_DoubleMapIteratorOfDoubleMapOfIntegerLabel.hxx
index 39b0e5e..027dcb3 100644
--- a/inc/TFunction_DoubleMapIteratorOfDoubleMapOfIntegerLabel.hxx
+++ b/inc/TFunction_DoubleMapIteratorOfDoubleMapOfIntegerLabel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TFunction_DoubleMapNodeOfDoubleMapOfIntegerLabel;
 class TFunction_DoubleMapIteratorOfDoubleMapOfIntegerLabel  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TFunction_DoubleMapIteratorOfDoubleMapOfIntegerLabel();
diff --git a/inc/TFunction_DoubleMapOfIntegerLabel.hxx b/inc/TFunction_DoubleMapOfIntegerLabel.hxx
index c22bdcf..60dab63 100644
--- a/inc/TFunction_DoubleMapOfIntegerLabel.hxx
+++ b/inc/TFunction_DoubleMapOfIntegerLabel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TFunction_DoubleMapIteratorOfDoubleMapOfIntegerLabel;
 class TFunction_DoubleMapOfIntegerLabel  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TFunction_DoubleMapOfIntegerLabel(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TFunction_IFunction.hxx b/inc/TFunction_IFunction.hxx
index 3710792..be3ad34 100644
--- a/inc/TFunction_IFunction.hxx
+++ b/inc/TFunction_IFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TFunction_GraphNode;
 class TFunction_IFunction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Sets a new function attached to a label <L> with <ID>. <br>
 //!          It creates a new TFunction_Function attribute initialized by the <ID>, <br>
diff --git a/inc/TFunction_Iterator.hxx b/inc/TFunction_Iterator.hxx
index 2c69944..4263e88 100644
--- a/inc/TFunction_Iterator.hxx
+++ b/inc/TFunction_Iterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TDF_LabelList;
 class TFunction_Iterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   TFunction_Iterator();
diff --git a/inc/TFunction_Logbook.hxx b/inc/TFunction_Logbook.hxx
index 3f55be6..b1646f4 100644
--- a/inc/TFunction_Logbook.hxx
+++ b/inc/TFunction_Logbook.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TDF_LabelMap;
 class TFunction_Logbook  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! next methods are solving declaration <br>
 //!          =================================== <br>
diff --git a/inc/TNaming.hxx b/inc/TNaming.hxx
index fc29af1..33f8321 100644
--- a/inc/TNaming.hxx
+++ b/inc/TNaming.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,6 +42,10 @@ class TNaming_NamedShape;
 class TopoDS_Shape;
 class TopTools_MapOfShape;
 class TopTools_HArray1OfShape;
+class TopoDS_Face;
+class TopoDS_Wire;
+class TopoDS_Solid;
+class TopoDS_Shell;
 class TDF_IDList;
 class TNaming_CopyShape;
 class TNaming_TranslateTool;
@@ -143,18 +150,7 @@ class TNaming_ListIteratorOfListOfIndexedDataMapOfShapeListOfShape;
 class TNaming  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Subtituter les  shapes  sur les structures de   source <br>
 //!          vers cible <br>
@@ -195,9 +191,13 @@ public:
 //!          of atomic shapes (Compound). The result is concatenation of <br>
 //!          single contexts <br>
   Standard_EXPORT   static  TopoDS_Shape FindUniqueContextSet(const TopoDS_Shape& S,const TopoDS_Shape& Context,Handle(TopTools_HArray1OfShape)& Arr) ;
-  //! Subtitutes shape in source structure <br>//! Print of TNaming enumeration <br>
-//!          ============================= <br>
+  //! Subtitutes shape in source structure <br>
   Standard_EXPORT   static  Standard_Boolean SubstituteSShape(const TDF_Label& accesslabel,const TopoDS_Shape& From,TopoDS_Shape& To) ;
+  //! Returns True if outer wire is found and the found wire in <theWire>. <br>
+  Standard_EXPORT   static  Standard_Boolean OuterWire(const TopoDS_Face& theFace,TopoDS_Wire& theWire) ;
+  //! Returns True if outer Shell is found and the found shell in <theShell>. <br>//! Print of TNaming enumeration <br>
+//!          ============================= <br>
+  Standard_EXPORT   static  Standard_Boolean OuterShell(const TopoDS_Solid& theSolid,TopoDS_Shell& theShell) ;
   //! Appends to <anIDList> the list of the attributes <br>
 //!          IDs of this package. CAUTION: <anIDList> is NOT <br>
 //!          cleared before use. <br>
diff --git a/inc/TNaming_Builder.hxx b/inc/TNaming_Builder.hxx
index ad9e2a5..f4eccff 100644
--- a/inc/TNaming_Builder.hxx
+++ b/inc/TNaming_Builder.hxx
@@ -9,27 +9,27 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
 
-#ifndef _TNaming_PtrDataMapOfShapePtrRefShape_HeaderFile
-#include <TNaming_PtrDataMapOfShapePtrRefShape.hxx>
-#endif
-#ifndef _TNaming_PtrAttribute_HeaderFile
-#include <TNaming_PtrAttribute.hxx>
+#ifndef _Handle_TNaming_UsedShapes_HeaderFile
+#include <Handle_TNaming_UsedShapes.hxx>
 #endif
 #ifndef _Handle_TNaming_NamedShape_HeaderFile
 #include <Handle_TNaming_NamedShape.hxx>
 #endif
+class TNaming_UsedShapes;
+class TNaming_NamedShape;
 class Standard_ConstructionError;
 class TDF_Label;
 class TopoDS_Shape;
-class TNaming_NamedShape;
 
 
-//! A tool to create and maintain topological <br>
-//! attributes. <br>
+//! A tool to create and maintain topological attributes. <br>
 //! Constructor creates an empty <br>
 //! TNaming_NamedShape attribute at the given <br>
 //! label. It allows adding "old shape" and "new <br>
@@ -39,18 +39,7 @@ class TNaming_NamedShape;
 class TNaming_Builder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!  Create an   Builder. <br>
 //!  Warning:  Before Addition copies the current Value, and clear <br>
@@ -74,17 +63,11 @@ public:
 //!  or merged in a Boolean operation. <br>
 //! <br>
   Standard_EXPORT     void Modify(const TopoDS_Shape& oldShape,const TopoDS_Shape& newShape) ;
-  //! Records the shape newShape which is a <br>
-//! modification of the shape oldShape but has a <br>
-//! different geometry as a result of the construction operation. <br>
-//! As an example, consider the case of a face <br>
-//! resulting from construction of a draft in a box or prism. <br>
-  Standard_EXPORT     void Replace(const TopoDS_Shape& oldShape,const TopoDS_Shape& newShape) ;
   //!   Add a  Shape to the current label ,  This Shape is <br>
 //!          unmodified.  Used for example  to define a set <br>
 //!          of shapes under a label. <br>
   Standard_EXPORT     void Select(const TopoDS_Shape& aShape,const TopoDS_Shape& inShape) ;
-  //! Returns the NamedShape which has been build or is under construction. <br>
+  //! Returns the NamedShape which has been built or is under construction. <br>
   Standard_EXPORT     Handle_TNaming_NamedShape NamedShape() const;
 
 
@@ -101,8 +84,8 @@ private:
 
 
 
-TNaming_PtrDataMapOfShapePtrRefShape myMap;
-TNaming_PtrAttribute myAtt;
+Handle_TNaming_UsedShapes myShapes;
+Handle_TNaming_NamedShape myAtt;
 
 
 };
diff --git a/inc/TNaming_CopyShape.hxx b/inc/TNaming_CopyShape.hxx
index d4c0e7a..d543f44 100644
--- a/inc/TNaming_CopyShape.hxx
+++ b/inc/TNaming_CopyShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TopLoc_Location;
 class TNaming_CopyShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!      Makes  copy  a  set  of  shape(s),  using the  aMap <br>
   Standard_EXPORT   static  void CopyTool(const TopoDS_Shape& aShape,TColStd_IndexedDataMapOfTransientTransient& aMap,TopoDS_Shape& aResult) ;
diff --git a/inc/TNaming_DataMapIteratorOfDataMapOfShapePtrRefShape.hxx b/inc/TNaming_DataMapIteratorOfDataMapOfShapePtrRefShape.hxx
index 8e0a3a7..1527313 100644
--- a/inc/TNaming_DataMapIteratorOfDataMapOfShapePtrRefShape.hxx
+++ b/inc/TNaming_DataMapIteratorOfDataMapOfShapePtrRefShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TNaming_DataMapNodeOfDataMapOfShapePtrRefShape;
 class TNaming_DataMapIteratorOfDataMapOfShapePtrRefShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_DataMapIteratorOfDataMapOfShapePtrRefShape();
diff --git a/inc/TNaming_DataMapIteratorOfDataMapOfShapeShapesSet.hxx b/inc/TNaming_DataMapIteratorOfDataMapOfShapeShapesSet.hxx
index e285c57..911d46f 100644
--- a/inc/TNaming_DataMapIteratorOfDataMapOfShapeShapesSet.hxx
+++ b/inc/TNaming_DataMapIteratorOfDataMapOfShapeShapesSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TNaming_DataMapNodeOfDataMapOfShapeShapesSet;
 class TNaming_DataMapIteratorOfDataMapOfShapeShapesSet  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_DataMapIteratorOfDataMapOfShapeShapesSet();
diff --git a/inc/TNaming_DataMapOfShapePtrRefShape.hxx b/inc/TNaming_DataMapOfShapePtrRefShape.hxx
index 66caaf3..b0ed72e 100644
--- a/inc/TNaming_DataMapOfShapePtrRefShape.hxx
+++ b/inc/TNaming_DataMapOfShapePtrRefShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TNaming_DataMapIteratorOfDataMapOfShapePtrRefShape;
 class TNaming_DataMapOfShapePtrRefShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_DataMapOfShapePtrRefShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TNaming_DataMapOfShapeShapesSet.hxx b/inc/TNaming_DataMapOfShapeShapesSet.hxx
index 7cea005..a144eb6 100644
--- a/inc/TNaming_DataMapOfShapeShapesSet.hxx
+++ b/inc/TNaming_DataMapOfShapeShapesSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TNaming_DataMapIteratorOfDataMapOfShapeShapesSet;
 class TNaming_DataMapOfShapeShapesSet  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_DataMapOfShapeShapesSet(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TNaming_Identifier.hxx b/inc/TNaming_Identifier.hxx
index 140baa6..6cf52ba 100644
--- a/inc/TNaming_Identifier.hxx
+++ b/inc/TNaming_Identifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TNaming_Localizer;
 class TNaming_Identifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_Identifier(const TDF_Label& Lab,const TopoDS_Shape& S,const TopoDS_Shape& Context,const Standard_Boolean Geom);
diff --git a/inc/TNaming_Iterator.hxx b/inc/TNaming_Iterator.hxx
index 2439b42..26c254b 100644
--- a/inc/TNaming_Iterator.hxx
+++ b/inc/TNaming_Iterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TopoDS_Shape;
 class TNaming_Iterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Iterates on all  the history records in <br>
 //!          <anAtt>. <br>
diff --git a/inc/TNaming_IteratorOnShapesSet.hxx b/inc/TNaming_IteratorOnShapesSet.hxx
index b04f662..f91ef36 100644
--- a/inc/TNaming_IteratorOnShapesSet.hxx
+++ b/inc/TNaming_IteratorOnShapesSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Shape;
 class TNaming_IteratorOnShapesSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TNaming_IteratorOnShapesSet();
diff --git a/inc/TNaming_ListIteratorOfListOfIndexedDataMapOfShapeListOfShape.hxx b/inc/TNaming_ListIteratorOfListOfIndexedDataMapOfShapeListOfShape.hxx
index d2a4975..0cbb967 100644
--- a/inc/TNaming_ListIteratorOfListOfIndexedDataMapOfShapeListOfShape.hxx
+++ b/inc/TNaming_ListIteratorOfListOfIndexedDataMapOfShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TNaming_ListNodeOfListOfIndexedDataMapOfShapeListOfShape;
 class TNaming_ListIteratorOfListOfIndexedDataMapOfShapeListOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_ListIteratorOfListOfIndexedDataMapOfShapeListOfShape();
diff --git a/inc/TNaming_ListIteratorOfListOfMapOfShape.hxx b/inc/TNaming_ListIteratorOfListOfMapOfShape.hxx
index 20733a7..2464214 100644
--- a/inc/TNaming_ListIteratorOfListOfMapOfShape.hxx
+++ b/inc/TNaming_ListIteratorOfListOfMapOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TNaming_ListNodeOfListOfMapOfShape;
 class TNaming_ListIteratorOfListOfMapOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_ListIteratorOfListOfMapOfShape();
diff --git a/inc/TNaming_ListIteratorOfListOfNamedShape.hxx b/inc/TNaming_ListIteratorOfListOfNamedShape.hxx
index 4d484b0..0cb2582 100644
--- a/inc/TNaming_ListIteratorOfListOfNamedShape.hxx
+++ b/inc/TNaming_ListIteratorOfListOfNamedShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TNaming_ListNodeOfListOfNamedShape;
 class TNaming_ListIteratorOfListOfNamedShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_ListIteratorOfListOfNamedShape();
diff --git a/inc/TNaming_ListOfIndexedDataMapOfShapeListOfShape.hxx b/inc/TNaming_ListOfIndexedDataMapOfShapeListOfShape.hxx
index ddde693..0315505 100644
--- a/inc/TNaming_ListOfIndexedDataMapOfShapeListOfShape.hxx
+++ b/inc/TNaming_ListOfIndexedDataMapOfShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TNaming_ListNodeOfListOfIndexedDataMapOfShapeListOfShape;
 class TNaming_ListOfIndexedDataMapOfShapeListOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_ListOfIndexedDataMapOfShapeListOfShape();
diff --git a/inc/TNaming_ListOfMapOfShape.hxx b/inc/TNaming_ListOfMapOfShape.hxx
index ab99452..984e655 100644
--- a/inc/TNaming_ListOfMapOfShape.hxx
+++ b/inc/TNaming_ListOfMapOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TNaming_ListNodeOfListOfMapOfShape;
 class TNaming_ListOfMapOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_ListOfMapOfShape();
diff --git a/inc/TNaming_ListOfNamedShape.hxx b/inc/TNaming_ListOfNamedShape.hxx
index c9574f9..c829aa5 100644
--- a/inc/TNaming_ListOfNamedShape.hxx
+++ b/inc/TNaming_ListOfNamedShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TNaming_ListNodeOfListOfNamedShape;
 class TNaming_ListOfNamedShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_ListOfNamedShape();
diff --git a/inc/TNaming_Localizer.hxx b/inc/TNaming_Localizer.hxx
index 759c32a..2131c75 100644
--- a/inc/TNaming_Localizer.hxx
+++ b/inc/TNaming_Localizer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class TNaming_MapOfNamedShape;
 class TNaming_Localizer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_Localizer();
diff --git a/inc/TNaming_MapIteratorOfMapOfNamedShape.hxx b/inc/TNaming_MapIteratorOfMapOfNamedShape.hxx
index b46d4c1..71c4fd2 100644
--- a/inc/TNaming_MapIteratorOfMapOfNamedShape.hxx
+++ b/inc/TNaming_MapIteratorOfMapOfNamedShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TNaming_StdMapNodeOfMapOfNamedShape;
 class TNaming_MapIteratorOfMapOfNamedShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_MapIteratorOfMapOfNamedShape();
diff --git a/inc/TNaming_MapOfNamedShape.hxx b/inc/TNaming_MapOfNamedShape.hxx
index ac9275b..061ca36 100644
--- a/inc/TNaming_MapOfNamedShape.hxx
+++ b/inc/TNaming_MapOfNamedShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TNaming_MapIteratorOfMapOfNamedShape;
 class TNaming_MapOfNamedShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_MapOfNamedShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TNaming_Name.hxx b/inc/TNaming_Name.hxx
index c1fcf3b..cf55447 100644
--- a/inc/TNaming_Name.hxx
+++ b/inc/TNaming_Name.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class TDF_RelocationTable;
 class TNaming_Name  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_Name();
diff --git a/inc/TNaming_NameType.hxx b/inc/TNaming_NameType.hxx
index b6db5e4..a76dcb5 100644
--- a/inc/TNaming_NameType.hxx
+++ b/inc/TNaming_NameType.hxx
@@ -19,7 +19,8 @@ TNaming_SUBSTRACTION,
 TNaming_CONSTSHAPE,
 TNaming_FILTERBYNEIGHBOURGS,
 TNaming_ORIENTATION,
-TNaming_WIREIN
+TNaming_WIREIN,
+TNaming_SHELLIN
 };
 
 #ifndef _Standard_PrimitiveTypes_HeaderFile
diff --git a/inc/TNaming_NamedShape.hxx b/inc/TNaming_NamedShape.hxx
index 0f06ecf..e4bed33 100644
--- a/inc/TNaming_NamedShape.hxx
+++ b/inc/TNaming_NamedShape.hxx
@@ -96,6 +96,10 @@ public:
         void SetVersion(const Standard_Integer version) ;
   
   Standard_EXPORT     void Clear() ;
+~TNaming_NamedShape()
+{
+  Clear();
+}
   //! Returns the ID of the attribute. <br>
        const Standard_GUID& ID() const;
   //! Copies  the attribute  contents into  a  new other <br>
@@ -124,8 +128,6 @@ public:
 //!          attribute may be a brand new one or a new version <br>
 //!          of the previous one. <br>
   Standard_EXPORT   virtual  void Paste(const Handle(TDF_Attribute)& intoAttribute,const Handle(TDF_RelocationTable)& aRelocTationable) const;
-  
-  Standard_EXPORT     void OldPaste(const Handle(TDF_Attribute)& intoAttribute,const Handle(TDF_RelocationTable)& aRelocTationable) const;
   //! Adds the directly referenced attributes and labels <br>
 //!          to <aDataSet>. "Directly" means we have only to <br>
 //!          look at the first level of references. <br>
@@ -139,7 +141,6 @@ public:
   //! Dumps the attribute on <aStream>. <br>
   Standard_EXPORT   virtual  Standard_OStream& Dump(Standard_OStream& anOS) const;
 
-
 friend class TNaming_Builder;
 friend class TNaming_Iterator;
 friend class TNaming_NewShapeIterator;
diff --git a/inc/TNaming_NamedShapeHasher.hxx b/inc/TNaming_NamedShapeHasher.hxx
index ed0a068..85a5da3 100644
--- a/inc/TNaming_NamedShapeHasher.hxx
+++ b/inc/TNaming_NamedShapeHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TNaming_NamedShape;
 class TNaming_NamedShapeHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const Handle(TNaming_NamedShape)& K,const Standard_Integer Upper) ;
diff --git a/inc/TNaming_NamingTool.hxx b/inc/TNaming_NamingTool.hxx
index 4272d2a..d9f394b 100644
--- a/inc/TNaming_NamingTool.hxx
+++ b/inc/TNaming_NamingTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class TopoDS_Shape;
 class TNaming_NamingTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void CurrentShape(const TDF_LabelMap& Valid,const TDF_LabelMap& Forbiden,const Handle(TNaming_NamedShape)& NS,TopTools_MapOfShape& MS) ;
diff --git a/inc/TNaming_NewShapeIterator.hxx b/inc/TNaming_NewShapeIterator.hxx
index 3c2e3de..dc0f14e 100644
--- a/inc/TNaming_NewShapeIterator.hxx
+++ b/inc/TNaming_NewShapeIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TNaming_NamedShape;
 class TNaming_NewShapeIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_NewShapeIterator(const TopoDS_Shape& aShape,const Standard_Integer Transaction,const TDF_Label& access);
diff --git a/inc/TNaming_OldShapeIterator.hxx b/inc/TNaming_OldShapeIterator.hxx
index 4771f6c..61c03c4 100644
--- a/inc/TNaming_OldShapeIterator.hxx
+++ b/inc/TNaming_OldShapeIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TNaming_NamedShape;
 class TNaming_OldShapeIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_OldShapeIterator(const TopoDS_Shape& aShape,const Standard_Integer Transaction,const TDF_Label& access);
diff --git a/inc/TNaming_RefShape.hxx b/inc/TNaming_RefShape.hxx
index 81cd9c2..040aba8 100644
--- a/inc/TNaming_RefShape.hxx
+++ b/inc/TNaming_RefShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TNaming_NamedShape;
 class TNaming_RefShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TNaming_RefShape();
diff --git a/inc/TNaming_SameShapeIterator.hxx b/inc/TNaming_SameShapeIterator.hxx
index 9687c1e..4096834 100644
--- a/inc/TNaming_SameShapeIterator.hxx
+++ b/inc/TNaming_SameShapeIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TDF_Label;
 class TNaming_SameShapeIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_SameShapeIterator(const TopoDS_Shape& aShape,const TDF_Label& access);
diff --git a/inc/TNaming_Scope.hxx b/inc/TNaming_Scope.hxx
index 64a4782..5c12629 100644
--- a/inc/TNaming_Scope.hxx
+++ b/inc/TNaming_Scope.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TNaming_NamedShape;
 class TNaming_Scope  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! WithValid = FALSE <br>
   Standard_EXPORT   TNaming_Scope();
diff --git a/inc/TNaming_Selector.hxx b/inc/TNaming_Selector.hxx
index 2fac6cb..e03da6e 100644
--- a/inc/TNaming_Selector.hxx
+++ b/inc/TNaming_Selector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class TDF_AttributeMap;
 class TNaming_Selector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! To know if a shape is already identified (not selected) <br>
 //!          ======================================================= <br>
diff --git a/inc/TNaming_ShapesSet.hxx b/inc/TNaming_ShapesSet.hxx
index c33b95e..b42be93 100644
--- a/inc/TNaming_ShapesSet.hxx
+++ b/inc/TNaming_ShapesSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopTools_MapOfShape;
 class TNaming_ShapesSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TNaming_ShapesSet();
diff --git a/inc/TNaming_Tool.hxx b/inc/TNaming_Tool.hxx
index e39e3d4..f784de8 100644
--- a/inc/TNaming_Tool.hxx
+++ b/inc/TNaming_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopTools_MapOfShape;
 class TNaming_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the last Modification of <NS>. <br>
 //! Returns the shape CurrentShape contained in <br>
diff --git a/inc/TNaming_Translator.hxx b/inc/TNaming_Translator.hxx
index 5aa919a..607c5b7 100644
--- a/inc/TNaming_Translator.hxx
+++ b/inc/TNaming_Translator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopTools_DataMapOfShapeShape;
 class TNaming_Translator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TNaming_Translator();
diff --git a/inc/TObjDRAW.hxx b/inc/TObjDRAW.hxx
index 2fda90d..06fb459 100644
--- a/inc/TObjDRAW.hxx
+++ b/inc/TObjDRAW.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -20,18 +23,7 @@ class Draw_Interpretor;
 class TObjDRAW  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes all the functions <br>
   Standard_EXPORT   static  void Init(Draw_Interpretor& di) ;
diff --git a/inc/TObj_TIntSparseArray.hxx b/inc/TObj_TIntSparseArray.hxx
index 0b62c41..ee7929a 100644
--- a/inc/TObj_TIntSparseArray.hxx
+++ b/inc/TObj_TIntSparseArray.hxx
@@ -62,7 +62,7 @@ class TObj_TIntSparseArray : public TDF_Attribute
   //! Methods for access to data
 
   //! Returns the number of stored values in the set
-  Standard_EXPORT Standard_Integer Size() const
+  Standard_EXPORT Standard_Size Size() const
   { return myVector.Size(); }
 
   typedef TObj_TIntSparseArray_VecOfData::ConstIterator Iterator;
@@ -71,22 +71,22 @@ class TObj_TIntSparseArray : public TDF_Attribute
   Iterator GetIterator() const { return Iterator(myVector); }
 
   //! Returns true if the value with the given ID is present.
-  Standard_Boolean HasValue (const Standard_Integer theId) const
+  Standard_Boolean HasValue (const Standard_Size theId) const
   { return myVector.HasValue(theId); }
 
   //! Returns the value by its ID.
   //! Raises an exception if no value is stored with this ID
-  Standard_Integer Value (const Standard_Integer theId) const
+  Standard_Integer Value (const Standard_Size theId) const
   { return myVector.Value(theId); }
 
   //! Sets the value with the given ID.
   //! Raises an exception if theId is not positive
-  Standard_EXPORT void SetValue (const Standard_Integer theId,
+  Standard_EXPORT void SetValue (const Standard_Size theId,
                                  const Standard_Integer theValue);
 
   //! Unsets the value with the given ID.
   //! Raises an exception if theId is not positive
-  Standard_EXPORT void UnsetValue(const Standard_Integer theId);
+  Standard_EXPORT void UnsetValue(const Standard_Size theId);
 
   //! Clears the set
   Standard_EXPORT void Clear ();
@@ -142,7 +142,7 @@ class TObj_TIntSparseArray : public TDF_Attribute
   };
 
   //! backup one value
-  void backupValue (const Standard_Integer theId,
+  void backupValue (const Standard_Size theId,
                     const Standard_Integer theCurrValue,
                     const Standard_Integer theNewValue);
 
diff --git a/inc/TPrsStd_ConstraintTools.hxx b/inc/TPrsStd_ConstraintTools.hxx
index 94fecd4..2363bd3 100644
--- a/inc/TPrsStd_ConstraintTools.hxx
+++ b/inc/TPrsStd_ConstraintTools.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Geom_Geometry;
 class TPrsStd_ConstraintTools  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void UpdateOnlyValue(const Handle(TDataXtd_Constraint)& aConst,const Handle(AIS_InteractiveObject)& anAIS) ;
diff --git a/inc/TPrsStd_DataMapIteratorOfDataMapOfGUIDDriver.hxx b/inc/TPrsStd_DataMapIteratorOfDataMapOfGUIDDriver.hxx
index 3abcc5d..7e50fa2 100644
--- a/inc/TPrsStd_DataMapIteratorOfDataMapOfGUIDDriver.hxx
+++ b/inc/TPrsStd_DataMapIteratorOfDataMapOfGUIDDriver.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TPrsStd_DataMapNodeOfDataMapOfGUIDDriver;
 class TPrsStd_DataMapIteratorOfDataMapOfGUIDDriver  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TPrsStd_DataMapIteratorOfDataMapOfGUIDDriver();
diff --git a/inc/TPrsStd_DataMapOfGUIDDriver.hxx b/inc/TPrsStd_DataMapOfGUIDDriver.hxx
index 23a1a1a..87c824c 100644
--- a/inc/TPrsStd_DataMapOfGUIDDriver.hxx
+++ b/inc/TPrsStd_DataMapOfGUIDDriver.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TPrsStd_DataMapIteratorOfDataMapOfGUIDDriver;
 class TPrsStd_DataMapOfGUIDDriver  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TPrsStd_DataMapOfGUIDDriver(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TShort_Array1OfShortReal.hxx b/inc/TShort_Array1OfShortReal.hxx
index 84fe59f..e1f3cf6 100644
--- a/inc/TShort_Array1OfShortReal.hxx
+++ b/inc/TShort_Array1OfShortReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_OutOfMemory;
 class TShort_Array1OfShortReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TShort_Array1OfShortReal(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TShort_Array2OfShortReal.hxx b/inc/TShort_Array2OfShortReal.hxx
index 3a2d581..aa8c975 100644
--- a/inc/TShort_Array2OfShortReal.hxx
+++ b/inc/TShort_Array2OfShortReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_DimensionMismatch;
 class TShort_Array2OfShortReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TShort_Array2OfShortReal(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TShort_SequenceOfShortReal.hxx b/inc/TShort_SequenceOfShortReal.hxx
index 7ef7240..95188ff 100644
--- a/inc/TShort_SequenceOfShortReal.hxx
+++ b/inc/TShort_SequenceOfShortReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TShort_SequenceNodeOfSequenceOfShortReal;
 class TShort_SequenceOfShortReal  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TShort_SequenceOfShortReal();
diff --git a/inc/TestTopOpe.hxx b/inc/TestTopOpe.hxx
index 067a90d..a065f12 100644
--- a/inc/TestTopOpe.hxx
+++ b/inc/TestTopOpe.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Shape;
 class TestTopOpe  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines all Top. Ope. test commands <br>
   Standard_EXPORT   static  void AllCommands(Draw_Interpretor& I) ;
diff --git a/inc/TestTopOpeDraw.hxx b/inc/TestTopOpeDraw.hxx
index 5022461..dcae37d 100644
--- a/inc/TestTopOpeDraw.hxx
+++ b/inc/TestTopOpeDraw.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TestTopOpeDraw_ListIteratorOfListOfPnt2d;
 class TestTopOpeDraw  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void AllCommands(Draw_Interpretor& I) ;
diff --git a/inc/TestTopOpeDraw_Array1OfDrawableMesure.hxx b/inc/TestTopOpeDraw_Array1OfDrawableMesure.hxx
index 0492dce..6e91cf4 100644
--- a/inc/TestTopOpeDraw_Array1OfDrawableMesure.hxx
+++ b/inc/TestTopOpeDraw_Array1OfDrawableMesure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TestTopOpeDraw_DrawableMesure;
 class TestTopOpeDraw_Array1OfDrawableMesure  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TestTopOpeDraw_Array1OfDrawableMesure(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TestTopOpeDraw_Array1OfDrawableP3D.hxx b/inc/TestTopOpeDraw_Array1OfDrawableP3D.hxx
index be838b9..cb4a2ac 100644
--- a/inc/TestTopOpeDraw_Array1OfDrawableP3D.hxx
+++ b/inc/TestTopOpeDraw_Array1OfDrawableP3D.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TestTopOpeDraw_DrawableP3D;
 class TestTopOpeDraw_Array1OfDrawableP3D  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TestTopOpeDraw_Array1OfDrawableP3D(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TestTopOpeDraw_ListIteratorOfListOfPnt2d.hxx b/inc/TestTopOpeDraw_ListIteratorOfListOfPnt2d.hxx
index 41af2f0..e766d8c 100644
--- a/inc/TestTopOpeDraw_ListIteratorOfListOfPnt2d.hxx
+++ b/inc/TestTopOpeDraw_ListIteratorOfListOfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TestTopOpeDraw_ListNodeOfListOfPnt2d;
 class TestTopOpeDraw_ListIteratorOfListOfPnt2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TestTopOpeDraw_ListIteratorOfListOfPnt2d();
diff --git a/inc/TestTopOpeDraw_ListOfPnt2d.hxx b/inc/TestTopOpeDraw_ListOfPnt2d.hxx
index 1b961a1..675885d 100644
--- a/inc/TestTopOpeDraw_ListOfPnt2d.hxx
+++ b/inc/TestTopOpeDraw_ListOfPnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TestTopOpeDraw_ListNodeOfListOfPnt2d;
 class TestTopOpeDraw_ListOfPnt2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TestTopOpeDraw_ListOfPnt2d();
diff --git a/inc/TestTopOpeTools.hxx b/inc/TestTopOpeTools.hxx
index b53ea47..2747944 100644
--- a/inc/TestTopOpeTools.hxx
+++ b/inc/TestTopOpeTools.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class TestTopOpeTools_HArray1OfMesure;
 class TestTopOpeTools  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines all topological operation test commands <br>
   Standard_EXPORT   static  void AllCommands(Draw_Interpretor& I) ;
diff --git a/inc/TestTopOpeTools_Array1OfMesure.hxx b/inc/TestTopOpeTools_Array1OfMesure.hxx
index 1783604..3d52d0e 100644
--- a/inc/TestTopOpeTools_Array1OfMesure.hxx
+++ b/inc/TestTopOpeTools_Array1OfMesure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TestTopOpeTools_Mesure;
 class TestTopOpeTools_Array1OfMesure  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TestTopOpeTools_Array1OfMesure(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TestTopOpeTools_Mesure.hxx b/inc/TestTopOpeTools_Mesure.hxx
index 45e7e0c..3a13b4f 100644
--- a/inc/TestTopOpeTools_Mesure.hxx
+++ b/inc/TestTopOpeTools_Mesure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class gp_Pnt;
 class TestTopOpeTools_Mesure  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TestTopOpeTools_Mesure();
diff --git a/inc/TopAbs.hxx b/inc/TopAbs.hxx
index b2f54a2..ef10df2 100644
--- a/inc/TopAbs.hxx
+++ b/inc/TopAbs.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@
 class TopAbs  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Compose  the Orientation    <Or1>  and  <Or2>.    This <br>
 //!          composition is not symmetric (if  you switch <Or1> and <br>
diff --git a/inc/TopBas_ListIteratorOfListOfTestInterference.hxx b/inc/TopBas_ListIteratorOfListOfTestInterference.hxx
index 56f7a8a..a3ce6a4 100644
--- a/inc/TopBas_ListIteratorOfListOfTestInterference.hxx
+++ b/inc/TopBas_ListIteratorOfListOfTestInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopBas_ListNodeOfListOfTestInterference;
 class TopBas_ListIteratorOfListOfTestInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopBas_ListIteratorOfListOfTestInterference();
diff --git a/inc/TopBas_ListOfTestInterference.hxx b/inc/TopBas_ListOfTestInterference.hxx
index 2cba3ef..e005f04 100644
--- a/inc/TopBas_ListOfTestInterference.hxx
+++ b/inc/TopBas_ListOfTestInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopBas_ListNodeOfListOfTestInterference;
 class TopBas_ListOfTestInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopBas_ListOfTestInterference();
diff --git a/inc/TopBas_TestInterference.hxx b/inc/TopBas_TestInterference.hxx
index b61f259..ecc11a0 100644
--- a/inc/TopBas_TestInterference.hxx
+++ b/inc/TopBas_TestInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class TopBas_TestInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopBas_TestInterference();
diff --git a/inc/TopClass_Intersection3d.hxx b/inc/TopClass_Intersection3d.hxx
index 196b594..53b8322 100644
--- a/inc/TopClass_Intersection3d.hxx
+++ b/inc/TopClass_Intersection3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class IntCurveSurface_IntersectionPoint;
 class TopClass_Intersection3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Perform the intersection between the <br>
 //!          segment L(0) ... L(Prm) and the Face <Face>. <br>
diff --git a/inc/TopClass_SolidExplorer.hxx b/inc/TopClass_SolidExplorer.hxx
index d1b2a58..6f9a13b 100644
--- a/inc/TopClass_SolidExplorer.hxx
+++ b/inc/TopClass_SolidExplorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Face;
 class TopClass_SolidExplorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Should  return  True  if the  point  is  outside a <br>
 //!          bounding volume of the shape. <br>
diff --git a/inc/TopCnx_EdgeFaceTransition.hxx b/inc/TopCnx_EdgeFaceTransition.hxx
index fb357da..33732e6 100644
--- a/inc/TopCnx_EdgeFaceTransition.hxx
+++ b/inc/TopCnx_EdgeFaceTransition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class gp_Dir;
 class TopCnx_EdgeFaceTransition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty algorithm. <br>
   Standard_EXPORT   TopCnx_EdgeFaceTransition();
diff --git a/inc/TopExp.hxx b/inc/TopExp.hxx
index 5d659aa..0b587c1 100644
--- a/inc/TopExp.hxx
+++ b/inc/TopExp.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TopExp_StackIteratorOfStackOfIterator;
 class TopExp  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Stores in the map <M> all  the sub-shapes of <S> <br>
 //!          of type <T>. <br>
diff --git a/inc/TopExp_Explorer.hxx b/inc/TopExp_Explorer.hxx
index ad4299c..1951c3d 100644
--- a/inc/TopExp_Explorer.hxx
+++ b/inc/TopExp_Explorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -97,18 +100,7 @@ class TopoDS_Shape;
 class TopExp_Explorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty explorer, becomes usefull after Init. <br>
   Standard_EXPORT   TopExp_Explorer();
diff --git a/inc/TopExp_StackIteratorOfStackOfIterator.hxx b/inc/TopExp_StackIteratorOfStackOfIterator.hxx
index 23b5039..6ba4df4 100644
--- a/inc/TopExp_StackIteratorOfStackOfIterator.hxx
+++ b/inc/TopExp_StackIteratorOfStackOfIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TopExp_StackNodeOfStackOfIterator;
 class TopExp_StackIteratorOfStackOfIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopExp_StackIteratorOfStackOfIterator();
diff --git a/inc/TopExp_StackOfIterator.hxx b/inc/TopExp_StackOfIterator.hxx
index a16d6aa..9413190 100644
--- a/inc/TopExp_StackOfIterator.hxx
+++ b/inc/TopExp_StackOfIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopExp_StackNodeOfStackOfIterator;
 class TopExp_StackOfIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopExp_StackOfIterator();
diff --git a/inc/TopLoc_IndexedMapOfLocation.hxx b/inc/TopLoc_IndexedMapOfLocation.hxx
index 7d44988..df5dc7e 100644
--- a/inc/TopLoc_IndexedMapOfLocation.hxx
+++ b/inc/TopLoc_IndexedMapOfLocation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopLoc_IndexedMapNodeOfIndexedMapOfLocation;
 class TopLoc_IndexedMapOfLocation  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopLoc_IndexedMapOfLocation(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopLoc_ItemLocation.hxx b/inc/TopLoc_ItemLocation.hxx
index 772bd09..f1b436b 100644
--- a/inc/TopLoc_ItemLocation.hxx
+++ b/inc/TopLoc_ItemLocation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TopLoc_Location;
 class TopLoc_ItemLocation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Sets the elementary Datum to <D> <br>
 //!          Sets the exponent to <P> <br>
diff --git a/inc/TopLoc_Location.hxx b/inc/TopLoc_Location.hxx
index 860b00e..6b8fb45 100644
--- a/inc/TopLoc_Location.hxx
+++ b/inc/TopLoc_Location.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopLoc_Datum3D;
 class TopLoc_Location  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an empty local coordinate system object. <br>
 //! Note: A Location constructed from a default datum is said to be "empty". <br>
diff --git a/inc/TopLoc_MapIteratorOfMapOfLocation.hxx b/inc/TopLoc_MapIteratorOfMapOfLocation.hxx
index 1adf50d..03330ce 100644
--- a/inc/TopLoc_MapIteratorOfMapOfLocation.hxx
+++ b/inc/TopLoc_MapIteratorOfMapOfLocation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopLoc_StdMapNodeOfMapOfLocation;
 class TopLoc_MapIteratorOfMapOfLocation  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopLoc_MapIteratorOfMapOfLocation();
diff --git a/inc/TopLoc_MapLocationHasher.hxx b/inc/TopLoc_MapLocationHasher.hxx
index 416cc0d..e026be5 100644
--- a/inc/TopLoc_MapLocationHasher.hxx
+++ b/inc/TopLoc_MapLocationHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TopLoc_Location;
 class TopLoc_MapLocationHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer HashCode(const TopLoc_Location& K,const Standard_Integer Upper) ;
diff --git a/inc/TopLoc_MapOfLocation.hxx b/inc/TopLoc_MapOfLocation.hxx
index d8feee7..736e5dd 100644
--- a/inc/TopLoc_MapOfLocation.hxx
+++ b/inc/TopLoc_MapOfLocation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopLoc_MapIteratorOfMapOfLocation;
 class TopLoc_MapOfLocation  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopLoc_MapOfLocation(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopLoc_SListOfItemLocation.hxx b/inc/TopLoc_SListOfItemLocation.hxx
index 892f29f..357bfb5 100644
--- a/inc/TopLoc_SListOfItemLocation.hxx
+++ b/inc/TopLoc_SListOfItemLocation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class TopLoc_ItemLocation;
 class TopLoc_SListOfItemLocation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopLoc_SListOfItemLocation();
diff --git a/inc/TopOpeBRep.hxx b/inc/TopOpeBRep.hxx
index 4e15c01..d0f5399 100644
--- a/inc/TopOpeBRep.hxx
+++ b/inc/TopOpeBRep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class TopOpeBRep_ListIteratorOfListOfBipoint;
 class TopOpeBRep  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Prints the name  of  <TLC>  as  a String  on the <br>
 //!          Stream <S> and returns <S>. <br>
diff --git a/inc/TopOpeBRepBuild_Area1dBuilder.hxx b/inc/TopOpeBRepBuild_Area1dBuilder.hxx
index 46d4415..badd20d 100644
--- a/inc/TopOpeBRepBuild_Area1dBuilder.hxx
+++ b/inc/TopOpeBRepBuild_Area1dBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopOpeBRepBuild_ListIteratorOfListOfLoop;
 class TopOpeBRepBuild_Area1dBuilder  : public TopOpeBRepBuild_AreaBuilder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_Area1dBuilder();
diff --git a/inc/TopOpeBRepBuild_Area2dBuilder.hxx b/inc/TopOpeBRepBuild_Area2dBuilder.hxx
index 662bf94..b907444 100644
--- a/inc/TopOpeBRepBuild_Area2dBuilder.hxx
+++ b/inc/TopOpeBRepBuild_Area2dBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopOpeBRepBuild_LoopClassifier;
 class TopOpeBRepBuild_Area2dBuilder  : public TopOpeBRepBuild_AreaBuilder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_Area2dBuilder();
diff --git a/inc/TopOpeBRepBuild_Area3dBuilder.hxx b/inc/TopOpeBRepBuild_Area3dBuilder.hxx
index 99fdf21..50c56fc 100644
--- a/inc/TopOpeBRepBuild_Area3dBuilder.hxx
+++ b/inc/TopOpeBRepBuild_Area3dBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopOpeBRepBuild_LoopClassifier;
 class TopOpeBRepBuild_Area3dBuilder  : public TopOpeBRepBuild_AreaBuilder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_Area3dBuilder();
diff --git a/inc/TopOpeBRepBuild_AreaBuilder.hxx b/inc/TopOpeBRepBuild_AreaBuilder.hxx
index 5c30433..00b26dd 100644
--- a/inc/TopOpeBRepBuild_AreaBuilder.hxx
+++ b/inc/TopOpeBRepBuild_AreaBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class TopOpeBRepBuild_ListIteratorOfListOfLoop;
 class TopOpeBRepBuild_AreaBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_AreaBuilder();
diff --git a/inc/TopOpeBRepBuild_BlockBuilder.hxx b/inc/TopOpeBRepBuild_BlockBuilder.hxx
index 95ee75e..868eb58 100644
--- a/inc/TopOpeBRepBuild_BlockBuilder.hxx
+++ b/inc/TopOpeBRepBuild_BlockBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TopoDS_Shape;
 class TopOpeBRepBuild_BlockBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_BlockBuilder();
diff --git a/inc/TopOpeBRepBuild_BlockIterator.hxx b/inc/TopOpeBRepBuild_BlockIterator.hxx
index 63dbba6..ebd06bd 100644
--- a/inc/TopOpeBRepBuild_BlockIterator.hxx
+++ b/inc/TopOpeBRepBuild_BlockIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class Standard_NoMoreObject;
 class TopOpeBRepBuild_BlockIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_BlockIterator();
diff --git a/inc/TopOpeBRepBuild_Builder.hxx b/inc/TopOpeBRepBuild_Builder.hxx
index 81dcf0d..7e214db 100644
--- a/inc/TopOpeBRepBuild_Builder.hxx
+++ b/inc/TopOpeBRepBuild_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -135,18 +138,7 @@ class TCollection_AsciiString;
 class TopOpeBRepBuild_Builder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_Builder(const TopOpeBRepDS_BuildTool& BT);
diff --git a/inc/TopOpeBRepBuild_Builder1.hxx b/inc/TopOpeBRepBuild_Builder1.hxx
index 1f21411..fd30fd9 100644
--- a/inc/TopOpeBRepBuild_Builder1.hxx
+++ b/inc/TopOpeBRepBuild_Builder1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -70,18 +73,7 @@ class TopTools_SequenceOfShape;
 class TopOpeBRepBuild_Builder1  : public TopOpeBRepBuild_Builder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_Builder1(const TopOpeBRepDS_BuildTool& BT);
diff --git a/inc/TopOpeBRepBuild_BuilderON.hxx b/inc/TopOpeBRepBuild_BuilderON.hxx
index cb2d3db..aaff72f 100644
--- a/inc/TopOpeBRepBuild_BuilderON.hxx
+++ b/inc/TopOpeBRepBuild_BuilderON.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopOpeBRepDS_Interference;
 class TopOpeBRepBuild_BuilderON  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_BuilderON();
diff --git a/inc/TopOpeBRepBuild_CompositeClassifier.hxx b/inc/TopOpeBRepBuild_CompositeClassifier.hxx
index 2e740e5..1e2fd9a 100644
--- a/inc/TopOpeBRepBuild_CompositeClassifier.hxx
+++ b/inc/TopOpeBRepBuild_CompositeClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,6 +28,9 @@
 #ifndef _Handle_TopOpeBRepBuild_Loop_HeaderFile
 #include <Handle_TopOpeBRepBuild_Loop.hxx>
 #endif
+#ifndef _Standard_Boolean_HeaderFile
+#include <Standard_Boolean.hxx>
+#endif
 class TopOpeBRepBuild_BlockBuilder;
 class TopOpeBRepBuild_Loop;
 class TopoDS_Shape;
@@ -36,18 +42,7 @@ class TopoDS_Shape;
 class TopOpeBRepBuild_CompositeClassifier  : public TopOpeBRepBuild_LoopClassifier {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  TopAbs_State Compare(const Handle(TopOpeBRepBuild_Loop)& L1,const Handle(TopOpeBRepBuild_Loop)& L2) ;
@@ -61,7 +56,9 @@ public:
   //! prepare classification involving element <E>. <br>
   Standard_EXPORT   virtual  void ResetElement(const TopoDS_Shape& E)  = 0;
   //! Add element <E> in the set of elements used in classification. <br>
-  Standard_EXPORT   virtual  void CompareElement(const TopoDS_Shape& E)  = 0;
+//!  Returns FALSE if the element <E> has been already added to the set of elements, <br>
+//!  otherwise returns TRUE. <br>
+  Standard_EXPORT   virtual  Standard_Boolean CompareElement(const TopoDS_Shape& E)  = 0;
   //! Returns state of classification of 2D point, defined by <br>
 //! ResetElement, with the current set of elements, defined by Compare. <br>
   Standard_EXPORT   virtual  TopAbs_State State()  = 0;
diff --git a/inc/TopOpeBRepBuild_CorrectFace2d.hxx b/inc/TopOpeBRepBuild_CorrectFace2d.hxx
index 8944563..0071760 100644
--- a/inc/TopOpeBRepBuild_CorrectFace2d.hxx
+++ b/inc/TopOpeBRepBuild_CorrectFace2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -60,18 +63,7 @@ class Bnd_Box2d;
 class TopOpeBRepBuild_CorrectFace2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_CorrectFace2d();
diff --git a/inc/TopOpeBRepBuild_DataMapIteratorOfDataMapOfShapeListOfShapeListOfShape.hxx b/inc/TopOpeBRepBuild_DataMapIteratorOfDataMapOfShapeListOfShapeListOfShape.hxx
index 965739c..663bff4 100644
--- a/inc/TopOpeBRepBuild_DataMapIteratorOfDataMapOfShapeListOfShapeListOfShape.hxx
+++ b/inc/TopOpeBRepBuild_DataMapIteratorOfDataMapOfShapeListOfShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopOpeBRepBuild_DataMapNodeOfDataMapOfShapeListOfShapeListOfShape;
 class TopOpeBRepBuild_DataMapIteratorOfDataMapOfShapeListOfShapeListOfShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_DataMapIteratorOfDataMapOfShapeListOfShapeListOfShape();
diff --git a/inc/TopOpeBRepBuild_DataMapOfShapeListOfShapeListOfShape.hxx b/inc/TopOpeBRepBuild_DataMapOfShapeListOfShapeListOfShape.hxx
index 1d714c6..51df04f 100644
--- a/inc/TopOpeBRepBuild_DataMapOfShapeListOfShapeListOfShape.hxx
+++ b/inc/TopOpeBRepBuild_DataMapOfShapeListOfShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepBuild_DataMapIteratorOfDataMapOfShapeListOfShapeListOfShape;
 class TopOpeBRepBuild_DataMapOfShapeListOfShapeListOfShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_DataMapOfShapeListOfShapeListOfShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepBuild_EdgeBuilder.hxx b/inc/TopOpeBRepBuild_EdgeBuilder.hxx
index 82fdd77..96dead9 100644
--- a/inc/TopOpeBRepBuild_EdgeBuilder.hxx
+++ b/inc/TopOpeBRepBuild_EdgeBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopoDS_Shape;
 class TopOpeBRepBuild_EdgeBuilder  : public TopOpeBRepBuild_Area1dBuilder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_EdgeBuilder();
diff --git a/inc/TopOpeBRepBuild_FaceAreaBuilder.hxx b/inc/TopOpeBRepBuild_FaceAreaBuilder.hxx
index 129f0a2..f15eba1 100644
--- a/inc/TopOpeBRepBuild_FaceAreaBuilder.hxx
+++ b/inc/TopOpeBRepBuild_FaceAreaBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopOpeBRepBuild_LoopClassifier;
 class TopOpeBRepBuild_FaceAreaBuilder  : public TopOpeBRepBuild_Area2dBuilder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_FaceAreaBuilder();
diff --git a/inc/TopOpeBRepBuild_FaceBuilder.hxx b/inc/TopOpeBRepBuild_FaceBuilder.hxx
index 86d1ba8..5cc5f67 100644
--- a/inc/TopOpeBRepBuild_FaceBuilder.hxx
+++ b/inc/TopOpeBRepBuild_FaceBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class TopOpeBRepBuild_ShapeSet;
 class TopOpeBRepBuild_FaceBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_FaceBuilder();
diff --git a/inc/TopOpeBRepBuild_FuseFace.hxx b/inc/TopOpeBRepBuild_FuseFace.hxx
index b84a5d9..6791101 100644
--- a/inc/TopOpeBRepBuild_FuseFace.hxx
+++ b/inc/TopOpeBRepBuild_FuseFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopTools_ListOfShape;
 class TopOpeBRepBuild_FuseFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TopOpeBRepBuild_FuseFace();
diff --git a/inc/TopOpeBRepBuild_GIter.hxx b/inc/TopOpeBRepBuild_GIter.hxx
index a567ff0..a2693c7 100644
--- a/inc/TopOpeBRepBuild_GIter.hxx
+++ b/inc/TopOpeBRepBuild_GIter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopOpeBRepBuild_GTopo;
 class TopOpeBRepBuild_GIter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_GIter();
diff --git a/inc/TopOpeBRepBuild_GTool.hxx b/inc/TopOpeBRepBuild_GTool.hxx
index d744b5a..be788f5 100644
--- a/inc/TopOpeBRepBuild_GTool.hxx
+++ b/inc/TopOpeBRepBuild_GTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TopOpeBRepBuild_GTopo;
 class TopOpeBRepBuild_GTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  TopOpeBRepBuild_GTopo GFusUnsh(const TopAbs_ShapeEnum s1,const TopAbs_ShapeEnum s2) ;
diff --git a/inc/TopOpeBRepBuild_GTopo.hxx b/inc/TopOpeBRepBuild_GTopo.hxx
index 7141f0e..b6bacd8 100644
--- a/inc/TopOpeBRepBuild_GTopo.hxx
+++ b/inc/TopOpeBRepBuild_GTopo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@
 class TopOpeBRepBuild_GTopo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_GTopo();
diff --git a/inc/TopOpeBRepBuild_IndexedDataMapOfShapeVertexInfo.hxx b/inc/TopOpeBRepBuild_IndexedDataMapOfShapeVertexInfo.hxx
index a4b308c..cb79fe3 100644
--- a/inc/TopOpeBRepBuild_IndexedDataMapOfShapeVertexInfo.hxx
+++ b/inc/TopOpeBRepBuild_IndexedDataMapOfShapeVertexInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepBuild_IndexedDataMapNodeOfIndexedDataMapOfShapeVertexInfo;
 class TopOpeBRepBuild_IndexedDataMapOfShapeVertexInfo  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_IndexedDataMapOfShapeVertexInfo(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepBuild_ListIteratorOfListOfListOfLoop.hxx b/inc/TopOpeBRepBuild_ListIteratorOfListOfListOfLoop.hxx
index 21db01b..9692d10 100644
--- a/inc/TopOpeBRepBuild_ListIteratorOfListOfListOfLoop.hxx
+++ b/inc/TopOpeBRepBuild_ListIteratorOfListOfListOfLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepBuild_ListNodeOfListOfListOfLoop;
 class TopOpeBRepBuild_ListIteratorOfListOfListOfLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_ListIteratorOfListOfListOfLoop();
diff --git a/inc/TopOpeBRepBuild_ListIteratorOfListOfLoop.hxx b/inc/TopOpeBRepBuild_ListIteratorOfListOfLoop.hxx
index 45567c8..cc8bb20 100644
--- a/inc/TopOpeBRepBuild_ListIteratorOfListOfLoop.hxx
+++ b/inc/TopOpeBRepBuild_ListIteratorOfListOfLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopOpeBRepBuild_ListNodeOfListOfLoop;
 class TopOpeBRepBuild_ListIteratorOfListOfLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_ListIteratorOfListOfLoop();
diff --git a/inc/TopOpeBRepBuild_ListIteratorOfListOfPave.hxx b/inc/TopOpeBRepBuild_ListIteratorOfListOfPave.hxx
index 7085e48..1cacef1 100644
--- a/inc/TopOpeBRepBuild_ListIteratorOfListOfPave.hxx
+++ b/inc/TopOpeBRepBuild_ListIteratorOfListOfPave.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopOpeBRepBuild_ListNodeOfListOfPave;
 class TopOpeBRepBuild_ListIteratorOfListOfPave  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_ListIteratorOfListOfPave();
diff --git a/inc/TopOpeBRepBuild_ListIteratorOfListOfShapeListOfShape.hxx b/inc/TopOpeBRepBuild_ListIteratorOfListOfShapeListOfShape.hxx
index cb9f577..f9b4ae5 100644
--- a/inc/TopOpeBRepBuild_ListIteratorOfListOfShapeListOfShape.hxx
+++ b/inc/TopOpeBRepBuild_ListIteratorOfListOfShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepBuild_ListNodeOfListOfShapeListOfShape;
 class TopOpeBRepBuild_ListIteratorOfListOfShapeListOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_ListIteratorOfListOfShapeListOfShape();
diff --git a/inc/TopOpeBRepBuild_ListOfListOfLoop.hxx b/inc/TopOpeBRepBuild_ListOfListOfLoop.hxx
index e203dc9..5252550 100644
--- a/inc/TopOpeBRepBuild_ListOfListOfLoop.hxx
+++ b/inc/TopOpeBRepBuild_ListOfListOfLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopOpeBRepBuild_ListNodeOfListOfListOfLoop;
 class TopOpeBRepBuild_ListOfListOfLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_ListOfListOfLoop();
diff --git a/inc/TopOpeBRepBuild_ListOfLoop.hxx b/inc/TopOpeBRepBuild_ListOfLoop.hxx
index dd7df55..1589bd0 100644
--- a/inc/TopOpeBRepBuild_ListOfLoop.hxx
+++ b/inc/TopOpeBRepBuild_ListOfLoop.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopOpeBRepBuild_ListNodeOfListOfLoop;
 class TopOpeBRepBuild_ListOfLoop  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_ListOfLoop();
diff --git a/inc/TopOpeBRepBuild_ListOfPave.hxx b/inc/TopOpeBRepBuild_ListOfPave.hxx
index 93ad4d7..a962565 100644
--- a/inc/TopOpeBRepBuild_ListOfPave.hxx
+++ b/inc/TopOpeBRepBuild_ListOfPave.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopOpeBRepBuild_ListNodeOfListOfPave;
 class TopOpeBRepBuild_ListOfPave  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_ListOfPave();
diff --git a/inc/TopOpeBRepBuild_ListOfShapeListOfShape.hxx b/inc/TopOpeBRepBuild_ListOfShapeListOfShape.hxx
index 456541b..5a45bad 100644
--- a/inc/TopOpeBRepBuild_ListOfShapeListOfShape.hxx
+++ b/inc/TopOpeBRepBuild_ListOfShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopOpeBRepBuild_ListNodeOfListOfShapeListOfShape;
 class TopOpeBRepBuild_ListOfShapeListOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_ListOfShapeListOfShape();
diff --git a/inc/TopOpeBRepBuild_LoopClassifier.hxx b/inc/TopOpeBRepBuild_LoopClassifier.hxx
index ba29881..9876962 100644
--- a/inc/TopOpeBRepBuild_LoopClassifier.hxx
+++ b/inc/TopOpeBRepBuild_LoopClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TopOpeBRepBuild_Loop;
 class TopOpeBRepBuild_LoopClassifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/TopOpeBRepBuild_LoopSet.hxx b/inc/TopOpeBRepBuild_LoopSet.hxx
index b927918..5d73a43 100644
--- a/inc/TopOpeBRepBuild_LoopSet.hxx
+++ b/inc/TopOpeBRepBuild_LoopSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopOpeBRepBuild_Loop;
 class TopOpeBRepBuild_LoopSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_LoopSet();
diff --git a/inc/TopOpeBRepBuild_PaveClassifier.hxx b/inc/TopOpeBRepBuild_PaveClassifier.hxx
index 48bcb32..eed49fa 100644
--- a/inc/TopOpeBRepBuild_PaveClassifier.hxx
+++ b/inc/TopOpeBRepBuild_PaveClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,7 @@ class TopOpeBRepBuild_Loop;
 class TopOpeBRepBuild_PaveClassifier  : public TopOpeBRepBuild_LoopClassifier {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a Pave classifier to compare vertices on edge <E>. <br>
   Standard_EXPORT   TopOpeBRepBuild_PaveClassifier(const TopoDS_Shape& E);
diff --git a/inc/TopOpeBRepBuild_PaveSet.hxx b/inc/TopOpeBRepBuild_PaveSet.hxx
index fde6e7c..286cce5 100644
--- a/inc/TopOpeBRepBuild_PaveSet.hxx
+++ b/inc/TopOpeBRepBuild_PaveSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class TopOpeBRepBuild_ListOfPave;
 class TopOpeBRepBuild_PaveSet  : public TopOpeBRepBuild_LoopSet {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create a Pave set on edge <E>. It contains <E> vertices. <br>
   Standard_EXPORT   TopOpeBRepBuild_PaveSet(const TopoDS_Shape& E);
diff --git a/inc/TopOpeBRepBuild_ShapeListOfShape.hxx b/inc/TopOpeBRepBuild_ShapeListOfShape.hxx
index 27db87f..29da5a5 100644
--- a/inc/TopOpeBRepBuild_ShapeListOfShape.hxx
+++ b/inc/TopOpeBRepBuild_ShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class TopTools_ListOfShape;
 class TopOpeBRepBuild_ShapeListOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_ShapeListOfShape();
diff --git a/inc/TopOpeBRepBuild_ShapeSet.hxx b/inc/TopOpeBRepBuild_ShapeSet.hxx
index b96f604..1b97a12 100644
--- a/inc/TopOpeBRepBuild_ShapeSet.hxx
+++ b/inc/TopOpeBRepBuild_ShapeSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class TCollection_AsciiString;
 class TopOpeBRepBuild_ShapeSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a ShapeSet  in order to build shapes connected <br>
 //! by <SubShapeType>  shapes. <br>
diff --git a/inc/TopOpeBRepBuild_ShellFaceClassifier.hxx b/inc/TopOpeBRepBuild_ShellFaceClassifier.hxx
index feff805..c224142 100644
--- a/inc/TopOpeBRepBuild_ShellFaceClassifier.hxx
+++ b/inc/TopOpeBRepBuild_ShellFaceClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopoDS_Shape;
 class TopOpeBRepBuild_ShellFaceClassifier  : public TopOpeBRepBuild_CompositeClassifier {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a classifier in 3D space, to compare : <br>
 //! a face with a set of faces <br>
@@ -81,8 +73,9 @@ public:
 //! define 3D point (later used in Compare()) on first vertex of face <F>. <br>
   Standard_EXPORT     void ResetElement(const TopoDS_Shape& F) ;
   //! Add the face <F> in the set of faces used in 3D point <br>
-//! classification. <br>
-  Standard_EXPORT     void CompareElement(const TopoDS_Shape& F) ;
+//! classification. Returns FALSE if the face <F> has been already <br>
+//! added to the set of faces, otherwise returns TRUE. <br>
+  Standard_EXPORT     Standard_Boolean CompareElement(const TopoDS_Shape& F) ;
   //! Returns state of classification of 3D point, defined by <br>
 //! ResetElement, with the current set of faces, defined by Compare. <br>
   Standard_EXPORT     TopAbs_State State() ;
diff --git a/inc/TopOpeBRepBuild_ShellFaceSet.hxx b/inc/TopOpeBRepBuild_ShellFaceSet.hxx
index fb507f6..2189fe3 100644
--- a/inc/TopOpeBRepBuild_ShellFaceSet.hxx
+++ b/inc/TopOpeBRepBuild_ShellFaceSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TopTools_ListOfShape;
 class TopOpeBRepBuild_ShellFaceSet  : public TopOpeBRepBuild_ShapeSet {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a ShellFaceSet to build blocks of faces <br>
 //! connected by edges. <br>
diff --git a/inc/TopOpeBRepBuild_ShellToSolid.hxx b/inc/TopOpeBRepBuild_ShellToSolid.hxx
index a6583de..e370606 100644
--- a/inc/TopOpeBRepBuild_ShellToSolid.hxx
+++ b/inc/TopOpeBRepBuild_ShellToSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TopTools_ListOfShape;
 class TopOpeBRepBuild_ShellToSolid  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_ShellToSolid();
diff --git a/inc/TopOpeBRepBuild_SolidAreaBuilder.hxx b/inc/TopOpeBRepBuild_SolidAreaBuilder.hxx
index 8e634c0..74974e8 100644
--- a/inc/TopOpeBRepBuild_SolidAreaBuilder.hxx
+++ b/inc/TopOpeBRepBuild_SolidAreaBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopOpeBRepBuild_LoopClassifier;
 class TopOpeBRepBuild_SolidAreaBuilder  : public TopOpeBRepBuild_Area3dBuilder {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_SolidAreaBuilder();
diff --git a/inc/TopOpeBRepBuild_SolidBuilder.hxx b/inc/TopOpeBRepBuild_SolidBuilder.hxx
index a324150..59cc92c 100644
--- a/inc/TopOpeBRepBuild_SolidBuilder.hxx
+++ b/inc/TopOpeBRepBuild_SolidBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopOpeBRepBuild_ShapeSet;
 class TopOpeBRepBuild_SolidBuilder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_SolidBuilder();
diff --git a/inc/TopOpeBRepBuild_Tools.hxx b/inc/TopOpeBRepBuild_Tools.hxx
index ecac5c1..692ee0b 100644
--- a/inc/TopOpeBRepBuild_Tools.hxx
+++ b/inc/TopOpeBRepBuild_Tools.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class TopTools_IndexedDataMapOfShapeShape;
 class TopOpeBRepBuild_Tools  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void DumpMapOfShapeWithState(const Standard_Integer iP,const TopOpeBRepDS_IndexedDataMapOfShapeWithState& aMapOfShapeWithState) ;
diff --git a/inc/TopOpeBRepBuild_Tools2d.hxx b/inc/TopOpeBRepBuild_Tools2d.hxx
index 21c57b1..ea51db1 100644
--- a/inc/TopOpeBRepBuild_Tools2d.hxx
+++ b/inc/TopOpeBRepBuild_Tools2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@ class TopTools_ListOfShape;
 class TopOpeBRepBuild_Tools2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void MakeMapOfShapeVertexInfo(const TopoDS_Wire& aWire,TopOpeBRepBuild_IndexedDataMapOfShapeVertexInfo& aMap) ;
diff --git a/inc/TopOpeBRepBuild_VertexInfo.hxx b/inc/TopOpeBRepBuild_VertexInfo.hxx
index d2f74b2..de33dac 100644
--- a/inc/TopOpeBRepBuild_VertexInfo.hxx
+++ b/inc/TopOpeBRepBuild_VertexInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopTools_ListOfShape;
 class TopOpeBRepBuild_VertexInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_VertexInfo();
diff --git a/inc/TopOpeBRepBuild_WireEdgeClassifier.hxx b/inc/TopOpeBRepBuild_WireEdgeClassifier.hxx
index 6dc4a3a..2a42bcf 100644
--- a/inc/TopOpeBRepBuild_WireEdgeClassifier.hxx
+++ b/inc/TopOpeBRepBuild_WireEdgeClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class TopOpeBRepBuild_Loop;
 class TopOpeBRepBuild_WireEdgeClassifier  : public TopOpeBRepBuild_CompositeClassifier {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a classifier on edge <F>. <br>
 //! Used to compare edges and wires on the edge <F>. <br>
@@ -80,7 +72,7 @@ public:
   Standard_EXPORT     void ResetElement(const TopoDS_Shape& E) ;
   //! Add the edge <E> in the set of edges used in 2D point <br>
 //! classification. <br>
-  Standard_EXPORT     void CompareElement(const TopoDS_Shape& E) ;
+  Standard_EXPORT     Standard_Boolean CompareElement(const TopoDS_Shape& E) ;
   //! Returns state of classification of 2D point, defined by <br>
 //! ResetElement, with the current set of edges, defined by Compare. <br>
   Standard_EXPORT     TopAbs_State State() ;
diff --git a/inc/TopOpeBRepBuild_WireEdgeSet.hxx b/inc/TopOpeBRepBuild_WireEdgeSet.hxx
index 56a0fdb..bd9fd6f 100644
--- a/inc/TopOpeBRepBuild_WireEdgeSet.hxx
+++ b/inc/TopOpeBRepBuild_WireEdgeSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class TCollection_AsciiString;
 class TopOpeBRepBuild_WireEdgeSet  : public TopOpeBRepBuild_ShapeSet {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a WireEdgeSet to build edges connected by vertices <br>
 //! on face F. Edges of the WireEdgeSet must have a representation <br>
diff --git a/inc/TopOpeBRepBuild_WireToFace.hxx b/inc/TopOpeBRepBuild_WireToFace.hxx
index 1116e11..582ce9e 100644
--- a/inc/TopOpeBRepBuild_WireToFace.hxx
+++ b/inc/TopOpeBRepBuild_WireToFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopTools_ListOfShape;
 class TopOpeBRepBuild_WireToFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepBuild_WireToFace();
diff --git a/inc/TopOpeBRepDS.hxx b/inc/TopOpeBRepDS.hxx
index 1d492ca..481fae6 100644
--- a/inc/TopOpeBRepDS.hxx
+++ b/inc/TopOpeBRepDS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -142,18 +145,7 @@ class TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeState;
 class TopOpeBRepDS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! IN OU ON UN <br>
   Standard_EXPORT   static  TCollection_AsciiString SPrint(const TopAbs_State S) ;
diff --git a/inc/TopOpeBRepDS_Array1OfDataMapOfIntegerListOfInterference.hxx b/inc/TopOpeBRepDS_Array1OfDataMapOfIntegerListOfInterference.hxx
index 7b9f74e..f653a8e 100644
--- a/inc/TopOpeBRepDS_Array1OfDataMapOfIntegerListOfInterference.hxx
+++ b/inc/TopOpeBRepDS_Array1OfDataMapOfIntegerListOfInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepDS_DataMapOfIntegerListOfInterference;
 class TopOpeBRepDS_Array1OfDataMapOfIntegerListOfInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_Array1OfDataMapOfIntegerListOfInterference(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TopOpeBRepDS_BuildTool.hxx b/inc/TopOpeBRepDS_BuildTool.hxx
index 19e1b23..77ff5cb 100644
--- a/inc/TopOpeBRepDS_BuildTool.hxx
+++ b/inc/TopOpeBRepDS_BuildTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class Geom_Surface;
 class TopOpeBRepDS_BuildTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_BuildTool();
diff --git a/inc/TopOpeBRepDS_Curve.hxx b/inc/TopOpeBRepDS_Curve.hxx
index 343b8be..b8fdfe4 100644
--- a/inc/TopOpeBRepDS_Curve.hxx
+++ b/inc/TopOpeBRepDS_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Geom2d_Curve;
 class TopOpeBRepDS_Curve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_Curve();
diff --git a/inc/TopOpeBRepDS_CurveData.hxx b/inc/TopOpeBRepDS_CurveData.hxx
index 008d1ff..f2dba55 100644
--- a/inc/TopOpeBRepDS_CurveData.hxx
+++ b/inc/TopOpeBRepDS_CurveData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class TopOpeBRepDS_Curve;
 class TopOpeBRepDS_CurveData  : public TopOpeBRepDS_GeometryData {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_CurveData();
diff --git a/inc/TopOpeBRepDS_CurveExplorer.hxx b/inc/TopOpeBRepDS_CurveExplorer.hxx
index 2f7729f..6605591 100644
--- a/inc/TopOpeBRepDS_CurveExplorer.hxx
+++ b/inc/TopOpeBRepDS_CurveExplorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopOpeBRepDS_Curve;
 class TopOpeBRepDS_CurveExplorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_CurveExplorer();
diff --git a/inc/TopOpeBRepDS_CurveIterator.hxx b/inc/TopOpeBRepDS_CurveIterator.hxx
index 7b86f2b..9573a53 100644
--- a/inc/TopOpeBRepDS_CurveIterator.hxx
+++ b/inc/TopOpeBRepDS_CurveIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Geom2d_Curve;
 class TopOpeBRepDS_CurveIterator  : public TopOpeBRepDS_InterferenceIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an  iterator on the  curves on surface <br>
 //!          described by the interferences in <L>. <br>
diff --git a/inc/TopOpeBRepDS_DSS.hxx b/inc/TopOpeBRepDS_DSS.hxx
index 7e6faa3..2703ea8 100644
--- a/inc/TopOpeBRepDS_DSS.hxx
+++ b/inc/TopOpeBRepDS_DSS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -51,18 +54,7 @@ class TopOpeBRepDS_Interference;
 class TopOpeBRepDS_DSS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DSS();
diff --git a/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus.hxx b/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus.hxx
index e5761a8..2097df0 100644
--- a/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus.hxx
+++ b/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopOpeBRepDS_DataMapNodeOfDataMapOfCheckStatus;
 class TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus();
diff --git a/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference.hxx b/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference.hxx
index 55233bb..473b80e 100644
--- a/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference.hxx
+++ b/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepDS_DataMapNodeOfDataMapOfIntegerListOfInterference;
 class TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference();
diff --git a/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceListOfInterference.hxx b/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceListOfInterference.hxx
index 6ced02e..4ae1637 100644
--- a/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceListOfInterference.hxx
+++ b/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceListOfInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TopOpeBRepDS_DataMapNodeOfDataMapOfInterferenceListOfInterference;
 class TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceListOfInterference  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceListOfInterference();
diff --git a/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceShape.hxx b/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceShape.hxx
index 436bc45..5fb99d0 100644
--- a/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceShape.hxx
+++ b/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TopOpeBRepDS_DataMapNodeOfDataMapOfInterferenceShape;
 class TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceShape();
diff --git a/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeListOfShapeOn1State.hxx b/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeListOfShapeOn1State.hxx
index b85d691..456e909 100644
--- a/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeListOfShapeOn1State.hxx
+++ b/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeListOfShapeOn1State.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopOpeBRepDS_DataMapNodeOfDataMapOfShapeListOfShapeOn1State;
 class TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeListOfShapeOn1State  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeListOfShapeOn1State();
diff --git a/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeState.hxx b/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeState.hxx
index d2a6f31..7567b38 100644
--- a/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeState.hxx
+++ b/inc/TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeState.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepDS_DataMapNodeOfDataMapOfShapeState;
 class TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeState  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeState();
diff --git a/inc/TopOpeBRepDS_DataMapIteratorOfMapOfCurve.hxx b/inc/TopOpeBRepDS_DataMapIteratorOfMapOfCurve.hxx
index 6e8812b..a89ce30 100644
--- a/inc/TopOpeBRepDS_DataMapIteratorOfMapOfCurve.hxx
+++ b/inc/TopOpeBRepDS_DataMapIteratorOfMapOfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepDS_DataMapNodeOfMapOfCurve;
 class TopOpeBRepDS_DataMapIteratorOfMapOfCurve  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapIteratorOfMapOfCurve();
diff --git a/inc/TopOpeBRepDS_DataMapIteratorOfMapOfIntegerShapeData.hxx b/inc/TopOpeBRepDS_DataMapIteratorOfMapOfIntegerShapeData.hxx
index b28e3e5..d6ccb45 100644
--- a/inc/TopOpeBRepDS_DataMapIteratorOfMapOfIntegerShapeData.hxx
+++ b/inc/TopOpeBRepDS_DataMapIteratorOfMapOfIntegerShapeData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepDS_DataMapNodeOfMapOfIntegerShapeData;
 class TopOpeBRepDS_DataMapIteratorOfMapOfIntegerShapeData  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapIteratorOfMapOfIntegerShapeData();
diff --git a/inc/TopOpeBRepDS_DataMapIteratorOfMapOfPoint.hxx b/inc/TopOpeBRepDS_DataMapIteratorOfMapOfPoint.hxx
index 99288da..2c89a68 100644
--- a/inc/TopOpeBRepDS_DataMapIteratorOfMapOfPoint.hxx
+++ b/inc/TopOpeBRepDS_DataMapIteratorOfMapOfPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepDS_DataMapNodeOfMapOfPoint;
 class TopOpeBRepDS_DataMapIteratorOfMapOfPoint  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapIteratorOfMapOfPoint();
diff --git a/inc/TopOpeBRepDS_DataMapIteratorOfMapOfSurface.hxx b/inc/TopOpeBRepDS_DataMapIteratorOfMapOfSurface.hxx
index 7daa419..2da96c8 100644
--- a/inc/TopOpeBRepDS_DataMapIteratorOfMapOfSurface.hxx
+++ b/inc/TopOpeBRepDS_DataMapIteratorOfMapOfSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepDS_DataMapNodeOfMapOfSurface;
 class TopOpeBRepDS_DataMapIteratorOfMapOfSurface  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapIteratorOfMapOfSurface();
diff --git a/inc/TopOpeBRepDS_DataMapIteratorOfShapeSurface.hxx b/inc/TopOpeBRepDS_DataMapIteratorOfShapeSurface.hxx
index 4df4172..9389f64 100644
--- a/inc/TopOpeBRepDS_DataMapIteratorOfShapeSurface.hxx
+++ b/inc/TopOpeBRepDS_DataMapIteratorOfShapeSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TopOpeBRepDS_DataMapNodeOfShapeSurface;
 class TopOpeBRepDS_DataMapIteratorOfShapeSurface  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapIteratorOfShapeSurface();
diff --git a/inc/TopOpeBRepDS_DataMapOfCheckStatus.hxx b/inc/TopOpeBRepDS_DataMapOfCheckStatus.hxx
index 9d889e9..45cb1b8 100644
--- a/inc/TopOpeBRepDS_DataMapOfCheckStatus.hxx
+++ b/inc/TopOpeBRepDS_DataMapOfCheckStatus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus;
 class TopOpeBRepDS_DataMapOfCheckStatus  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapOfCheckStatus(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_DataMapOfIntegerListOfInterference.hxx b/inc/TopOpeBRepDS_DataMapOfIntegerListOfInterference.hxx
index 8ef58de..d80f2b5 100644
--- a/inc/TopOpeBRepDS_DataMapOfIntegerListOfInterference.hxx
+++ b/inc/TopOpeBRepDS_DataMapOfIntegerListOfInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference;
 class TopOpeBRepDS_DataMapOfIntegerListOfInterference  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapOfIntegerListOfInterference(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_DataMapOfInterferenceListOfInterference.hxx b/inc/TopOpeBRepDS_DataMapOfInterferenceListOfInterference.hxx
index f1f40e0..95ab704 100644
--- a/inc/TopOpeBRepDS_DataMapOfInterferenceListOfInterference.hxx
+++ b/inc/TopOpeBRepDS_DataMapOfInterferenceListOfInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceListOfInterference;
 class TopOpeBRepDS_DataMapOfInterferenceListOfInterference  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapOfInterferenceListOfInterference(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_DataMapOfInterferenceShape.hxx b/inc/TopOpeBRepDS_DataMapOfInterferenceShape.hxx
index 298a8d8..02bf827 100644
--- a/inc/TopOpeBRepDS_DataMapOfInterferenceShape.hxx
+++ b/inc/TopOpeBRepDS_DataMapOfInterferenceShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceShape;
 class TopOpeBRepDS_DataMapOfInterferenceShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapOfInterferenceShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State.hxx b/inc/TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State.hxx
index a0de82e..3b6b507 100644
--- a/inc/TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State.hxx
+++ b/inc/TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeListOfShapeOn1State;
 class TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_DataMapOfShapeState.hxx b/inc/TopOpeBRepDS_DataMapOfShapeState.hxx
index 92bd79d..701710b 100644
--- a/inc/TopOpeBRepDS_DataMapOfShapeState.hxx
+++ b/inc/TopOpeBRepDS_DataMapOfShapeState.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeState;
 class TopOpeBRepDS_DataMapOfShapeState  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataMapOfShapeState(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_DataStructure.hxx b/inc/TopOpeBRepDS_DataStructure.hxx
index ed1dd7b..25efd54 100644
--- a/inc/TopOpeBRepDS_DataStructure.hxx
+++ b/inc/TopOpeBRepDS_DataStructure.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -95,18 +98,7 @@ class TopTools_IndexedMapOfShape;
 class TopOpeBRepDS_DataStructure  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DataStructure();
diff --git a/inc/TopOpeBRepDS_DoubleMapIteratorOfDoubleMapOfIntegerShape.hxx b/inc/TopOpeBRepDS_DoubleMapIteratorOfDoubleMapOfIntegerShape.hxx
index 0c0a6ac..15d0c92 100644
--- a/inc/TopOpeBRepDS_DoubleMapIteratorOfDoubleMapOfIntegerShape.hxx
+++ b/inc/TopOpeBRepDS_DoubleMapIteratorOfDoubleMapOfIntegerShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TopOpeBRepDS_DoubleMapNodeOfDoubleMapOfIntegerShape;
 class TopOpeBRepDS_DoubleMapIteratorOfDoubleMapOfIntegerShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DoubleMapIteratorOfDoubleMapOfIntegerShape();
diff --git a/inc/TopOpeBRepDS_DoubleMapOfIntegerShape.hxx b/inc/TopOpeBRepDS_DoubleMapOfIntegerShape.hxx
index d568f88..0029b8d 100644
--- a/inc/TopOpeBRepDS_DoubleMapOfIntegerShape.hxx
+++ b/inc/TopOpeBRepDS_DoubleMapOfIntegerShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TopOpeBRepDS_DoubleMapIteratorOfDoubleMapOfIntegerShape;
 class TopOpeBRepDS_DoubleMapOfIntegerShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_DoubleMapOfIntegerShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_Dumper.hxx b/inc/TopOpeBRepDS_Dumper.hxx
index 3fde110..50a5a14 100644
--- a/inc/TopOpeBRepDS_Dumper.hxx
+++ b/inc/TopOpeBRepDS_Dumper.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class TopTools_ListOfShape;
 class TopOpeBRepDS_Dumper  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_Dumper(const Handle(TopOpeBRepDS_HDataStructure)& HDS);
diff --git a/inc/TopOpeBRepDS_EIR.hxx b/inc/TopOpeBRepDS_EIR.hxx
index a0fa629..c361085 100644
--- a/inc/TopOpeBRepDS_EIR.hxx
+++ b/inc/TopOpeBRepDS_EIR.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TopOpeBRepDS_HDataStructure;
 class TopOpeBRepDS_EIR  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_EIR(const Handle(TopOpeBRepDS_HDataStructure)& HDS);
diff --git a/inc/TopOpeBRepDS_Edge3dInterferenceTool.hxx b/inc/TopOpeBRepDS_Edge3dInterferenceTool.hxx
index dc71c88..f1f35d4 100644
--- a/inc/TopOpeBRepDS_Edge3dInterferenceTool.hxx
+++ b/inc/TopOpeBRepDS_Edge3dInterferenceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class TopOpeBRepDS_Interference;
 class TopOpeBRepDS_Edge3dInterferenceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_Edge3dInterferenceTool();
diff --git a/inc/TopOpeBRepDS_EdgeInterferenceTool.hxx b/inc/TopOpeBRepDS_EdgeInterferenceTool.hxx
index e73ba17..0d9625f 100644
--- a/inc/TopOpeBRepDS_EdgeInterferenceTool.hxx
+++ b/inc/TopOpeBRepDS_EdgeInterferenceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TopOpeBRepDS_Point;
 class TopOpeBRepDS_EdgeInterferenceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_EdgeInterferenceTool();
diff --git a/inc/TopOpeBRepDS_Explorer.hxx b/inc/TopOpeBRepDS_Explorer.hxx
index e38ec09..4ca9f60 100644
--- a/inc/TopOpeBRepDS_Explorer.hxx
+++ b/inc/TopOpeBRepDS_Explorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopoDS_Vertex;
 class TopOpeBRepDS_Explorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_Explorer();
diff --git a/inc/TopOpeBRepDS_FIR.hxx b/inc/TopOpeBRepDS_FIR.hxx
index a061c39..ab65c7c 100644
--- a/inc/TopOpeBRepDS_FIR.hxx
+++ b/inc/TopOpeBRepDS_FIR.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State;
 class TopOpeBRepDS_FIR  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_FIR(const Handle(TopOpeBRepDS_HDataStructure)& HDS);
diff --git a/inc/TopOpeBRepDS_FaceInterferenceTool.hxx b/inc/TopOpeBRepDS_FaceInterferenceTool.hxx
index 4acecbb..b4ed62a 100644
--- a/inc/TopOpeBRepDS_FaceInterferenceTool.hxx
+++ b/inc/TopOpeBRepDS_FaceInterferenceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class gp_Pnt;
 class TopOpeBRepDS_FaceInterferenceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_FaceInterferenceTool(const TopOpeBRepDS_PDataStructure& P);
diff --git a/inc/TopOpeBRepDS_Filter.hxx b/inc/TopOpeBRepDS_Filter.hxx
index a0a8cd8..2eb011b 100644
--- a/inc/TopOpeBRepDS_Filter.hxx
+++ b/inc/TopOpeBRepDS_Filter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State;
 class TopOpeBRepDS_Filter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_Filter(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const TopOpeBRepTool_PShapeClassifier& pClassif = 0);
diff --git a/inc/TopOpeBRepDS_GapFiller.hxx b/inc/TopOpeBRepDS_GapFiller.hxx
index a4088cb..d3b2305 100644
--- a/inc/TopOpeBRepDS_GapFiller.hxx
+++ b/inc/TopOpeBRepDS_GapFiller.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TColStd_MapOfInteger;
 class TopOpeBRepDS_GapFiller  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_GapFiller(const Handle(TopOpeBRepDS_HDataStructure)& HDS);
diff --git a/inc/TopOpeBRepDS_GeometryData.hxx b/inc/TopOpeBRepDS_GeometryData.hxx
index 9f04858..699158e 100644
--- a/inc/TopOpeBRepDS_GeometryData.hxx
+++ b/inc/TopOpeBRepDS_GeometryData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class TopOpeBRepDS_Interference;
 class TopOpeBRepDS_GeometryData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_GeometryData();
diff --git a/inc/TopOpeBRepDS_IndexedDataMapOfShapeWithState.hxx b/inc/TopOpeBRepDS_IndexedDataMapOfShapeWithState.hxx
index 0a691b1..4b568e3 100644
--- a/inc/TopOpeBRepDS_IndexedDataMapOfShapeWithState.hxx
+++ b/inc/TopOpeBRepDS_IndexedDataMapOfShapeWithState.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepDS_IndexedDataMapNodeOfIndexedDataMapOfShapeWithState;
 class TopOpeBRepDS_IndexedDataMapOfShapeWithState  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_IndexedDataMapOfShapeWithState(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_IndexedDataMapOfVertexPoint.hxx b/inc/TopOpeBRepDS_IndexedDataMapOfVertexPoint.hxx
index b6971f2..4d85dff 100644
--- a/inc/TopOpeBRepDS_IndexedDataMapOfVertexPoint.hxx
+++ b/inc/TopOpeBRepDS_IndexedDataMapOfVertexPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepDS_IndexedDataMapNodeOfIndexedDataMapOfVertexPoint;
 class TopOpeBRepDS_IndexedDataMapOfVertexPoint  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_IndexedDataMapOfVertexPoint(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_InterferenceIterator.hxx b/inc/TopOpeBRepDS_InterferenceIterator.hxx
index e48b872..bc434da 100644
--- a/inc/TopOpeBRepDS_InterferenceIterator.hxx
+++ b/inc/TopOpeBRepDS_InterferenceIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopOpeBRepDS_ListIteratorOfListOfInterference;
 class TopOpeBRepDS_InterferenceIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_InterferenceIterator();
diff --git a/inc/TopOpeBRepDS_InterferenceTool.hxx b/inc/TopOpeBRepDS_InterferenceTool.hxx
index c90d148..0246fdd 100644
--- a/inc/TopOpeBRepDS_InterferenceTool.hxx
+++ b/inc/TopOpeBRepDS_InterferenceTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Geom2d_Curve;
 class TopOpeBRepDS_InterferenceTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_TopOpeBRepDS_Interference MakeEdgeInterference(const TopOpeBRepDS_Transition& T,const TopOpeBRepDS_Kind SK,const Standard_Integer SI,const TopOpeBRepDS_Kind GK,const Standard_Integer GI,const Standard_Real P) ;
diff --git a/inc/TopOpeBRepDS_ListIteratorOfListOfInterference.hxx b/inc/TopOpeBRepDS_ListIteratorOfListOfInterference.hxx
index 60a5b18..f672c63 100644
--- a/inc/TopOpeBRepDS_ListIteratorOfListOfInterference.hxx
+++ b/inc/TopOpeBRepDS_ListIteratorOfListOfInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopOpeBRepDS_ListNodeOfListOfInterference;
 class TopOpeBRepDS_ListIteratorOfListOfInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_ListIteratorOfListOfInterference();
diff --git a/inc/TopOpeBRepDS_ListOfInterference.hxx b/inc/TopOpeBRepDS_ListOfInterference.hxx
index 20d34d1..9bd8a8e 100644
--- a/inc/TopOpeBRepDS_ListOfInterference.hxx
+++ b/inc/TopOpeBRepDS_ListOfInterference.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class TopOpeBRepDS_ListNodeOfListOfInterference;
 class TopOpeBRepDS_ListOfInterference  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_ListOfInterference();
diff --git a/inc/TopOpeBRepDS_ListOfShapeOn1State.hxx b/inc/TopOpeBRepDS_ListOfShapeOn1State.hxx
index e036bcf..a978b6f 100644
--- a/inc/TopOpeBRepDS_ListOfShapeOn1State.hxx
+++ b/inc/TopOpeBRepDS_ListOfShapeOn1State.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopTools_ListOfShape;
 class TopOpeBRepDS_ListOfShapeOn1State  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_ListOfShapeOn1State();
diff --git a/inc/TopOpeBRepDS_MapOfCurve.hxx b/inc/TopOpeBRepDS_MapOfCurve.hxx
index 2685158..c6955bd 100644
--- a/inc/TopOpeBRepDS_MapOfCurve.hxx
+++ b/inc/TopOpeBRepDS_MapOfCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopOpeBRepDS_DataMapIteratorOfMapOfCurve;
 class TopOpeBRepDS_MapOfCurve  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_MapOfCurve(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_MapOfIntegerShapeData.hxx b/inc/TopOpeBRepDS_MapOfIntegerShapeData.hxx
index 5fb7a72..89cf623 100644
--- a/inc/TopOpeBRepDS_MapOfIntegerShapeData.hxx
+++ b/inc/TopOpeBRepDS_MapOfIntegerShapeData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopOpeBRepDS_DataMapIteratorOfMapOfIntegerShapeData;
 class TopOpeBRepDS_MapOfIntegerShapeData  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_MapOfIntegerShapeData(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_MapOfPoint.hxx b/inc/TopOpeBRepDS_MapOfPoint.hxx
index f39de5d..bc21325 100644
--- a/inc/TopOpeBRepDS_MapOfPoint.hxx
+++ b/inc/TopOpeBRepDS_MapOfPoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopOpeBRepDS_DataMapIteratorOfMapOfPoint;
 class TopOpeBRepDS_MapOfPoint  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_MapOfPoint(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_MapOfShapeData.hxx b/inc/TopOpeBRepDS_MapOfShapeData.hxx
index e27aa25..4741cbe 100644
--- a/inc/TopOpeBRepDS_MapOfShapeData.hxx
+++ b/inc/TopOpeBRepDS_MapOfShapeData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepDS_IndexedDataMapNodeOfMapOfShapeData;
 class TopOpeBRepDS_MapOfShapeData  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_MapOfShapeData(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_MapOfSurface.hxx b/inc/TopOpeBRepDS_MapOfSurface.hxx
index 02df138..cf2b92a 100644
--- a/inc/TopOpeBRepDS_MapOfSurface.hxx
+++ b/inc/TopOpeBRepDS_MapOfSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopOpeBRepDS_DataMapIteratorOfMapOfSurface;
 class TopOpeBRepDS_MapOfSurface  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_MapOfSurface(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_Point.hxx b/inc/TopOpeBRepDS_Point.hxx
index 5ffc8da..0e1727f 100644
--- a/inc/TopOpeBRepDS_Point.hxx
+++ b/inc/TopOpeBRepDS_Point.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopoDS_Shape;
 class TopOpeBRepDS_Point  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_Point();
diff --git a/inc/TopOpeBRepDS_PointData.hxx b/inc/TopOpeBRepDS_PointData.hxx
index 4daed9a..8c64dd5 100644
--- a/inc/TopOpeBRepDS_PointData.hxx
+++ b/inc/TopOpeBRepDS_PointData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopOpeBRepDS_Point;
 class TopOpeBRepDS_PointData  : public TopOpeBRepDS_GeometryData {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_PointData();
diff --git a/inc/TopOpeBRepDS_PointExplorer.hxx b/inc/TopOpeBRepDS_PointExplorer.hxx
index dced418..365acfb 100644
--- a/inc/TopOpeBRepDS_PointExplorer.hxx
+++ b/inc/TopOpeBRepDS_PointExplorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepDS_Point;
 class TopOpeBRepDS_PointExplorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_PointExplorer();
diff --git a/inc/TopOpeBRepDS_PointIterator.hxx b/inc/TopOpeBRepDS_PointIterator.hxx
index 8531705..e2f8d49 100644
--- a/inc/TopOpeBRepDS_PointIterator.hxx
+++ b/inc/TopOpeBRepDS_PointIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class TopOpeBRepDS_Interference;
 class TopOpeBRepDS_PointIterator  : public TopOpeBRepDS_InterferenceIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an  iterator on the  points on curves <br>
 //!          described by the interferences in <L>. <br>
diff --git a/inc/TopOpeBRepDS_Reducer.hxx b/inc/TopOpeBRepDS_Reducer.hxx
index 78e56a5..829d016 100644
--- a/inc/TopOpeBRepDS_Reducer.hxx
+++ b/inc/TopOpeBRepDS_Reducer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State;
 class TopOpeBRepDS_Reducer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_Reducer(const Handle(TopOpeBRepDS_HDataStructure)& HDS);
diff --git a/inc/TopOpeBRepDS_ShapeData.hxx b/inc/TopOpeBRepDS_ShapeData.hxx
index e44a24a..1c7c0d3 100644
--- a/inc/TopOpeBRepDS_ShapeData.hxx
+++ b/inc/TopOpeBRepDS_ShapeData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TopOpeBRepDS_ListOfInterference;
 class TopOpeBRepDS_ShapeData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_ShapeData();
diff --git a/inc/TopOpeBRepDS_ShapeSurface.hxx b/inc/TopOpeBRepDS_ShapeSurface.hxx
index cdb1036..167369f 100644
--- a/inc/TopOpeBRepDS_ShapeSurface.hxx
+++ b/inc/TopOpeBRepDS_ShapeSurface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TopOpeBRepDS_DataMapIteratorOfShapeSurface;
 class TopOpeBRepDS_ShapeSurface  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_ShapeSurface(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepDS_ShapeWithState.hxx b/inc/TopOpeBRepDS_ShapeWithState.hxx
index 4088dcf..f5c6df7 100644
--- a/inc/TopOpeBRepDS_ShapeWithState.hxx
+++ b/inc/TopOpeBRepDS_ShapeWithState.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopoDS_Shape;
 class TopOpeBRepDS_ShapeWithState  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_ShapeWithState();
diff --git a/inc/TopOpeBRepDS_Surface.hxx b/inc/TopOpeBRepDS_Surface.hxx
index 90a4632..4543cb3 100644
--- a/inc/TopOpeBRepDS_Surface.hxx
+++ b/inc/TopOpeBRepDS_Surface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Geom_Surface;
 class TopOpeBRepDS_Surface  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_Surface();
diff --git a/inc/TopOpeBRepDS_SurfaceData.hxx b/inc/TopOpeBRepDS_SurfaceData.hxx
index 4befc1f..d037a90 100644
--- a/inc/TopOpeBRepDS_SurfaceData.hxx
+++ b/inc/TopOpeBRepDS_SurfaceData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class TopOpeBRepDS_Surface;
 class TopOpeBRepDS_SurfaceData  : public TopOpeBRepDS_GeometryData {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_SurfaceData();
diff --git a/inc/TopOpeBRepDS_SurfaceExplorer.hxx b/inc/TopOpeBRepDS_SurfaceExplorer.hxx
index c043bdb..8636b97 100644
--- a/inc/TopOpeBRepDS_SurfaceExplorer.hxx
+++ b/inc/TopOpeBRepDS_SurfaceExplorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepDS_Surface;
 class TopOpeBRepDS_SurfaceExplorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_SurfaceExplorer();
diff --git a/inc/TopOpeBRepDS_SurfaceIterator.hxx b/inc/TopOpeBRepDS_SurfaceIterator.hxx
index 292840e..1ac8a68 100644
--- a/inc/TopOpeBRepDS_SurfaceIterator.hxx
+++ b/inc/TopOpeBRepDS_SurfaceIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TopOpeBRepDS_ListOfInterference;
 class TopOpeBRepDS_SurfaceIterator  : public TopOpeBRepDS_InterferenceIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an  iterator on the  Surfaces on solid <br>
 //!          described by the interferences in <L>. <br>
diff --git a/inc/TopOpeBRepDS_TKI.hxx b/inc/TopOpeBRepDS_TKI.hxx
index 88b83fe..489c187 100644
--- a/inc/TopOpeBRepDS_TKI.hxx
+++ b/inc/TopOpeBRepDS_TKI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TopOpeBRepDS_Interference;
 class TopOpeBRepDS_TKI  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_TKI();
diff --git a/inc/TopOpeBRepDS_TOOL.hxx b/inc/TopOpeBRepDS_TOOL.hxx
index 2d215ee..7eb704b 100644
--- a/inc/TopOpeBRepDS_TOOL.hxx
+++ b/inc/TopOpeBRepDS_TOOL.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State;
 class TopOpeBRepDS_TOOL  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer EShareG(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const TopoDS_Edge& E,TopTools_ListOfShape& lEsd) ;
diff --git a/inc/TopOpeBRepDS_Transition.hxx b/inc/TopOpeBRepDS_Transition.hxx
index 71ed027..d933f10 100644
--- a/inc/TopOpeBRepDS_Transition.hxx
+++ b/inc/TopOpeBRepDS_Transition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@
 class TopOpeBRepDS_Transition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepDS_Transition();
diff --git a/inc/TopOpeBRepTool.hxx b/inc/TopOpeBRepTool.hxx
index 9d4c0c2..66ca6c3 100644
--- a/inc/TopOpeBRepTool.hxx
+++ b/inc/TopOpeBRepTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -78,18 +81,7 @@ class TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeface;
 class TopOpeBRepTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! In case face <FF> is built on UV-non-connexed  wires <br>
 //!          (with the two closing edges  FORWARD and REVERSED, in <br>
diff --git a/inc/TopOpeBRepTool_AncestorsTool.hxx b/inc/TopOpeBRepTool_AncestorsTool.hxx
index 899dd31..d1fab0b 100644
--- a/inc/TopOpeBRepTool_AncestorsTool.hxx
+++ b/inc/TopOpeBRepTool_AncestorsTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopTools_IndexedDataMapOfShapeListOfShape;
 class TopOpeBRepTool_AncestorsTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! same as package method TopExp::MapShapeListOfShapes() <br>
   Standard_EXPORT   static  void MakeAncestors(const TopoDS_Shape& S,const TopAbs_ShapeEnum TS,const TopAbs_ShapeEnum TA,TopTools_IndexedDataMapOfShapeListOfShape& M) ;
diff --git a/inc/TopOpeBRepTool_BoxSort.hxx b/inc/TopOpeBRepTool_BoxSort.hxx
index 06e1907..fe854ac 100644
--- a/inc/TopOpeBRepTool_BoxSort.hxx
+++ b/inc/TopOpeBRepTool_BoxSort.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class TColStd_ListIteratorOfListOfInteger;
 class TopOpeBRepTool_BoxSort  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_BoxSort();
diff --git a/inc/TopOpeBRepTool_C2DF.hxx b/inc/TopOpeBRepTool_C2DF.hxx
index 7f3a95e..01a1f13 100644
--- a/inc/TopOpeBRepTool_C2DF.hxx
+++ b/inc/TopOpeBRepTool_C2DF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopoDS_Face;
 class TopOpeBRepTool_C2DF  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_C2DF();
diff --git a/inc/TopOpeBRepTool_CLASSI.hxx b/inc/TopOpeBRepTool_CLASSI.hxx
index e9047bf..19f13b1 100644
--- a/inc/TopOpeBRepTool_CLASSI.hxx
+++ b/inc/TopOpeBRepTool_CLASSI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TopTools_DataMapOfShapeListOfShape;
 class TopOpeBRepTool_CLASSI  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_CLASSI();
diff --git a/inc/TopOpeBRepTool_CORRISO.hxx b/inc/TopOpeBRepTool_CORRISO.hxx
index bda6cf0..05c2501 100644
--- a/inc/TopOpeBRepTool_CORRISO.hxx
+++ b/inc/TopOpeBRepTool_CORRISO.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,7 @@ class TopoDS_Vertex;
 class TopOpeBRepTool_CORRISO  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_CORRISO();
diff --git a/inc/TopOpeBRepTool_CurveTool.hxx b/inc/TopOpeBRepTool_CurveTool.hxx
index a19c199..b987e98 100644
--- a/inc/TopOpeBRepTool_CurveTool.hxx
+++ b/inc/TopOpeBRepTool_CurveTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TColgp_Array1OfPnt2d;
 class TopOpeBRepTool_CurveTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_CurveTool();
diff --git a/inc/TopOpeBRepTool_DataMapIteratorOfDataMapOfOrientedShapeC2DF.hxx b/inc/TopOpeBRepTool_DataMapIteratorOfDataMapOfOrientedShapeC2DF.hxx
index 4c68b36..bb8bf25 100644
--- a/inc/TopOpeBRepTool_DataMapIteratorOfDataMapOfOrientedShapeC2DF.hxx
+++ b/inc/TopOpeBRepTool_DataMapIteratorOfDataMapOfOrientedShapeC2DF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopOpeBRepTool_DataMapNodeOfDataMapOfOrientedShapeC2DF;
 class TopOpeBRepTool_DataMapIteratorOfDataMapOfOrientedShapeC2DF  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_DataMapIteratorOfDataMapOfOrientedShapeC2DF();
diff --git a/inc/TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeListOfC2DF.hxx b/inc/TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeListOfC2DF.hxx
index bb750df..73f115b 100644
--- a/inc/TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeListOfC2DF.hxx
+++ b/inc/TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeListOfC2DF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopOpeBRepTool_DataMapNodeOfDataMapOfShapeListOfC2DF;
 class TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeListOfC2DF  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeListOfC2DF();
diff --git a/inc/TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeface.hxx b/inc/TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeface.hxx
index a756381..cf9f946 100644
--- a/inc/TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeface.hxx
+++ b/inc/TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopOpeBRepTool_DataMapNodeOfDataMapOfShapeface;
 class TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeface  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeface();
diff --git a/inc/TopOpeBRepTool_DataMapOfOrientedShapeC2DF.hxx b/inc/TopOpeBRepTool_DataMapOfOrientedShapeC2DF.hxx
index b146b23..51b403b 100644
--- a/inc/TopOpeBRepTool_DataMapOfOrientedShapeC2DF.hxx
+++ b/inc/TopOpeBRepTool_DataMapOfOrientedShapeC2DF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepTool_DataMapIteratorOfDataMapOfOrientedShapeC2DF;
 class TopOpeBRepTool_DataMapOfOrientedShapeC2DF  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_DataMapOfOrientedShapeC2DF(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepTool_DataMapOfShapeListOfC2DF.hxx b/inc/TopOpeBRepTool_DataMapOfShapeListOfC2DF.hxx
index 13eaa23..cc77cb0 100644
--- a/inc/TopOpeBRepTool_DataMapOfShapeListOfC2DF.hxx
+++ b/inc/TopOpeBRepTool_DataMapOfShapeListOfC2DF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeListOfC2DF;
 class TopOpeBRepTool_DataMapOfShapeListOfC2DF  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_DataMapOfShapeListOfC2DF(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepTool_DataMapOfShapeface.hxx b/inc/TopOpeBRepTool_DataMapOfShapeface.hxx
index 37ea54b..fdb65b6 100644
--- a/inc/TopOpeBRepTool_DataMapOfShapeface.hxx
+++ b/inc/TopOpeBRepTool_DataMapOfShapeface.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepTool_DataMapIteratorOfDataMapOfShapeface;
 class TopOpeBRepTool_DataMapOfShapeface  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_DataMapOfShapeface(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepTool_FuseEdges.hxx b/inc/TopOpeBRepTool_FuseEdges.hxx
index f551cc7..b3d0839 100644
--- a/inc/TopOpeBRepTool_FuseEdges.hxx
+++ b/inc/TopOpeBRepTool_FuseEdges.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class TopoDS_Edge;
 class TopOpeBRepTool_FuseEdges  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initialise members  and build  construction of map <br>
 //!          of ancestors. <br>
diff --git a/inc/TopOpeBRepTool_GeomTool.hxx b/inc/TopOpeBRepTool_GeomTool.hxx
index 7970e72..f578a6f 100644
--- a/inc/TopOpeBRepTool_GeomTool.hxx
+++ b/inc/TopOpeBRepTool_GeomTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@
 class TopOpeBRepTool_GeomTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Boolean flags <CompC3D>, <CompPC1>, <CompPC2> <br>
 //!          indicate whether  the  corresponding result curves <br>
diff --git a/inc/TopOpeBRepTool_IndexedDataMapOfShapeBox.hxx b/inc/TopOpeBRepTool_IndexedDataMapOfShapeBox.hxx
index 58c9a51..f6f6113 100644
--- a/inc/TopOpeBRepTool_IndexedDataMapOfShapeBox.hxx
+++ b/inc/TopOpeBRepTool_IndexedDataMapOfShapeBox.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepTool_IndexedDataMapNodeOfIndexedDataMapOfShapeBox;
 class TopOpeBRepTool_IndexedDataMapOfShapeBox  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_IndexedDataMapOfShapeBox(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepTool_IndexedDataMapOfShapeBox2d.hxx b/inc/TopOpeBRepTool_IndexedDataMapOfShapeBox2d.hxx
index c5ce5a3..4465542 100644
--- a/inc/TopOpeBRepTool_IndexedDataMapOfShapeBox2d.hxx
+++ b/inc/TopOpeBRepTool_IndexedDataMapOfShapeBox2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepTool_IndexedDataMapNodeOfIndexedDataMapOfShapeBox2d;
 class TopOpeBRepTool_IndexedDataMapOfShapeBox2d  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_IndexedDataMapOfShapeBox2d(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepTool_IndexedDataMapOfShapeconnexity.hxx b/inc/TopOpeBRepTool_IndexedDataMapOfShapeconnexity.hxx
index 6525536..8b8d0ff 100644
--- a/inc/TopOpeBRepTool_IndexedDataMapOfShapeconnexity.hxx
+++ b/inc/TopOpeBRepTool_IndexedDataMapOfShapeconnexity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepTool_IndexedDataMapNodeOfIndexedDataMapOfShapeconnexity;
 class TopOpeBRepTool_IndexedDataMapOfShapeconnexity  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_IndexedDataMapOfShapeconnexity(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepTool_IndexedDataMapOfSolidClassifier.hxx b/inc/TopOpeBRepTool_IndexedDataMapOfSolidClassifier.hxx
index cc405d5..a823fa5 100644
--- a/inc/TopOpeBRepTool_IndexedDataMapOfSolidClassifier.hxx
+++ b/inc/TopOpeBRepTool_IndexedDataMapOfSolidClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopOpeBRepTool_IndexedDataMapNodeOfIndexedDataMapOfSolidClassifier;
 class TopOpeBRepTool_IndexedDataMapOfSolidClassifier  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_IndexedDataMapOfSolidClassifier(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRepTool_ListIteratorOfListOfC2DF.hxx b/inc/TopOpeBRepTool_ListIteratorOfListOfC2DF.hxx
index dd1bb0b..37506fd 100644
--- a/inc/TopOpeBRepTool_ListIteratorOfListOfC2DF.hxx
+++ b/inc/TopOpeBRepTool_ListIteratorOfListOfC2DF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRepTool_ListNodeOfListOfC2DF;
 class TopOpeBRepTool_ListIteratorOfListOfC2DF  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_ListIteratorOfListOfC2DF();
diff --git a/inc/TopOpeBRepTool_ListOfC2DF.hxx b/inc/TopOpeBRepTool_ListOfC2DF.hxx
index 68f6e35..ef28f75 100644
--- a/inc/TopOpeBRepTool_ListOfC2DF.hxx
+++ b/inc/TopOpeBRepTool_ListOfC2DF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopOpeBRepTool_ListNodeOfListOfC2DF;
 class TopOpeBRepTool_ListOfC2DF  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_ListOfC2DF();
diff --git a/inc/TopOpeBRepTool_PurgeInternalEdges.hxx b/inc/TopOpeBRepTool_PurgeInternalEdges.hxx
index cfe9af1..23f5bbf 100644
--- a/inc/TopOpeBRepTool_PurgeInternalEdges.hxx
+++ b/inc/TopOpeBRepTool_PurgeInternalEdges.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopTools_DataMapOfShapeListOfShape;
 class TopOpeBRepTool_PurgeInternalEdges  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initialize   members and  begin  exploration   of  shape <br>
 //!          depending of the value of PerformNow <br>
diff --git a/inc/TopOpeBRepTool_REGUS.hxx b/inc/TopOpeBRepTool_REGUS.hxx
index 6fa5774..4aca9dd 100644
--- a/inc/TopOpeBRepTool_REGUS.hxx
+++ b/inc/TopOpeBRepTool_REGUS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopoDS_Edge;
 class TopOpeBRepTool_REGUS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_REGUS();
diff --git a/inc/TopOpeBRepTool_REGUW.hxx b/inc/TopOpeBRepTool_REGUW.hxx
index 8452328..c7bbb45 100644
--- a/inc/TopOpeBRepTool_REGUW.hxx
+++ b/inc/TopOpeBRepTool_REGUW.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class TopOpeBRepTool_connexity;
 class TopOpeBRepTool_REGUW  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_REGUW(const TopoDS_Face& FRef);
diff --git a/inc/TopOpeBRepTool_ShapeClassifier.hxx b/inc/TopOpeBRepTool_ShapeClassifier.hxx
index b8d8ec3..00e85ea 100644
--- a/inc/TopOpeBRepTool_ShapeClassifier.hxx
+++ b/inc/TopOpeBRepTool_ShapeClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class gp_Pnt;
 class TopOpeBRepTool_ShapeClassifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_ShapeClassifier();
diff --git a/inc/TopOpeBRepTool_ShapeExplorer.hxx b/inc/TopOpeBRepTool_ShapeExplorer.hxx
index 070ad0e..f900cfa 100644
--- a/inc/TopOpeBRepTool_ShapeExplorer.hxx
+++ b/inc/TopOpeBRepTool_ShapeExplorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopoDS_Shape;
 class TopOpeBRepTool_ShapeExplorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty explorer, becomes usefull after Init. <br>
   Standard_EXPORT   TopOpeBRepTool_ShapeExplorer();
diff --git a/inc/TopOpeBRepTool_ShapeTool.hxx b/inc/TopOpeBRepTool_ShapeTool.hxx
index fd232fb..f398c17 100644
--- a/inc/TopOpeBRepTool_ShapeTool.hxx
+++ b/inc/TopOpeBRepTool_ShapeTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class gp_Dir;
 class TopOpeBRepTool_ShapeTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the tolerance of the shape <S>. <br>
 //!          If the shape <S> is Null, returns 0. <br>
diff --git a/inc/TopOpeBRepTool_SolidClassifier.hxx b/inc/TopOpeBRepTool_SolidClassifier.hxx
index 965a246..e5ea648 100644
--- a/inc/TopOpeBRepTool_SolidClassifier.hxx
+++ b/inc/TopOpeBRepTool_SolidClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TopoDS_Shell;
 class TopOpeBRepTool_SolidClassifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_SolidClassifier();
diff --git a/inc/TopOpeBRepTool_TOOL.hxx b/inc/TopOpeBRepTool_TOOL.hxx
index 2504412..ac03a8a 100644
--- a/inc/TopOpeBRepTool_TOOL.hxx
+++ b/inc/TopOpeBRepTool_TOOL.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopTools_DataMapOfShapeListOfShape;
 class TopOpeBRepTool_TOOL  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer OriinSor(const TopoDS_Shape& sub,const TopoDS_Shape& S,const Standard_Boolean checkclo = Standard_False) ;
diff --git a/inc/TopOpeBRepTool_connexity.hxx b/inc/TopOpeBRepTool_connexity.hxx
index 8cb18b9..17998db 100644
--- a/inc/TopOpeBRepTool_connexity.hxx
+++ b/inc/TopOpeBRepTool_connexity.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopTools_ListOfShape;
 class TopOpeBRepTool_connexity  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_connexity();
diff --git a/inc/TopOpeBRepTool_face.hxx b/inc/TopOpeBRepTool_face.hxx
index 3add1e6..363a5be 100644
--- a/inc/TopOpeBRepTool_face.hxx
+++ b/inc/TopOpeBRepTool_face.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopoDS_Face;
 class TopOpeBRepTool_face  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_face();
diff --git a/inc/TopOpeBRepTool_makeTransition.hxx b/inc/TopOpeBRepTool_makeTransition.hxx
index e472284..095ee99 100644
--- a/inc/TopOpeBRepTool_makeTransition.hxx
+++ b/inc/TopOpeBRepTool_makeTransition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class gp_Pnt2d;
 class TopOpeBRepTool_makeTransition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_makeTransition();
diff --git a/inc/TopOpeBRepTool_mkTondgE.hxx b/inc/TopOpeBRepTool_mkTondgE.hxx
index db5c94d..fe6a3e1 100644
--- a/inc/TopOpeBRepTool_mkTondgE.hxx
+++ b/inc/TopOpeBRepTool_mkTondgE.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class TopTools_ListOfShape;
 class TopOpeBRepTool_mkTondgE  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRepTool_mkTondgE();
diff --git a/inc/TopOpeBRep_Array1OfLineInter.hxx b/inc/TopOpeBRep_Array1OfLineInter.hxx
index a61fcdf..3ffe9b1 100644
--- a/inc/TopOpeBRep_Array1OfLineInter.hxx
+++ b/inc/TopOpeBRep_Array1OfLineInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRep_LineInter;
 class TopOpeBRep_Array1OfLineInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_Array1OfLineInter(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TopOpeBRep_Array1OfVPointInter.hxx b/inc/TopOpeBRep_Array1OfVPointInter.hxx
index a3e0ee8..3b78f05 100644
--- a/inc/TopOpeBRep_Array1OfVPointInter.hxx
+++ b/inc/TopOpeBRep_Array1OfVPointInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRep_VPointInter;
 class TopOpeBRep_Array1OfVPointInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_Array1OfVPointInter(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TopOpeBRep_Bipoint.hxx b/inc/TopOpeBRep_Bipoint.hxx
index 5c202d3..8c64bec 100644
--- a/inc/TopOpeBRep_Bipoint.hxx
+++ b/inc/TopOpeBRep_Bipoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@
 class TopOpeBRep_Bipoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_Bipoint();
diff --git a/inc/TopOpeBRep_DSFiller.hxx b/inc/TopOpeBRep_DSFiller.hxx
index fe3d6e1..e7c89ab 100644
--- a/inc/TopOpeBRep_DSFiller.hxx
+++ b/inc/TopOpeBRep_DSFiller.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class TopOpeBRep_FaceEdgeFiller;
 class TopOpeBRep_DSFiller  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_DSFiller();
diff --git a/inc/TopOpeBRep_DataMapIteratorOfDataMapOfTopolTool.hxx b/inc/TopOpeBRep_DataMapIteratorOfDataMapOfTopolTool.hxx
index 1c15bd1..5f34aff 100644
--- a/inc/TopOpeBRep_DataMapIteratorOfDataMapOfTopolTool.hxx
+++ b/inc/TopOpeBRep_DataMapIteratorOfDataMapOfTopolTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class TopOpeBRep_DataMapNodeOfDataMapOfTopolTool;
 class TopOpeBRep_DataMapIteratorOfDataMapOfTopolTool  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_DataMapIteratorOfDataMapOfTopolTool();
diff --git a/inc/TopOpeBRep_DataMapOfTopolTool.hxx b/inc/TopOpeBRep_DataMapOfTopolTool.hxx
index 9d10272..309e609 100644
--- a/inc/TopOpeBRep_DataMapOfTopolTool.hxx
+++ b/inc/TopOpeBRep_DataMapOfTopolTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TopOpeBRep_DataMapIteratorOfDataMapOfTopolTool;
 class TopOpeBRep_DataMapOfTopolTool  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_DataMapOfTopolTool(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopOpeBRep_EdgesFiller.hxx b/inc/TopOpeBRep_EdgesFiller.hxx
index 46ab86d..c238c92 100644
--- a/inc/TopOpeBRep_EdgesFiller.hxx
+++ b/inc/TopOpeBRep_EdgesFiller.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class TopOpeBRepDS_ListOfInterference;
 class TopOpeBRep_EdgesFiller  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_EdgesFiller();
diff --git a/inc/TopOpeBRep_EdgesIntersector.hxx b/inc/TopOpeBRep_EdgesIntersector.hxx
index 7ba915e..962425a 100644
--- a/inc/TopOpeBRep_EdgesIntersector.hxx
+++ b/inc/TopOpeBRep_EdgesIntersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -82,18 +85,7 @@ class gp_Pnt;
 class TopOpeBRep_EdgesIntersector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_EdgesIntersector();
diff --git a/inc/TopOpeBRep_FFTransitionTool.hxx b/inc/TopOpeBRep_FFTransitionTool.hxx
index 6726267..940cfa1 100644
--- a/inc/TopOpeBRep_FFTransitionTool.hxx
+++ b/inc/TopOpeBRep_FFTransitionTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Shape;
 class TopOpeBRep_FFTransitionTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  TopOpeBRepDS_Transition ProcessLineTransition(const TopOpeBRep_VPointInter& P,const Standard_Integer Index,const TopAbs_Orientation EdgeOrientation) ;
diff --git a/inc/TopOpeBRep_FaceEdgeFiller.hxx b/inc/TopOpeBRep_FaceEdgeFiller.hxx
index 44faf2e..c538d50 100644
--- a/inc/TopOpeBRep_FaceEdgeFiller.hxx
+++ b/inc/TopOpeBRep_FaceEdgeFiller.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class TopOpeBRepDS_Interference;
 class TopOpeBRep_FaceEdgeFiller  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_FaceEdgeFiller();
diff --git a/inc/TopOpeBRep_FaceEdgeIntersector.hxx b/inc/TopOpeBRep_FaceEdgeIntersector.hxx
index 6ae30bd..3f34a10 100644
--- a/inc/TopOpeBRep_FaceEdgeIntersector.hxx
+++ b/inc/TopOpeBRep_FaceEdgeIntersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,7 @@ class TopoDS_Vertex;
 class TopOpeBRep_FaceEdgeIntersector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_FaceEdgeIntersector();
diff --git a/inc/TopOpeBRep_FacesFiller.hxx b/inc/TopOpeBRep_FacesFiller.hxx
index 155caf1..8eac0c6 100644
--- a/inc/TopOpeBRep_FacesFiller.hxx
+++ b/inc/TopOpeBRep_FacesFiller.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -97,18 +100,7 @@ class TopOpeBRepDS_DataStructure;
 class TopOpeBRep_FacesFiller  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_FacesFiller();
diff --git a/inc/TopOpeBRep_FacesIntersector.hxx b/inc/TopOpeBRep_FacesIntersector.hxx
index be57166..a99b157 100644
--- a/inc/TopOpeBRep_FacesIntersector.hxx
+++ b/inc/TopOpeBRep_FacesIntersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,7 @@ class TopOpeBRep_LineInter;
 class TopOpeBRep_FacesIntersector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_FacesIntersector();
diff --git a/inc/TopOpeBRep_GeomTool.hxx b/inc/TopOpeBRep_GeomTool.hxx
index 78a548f..a738ddf 100644
--- a/inc/TopOpeBRep_GeomTool.hxx
+++ b/inc/TopOpeBRep_GeomTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Geom_Curve;
 class TopOpeBRep_GeomTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_GeomTool();
diff --git a/inc/TopOpeBRep_LineInter.hxx b/inc/TopOpeBRep_LineInter.hxx
index 5c0db48..b7dbd2c 100644
--- a/inc/TopOpeBRep_LineInter.hxx
+++ b/inc/TopOpeBRep_LineInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -88,18 +91,7 @@ class TopOpeBRep_Bipoint;
 class TopOpeBRep_LineInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TopOpeBRep_LineInter();
diff --git a/inc/TopOpeBRep_ListIteratorOfListOfBipoint.hxx b/inc/TopOpeBRep_ListIteratorOfListOfBipoint.hxx
index d4311ca..0b17539 100644
--- a/inc/TopOpeBRep_ListIteratorOfListOfBipoint.hxx
+++ b/inc/TopOpeBRep_ListIteratorOfListOfBipoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopOpeBRep_ListNodeOfListOfBipoint;
 class TopOpeBRep_ListIteratorOfListOfBipoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_ListIteratorOfListOfBipoint();
diff --git a/inc/TopOpeBRep_ListOfBipoint.hxx b/inc/TopOpeBRep_ListOfBipoint.hxx
index c9e402c..19020b3 100644
--- a/inc/TopOpeBRep_ListOfBipoint.hxx
+++ b/inc/TopOpeBRep_ListOfBipoint.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopOpeBRep_ListNodeOfListOfBipoint;
 class TopOpeBRep_ListOfBipoint  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_ListOfBipoint();
diff --git a/inc/TopOpeBRep_Point2d.hxx b/inc/TopOpeBRep_Point2d.hxx
index da26754..389b29e 100644
--- a/inc/TopOpeBRep_Point2d.hxx
+++ b/inc/TopOpeBRep_Point2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -63,18 +66,7 @@ class gp_Pnt2d;
 class TopOpeBRep_Point2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_Point2d();
diff --git a/inc/TopOpeBRep_PointClassifier.hxx b/inc/TopOpeBRep_PointClassifier.hxx
index 89a7a98..b8d4a4f 100644
--- a/inc/TopOpeBRep_PointClassifier.hxx
+++ b/inc/TopOpeBRep_PointClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class gp_Pnt2d;
 class TopOpeBRep_PointClassifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_PointClassifier();
diff --git a/inc/TopOpeBRep_PointGeomTool.hxx b/inc/TopOpeBRep_PointGeomTool.hxx
index 89ac4e3..650b801 100644
--- a/inc/TopOpeBRep_PointGeomTool.hxx
+++ b/inc/TopOpeBRep_PointGeomTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class TopoDS_Shape;
 class TopOpeBRep_PointGeomTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_PointGeomTool();
diff --git a/inc/TopOpeBRep_SequenceOfPoint2d.hxx b/inc/TopOpeBRep_SequenceOfPoint2d.hxx
index f4df7b6..d169de0 100644
--- a/inc/TopOpeBRep_SequenceOfPoint2d.hxx
+++ b/inc/TopOpeBRep_SequenceOfPoint2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TopOpeBRep_SequenceNodeOfSequenceOfPoint2d;
 class TopOpeBRep_SequenceOfPoint2d  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TopOpeBRep_SequenceOfPoint2d();
diff --git a/inc/TopOpeBRep_ShapeIntersector.hxx b/inc/TopOpeBRep_ShapeIntersector.hxx
index feec3bb..ea9ef39 100644
--- a/inc/TopOpeBRep_ShapeIntersector.hxx
+++ b/inc/TopOpeBRep_ShapeIntersector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class TopTools_ListOfShape;
 class TopOpeBRep_ShapeIntersector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_ShapeIntersector();
diff --git a/inc/TopOpeBRep_ShapeIntersector2d.hxx b/inc/TopOpeBRep_ShapeIntersector2d.hxx
index 9233d88..595f603 100644
--- a/inc/TopOpeBRep_ShapeIntersector2d.hxx
+++ b/inc/TopOpeBRep_ShapeIntersector2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class TopOpeBRep_EdgesIntersector;
 class TopOpeBRep_ShapeIntersector2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_ShapeIntersector2d();
diff --git a/inc/TopOpeBRep_ShapeScanner.hxx b/inc/TopOpeBRep_ShapeScanner.hxx
index f7a7fdf..5cd8ce7 100644
--- a/inc/TopOpeBRep_ShapeScanner.hxx
+++ b/inc/TopOpeBRep_ShapeScanner.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class TopOpeBRepTool_BoxSort;
 class TopOpeBRep_ShapeScanner  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_ShapeScanner();
diff --git a/inc/TopOpeBRep_VPointInter.hxx b/inc/TopOpeBRep_VPointInter.hxx
index 8b03271..58cc272 100644
--- a/inc/TopOpeBRep_VPointInter.hxx
+++ b/inc/TopOpeBRep_VPointInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopoDS_Face;
 class TopOpeBRep_VPointInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TopOpeBRep_VPointInter();
diff --git a/inc/TopOpeBRep_VPointInterClassifier.hxx b/inc/TopOpeBRep_VPointInterClassifier.hxx
index 63e6b32..ac01187 100644
--- a/inc/TopOpeBRep_VPointInterClassifier.hxx
+++ b/inc/TopOpeBRep_VPointInterClassifier.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopOpeBRep_PointClassifier;
 class TopOpeBRep_VPointInterClassifier  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_VPointInterClassifier();
diff --git a/inc/TopOpeBRep_VPointInterIterator.hxx b/inc/TopOpeBRep_VPointInterIterator.hxx
index fb90aae..636d12a 100644
--- a/inc/TopOpeBRep_VPointInterIterator.hxx
+++ b/inc/TopOpeBRep_VPointInterIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopOpeBRep_VPointInter;
 class TopOpeBRep_VPointInterIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_VPointInterIterator();
diff --git a/inc/TopOpeBRep_WPointInter.hxx b/inc/TopOpeBRep_WPointInter.hxx
index 4e96cd1..c44b370 100644
--- a/inc/TopOpeBRep_WPointInter.hxx
+++ b/inc/TopOpeBRep_WPointInter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_Pnt;
 class TopOpeBRep_WPointInter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_WPointInter();
diff --git a/inc/TopOpeBRep_WPointInterIterator.hxx b/inc/TopOpeBRep_WPointInterIterator.hxx
index e0a2c74..7ebb1e5 100644
--- a/inc/TopOpeBRep_WPointInterIterator.hxx
+++ b/inc/TopOpeBRep_WPointInterIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopOpeBRep_WPointInter;
 class TopOpeBRep_WPointInterIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopOpeBRep_WPointInterIterator();
diff --git a/inc/TopTools.hxx b/inc/TopTools.hxx
index 2bace37..395e139 100644
--- a/inc/TopTools.hxx
+++ b/inc/TopTools.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -128,18 +131,7 @@ class TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape;
 class TopTools  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Dumps the topological structure  of <Sh>  on the <br>
 //!          stream <S>. <br>
diff --git a/inc/TopTools_Array1OfListOfShape.hxx b/inc/TopTools_Array1OfListOfShape.hxx
index 4cee427..87c12f5 100644
--- a/inc/TopTools_Array1OfListOfShape.hxx
+++ b/inc/TopTools_Array1OfListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopTools_ListOfShape;
 class TopTools_Array1OfListOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_Array1OfListOfShape(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TopTools_Array1OfShape.hxx b/inc/TopTools_Array1OfShape.hxx
index bbd364f..d7ddc84 100644
--- a/inc/TopTools_Array1OfShape.hxx
+++ b/inc/TopTools_Array1OfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopoDS_Shape;
 class TopTools_Array1OfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_Array1OfShape(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/TopTools_Array2OfShape.hxx b/inc/TopTools_Array2OfShape.hxx
index 5ca7667..1be93e0 100644
--- a/inc/TopTools_Array2OfShape.hxx
+++ b/inc/TopTools_Array2OfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopoDS_Shape;
 class TopTools_Array2OfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_Array2OfShape(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape.hxx b/inc/TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape.hxx
index ded869b..2398ebaa 100644
--- a/inc/TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape.hxx
+++ b/inc/TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopTools_DataMapNodeOfDataMapOfIntegerListOfShape;
 class TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape();
diff --git a/inc/TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx b/inc/TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx
index 327f15f..53ed5f7 100644
--- a/inc/TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx
+++ b/inc/TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopTools_DataMapNodeOfDataMapOfIntegerShape;
 class TopTools_DataMapIteratorOfDataMapOfIntegerShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapIteratorOfDataMapOfIntegerShape();
diff --git a/inc/TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger.hxx b/inc/TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger.hxx
index 4ddf2c5..63c76f3 100644
--- a/inc/TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger.hxx
+++ b/inc/TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopTools_DataMapNodeOfDataMapOfOrientedShapeInteger;
 class TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger();
diff --git a/inc/TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx b/inc/TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
index d668c16..71c2dfc 100644
--- a/inc/TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
+++ b/inc/TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopTools_DataMapNodeOfDataMapOfOrientedShapeShape;
 class TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape();
diff --git a/inc/TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx b/inc/TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx
index a030d51..f31ed10 100644
--- a/inc/TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx
+++ b/inc/TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopTools_DataMapNodeOfDataMapOfShapeInteger;
 class TopTools_DataMapIteratorOfDataMapOfShapeInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapIteratorOfDataMapOfShapeInteger();
diff --git a/inc/TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger.hxx b/inc/TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger.hxx
index 35c95db..67d1f5b 100644
--- a/inc/TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger.hxx
+++ b/inc/TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopTools_DataMapNodeOfDataMapOfShapeListOfInteger;
 class TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger();
diff --git a/inc/TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx b/inc/TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx
index 3dac436..0e08fe6 100644
--- a/inc/TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx
+++ b/inc/TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopTools_DataMapNodeOfDataMapOfShapeListOfShape;
 class TopTools_DataMapIteratorOfDataMapOfShapeListOfShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapIteratorOfDataMapOfShapeListOfShape();
diff --git a/inc/TopTools_DataMapIteratorOfDataMapOfShapeReal.hxx b/inc/TopTools_DataMapIteratorOfDataMapOfShapeReal.hxx
index 323e119..1d974e2 100644
--- a/inc/TopTools_DataMapIteratorOfDataMapOfShapeReal.hxx
+++ b/inc/TopTools_DataMapIteratorOfDataMapOfShapeReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopTools_DataMapNodeOfDataMapOfShapeReal;
 class TopTools_DataMapIteratorOfDataMapOfShapeReal  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapIteratorOfDataMapOfShapeReal();
diff --git a/inc/TopTools_DataMapIteratorOfDataMapOfShapeSequenceOfShape.hxx b/inc/TopTools_DataMapIteratorOfDataMapOfShapeSequenceOfShape.hxx
index 7f0a70e..58b9441 100644
--- a/inc/TopTools_DataMapIteratorOfDataMapOfShapeSequenceOfShape.hxx
+++ b/inc/TopTools_DataMapIteratorOfDataMapOfShapeSequenceOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class TopTools_DataMapNodeOfDataMapOfShapeSequenceOfShape;
 class TopTools_DataMapIteratorOfDataMapOfShapeSequenceOfShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapIteratorOfDataMapOfShapeSequenceOfShape();
diff --git a/inc/TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx b/inc/TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx
index 5dc0c01..be46d3a 100644
--- a/inc/TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx
+++ b/inc/TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopTools_DataMapNodeOfDataMapOfShapeShape;
 class TopTools_DataMapIteratorOfDataMapOfShapeShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapIteratorOfDataMapOfShapeShape();
diff --git a/inc/TopTools_DataMapOfIntegerListOfShape.hxx b/inc/TopTools_DataMapOfIntegerListOfShape.hxx
index 7f653d8..6e98ddd 100644
--- a/inc/TopTools_DataMapOfIntegerListOfShape.hxx
+++ b/inc/TopTools_DataMapOfIntegerListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape;
 class TopTools_DataMapOfIntegerListOfShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapOfIntegerListOfShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_DataMapOfIntegerShape.hxx b/inc/TopTools_DataMapOfIntegerShape.hxx
index 95ef0d4..0424d2e 100644
--- a/inc/TopTools_DataMapOfIntegerShape.hxx
+++ b/inc/TopTools_DataMapOfIntegerShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopTools_DataMapIteratorOfDataMapOfIntegerShape;
 class TopTools_DataMapOfIntegerShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapOfIntegerShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_DataMapOfOrientedShapeInteger.hxx b/inc/TopTools_DataMapOfOrientedShapeInteger.hxx
index 51bcc8c..5027ffe 100644
--- a/inc/TopTools_DataMapOfOrientedShapeInteger.hxx
+++ b/inc/TopTools_DataMapOfOrientedShapeInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger;
 class TopTools_DataMapOfOrientedShapeInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapOfOrientedShapeInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_DataMapOfOrientedShapeShape.hxx b/inc/TopTools_DataMapOfOrientedShapeShape.hxx
index b84629a..0111060 100644
--- a/inc/TopTools_DataMapOfOrientedShapeShape.hxx
+++ b/inc/TopTools_DataMapOfOrientedShapeShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape;
 class TopTools_DataMapOfOrientedShapeShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapOfOrientedShapeShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_DataMapOfShapeInteger.hxx b/inc/TopTools_DataMapOfShapeInteger.hxx
index c8092bb..c82acc7 100644
--- a/inc/TopTools_DataMapOfShapeInteger.hxx
+++ b/inc/TopTools_DataMapOfShapeInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopTools_DataMapIteratorOfDataMapOfShapeInteger;
 class TopTools_DataMapOfShapeInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapOfShapeInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_DataMapOfShapeListOfInteger.hxx b/inc/TopTools_DataMapOfShapeListOfInteger.hxx
index 84c5c5b..44f4552 100644
--- a/inc/TopTools_DataMapOfShapeListOfInteger.hxx
+++ b/inc/TopTools_DataMapOfShapeListOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger;
 class TopTools_DataMapOfShapeListOfInteger  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapOfShapeListOfInteger(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_DataMapOfShapeListOfShape.hxx b/inc/TopTools_DataMapOfShapeListOfShape.hxx
index 2957dc8..72ef010 100644
--- a/inc/TopTools_DataMapOfShapeListOfShape.hxx
+++ b/inc/TopTools_DataMapOfShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopTools_DataMapIteratorOfDataMapOfShapeListOfShape;
 class TopTools_DataMapOfShapeListOfShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapOfShapeListOfShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_DataMapOfShapeReal.hxx b/inc/TopTools_DataMapOfShapeReal.hxx
index 7fc2222..f291eab 100644
--- a/inc/TopTools_DataMapOfShapeReal.hxx
+++ b/inc/TopTools_DataMapOfShapeReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class TopTools_DataMapIteratorOfDataMapOfShapeReal;
 class TopTools_DataMapOfShapeReal  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapOfShapeReal(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_DataMapOfShapeSequenceOfShape.hxx b/inc/TopTools_DataMapOfShapeSequenceOfShape.hxx
index bb09c3b..467ddce 100644
--- a/inc/TopTools_DataMapOfShapeSequenceOfShape.hxx
+++ b/inc/TopTools_DataMapOfShapeSequenceOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopTools_DataMapIteratorOfDataMapOfShapeSequenceOfShape;
 class TopTools_DataMapOfShapeSequenceOfShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapOfShapeSequenceOfShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_DataMapOfShapeShape.hxx b/inc/TopTools_DataMapOfShapeShape.hxx
index d8ee32e..41c4663 100644
--- a/inc/TopTools_DataMapOfShapeShape.hxx
+++ b/inc/TopTools_DataMapOfShapeShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopTools_DataMapIteratorOfDataMapOfShapeShape;
 class TopTools_DataMapOfShapeShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_DataMapOfShapeShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_IndexedDataMapOfShapeAddress.hxx b/inc/TopTools_IndexedDataMapOfShapeAddress.hxx
index 0aeb4cc..182a84f 100644
--- a/inc/TopTools_IndexedDataMapOfShapeAddress.hxx
+++ b/inc/TopTools_IndexedDataMapOfShapeAddress.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopTools_IndexedDataMapNodeOfIndexedDataMapOfShapeAddress;
 class TopTools_IndexedDataMapOfShapeAddress  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_IndexedDataMapOfShapeAddress(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_IndexedDataMapOfShapeListOfShape.hxx b/inc/TopTools_IndexedDataMapOfShapeListOfShape.hxx
index 180f34e..044c0b2 100644
--- a/inc/TopTools_IndexedDataMapOfShapeListOfShape.hxx
+++ b/inc/TopTools_IndexedDataMapOfShapeListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class TopTools_IndexedDataMapNodeOfIndexedDataMapOfShapeListOfShape;
 class TopTools_IndexedDataMapOfShapeListOfShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_IndexedDataMapOfShapeListOfShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_IndexedDataMapOfShapeShape.hxx b/inc/TopTools_IndexedDataMapOfShapeShape.hxx
index 7504647..6067222 100644
--- a/inc/TopTools_IndexedDataMapOfShapeShape.hxx
+++ b/inc/TopTools_IndexedDataMapOfShapeShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class TopTools_IndexedDataMapNodeOfIndexedDataMapOfShapeShape;
 class TopTools_IndexedDataMapOfShapeShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_IndexedDataMapOfShapeShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_IndexedMapOfOrientedShape.hxx b/inc/TopTools_IndexedMapOfOrientedShape.hxx
index b3ddc39..7d296a8 100644
--- a/inc/TopTools_IndexedMapOfOrientedShape.hxx
+++ b/inc/TopTools_IndexedMapOfOrientedShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopTools_IndexedMapNodeOfIndexedMapOfOrientedShape;
 class TopTools_IndexedMapOfOrientedShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_IndexedMapOfOrientedShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_IndexedMapOfShape.hxx b/inc/TopTools_IndexedMapOfShape.hxx
index c5104cd..de5934d 100644
--- a/inc/TopTools_IndexedMapOfShape.hxx
+++ b/inc/TopTools_IndexedMapOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopTools_IndexedMapNodeOfIndexedMapOfShape;
 class TopTools_IndexedMapOfShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_IndexedMapOfShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_ListIteratorOfListOfShape.hxx b/inc/TopTools_ListIteratorOfListOfShape.hxx
index 684711b..eb0db7b 100644
--- a/inc/TopTools_ListIteratorOfListOfShape.hxx
+++ b/inc/TopTools_ListIteratorOfListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopTools_ListNodeOfListOfShape;
 class TopTools_ListIteratorOfListOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_ListIteratorOfListOfShape();
diff --git a/inc/TopTools_ListOfShape.hxx b/inc/TopTools_ListOfShape.hxx
index 0aa11b6..73e808b 100644
--- a/inc/TopTools_ListOfShape.hxx
+++ b/inc/TopTools_ListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopTools_ListNodeOfListOfShape;
 class TopTools_ListOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_ListOfShape();
diff --git a/inc/TopTools_LocationSet.hxx b/inc/TopTools_LocationSet.hxx
index e8eb36d..940fed0 100644
--- a/inc/TopTools_LocationSet.hxx
+++ b/inc/TopTools_LocationSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TopLoc_Location;
 class TopTools_LocationSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns an empty set of locations. <br>
   Standard_EXPORT   TopTools_LocationSet();
diff --git a/inc/TopTools_MapIteratorOfMapOfOrientedShape.hxx b/inc/TopTools_MapIteratorOfMapOfOrientedShape.hxx
index 317acba..9856c7d 100644
--- a/inc/TopTools_MapIteratorOfMapOfOrientedShape.hxx
+++ b/inc/TopTools_MapIteratorOfMapOfOrientedShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopTools_StdMapNodeOfMapOfOrientedShape;
 class TopTools_MapIteratorOfMapOfOrientedShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_MapIteratorOfMapOfOrientedShape();
diff --git a/inc/TopTools_MapIteratorOfMapOfShape.hxx b/inc/TopTools_MapIteratorOfMapOfShape.hxx
index cdd438b..32da2ea 100644
--- a/inc/TopTools_MapIteratorOfMapOfShape.hxx
+++ b/inc/TopTools_MapIteratorOfMapOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TopTools_StdMapNodeOfMapOfShape;
 class TopTools_MapIteratorOfMapOfShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_MapIteratorOfMapOfShape();
diff --git a/inc/TopTools_MapOfOrientedShape.hxx b/inc/TopTools_MapOfOrientedShape.hxx
index d5c0f2e..740db79 100644
--- a/inc/TopTools_MapOfOrientedShape.hxx
+++ b/inc/TopTools_MapOfOrientedShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopTools_MapIteratorOfMapOfOrientedShape;
 class TopTools_MapOfOrientedShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_MapOfOrientedShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_MapOfShape.hxx b/inc/TopTools_MapOfShape.hxx
index 272ab57..ea6bb7f 100644
--- a/inc/TopTools_MapOfShape.hxx
+++ b/inc/TopTools_MapOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TopTools_MapIteratorOfMapOfShape;
 class TopTools_MapOfShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTools_MapOfShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/TopTools_MutexForShapeProvider.hxx b/inc/TopTools_MutexForShapeProvider.hxx
new file mode 100644
index 0000000..98753f7
--- /dev/null
+++ b/inc/TopTools_MutexForShapeProvider.hxx
@@ -0,0 +1,75 @@
+// Created on: 2012-06-27
+// Created by: Dmitry BOBYLEV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+
+#ifndef _TopTools_MutexForShapeProvider_HeaderFile
+#define _TopTools_MutexForShapeProvider_HeaderFile
+
+#include <Handle_TopoDS_TShape.hxx>
+#include <NCollection_DataMap.hxx>
+#include <TopAbs_ShapeEnum.hxx>
+
+class Standard_Mutex;
+class TopoDS_Shape;
+
+//! Class TopTools_MutexForShapeProvider 
+//!   This class is used to create and store mutexes associated with shapes.
+class TopTools_MutexForShapeProvider
+{
+  friend Standard_Boolean IsEqual(const Handle_TopoDS_TShape & theFirstHandle,
+                                  const Handle_TopoDS_TShape & theSecondHandle);
+
+public:
+  //! Constructor
+  Standard_EXPORT TopTools_MutexForShapeProvider();
+
+  //! Destructor
+  Standard_EXPORT ~TopTools_MutexForShapeProvider();
+
+  //! Creates and associates mutexes with each sub-shape of type theType in theShape.
+  Standard_EXPORT void CreateMutexesForSubShapes(const TopoDS_Shape& theShape, const TopAbs_ShapeEnum theType);
+
+  //! Creates and associates mutex with theShape
+  Standard_EXPORT void CreateMutexForShape(const TopoDS_Shape& theShape);
+
+  //! Returns pointer to mutex associated with theShape.
+  //! In case when mutex not found returns NULL.
+  Standard_EXPORT Standard_Mutex* GetMutex(const TopoDS_Shape& theShape) const;
+
+  //! Removes all mutexes
+  Standard_EXPORT void RemoveAllMutexes();
+
+private:
+  //! This method should not be called (prohibited).
+  TopTools_MutexForShapeProvider (const TopTools_MutexForShapeProvider &);
+  //! This method should not be called (prohibited).
+  TopTools_MutexForShapeProvider & operator = (const TopTools_MutexForShapeProvider &);
+
+
+  NCollection_DataMap<Handle_TopoDS_TShape, Standard_Mutex *> myMap;
+
+};
+
+inline Standard_Boolean IsEqual(const Handle_TopoDS_TShape & theFirstHandle,
+                                const Handle_TopoDS_TShape & theSecondHandle)
+{
+  return (theFirstHandle == theSecondHandle);
+}
+
+#endif
\ No newline at end of file
diff --git a/inc/TopTools_OrientedShapeMapHasher.hxx b/inc/TopTools_OrientedShapeMapHasher.hxx
index 2e52102..1c9c077 100644
--- a/inc/TopTools_OrientedShapeMapHasher.hxx
+++ b/inc/TopTools_OrientedShapeMapHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TopoDS_Shape;
 class TopTools_OrientedShapeMapHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HasCode value  for  the  Key <K>  in the <br>
 //!          range 0..Upper. <br>
diff --git a/inc/TopTools_SequenceOfShape.hxx b/inc/TopTools_SequenceOfShape.hxx
index c055493..f72594d 100644
--- a/inc/TopTools_SequenceOfShape.hxx
+++ b/inc/TopTools_SequenceOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TopTools_SequenceNodeOfSequenceOfShape;
 class TopTools_SequenceOfShape  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TopTools_SequenceOfShape();
diff --git a/inc/TopTools_ShapeMapHasher.hxx b/inc/TopTools_ShapeMapHasher.hxx
index 61155cd..5b6acae 100644
--- a/inc/TopTools_ShapeMapHasher.hxx
+++ b/inc/TopTools_ShapeMapHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class TopoDS_Shape;
 class TopTools_ShapeMapHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HasCode value  for  the  Key <K>  in the <br>
 //!          range 0..Upper. <br>
diff --git a/inc/TopTools_ShapeSet.hxx b/inc/TopTools_ShapeSet.hxx
index 49b03a7..e8e57dd 100644
--- a/inc/TopTools_ShapeSet.hxx
+++ b/inc/TopTools_ShapeSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class TCollection_AsciiString;
 class TopTools_ShapeSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Builds an empty ShapeSet. <br>
   Standard_EXPORT   TopTools_ShapeSet();
diff --git a/inc/TopTrans_Array2OfOrientation.hxx b/inc/TopTrans_Array2OfOrientation.hxx
index aaad43c..ae60f28 100644
--- a/inc/TopTrans_Array2OfOrientation.hxx
+++ b/inc/TopTrans_Array2OfOrientation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_DimensionMismatch;
 class TopTrans_Array2OfOrientation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopTrans_Array2OfOrientation(const Standard_Integer R1,const Standard_Integer R2,const Standard_Integer C1,const Standard_Integer C2);
diff --git a/inc/TopTrans_CurveTransition.hxx b/inc/TopTrans_CurveTransition.hxx
index 7e7105e..8e3dd51 100644
--- a/inc/TopTrans_CurveTransition.hxx
+++ b/inc/TopTrans_CurveTransition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class gp_Dir;
 class TopTrans_CurveTransition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create an empty  Curve Transition. <br>
   Standard_EXPORT   TopTrans_CurveTransition();
diff --git a/inc/TopTrans_SurfaceTransition.hxx b/inc/TopTrans_SurfaceTransition.hxx
index 6d226f4..3027532 100644
--- a/inc/TopTrans_SurfaceTransition.hxx
+++ b/inc/TopTrans_SurfaceTransition.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,7 @@ class gp_Dir;
 class TopTrans_SurfaceTransition  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Create an empty Surface Transition. <br>
   Standard_EXPORT   TopTrans_SurfaceTransition();
diff --git a/inc/TopoDS.hxx b/inc/TopoDS.hxx
index 635c3e8..c061107 100644
--- a/inc/TopoDS.hxx
+++ b/inc/TopoDS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class TopoDS_ListIteratorOfListOfShape;
 class TopoDS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       static const TopoDS_Vertex& Vertex(const TopoDS_Shape& S) ;
diff --git a/inc/TopoDSToStep.hxx b/inc/TopoDSToStep.hxx
index 246d70f..01e138b 100644
--- a/inc/TopoDSToStep.hxx
+++ b/inc/TopoDSToStep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -76,18 +79,7 @@ class TopoDSToStep_MakeStepVertex;
 class TopoDSToStep  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_TCollection_HAsciiString DecodeBuilderError(const TopoDSToStep_BuilderError E) ;
diff --git a/inc/TopoDSToStep_Builder.hxx b/inc/TopoDSToStep_Builder.hxx
index c73b11c..da57210 100644
--- a/inc/TopoDSToStep_Builder.hxx
+++ b/inc/TopoDSToStep_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Transfer_FinderProcess;
 class TopoDSToStep_Builder  : public TopoDSToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_Builder();
diff --git a/inc/TopoDSToStep_FacetedTool.hxx b/inc/TopoDSToStep_FacetedTool.hxx
index fe684c7..a734f98 100644
--- a/inc/TopoDSToStep_FacetedTool.hxx
+++ b/inc/TopoDSToStep_FacetedTool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class TopoDS_Shape;
 class TopoDSToStep_FacetedTool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  TopoDSToStep_FacetedError CheckTopoDSShape(const TopoDS_Shape& SH) ;
diff --git a/inc/TopoDSToStep_MakeBrepWithVoids.hxx b/inc/TopoDSToStep_MakeBrepWithVoids.hxx
index 7883c43..8db8d55 100644
--- a/inc/TopoDSToStep_MakeBrepWithVoids.hxx
+++ b/inc/TopoDSToStep_MakeBrepWithVoids.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Transfer_FinderProcess;
 class TopoDSToStep_MakeBrepWithVoids  : public TopoDSToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_MakeBrepWithVoids(const TopoDS_Solid& S,const Handle(Transfer_FinderProcess)& FP);
diff --git a/inc/TopoDSToStep_MakeFacetedBrep.hxx b/inc/TopoDSToStep_MakeFacetedBrep.hxx
index 453e781..3a14093 100644
--- a/inc/TopoDSToStep_MakeFacetedBrep.hxx
+++ b/inc/TopoDSToStep_MakeFacetedBrep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TopoDS_Solid;
 class TopoDSToStep_MakeFacetedBrep  : public TopoDSToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_MakeFacetedBrep(const TopoDS_Shell& S,const Handle(Transfer_FinderProcess)& FP);
diff --git a/inc/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx b/inc/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx
index 6fe0244..437ff85 100644
--- a/inc/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx
+++ b/inc/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Transfer_FinderProcess;
 class TopoDSToStep_MakeFacetedBrepAndBrepWithVoids  : public TopoDSToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_MakeFacetedBrepAndBrepWithVoids(const TopoDS_Solid& S,const Handle(Transfer_FinderProcess)& FP);
diff --git a/inc/TopoDSToStep_MakeGeometricCurveSet.hxx b/inc/TopoDSToStep_MakeGeometricCurveSet.hxx
index 80105e0..9d6818a 100644
--- a/inc/TopoDSToStep_MakeGeometricCurveSet.hxx
+++ b/inc/TopoDSToStep_MakeGeometricCurveSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Transfer_FinderProcess;
 class TopoDSToStep_MakeGeometricCurveSet  : public TopoDSToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_MakeGeometricCurveSet(const TopoDS_Shape& SH,const Handle(Transfer_FinderProcess)& FP);
diff --git a/inc/TopoDSToStep_MakeManifoldSolidBrep.hxx b/inc/TopoDSToStep_MakeManifoldSolidBrep.hxx
index 36273c9..412e7dc 100644
--- a/inc/TopoDSToStep_MakeManifoldSolidBrep.hxx
+++ b/inc/TopoDSToStep_MakeManifoldSolidBrep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TopoDS_Solid;
 class TopoDSToStep_MakeManifoldSolidBrep  : public TopoDSToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_MakeManifoldSolidBrep(const TopoDS_Shell& S,const Handle(Transfer_FinderProcess)& FP);
diff --git a/inc/TopoDSToStep_MakeShellBasedSurfaceModel.hxx b/inc/TopoDSToStep_MakeShellBasedSurfaceModel.hxx
index b2d6a3f..08e8d35 100644
--- a/inc/TopoDSToStep_MakeShellBasedSurfaceModel.hxx
+++ b/inc/TopoDSToStep_MakeShellBasedSurfaceModel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class TopoDS_Solid;
 class TopoDSToStep_MakeShellBasedSurfaceModel  : public TopoDSToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Face& F,const Handle(Transfer_FinderProcess)& FP);
diff --git a/inc/TopoDSToStep_MakeStepEdge.hxx b/inc/TopoDSToStep_MakeStepEdge.hxx
index 4289065..5f0a89f 100644
--- a/inc/TopoDSToStep_MakeStepEdge.hxx
+++ b/inc/TopoDSToStep_MakeStepEdge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Transfer_FinderProcess;
 class TopoDSToStep_MakeStepEdge  : public TopoDSToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_MakeStepEdge();
diff --git a/inc/TopoDSToStep_MakeStepFace.hxx b/inc/TopoDSToStep_MakeStepFace.hxx
index 4c9fa29..4b6f8d5 100644
--- a/inc/TopoDSToStep_MakeStepFace.hxx
+++ b/inc/TopoDSToStep_MakeStepFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Transfer_FinderProcess;
 class TopoDSToStep_MakeStepFace  : public TopoDSToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_MakeStepFace();
diff --git a/inc/TopoDSToStep_MakeStepVertex.hxx b/inc/TopoDSToStep_MakeStepVertex.hxx
index 30ec15b..24a3e88 100644
--- a/inc/TopoDSToStep_MakeStepVertex.hxx
+++ b/inc/TopoDSToStep_MakeStepVertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Transfer_FinderProcess;
 class TopoDSToStep_MakeStepVertex  : public TopoDSToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_MakeStepVertex();
diff --git a/inc/TopoDSToStep_MakeStepWire.hxx b/inc/TopoDSToStep_MakeStepWire.hxx
index ec1cb12..de12f03 100644
--- a/inc/TopoDSToStep_MakeStepWire.hxx
+++ b/inc/TopoDSToStep_MakeStepWire.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Transfer_FinderProcess;
 class TopoDSToStep_MakeStepWire  : public TopoDSToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_MakeStepWire();
diff --git a/inc/TopoDSToStep_Root.hxx b/inc/TopoDSToStep_Root.hxx
index 8569168..5ddb010 100644
--- a/inc/TopoDSToStep_Root.hxx
+++ b/inc/TopoDSToStep_Root.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@
 class TopoDSToStep_Root  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns (modifiable) the tolerance to be used for writing <br>
 //!           If not set, starts at 0.0001 <br>
diff --git a/inc/TopoDSToStep_Tool.hxx b/inc/TopoDSToStep_Tool.hxx
index ae1788c..e81421a 100644
--- a/inc/TopoDSToStep_Tool.hxx
+++ b/inc/TopoDSToStep_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class TopoDS_Vertex;
 class TopoDSToStep_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_Tool();
diff --git a/inc/TopoDSToStep_WireframeBuilder.hxx b/inc/TopoDSToStep_WireframeBuilder.hxx
index c7fffa0..fe2cf09 100644
--- a/inc/TopoDSToStep_WireframeBuilder.hxx
+++ b/inc/TopoDSToStep_WireframeBuilder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class MoniTool_DataMapOfShapeTransient;
 class TopoDSToStep_WireframeBuilder  : public TopoDSToStep_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDSToStep_WireframeBuilder();
diff --git a/inc/TopoDS_Builder.hxx b/inc/TopoDS_Builder.hxx
index 5aa8198..dbc57a1 100644
--- a/inc/TopoDS_Builder.hxx
+++ b/inc/TopoDS_Builder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class TopoDS_Compound;
 class TopoDS_Builder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Make an empty Wire. <br>
         void MakeWire(TopoDS_Wire& W) const;
diff --git a/inc/TopoDS_CompSolid.hxx b/inc/TopoDS_CompSolid.hxx
index 7e1d1b5..ce45fd0 100644
--- a/inc/TopoDS_CompSolid.hxx
+++ b/inc/TopoDS_CompSolid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@
 class TopoDS_CompSolid  : public TopoDS_Shape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an Undefined CompSolid. <br>
       TopoDS_CompSolid();
diff --git a/inc/TopoDS_Compound.hxx b/inc/TopoDS_Compound.hxx
index 6b66d57..f9acd2c 100644
--- a/inc/TopoDS_Compound.hxx
+++ b/inc/TopoDS_Compound.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@
 class TopoDS_Compound  : public TopoDS_Shape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an Undefined Compound. <br>
       TopoDS_Compound();
diff --git a/inc/TopoDS_Edge.hxx b/inc/TopoDS_Edge.hxx
index 797417b..a2f1de1 100644
--- a/inc/TopoDS_Edge.hxx
+++ b/inc/TopoDS_Edge.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@
 class TopoDS_Edge  : public TopoDS_Shape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Undefined Edge. <br>
       TopoDS_Edge();
diff --git a/inc/TopoDS_Face.hxx b/inc/TopoDS_Face.hxx
index 133cb06..3d9897e 100644
--- a/inc/TopoDS_Face.hxx
+++ b/inc/TopoDS_Face.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class TopoDS_Face  : public TopoDS_Shape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Undefined Face. <br>
       TopoDS_Face();
diff --git a/inc/TopoDS_Iterator.hxx b/inc/TopoDS_Iterator.hxx
index 56c9fc2..701dcd2 100644
--- a/inc/TopoDS_Iterator.hxx
+++ b/inc/TopoDS_Iterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,22 +44,7 @@ class TopoDS_Shape;
 class TopoDS_Iterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void*)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty Iterator. <br>
       TopoDS_Iterator();
diff --git a/inc/TopoDS_ListIteratorOfListOfShape.hxx b/inc/TopoDS_ListIteratorOfListOfShape.hxx
index beba1a8..4061d05 100644
--- a/inc/TopoDS_ListIteratorOfListOfShape.hxx
+++ b/inc/TopoDS_ListIteratorOfListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class TopoDS_ListNodeOfListOfShape;
 class TopoDS_ListIteratorOfListOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDS_ListIteratorOfListOfShape();
diff --git a/inc/TopoDS_ListOfShape.hxx b/inc/TopoDS_ListOfShape.hxx
index 5a4be91..9daa0d9 100644
--- a/inc/TopoDS_ListOfShape.hxx
+++ b/inc/TopoDS_ListOfShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TopoDS_ListNodeOfListOfShape;
 class TopoDS_ListOfShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   TopoDS_ListOfShape();
diff --git a/inc/TopoDS_Shape.hxx b/inc/TopoDS_Shape.hxx
index 569925e..7c3b1eb 100644
--- a/inc/TopoDS_Shape.hxx
+++ b/inc/TopoDS_Shape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,22 +61,8 @@ class TopLoc_Location;
 class TopoDS_Shape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete (void *,void *)
-  {
-
-  }
+  DEFINE_STANDARD_ALLOC
+
   //! Creates a NULL Shape referring to nothing. <br>
       TopoDS_Shape();
   //! Returns true if this shape is null. In other words, it <br>
diff --git a/inc/TopoDS_Shell.hxx b/inc/TopoDS_Shell.hxx
index 0677654..1a47bcf 100644
--- a/inc/TopoDS_Shell.hxx
+++ b/inc/TopoDS_Shell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class TopoDS_Shell  : public TopoDS_Shape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an Undefined Shell. <br>
       TopoDS_Shell();
diff --git a/inc/TopoDS_Solid.hxx b/inc/TopoDS_Solid.hxx
index c08243c..afe4df0 100644
--- a/inc/TopoDS_Solid.hxx
+++ b/inc/TopoDS_Solid.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@
 class TopoDS_Solid  : public TopoDS_Shape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs an Undefined Solid. <br>
       TopoDS_Solid();
diff --git a/inc/TopoDS_Vertex.hxx b/inc/TopoDS_Vertex.hxx
index b29a67c..7a28e61 100644
--- a/inc/TopoDS_Vertex.hxx
+++ b/inc/TopoDS_Vertex.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@
 class TopoDS_Vertex  : public TopoDS_Shape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Undefined Vertex. <br>
       TopoDS_Vertex();
diff --git a/inc/TopoDS_Wire.hxx b/inc/TopoDS_Wire.hxx
index 06f3428..46e7a2b 100644
--- a/inc/TopoDS_Wire.hxx
+++ b/inc/TopoDS_Wire.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class TopoDS_Wire  : public TopoDS_Shape {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Undefined Wire. <br>
       TopoDS_Wire();
diff --git a/inc/TransferBRep.hxx b/inc/TransferBRep.hxx
index 3b8c269..6cb7206 100644
--- a/inc/TransferBRep.hxx
+++ b/inc/TransferBRep.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -92,18 +95,7 @@ class TransferBRep_SequenceNodeOfSequenceOfTransferResultInfo;
 class TransferBRep  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Get the Shape recorded in a Binder <br>
 //!           If the Binder brings a multiple result, search for the Shape <br>
diff --git a/inc/TransferBRep_Reader.hxx b/inc/TransferBRep_Reader.hxx
index f3cbac9..9d1091c 100644
--- a/inc/TransferBRep_Reader.hxx
+++ b/inc/TransferBRep_Reader.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -60,18 +63,7 @@ class Standard_Transient;
 class TransferBRep_Reader  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes a non-specialised Reader. Typically, for each norm <br>
 //!           or protocol, is will be required to define a specific Create <br>
diff --git a/inc/TransferBRep_SequenceOfTransferResultInfo.hxx b/inc/TransferBRep_SequenceOfTransferResultInfo.hxx
index 2eb4956..7dc28bb 100644
--- a/inc/TransferBRep_SequenceOfTransferResultInfo.hxx
+++ b/inc/TransferBRep_SequenceOfTransferResultInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TransferBRep_SequenceNodeOfSequenceOfTransferResultInfo;
 class TransferBRep_SequenceOfTransferResultInfo  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       TransferBRep_SequenceOfTransferResultInfo();
diff --git a/inc/TransferBRep_ShapeInfo.hxx b/inc/TransferBRep_ShapeInfo.hxx
index 6386c20..66f1a72 100644
--- a/inc/TransferBRep_ShapeInfo.hxx
+++ b/inc/TransferBRep_ShapeInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class TopoDS_Shape;
 class TransferBRep_ShapeInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the Type attached to an object <br>
 //!           Here, TShape (Shape has no Dynamic Type) <br>
diff --git a/inc/Transfer_DataInfo.hxx b/inc/Transfer_DataInfo.hxx
index dbe4997..755a4bc 100644
--- a/inc/Transfer_DataInfo.hxx
+++ b/inc/Transfer_DataInfo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Standard_Transient;
 class Transfer_DataInfo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the Type attached to an object <br>
 //!           Here, the Dynamic Type of a Transient. Null Type if unknown <br>
diff --git a/inc/Transfer_FindHasher.hxx b/inc/Transfer_FindHasher.hxx
index d0df6f5..2755188 100644
--- a/inc/Transfer_FindHasher.hxx
+++ b/inc/Transfer_FindHasher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Transfer_Finder;
 class Transfer_FindHasher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a HashCode in the range <0,Upper> for a Finder : <br>
 //!           asks the Finder its HashCode then transforms it to be in the <br>
diff --git a/inc/Transfer_IteratorOfProcessForFinder.hxx b/inc/Transfer_IteratorOfProcessForFinder.hxx
index f45b97d..a1fbebb 100644
--- a/inc/Transfer_IteratorOfProcessForFinder.hxx
+++ b/inc/Transfer_IteratorOfProcessForFinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class Transfer_Binder;
 class Transfer_IteratorOfProcessForFinder  : public Transfer_TransferIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Transfer_IteratorOfProcessForFinder(const Standard_Boolean withstarts);
diff --git a/inc/Transfer_IteratorOfProcessForTransient.hxx b/inc/Transfer_IteratorOfProcessForTransient.hxx
index 9653a77..37af2ef 100644
--- a/inc/Transfer_IteratorOfProcessForTransient.hxx
+++ b/inc/Transfer_IteratorOfProcessForTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class Transfer_Binder;
 class Transfer_IteratorOfProcessForTransient  : public Transfer_TransferIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Transfer_IteratorOfProcessForTransient(const Standard_Boolean withstarts);
diff --git a/inc/Transfer_SequenceOfBinder.hxx b/inc/Transfer_SequenceOfBinder.hxx
index d9370cb..6d4893a 100644
--- a/inc/Transfer_SequenceOfBinder.hxx
+++ b/inc/Transfer_SequenceOfBinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Transfer_SequenceNodeOfSequenceOfBinder;
 class Transfer_SequenceOfBinder  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Transfer_SequenceOfBinder();
diff --git a/inc/Transfer_SequenceOfFinder.hxx b/inc/Transfer_SequenceOfFinder.hxx
index 79e3b9b..78cd936 100644
--- a/inc/Transfer_SequenceOfFinder.hxx
+++ b/inc/Transfer_SequenceOfFinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Transfer_SequenceNodeOfSequenceOfFinder;
 class Transfer_SequenceOfFinder  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Transfer_SequenceOfFinder();
diff --git a/inc/Transfer_TransferDispatch.hxx b/inc/Transfer_TransferDispatch.hxx
index 75efa45..d4fef6e 100644
--- a/inc/Transfer_TransferDispatch.hxx
+++ b/inc/Transfer_TransferDispatch.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,7 @@ class Standard_Transient;
 class Transfer_TransferDispatch  : public Interface_CopyTool {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a TransferDispatch from a Model. Works with a General <br>
 //!           Service Library, given as an Argument <br>
diff --git a/inc/Transfer_TransferInput.hxx b/inc/Transfer_TransferInput.hxx
index 90faf3d..8dedfe2 100644
--- a/inc/Transfer_TransferInput.hxx
+++ b/inc/Transfer_TransferInput.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class Transfer_FinderProcess;
 class Transfer_TransferInput  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a TransferInput ready to use <br>
   Standard_EXPORT   Transfer_TransferInput();
diff --git a/inc/Transfer_TransferIterator.hxx b/inc/Transfer_TransferIterator.hxx
index 8af59b0..0c4a1f3 100644
--- a/inc/Transfer_TransferIterator.hxx
+++ b/inc/Transfer_TransferIterator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -56,18 +59,7 @@ class Interface_Check;
 class Transfer_TransferIterator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an empty Iterator <br>
   Standard_EXPORT   Transfer_TransferIterator();
diff --git a/inc/Transfer_TransferMapOfProcessForFinder.hxx b/inc/Transfer_TransferMapOfProcessForFinder.hxx
index b56d648..ab866a9 100644
--- a/inc/Transfer_TransferMapOfProcessForFinder.hxx
+++ b/inc/Transfer_TransferMapOfProcessForFinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder;
 class Transfer_TransferMapOfProcessForFinder  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Transfer_TransferMapOfProcessForFinder(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Transfer_TransferMapOfProcessForTransient.hxx b/inc/Transfer_TransferMapOfProcessForTransient.hxx
index 3275c72..ccd7c83 100644
--- a/inc/Transfer_TransferMapOfProcessForTransient.hxx
+++ b/inc/Transfer_TransferMapOfProcessForTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient;
 class Transfer_TransferMapOfProcessForTransient  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Transfer_TransferMapOfProcessForTransient(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Transfer_TransferOutput.hxx b/inc/Transfer_TransferOutput.hxx
index 0644861..2bd2fdc 100644
--- a/inc/Transfer_TransferOutput.hxx
+++ b/inc/Transfer_TransferOutput.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@ class Interface_EntityIterator;
 class Transfer_TransferOutput  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a TransferOutput ready to use, with a TransientProcess <br>
   Standard_EXPORT   Transfer_TransferOutput(const Handle(Transfer_ActorOfTransientProcess)& actor,const Handle(Interface_InterfaceModel)& amodel);
diff --git a/inc/UTL.hxx b/inc/UTL.hxx
index cba3999..ea94531 100644
--- a/inc/UTL.hxx
+++ b/inc/UTL.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class Resource_Manager;
 class UTL  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  TCollection_ExtendedString xgetenv(const Standard_CString aCString) ;
diff --git a/inc/Units.hxx b/inc/Units.hxx
index 150e425..6a86858 100644
--- a/inc/Units.hxx
+++ b/inc/Units.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -71,18 +74,7 @@ class Units_SequenceNodeOfQtsSequence;
 class Units  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines the location of the file containing all the <br>
 //!          information useful in creating the dictionary of all <br>
diff --git a/inc/UnitsAPI.hxx b/inc/UnitsAPI.hxx
index a1abd71..98121bf 100644
--- a/inc/UnitsAPI.hxx
+++ b/inc/UnitsAPI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class Units_Dimensions;
 class UnitsAPI  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Converts the current unit value to the local system units value. <br>
 //!  Example: CurrentToLS(1.,"LENGTH") returns 1000. if the current length unit <br>
diff --git a/inc/UnitsMethods.hxx b/inc/UnitsMethods.hxx
index 442cb93..bf60ef4 100644
--- a/inc/UnitsMethods.hxx
+++ b/inc/UnitsMethods.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Geom_Surface;
 class UnitsMethods  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes the 3 factors for the conversion of <br>
 //!          units <br>
diff --git a/inc/Units_Explorer.hxx b/inc/Units_Explorer.hxx
index 78d4dbf..6386f23 100644
--- a/inc/Units_Explorer.hxx
+++ b/inc/Units_Explorer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TCollection_AsciiString;
 class Units_Explorer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Empty contructor of the class. <br>
   Standard_EXPORT   Units_Explorer();
diff --git a/inc/Units_MathSentence.hxx b/inc/Units_MathSentence.hxx
index 7ca6c10..bbdc3f1 100644
--- a/inc/Units_MathSentence.hxx
+++ b/inc/Units_MathSentence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@
 class Units_MathSentence  : public Units_Sentence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates and returns a  MathSentence object. The string <br>
 //!          <astring>  describes  an algebraic  formula in natural <br>
diff --git a/inc/Units_Measurement.hxx b/inc/Units_Measurement.hxx
index 2fc103e..71ac92c 100644
--- a/inc/Units_Measurement.hxx
+++ b/inc/Units_Measurement.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Units_Token;
 class Units_Measurement  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! It is the empty constructor of the class. <br>
   Standard_EXPORT   Units_Measurement();
diff --git a/inc/Units_QtsSequence.hxx b/inc/Units_QtsSequence.hxx
index a07978e..40e84a5 100644
--- a/inc/Units_QtsSequence.hxx
+++ b/inc/Units_QtsSequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Units_SequenceNodeOfQtsSequence;
 class Units_QtsSequence  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Units_QtsSequence();
diff --git a/inc/Units_Sentence.hxx b/inc/Units_Sentence.hxx
index bed93d7..34b23a7 100644
--- a/inc/Units_Sentence.hxx
+++ b/inc/Units_Sentence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Units_Token;
 class Units_Sentence  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates and  returns  a   Sentence, by  analyzing  the <br>
 //!          string <astring> with the lexicon <alexicon>. <br>
diff --git a/inc/Units_TksSequence.hxx b/inc/Units_TksSequence.hxx
index ab26eb5..054f828 100644
--- a/inc/Units_TksSequence.hxx
+++ b/inc/Units_TksSequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Units_SequenceNodeOfTksSequence;
 class Units_TksSequence  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Units_TksSequence();
diff --git a/inc/Units_UnitSentence.hxx b/inc/Units_UnitSentence.hxx
index 8d4201d..ea68b35 100644
--- a/inc/Units_UnitSentence.hxx
+++ b/inc/Units_UnitSentence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class Units_QuantitiesSequence;
 class Units_UnitSentence  : public Units_Sentence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates   and   returns a   UnitSentence.   The string <br>
 //!          <astring> describes in natural  language the  unit  or <br>
diff --git a/inc/Units_UtsSequence.hxx b/inc/Units_UtsSequence.hxx
index 534d434..0949d73 100644
--- a/inc/Units_UtsSequence.hxx
+++ b/inc/Units_UtsSequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Units_SequenceNodeOfUtsSequence;
 class Units_UtsSequence  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Units_UtsSequence();
diff --git a/inc/V2d.hxx b/inc/V2d.hxx
index 5910dec..b6fcf70 100644
--- a/inc/V2d.hxx
+++ b/inc/V2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class V2d_RectangularGraphicGrid;
 class V2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Test <br>
   Standard_EXPORT   static  void Draw(const Handle(V2d_Viewer)& aViewer) ;
diff --git a/inc/V2d_DefaultMap.hxx b/inc/V2d_DefaultMap.hxx
index 6dcc37b..57e3fe4 100644
--- a/inc/V2d_DefaultMap.hxx
+++ b/inc/V2d_DefaultMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Aspect_MarkMap;
 class V2d_DefaultMap  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns a indexed color map with the following color <br>
 //!          White, black, red, green, blue1 , yellow, sienna, orange2 <br>
diff --git a/inc/V3d.hxx b/inc/V3d.hxx
index 69a3b5c..2d69e42 100644
--- a/inc/V3d.hxx
+++ b/inc/V3d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -77,18 +80,7 @@ class V3d_ColorScaleLayerItem;
 class V3d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Determines the orientation vector corresponding <br>
 //!          to the predefined orientation type. <br>
diff --git a/inc/V3d_ListOfTransient.hxx b/inc/V3d_ListOfTransient.hxx
index 94228aa..a348dd0 100644
--- a/inc/V3d_ListOfTransient.hxx
+++ b/inc/V3d_ListOfTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class Standard_Transient;
 class V3d_ListOfTransient  : public TColStd_ListOfTransient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   V3d_ListOfTransient();
diff --git a/inc/V3d_View.hxx b/inc/V3d_View.hxx
index 3217eb9..be6f1cf 100644
--- a/inc/V3d_View.hxx
+++ b/inc/V3d_View.hxx
@@ -160,8 +160,8 @@
 #ifndef _Aspect_TypeOfTriedronEcho_HeaderFile
 #include <Aspect_TypeOfTriedronEcho.hxx>
 #endif
-#ifndef _OSD_FontAspect_HeaderFile
-#include <OSD_FontAspect.hxx>
+#ifndef _Font_FontAspect_HeaderFile
+#include <Font_FontAspect.hxx>
 #endif
 #ifndef _TCollection_ExtendedString_HeaderFile
 #include <TCollection_ExtendedString.hxx>
@@ -196,8 +196,8 @@
 #ifndef _Handle_PlotMgt_PlotterDriver_HeaderFile
 #include <Handle_PlotMgt_PlotterDriver.hxx>
 #endif
-#ifndef _Image_TypeOfImage_HeaderFile
-#include <Image_TypeOfImage.hxx>
+#ifndef _Graphic3d_BufferType_HeaderFile
+#include <Graphic3d_BufferType.hxx>
 #endif
 #ifndef _Aspect_FormatOfSheetPaper_HeaderFile
 #include <Aspect_FormatOfSheetPaper.hxx>
@@ -208,8 +208,8 @@
 #ifndef _Aspect_PrintAlgo_HeaderFile
 #include <Aspect_PrintAlgo.hxx>
 #endif
-#ifndef _Handle_Image_PixMap_HeaderFile
-#include <Handle_Image_PixMap.hxx>
+#ifndef _Image_PixMap_HeaderFile
+#include <Image_PixMap.hxx>
 #endif
 #ifndef _V3d_TypeOfBackfacingModel_HeaderFile
 #include <V3d_TypeOfBackfacingModel.hxx>
@@ -241,7 +241,6 @@ class TColStd_Array2OfReal;
 class Graphic3d_Vertex;
 class gp_Ax3;
 class PlotMgt_PlotterDriver;
-class Image_PixMap;
 
 
 //! Defines the application object VIEW for the <br>
@@ -415,9 +414,9 @@ public:
   //! Highlights the echo zone of the Triedron. <br>
   Standard_EXPORT     void TriedronEcho(const Aspect_TypeOfTriedronEcho AType = Aspect_TOTE_NONE) ;
   //! Returns data of a graduated trihedron. <br>
-  Standard_EXPORT     void GetGraduatedTrihedron(TCollection_ExtendedString& xname,TCollection_ExtendedString& yname,TCollection_ExtendedString& zname,Standard_Boolean& xdrawname,Standard_Boolean& ydrawname,Standard_Boolean& zdrawname,Standard_Boolean& xdrawvalues,Standard_Boolean& ydrawvalues,Standard_Boolean& zdrawvalues,Standard_Boolean& drawgrid,Standard_Boolean& drawaxes,Standard_Integer& nbx,Standard_Integer& nby,Standard_Integer& nbz,Standard_Integer& xoffset,Standard_Integer& yoffset,Standard_Integer& zoffset,Standard_Integer& xaxisoffset,Standard_Integer& yaxisoffset,Standard_Integer& zaxisoffset,Standard_Boolean& xdrawtickmarks,Standard_Boolean& ydrawtickmarks,Standard_Boolean& zdrawtickmarks,Standard_Integer& xtickmarklength,Standard_Integer& ytickmarklength,Standard_Integer& ztickmarklength,Quantity_Color& gridcolor,Quantity_Color& xnamecolor,Quantity_Color& ynamecolor,Quantity_Color& znamecolor,Quantity_Color& xcolor,Quantity_Color& ycolor,Quantity_Color& zcolor,TCollection_AsciiString& fontOfNames,OSD_FontAspect& styleOfNames,Standard_Integer& sizeOfNames,TCollection_AsciiString& fontOfValues,OSD_FontAspect& styleOfValues,Standard_Integer& sizeOfValues) const;
+  Standard_EXPORT     void GetGraduatedTrihedron(TCollection_ExtendedString& xname,TCollection_ExtendedString& yname,TCollection_ExtendedString& zname,Standard_Boolean& xdrawname,Standard_Boolean& ydrawname,Standard_Boolean& zdrawname,Standard_Boolean& xdrawvalues,Standard_Boolean& ydrawvalues,Standard_Boolean& zdrawvalues,Standard_Boolean& drawgrid,Standard_Boolean& drawaxes,Standard_Integer& nbx,Standard_Integer& nby,Standard_Integer& nbz,Standard_Integer& xoffset,Standard_Integer& yoffset,Standard_Integer& zoffset,Standard_Integer& xaxisoffset,Standard_Integer& yaxisoffset,Standard_Integer& zaxisoffset,Standard_Boolean& xdrawtickmarks,Standard_Boolean& ydrawtickmarks,Standard_Boolean& zdrawtickmarks,Standard_Integer& xtickmarklength,Standard_Integer& ytickmarklength,Standard_Integer& ztickmarklength,Quantity_Color& gridcolor,Quantity_Color& xnamecolor,Quantity_Color& ynamecolor,Quantity_Color& znamecolor,Quantity_Color& xcolor,Quantity_Color& ycolor,Quantity_Color& zcolor,TCollection_AsciiString& fontOfNames,Font_FontAspect& styleOfNames,Standard_Integer& sizeOfNames,TCollection_AsciiString& fontOfValues,Font_FontAspect& styleOfValues,Standard_Integer& sizeOfValues) const;
   //! Displays a graduated trihedron. <br>
-  Standard_EXPORT     void GraduatedTrihedronDisplay(const TCollection_ExtendedString& xname = "X",const TCollection_ExtendedString& yname = "Y",const TCollection_ExtendedString& zname = "Z",const Standard_Boolean xdrawname = Standard_True,const Standard_Boolean ydrawname = Standard_True,const Standard_Boolean zdrawname = Standard_True,const Standard_Boolean xdrawvalues = Standard_True,const Standard_Boolean ydrawvalues = Standard_True,const Standard_Boolean zdrawvalues = Standard_True,const Standard_Boolean drawgrid = Standard_True,const Standard_Boolean drawaxes = Standard_True,const Standard_Integer nbx = 3,const Standard_Integer nby = 3,const Standard_Integer nbz = 3,const Standard_Integer xoffset = 10,const Standard_Integer yoffset = 10,const Standard_Integer zoffset = 10,const Standard_Integer xaxisoffset = 30,const Standard_Integer yaxisoffset = 30,const Standard_Integer zaxisoffset = 30,const Standard_Boolean xdrawtickmarks = Standard_True,const Standard_Boolean ydrawtickmarks = Standard_True,const Standard_Boolean zdrawtickmarks = Standard_True,const Standard_Integer xtickmarklength = 10,const Standard_Integer ytickmarklength = 10,const Standard_Integer ztickmarklength = 10,const Quantity_Color& gridcolor = Quantity_NOC_WHITE,const Quantity_Color& xnamecolor = Quantity_NOC_RED,const Quantity_Color& ynamecolor = Quantity_NOC_GREEN,const Quantity_Color& znamecolor = Quantity_NOC_BLUE1,const Quantity_Color& xcolor = Quantity_NOC_RED,const Quantity_Color& ycolor = Quantity_NOC_GREEN,const Quantity_Color& zcolor = Quantity_NOC_BLUE1,const TCollection_AsciiString& fontOfNames = "Arial",const OSD_FontAspect styleOfNames = OSD_FA_Bold,const Standard_Integer sizeOfNames = 12,const TCollection_AsciiString& fontOfValues = "Arial",const OSD_FontAspect styleOfValues = OSD_FA_Regular,const Standard_Integer sizeOfValues = 12) ;
+  Standard_EXPORT     void GraduatedTrihedronDisplay(const TCollection_ExtendedString& xname = "X",const TCollection_ExtendedString& yname = "Y",const TCollection_ExtendedString& zname = "Z",const Standard_Boolean xdrawname = Standard_True,const Standard_Boolean ydrawname = Standard_True,const Standard_Boolean zdrawname = Standard_True,const Standard_Boolean xdrawvalues = Standard_True,const Standard_Boolean ydrawvalues = Standard_True,const Standard_Boolean zdrawvalues = Standard_True,const Standard_Boolean drawgrid = Standard_True,const Standard_Boolean drawaxes = Standard_True,const Standard_Integer nbx = 3,const Standard_Integer nby = 3,const Standard_Integer nbz = 3,const Standard_Integer xoffset = 10,const Standard_Integer yoffset = 10,const Standard_Integer zoffset = 10,const Standard_Integer xaxisoffset = 30,const Standard_Integer yaxisoffset = 30,const Standard_Integer zaxisoffset = 30,const Standard_Boolean xdrawtickmarks = Standard_True,const Standard_Boolean ydrawtickmarks = Standard_True,const Standard_Boolean zdrawtickmarks = Standard_True,const Standard_Integer xtickmarklength = 10,const Standard_Integer ytickmarklength = 10,const Standard_Integer ztickmarklength = 10,const Quantity_Color& gridcolor = Quantity_NOC_WHITE,const Quantity_Color& xnamecolor = Quantity_NOC_RED,const Quantity_Color& ynamecolor = Quantity_NOC_GREEN,const Quantity_Color& znamecolor = Quantity_NOC_BLUE1,const Quantity_Color& xcolor = Quantity_NOC_RED,const Quantity_Color& ycolor = Quantity_NOC_GREEN,const Quantity_Color& zcolor = Quantity_NOC_BLUE1,const TCollection_AsciiString& fontOfNames = "Arial",const Font_FontAspect styleOfNames = Font_FA_Bold,const Standard_Integer sizeOfNames = 12,const TCollection_AsciiString& fontOfValues = "Arial",const Font_FontAspect styleOfValues = Font_FA_Regular,const Standard_Integer sizeOfValues = 12) ;
   //! Erases a graduated trihedron from the view. <br>
   Standard_EXPORT     void GraduatedTrihedronErase() ;
   
@@ -603,7 +602,10 @@ public:
 //!          NOTE than the original Z size of the view is NOT modified . <br>
   Standard_EXPORT     void WindowFit(const Standard_Integer Xmin,const Standard_Integer Ymin,const Standard_Integer Xmax,const Standard_Integer Ymax) ;
   //! Sets Z and XY size of the view according to given values <br>
-//!          with respecting the initial view depth (eye position) <br>
+//!          with respecting the initial view depth (eye position). <br>
+//!          Width/heigth aspect ratio should be preserved by the caller <br>
+//!          of this method similarly to SetSize() to avoid unexpected <br>
+//!          visual results like non-uniform scaling of objects in the view. <br>
   Standard_EXPORT     void SetViewingVolume(const Standard_Real Left,const Standard_Real Right,const Standard_Real Bottom,const Standard_Real Top,const Standard_Real ZNear,const Standard_Real ZFar) ;
   //! Modifies the mapping of the view. <br>
   Standard_EXPORT     void SetViewMapping(const Visual3d_ViewMapping& VM) ;
@@ -882,7 +884,7 @@ public:
 //!          scale in the file <theFile>. The file name <br>
 //!          extension must be one of ".png",".bmp",".jpg",".gif". <br>
 //!          Returns FALSE when the dump has failed <br>
-  Standard_EXPORT     Standard_Boolean Dump(const Standard_CString theFile,const Image_TypeOfImage theBufferType = Image_TOI_RGB) ;
+  Standard_EXPORT     Standard_Boolean Dump(const Standard_CString theFile,const Graphic3d_BufferType& theBufferType = Graphic3d_BT_RGB) ;
   //! dump the full contents of the view with a <br>
 //!          different scale according  to the required sheet <br>
 //!          paper size (format) and the ratio <br>
@@ -896,7 +898,7 @@ public:
 //!       for editing or sending the image file to a laser printer. <br>
 //!       (i.e: Microsoft Photo Editor on Windows system <br>
 //!        or Image Viewer on SUN system) <br>
-  Standard_EXPORT     Standard_Boolean Dump(const Standard_CString theFile,const Aspect_FormatOfSheetPaper theFormat,const Image_TypeOfImage theBufferType = Image_TOI_RGB) ;
+  Standard_EXPORT     Standard_Boolean Dump(const Standard_CString theFile,const Aspect_FormatOfSheetPaper theFormat,const Graphic3d_BufferType& theBufferType = Graphic3d_BT_RGB) ;
   //! print the contents of the view to printer with preview. <br>
 //! <hPrnDC> : If you have already an PrinterDeviceContext (HDC), <br>
 //! then you can pass it to the print routines. <br>
@@ -926,7 +928,8 @@ public:
 //!        to a pixmap of pixel size <theWidth>*<theHeight> and <br>
 //!        buffer type <theBufferType>. If <theForceCentered> is true <br>
 //!        view scene will be centered. <br>
-  Standard_EXPORT     Handle_Image_PixMap ToPixMap(const Standard_Integer theWidth,const Standard_Integer theHeight,const Image_TypeOfImage theBufferType = Image_TOI_RGB,const Standard_Boolean theForceCentered = Standard_True) ;
+//!       Pixmap will be automatically (re)allocated when needed. <br>
+  Standard_EXPORT     Standard_Boolean ToPixMap(Image_PixMap& theImage,const Standard_Integer theWidth,const Standard_Integer theHeight,const Graphic3d_BufferType& theBufferType = Graphic3d_BT_RGB,const Standard_Boolean theForceCentered = Standard_True) ;
   //! Manages projection model <br>
   Standard_EXPORT     void SetProjModel(const V3d_TypeOfProjectionModel amOdel = V3d_TPM_SCREEN) ;
   //! Returns the current projection model <br>
diff --git a/inc/Viewer2dTest.hxx b/inc/Viewer2dTest.hxx
index 73cf08d..bf8b53f 100644
--- a/inc/Viewer2dTest.hxx
+++ b/inc/Viewer2dTest.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,7 @@ class Viewer2dTest_DataMapIteratorOfDataMapOfText;
 class Viewer2dTest  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!          implemented in Viewer2dTest_ViewerCommands.cxx <br>
diff --git a/inc/Viewer2dTest_DataMapIteratorOfDataMapOfText.hxx b/inc/Viewer2dTest_DataMapIteratorOfDataMapOfText.hxx
index 1d6dddc..36c8986 100644
--- a/inc/Viewer2dTest_DataMapIteratorOfDataMapOfText.hxx
+++ b/inc/Viewer2dTest_DataMapIteratorOfDataMapOfText.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Viewer2dTest_DataMapNodeOfDataMapOfText;
 class Viewer2dTest_DataMapIteratorOfDataMapOfText  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Viewer2dTest_DataMapIteratorOfDataMapOfText();
diff --git a/inc/Viewer2dTest_DataMapOfText.hxx b/inc/Viewer2dTest_DataMapOfText.hxx
index ea3ea6c..2a0b7f0 100644
--- a/inc/Viewer2dTest_DataMapOfText.hxx
+++ b/inc/Viewer2dTest_DataMapOfText.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class Viewer2dTest_DataMapIteratorOfDataMapOfText;
 class Viewer2dTest_DataMapOfText  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Viewer2dTest_DataMapOfText(const Standard_Integer NbBuckets = 1);
diff --git a/inc/Viewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx b/inc/Viewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx
index c32ced4..68203d0 100644
--- a/inc/Viewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx
+++ b/inc/Viewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Viewer2dTest_DoubleMapNodeOfDoubleMapOfInteractiveAndName;
 class Viewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Viewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName();
diff --git a/inc/Viewer2dTest_DoubleMapOfInteractiveAndName.hxx b/inc/Viewer2dTest_DoubleMapOfInteractiveAndName.hxx
index 872c9f9..e2bdb36 100644
--- a/inc/Viewer2dTest_DoubleMapOfInteractiveAndName.hxx
+++ b/inc/Viewer2dTest_DoubleMapOfInteractiveAndName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class Viewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName;
 class Viewer2dTest_DoubleMapOfInteractiveAndName  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Viewer2dTest_DoubleMapOfInteractiveAndName(const Standard_Integer NbBuckets = 1);
diff --git a/inc/ViewerTest.hxx b/inc/ViewerTest.hxx
index 4f6bb3b..53514e8 100644
--- a/inc/ViewerTest.hxx
+++ b/inc/ViewerTest.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName;
 class ViewerTest  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Loads all Draw commands of  V2d & V3d. Used for plugin. <br>
   Standard_EXPORT   static  void Factory(Draw_Interpretor& theDI) ;
diff --git a/inc/ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx b/inc/ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx
index a5083ba..7a3952e 100644
--- a/inc/ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx
+++ b/inc/ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class ViewerTest_DoubleMapNodeOfDoubleMapOfInteractiveAndName;
 class ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName();
diff --git a/inc/ViewerTest_DoubleMapOfInteractiveAndName.hxx b/inc/ViewerTest_DoubleMapOfInteractiveAndName.hxx
index e43df30..cda4c60 100644
--- a/inc/ViewerTest_DoubleMapOfInteractiveAndName.hxx
+++ b/inc/ViewerTest_DoubleMapOfInteractiveAndName.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName;
 class ViewerTest_DoubleMapOfInteractiveAndName  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   ViewerTest_DoubleMapOfInteractiveAndName(const Standard_Integer NbBuckets = 1);
diff --git a/inc/ViewerTest_Tool.hxx b/inc/ViewerTest_Tool.hxx
index ea02d27..dbd1f59 100644
--- a/inc/ViewerTest_Tool.hxx
+++ b/inc/ViewerTest_Tool.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class AIS_InteractiveContext;
 class ViewerTest_Tool  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! create a new <context>. ViewerTest variables are not initialized; <br>
   Standard_EXPORT   static  Handle_V3d_Viewer MakeViewer(const Standard_CString title) ;
diff --git a/inc/Visual3d_ContextPick.hxx b/inc/Visual3d_ContextPick.hxx
index 18a923c..cc3c556 100644
--- a/inc/Visual3d_ContextPick.hxx
+++ b/inc/Visual3d_ContextPick.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Visual3d_ContextPickDefinitionError;
 class Visual3d_ContextPick  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a context from default values <br>
   Standard_EXPORT   Visual3d_ContextPick();
diff --git a/inc/Visual3d_ContextView.hxx b/inc/Visual3d_ContextView.hxx
index ece226c..884b1e1 100644
--- a/inc/Visual3d_ContextView.hxx
+++ b/inc/Visual3d_ContextView.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -74,18 +77,7 @@ class Visual3d_HSetOfLight;
 class Visual3d_ContextView  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a context from default values <br>
   Standard_EXPORT   Visual3d_ContextView();
diff --git a/inc/Visual3d_ListIteratorOfSetListOfSetOfClipPlane.hxx b/inc/Visual3d_ListIteratorOfSetListOfSetOfClipPlane.hxx
index 78f5889..d5cbd5e 100644
--- a/inc/Visual3d_ListIteratorOfSetListOfSetOfClipPlane.hxx
+++ b/inc/Visual3d_ListIteratorOfSetListOfSetOfClipPlane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Visual3d_ListNodeOfSetListOfSetOfClipPlane;
 class Visual3d_ListIteratorOfSetListOfSetOfClipPlane  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Visual3d_ListIteratorOfSetListOfSetOfClipPlane();
diff --git a/inc/Visual3d_ListIteratorOfSetListOfSetOfLight.hxx b/inc/Visual3d_ListIteratorOfSetListOfSetOfLight.hxx
index 39b4ed3..9a10c34 100644
--- a/inc/Visual3d_ListIteratorOfSetListOfSetOfLight.hxx
+++ b/inc/Visual3d_ListIteratorOfSetListOfSetOfLight.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Visual3d_ListNodeOfSetListOfSetOfLight;
 class Visual3d_ListIteratorOfSetListOfSetOfLight  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Visual3d_ListIteratorOfSetListOfSetOfLight();
diff --git a/inc/Visual3d_ListIteratorOfSetListOfSetOfView.hxx b/inc/Visual3d_ListIteratorOfSetListOfSetOfView.hxx
index d88e840..64e335b 100644
--- a/inc/Visual3d_ListIteratorOfSetListOfSetOfView.hxx
+++ b/inc/Visual3d_ListIteratorOfSetListOfSetOfView.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Visual3d_ListNodeOfSetListOfSetOfView;
 class Visual3d_ListIteratorOfSetListOfSetOfView  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Visual3d_ListIteratorOfSetListOfSetOfView();
diff --git a/inc/Visual3d_PickDescriptor.hxx b/inc/Visual3d_PickDescriptor.hxx
index 52a8159..7b3aaad 100644
--- a/inc/Visual3d_PickDescriptor.hxx
+++ b/inc/Visual3d_PickDescriptor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Graphic3d_Structure;
 class Visual3d_PickDescriptor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a PickDescriptor <me>. <br>
   Standard_EXPORT   Visual3d_PickDescriptor(const Visual3d_ContextPick& CTX);
diff --git a/inc/Visual3d_PickPath.hxx b/inc/Visual3d_PickPath.hxx
index c54ccdb..65c42d5 100644
--- a/inc/Visual3d_PickPath.hxx
+++ b/inc/Visual3d_PickPath.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class Visual3d_PickError;
 class Visual3d_PickPath  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an undefined PickPath. <br>
   Standard_EXPORT   Visual3d_PickPath();
diff --git a/inc/Visual3d_SequenceOfPickPath.hxx b/inc/Visual3d_SequenceOfPickPath.hxx
index 6ba7efa..7a68fd4 100644
--- a/inc/Visual3d_SequenceOfPickPath.hxx
+++ b/inc/Visual3d_SequenceOfPickPath.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class Visual3d_SequenceNodeOfSequenceOfPickPath;
 class Visual3d_SequenceOfPickPath  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       Visual3d_SequenceOfPickPath();
diff --git a/inc/Visual3d_SetIteratorOfSetOfClipPlane.hxx b/inc/Visual3d_SetIteratorOfSetOfClipPlane.hxx
index 04af09c..0eab386 100644
--- a/inc/Visual3d_SetIteratorOfSetOfClipPlane.hxx
+++ b/inc/Visual3d_SetIteratorOfSetOfClipPlane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Visual3d_ListIteratorOfSetListOfSetOfClipPlane;
 class Visual3d_SetIteratorOfSetOfClipPlane  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Visual3d_SetIteratorOfSetOfClipPlane();
diff --git a/inc/Visual3d_SetIteratorOfSetOfLight.hxx b/inc/Visual3d_SetIteratorOfSetOfLight.hxx
index 56e6992..63f1ba8 100644
--- a/inc/Visual3d_SetIteratorOfSetOfLight.hxx
+++ b/inc/Visual3d_SetIteratorOfSetOfLight.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Visual3d_ListIteratorOfSetListOfSetOfLight;
 class Visual3d_SetIteratorOfSetOfLight  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Visual3d_SetIteratorOfSetOfLight();
diff --git a/inc/Visual3d_SetIteratorOfSetOfView.hxx b/inc/Visual3d_SetIteratorOfSetOfView.hxx
index 473b405..77863fa 100644
--- a/inc/Visual3d_SetIteratorOfSetOfView.hxx
+++ b/inc/Visual3d_SetIteratorOfSetOfView.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class Visual3d_ListIteratorOfSetListOfSetOfView;
 class Visual3d_SetIteratorOfSetOfView  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Visual3d_SetIteratorOfSetOfView();
diff --git a/inc/Visual3d_SetListOfSetOfClipPlane.hxx b/inc/Visual3d_SetListOfSetOfClipPlane.hxx
index b5a544f..20c468b 100644
--- a/inc/Visual3d_SetListOfSetOfClipPlane.hxx
+++ b/inc/Visual3d_SetListOfSetOfClipPlane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Visual3d_ListNodeOfSetListOfSetOfClipPlane;
 class Visual3d_SetListOfSetOfClipPlane  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Visual3d_SetListOfSetOfClipPlane();
diff --git a/inc/Visual3d_SetListOfSetOfLight.hxx b/inc/Visual3d_SetListOfSetOfLight.hxx
index 93004ee..3deb17e 100644
--- a/inc/Visual3d_SetListOfSetOfLight.hxx
+++ b/inc/Visual3d_SetListOfSetOfLight.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Visual3d_ListNodeOfSetListOfSetOfLight;
 class Visual3d_SetListOfSetOfLight  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Visual3d_SetListOfSetOfLight();
diff --git a/inc/Visual3d_SetListOfSetOfView.hxx b/inc/Visual3d_SetListOfSetOfView.hxx
index 91e1096..3235485 100644
--- a/inc/Visual3d_SetListOfSetOfView.hxx
+++ b/inc/Visual3d_SetListOfSetOfView.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class Visual3d_ListNodeOfSetListOfSetOfView;
 class Visual3d_SetListOfSetOfView  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Visual3d_SetListOfSetOfView();
diff --git a/inc/Visual3d_SetOfClipPlane.hxx b/inc/Visual3d_SetOfClipPlane.hxx
index fa20881..792d5a3 100644
--- a/inc/Visual3d_SetOfClipPlane.hxx
+++ b/inc/Visual3d_SetOfClipPlane.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Visual3d_ListIteratorOfSetListOfSetOfClipPlane;
 class Visual3d_SetOfClipPlane  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Visual3d_SetOfClipPlane();
diff --git a/inc/Visual3d_SetOfLight.hxx b/inc/Visual3d_SetOfLight.hxx
index 4b666a1..54eb708 100644
--- a/inc/Visual3d_SetOfLight.hxx
+++ b/inc/Visual3d_SetOfLight.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Visual3d_ListIteratorOfSetListOfSetOfLight;
 class Visual3d_SetOfLight  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Visual3d_SetOfLight();
diff --git a/inc/Visual3d_SetOfView.hxx b/inc/Visual3d_SetOfView.hxx
index 5928082..11d4d8a 100644
--- a/inc/Visual3d_SetOfView.hxx
+++ b/inc/Visual3d_SetOfView.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Visual3d_ListIteratorOfSetListOfSetOfView;
 class Visual3d_SetOfView  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Visual3d_SetOfView();
diff --git a/inc/Visual3d_View.hxx b/inc/Visual3d_View.hxx
index 47af8b1..11c1c58 100644
--- a/inc/Visual3d_View.hxx
+++ b/inc/Visual3d_View.hxx
@@ -106,8 +106,8 @@
 #ifndef _Aspect_TypeOfTriedronEcho_HeaderFile
 #include <Aspect_TypeOfTriedronEcho.hxx>
 #endif
-#ifndef _OSD_FontAspect_HeaderFile
-#include <OSD_FontAspect.hxx>
+#ifndef _Font_FontAspect_HeaderFile
+#include <Font_FontAspect.hxx>
 #endif
 #ifndef _Visual3d_TypeOfAnswer_HeaderFile
 #include <Visual3d_TypeOfAnswer.hxx>
@@ -136,8 +136,11 @@
 #ifndef _Graphic3d_PtrFrameBuffer_HeaderFile
 #include <Graphic3d_PtrFrameBuffer.hxx>
 #endif
-#ifndef _Image_CRawBufferData_HeaderFile
-#include <Image_CRawBufferData.hxx>
+#ifndef _Image_PixMap_HeaderFile
+#include <Image_PixMap.hxx>
+#endif
+#ifndef _Graphic3d_BufferType_HeaderFile
+#include <Graphic3d_BufferType.hxx>
 #endif
 #ifndef _Graphic3d_ExportFormat_HeaderFile
 #include <Graphic3d_ExportFormat.hxx>
@@ -348,9 +351,9 @@ public:
   //! Highlights the echo zone of the Triedron. <br>
   Standard_EXPORT     void TriedronEcho(const Aspect_TypeOfTriedronEcho AType = Aspect_TOTE_NONE) ;
   //! Returns data of a graduated trihedron if displayed (return value is True) <br>
-  Standard_EXPORT     Standard_Boolean GetGraduatedTrihedron(TCollection_ExtendedString& xname,TCollection_ExtendedString& yname,TCollection_ExtendedString& zname,Standard_Boolean& xdrawname,Standard_Boolean& ydrawname,Standard_Boolean& zdrawname,Standard_Boolean& xdrawvalues,Standard_Boolean& ydrawvalues,Standard_Boolean& zdrawvalues,Standard_Boolean& drawgrid,Standard_Boolean& drawaxes,Standard_Integer& nbx,Standard_Integer& nby,Standard_Integer& nbz,Standard_Integer& xoffset,Standard_Integer& yoffset,Standard_Integer& zoffset,Standard_Integer& xaxisoffset,Standard_Integer& yaxisoffset,Standard_Integer& zaxisoffset,Standard_Boolean& xdrawtickmarks,Standard_Boolean& ydrawtickmarks,Standard_Boolean& zdrawtickmarks,Standard_Integer& xtickmarklength,Standard_Integer& ytickmarklength,Standard_Integer& ztickmarklength,Quantity_Color& gridcolor,Quantity_Color& xnamecolor,Quantity_Color& ynamecolor,Quantity_Color& znamecolor,Quantity_Color& xcolor,Quantity_Color& ycolor,Quantity_Color& zcolor,TCollection_AsciiString& fontOfNames,OSD_FontAspect& styleOfNames,Standard_Integer& sizeOfNames,TCollection_AsciiString& fontOfValues,OSD_FontAspect& styleOfValues,Standard_Integer& sizeOfValues) const;
+  Standard_EXPORT     Standard_Boolean GetGraduatedTrihedron(TCollection_ExtendedString& xname,TCollection_ExtendedString& yname,TCollection_ExtendedString& zname,Standard_Boolean& xdrawname,Standard_Boolean& ydrawname,Standard_Boolean& zdrawname,Standard_Boolean& xdrawvalues,Standard_Boolean& ydrawvalues,Standard_Boolean& zdrawvalues,Standard_Boolean& drawgrid,Standard_Boolean& drawaxes,Standard_Integer& nbx,Standard_Integer& nby,Standard_Integer& nbz,Standard_Integer& xoffset,Standard_Integer& yoffset,Standard_Integer& zoffset,Standard_Integer& xaxisoffset,Standard_Integer& yaxisoffset,Standard_Integer& zaxisoffset,Standard_Boolean& xdrawtickmarks,Standard_Boolean& ydrawtickmarks,Standard_Boolean& zdrawtickmarks,Standard_Integer& xtickmarklength,Standard_Integer& ytickmarklength,Standard_Integer& ztickmarklength,Quantity_Color& gridcolor,Quantity_Color& xnamecolor,Quantity_Color& ynamecolor,Quantity_Color& znamecolor,Quantity_Color& xcolor,Quantity_Color& ycolor,Quantity_Color& zcolor,TCollection_AsciiString& fontOfNames,Font_FontAspect& styleOfNames,Standard_Integer& sizeOfNames,TCollection_AsciiString& fontOfValues,Font_FontAspect& styleOfValues,Standard_Integer& sizeOfValues) const;
   //! Displays a graduated trihedron. <br>
-  Standard_EXPORT     void GraduatedTrihedronDisplay(const TCollection_ExtendedString& xname,const TCollection_ExtendedString& yname,const TCollection_ExtendedString& zname,const Standard_Boolean xdrawname,const Standard_Boolean ydrawname,const Standard_Boolean zdrawname,const Standard_Boolean xdrawvalues,const Standard_Boolean ydrawvalues,const Standard_Boolean zdrawvalues,const Standard_Boolean drawgrid,const Standard_Boolean drawaxes,const Standard_Integer nbx,const Standard_Integer nby,const Standard_Integer nbz,const Standard_Integer xoffset,const Standard_Integer yoffset,const Standard_Integer zoffset,const Standard_Integer xaxisoffset,const Standard_Integer yaxisoffset,const Standard_Integer zaxisoffset,const Standard_Boolean xdrawtickmarks,const Standard_Boolean ydrawtickmarks,const Standard_Boolean zdrawtickmarks,const Standard_Integer xtickmarklength,const Standard_Integer ytickmarklength,const Standard_Integer ztickmarklength,const Quantity_Color& gridcolor,const Quantity_Color& xnamecolor,const Quantity_Color& ynamecolor,const Quantity_Color& znamecolor,const Quantity_Color& xcolor,const Quantity_Color& ycolor,const Quantity_Color& zcolor,const TCollection_AsciiString& fontOfNames,const OSD_FontAspect styleOfNames,const Standard_Integer sizeOfNames,const TCollection_AsciiString& fontOfValues,const OSD_FontAspect styleOfValues,const Standard_Integer sizeOfValues) ;
+  Standard_EXPORT     void GraduatedTrihedronDisplay(const TCollection_ExtendedString& xname,const TCollection_ExtendedString& yname,const TCollection_ExtendedString& zname,const Standard_Boolean xdrawname,const Standard_Boolean ydrawname,const Standard_Boolean zdrawname,const Standard_Boolean xdrawvalues,const Standard_Boolean ydrawvalues,const Standard_Boolean zdrawvalues,const Standard_Boolean drawgrid,const Standard_Boolean drawaxes,const Standard_Integer nbx,const Standard_Integer nby,const Standard_Integer nbz,const Standard_Integer xoffset,const Standard_Integer yoffset,const Standard_Integer zoffset,const Standard_Integer xaxisoffset,const Standard_Integer yaxisoffset,const Standard_Integer zaxisoffset,const Standard_Boolean xdrawtickmarks,const Standard_Boolean ydrawtickmarks,const Standard_Boolean zdrawtickmarks,const Standard_Integer xtickmarklength,const Standard_Integer ytickmarklength,const Standard_Integer ztickmarklength,const Quantity_Color& gridcolor,const Quantity_Color& xnamecolor,const Quantity_Color& ynamecolor,const Quantity_Color& znamecolor,const Quantity_Color& xcolor,const Quantity_Color& ycolor,const Quantity_Color& zcolor,const TCollection_AsciiString& fontOfNames,const Font_FontAspect styleOfNames,const Standard_Integer sizeOfNames,const TCollection_AsciiString& fontOfValues,const Font_FontAspect styleOfValues,const Standard_Integer sizeOfValues) ;
   //! Erases a graduated trihedron from the view. <br>
   Standard_EXPORT     void GraduatedTrihedronErase() ;
   //! Returns the value of the default window background. <br>
@@ -502,7 +505,7 @@ public:
   //! Change offscreen FBO viewport. <br>
   Standard_EXPORT     void FBOChangeViewport(Graphic3d_PtrFrameBuffer& fboPtr,const Standard_Integer width,const Standard_Integer height) ;
   //! Dump active rendering buffer into specified memory buffer. <br>
-  Standard_EXPORT     Standard_Boolean BufferDump(Image_CRawBufferData& buffer) ;
+  Standard_EXPORT     Standard_Boolean BufferDump(Image_PixMap& theImage,const Graphic3d_BufferType& theBufferType) ;
   //! turns on/off opengl lighting, currently used in triedron displaying <br>
   Standard_EXPORT     void EnableGLLight(const Standard_Boolean enable) const;
   //! returns the current state of the gl lighting <br>
diff --git a/inc/Visual3d_ViewMapping.hxx b/inc/Visual3d_ViewMapping.hxx
index ab26170..c4b1afb 100644
--- a/inc/Visual3d_ViewMapping.hxx
+++ b/inc/Visual3d_ViewMapping.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -64,18 +67,7 @@ class Graphic3d_Vertex;
 class Visual3d_ViewMapping  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a projection. <br>
   Standard_EXPORT   Visual3d_ViewMapping();
diff --git a/inc/Visual3d_ViewOrientation.hxx b/inc/Visual3d_ViewOrientation.hxx
index 6865282..a74d3e3 100644
--- a/inc/Visual3d_ViewOrientation.hxx
+++ b/inc/Visual3d_ViewOrientation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class Graphic3d_Vector;
 class Visual3d_ViewOrientation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a VRC coordinate system. <br>
 //!	    VRP		: Origin of the VRC coordinate system. <br>
diff --git a/inc/VoxelClient_VisDrawer.h b/inc/VoxelClient_VisDrawer.h
deleted file mode 100644
index cb89ac2..0000000
--- a/inc/VoxelClient_VisDrawer.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- Copyright (c) 1999-2012 OPEN CASCADE SAS
-
- The content of this file is subject to the Open CASCADE Technology Public
- License Version 6.5 (the "License"). You may not use the content of this file
- except in compliance with the License. Please obtain a copy of the License
- at http://www.opencascade.org and read it completely before using this file.
-
- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-
- The Original Code and all software distributed under the License is
- distributed on an "AS IS" basis, without warranty of any kind, and the
- Initial Developer hereby disclaims all such warranties, including without
- limitation, any warranties of merchantability, fitness for a particular
- purpose or non-infringement. Please see the License for the specific terms
- and conditions governing the rights and limitations under the License.
-
-*/
-
-#ifndef _VOXEL_VISDRAWER_H_
-#define _VOXEL_VISDRAWER_H_
-
-#include "Voxel_VisData.h"
-#include <Graphic3d_CBounds.hxx>
-
-class VoxelClient_VisDrawer
-{
-public:
-
-  class VisElement;
-
-public:
-
-    Standard_EXPORT static void Init();
-
-	Standard_EXPORT VoxelClient_VisDrawer(Voxel_VisData* theData);
-	Standard_EXPORT virtual ~VoxelClient_VisDrawer();
-
-	Standard_EXPORT void EvalMinMax(Graphic3d_CBounds& theMinMax) const;
-	Standard_EXPORT void Display(const Standard_Boolean theHighlight);
-
-private:
-    
-	Standard_EXPORT void DisplayVoxels(const Standard_Boolean theHighlight);
-	Standard_EXPORT void DisplayPoints(const Standard_Boolean nearest);
-	Standard_EXPORT void DisplayBoxes(const Standard_Boolean nearest);
-    Standard_EXPORT void HighlightVoxel();
-	
-    Standard_EXPORT void DisplayTriangulation(const Standard_Boolean theHighlight);
-
-	Voxel_VisData* myData;
-};
-
-#endif // _VOXEL_VISDRAWER_H_
diff --git a/inc/Voxel_BoolDS.hxx b/inc/Voxel_BoolDS.hxx
index 04c52e0..957cf12 100644
--- a/inc/Voxel_BoolDS.hxx
+++ b/inc/Voxel_BoolDS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@
 class Voxel_BoolDS  : public Voxel_DS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   Voxel_BoolDS();
diff --git a/inc/Voxel_BooleanOperation.hxx b/inc/Voxel_BooleanOperation.hxx
index f14636b..b6a7758 100644
--- a/inc/Voxel_BooleanOperation.hxx
+++ b/inc/Voxel_BooleanOperation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class Voxel_DS;
 class Voxel_BooleanOperation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   Voxel_BooleanOperation();
diff --git a/inc/Voxel_CollisionDetection.hxx b/inc/Voxel_CollisionDetection.hxx
index e67b9c7..878154f 100644
--- a/inc/Voxel_CollisionDetection.hxx
+++ b/inc/Voxel_CollisionDetection.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Voxel_BoolDS;
 class Voxel_CollisionDetection  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   Voxel_CollisionDetection();
diff --git a/inc/Voxel_ColorDS.hxx b/inc/Voxel_ColorDS.hxx
index 9b8b90c..d3e918a 100644
--- a/inc/Voxel_ColorDS.hxx
+++ b/inc/Voxel_ColorDS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@
 class Voxel_ColorDS  : public Voxel_DS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   Voxel_ColorDS();
diff --git a/inc/Voxel_DS.hxx b/inc/Voxel_DS.hxx
index 84ea4fa..3136301 100644
--- a/inc/Voxel_DS.hxx
+++ b/inc/Voxel_DS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class Voxel_Reader;
 class Voxel_DS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   Voxel_DS();
diff --git a/inc/Voxel_FastConverter.hxx b/inc/Voxel_FastConverter.hxx
index 8f718d4..9ba374f 100644
--- a/inc/Voxel_FastConverter.hxx
+++ b/inc/Voxel_FastConverter.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class gp_Pln;
 class Voxel_FastConverter  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! A constructor for conversion of a shape into a cube of boolean voxels. <br>
 //!          It allocates the voxels in memory. <br>
diff --git a/inc/Voxel_FloatDS.hxx b/inc/Voxel_FloatDS.hxx
index cc184ab..143a7cd 100644
--- a/inc/Voxel_FloatDS.hxx
+++ b/inc/Voxel_FloatDS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@
 class Voxel_FloatDS  : public Voxel_DS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   Voxel_FloatDS();
diff --git a/inc/Voxel_OctBoolDS.hxx b/inc/Voxel_OctBoolDS.hxx
index 2c45adb..e5ec3e5 100644
--- a/inc/Voxel_OctBoolDS.hxx
+++ b/inc/Voxel_OctBoolDS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@
 class Voxel_OctBoolDS  : public Voxel_DS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   Voxel_OctBoolDS();
diff --git a/inc/Voxel_ROctBoolDS.hxx b/inc/Voxel_ROctBoolDS.hxx
index 1d2462b..792ff58 100644
--- a/inc/Voxel_ROctBoolDS.hxx
+++ b/inc/Voxel_ROctBoolDS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@
 class Voxel_ROctBoolDS  : public Voxel_DS {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   Voxel_ROctBoolDS();
diff --git a/inc/Voxel_Reader.hxx b/inc/Voxel_Reader.hxx
index 454be3d..a9b754a 100644
--- a/inc/Voxel_Reader.hxx
+++ b/inc/Voxel_Reader.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@ class TCollection_ExtendedString;
 class Voxel_Reader  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   Voxel_Reader();
diff --git a/inc/Voxel_Selector.hxx b/inc/Voxel_Selector.hxx
index 8cfbed7..0f55a3d 100644
--- a/inc/Voxel_Selector.hxx
+++ b/inc/Voxel_Selector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Voxel_ROctBoolDS;
 class Voxel_Selector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   Voxel_Selector();
diff --git a/inc/Voxel_SplitData.hxx b/inc/Voxel_SplitData.hxx
index 5b501d5..3e238dc 100644
--- a/inc/Voxel_SplitData.hxx
+++ b/inc/Voxel_SplitData.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@
 class Voxel_SplitData  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   Voxel_SplitData();
diff --git a/inc/Voxel_Writer.hxx b/inc/Voxel_Writer.hxx
index 74c8ca6..b5bfc67 100644
--- a/inc/Voxel_Writer.hxx
+++ b/inc/Voxel_Writer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class TCollection_ExtendedString;
 class Voxel_Writer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   Voxel_Writer();
diff --git a/inc/Vrml.hxx b/inc/Vrml.hxx
index 84089f9..8a4090d 100644
--- a/inc/Vrml.hxx
+++ b/inc/Vrml.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -72,18 +75,7 @@ class Vrml_Instancing;
 class Vrml  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Writes one line of commentary in  anOStream (VRML file). <br>
   Standard_EXPORT   static  Standard_OStream& VrmlHeaderWriter(Standard_OStream& anOStream) ;
diff --git a/inc/VrmlAPI.hxx b/inc/VrmlAPI.hxx
index 50832da..46724b5 100644
--- a/inc/VrmlAPI.hxx
+++ b/inc/VrmlAPI.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class VrmlAPI_Writer;
 class VrmlAPI  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Converts the shape aShape to VRML format and writes it <br>
 //! to the file identified by aFileName using default parameters. <br>
diff --git a/inc/VrmlAPI_Writer.hxx b/inc/VrmlAPI_Writer.hxx
index 3d666fa..48c5ab3 100644
--- a/inc/VrmlAPI_Writer.hxx
+++ b/inc/VrmlAPI_Writer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class TopoDS_Shape;
 class VrmlAPI_Writer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a writer object with default parameters. <br>
   Standard_EXPORT   VrmlAPI_Writer();
diff --git a/inc/VrmlConverter_Curve.hxx b/inc/VrmlConverter_Curve.hxx
index 5268f3a..fe7206a 100644
--- a/inc/VrmlConverter_Curve.hxx
+++ b/inc/VrmlConverter_Curve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class VrmlConverter_Drawer;
 class VrmlConverter_Curve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! adds to the OStream the drawing of the curve aCurve. <br>
 //!          The aspect is defined by LineAspect in aDrawer. <br>
diff --git a/inc/VrmlConverter_DeflectionCurve.hxx b/inc/VrmlConverter_DeflectionCurve.hxx
index 9537220..73729c3 100644
--- a/inc/VrmlConverter_DeflectionCurve.hxx
+++ b/inc/VrmlConverter_DeflectionCurve.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class VrmlConverter_Drawer;
 class VrmlConverter_DeflectionCurve  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! adds to the OStream the drawing of the curve aCurve with <br>
 //!          respect to the maximal chordial deviation defined <br>
diff --git a/inc/VrmlConverter_HLRShape.hxx b/inc/VrmlConverter_HLRShape.hxx
index 898ae46..24e4823 100644
--- a/inc/VrmlConverter_HLRShape.hxx
+++ b/inc/VrmlConverter_HLRShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class VrmlConverter_Projector;
 class VrmlConverter_HLRShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(Standard_OStream& anOStream,const TopoDS_Shape& aShape,const Handle(VrmlConverter_Drawer)& aDrawer,const Handle(VrmlConverter_Projector)& aProjector) ;
diff --git a/inc/VrmlConverter_ShadedShape.hxx b/inc/VrmlConverter_ShadedShape.hxx
index 06d92ba..1454e15 100644
--- a/inc/VrmlConverter_ShadedShape.hxx
+++ b/inc/VrmlConverter_ShadedShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TColgp_Array1OfDir;
 class VrmlConverter_ShadedShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(Standard_OStream& anOStream,const TopoDS_Shape& aShape,const Handle(VrmlConverter_Drawer)& aDrawer) ;
diff --git a/inc/VrmlConverter_WFDeflectionRestrictedFace.hxx b/inc/VrmlConverter_WFDeflectionRestrictedFace.hxx
index 5908c7f..89f7d8f 100644
--- a/inc/VrmlConverter_WFDeflectionRestrictedFace.hxx
+++ b/inc/VrmlConverter_WFDeflectionRestrictedFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class VrmlConverter_Drawer;
 class VrmlConverter_WFDeflectionRestrictedFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(Standard_OStream& anOStream,const Handle(BRepAdaptor_HSurface)& aFace,const Handle(VrmlConverter_Drawer)& aDrawer) ;
diff --git a/inc/VrmlConverter_WFDeflectionShape.hxx b/inc/VrmlConverter_WFDeflectionShape.hxx
index 2e14b17..674980c 100644
--- a/inc/VrmlConverter_WFDeflectionShape.hxx
+++ b/inc/VrmlConverter_WFDeflectionShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class VrmlConverter_Drawer;
 class VrmlConverter_WFDeflectionShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(Standard_OStream& anOStream,const TopoDS_Shape& aShape,const Handle(VrmlConverter_Drawer)& aDrawer) ;
diff --git a/inc/VrmlConverter_WFRestrictedFace.hxx b/inc/VrmlConverter_WFRestrictedFace.hxx
index 49d4cb5..2907cb6 100644
--- a/inc/VrmlConverter_WFRestrictedFace.hxx
+++ b/inc/VrmlConverter_WFRestrictedFace.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class VrmlConverter_Drawer;
 class VrmlConverter_WFRestrictedFace  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(Standard_OStream& anOStream,const Handle(BRepAdaptor_HSurface)& aFace,const Handle(VrmlConverter_Drawer)& aDrawer) ;
diff --git a/inc/VrmlConverter_WFShape.hxx b/inc/VrmlConverter_WFShape.hxx
index 679dfe9..47ab1c8 100644
--- a/inc/VrmlConverter_WFShape.hxx
+++ b/inc/VrmlConverter_WFShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class VrmlConverter_Drawer;
 class VrmlConverter_WFShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Add(Standard_OStream& anOStream,const TopoDS_Shape& aShape,const Handle(VrmlConverter_Drawer)& aDrawer) ;
diff --git a/inc/VrmlData_ArrayVec3d.hxx b/inc/VrmlData_ArrayVec3d.hxx
index e8e2fc5..5dd8d0e 100644
--- a/inc/VrmlData_ArrayVec3d.hxx
+++ b/inc/VrmlData_ArrayVec3d.hxx
@@ -46,7 +46,7 @@ class VrmlData_ArrayVec3d : public VrmlData_Node
    */
   inline VrmlData_ArrayVec3d (const VrmlData_Scene& theScene,
                               const char            * theName,
-                              const size_t          nVec,
+                              const Standard_Size   nVec,
                               const gp_XYZ          * arrVec)
     : VrmlData_Node     (theScene, theName),
       myArray           (arrVec),
@@ -56,7 +56,7 @@ class VrmlData_ArrayVec3d : public VrmlData_Node
   /**
    * Query the number of vectors
    */
-  inline size_t         Length          () const { return myLength; }
+  inline Standard_Size  Length          () const { return myLength; }
 
   /**
    * Query the array
@@ -74,7 +74,7 @@ class VrmlData_ArrayVec3d : public VrmlData_Node
   /**
    * Set the array data
    */
-  inline void           SetValues (const size_t nValues,
+  inline void           SetValues (const Standard_Size nValues,
                                    const gp_XYZ * arrValues)
   { myLength = nValues; myArray = arrValues; }
 
@@ -116,7 +116,7 @@ class VrmlData_ArrayVec3d : public VrmlData_Node
    * @return
    *   the vector for the index. If index irrelevant, returns (0., 0., 0.)
    */
-  Standard_EXPORT const gp_XYZ& Value (const Standard_Integer i) const;
+  Standard_EXPORT const gp_XYZ& Value (const Standard_Size i) const;
 
  protected:
   // ---------- PROTECTED FIELDS ----------
diff --git a/inc/Vrml_Cone.hxx b/inc/Vrml_Cone.hxx
index eb2896d..a4a097a 100644
--- a/inc/Vrml_Cone.hxx
+++ b/inc/Vrml_Cone.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@
 class Vrml_Cone  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Cone(const Vrml_ConeParts aParts = Vrml_ConeALL,const Standard_Real aBottomRadius = 1,const Standard_Real aHeight = 2);
diff --git a/inc/Vrml_Cube.hxx b/inc/Vrml_Cube.hxx
index 78af4d3..87c8d41 100644
--- a/inc/Vrml_Cube.hxx
+++ b/inc/Vrml_Cube.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@
 class Vrml_Cube  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Cube(const Standard_Real aWidth = 2,const Standard_Real aHeight = 2,const Standard_Real aDepth = 2);
diff --git a/inc/Vrml_Cylinder.hxx b/inc/Vrml_Cylinder.hxx
index 6b2ea4f..c4660c9 100644
--- a/inc/Vrml_Cylinder.hxx
+++ b/inc/Vrml_Cylinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@
 class Vrml_Cylinder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Cylinder(const Vrml_CylinderParts aParts = Vrml_CylinderALL,const Standard_Real aRadius = 1,const Standard_Real aHeight = 2);
diff --git a/inc/Vrml_DirectionalLight.hxx b/inc/Vrml_DirectionalLight.hxx
index 13bb797..53ffe89 100644
--- a/inc/Vrml_DirectionalLight.hxx
+++ b/inc/Vrml_DirectionalLight.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class gp_Vec;
 class Vrml_DirectionalLight  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_DirectionalLight();
diff --git a/inc/Vrml_FontStyle.hxx b/inc/Vrml_FontStyle.hxx
index 8093c9e..3601494 100644
--- a/inc/Vrml_FontStyle.hxx
+++ b/inc/Vrml_FontStyle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@
 class Vrml_FontStyle  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_FontStyle(const Standard_Real aSize = 10,const Vrml_FontStyleFamily aFamily = Vrml_SERIF,const Vrml_FontStyleStyle aStyle = Vrml_NONE);
diff --git a/inc/Vrml_Group.hxx b/inc/Vrml_Group.hxx
index 8b44f33..ec1dd34 100644
--- a/inc/Vrml_Group.hxx
+++ b/inc/Vrml_Group.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@
 class Vrml_Group  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Group();
diff --git a/inc/Vrml_Info.hxx b/inc/Vrml_Info.hxx
index ac21a34..3c865f8 100644
--- a/inc/Vrml_Info.hxx
+++ b/inc/Vrml_Info.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class TCollection_AsciiString;
 class Vrml_Info  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Info(const TCollection_AsciiString& aString = "<Undefined info>");
diff --git a/inc/Vrml_Instancing.hxx b/inc/Vrml_Instancing.hxx
index 138eb1b..868b2cb 100644
--- a/inc/Vrml_Instancing.hxx
+++ b/inc/Vrml_Instancing.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class TCollection_AsciiString;
 class Vrml_Instancing  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds "DEF  <myName>" in  anOStream  (VRML  file). <br>
   Standard_EXPORT   Vrml_Instancing(const TCollection_AsciiString& aString);
diff --git a/inc/Vrml_MaterialBinding.hxx b/inc/Vrml_MaterialBinding.hxx
index d7dacb8..edd3983 100644
--- a/inc/Vrml_MaterialBinding.hxx
+++ b/inc/Vrml_MaterialBinding.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@
 class Vrml_MaterialBinding  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_MaterialBinding(const Vrml_MaterialBindingAndNormalBinding aValue);
diff --git a/inc/Vrml_MatrixTransform.hxx b/inc/Vrml_MatrixTransform.hxx
index 7af5d0f..24fa890 100644
--- a/inc/Vrml_MatrixTransform.hxx
+++ b/inc/Vrml_MatrixTransform.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class gp_Trsf;
 class Vrml_MatrixTransform  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_MatrixTransform();
diff --git a/inc/Vrml_NormalBinding.hxx b/inc/Vrml_NormalBinding.hxx
index 3a4fa37..83fc0be 100644
--- a/inc/Vrml_NormalBinding.hxx
+++ b/inc/Vrml_NormalBinding.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@
 class Vrml_NormalBinding  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_NormalBinding(const Vrml_MaterialBindingAndNormalBinding aValue);
diff --git a/inc/Vrml_OrthographicCamera.hxx b/inc/Vrml_OrthographicCamera.hxx
index c090cdf..21428a3 100644
--- a/inc/Vrml_OrthographicCamera.hxx
+++ b/inc/Vrml_OrthographicCamera.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class Vrml_SFRotation;
 class Vrml_OrthographicCamera  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_OrthographicCamera();
diff --git a/inc/Vrml_PerspectiveCamera.hxx b/inc/Vrml_PerspectiveCamera.hxx
index e13f21b..6cc3f7a 100644
--- a/inc/Vrml_PerspectiveCamera.hxx
+++ b/inc/Vrml_PerspectiveCamera.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Vrml_SFRotation;
 class Vrml_PerspectiveCamera  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_PerspectiveCamera();
diff --git a/inc/Vrml_PointLight.hxx b/inc/Vrml_PointLight.hxx
index 58b2d08..bdb6bd5 100644
--- a/inc/Vrml_PointLight.hxx
+++ b/inc/Vrml_PointLight.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Vec;
 class Vrml_PointLight  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_PointLight();
diff --git a/inc/Vrml_PointSet.hxx b/inc/Vrml_PointSet.hxx
index 896eac3..89325fc 100644
--- a/inc/Vrml_PointSet.hxx
+++ b/inc/Vrml_PointSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@
 class Vrml_PointSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_PointSet(const Standard_Integer aStartIndex = 0,const Standard_Integer aNumPoints = -1);
diff --git a/inc/Vrml_Rotation.hxx b/inc/Vrml_Rotation.hxx
index a818426..7cf6956 100644
--- a/inc/Vrml_Rotation.hxx
+++ b/inc/Vrml_Rotation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class Vrml_SFRotation;
 class Vrml_Rotation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Rotation();
diff --git a/inc/Vrml_SFRotation.hxx b/inc/Vrml_SFRotation.hxx
index 9339a2e..5fef630 100644
--- a/inc/Vrml_SFRotation.hxx
+++ b/inc/Vrml_SFRotation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@
 class Vrml_SFRotation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_SFRotation();
diff --git a/inc/Vrml_Scale.hxx b/inc/Vrml_Scale.hxx
index b326da9..7335d51 100644
--- a/inc/Vrml_Scale.hxx
+++ b/inc/Vrml_Scale.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Vec;
 class Vrml_Scale  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Scale();
diff --git a/inc/Vrml_Separator.hxx b/inc/Vrml_Separator.hxx
index 01c1a77..92f7fca 100644
--- a/inc/Vrml_Separator.hxx
+++ b/inc/Vrml_Separator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@
 class Vrml_Separator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Separator(const Vrml_SeparatorRenderCulling aRenderCulling);
diff --git a/inc/Vrml_ShapeHints.hxx b/inc/Vrml_ShapeHints.hxx
index a91f693..fd43a3a 100644
--- a/inc/Vrml_ShapeHints.hxx
+++ b/inc/Vrml_ShapeHints.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,7 @@
 class Vrml_ShapeHints  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_ShapeHints(const Vrml_VertexOrdering aVertexOrdering = Vrml_UNKNOWN_ORDERING,const Vrml_ShapeType aShapeType = Vrml_UNKNOWN_SHAPE_TYPE,const Vrml_FaceType aFaceType = Vrml_CONVEX,const Standard_Real aAngle = 0.5);
diff --git a/inc/Vrml_Sphere.hxx b/inc/Vrml_Sphere.hxx
index 57df503..2e055f3 100644
--- a/inc/Vrml_Sphere.hxx
+++ b/inc/Vrml_Sphere.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -27,18 +30,7 @@
 class Vrml_Sphere  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Sphere(const Standard_Real aRadius = 1);
diff --git a/inc/Vrml_SpotLight.hxx b/inc/Vrml_SpotLight.hxx
index 8830d7f..b1987d9 100644
--- a/inc/Vrml_SpotLight.hxx
+++ b/inc/Vrml_SpotLight.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Vec;
 class Vrml_SpotLight  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_SpotLight();
diff --git a/inc/Vrml_Switch.hxx b/inc/Vrml_Switch.hxx
index 784daae..47f063d 100644
--- a/inc/Vrml_Switch.hxx
+++ b/inc/Vrml_Switch.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@
 class Vrml_Switch  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Switch(const Standard_Integer aWhichChild = -1);
diff --git a/inc/Vrml_Texture2.hxx b/inc/Vrml_Texture2.hxx
index d0a8475..bb80922 100644
--- a/inc/Vrml_Texture2.hxx
+++ b/inc/Vrml_Texture2.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class TCollection_AsciiString;
 class Vrml_Texture2  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Texture2();
diff --git a/inc/Vrml_Texture2Transform.hxx b/inc/Vrml_Texture2Transform.hxx
index 3bcea38..9cacf95 100644
--- a/inc/Vrml_Texture2Transform.hxx
+++ b/inc/Vrml_Texture2Transform.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Vec2d;
 class Vrml_Texture2Transform  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Texture2Transform();
diff --git a/inc/Vrml_Transform.hxx b/inc/Vrml_Transform.hxx
index 79909aa..c3c1b9b 100644
--- a/inc/Vrml_Transform.hxx
+++ b/inc/Vrml_Transform.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class Vrml_SFRotation;
 class Vrml_Transform  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Transform();
diff --git a/inc/Vrml_TransformSeparator.hxx b/inc/Vrml_TransformSeparator.hxx
index 7642769..62271cb 100644
--- a/inc/Vrml_TransformSeparator.hxx
+++ b/inc/Vrml_TransformSeparator.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@
 class Vrml_TransformSeparator  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_TransformSeparator();
diff --git a/inc/Vrml_Translation.hxx b/inc/Vrml_Translation.hxx
index 3982828..b3c4ea5 100644
--- a/inc/Vrml_Translation.hxx
+++ b/inc/Vrml_Translation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Vec;
 class Vrml_Translation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_Translation();
diff --git a/inc/Vrml_WWWAnchor.hxx b/inc/Vrml_WWWAnchor.hxx
index ad86567..ee349e7 100644
--- a/inc/Vrml_WWWAnchor.hxx
+++ b/inc/Vrml_WWWAnchor.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class TCollection_AsciiString;
 class Vrml_WWWAnchor  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_WWWAnchor(const TCollection_AsciiString& aName = "",const TCollection_AsciiString& aDescription = "",const Vrml_WWWAnchorMap aMap = Vrml_MAP_NONE);
diff --git a/inc/Vrml_WWWInline.hxx b/inc/Vrml_WWWInline.hxx
index 4001c7f..04a6f7c 100644
--- a/inc/Vrml_WWWInline.hxx
+++ b/inc/Vrml_WWWInline.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Vec;
 class Vrml_WWWInline  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Vrml_WWWInline();
diff --git a/inc/WNT_ColorTable.hxx b/inc/WNT_ColorTable.hxx
index f000a44..27d9baa 100644
--- a/inc/WNT_ColorTable.hxx
+++ b/inc/WNT_ColorTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class Standard_OutOfMemory;
 class WNT_ColorTable  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   WNT_ColorTable(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/WNT_FontTable.hxx b/inc/WNT_FontTable.hxx
index 17b71c4..3f98cd8 100644
--- a/inc/WNT_FontTable.hxx
+++ b/inc/WNT_FontTable.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class WNT_FontMapEntry;
 class WNT_FontTable  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   WNT_FontTable(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/WNT_ListOfMFTFonts.hxx b/inc/WNT_ListOfMFTFonts.hxx
index c4432e6..4699c97 100644
--- a/inc/WNT_ListOfMFTFonts.hxx
+++ b/inc/WNT_ListOfMFTFonts.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MFT_FontManager;
 class WNT_ListOfMFTFonts  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   WNT_ListOfMFTFonts(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/WNT_PixMap.hxx b/inc/WNT_PixMap.hxx
deleted file mode 100644
index 4d99d04..0000000
--- a/inc/WNT_PixMap.hxx
+++ /dev/null
@@ -1,99 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _WNT_PixMap_HeaderFile
-#define _WNT_PixMap_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-#ifndef _Handle_WNT_PixMap_HeaderFile
-#include <Handle_WNT_PixMap.hxx>
-#endif
-
-#ifndef _Aspect_Handle_HeaderFile
-#include <Aspect_Handle.hxx>
-#endif
-#ifndef _Handle_Aspect_Window_HeaderFile
-#include <Handle_Aspect_Window.hxx>
-#endif
-#ifndef _Aspect_PixMap_HeaderFile
-#include <Aspect_PixMap.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Standard_CString_HeaderFile
-#include <Standard_CString.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-class Aspect_Window;
-class Aspect_PixmapDefinitionError;
-class Aspect_PixmapError;
-class Quantity_Color;
-
-
-//! This class defines a windows bitmap <br>
-class WNT_PixMap : public Aspect_PixMap {
-
-public:
-
-  //!  Warning! When <aDepth> is NULL , the pixmap is created <br>
-//! with the SAME depth than the window <aWindow> <br>
-  Standard_EXPORT   WNT_PixMap(const Handle(Aspect_Window)& aWindow,const Standard_Integer aWidth,const Standard_Integer anHeight,const Standard_Integer aCDepth = 0);
-  //! Destroies the Bitmap <br>
-  Standard_EXPORT   virtual  void Destroy() ;
-~WNT_PixMap()
-{
-  Destroy();
-}
-  
-//! Dumps the Bitmap to an image file with <br>
-//! an optional gamma correction value <br>
-//! and returns TRUE if the dump occurs normaly. <br>
-  Standard_EXPORT   virtual  Standard_Boolean Dump(const Standard_CString aFilename,const Standard_Real aGammaValue = 1.0) const;
-  
-//! Returns the pixel color. <br>
-  Standard_EXPORT   virtual  Quantity_Color PixelColor(const Standard_Integer theX,const Standard_Integer theY) const;
-  //! Returns the ID of the just created bitmap <br>
-  Standard_EXPORT   virtual  Aspect_Handle PixmapID() const;
-
-
-
-  DEFINE_STANDARD_RTTI(WNT_PixMap)
-
-protected:
-
-
-Aspect_Handle myDC;
-Aspect_Handle myBitmap;
-
-
-private: 
-
-  
-  Standard_EXPORT     Standard_Integer PreferedDepth(const Handle(Aspect_Window)& aWindow,const Standard_Integer aDepth) const;
-
-Handle_Aspect_Window myWND;
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-
-
-#endif
diff --git a/inc/WNT_SequenceOfImage.hxx b/inc/WNT_SequenceOfImage.hxx
index 73752ab..2cdf246 100644
--- a/inc/WNT_SequenceOfImage.hxx
+++ b/inc/WNT_SequenceOfImage.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class WNT_SequenceNodeOfSequenceOfImage;
 class WNT_SequenceOfImage  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       WNT_SequenceOfImage();
diff --git a/inc/WNT_Window.hxx b/inc/WNT_Window.hxx
index ada11cf..972c4a2 100644
--- a/inc/WNT_Window.hxx
+++ b/inc/WNT_Window.hxx
@@ -73,8 +73,8 @@
 #ifndef _Standard_Real_HeaderFile
 #include <Standard_Real.hxx>
 #endif
-#ifndef _Handle_Aspect_PixMap_HeaderFile
-#include <Handle_Aspect_PixMap.hxx>
+#ifndef _Image_PixMap_HeaderFile
+#include <Image_PixMap.hxx>
 #endif
 #ifndef _Quantity_Ratio_HeaderFile
 #include <Quantity_Ratio.hxx>
@@ -86,12 +86,10 @@ class Aspect_WindowDefinitionError;
 class Aspect_WindowError;
 class WNT_WDriver;
 class WNT_IconBox;
-class WNT_PixMap;
 class WNT_GraphicDevice;
 class Aspect_Background;
 class Quantity_Color;
 class Aspect_GradientBackground;
-class Aspect_PixMap;
 
 
 //! This class defines Windows NT window <br>
@@ -211,7 +209,7 @@ public:
 //!	    or the area is out of the Window. <br>
   Standard_EXPORT   virtual  Standard_Boolean DumpArea(const Standard_CString aFilename,const Standard_Integer Xc,const Standard_Integer Yc,const Standard_Integer Width,const Standard_Integer Height,const Standard_Real aGammaValue = 1.0) const;
   //! dump the full contents of the window to a pixmap. <br>
-  Standard_EXPORT   virtual  Handle_Aspect_PixMap ToPixMap() const;
+  Standard_EXPORT   virtual  Standard_Boolean ToPixMap(Image_PixMap& theImage) const;
   //! Loads the XWD file to this Window. <br>
 //!          Returns TRUE if the loading occurs normaly. <br>
 //!  Warning: Note that the Window is enlarged automatically <br>
@@ -286,7 +284,6 @@ public:
 
 friend class WNT_WDriver;
 friend class WNT_IconBox;
-friend class WNT_PixMap;
 
 
   DEFINE_STANDARD_RTTI(WNT_Window)
diff --git a/inc/XBRepMesh.hxx b/inc/XBRepMesh.hxx
index aac1b7b..9a7ef9d 100644
--- a/inc/XBRepMesh.hxx
+++ b/inc/XBRepMesh.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class TopoDS_Shape;
 class XBRepMesh  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer Discret(const TopoDS_Shape& theShape,const Standard_Real theDeflection,const Standard_Real theAngle,BRepMesh_PDiscretRoot& theAlgo) ;
diff --git a/inc/XCAFDoc.hxx b/inc/XCAFDoc.hxx
index 2bf8199..4fa237c 100644
--- a/inc/XCAFDoc.hxx
+++ b/inc/XCAFDoc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class XCAFDoc_DataMapIteratorOfDataMapOfShapeLabel;
 class XCAFDoc  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns GUID for UAttribute identifying assembly <br>
   Standard_EXPORT   static  Standard_GUID AssemblyGUID() ;
diff --git a/inc/XCAFDoc_DataMapIteratorOfDataMapOfShapeLabel.hxx b/inc/XCAFDoc_DataMapIteratorOfDataMapOfShapeLabel.hxx
index 5081532..3e90c9b 100644
--- a/inc/XCAFDoc_DataMapIteratorOfDataMapOfShapeLabel.hxx
+++ b/inc/XCAFDoc_DataMapIteratorOfDataMapOfShapeLabel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class XCAFDoc_DataMapNodeOfDataMapOfShapeLabel;
 class XCAFDoc_DataMapIteratorOfDataMapOfShapeLabel  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XCAFDoc_DataMapIteratorOfDataMapOfShapeLabel();
diff --git a/inc/XCAFDoc_DataMapOfShapeLabel.hxx b/inc/XCAFDoc_DataMapOfShapeLabel.hxx
index 039a67a..9268ca6 100644
--- a/inc/XCAFDoc_DataMapOfShapeLabel.hxx
+++ b/inc/XCAFDoc_DataMapOfShapeLabel.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class XCAFDoc_DataMapIteratorOfDataMapOfShapeLabel;
 class XCAFDoc_DataMapOfShapeLabel  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XCAFDoc_DataMapOfShapeLabel(const Standard_Integer NbBuckets = 1);
diff --git a/inc/XCAFDoc_GraphNodeSequence.hxx b/inc/XCAFDoc_GraphNodeSequence.hxx
index 5590979..6f013be 100644
--- a/inc/XCAFDoc_GraphNodeSequence.hxx
+++ b/inc/XCAFDoc_GraphNodeSequence.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class XCAFDoc_SequenceNodeOfGraphNodeSequence;
 class XCAFDoc_GraphNodeSequence  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       XCAFDoc_GraphNodeSequence();
diff --git a/inc/XCAFDoc_ShapeTool.hxx b/inc/XCAFDoc_ShapeTool.hxx
index c15d17d..f0cf828 100644
--- a/inc/XCAFDoc_ShapeTool.hxx
+++ b/inc/XCAFDoc_ShapeTool.hxx
@@ -198,9 +198,11 @@ public:
 //!          in assmebly by located components to avoid some problems. <br>
   Standard_EXPORT     TDF_Label AddShape(const TopoDS_Shape& S,const Standard_Boolean makeAssembly = Standard_True,const Standard_Boolean makePrepare = Standard_True) ;
   //! Removes shape (whole label and all its sublabels) <br>
+//!          If removeCompletely is true, removes complete shape <br>
+//!          If removeCompletely is false, removes instance(location) only <br>
 //!          Returns False (and does nothing) if shape is not free <br>
 //!          or is not top-level shape <br>
-  Standard_EXPORT     Standard_Boolean RemoveShape(const TDF_Label& L) const;
+  Standard_EXPORT     Standard_Boolean RemoveShape(const TDF_Label& L,const Standard_Boolean removeCompletely = Standard_True) const;
   //! set hasComponents into false <br>
   Standard_EXPORT     void Init() ;
   //! recursive <br>
diff --git a/inc/XCAFDrivers.hxx b/inc/XCAFDrivers.hxx
index dcd5c9d..3b5fe77 100644
--- a/inc/XCAFDrivers.hxx
+++ b/inc/XCAFDrivers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class XCAFDrivers_DocumentStorageDriver;
 class XCAFDrivers  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Depending from the  ID, returns a list of  storage <br>
 //!          or retrieval attribute drivers. Used for plugin. <br>
diff --git a/inc/XCAFPrs.hxx b/inc/XCAFPrs.hxx
index 929f268..61f4006 100644
--- a/inc/XCAFPrs.hxx
+++ b/inc/XCAFPrs.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class XCAFPrs_DataMapIteratorOfDataMapOfStyleTransient;
 class XCAFPrs  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Collect styles defined for shape on label L <br>
 //!          and its components and subshapes and fills a map of <br>
diff --git a/inc/XCAFPrs_DataMapIteratorOfDataMapOfShapeStyle.hxx b/inc/XCAFPrs_DataMapIteratorOfDataMapOfShapeStyle.hxx
index c21fcb0..67bb320 100644
--- a/inc/XCAFPrs_DataMapIteratorOfDataMapOfShapeStyle.hxx
+++ b/inc/XCAFPrs_DataMapIteratorOfDataMapOfShapeStyle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class XCAFPrs_DataMapNodeOfDataMapOfShapeStyle;
 class XCAFPrs_DataMapIteratorOfDataMapOfShapeStyle  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XCAFPrs_DataMapIteratorOfDataMapOfShapeStyle();
diff --git a/inc/XCAFPrs_DataMapIteratorOfDataMapOfStyleShape.hxx b/inc/XCAFPrs_DataMapIteratorOfDataMapOfStyleShape.hxx
index 2873013..75e3082 100644
--- a/inc/XCAFPrs_DataMapIteratorOfDataMapOfStyleShape.hxx
+++ b/inc/XCAFPrs_DataMapIteratorOfDataMapOfStyleShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class XCAFPrs_DataMapNodeOfDataMapOfStyleShape;
 class XCAFPrs_DataMapIteratorOfDataMapOfStyleShape  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XCAFPrs_DataMapIteratorOfDataMapOfStyleShape();
diff --git a/inc/XCAFPrs_DataMapIteratorOfDataMapOfStyleTransient.hxx b/inc/XCAFPrs_DataMapIteratorOfDataMapOfStyleTransient.hxx
index 8a19fff..aa536c9 100644
--- a/inc/XCAFPrs_DataMapIteratorOfDataMapOfStyleTransient.hxx
+++ b/inc/XCAFPrs_DataMapIteratorOfDataMapOfStyleTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class XCAFPrs_DataMapNodeOfDataMapOfStyleTransient;
 class XCAFPrs_DataMapIteratorOfDataMapOfStyleTransient  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XCAFPrs_DataMapIteratorOfDataMapOfStyleTransient();
diff --git a/inc/XCAFPrs_DataMapOfShapeStyle.hxx b/inc/XCAFPrs_DataMapOfShapeStyle.hxx
index fc6c177..3ca4a96 100644
--- a/inc/XCAFPrs_DataMapOfShapeStyle.hxx
+++ b/inc/XCAFPrs_DataMapOfShapeStyle.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -41,18 +44,7 @@ class XCAFPrs_DataMapIteratorOfDataMapOfShapeStyle;
 class XCAFPrs_DataMapOfShapeStyle  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XCAFPrs_DataMapOfShapeStyle(const Standard_Integer NbBuckets = 1);
diff --git a/inc/XCAFPrs_DataMapOfStyleShape.hxx b/inc/XCAFPrs_DataMapOfStyleShape.hxx
index 483b202..5e32fc4 100644
--- a/inc/XCAFPrs_DataMapOfStyleShape.hxx
+++ b/inc/XCAFPrs_DataMapOfStyleShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class XCAFPrs_DataMapIteratorOfDataMapOfStyleShape;
 class XCAFPrs_DataMapOfStyleShape  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XCAFPrs_DataMapOfStyleShape(const Standard_Integer NbBuckets = 1);
diff --git a/inc/XCAFPrs_DataMapOfStyleTransient.hxx b/inc/XCAFPrs_DataMapOfStyleTransient.hxx
index 42fd4fc..96494d4 100644
--- a/inc/XCAFPrs_DataMapOfStyleTransient.hxx
+++ b/inc/XCAFPrs_DataMapOfStyleTransient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class XCAFPrs_DataMapIteratorOfDataMapOfStyleTransient;
 class XCAFPrs_DataMapOfStyleTransient  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XCAFPrs_DataMapOfStyleTransient(const Standard_Integer NbBuckets = 1);
diff --git a/inc/XCAFPrs_Style.hxx b/inc/XCAFPrs_Style.hxx
index 4839f92..f2abc76 100644
--- a/inc/XCAFPrs_Style.hxx
+++ b/inc/XCAFPrs_Style.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class Quantity_Color;
 class XCAFPrs_Style  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XCAFPrs_Style();
diff --git a/inc/XCAFSchema.hxx b/inc/XCAFSchema.hxx
index 3695cbc..64981fa 100644
--- a/inc/XCAFSchema.hxx
+++ b/inc/XCAFSchema.hxx
@@ -58,10 +58,26 @@ class gp_Pnt2d;
 class gp_Vec2d;
 class gp_XY;
 class gp_Dir2d;
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Schema)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_HeaderFile
 #define _XCAFSchema_HeaderFile
diff --git a/inc/XCAFSchema_DBC_VArrayOfCharacter.hxx b/inc/XCAFSchema_DBC_VArrayOfCharacter.hxx
index 107f908..1f2710e 100644
--- a/inc/XCAFSchema_DBC_VArrayOfCharacter.hxx
+++ b/inc/XCAFSchema_DBC_VArrayOfCharacter.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_DBC_VArrayOfCharacter_HeaderFile
 #define _XCAFSchema_DBC_VArrayOfCharacter_HeaderFile
diff --git a/inc/XCAFSchema_DBC_VArrayOfExtCharacter.hxx b/inc/XCAFSchema_DBC_VArrayOfExtCharacter.hxx
index d616a39..3809d94 100644
--- a/inc/XCAFSchema_DBC_VArrayOfExtCharacter.hxx
+++ b/inc/XCAFSchema_DBC_VArrayOfExtCharacter.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_DBC_VArrayOfExtCharacter_HeaderFile
 #define _XCAFSchema_DBC_VArrayOfExtCharacter_HeaderFile
diff --git a/inc/XCAFSchema_PColStd_FieldOfHArray1OfReal.hxx b/inc/XCAFSchema_PColStd_FieldOfHArray1OfReal.hxx
index e1ff7da..da76fb5 100644
--- a/inc/XCAFSchema_PColStd_FieldOfHArray1OfReal.hxx
+++ b/inc/XCAFSchema_PColStd_FieldOfHArray1OfReal.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PColStd_FieldOfHArray1OfReal_HeaderFile
 #define _XCAFSchema_PColStd_FieldOfHArray1OfReal_HeaderFile
diff --git a/inc/XCAFSchema_PColStd_HArray1OfReal.hxx b/inc/XCAFSchema_PColStd_HArray1OfReal.hxx
index 12537ac..47bf761 100644
--- a/inc/XCAFSchema_PColStd_HArray1OfReal.hxx
+++ b/inc/XCAFSchema_PColStd_HArray1OfReal.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PColStd_HArray1OfReal_HeaderFile
 #define _XCAFSchema_PColStd_HArray1OfReal_HeaderFile
diff --git a/inc/XCAFSchema_PCollection_HAsciiString.hxx b/inc/XCAFSchema_PCollection_HAsciiString.hxx
index 9c5ca0f..407fc82 100644
--- a/inc/XCAFSchema_PCollection_HAsciiString.hxx
+++ b/inc/XCAFSchema_PCollection_HAsciiString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PCollection_HAsciiString_HeaderFile
 #define _XCAFSchema_PCollection_HAsciiString_HeaderFile
diff --git a/inc/XCAFSchema_PCollection_HExtendedString.hxx b/inc/XCAFSchema_PCollection_HExtendedString.hxx
index c2516c4..799322a 100644
--- a/inc/XCAFSchema_PCollection_HExtendedString.hxx
+++ b/inc/XCAFSchema_PCollection_HExtendedString.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PCollection_HExtendedString_HeaderFile
 #define _XCAFSchema_PCollection_HExtendedString_HeaderFile
diff --git a/inc/XCAFSchema_PDF_Attribute.hxx b/inc/XCAFSchema_PDF_Attribute.hxx
index 1c08c11..a65207a 100644
--- a/inc/XCAFSchema_PDF_Attribute.hxx
+++ b/inc/XCAFSchema_PDF_Attribute.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PDF_Attribute_HeaderFile
 #define _XCAFSchema_PDF_Attribute_HeaderFile
diff --git a/inc/XCAFSchema_PMMgt_PManaged.hxx b/inc/XCAFSchema_PMMgt_PManaged.hxx
index 5d995c0..26ae90a 100644
--- a/inc/XCAFSchema_PMMgt_PManaged.hxx
+++ b/inc/XCAFSchema_PMMgt_PManaged.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PMMgt_PManaged_HeaderFile
 #define _XCAFSchema_PMMgt_PManaged_HeaderFile
diff --git a/inc/XCAFSchema_PTopLoc_Datum3D.hxx b/inc/XCAFSchema_PTopLoc_Datum3D.hxx
index 34e58c4..c17b859 100644
--- a/inc/XCAFSchema_PTopLoc_Datum3D.hxx
+++ b/inc/XCAFSchema_PTopLoc_Datum3D.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PTopLoc_Datum3D_HeaderFile
 #define _XCAFSchema_PTopLoc_Datum3D_HeaderFile
diff --git a/inc/XCAFSchema_PTopLoc_ItemLocation.hxx b/inc/XCAFSchema_PTopLoc_ItemLocation.hxx
index e543ab5..277c973 100644
--- a/inc/XCAFSchema_PTopLoc_ItemLocation.hxx
+++ b/inc/XCAFSchema_PTopLoc_ItemLocation.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PTopLoc_ItemLocation_HeaderFile
 #define _XCAFSchema_PTopLoc_ItemLocation_HeaderFile
diff --git a/inc/XCAFSchema_PTopLoc_Location.hxx b/inc/XCAFSchema_PTopLoc_Location.hxx
index 755552d..8fb329d 100644
--- a/inc/XCAFSchema_PTopLoc_Location.hxx
+++ b/inc/XCAFSchema_PTopLoc_Location.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PTopLoc_Location_HeaderFile
 #define _XCAFSchema_PTopLoc_Location_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_Area.hxx b/inc/XCAFSchema_PXCAFDoc_Area.hxx
index 5122e50..8e67f14 100644
--- a/inc/XCAFSchema_PXCAFDoc_Area.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_Area.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_Area_HeaderFile
 #define _XCAFSchema_PXCAFDoc_Area_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_Centroid.hxx b/inc/XCAFSchema_PXCAFDoc_Centroid.hxx
index a26e88d..25c1281 100644
--- a/inc/XCAFSchema_PXCAFDoc_Centroid.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_Centroid.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_Centroid_HeaderFile
 #define _XCAFSchema_PXCAFDoc_Centroid_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_Color.hxx b/inc/XCAFSchema_PXCAFDoc_Color.hxx
index 2d7a634..5bba0da 100644
--- a/inc/XCAFSchema_PXCAFDoc_Color.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_Color.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_Color_HeaderFile
 #define _XCAFSchema_PXCAFDoc_Color_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_ColorTool.hxx b/inc/XCAFSchema_PXCAFDoc_ColorTool.hxx
index 46a37e1..6193c47 100644
--- a/inc/XCAFSchema_PXCAFDoc_ColorTool.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_ColorTool.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_ColorTool_HeaderFile
 #define _XCAFSchema_PXCAFDoc_ColorTool_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_Datum.hxx b/inc/XCAFSchema_PXCAFDoc_Datum.hxx
index 4e8441e..125b643 100644
--- a/inc/XCAFSchema_PXCAFDoc_Datum.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_Datum.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_Datum_HeaderFile
 #define _XCAFSchema_PXCAFDoc_Datum_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_DimTol.hxx b/inc/XCAFSchema_PXCAFDoc_DimTol.hxx
index 8b9ed9b..70c6771 100644
--- a/inc/XCAFSchema_PXCAFDoc_DimTol.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_DimTol.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_DimTol_HeaderFile
 #define _XCAFSchema_PXCAFDoc_DimTol_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_DimTolTool.hxx b/inc/XCAFSchema_PXCAFDoc_DimTolTool.hxx
index da10eba..cc7ae3e 100644
--- a/inc/XCAFSchema_PXCAFDoc_DimTolTool.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_DimTolTool.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_DimTolTool_HeaderFile
 #define _XCAFSchema_PXCAFDoc_DimTolTool_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_DocumentTool.hxx b/inc/XCAFSchema_PXCAFDoc_DocumentTool.hxx
index b943a77..a511e9f 100644
--- a/inc/XCAFSchema_PXCAFDoc_DocumentTool.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_DocumentTool.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_DocumentTool_HeaderFile
 #define _XCAFSchema_PXCAFDoc_DocumentTool_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_GraphNode.hxx b/inc/XCAFSchema_PXCAFDoc_GraphNode.hxx
index 8534e96..bcf7a57 100644
--- a/inc/XCAFSchema_PXCAFDoc_GraphNode.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_GraphNode.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_GraphNode_HeaderFile
 #define _XCAFSchema_PXCAFDoc_GraphNode_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_GraphNodeSequence.hxx b/inc/XCAFSchema_PXCAFDoc_GraphNodeSequence.hxx
index 85d96f3..29b16b3 100644
--- a/inc/XCAFSchema_PXCAFDoc_GraphNodeSequence.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_GraphNodeSequence.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_GraphNodeSequence_HeaderFile
 #define _XCAFSchema_PXCAFDoc_GraphNodeSequence_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_LayerTool.hxx b/inc/XCAFSchema_PXCAFDoc_LayerTool.hxx
index 4cbaea8..d9e89f6 100644
--- a/inc/XCAFSchema_PXCAFDoc_LayerTool.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_LayerTool.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_LayerTool_HeaderFile
 #define _XCAFSchema_PXCAFDoc_LayerTool_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_Location.hxx b/inc/XCAFSchema_PXCAFDoc_Location.hxx
index e169fe3..bf1fb01 100644
--- a/inc/XCAFSchema_PXCAFDoc_Location.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_Location.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_Location_HeaderFile
 #define _XCAFSchema_PXCAFDoc_Location_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_Material.hxx b/inc/XCAFSchema_PXCAFDoc_Material.hxx
index d05153f..6a1dc18 100644
--- a/inc/XCAFSchema_PXCAFDoc_Material.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_Material.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_Material_HeaderFile
 #define _XCAFSchema_PXCAFDoc_Material_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_MaterialTool.hxx b/inc/XCAFSchema_PXCAFDoc_MaterialTool.hxx
index c43c460..a585378 100644
--- a/inc/XCAFSchema_PXCAFDoc_MaterialTool.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_MaterialTool.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_MaterialTool_HeaderFile
 #define _XCAFSchema_PXCAFDoc_MaterialTool_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_SeqNodeOfGraphNodeSequence.hxx b/inc/XCAFSchema_PXCAFDoc_SeqNodeOfGraphNodeSequence.hxx
index f5a8409..dd7b0fa 100644
--- a/inc/XCAFSchema_PXCAFDoc_SeqNodeOfGraphNodeSequence.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_SeqNodeOfGraphNodeSequence.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_SeqNodeOfGraphNodeSequence_HeaderFile
 #define _XCAFSchema_PXCAFDoc_SeqNodeOfGraphNodeSequence_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_ShapeTool.hxx b/inc/XCAFSchema_PXCAFDoc_ShapeTool.hxx
index 016e337..0bf4861 100644
--- a/inc/XCAFSchema_PXCAFDoc_ShapeTool.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_ShapeTool.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_ShapeTool_HeaderFile
 #define _XCAFSchema_PXCAFDoc_ShapeTool_HeaderFile
diff --git a/inc/XCAFSchema_PXCAFDoc_Volume.hxx b/inc/XCAFSchema_PXCAFDoc_Volume.hxx
index 5241da3..f03d0d2 100644
--- a/inc/XCAFSchema_PXCAFDoc_Volume.hxx
+++ b/inc/XCAFSchema_PXCAFDoc_Volume.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_PXCAFDoc_Volume_HeaderFile
 #define _XCAFSchema_PXCAFDoc_Volume_HeaderFile
diff --git a/inc/XCAFSchema_Quantity_Color.hxx b/inc/XCAFSchema_Quantity_Color.hxx
index 4343bca..fb6cade 100644
--- a/inc/XCAFSchema_Quantity_Color.hxx
+++ b/inc/XCAFSchema_Quantity_Color.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_Quantity_Color_HeaderFile
 #define _XCAFSchema_Quantity_Color_HeaderFile
diff --git a/inc/XCAFSchema_Standard_GUID.hxx b/inc/XCAFSchema_Standard_GUID.hxx
index 3b2633b..d33d093 100644
--- a/inc/XCAFSchema_Standard_GUID.hxx
+++ b/inc/XCAFSchema_Standard_GUID.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_Standard_GUID_HeaderFile
 #define _XCAFSchema_Standard_GUID_HeaderFile
diff --git a/inc/XCAFSchema_Standard_Persistent.hxx b/inc/XCAFSchema_Standard_Persistent.hxx
index d3118e7..4abccec 100644
--- a/inc/XCAFSchema_Standard_Persistent.hxx
+++ b/inc/XCAFSchema_Standard_Persistent.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_Standard_Persistent_HeaderFile
 #define _XCAFSchema_Standard_Persistent_HeaderFile
diff --git a/inc/XCAFSchema_Standard_Storable.hxx b/inc/XCAFSchema_Standard_Storable.hxx
index 286174c..e4805ee 100644
--- a/inc/XCAFSchema_Standard_Storable.hxx
+++ b/inc/XCAFSchema_Standard_Storable.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_Standard_Storable_HeaderFile
 #define _XCAFSchema_Standard_Storable_HeaderFile
diff --git a/inc/XCAFSchema_gp_Ax1.hxx b/inc/XCAFSchema_gp_Ax1.hxx
index 0b1b5b0..842efc0 100644
--- a/inc/XCAFSchema_gp_Ax1.hxx
+++ b/inc/XCAFSchema_gp_Ax1.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Ax1_HeaderFile
 #define _XCAFSchema_gp_Ax1_HeaderFile
diff --git a/inc/XCAFSchema_gp_Ax2.hxx b/inc/XCAFSchema_gp_Ax2.hxx
index 5c95f06..3dba304 100644
--- a/inc/XCAFSchema_gp_Ax2.hxx
+++ b/inc/XCAFSchema_gp_Ax2.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Ax2_HeaderFile
 #define _XCAFSchema_gp_Ax2_HeaderFile
diff --git a/inc/XCAFSchema_gp_Ax2d.hxx b/inc/XCAFSchema_gp_Ax2d.hxx
index db27933..df45c1b 100644
--- a/inc/XCAFSchema_gp_Ax2d.hxx
+++ b/inc/XCAFSchema_gp_Ax2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Ax2d_HeaderFile
 #define _XCAFSchema_gp_Ax2d_HeaderFile
diff --git a/inc/XCAFSchema_gp_Ax3.hxx b/inc/XCAFSchema_gp_Ax3.hxx
index 83b88b1..06d111d 100644
--- a/inc/XCAFSchema_gp_Ax3.hxx
+++ b/inc/XCAFSchema_gp_Ax3.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Ax3_HeaderFile
 #define _XCAFSchema_gp_Ax3_HeaderFile
diff --git a/inc/XCAFSchema_gp_Dir.hxx b/inc/XCAFSchema_gp_Dir.hxx
index 2b4f78f..13850f8 100644
--- a/inc/XCAFSchema_gp_Dir.hxx
+++ b/inc/XCAFSchema_gp_Dir.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Dir_HeaderFile
 #define _XCAFSchema_gp_Dir_HeaderFile
diff --git a/inc/XCAFSchema_gp_Dir2d.hxx b/inc/XCAFSchema_gp_Dir2d.hxx
index 8cb07a3..86a17e9 100644
--- a/inc/XCAFSchema_gp_Dir2d.hxx
+++ b/inc/XCAFSchema_gp_Dir2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Dir2d_HeaderFile
 #define _XCAFSchema_gp_Dir2d_HeaderFile
diff --git a/inc/XCAFSchema_gp_Mat.hxx b/inc/XCAFSchema_gp_Mat.hxx
index 214bef4..a60f4f8 100644
--- a/inc/XCAFSchema_gp_Mat.hxx
+++ b/inc/XCAFSchema_gp_Mat.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Mat_HeaderFile
 #define _XCAFSchema_gp_Mat_HeaderFile
diff --git a/inc/XCAFSchema_gp_Mat2d.hxx b/inc/XCAFSchema_gp_Mat2d.hxx
index bfb96e1..9425000 100644
--- a/inc/XCAFSchema_gp_Mat2d.hxx
+++ b/inc/XCAFSchema_gp_Mat2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Mat2d_HeaderFile
 #define _XCAFSchema_gp_Mat2d_HeaderFile
diff --git a/inc/XCAFSchema_gp_Pnt.hxx b/inc/XCAFSchema_gp_Pnt.hxx
index 503782b..f488380 100644
--- a/inc/XCAFSchema_gp_Pnt.hxx
+++ b/inc/XCAFSchema_gp_Pnt.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Pnt_HeaderFile
 #define _XCAFSchema_gp_Pnt_HeaderFile
diff --git a/inc/XCAFSchema_gp_Pnt2d.hxx b/inc/XCAFSchema_gp_Pnt2d.hxx
index 4660869..523370b 100644
--- a/inc/XCAFSchema_gp_Pnt2d.hxx
+++ b/inc/XCAFSchema_gp_Pnt2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Pnt2d_HeaderFile
 #define _XCAFSchema_gp_Pnt2d_HeaderFile
diff --git a/inc/XCAFSchema_gp_Trsf.hxx b/inc/XCAFSchema_gp_Trsf.hxx
index 1126b63..a6063a2 100644
--- a/inc/XCAFSchema_gp_Trsf.hxx
+++ b/inc/XCAFSchema_gp_Trsf.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Trsf_HeaderFile
 #define _XCAFSchema_gp_Trsf_HeaderFile
diff --git a/inc/XCAFSchema_gp_Trsf2d.hxx b/inc/XCAFSchema_gp_Trsf2d.hxx
index 17cc33e..a70f2f3 100644
--- a/inc/XCAFSchema_gp_Trsf2d.hxx
+++ b/inc/XCAFSchema_gp_Trsf2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Trsf2d_HeaderFile
 #define _XCAFSchema_gp_Trsf2d_HeaderFile
diff --git a/inc/XCAFSchema_gp_Vec.hxx b/inc/XCAFSchema_gp_Vec.hxx
index 3756282..9e5537e 100644
--- a/inc/XCAFSchema_gp_Vec.hxx
+++ b/inc/XCAFSchema_gp_Vec.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Vec_HeaderFile
 #define _XCAFSchema_gp_Vec_HeaderFile
diff --git a/inc/XCAFSchema_gp_Vec2d.hxx b/inc/XCAFSchema_gp_Vec2d.hxx
index 13b97f3..9915231 100644
--- a/inc/XCAFSchema_gp_Vec2d.hxx
+++ b/inc/XCAFSchema_gp_Vec2d.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_Vec2d_HeaderFile
 #define _XCAFSchema_gp_Vec2d_HeaderFile
diff --git a/inc/XCAFSchema_gp_XY.hxx b/inc/XCAFSchema_gp_XY.hxx
index 2eb6139..367d0bc 100644
--- a/inc/XCAFSchema_gp_XY.hxx
+++ b/inc/XCAFSchema_gp_XY.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_XY_HeaderFile
 #define _XCAFSchema_gp_XY_HeaderFile
diff --git a/inc/XCAFSchema_gp_XYZ.hxx b/inc/XCAFSchema_gp_XYZ.hxx
index fa34ab5..ae03895 100644
--- a/inc/XCAFSchema_gp_XYZ.hxx
+++ b/inc/XCAFSchema_gp_XYZ.hxx
@@ -1,7 +1,23 @@
-// This file is generated by WOK (CSFDBSchema).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
+// File generated by Schema (Storable CallBack)
+//
+//                     Copyright (C) 1991 - 2000 by  
+//                      Matra Datavision SA.  All rights reserved.
+//  
+//                     Copyright (C) 2001 - 2004 by
+//                     Open CASCADE SA.  All rights reserved.
+// 
+// This file is part of the Open CASCADE Technology software.
+//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//  
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
 
 #ifndef _XCAFSchema_gp_XYZ_HeaderFile
 #define _XCAFSchema_gp_XYZ_HeaderFile
diff --git a/inc/XDEDRAW.hxx b/inc/XDEDRAW.hxx
index 293fe5a..51f9c5a 100644
--- a/inc/XDEDRAW.hxx
+++ b/inc/XDEDRAW.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class XDEDRAW_Common;
 class XDEDRAW  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Initializes all the functions <br>
   Standard_EXPORT   static  void Init(Draw_Interpretor& di) ;
diff --git a/inc/XDEDRAW_Colors.hxx b/inc/XDEDRAW_Colors.hxx
index c3570bc..172493c 100644
--- a/inc/XDEDRAW_Colors.hxx
+++ b/inc/XDEDRAW_Colors.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -20,18 +23,7 @@ class Draw_Interpretor;
 class XDEDRAW_Colors  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/XDEDRAW_Common.hxx b/inc/XDEDRAW_Common.hxx
index a3305e5..071d8c7 100644
--- a/inc/XDEDRAW_Common.hxx
+++ b/inc/XDEDRAW_Common.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -20,18 +23,7 @@ class Draw_Interpretor;
 class XDEDRAW_Common  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/XDEDRAW_Layers.hxx b/inc/XDEDRAW_Layers.hxx
index d9b1fc4..75cdbd6 100644
--- a/inc/XDEDRAW_Layers.hxx
+++ b/inc/XDEDRAW_Layers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -20,18 +23,7 @@ class Draw_Interpretor;
 class XDEDRAW_Layers  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/XDEDRAW_Props.hxx b/inc/XDEDRAW_Props.hxx
index 72344a7..933382c 100644
--- a/inc/XDEDRAW_Props.hxx
+++ b/inc/XDEDRAW_Props.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -21,18 +24,7 @@ class Draw_Interpretor;
 class XDEDRAW_Props  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/XDEDRAW_Shapes.hxx b/inc/XDEDRAW_Shapes.hxx
index 66a3640..259aabf 100644
--- a/inc/XDEDRAW_Shapes.hxx
+++ b/inc/XDEDRAW_Shapes.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -20,18 +23,7 @@ class Draw_Interpretor;
 class XDEDRAW_Shapes  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/XSAlgo.hxx b/inc/XSAlgo.hxx
index f7e9795..bbabd55 100644
--- a/inc/XSAlgo.hxx
+++ b/inc/XSAlgo.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -25,18 +28,7 @@ class XSAlgo_AlgoContainer;
 class XSAlgo  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Provides initerface to the algorithms from Shape Healing <br>
 //!          and others for XSTEP processors. <br>//! Creates and initializes default AlgoContainer. <br>
diff --git a/inc/XSControl.hxx b/inc/XSControl.hxx
index e5f8fb1..a572508 100644
--- a/inc/XSControl.hxx
+++ b/inc/XSControl.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class XSControl_Vars;
 class XSControl  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the WorkSession of a SessionPilot, but casts it as <br>
 //!           from XSControl : it then gives access to Control & Transfers <br>
diff --git a/inc/XSControl_FuncShape.hxx b/inc/XSControl_FuncShape.hxx
index 82bb4a1..03914cf 100644
--- a/inc/XSControl_FuncShape.hxx
+++ b/inc/XSControl_FuncShape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class TCollection_AsciiString;
 class XSControl_FuncShape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines and loads all functions which work on shapes for XSControl (as ActFunc) <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/XSControl_Functions.hxx b/inc/XSControl_Functions.hxx
index 2c567a9..a21b880 100644
--- a/inc/XSControl_Functions.hxx
+++ b/inc/XSControl_Functions.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@
 class XSControl_Functions  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines and loads all functions for XSControl (as ActFunc) <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/XSControl_Reader.hxx b/inc/XSControl_Reader.hxx
index 1ae82ca..8611cf0 100644
--- a/inc/XSControl_Reader.hxx
+++ b/inc/XSControl_Reader.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -89,18 +92,7 @@ class TopoDS_Shape;
 class XSControl_Reader  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Reader from scratch (creates an empty WorkSession) <br>
 //!           A WorkSession or a Controller must be provided before running <br>
diff --git a/inc/XSControl_Utils.hxx b/inc/XSControl_Utils.hxx
index a577dc6..ea338f7 100644
--- a/inc/XSControl_Utils.hxx
+++ b/inc/XSControl_Utils.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -84,18 +87,7 @@ class TColStd_HSequenceOfInteger;
 class XSControl_Utils  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! the only use of this, is to allow a frontal to get one <br>
 //!           distinct "Utils" set per separate engine <br>
diff --git a/inc/XSControl_Writer.hxx b/inc/XSControl_Writer.hxx
index 809fe2e..05850e5 100644
--- a/inc/XSControl_Writer.hxx
+++ b/inc/XSControl_Writer.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class TopoDS_Shape;
 class XSControl_Writer  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Writer from scratch <br>
   Standard_EXPORT   XSControl_Writer();
diff --git a/inc/XSDRAW.hxx b/inc/XSDRAW.hxx
index fb89068..5ff3361 100644
--- a/inc/XSDRAW.hxx
+++ b/inc/XSDRAW.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -82,18 +85,7 @@ class XSDRAW_Vars;
 class XSDRAW  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Changes the name under which a command of xstep is known by <br>
 //!           Draw. This allows to avoid collisions <br>
diff --git a/inc/XSDRAWIGES.hxx b/inc/XSDRAWIGES.hxx
index 1974e48..000a25c 100644
--- a/inc/XSDRAWIGES.hxx
+++ b/inc/XSDRAWIGES.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -20,18 +23,7 @@ class Draw_Interpretor;
 class XSDRAWIGES  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Inits IGESSelect commands, for DRAW <br>
   Standard_EXPORT   static  void InitSelect() ;
diff --git a/inc/XSDRAWSTEP.hxx b/inc/XSDRAWSTEP.hxx
index 4f12abe..f1c3f50 100644
--- a/inc/XSDRAWSTEP.hxx
+++ b/inc/XSDRAWSTEP.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -20,18 +23,7 @@ class Draw_Interpretor;
 class XSDRAWSTEP  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/XSDRAWSTLVRML.hxx b/inc/XSDRAWSTLVRML.hxx
index 58db1e4..116854a 100644
--- a/inc/XSDRAWSTLVRML.hxx
+++ b/inc/XSDRAWSTLVRML.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class XSDRAWSTLVRML_DataMapIteratorOfCoordsMap;
 class XSDRAWSTLVRML  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Inits commands for writing to STL and VRML formats <br>
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/XSDRAWSTLVRML_CoordsMap.hxx b/inc/XSDRAWSTLVRML_CoordsMap.hxx
index 00ab663..4065a44 100644
--- a/inc/XSDRAWSTLVRML_CoordsMap.hxx
+++ b/inc/XSDRAWSTLVRML_CoordsMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class XSDRAWSTLVRML_DataMapIteratorOfCoordsMap;
 class XSDRAWSTLVRML_CoordsMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XSDRAWSTLVRML_CoordsMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/XSDRAWSTLVRML_DataMapIteratorOfCoordsMap.hxx b/inc/XSDRAWSTLVRML_DataMapIteratorOfCoordsMap.hxx
index e88505c..b3aa00f 100644
--- a/inc/XSDRAWSTLVRML_DataMapIteratorOfCoordsMap.hxx
+++ b/inc/XSDRAWSTLVRML_DataMapIteratorOfCoordsMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class XSDRAWSTLVRML_DataMapNodeOfCoordsMap;
 class XSDRAWSTLVRML_DataMapIteratorOfCoordsMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XSDRAWSTLVRML_DataMapIteratorOfCoordsMap();
diff --git a/inc/XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap.hxx b/inc/XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap.hxx
index f19f7bc..686486a 100644
--- a/inc/XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap.hxx
+++ b/inc/XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class XSDRAWSTLVRML_DataMapNodeOfElemNodesMap;
 class XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap();
diff --git a/inc/XSDRAWSTLVRML_ElemNodesMap.hxx b/inc/XSDRAWSTLVRML_ElemNodesMap.hxx
index 6ff2045..5a1c103 100644
--- a/inc/XSDRAWSTLVRML_ElemNodesMap.hxx
+++ b/inc/XSDRAWSTLVRML_ElemNodesMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap;
 class XSDRAWSTLVRML_ElemNodesMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XSDRAWSTLVRML_ElemNodesMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/XSDRAW_Functions.hxx b/inc/XSDRAW_Functions.hxx
index 7853927..e1173ef 100644
--- a/inc/XSDRAW_Functions.hxx
+++ b/inc/XSDRAW_Functions.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class XSDRAW_Functions  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines and loads all basic functions for XSDRAW (as ActFunc) <br>
   Standard_EXPORT   static  void Init() ;
diff --git a/inc/XSDRAW_Shape.hxx b/inc/XSDRAW_Shape.hxx
index f377042..ea39e31 100644
--- a/inc/XSDRAW_Shape.hxx
+++ b/inc/XSDRAW_Shape.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -24,18 +27,7 @@ class Draw_Interpretor;
 class XSDRAW_Shape  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Defines and loads all basic functions for XSDRAW on Shapes <br>
   Standard_EXPORT   static  void InitCommands(Draw_Interpretor& theCommands) ;
diff --git a/inc/XmlDrivers.hxx b/inc/XmlDrivers.hxx
index 7e5fada..48cb103 100644
--- a/inc/XmlDrivers.hxx
+++ b/inc/XmlDrivers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class XmlDrivers_DocumentRetrievalDriver;
 class XmlDrivers  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Standard_Transient Factory(const Standard_GUID& theGUID) ;
diff --git a/inc/XmlLDrivers.hxx b/inc/XmlLDrivers.hxx
index 40d278d..298ad3a 100644
--- a/inc/XmlLDrivers.hxx
+++ b/inc/XmlLDrivers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class XmlLDrivers_SequenceNodeOfSequenceOfNamespaceDef;
 class XmlLDrivers  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Handle_Standard_Transient Factory(const Standard_GUID& theGUID) ;
diff --git a/inc/XmlLDrivers_NamespaceDef.hxx b/inc/XmlLDrivers_NamespaceDef.hxx
index db2c539..2a5e643 100644
--- a/inc/XmlLDrivers_NamespaceDef.hxx
+++ b/inc/XmlLDrivers_NamespaceDef.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@ class TCollection_AsciiString;
 class XmlLDrivers_NamespaceDef  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XmlLDrivers_NamespaceDef();
diff --git a/inc/XmlLDrivers_SequenceOfNamespaceDef.hxx b/inc/XmlLDrivers_SequenceOfNamespaceDef.hxx
index 0c9f39e..b09259b 100644
--- a/inc/XmlLDrivers_SequenceOfNamespaceDef.hxx
+++ b/inc/XmlLDrivers_SequenceOfNamespaceDef.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class XmlLDrivers_SequenceNodeOfSequenceOfNamespaceDef;
 class XmlLDrivers_SequenceOfNamespaceDef  : public TCollection_BaseSequence {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
       XmlLDrivers_SequenceOfNamespaceDef();
diff --git a/inc/XmlMDF.hxx b/inc/XmlMDF.hxx
index 036eb82..d6f5e1e 100644
--- a/inc/XmlMDF.hxx
+++ b/inc/XmlMDF.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class XmlMDF_DataMapIteratorOfTypeADriverMap;
 class XmlMDF  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Translates a transient <aSource> into a persistent <br>
 //!          <aTarget>. <br>
diff --git a/inc/XmlMDF_DataMapIteratorOfMapOfDriver.hxx b/inc/XmlMDF_DataMapIteratorOfMapOfDriver.hxx
index a1813a9..1308c08 100644
--- a/inc/XmlMDF_DataMapIteratorOfMapOfDriver.hxx
+++ b/inc/XmlMDF_DataMapIteratorOfMapOfDriver.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class XmlMDF_DataMapNodeOfMapOfDriver;
 class XmlMDF_DataMapIteratorOfMapOfDriver  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XmlMDF_DataMapIteratorOfMapOfDriver();
diff --git a/inc/XmlMDF_DataMapIteratorOfTypeADriverMap.hxx b/inc/XmlMDF_DataMapIteratorOfTypeADriverMap.hxx
index 8ec2caf..69df9ee 100644
--- a/inc/XmlMDF_DataMapIteratorOfTypeADriverMap.hxx
+++ b/inc/XmlMDF_DataMapIteratorOfTypeADriverMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class XmlMDF_DataMapNodeOfTypeADriverMap;
 class XmlMDF_DataMapIteratorOfTypeADriverMap  : public TCollection_BasicMapIterator {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XmlMDF_DataMapIteratorOfTypeADriverMap();
diff --git a/inc/XmlMDF_MapOfDriver.hxx b/inc/XmlMDF_MapOfDriver.hxx
index fe071a5..06a0851 100644
--- a/inc/XmlMDF_MapOfDriver.hxx
+++ b/inc/XmlMDF_MapOfDriver.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class XmlMDF_DataMapIteratorOfMapOfDriver;
 class XmlMDF_MapOfDriver  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XmlMDF_MapOfDriver(const Standard_Integer NbBuckets = 1);
diff --git a/inc/XmlMDF_TypeADriverMap.hxx b/inc/XmlMDF_TypeADriverMap.hxx
index 4b6cf8c..86b7095 100644
--- a/inc/XmlMDF_TypeADriverMap.hxx
+++ b/inc/XmlMDF_TypeADriverMap.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class XmlMDF_DataMapIteratorOfTypeADriverMap;
 class XmlMDF_TypeADriverMap  : public TCollection_BasicMap {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XmlMDF_TypeADriverMap(const Standard_Integer NbBuckets = 1);
diff --git a/inc/XmlMDataStd.hxx b/inc/XmlMDataStd.hxx
index f128c86..5dc05da 100644
--- a/inc/XmlMDataStd.hxx
+++ b/inc/XmlMDataStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,7 @@ class XmlMDataStd_IntPackedMapDriver;
 class XmlMDataStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute drivers to <aDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(XmlMDF_ADriverTable)& aDriverTable,const Handle(CDM_MessageDriver)& anMsgDrv) ;
diff --git a/inc/XmlMDataXtd.hxx b/inc/XmlMDataXtd.hxx
index 2d437b4..361ec48 100644
--- a/inc/XmlMDataXtd.hxx
+++ b/inc/XmlMDataXtd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class XmlMDataXtd_PatternStdDriver;
 class XmlMDataXtd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute drivers to <aDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(XmlMDF_ADriverTable)& aDriverTable,const Handle(CDM_MessageDriver)& anMsgDrv) ;
diff --git a/inc/XmlMDocStd.hxx b/inc/XmlMDocStd.hxx
index 0847c86..1c33743 100644
--- a/inc/XmlMDocStd.hxx
+++ b/inc/XmlMDocStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class XmlMDocStd_XLinkDriver;
 class XmlMDocStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute drivers to <aDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(XmlMDF_ADriverTable)& aDriverTable,const Handle(CDM_MessageDriver)& theMessageDriver) ;
diff --git a/inc/XmlMFunction.hxx b/inc/XmlMFunction.hxx
index 884840e..fcef3c3 100644
--- a/inc/XmlMFunction.hxx
+++ b/inc/XmlMFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class XmlMFunction_GraphNodeDriver;
 class XmlMFunction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute storage drivers to <aDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(XmlMDF_ADriverTable)& aDriverTable,const Handle(CDM_MessageDriver)& theMessageDriver) ;
diff --git a/inc/XmlMNaming.hxx b/inc/XmlMNaming.hxx
index 3da2a7e..aa60127 100644
--- a/inc/XmlMNaming.hxx
+++ b/inc/XmlMNaming.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class XmlMNaming_Array1OfShape1;
 class XmlMNaming  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute drivers to <aDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(XmlMDF_ADriverTable)& aDriverTable,const Handle(CDM_MessageDriver)& aMessageDriver) ;
diff --git a/inc/XmlMNaming_Array1OfShape1.hxx b/inc/XmlMNaming_Array1OfShape1.hxx
index b76817f..749f9f0 100644
--- a/inc/XmlMNaming_Array1OfShape1.hxx
+++ b/inc/XmlMNaming_Array1OfShape1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class XmlMNaming_Shape1;
 class XmlMNaming_Array1OfShape1  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XmlMNaming_Array1OfShape1(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/XmlMNaming_Shape1.hxx b/inc/XmlMNaming_Shape1.hxx
index ec720aa..eb6e69e 100644
--- a/inc/XmlMNaming_Shape1.hxx
+++ b/inc/XmlMNaming_Shape1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(XmlMNaming_Shape1);
 class XmlMNaming_Shape1  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   XmlMNaming_Shape1(XmlObjMgt_Document& Doc);
diff --git a/inc/XmlMPrsStd.hxx b/inc/XmlMPrsStd.hxx
index acc4492..eb3f24a 100644
--- a/inc/XmlMPrsStd.hxx
+++ b/inc/XmlMPrsStd.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@ class XmlMPrsStd_AISPresentationDriver;
 class XmlMPrsStd  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute storage drivers to <aDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(XmlMDF_ADriverTable)& aDriverTable,const Handle(CDM_MessageDriver)& theMessageDriver) ;
diff --git a/inc/XmlMXCAFDoc.hxx b/inc/XmlMXCAFDoc.hxx
index 381205f..a61ac16 100644
--- a/inc/XmlMXCAFDoc.hxx
+++ b/inc/XmlMXCAFDoc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class XmlMXCAFDoc_MaterialToolDriver;
 class XmlMXCAFDoc  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Adds the attribute drivers to <aDriverTable>. <br>
   Standard_EXPORT   static  void AddDrivers(const Handle(XmlMDF_ADriverTable)& aDriverTable,const Handle(CDM_MessageDriver)& anMsgDrv) ;
diff --git a/inc/XmlObjMgt.hxx b/inc/XmlObjMgt.hxx
index 0168bdd..afb8cf6 100644
--- a/inc/XmlObjMgt.hxx
+++ b/inc/XmlObjMgt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class XmlObjMgt_Array1;
 class XmlObjMgt  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Define the name of XMLattribute 'ID' (to be used everywhere) <br>
   Standard_EXPORT   static const XmlObjMgt_DOMString& IdString() ;
diff --git a/inc/XmlObjMgt_GP.hxx b/inc/XmlObjMgt_GP.hxx
index bc7c179..4515c63 100644
--- a/inc/XmlObjMgt_GP.hxx
+++ b/inc/XmlObjMgt_GP.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class gp_XYZ;
 class XmlObjMgt_GP  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  XmlObjMgt_DOMString Translate(const gp_Trsf& aTrsf) ;
diff --git a/inc/XmlObjMgt_Persistent.hxx b/inc/XmlObjMgt_Persistent.hxx
index 070a654..46835bc 100644
--- a/inc/XmlObjMgt_Persistent.hxx
+++ b/inc/XmlObjMgt_Persistent.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class XmlObjMgt_Persistent  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! empty constructor <br>
   Standard_EXPORT   XmlObjMgt_Persistent();
diff --git a/inc/XmlXCAFDrivers.hxx b/inc/XmlXCAFDrivers.hxx
index 1a6e06d..6587479 100644
--- a/inc/XmlXCAFDrivers.hxx
+++ b/inc/XmlXCAFDrivers.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@ class XmlXCAFDrivers_DocumentStorageDriver;
 class XmlXCAFDrivers  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Depending from the  ID, returns a list of  storage <br>
 //!          or retrieval attribute drivers. Used for plugin. <br>
diff --git a/inc/Xw.hxx b/inc/Xw.hxx
index 9710dcf..3c97c17 100644
--- a/inc/Xw.hxx
+++ b/inc/Xw.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -18,7 +21,6 @@
 #endif
 class Xw_Driver;
 class Xw_Window;
-class Xw_PixMap;
 class Xw_ColorMap;
 class Xw_TypeMap;
 class Xw_WidthMap;
@@ -38,18 +40,7 @@ class Xw_HListOfMFTFonts;
 class Xw  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Global Trace Level for Maintenance Only <br>
   Standard_EXPORT   static  void SetTrace(const Standard_Integer TraceLevel,const Standard_Integer ErrorLevel) ;
@@ -75,7 +66,6 @@ private:
 
 friend class Xw_Driver;
 friend class Xw_Window;
-friend class Xw_PixMap;
 friend class Xw_ColorMap;
 friend class Xw_TypeMap;
 friend class Xw_WidthMap;
diff --git a/inc/Xw_ListOfMFTFonts.hxx b/inc/Xw_ListOfMFTFonts.hxx
index e20b56d..0b51c3e 100644
--- a/inc/Xw_ListOfMFTFonts.hxx
+++ b/inc/Xw_ListOfMFTFonts.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class MFT_FontManager;
 class Xw_ListOfMFTFonts  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   Xw_ListOfMFTFonts(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/Xw_PixMap.hxx b/inc/Xw_PixMap.hxx
deleted file mode 100644
index f347762..0000000
--- a/inc/Xw_PixMap.hxx
+++ /dev/null
@@ -1,100 +0,0 @@
-// This file is generated by WOK (CPPExt).
-// Please do not edit this file; modify original file instead.
-// The copyright and license terms as defined for the original file apply to 
-// this header file considered to be the "object code" form of the original source.
-
-#ifndef _Xw_PixMap_HeaderFile
-#define _Xw_PixMap_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-#ifndef _Handle_Xw_PixMap_HeaderFile
-#include <Handle_Xw_PixMap.hxx>
-#endif
-
-#ifndef _Aspect_Handle_HeaderFile
-#include <Aspect_Handle.hxx>
-#endif
-#ifndef _Handle_Xw_Window_HeaderFile
-#include <Handle_Xw_Window.hxx>
-#endif
-#ifndef _Aspect_PixMap_HeaderFile
-#include <Aspect_PixMap.hxx>
-#endif
-#ifndef _Handle_Aspect_Window_HeaderFile
-#include <Handle_Aspect_Window.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Standard_CString_HeaderFile
-#include <Standard_CString.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-class Xw_Window;
-class Aspect_PixmapDefinitionError;
-class Aspect_PixmapError;
-class Aspect_Window;
-class Quantity_Color;
-
-
-//! This class defines a X11 pixmap <br>
-class Xw_PixMap : public Aspect_PixMap {
-
-public:
-
-  //!  Warning! When <aDepth> is NULL , the pixmap is created <br>
-//! with the SAME depth than the window <aWindow> <br>
-  Standard_EXPORT   Xw_PixMap(const Handle(Aspect_Window)& aWindow,const Standard_Integer aWidth,const Standard_Integer anHeight,const Standard_Integer aDepth = 0);
-  //! Destroies the Pixmap <br>
-//!  Trigger: Raises if Pixmap is not defined properly <br>
-  Standard_EXPORT   virtual  void Destroy() ;
-  
-//! Dumps the Bitmap to an image file with <br>
-//! an optional gamma correction value <br>
-//! and returns TRUE if the dump occurs normaly. <br>
-  Standard_EXPORT   virtual  Standard_Boolean Dump(const Standard_CString aFilename,const Standard_Real aGammaValue = 1.0) const;
-  
-//! Returns the pixel color. <br>
-  Standard_EXPORT   virtual  Quantity_Color PixelColor(const Standard_Integer theX,const Standard_Integer theY) const;
-  //! Returns the ID of the just created pixmap <br>
-  Standard_EXPORT   virtual  Aspect_Handle PixmapID() const;
-
-
-
-
-  DEFINE_STANDARD_RTTI(Xw_PixMap)
-
-protected:
-
-
-Aspect_Handle myPixmap;
-
-
-private: 
-
-  
-  Standard_EXPORT     Standard_Integer PreferedDepth(const Handle(Aspect_Window)& aWindow,const Standard_Integer aDepth) const;
-
-Handle_Xw_Window myWindow;
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-
-
-#endif
diff --git a/inc/Xw_Window.hxx b/inc/Xw_Window.hxx
index 4ff1120..1ce0f3b 100644
--- a/inc/Xw_Window.hxx
+++ b/inc/Xw_Window.hxx
@@ -76,8 +76,8 @@
 #ifndef _Standard_Real_HeaderFile
 #include <Standard_Real.hxx>
 #endif
-#ifndef _Handle_Aspect_PixMap_HeaderFile
-#include <Handle_Aspect_PixMap.hxx>
+#ifndef _Image_PixMap_HeaderFile
+#include <Image_PixMap.hxx>
 #endif
 #ifndef _Quantity_Ratio_HeaderFile
 #include <Quantity_Ratio.hxx>
@@ -91,12 +91,10 @@ class Aspect_WindowDefinitionError;
 class Aspect_WindowError;
 class Xw_Driver;
 class Xw_IconBox;
-class Xw_PixMap;
 class Xw_GraphicDevice;
 class Aspect_Background;
 class Quantity_Color;
 class Aspect_GradientBackground;
-class Aspect_PixMap;
 
 
 //! This class defines a X11 window <br>
@@ -221,7 +219,7 @@ public:
 //!      or the area is out of the Window. <br>
   Standard_EXPORT   virtual  Standard_Boolean DumpArea(const Standard_CString aFilename,const Standard_Integer Xc,const Standard_Integer Yc,const Standard_Integer Width,const Standard_Integer Height,const Standard_Real aGammaValue = 1.0) const;
   //! dump the full contents of the window to a pixmap. <br>
-  Standard_EXPORT   virtual  Handle_Aspect_PixMap ToPixMap() const;
+  Standard_EXPORT   virtual  Standard_Boolean ToPixMap(Image_PixMap& theImage) const;
   //! Loads the XWD file to this Window. <br>
 //! Returns TRUE if the loading occurs normaly. <br>
 //!  Warning: Note that the Window is enlarged automatically <br>
@@ -335,7 +333,6 @@ public:
 
 friend class Xw_Driver;
 friend class Xw_IconBox;
-friend class Xw_PixMap;
 
 
   DEFINE_STANDARD_RTTI(Xw_Window)
diff --git a/inc/gce_MakeCirc.hxx b/inc/gce_MakeCirc.hxx
index ae9b907..c3d5626 100644
--- a/inc/gce_MakeCirc.hxx
+++ b/inc/gce_MakeCirc.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class gp_Ax1;
 class gce_MakeCirc  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  A2 locates the circle and gives its orientation in 3D space. <br>
diff --git a/inc/gce_MakeCirc2d.hxx b/inc/gce_MakeCirc2d.hxx
index 7f4547c..041782a 100644
--- a/inc/gce_MakeCirc2d.hxx
+++ b/inc/gce_MakeCirc2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class gp_Pnt2d;
 class gce_MakeCirc2d  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  The location point of XAxis is the center of the circle. <br>
diff --git a/inc/gce_MakeCone.hxx b/inc/gce_MakeCone.hxx
index a058cbf..ea91807 100644
--- a/inc/gce_MakeCone.hxx
+++ b/inc/gce_MakeCone.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class gp_Lin;
 class gce_MakeCone  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Creates an infinite conical surface. A2 locates the cone <br>
diff --git a/inc/gce_MakeCylinder.hxx b/inc/gce_MakeCylinder.hxx
index bd6f98c..6e88227 100644
--- a/inc/gce_MakeCylinder.hxx
+++ b/inc/gce_MakeCylinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -42,18 +45,7 @@ class gp_Circ;
 class gce_MakeCylinder  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!<A2> is the local cartesian coordinate system of <me>. <br>
 //!           The status is "NegativeRadius" if R < 0.0 <br>
diff --git a/inc/gce_MakeDir.hxx b/inc/gce_MakeDir.hxx
index 5dd7e47..5b745e0 100644
--- a/inc/gce_MakeDir.hxx
+++ b/inc/gce_MakeDir.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class gp_Dir;
 class gce_MakeDir  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Normalizes the vector V and creates a direction. <br>
 //!            Status is "NullVector" if V.Magnitude() <= Resolution. <br>
diff --git a/inc/gce_MakeDir2d.hxx b/inc/gce_MakeDir2d.hxx
index 6b565c7..fed84fb 100644
--- a/inc/gce_MakeDir2d.hxx
+++ b/inc/gce_MakeDir2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -38,18 +41,7 @@ class gp_Dir2d;
 class gce_MakeDir2d  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Normalizes the vector V and creates a direction. <br>
 //!            Status is "NullVector" if V.Magnitude() <= Resolution. <br>
diff --git a/inc/gce_MakeElips.hxx b/inc/gce_MakeElips.hxx
index 807b0f1..cd661a8 100644
--- a/inc/gce_MakeElips.hxx
+++ b/inc/gce_MakeElips.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class gp_Elips;
 class gce_MakeElips  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!The major radius of the ellipse is on the "XAxis" and the <br>
 //!           minor radius is on the "YAxis" of the ellipse. The "XAxis" <br>
diff --git a/inc/gce_MakeElips2d.hxx b/inc/gce_MakeElips2d.hxx
index 4257945..685a336 100644
--- a/inc/gce_MakeElips2d.hxx
+++ b/inc/gce_MakeElips2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Elips2d;
 class gce_MakeElips2d  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Creates an ellipse with the major axis, the major and the <br>
diff --git a/inc/gce_MakeHypr.hxx b/inc/gce_MakeHypr.hxx
index b4d3bde..c8f7371 100644
--- a/inc/gce_MakeHypr.hxx
+++ b/inc/gce_MakeHypr.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -52,18 +55,7 @@ class gp_Hypr;
 class gce_MakeHypr  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  A2 is the local coordinate system of the hyperbola. <br>
diff --git a/inc/gce_MakeHypr2d.hxx b/inc/gce_MakeHypr2d.hxx
index fc33e79..7ac0d43 100644
--- a/inc/gce_MakeHypr2d.hxx
+++ b/inc/gce_MakeHypr2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Hypr2d;
 class gce_MakeHypr2d  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a hyperbola <br>
 //!   centered on the point Center, where: <br>
diff --git a/inc/gce_MakeLin.hxx b/inc/gce_MakeLin.hxx
index e92a669..b19ae08 100644
--- a/inc/gce_MakeLin.hxx
+++ b/inc/gce_MakeLin.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class gp_Lin;
 class gce_MakeLin  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a line located along the axis A1. <br>
   Standard_EXPORT   gce_MakeLin(const gp_Ax1& A1);
diff --git a/inc/gce_MakeLin2d.hxx b/inc/gce_MakeLin2d.hxx
index cf50753..cd7c76b 100644
--- a/inc/gce_MakeLin2d.hxx
+++ b/inc/gce_MakeLin2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class gp_Lin2d;
 class gce_MakeLin2d  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a line located with A. <br>
   Standard_EXPORT   gce_MakeLin2d(const gp_Ax2d& A);
diff --git a/inc/gce_MakeMirror.hxx b/inc/gce_MakeMirror.hxx
index eb09ac6..6a2ab6c 100644
--- a/inc/gce_MakeMirror.hxx
+++ b/inc/gce_MakeMirror.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class gp_Trsf;
 class gce_MakeMirror  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   gce_MakeMirror(const gp_Pnt& Point);
diff --git a/inc/gce_MakeMirror2d.hxx b/inc/gce_MakeMirror2d.hxx
index 99ad1ea..684b44e 100644
--- a/inc/gce_MakeMirror2d.hxx
+++ b/inc/gce_MakeMirror2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Trsf2d;
 class gce_MakeMirror2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   gce_MakeMirror2d(const gp_Pnt2d& Point);
diff --git a/inc/gce_MakeParab.hxx b/inc/gce_MakeParab.hxx
index 42568b7..63a9184 100644
--- a/inc/gce_MakeParab.hxx
+++ b/inc/gce_MakeParab.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,7 @@ class gp_Parab;
 class gce_MakeParab  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!--- Purpose ; <br>
 //!  Creates a parabola with its local coordinate system "A2" <br>
diff --git a/inc/gce_MakeParab2d.hxx b/inc/gce_MakeParab2d.hxx
index 5468d31..c7c0b15 100644
--- a/inc/gce_MakeParab2d.hxx
+++ b/inc/gce_MakeParab2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -58,18 +61,7 @@ class gp_Parab2d;
 class gce_MakeParab2d  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  Creates a parabola with its axis of symmetry ("MirrorAxis") <br>
diff --git a/inc/gce_MakePln.hxx b/inc/gce_MakePln.hxx
index 00caf1b..d05e19f 100644
--- a/inc/gce_MakePln.hxx
+++ b/inc/gce_MakePln.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class gp_Ax1;
 class gce_MakePln  : public gce_Root {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  The coordinate system of the plane is defined with the axis <br>
diff --git a/inc/gce_MakeRotation.hxx b/inc/gce_MakeRotation.hxx
index 499a061..311519c 100644
--- a/inc/gce_MakeRotation.hxx
+++ b/inc/gce_MakeRotation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class gp_Trsf;
 class gce_MakeRotation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a rotation through angle Angle about the axis defined by the line Line. <br>
   Standard_EXPORT   gce_MakeRotation(const gp_Lin& Line,const Standard_Real Angle);
diff --git a/inc/gce_MakeRotation2d.hxx b/inc/gce_MakeRotation2d.hxx
index 50710b4..a70b943 100644
--- a/inc/gce_MakeRotation2d.hxx
+++ b/inc/gce_MakeRotation2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Trsf2d;
 class gce_MakeRotation2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a rotation through angle Angle about the center Point. <br>
   Standard_EXPORT   gce_MakeRotation2d(const gp_Pnt2d& Point,const Standard_Real Angle);
diff --git a/inc/gce_MakeScale.hxx b/inc/gce_MakeScale.hxx
index e115ba0..c5e8354 100644
--- a/inc/gce_MakeScale.hxx
+++ b/inc/gce_MakeScale.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Trsf;
 class gce_MakeScale  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a scaling transformation with <br>
 //! -   Point as the center of the transformation, and <br>
diff --git a/inc/gce_MakeScale2d.hxx b/inc/gce_MakeScale2d.hxx
index d50bc4a..84649b2 100644
--- a/inc/gce_MakeScale2d.hxx
+++ b/inc/gce_MakeScale2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class gp_Trsf2d;
 class gce_MakeScale2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Constructs a scaling transformation with: <br>
diff --git a/inc/gce_MakeTranslation.hxx b/inc/gce_MakeTranslation.hxx
index 7124ef7..727872c 100644
--- a/inc/gce_MakeTranslation.hxx
+++ b/inc/gce_MakeTranslation.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Trsf;
 class gce_MakeTranslation  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a translation along the vector " Vect" <br>
   Standard_EXPORT   gce_MakeTranslation(const gp_Vec& Vect);
diff --git a/inc/gce_MakeTranslation2d.hxx b/inc/gce_MakeTranslation2d.hxx
index db0b90d..d750065 100644
--- a/inc/gce_MakeTranslation2d.hxx
+++ b/inc/gce_MakeTranslation2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class gp_Trsf2d;
 class gce_MakeTranslation2d  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a translation along the vector Vect. <br>
   Standard_EXPORT   gce_MakeTranslation2d(const gp_Vec2d& Vect);
diff --git a/inc/gce_Root.hxx b/inc/gce_Root.hxx
index 87768a6..f8e78e3 100644
--- a/inc/gce_Root.hxx
+++ b/inc/gce_Root.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@
 class gce_Root  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns true if the construction is successful. <br>
         Standard_Boolean IsDone() const;
diff --git a/inc/gp.hxx b/inc/gp.hxx
index d7c6167..bc7eb1a 100644
--- a/inc/gp.hxx
+++ b/inc/gp.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,7 @@ class gp_Parab2d;
 class gp  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //!  In geometric computations, defines the tolerance criterion <br>
diff --git a/inc/gp_Ax1.hxx b/inc/gp_Ax1.hxx
index 33ecd8b..0f158de 100644
--- a/inc/gp_Ax1.hxx
+++ b/inc/gp_Ax1.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -55,18 +58,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Ax1);
 class gp_Ax1  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an axis object representing Z axis of <br>
 //!            the reference co-ordinate system. <br>
diff --git a/inc/gp_Ax2.hxx b/inc/gp_Ax2.hxx
index 7ba7315..bb4aa46 100644
--- a/inc/gp_Ax2.hxx
+++ b/inc/gp_Ax2.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -73,18 +76,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Ax2);
 class gp_Ax2  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an object corresponding to the reference <br>
 //!            coordinate system (OXYZ). <br>
diff --git a/inc/gp_Ax22d.hxx b/inc/gp_Ax22d.hxx
index 8b4ca09..467baa9 100644
--- a/inc/gp_Ax22d.hxx
+++ b/inc/gp_Ax22d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -65,18 +68,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Ax22d);
 class gp_Ax22d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an object representing the reference <br>
 //!            co-ordinate system (OXY). <br>
diff --git a/inc/gp_Ax2d.hxx b/inc/gp_Ax2d.hxx
index c33455e..4fe2af1 100644
--- a/inc/gp_Ax2d.hxx
+++ b/inc/gp_Ax2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -61,18 +64,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Ax2d);
 class gp_Ax2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an axis object representing X axis of <br>
 //!            the reference co-ordinate system. <br>
diff --git a/inc/gp_Ax3.hxx b/inc/gp_Ax3.hxx
index d2cd735..c6588e9 100644
--- a/inc/gp_Ax3.hxx
+++ b/inc/gp_Ax3.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -79,18 +82,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Ax3);
 class gp_Ax3  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an object corresponding to the reference <br>
 //!            coordinate system (OXYZ). <br>
diff --git a/inc/gp_Circ.hxx b/inc/gp_Circ.hxx
index bf00ce9..44d717a 100644
--- a/inc/gp_Circ.hxx
+++ b/inc/gp_Circ.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -71,18 +74,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Circ);
 class gp_Circ  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite circle. <br>
       gp_Circ();
diff --git a/inc/gp_Circ2d.hxx b/inc/gp_Circ2d.hxx
index 34aea10..bb14d3b 100644
--- a/inc/gp_Circ2d.hxx
+++ b/inc/gp_Circ2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Circ2d);
 class gp_Circ2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! creates an indefinite circle. <br>
       gp_Circ2d();
diff --git a/inc/gp_Cone.hxx b/inc/gp_Cone.hxx
index 04a9d94..db5d16f 100644
--- a/inc/gp_Cone.hxx
+++ b/inc/gp_Cone.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -78,18 +81,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Cone);
 class gp_Cone  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite Cone. <br>
       gp_Cone();
diff --git a/inc/gp_Cylinder.hxx b/inc/gp_Cylinder.hxx
index 48e9937..d9d2b40 100644
--- a/inc/gp_Cylinder.hxx
+++ b/inc/gp_Cylinder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Cylinder);
 class gp_Cylinder  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a indefinite cylinder. <br>
       gp_Cylinder();
diff --git a/inc/gp_Dir.hxx b/inc/gp_Dir.hxx
index 6d4fca3..90982d2 100644
--- a/inc/gp_Dir.hxx
+++ b/inc/gp_Dir.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -54,18 +57,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Dir);
 class gp_Dir  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a direction corresponding to X axis. <br>
       gp_Dir();
diff --git a/inc/gp_Dir2d.hxx b/inc/gp_Dir2d.hxx
index 4859016..7dc0113 100644
--- a/inc/gp_Dir2d.hxx
+++ b/inc/gp_Dir2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -53,18 +56,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Dir2d);
 class gp_Dir2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a direction corresponding to X axis. <br>
       gp_Dir2d();
diff --git a/inc/gp_Elips.hxx b/inc/gp_Elips.hxx
index dddf80a..1a81826 100644
--- a/inc/gp_Elips.hxx
+++ b/inc/gp_Elips.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Elips);
 class gp_Elips  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite ellipse. <br>
       gp_Elips();
diff --git a/inc/gp_Elips2d.hxx b/inc/gp_Elips2d.hxx
index b0cbbdc..4268f24 100644
--- a/inc/gp_Elips2d.hxx
+++ b/inc/gp_Elips2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Elips2d);
 class gp_Elips2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite ellipse. <br>
       gp_Elips2d();
diff --git a/inc/gp_GTrsf.hxx b/inc/gp_GTrsf.hxx
index 49a87dc..a800096 100644
--- a/inc/gp_GTrsf.hxx
+++ b/inc/gp_GTrsf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -71,18 +74,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_GTrsf);
 class gp_GTrsf  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the Identity transformation. <br>
       gp_GTrsf();
diff --git a/inc/gp_GTrsf2d.hxx b/inc/gp_GTrsf2d.hxx
index ca47344..ed6841a 100644
--- a/inc/gp_GTrsf2d.hxx
+++ b/inc/gp_GTrsf2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -67,18 +70,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_GTrsf2d);
 class gp_GTrsf2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! returns identity transformation. <br>
       gp_GTrsf2d();
diff --git a/inc/gp_Hypr.hxx b/inc/gp_Hypr.hxx
index 473f21e..fc06603 100644
--- a/inc/gp_Hypr.hxx
+++ b/inc/gp_Hypr.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -70,18 +73,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Hypr);
 class gp_Hypr  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates of an indefinite hyperbola. <br>
       gp_Hypr();
diff --git a/inc/gp_Hypr2d.hxx b/inc/gp_Hypr2d.hxx
index c79a73e..c1f405a 100644
--- a/inc/gp_Hypr2d.hxx
+++ b/inc/gp_Hypr2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -79,18 +82,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Hypr2d);
 class gp_Hypr2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates of an indefinite hyperbola. <br>
       gp_Hypr2d();
diff --git a/inc/gp_Lin.hxx b/inc/gp_Lin.hxx
index 6b95565..8c31ec5 100644
--- a/inc/gp_Lin.hxx
+++ b/inc/gp_Lin.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -57,18 +60,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Lin);
 class gp_Lin  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Line corresponding to Z axis of the <br>
 //!            reference coordinate system. <br>
diff --git a/inc/gp_Lin2d.hxx b/inc/gp_Lin2d.hxx
index b9224be..f443b60 100644
--- a/inc/gp_Lin2d.hxx
+++ b/inc/gp_Lin2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -59,18 +62,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Lin2d);
 class gp_Lin2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a Line corresponding to X axis of the <br>
 //!            reference coordinate system. <br>
diff --git a/inc/gp_Mat.hxx b/inc/gp_Mat.hxx
index 5b04a97..f660ed0 100644
--- a/inc/gp_Mat.hxx
+++ b/inc/gp_Mat.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Mat);
 class gp_Mat  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! creates  a matrix with null coefficients. <br>
       gp_Mat();
diff --git a/inc/gp_Mat2d.hxx b/inc/gp_Mat2d.hxx
index 9bc0bf4..a7daedf 100644
--- a/inc/gp_Mat2d.hxx
+++ b/inc/gp_Mat2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Mat2d);
 class gp_Mat2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates  a matrix with null coefficients. <br>
       gp_Mat2d();
diff --git a/inc/gp_Parab.hxx b/inc/gp_Parab.hxx
index ab36995..2b42071 100644
--- a/inc/gp_Parab.hxx
+++ b/inc/gp_Parab.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -70,18 +73,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Parab);
 class gp_Parab  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite Parabola. <br>
       gp_Parab();
diff --git a/inc/gp_Parab2d.hxx b/inc/gp_Parab2d.hxx
index acc34c1..bb64e17 100644
--- a/inc/gp_Parab2d.hxx
+++ b/inc/gp_Parab2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -69,18 +72,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Parab2d);
 class gp_Parab2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite parabola. <br>
       gp_Parab2d();
diff --git a/inc/gp_Pln.hxx b/inc/gp_Pln.hxx
index 6a861fc..db36974 100644
--- a/inc/gp_Pln.hxx
+++ b/inc/gp_Pln.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -68,18 +71,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Pln);
 class gp_Pln  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a plane coincident with OXY plane of the <br>
 //!            reference coordinate system. <br>
diff --git a/inc/gp_Pnt.hxx b/inc/gp_Pnt.hxx
index 10b4584..865caa4 100644
--- a/inc/gp_Pnt.hxx
+++ b/inc/gp_Pnt.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Pnt);
 class gp_Pnt  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a point with zero coordinates. <br>
       gp_Pnt();
diff --git a/inc/gp_Pnt2d.hxx b/inc/gp_Pnt2d.hxx
index 7b99af1..bdfec00 100644
--- a/inc/gp_Pnt2d.hxx
+++ b/inc/gp_Pnt2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Pnt2d);
 class gp_Pnt2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a point with zero coordinates. <br>
       gp_Pnt2d();
diff --git a/inc/gp_Quaternion.hxx b/inc/gp_Quaternion.hxx
index 329f806..5745deb 100644
--- a/inc/gp_Quaternion.hxx
+++ b/inc/gp_Quaternion.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class gp_Mat;
 class gp_Quaternion  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an identity quaternion <br>
       gp_Quaternion();
diff --git a/inc/gp_Sphere.hxx b/inc/gp_Sphere.hxx
index ca4a1fe..4f0a6d4 100644
--- a/inc/gp_Sphere.hxx
+++ b/inc/gp_Sphere.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Sphere);
 class gp_Sphere  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an indefinite sphere. <br>
       gp_Sphere();
diff --git a/inc/gp_Torus.hxx b/inc/gp_Torus.hxx
index ec764ba..5ac1754 100644
--- a/inc/gp_Torus.hxx
+++ b/inc/gp_Torus.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -80,18 +83,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Torus);
 class gp_Torus  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! creates an indefinite Torus. <br>
       gp_Torus();
diff --git a/inc/gp_Trsf.hxx b/inc/gp_Trsf.hxx
index 1e57c46..30d6890 100644
--- a/inc/gp_Trsf.hxx
+++ b/inc/gp_Trsf.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -70,18 +73,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Trsf);
 class gp_Trsf  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the identity transformation. <br>
       gp_Trsf();
diff --git a/inc/gp_Trsf2d.hxx b/inc/gp_Trsf2d.hxx
index 85747fb..e4df177 100644
--- a/inc/gp_Trsf2d.hxx
+++ b/inc/gp_Trsf2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -66,18 +69,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Trsf2d);
 class gp_Trsf2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Returns identity transformation. <br>
       gp_Trsf2d();
diff --git a/inc/gp_Vec.hxx b/inc/gp_Vec.hxx
index 9d79d85..6265e07 100644
--- a/inc/gp_Vec.hxx
+++ b/inc/gp_Vec.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Vec);
 class gp_Vec  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a zero vector. <br>
       gp_Vec();
diff --git a/inc/gp_Vec2d.hxx b/inc/gp_Vec2d.hxx
index 9796f43..7dd14f6 100644
--- a/inc/gp_Vec2d.hxx
+++ b/inc/gp_Vec2d.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Vec2d);
 class gp_Vec2d  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+
+  DEFINE_STANDARD_ALLOC
 
   //! Creates a zero vector. <br>
       gp_Vec2d();
diff --git a/inc/gp_XY.hxx b/inc/gp_XY.hxx
index 082ca09..acc0a1c 100644
--- a/inc/gp_XY.hxx
+++ b/inc/gp_XY.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,22 +48,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_XY);
 class gp_XY  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete(void * , void *)
-  {
 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates XY object with zero coordinates (0,0). <br>
       gp_XY();
diff --git a/inc/gp_XYZ.hxx b/inc/gp_XYZ.hxx
index e543970..9fb7ac9 100644
--- a/inc/gp_XYZ.hxx
+++ b/inc/gp_XYZ.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,22 +48,8 @@ Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_XYZ);
 class gp_XYZ  {
 
 public:
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
-  void operator delete ( void * , void * )
-  {
 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Creates an XYZ object with zero co-ordinates (0,0,0) <br>
       gp_XYZ();
diff --git a/inc/math.hxx b/inc/math.hxx
index b318433..b5f0d6d 100644
--- a/inc/math.hxx
+++ b/inc/math.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -78,18 +81,7 @@ class math_DoubleTabOfReal;
 class math  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  Standard_Integer GaussPointsMax() ;
diff --git a/inc/math_Array1OfValueAndWeight.hxx b/inc/math_Array1OfValueAndWeight.hxx
index 3a5fc51..5665a1b 100644
--- a/inc/math_Array1OfValueAndWeight.hxx
+++ b/inc/math_Array1OfValueAndWeight.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class math_ValueAndWeight;
 class math_Array1OfValueAndWeight  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   math_Array1OfValueAndWeight(const Standard_Integer Low,const Standard_Integer Up);
diff --git a/inc/math_BFGS.hxx b/inc/math_BFGS.hxx
index e4c4848..a671b65 100644
--- a/inc/math_BFGS.hxx
+++ b/inc/math_BFGS.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class math_Vector;
 class math_BFGS  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Given the starting point StartingPoint, <br>
diff --git a/inc/math_BissecNewton.hxx b/inc/math_BissecNewton.hxx
index f05fa97..ee18b31 100644
--- a/inc/math_BissecNewton.hxx
+++ b/inc/math_BissecNewton.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class math_FunctionWithDerivative;
 class math_BissecNewton  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! A combination of Newton-Raphson and bissection methods is done to find <br>
diff --git a/inc/math_BracketMinimum.hxx b/inc/math_BracketMinimum.hxx
index 4934014..6b18b01 100644
--- a/inc/math_BracketMinimum.hxx
+++ b/inc/math_BracketMinimum.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class math_Function;
 class math_BracketMinimum  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Given two initial values this class computes a <br>
diff --git a/inc/math_BracketedRoot.hxx b/inc/math_BracketedRoot.hxx
index 2169783..05d1a18 100644
--- a/inc/math_BracketedRoot.hxx
+++ b/inc/math_BracketedRoot.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class math_Function;
 class math_BracketedRoot  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! The Brent method is used to find the root of the function F between <br>
diff --git a/inc/math_BrentMinimum.hxx b/inc/math_BrentMinimum.hxx
index 4e2b6d1..dcf784a 100644
--- a/inc/math_BrentMinimum.hxx
+++ b/inc/math_BrentMinimum.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class math_Function;
 class math_BrentMinimum  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! This constructor should be used in a sub-class to initialize <br>
diff --git a/inc/math_CompareOfValueAndWeight.hxx b/inc/math_CompareOfValueAndWeight.hxx
index a0b7f75..eb04ff9 100644
--- a/inc/math_CompareOfValueAndWeight.hxx
+++ b/inc/math_CompareOfValueAndWeight.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@ class math_ValueAndWeight;
 class math_CompareOfValueAndWeight  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   math_CompareOfValueAndWeight();
diff --git a/inc/math_ComputeGaussPointsAndWeights.hxx b/inc/math_ComputeGaussPointsAndWeights.hxx
index 47dafd3..28599c7 100644
--- a/inc/math_ComputeGaussPointsAndWeights.hxx
+++ b/inc/math_ComputeGaussPointsAndWeights.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class math_Vector;
 class math_ComputeGaussPointsAndWeights  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   math_ComputeGaussPointsAndWeights(const Standard_Integer Number);
diff --git a/inc/math_ComputeKronrodPointsAndWeights.hxx b/inc/math_ComputeKronrodPointsAndWeights.hxx
index 2615ae1..e6bef4b 100644
--- a/inc/math_ComputeKronrodPointsAndWeights.hxx
+++ b/inc/math_ComputeKronrodPointsAndWeights.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class math_Vector;
 class math_ComputeKronrodPointsAndWeights  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   math_ComputeKronrodPointsAndWeights(const Standard_Integer Number);
diff --git a/inc/math_Crout.hxx b/inc/math_Crout.hxx
index ce9454c..11ece17 100644
--- a/inc/math_Crout.hxx
+++ b/inc/math_Crout.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class math_Vector;
 class math_Crout  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Given an input matrix A, this algorithm inverts A by the <br>
 //!          Crout algorithm. The user can give only the inferior <br>
diff --git a/inc/math_DirectPolynomialRoots.hxx b/inc/math_DirectPolynomialRoots.hxx
index 6282219..7b157b0 100644
--- a/inc/math_DirectPolynomialRoots.hxx
+++ b/inc/math_DirectPolynomialRoots.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class StdFail_InfiniteSolutions;
 class math_DirectPolynomialRoots  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! computes all the real roots of the polynomial <br>
diff --git a/inc/math_DoubleTabOfReal.hxx b/inc/math_DoubleTabOfReal.hxx
index afe55b7..c1cd1f5 100644
--- a/inc/math_DoubleTabOfReal.hxx
+++ b/inc/math_DoubleTabOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@
 class math_DoubleTabOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   math_DoubleTabOfReal(const Standard_Integer LowerRow,const Standard_Integer UpperRow,const Standard_Integer LowerCol,const Standard_Integer UpperCol);
diff --git a/inc/math_EigenValuesSearcher.hxx b/inc/math_EigenValuesSearcher.hxx
index 137a40d..c25d87f 100644
--- a/inc/math_EigenValuesSearcher.hxx
+++ b/inc/math_EigenValuesSearcher.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -40,18 +43,7 @@ class math_Vector;
 class math_EigenValuesSearcher  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   math_EigenValuesSearcher(const TColStd_Array1OfReal& Diagonal,const TColStd_Array1OfReal& Subdiagonal);
diff --git a/inc/math_FRPR.hxx b/inc/math_FRPR.hxx
index 9e5e45b..c3dc22a 100644
--- a/inc/math_FRPR.hxx
+++ b/inc/math_FRPR.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class math_Vector;
 class math_FRPR  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //!	  Computes FRPR minimization function F from input vector <br>
 //! StartingPoint. The solution F = Fi is found when 2.0 * <br>
diff --git a/inc/math_Function.hxx b/inc/math_Function.hxx
index c839d41..54ff42c 100644
--- a/inc/math_Function.hxx
+++ b/inc/math_Function.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -29,18 +32,7 @@
 class math_Function  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Computes the value of the function <F> for a given value of <br>
 //!          variable <X>. <br>
diff --git a/inc/math_FunctionAllRoots.hxx b/inc/math_FunctionAllRoots.hxx
index 119be35..163a0bf 100644
--- a/inc/math_FunctionAllRoots.hxx
+++ b/inc/math_FunctionAllRoots.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -46,18 +49,7 @@ class math_FunctionSample;
 class math_FunctionAllRoots  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! The algorithm uses the sample to find intervals on which <br>
 //!          the function is null. An interval is found if, for at least <br>
diff --git a/inc/math_FunctionRoot.hxx b/inc/math_FunctionRoot.hxx
index cbec92e..d6261cd 100644
--- a/inc/math_FunctionRoot.hxx
+++ b/inc/math_FunctionRoot.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -37,18 +40,7 @@ class math_FunctionWithDerivative;
 class math_FunctionRoot  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! The Newton-Raphson method is done to find the root of the function F <br>
diff --git a/inc/math_FunctionRoots.hxx b/inc/math_FunctionRoots.hxx
index 6b7cbf8..f318b7f 100644
--- a/inc/math_FunctionRoots.hxx
+++ b/inc/math_FunctionRoots.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class math_FunctionWithDerivative;
 class math_FunctionRoots  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Calculates all the real roots of a function F-K within the range <br>
 //! A..B. whithout conditions on A and B <br>
diff --git a/inc/math_FunctionSample.hxx b/inc/math_FunctionSample.hxx
index af72289..82b3161 100644
--- a/inc/math_FunctionSample.hxx
+++ b/inc/math_FunctionSample.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class Standard_OutOfRange;
 class math_FunctionSample  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   math_FunctionSample(const Standard_Real A,const Standard_Real B,const Standard_Integer N);
diff --git a/inc/math_FunctionSet.hxx b/inc/math_FunctionSet.hxx
index 148f44b..5b6ca46 100644
--- a/inc/math_FunctionSet.hxx
+++ b/inc/math_FunctionSet.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@ class math_Vector;
 class math_FunctionSet  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/math_FunctionSetRoot.hxx b/inc/math_FunctionSetRoot.hxx
index 57f032d..978ac66 100644
--- a/inc/math_FunctionSetRoot.hxx
+++ b/inc/math_FunctionSetRoot.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class math_Matrix;
 class math_FunctionSetRoot  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! is used in a sub-class to initialize correctly all the fields <br>
 //!          of this class. <br>
diff --git a/inc/math_FunctionSetWithDerivatives.hxx b/inc/math_FunctionSetWithDerivatives.hxx
index ab3003d..7a426a2 100644
--- a/inc/math_FunctionSetWithDerivatives.hxx
+++ b/inc/math_FunctionSetWithDerivatives.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@ class math_Matrix;
 class math_FunctionSetWithDerivatives  : public math_FunctionSet {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Returns the number of variables of the function. <br>
   Standard_EXPORT   virtual  Standard_Integer NbVariables() const = 0;
diff --git a/inc/math_FunctionWithDerivative.hxx b/inc/math_FunctionWithDerivative.hxx
index 34ea615..b24aafe 100644
--- a/inc/math_FunctionWithDerivative.hxx
+++ b/inc/math_FunctionWithDerivative.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@
 class math_FunctionWithDerivative  : public math_Function {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/math_Gauss.hxx b/inc/math_Gauss.hxx
index c868593..84e7392 100644
--- a/inc/math_Gauss.hxx
+++ b/inc/math_Gauss.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class math_Vector;
 class math_Gauss  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Given an input n X n matrix A this constructor performs its LU <br>
diff --git a/inc/math_GaussLeastSquare.hxx b/inc/math_GaussLeastSquare.hxx
index 1691f62..adb6bb7 100644
--- a/inc/math_GaussLeastSquare.hxx
+++ b/inc/math_GaussLeastSquare.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class math_Vector;
 class math_GaussLeastSquare  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Given an input n X m matrix A with n >= m this constructor <br>
 //!          performs the LU decomposition with partial pivoting <br>
diff --git a/inc/math_GaussMultipleIntegration.hxx b/inc/math_GaussMultipleIntegration.hxx
index b15bae7..c3d2c2c 100644
--- a/inc/math_GaussMultipleIntegration.hxx
+++ b/inc/math_GaussMultipleIntegration.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -35,18 +38,7 @@ class math_IntegerVector;
 class math_GaussMultipleIntegration  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! The Gauss-Legendre integration with Order = points of <br>
diff --git a/inc/math_GaussSetIntegration.hxx b/inc/math_GaussSetIntegration.hxx
index 6e32a4d..261c05a 100644
--- a/inc/math_GaussSetIntegration.hxx
+++ b/inc/math_GaussSetIntegration.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class math_IntegerVector;
 class math_GaussSetIntegration  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! The Gauss-Legendre integration with Order = points of <br>
diff --git a/inc/math_GaussSingleIntegration.hxx b/inc/math_GaussSingleIntegration.hxx
index 24ce370..2927100 100644
--- a/inc/math_GaussSingleIntegration.hxx
+++ b/inc/math_GaussSingleIntegration.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class math_Function;
 class math_GaussSingleIntegration  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   math_GaussSingleIntegration();
diff --git a/inc/math_Householder.hxx b/inc/math_Householder.hxx
index 55a7b58..ef86fa1 100644
--- a/inc/math_Householder.hxx
+++ b/inc/math_Householder.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -48,18 +51,7 @@ class math_Vector;
 class math_Householder  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Given an input matrix A with n>= m, given an input matrix B <br>
 //!          this constructor performs the least square resolution of <br>
diff --git a/inc/math_IntegerRandom.hxx b/inc/math_IntegerRandom.hxx
index de2441b..3b6c58e 100644
--- a/inc/math_IntegerRandom.hxx
+++ b/inc/math_IntegerRandom.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -23,18 +26,7 @@
 class math_IntegerRandom  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! creates a Integer random generator between the values Lower and Upper. <br>
diff --git a/inc/math_IntegerVector.hxx b/inc/math_IntegerVector.hxx
index 93dd383..94c0187 100644
--- a/inc/math_IntegerVector.hxx
+++ b/inc/math_IntegerVector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class math_Matrix;
 class math_IntegerVector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! contructs an IntegerVector in the range [Lower..Upper] <br>
   Standard_EXPORT   math_IntegerVector(const Standard_Integer First,const Standard_Integer Last);
diff --git a/inc/math_Jacobi.hxx b/inc/math_Jacobi.hxx
index 7154707..03bf31f 100644
--- a/inc/math_Jacobi.hxx
+++ b/inc/math_Jacobi.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class math_Vector;
 class math_Jacobi  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Given a Real n X n matrix A, this constructor computes all its <br>
diff --git a/inc/math_KronrodSingleIntegration.hxx b/inc/math_KronrodSingleIntegration.hxx
index 9b58f48..403d5f0 100644
--- a/inc/math_KronrodSingleIntegration.hxx
+++ b/inc/math_KronrodSingleIntegration.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -32,18 +35,7 @@ class math_Vector;
 class math_KronrodSingleIntegration  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! An empty constructor. <br>
   Standard_EXPORT   math_KronrodSingleIntegration();
diff --git a/inc/math_Matrix.hxx b/inc/math_Matrix.hxx
index 59ec8fe..a6695d6 100644
--- a/inc/math_Matrix.hxx
+++ b/inc/math_Matrix.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -74,18 +77,7 @@ class math_Vector;
 class math_Matrix  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Constructs a non-initialized  matrix of range [LowerRow..UpperRow, <br>
 //!                                        LowerCol..UpperCol] <br>
diff --git a/inc/math_MultipleVarFunction.hxx b/inc/math_MultipleVarFunction.hxx
index 399a5e0..69a097a 100644
--- a/inc/math_MultipleVarFunction.hxx
+++ b/inc/math_MultipleVarFunction.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -30,18 +33,7 @@ class math_Vector;
 class math_MultipleVarFunction  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Returns the number of variables of the function <br>
diff --git a/inc/math_MultipleVarFunctionWithGradient.hxx b/inc/math_MultipleVarFunctionWithGradient.hxx
index dced9c5..f0fbc59 100644
--- a/inc/math_MultipleVarFunctionWithGradient.hxx
+++ b/inc/math_MultipleVarFunctionWithGradient.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -34,18 +37,7 @@ class math_Vector;
 class math_MultipleVarFunctionWithGradient  : public math_MultipleVarFunction {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   virtual  void Delete() ;
diff --git a/inc/math_MultipleVarFunctionWithHessian.hxx b/inc/math_MultipleVarFunctionWithHessian.hxx
index d5ab3dd..2370c53 100644
--- a/inc/math_MultipleVarFunctionWithHessian.hxx
+++ b/inc/math_MultipleVarFunctionWithHessian.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -33,18 +36,7 @@ class math_Matrix;
 class math_MultipleVarFunctionWithHessian  : public math_MultipleVarFunctionWithGradient {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! returns the number of variables of the function. <br>
   Standard_EXPORT   virtual  Standard_Integer NbVariables() const = 0;
diff --git a/inc/math_NewtonFunctionRoot.hxx b/inc/math_NewtonFunctionRoot.hxx
index 245881d..4c957c3 100644
--- a/inc/math_NewtonFunctionRoot.hxx
+++ b/inc/math_NewtonFunctionRoot.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -36,18 +39,7 @@ class math_FunctionWithDerivative;
 class math_NewtonFunctionRoot  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! The Newton method is done to find the root of the function F <br>
diff --git a/inc/math_NewtonFunctionSetRoot.hxx b/inc/math_NewtonFunctionSetRoot.hxx
index 370ad54..51360c1 100644
--- a/inc/math_NewtonFunctionSetRoot.hxx
+++ b/inc/math_NewtonFunctionSetRoot.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -49,18 +52,7 @@ class math_Matrix;
 class math_NewtonFunctionSetRoot  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! This constructor should be used in a sub-class to initialize <br>
diff --git a/inc/math_NewtonMinimum.hxx b/inc/math_NewtonMinimum.hxx
index e0b1ec6..db16760 100644
--- a/inc/math_NewtonMinimum.hxx
+++ b/inc/math_NewtonMinimum.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -44,18 +47,7 @@ class math_Vector;
 class math_NewtonMinimum  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! -- Given the  starting   point  StartingPoint, <br>
 //!            The tolerance  required on  the  solution is given  by <br>
diff --git a/inc/math_Powell.hxx b/inc/math_Powell.hxx
index e53653c..bd65493 100644
--- a/inc/math_Powell.hxx
+++ b/inc/math_Powell.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -47,18 +50,7 @@ class math_Matrix;
 class math_Powell  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Computes Powell minimization on the function F given <br>
diff --git a/inc/math_QuickSortOfValueAndWeight.hxx b/inc/math_QuickSortOfValueAndWeight.hxx
index 7825988..5025a7b 100644
--- a/inc/math_QuickSortOfValueAndWeight.hxx
+++ b/inc/math_QuickSortOfValueAndWeight.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@ class math_CompareOfValueAndWeight;
 class math_QuickSortOfValueAndWeight  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   static  void Sort(math_Array1OfValueAndWeight& TheArray,const math_CompareOfValueAndWeight& Comp) ;
diff --git a/inc/math_RealRandom.hxx b/inc/math_RealRandom.hxx
index 55d9dc9..196e137 100644
--- a/inc/math_RealRandom.hxx
+++ b/inc/math_RealRandom.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -26,18 +29,7 @@
 class math_RealRandom  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! creates a real random generator between the values Lower and Upper. <br>
diff --git a/inc/math_SVD.hxx b/inc/math_SVD.hxx
index 88a21a3..cc1e3ab 100644
--- a/inc/math_SVD.hxx
+++ b/inc/math_SVD.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -45,18 +48,7 @@ class math_Vector;
 class math_SVD  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
 //! Given as input an n X m matrix A with n < m, n = m or n > m <br>
diff --git a/inc/math_SingleTabOfInteger.hxx b/inc/math_SingleTabOfInteger.hxx
index 6f1c5e7..1b0271e 100644
--- a/inc/math_SingleTabOfInteger.hxx
+++ b/inc/math_SingleTabOfInteger.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -28,18 +31,7 @@
 class math_SingleTabOfInteger  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   math_SingleTabOfInteger(const Standard_Integer LowerIndex,const Standard_Integer UpperIndex);
diff --git a/inc/math_SingleTabOfReal.hxx b/inc/math_SingleTabOfReal.hxx
index 32ce693..c42d276 100644
--- a/inc/math_SingleTabOfReal.hxx
+++ b/inc/math_SingleTabOfReal.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -31,18 +34,7 @@
 class math_SingleTabOfReal  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   math_SingleTabOfReal(const Standard_Integer LowerIndex,const Standard_Integer UpperIndex);
diff --git a/inc/math_TrigonometricFunctionRoots.hxx b/inc/math_TrigonometricFunctionRoots.hxx
index 731c484..6c80bb8 100644
--- a/inc/math_TrigonometricFunctionRoots.hxx
+++ b/inc/math_TrigonometricFunctionRoots.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -39,18 +42,7 @@ class Standard_RangeError;
 class math_TrigonometricFunctionRoots  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Given coefficients a, b, c, d , e, this constructor <br>
 //!          performs the resolution of the equation above. <br>
diff --git a/inc/math_Uzawa.hxx b/inc/math_Uzawa.hxx
index d14875d..e5194e8 100644
--- a/inc/math_Uzawa.hxx
+++ b/inc/math_Uzawa.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -50,18 +53,7 @@ class math_Vector;
 class math_Uzawa  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Given an input matrix Cont, two input vectors Secont <br>
 //!          and StartingPoint, it solves Cont*X = Secont (only <br>
diff --git a/inc/math_ValueAndWeight.hxx b/inc/math_ValueAndWeight.hxx
index 4ed72ad..6a3cc5d 100644
--- a/inc/math_ValueAndWeight.hxx
+++ b/inc/math_ValueAndWeight.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -22,18 +25,7 @@
 class math_ValueAndWeight  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   
   Standard_EXPORT   math_ValueAndWeight();
diff --git a/inc/math_Vector.hxx b/inc/math_Vector.hxx
index 47c87a3..a64f18a 100644
--- a/inc/math_Vector.hxx
+++ b/inc/math_Vector.hxx
@@ -9,6 +9,9 @@
 #ifndef _Standard_HeaderFile
 #include <Standard.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -43,18 +46,7 @@ class math_Matrix;
 class math_Vector  {
 public:
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  {
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress) 
-  {
-    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
   //! Contructs a non-initialized vector in the range [Lower..Upper] <br>
 //! Lower and Upper are the indexes of the lower and upper <br>
diff --git a/msvc.bat b/msvc.bat
index 58bc6ab..6bcd3f9 100755
--- a/msvc.bat
+++ b/msvc.bat
@@ -1,32 +1,32 @@
- at echo off
-
-rem Setup environment
-call "%~dp0env.bat" %1 %2 %3
-
-rem Define path to project file
-set "PRJFILE=%~dp0\adm\msvc\%VCVER%\OCCT.sln"
-if not exist "%PRJFILE%" set "PRJFILE=%~dp0\adm\msvc\%VCVER%\Products.sln"
-if not "%4" == "" (
-  set "PRJFILE=%4"
-)
-
-if "%VCVER%" == "vc8" (
-  set "DevEnvDir=%VS80COMNTOOLS%..\IDE"
-) else if "%VCVER%" == "vc9" (
-  set "DevEnvDir=%VS90COMNTOOLS%..\IDE"
-) else if "%VCVER%" == "vc10" (
-  set "DevEnvDir=%VS100COMNTOOLS%..\IDE"
-) else (
-  echo Error: wrong VS identifier
-  exit /B
-)
-
-rem Launch Visual Studio - either professional (devenv) or Express, as available
-if exist "%DevEnvDir%\devenv.exe"  (
-  start "%DevEnvDir%\devenv.exe" "%PRJFILE%"
-) else if exist "%DevEnvDir%\VCExpress.exe"  (
-  start "%DevEnvDir%\VCExpress.exe" "%PRJFILE%"
-) else (
-  echo Error: Could not find MS Visual Studio ^(%VCVER%^)
-  echo Check relevant environment variable ^(e.g. VS80COMNTOOLS for vc8^)
-)
+ at echo off
+
+rem Setup environment
+call "%~dp0env.bat" %1 %2 %3
+
+rem Define path to project file
+set "PRJFILE=%~dp0\adm\msvc\%VCVER%\OCCT.sln"
+if not exist "%PRJFILE%" set "PRJFILE=%~dp0\adm\msvc\%VCVER%\Products.sln"
+if not "%4" == "" (
+  set "PRJFILE=%4"
+)
+
+if /i ["%VCVER%"] == ["vc8"] (
+  set "DevEnvDir=%VS80COMNTOOLS%..\IDE"
+) else if /i ["%VCVER%"] == ["vc9"] (
+  set "DevEnvDir=%VS90COMNTOOLS%..\IDE"
+) else if /i ["%VCVER%"] == ["vc10"] (
+  set "DevEnvDir=%VS100COMNTOOLS%..\IDE"
+) else (
+  echo Error: wrong VS identifier
+  exit /B
+)
+
+rem Launch Visual Studio - either professional (devenv) or Express, as available
+if exist "%DevEnvDir%\devenv.exe"  (
+  start "%DevEnvDir%\devenv.exe" "%PRJFILE%"
+) else if exist "%DevEnvDir%\VCExpress.exe"  (
+  start "%DevEnvDir%\VCExpress.exe" "%PRJFILE%"
+) else (
+  echo Error: Could not find MS Visual Studio ^(%VCVER%^)
+  echo Check relevant environment variable ^(e.g. VS80COMNTOOLS for vc8^)
+)
diff --git a/src/AIS/AIS.cxx b/src/AIS/AIS.cxx
index a215a55..8250ec5 100644
--- a/src/AIS/AIS.cxx
+++ b/src/AIS/AIS.cxx
@@ -80,7 +80,7 @@
 #include <gp_Vec.hxx>
 #include <gp_XYZ.hxx>
 
-const Standard_Real SquareTolerance = Precision::Confusion()*Precision::Confusion();
+const Standard_Real SquareTolerance = Precision::SquareConfusion();
 
 //=======================================================================
 //function : Nearest
diff --git a/src/AIS/AIS_ConcentricRelation.cxx b/src/AIS/AIS_ConcentricRelation.cxx
index 4188fe0..c586d2b 100644
--- a/src/AIS/AIS_ConcentricRelation.cxx
+++ b/src/AIS/AIS_ConcentricRelation.cxx
@@ -110,8 +110,8 @@ void AIS_ConcentricRelation::ComputeEdgeVertexConcentric(const Handle(Prs3d_Pres
     V = TopoDS::Vertex(mySShape);
   }
   else {
-    E = TopoDS::Edge(myFShape);
-    V = TopoDS::Vertex(mySShape);
+    E = TopoDS::Edge(mySShape);
+    V = TopoDS::Vertex(myFShape);
   }
   gp_Pnt p1,p2;
   Handle(Geom_Curve) C;
@@ -153,7 +153,7 @@ void AIS_ConcentricRelation::ComputeTwoVerticesConcentric(const Handle(Prs3d_Pre
   myPnt = myCenter.Translated(vectrans.Multiplied(myRad));
   DsgPrs_ConcentricPresentation::Add(aPresentation,myDrawer,myCenter,myRad,myDir,myPnt);
   if (!isOnPlanVertex1) AIS::ComputeProjVertexPresentation(aPresentation,myDrawer,V1,P1);
-  if (!isOnPlanVertex1) AIS::ComputeProjVertexPresentation(aPresentation,myDrawer,V2,P2);
+  if (!isOnPlanVertex2) AIS::ComputeProjVertexPresentation(aPresentation,myDrawer,V2,P2);
 }
 
 //=======================================================================
diff --git a/src/AIS/AIS_ConnectedShape.cxx b/src/AIS/AIS_ConnectedShape.cxx
index bef05e1..ff63d24 100644
--- a/src/AIS/AIS_ConnectedShape.cxx
+++ b/src/AIS/AIS_ConnectedShape.cxx
@@ -38,6 +38,7 @@
 #include <StdSelect_BRepOwner.hxx>
 #include <StdSelect.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_OrientedShapeMapHasher.hxx>
 #include <TopExp.hxx>
 #include <Select3D_SensitiveEntity.hxx>
 #include <SelectMgr_EntityOwner.hxx>
@@ -182,17 +183,13 @@ void AIS_ConnectedShape::Compute(const Handle_PrsMgr_PresentationManager2d& aPre
 //function : ComputeSelection 
 //purpose  : Attention fragile...
 //=======================================================================
-static Standard_Boolean IsEqual( const TopoDS_Shape& theLeft, 
-                                 const TopoDS_Shape& theRight )
-{
-  return theLeft.IsEqual(theRight);
-}
 
 void AIS_ConnectedShape::ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, 
                                            const Standard_Integer aMode)
 {
   typedef NCollection_List<Handle(Select3D_SensitiveEntity)> SensitiveList;
-  typedef NCollection_DataMap<TopoDS_Shape, SensitiveList > Shapes2EntitiesMap; 
+  typedef NCollection_DataMap<TopoDS_Shape, SensitiveList, TopTools_OrientedShapeMapHasher>
+    Shapes2EntitiesMap;
 
   UpdateShape();
   aSelection->Clear();
diff --git a/src/AIS/AIS_Drawer.cdl b/src/AIS/AIS_Drawer.cdl
index 4ab0f94..b311385 100644
--- a/src/AIS/AIS_Drawer.cdl
+++ b/src/AIS/AIS_Drawer.cdl
@@ -478,7 +478,42 @@ is
     	--          Type of line: Aspect_TOL_SOLID Width: 1.
     is redefined static;
     
+    SetFaceBoundaryDraw (me           : mutable;
+                         theIsEnabled : Boolean from Standard)
+    is redefined static;
+        ---Purpose: Enables or disables drawing of face boundaries for shading presentations.
+        -- The method sets drawing flag owned by the drawer that will be used during
+        -- visualization instead of the one set in link.
+        -- theIsEnabled is a boolean flag indicating whether the face boundaries should be
+        -- drawn or not.
+
+    IsFaceBoundaryDraw (me) returns Boolean from Standard
+    is redefined static;
+        ---Purpose: Checks whether the drawing of face boundaries is enabled or not.
+
+    SetFaceBoundaryAspect (me        : mutable;
+                           theAspect : LineAspect from Prs3d)
+    is redefined static;
+        ---Purpose: Sets line aspect for face boundaries.
+        -- The method sets line aspect owned by the drawer that will be used during
+        -- visualization instead of the one set in link.
+        -- theAspect is the line aspect that determines the look of the face boundaries.
+
+    FaceBoundaryAspect (me : mutable) returns mutable LineAspect from Prs3d
+    is redefined static;
+        ---Purpose: Returns line aspect of face boundaries.
+
+    IsOwnFaceBoundaryDraw (me) returns Boolean from Standard
+    is static;
+        ---Purpose: Returns true if the drawer has its own attribute for 
+        -- "draw face boundaries" flag that overrides the one in the link.
+        ---C++: inline
 
+    IsOwnFaceBoundaryAspect (me) returns Boolean from Standard
+    is static;
+        ---Purpose: Returns true if the drawer has its own attribute for 
+        -- face boundaries aspect that overrides the one in the link.
+        ---C++: inline
 --
 --  Attributes for the presentation of a Datum.
 --  
@@ -593,6 +628,7 @@ fields
     myOwnHLRDeviationAngle           : Real from Standard; 
     myPreviousHLRDeviationAngle      : Real from Standard; 	 	
 
+	myHasOwnFaceBoundaryDraw         : Boolean from Standard;
 end Drawer;
  
 
diff --git a/src/AIS/AIS_Drawer.cxx b/src/AIS/AIS_Drawer.cxx
index 41a9adf..c3d6cc2 100644
--- a/src/AIS/AIS_Drawer.cxx
+++ b/src/AIS/AIS_Drawer.cxx
@@ -26,7 +26,8 @@ myhasOwnDeviationCoefficient(Standard_False),
 myPreviousDeviationCoefficient(0.1),
 myhasOwnHLRDeviationCoefficient (Standard_False),
 myhasOwnDeviationAngle (Standard_False),
-myhasOwnHLRDeviationAngle (Standard_False)
+myhasOwnHLRDeviationAngle (Standard_False),
+myHasOwnFaceBoundaryDraw (Standard_False)
 {
   SetMaximalParameterValue(500000.);
   myLink->SetMaximalParameterValue(500000.);
@@ -262,10 +263,58 @@ void AIS_Drawer::ClearLocalAttributes()
   if(!myRadiusAspect.IsNull())  myRadiusAspect.Nullify();    
   if(!mySectionAspect.IsNull())  mySectionAspect.Nullify();   
   if( myhasOwnHLRDeviationCoefficient )  myhasOwnHLRDeviationCoefficient = Standard_False;   
-  if(myhasOwnHLRDeviationAngle ) myhasOwnHLRDeviationAngle  = Standard_False;   
+  if(myhasOwnHLRDeviationAngle ) myhasOwnHLRDeviationAngle  = Standard_False;
+  if (!myFaceBoundaryAspect.IsNull()) myFaceBoundaryAspect.Nullify();
   
+  myHasOwnFaceBoundaryDraw = Standard_False;
+
   hasLocalAttributes = Standard_False;
 
 }
 
+// =======================================================================
+// function : SetFaceBoundaryDraw
+// purpose  :
+// =======================================================================
+void AIS_Drawer::SetFaceBoundaryDraw (const Standard_Boolean theIsEnabled)
+{
+  myHasOwnFaceBoundaryDraw = Standard_True;
+  myFaceBoundaryDraw       = theIsEnabled;
+}
+
+// =======================================================================
+// function : IsFaceBoundaryDraw
+// purpose  :
+// =======================================================================
+Standard_Boolean AIS_Drawer::IsFaceBoundaryDraw() const
+{
+  if (!IsOwnFaceBoundaryDraw ())
+  {
+    return myLink->IsFaceBoundaryDraw ();
+  }
+
+  return myFaceBoundaryDraw;
+}
 
+// =======================================================================
+// function : SetFaceBoundaryAspect
+// purpose  :
+// =======================================================================
+void AIS_Drawer::SetFaceBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect)
+{
+  myFaceBoundaryAspect = theAspect;
+}
+
+// =======================================================================
+// function : FaceBoundaryAspect
+// purpose  :
+// =======================================================================
+Handle_Prs3d_LineAspect AIS_Drawer::FaceBoundaryAspect()
+{
+  if (!IsOwnFaceBoundaryAspect ())
+  {
+    return myLink->FaceBoundaryAspect ();
+  }
+
+  return myFaceBoundaryAspect;
+}
diff --git a/src/AIS/AIS_InteractiveContext.cdl b/src/AIS/AIS_InteractiveContext.cdl
index bab1ae8..5dbf80b 100644
--- a/src/AIS/AIS_InteractiveContext.cdl
+++ b/src/AIS/AIS_InteractiveContext.cdl
@@ -761,8 +761,8 @@ is
     SetPolygonOffsets ( me : mutable;
 		anObj        : InteractiveObject from AIS;
 		aMode        : Integer from Standard;
-		aFactor      : Real from Standard = 1.0;
-		aUnits       : Real from Standard = 0.0;
+		aFactor      : ShortReal from Standard = 1.0;
+		aUnits       : ShortReal from Standard = 0.0;
     	updateviewer : Boolean from Standard = Standard_True ) is static;
     ---Purpose: Sets up polygon offsets for the given AIS_InteractiveObject.
     --          It simply calls anObj->SetPolygonOffsets() 
@@ -779,8 +779,8 @@ is
     PolygonOffsets ( me;
 		anObj   : InteractiveObject from AIS;
 		aMode   : out Integer from Standard;
-		aFactor : out Real from Standard;
-		aUnits  : out Real from Standard ) is static;
+		aFactor : out ShortReal from Standard;
+		aUnits  : out ShortReal from Standard ) is static;
     ---Level: Public
     ---Purpose: Retrieves current polygon offsets settings for <anObj>.
     ---Category: Inquire methods
diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx
index 343c12a..db1f758 100644
--- a/src/AIS/AIS_InteractiveContext.cxx
+++ b/src/AIS/AIS_InteractiveContext.cxx
@@ -236,7 +236,7 @@ void AIS_InteractiveContext::UpdateCurrentViewer()
 
 void AIS_InteractiveContext::OpenCollector()
 {
-  myIsCollClosed =Standard_True;
+  myIsCollClosed = Standard_False;
   // to be completed....
 }
 
@@ -1661,8 +1661,8 @@ void AIS_InteractiveContext::SetDeviationAngle(const Standard_Real anAngle)
 
 Standard_Real AIS_InteractiveContext::DeviationAngle() const
 {
-  return M_PI/180.0e0 ;
-  //  return myDefaultDrawer->DeviationAngle();
+  //return M_PI/180.0e0 ;
+    return myDefaultDrawer->DeviationAngle();
 }
 
 //=======================================================================
diff --git a/src/AIS/AIS_InteractiveContext_2.cxx b/src/AIS/AIS_InteractiveContext_2.cxx
index 629f497..4159a3b 100644
--- a/src/AIS/AIS_InteractiveContext_2.cxx
+++ b/src/AIS/AIS_InteractiveContext_2.cxx
@@ -77,14 +77,16 @@ OpenLocalContext(const Standard_Boolean UseDisplayedObjects,
                                                           UseDisplayedObjects,
                                                           AllowShapeDecomposition,
                                                           AcceptEraseOfTemporary);
-  NewLocal->MainSelector()->Set ((myLocalContexts.Extent() > 0)
+  // the AIS_LocalContext bind itself to myLocalContexts
+  // because procedures performed in AIS_LocalContext constructor
+  // already may access myLocalContexts(myCurLocalIndex) (like methods AIS_LocalContext::IsSelected()).
+  //myLocalContexts.Bind (myCurLocalIndex, NewLocal);
+  NewLocal->MainSelector()->Set ((myLocalContexts.Extent() > 1)
     ? myLocalContexts (untilnow)->MainSelector()->Projector()
     : myMainSel->Projector());
 
   NewLocal->MainSelector()->UpdateConversion();
 
-  myLocalContexts.Bind(myCurLocalIndex,NewLocal);
-
 #ifdef DEB
   cout<<"\tOpen Local Context No "<<myCurLocalIndex<<endl;
   if(UseDisplayedObjects){
diff --git a/src/AIS/AIS_InteractiveContext_3.cxx b/src/AIS/AIS_InteractiveContext_3.cxx
index 1d89688..ec3ff60 100644
--- a/src/AIS/AIS_InteractiveContext_3.cxx
+++ b/src/AIS/AIS_InteractiveContext_3.cxx
@@ -56,8 +56,8 @@ void AIS_InteractiveContext::DisplayFromCollector(const Handle(AIS_InteractiveOb
 void AIS_InteractiveContext::SetPolygonOffsets(
                              const Handle(AIS_InteractiveObject)& anObj,
                              const Standard_Integer               aMode,
-                             const Standard_Real                  aFactor,
-                             const Standard_Real                  aUnits,
+                             const Standard_ShortReal             aFactor,
+                             const Standard_ShortReal             aUnits,
                              const Standard_Boolean               updateviewer) 
 {
   if ( anObj.IsNull() )
@@ -94,8 +94,8 @@ Standard_Boolean AIS_InteractiveContext::HasPolygonOffsets(const Handle(AIS_Inte
 void AIS_InteractiveContext::PolygonOffsets(
                              const Handle(AIS_InteractiveObject)& anObj,
                              Standard_Integer&                    aMode,
-                             Standard_Real&                       aFactor,
-                             Standard_Real&                       aUnits) const 
+                             Standard_ShortReal&                  aFactor,
+                             Standard_ShortReal&                  aUnits) const 
 {
   if ( HasPolygonOffsets( anObj ) )
     anObj->PolygonOffsets( aMode, aFactor, aUnits );
diff --git a/src/AIS/AIS_InteractiveObject.cdl b/src/AIS/AIS_InteractiveObject.cdl
index 18a4573..e1b98ad 100644
--- a/src/AIS/AIS_InteractiveObject.cdl
+++ b/src/AIS/AIS_InteractiveObject.cdl
@@ -616,8 +616,8 @@ is
     -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
     SetPolygonOffsets ( me : mutable;
                 aMode   : Integer from Standard;
-                aFactor : Real from Standard = 1.0;
-                aUnits  : Real from Standard = 0.0 ) is virtual;
+                aFactor : ShortReal from Standard = 1.0;
+                aUnits  : ShortReal from Standard = 0.0 ) is virtual;
     	---Level: Public
     	---Purpose: Sets up polygon offsets for this object.
     	--          It modifies all existing presentations of <anObj> (if any),
@@ -655,8 +655,8 @@ is
 
     PolygonOffsets ( me;
                 aMode   : out Integer from Standard;
-                aFactor : out Real from Standard;
-                aUnits  : out Real from Standard ) is virtual;
+                aFactor : out ShortReal from Standard;
+                aUnits  : out ShortReal from Standard ) is virtual;
     	---Level: Public
     	---Purpose: Retrieves current polygon offsets settings from <myDrawer>.
     	---Category: Inquire methods
diff --git a/src/AIS/AIS_InteractiveObject.cxx b/src/AIS/AIS_InteractiveObject.cxx
index f86fc46..80438e0 100644
--- a/src/AIS/AIS_InteractiveObject.cxx
+++ b/src/AIS/AIS_InteractiveObject.cxx
@@ -749,9 +749,9 @@ void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& anAspect,
 //function : SetPolygonOffsets 
 //purpose  : 
 //======================================================================= 
-void AIS_InteractiveObject::SetPolygonOffsets(const Standard_Integer aMode,
-                                              const Standard_Real    aFactor,
-                                              const Standard_Real    aUnits) 
+void AIS_InteractiveObject::SetPolygonOffsets(const Standard_Integer    aMode,
+                                              const Standard_ShortReal  aFactor,
+                                              const Standard_ShortReal  aUnits) 
 {
   if ( !HasPolygonOffsets() )
     myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
@@ -806,9 +806,9 @@ Standard_Boolean AIS_InteractiveObject::HasPolygonOffsets() const
 //function : PolygonOffsets 
 //purpose  : 
 //=======================================================================
-void AIS_InteractiveObject::PolygonOffsets(Standard_Integer& aMode,
-                                           Standard_Real&    aFactor,
-                                           Standard_Real&    aUnits) const 
+void AIS_InteractiveObject::PolygonOffsets(Standard_Integer&    aMode,
+                                           Standard_ShortReal&  aFactor,
+                                           Standard_ShortReal&  aUnits) const 
 {
   if( HasPolygonOffsets() )
     myDrawer->ShadingAspect()->Aspect()->PolygonOffsets( aMode, aFactor, aUnits );
diff --git a/src/AIS/AIS_LocalContext.cxx b/src/AIS/AIS_LocalContext.cxx
index 0c2d48d..25fbda1 100644
--- a/src/AIS/AIS_LocalContext.cxx
+++ b/src/AIS/AIS_LocalContext.cxx
@@ -119,6 +119,11 @@ myCurDetected(0)
 ,myAISCurDetected(0)
 #endif
 {
+  // bind self to AIS_InteractiveContext::myLocalContexts. Further, the
+  // constructor executes logic that implies that the context is already
+  // created and mapped.
+  aCtx->myLocalContexts.Bind (Index, this);
+
   myMainPM = aCtx->MainPrsMgr();
   mySelName = AIS_Local_SelName(this, Index);
   AIS_Selection::CreateSelection(mySelName.ToCString());
diff --git a/src/AIS/AIS_TexturedShape.cxx b/src/AIS/AIS_TexturedShape.cxx
index 1d303f8..a6ea304 100644
--- a/src/AIS/AIS_TexturedShape.cxx
+++ b/src/AIS/AIS_TexturedShape.cxx
@@ -274,13 +274,12 @@ void AIS_TexturedShape::Compute (const Handle(PrsMgr_PresentationManager3d)& /*t
       Standard_Real prevcoeff = 0.0;
       Standard_Real newcoeff = 0.0;
 
-      if (!OwnDeviationAngle (newangle, prevangle) && !OwnDeviationCoefficient (newcoeff, prevcoeff))
+      if (OwnDeviationAngle (newangle, prevangle) || OwnDeviationCoefficient (newcoeff, prevcoeff))
       {
-        break;
-      }
-      if (Abs (newangle - prevangle) > Precision::Angular() || Abs (newcoeff - prevcoeff) > Precision::Confusion())
-      {
-        BRepTools::Clean (myshape);
+        if (Abs (newangle - prevangle) > Precision::Angular() || Abs (newcoeff - prevcoeff) > Precision::Confusion())
+        {
+          BRepTools::Clean (myshape);
+        }
       }
       if (myshape.ShapeType() > TopAbs_FACE)
       {
@@ -333,7 +332,7 @@ void AIS_TexturedShape::Compute (const Handle(PrsMgr_PresentationManager3d)& /*t
         if (HasPolygonOffsets())
         {
           Standard_Integer aMode;
-          Standard_Real aFactor, aUnits;
+          Standard_ShortReal aFactor, aUnits;
           PolygonOffsets(aMode, aFactor, aUnits);
           myAspect->SetPolygonOffsets(aMode, aFactor, aUnits);
         }
diff --git a/src/Adaptor3d/Adaptor3d_TopolTool.cxx b/src/Adaptor3d/Adaptor3d_TopolTool.cxx
index 4660093..3a338b3 100644
--- a/src/Adaptor3d/Adaptor3d_TopolTool.cxx
+++ b/src/Adaptor3d/Adaptor3d_TopolTool.cxx
@@ -1070,7 +1070,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
 
   anUFlg(1) = Standard_True;
   anUFlg(nbsu) = Standard_True;
-  myNbSamplesU = 2; 
+  //myNbSamplesU = 2; 
   for(i = 1; i <= nbsv; ++i) {
     t1 = aVPars(i);
     j = 1;
@@ -1113,7 +1113,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
 	if(!ok) {
 	  j = k - 1;
 	  anUFlg(j) = Standard_True;
-	  ++myNbSamplesU;
+	  //++myNbSamplesU;
 	  break;
 	}
 	
@@ -1129,6 +1129,12 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
 
     }
   }
+
+  myNbSamplesU = 0;
+  for (i = 1; i <= nbsu; i++)
+    if (anUFlg(i) == Standard_True)
+      myNbSamplesU++;
+  
   if(myNbSamplesU < myMinPnts) {
     if(myNbSamplesU == 2) {
       //"uniform" distribution;
@@ -1149,7 +1155,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
       
   aVFlg(1) = Standard_True;
   aVFlg(nbsv) = Standard_True;
-  myNbSamplesV = 2;
+  //myNbSamplesV = 2;
   for(i = 1; i <= nbsu; ++i) {
     t1 = anUPars(i);
     j = 1;
@@ -1191,7 +1197,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
 	if(!ok) {
 	  j = k - 1;
 	  aVFlg(j) = Standard_True;
-	  ++myNbSamplesV;
+	  //++myNbSamplesV;
 	  break;
 	}
 	
@@ -1207,6 +1213,12 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
 
     }
   }
+
+  myNbSamplesV = 0;
+  for (i = 1; i <= nbsv; i++)
+    if (aVFlg(i) == Standard_True)
+      myNbSamplesV++;
+  
   if(myNbSamplesV < myMinPnts) {
     if(myNbSamplesV == 2) {
       //"uniform" distribution;
diff --git a/src/Aspect/Aspect.cdl b/src/Aspect/Aspect.cdl
index 509cb07..39d2891 100644
--- a/src/Aspect/Aspect.cdl
+++ b/src/Aspect/Aspect.cdl
@@ -348,10 +348,6 @@ is
         deferred class Window;
         ---Purpose: Defines a window.
         ---Category: Classes
-
-        deferred class PixMap;
-        ---Purpose: Defines a pixmap(bitmap)
-        ---Category: Classes
         
         deferred class GraphicDevice;
         ---Purpose: Defines a physical graphic device allowing to
diff --git a/src/Aspect/Aspect_PixMap.cdl b/src/Aspect/Aspect_PixMap.cdl
deleted file mode 100644
index a95d3c3..0000000
--- a/src/Aspect/Aspect_PixMap.cdl
+++ /dev/null
@@ -1,92 +0,0 @@
--- Created on: 1999-10-14
--- Created by: VKH
--- Copyright (c) 1999 Matra Datavision
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- The content of this file is subject to the Open CASCADE Technology Public
--- License Version 6.5 (the "License"). You may not use the content of this file
--- except in compliance with the License. Please obtain a copy of the License
--- at http://www.opencascade.org and read it completely before using this file.
---
--- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
--- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
---
--- The Original Code and all software distributed under the License is
--- distributed on an "AS IS" basis, without warranty of any kind, and the
--- Initial Developer hereby disclaims all such warranties, including without
--- limitation, any warranties of merchantability, fitness for a particular
--- purpose or non-infringement. Please see the License for the specific terms
--- and conditions governing the rights and limitations under the License.
-
--- Updated:	GG IMP100701 Add the "depth" field and method
---              to the pixmap object.
-
-
-deferred class PixMap from Aspect
-inherits
-    TShared from MMgt
-    ---Purpose: This class allows the definition of a pixmap(bitmap)
-
-uses
-    Handle                from Aspect,
-    Color                 from Quantity
-
-raises
-    PixmapDefinitionError	from Aspect,
-    PixmapError           from Aspect
-is
-    Initialize ( aWidth, anHeight : Integer from Standard;
-                 aDepth           : Integer from Standard );
-    ---Level: Public
-    ---Purpose: Initializes the datas of a pixmap with a pixel size
-    -- <aWidth>,<anHeight> and depth.
-
-    Destroy ( me : mutable )
-    raises PixmapError from Aspect is deferred;
-    ---Level: Advanced
-    ---Purpose: Destroy the pixmap
-    ---Category: Methods to modify the class definition
-
-    Dump ( me ; aFilename : CString from Standard;
-           aGammaValue: Real from Standard = 1.0 )
-    returns Boolean
-    raises PixmapError from Aspect is deferred;
-    ---Level: Advanced
-    ---Purpose:
-    -- Dumps the Bitmap to an image file with
-    -- an optional gamma correction value
-    -- and returns TRUE if the dump occurs normaly.
-    ---Trigger: Raises if pixmap is not defined properly
-
-    PixelColor ( me         : in;
-                 theX, theY : in Integer from Standard )
-    returns Color from Quantity is deferred;
-    ---Purpose:
-    -- Returns the pixel color.
-
-	  ----------------------------
-    -- Category: Inquire methods
-    ----------------------------
-
-    PixmapID ( me ) returns Handle from Aspect
-    is deferred;
-    ---Level: Advanced
-    ---Purpose: Returns the ID of the just created pixmap
-    ---Category: Inquire methods
-
-    Size ( me ; aWidth, anHeight : out Integer from Standard )
-    is static;
-    ---Level: Public
-    ---Purpose: Returns the allocated pixmap's size in PIXEL
-    ---Category: Inquire methods
-
-    Depth ( me ) returns Integer from Standard
-    is static;
-    ---Level: Public
-    ---Purpose: Returns the allocated pixmap's depth (planes number)
-    ---Category: Inquire methods
-fields
-    myWidth  : Integer from Standard is protected;
-    myHeight : Integer from Standard is protected;
-    myDepth	 : Integer from Standard is protected;
-end PixMap;
diff --git a/src/Aspect/Aspect_PixMap.cxx b/src/Aspect/Aspect_PixMap.cxx
deleted file mode 100644
index ea1cd94..0000000
--- a/src/Aspect/Aspect_PixMap.cxx
+++ /dev/null
@@ -1,52 +0,0 @@
-// Created on: 1999-10-14
-// Created by: VKH
-// Copyright (c) 1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-
-// Updated	GG IMP100701 Add the "depth" field and method
-//		to the pixmap object.
-
-
-//-Version
-
-#include <Aspect_PixMap.ixx>
-
-//-Constructor
-////////////////////////////////////////////////////////////////////
-Aspect_PixMap::Aspect_PixMap ( const Standard_Integer aWidth,
-                               const Standard_Integer anHeight,
-			       const Standard_Integer aDepth )
-{
-  myWidth = aWidth;
-  myHeight = anHeight;
-  myDepth = aDepth;
-}
-
-////////////////////////////////////////////////////////////
-void Aspect_PixMap::Size ( Standard_Integer &aWidth,
-                  Standard_Integer &anHeight ) const {
-  aWidth = myWidth;
-  anHeight = myHeight;
-}
-
-////////////////////////////////////////////////////////////
-Standard_Integer Aspect_PixMap::Depth () const { 
-  return myDepth;
-}
-
diff --git a/src/Aspect/Aspect_Window.cdl b/src/Aspect/Aspect_Window.cdl
index 859836b..f939cbd 100644
--- a/src/Aspect/Aspect_Window.cdl
+++ b/src/Aspect/Aspect_Window.cdl
@@ -42,7 +42,6 @@ uses
         TypeOfResize       from Aspect,
         FillMethod         from Aspect,
         Handle             from Aspect,
-        PixMap             from Aspect,
         Ratio              from Quantity,
         Parameter          from Quantity,
         NameOfColor        from Quantity,
@@ -208,12 +207,6 @@ is
         --          or the area is out of the Window.
         raises WindowError from Aspect is deferred;
 
-        ToPixMap ( me )
-        returns PixMap from Aspect
-        ---Level   : Public
-        ---Purpose : dump the full contents of the window to a pixmap.
-        is deferred;
-
         Load ( me ; aFilename : CString from Standard) returns Boolean
         ---Level: Advanced
         ---Purpose: Loads the XWD file to this Window.
diff --git a/src/BOP/BOP_ArgumentAnalyzer.cxx b/src/BOP/BOP_ArgumentAnalyzer.cxx
index 95f33b9..b187ec9 100644
--- a/src/BOP/BOP_ArgumentAnalyzer.cxx
+++ b/src/BOP/BOP_ArgumentAnalyzer.cxx
@@ -928,7 +928,7 @@ Standard_Boolean TestSubShapeType(const TopAbs_ShapeEnum theT1,
       }
     }
     if((aT1==TopAbs_WIRE && aT2==TopAbs_SHELL) ||
-       (aT1==TopAbs_WIRE && aT2==TopAbs_SHELL)) {
+       (aT2==TopAbs_WIRE && aT1==TopAbs_SHELL)) {
       if(!BOP_WireShell::CheckArgTypes(aT1,aT2,theOP)) {
         return Standard_False;
       }
diff --git a/src/BOP/BOP_FaceBuilder.cxx b/src/BOP/BOP_FaceBuilder.cxx
index 0a2a91b..4de3ac8 100644
--- a/src/BOP/BOP_FaceBuilder.cxx
+++ b/src/BOP/BOP_FaceBuilder.cxx
@@ -23,9 +23,15 @@
 #include <Geom_Surface.hxx>
 #include <Geom_Curve.hxx>
 
+#include <Geom2dInt_Geom2dCurveTool.hxx>
+
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
+
+#include <BRepLib.hxx>
+
 #include <BRepAdaptor_Surface.hxx>
+#include <BRepAdaptor_Curve2d.hxx>
 
 #include <TopAbs_Orientation.hxx>
 
@@ -36,6 +42,9 @@
 #include <TopTools_ListOfShape.hxx>
 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopTools_DataMapOfShapeShape.hxx>
+#include <TopTools_DataMapOfShapeListOfShape.hxx>
+#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
 
 #include <TopoDS.hxx>
 #include <TopoDS_Face.hxx>
@@ -60,13 +69,8 @@
 #include <BOP_BuilderTools.hxx>
 #include <BOP_ListIteratorOfListOfConnexityBlock.hxx>
 #include <BOP_ConnexityBlock.hxx>
+#include <BRepBuilderAPI_Copy.hxx>
 
-//modified by NIZNHY-PKV Wed Feb 29 10:04:56 2012t
-#include <TopTools_DataMapOfShapeShape.hxx>
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-#include <BRepAdaptor_Curve2d.hxx>
-#include <Geom2dInt_Geom2dCurveTool.hxx>
 
 static
   Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
@@ -78,7 +82,6 @@ static
   Standard_Boolean IsInside(const TopoDS_Shape& theHole,
 			    const TopoDS_Shape& theF2,
 			    const Handle(IntTools_Context)& theContext);
-//modified by NIZNHY-PKV Wed Feb 29 10:05:21 2012t
 static 
   void DoTopologicalVerification(TopoDS_Face& F);
 
@@ -166,34 +169,17 @@ void BOP_FaceBuilder::Do(const BOP_WireEdgeSet& aWES,
   myFace=aWES.Face();
   myWES=(BOP_WireEdgeSet*) &aWES;
   //
-  //modified by NIZNHY-PKV Wed Feb 29 10:57:31 2012f
   if (myContext.IsNull()) {
     myContext=new IntTools_Context;
   }
-  //modified by NIZNHY-PKV Wed Feb 29 10:57:34 2012t
   //
   BOP_WESCorrector aWESCor;
   aWESCor.SetWES(aWES);
   aWESCor.Do();
   BOP_WireEdgeSet& aNewWES=aWESCor.NewWES();
-  //
-  //modified by NIZNHY-PKV Wed Feb 29 09:28:06 2012f
-  /*
-  //Make Loops. Only Loops are allowed after WESCorrector 
-  MakeLoops(aNewWES);
-  //
-  BOP_BlockBuilder& aBB = myBlockBuilder;
-  BOP_WireEdgeClassifier WEC(myFace, aBB);
-  BOP_LoopSet& LS = myLoopSet;
-  //
-  myFaceAreaBuilder.InitFaceAreaBuilder(LS, WEC, bForceClass);
-
-  BuildNewFaces();
-  */
-  
+  // 
   PerformAreas(aNewWES);
-  //modified by NIZNHY-PKV Wed Feb 29 09:28:08 2012t
-  
+  //
   if (myTreatment==0) {
     DoInternalEdges(); 
   }
@@ -312,11 +298,7 @@ void BOP_FaceBuilder::DoInternalEdges()
       for (; anIt.More(); anIt.Next()) {
 	TopoDS_Face& aF=TopoDS::Face(anIt.Value());
 	//
-	//modified by NIZNHY-PKV Wed Feb 29 10:59:40 2012f
-	//IntTools_Context aCtx;
-	//bIsPointInOnFace=aCtx.IsPointInOnFace(aF, aP2D);
 	bIsPointInOnFace=myContext->IsPointInOnFace(aF, aP2D);
-	//modified by NIZNHY-PKV Wed Feb 29 10:59:43 2012t
 	//
 	if (bIsPointInOnFace) {
 	  //
@@ -483,7 +465,6 @@ void BOP_FaceBuilder::SDScales()
     myNewFaces.Append(aF);
   }
 }
-//modified by NIZNHY-PKV Wed Feb 29 08:57:52 2012f
 //=======================================================================
 //function : PerformAreas
 //purpose  : 
@@ -656,17 +637,24 @@ Standard_Boolean IsHole(const TopoDS_Shape& aW,
 {
   Standard_Boolean bIsHole;
   Standard_Real aTolF;
-  TopoDS_Shape aFE;
-  TopoDS_Face aFF;
+  TopoDS_Face aFF, aFC;
   BRep_Builder aBB;
   IntTools_FClass2d aFClass2d;
   //
-  aFE=aFace.EmptyCopied();
-  aFF=TopoDS::Face(aFE);
+  aFF=TopoDS::Face(aFace.EmptyCopied());
   aFF.Orientation(TopAbs_FORWARD);
   aBB.Add(aFF, aW);
   //
+  BRepBuilderAPI_Copy aBC;
+  //
+  aBC.Perform(aFF);
+  aFC=TopoDS::Face(aBC.Shape());
+  aFF=aFC;
+  //
   aTolF=BRep_Tool::Tolerance(aFF);
+  //modified by NIZNHY-PKV Thu Aug 23 09:18:05 2012f
+  BRepLib::SameParameter(aFF, aTolF, Standard_True);
+  //modified by NIZNHY-PKV Thu Aug 23 09:18:08 2012t
   //
   aFClass2d.Init(aFF, aTolF);
   //
@@ -714,8 +702,6 @@ Standard_Boolean IsInside(const TopoDS_Shape& theHole,
   //
   return bRet;
 }
-//modified by NIZNHY-PKV Wed Feb 29 08:57:55 2012t
-
 //=======================================================================
 //function : DoTopologicalVerification
 //purpose  : 
@@ -812,273 +798,4 @@ void DoTopologicalVerification(TopoDS_Face& F)
     }
   }
 }
-//modified by NIZNHY-PKV Wed Feb 29 10:07:16 2012f
-/*
-//=======================================================================
-//function : MakeLoops
-//purpose  : 
-//=======================================================================
-  void BOP_FaceBuilder::MakeLoops(BOP_WireEdgeSet& SS)
-{
-  //BOP_BlockBuilder& BB = myBlockBuilder;
-  BOP_ListOfLoop& LL = myLoopSet.ChangeListOfLoop();
-  
-  // Build blocks on elements of SS [ Ready to remove this invocation]
-  // make list of loop (LL) of the LoopSet
-  // - on shapes of the ShapeSet (SS)
-  // - on blocks of the BlockBuilder (BB)
-  //
-  // Add shapes of SS as shape loops
-  LL.Clear();
-  for(SS.InitShapes();SS.MoreShapes();SS.NextShape()) {
-    const TopoDS_Shape& S = SS.Shape();
-    Handle(BOP_Loop) ShapeLoop = new BOP_Loop(S);
-    LL.Append(ShapeLoop);
-  }
-}
-*/
-/*
-//=======================================================================
-//function : BuildNewFaces
-//purpose  : 
-//=======================================================================
-  void BOP_FaceBuilder::BuildNewFaces() 
-{
-  Standard_Real    aTol;
-  TopLoc_Location aLoc;
-  TopoDS_Face newFace;
-  TopoDS_Wire newWire;
-  BRep_Builder aBB;
-  Standard_Boolean bValidWire, bValidFace;
-  
-  Handle(Geom_Surface) aSurface=BRep_Tool::Surface(myFace, aLoc);
-  aTol=BRep_Tool::Tolerance(myFace);
-
-  myNewFaces.Clear();
-  myNegatives.Clear();
-
-  InitFace();
-  for (; MoreFace(); NextFace()) {
-    bValidFace=Standard_False;
-    aBB.MakeFace (newFace, aSurface, aLoc, aTol);
-
-    InitWire();
-    for (; MoreWire(); NextWire()) {
-      if (IsOldWire()) {
-	newWire=TopoDS::Wire(OldWire());
-      }
-      else {
-	aBB.MakeWire(newWire);
-	InitEdge();
-	for (; MoreEdge(); NextEdge()) {
-	  const TopoDS_Edge& newEdge=Edge();
-	  aBB.Add(newWire, newEdge);
-	}
-      }
-      
-      bValidWire=BOPTools_Tools3D::IsConvexWire(newWire);
-      if (bValidWire) {
-	bValidFace=Standard_True;
-	aBB.Add(newFace, newWire);
-      }
-
-      else {
-	if (!myManifoldFlag && myTreatment==1) {
-	  myNewFaces.Append (newWire);
-	}
-      }
-    } // end of for (; MoreWire(); NextWire())
-    
-    if (bValidFace) {
-      
-      Standard_Boolean bIsValidIn2D, bNegativeFlag;
-      Standard_Integer iNegativeFlag;
-
-      bIsValidIn2D=BOPTools_Tools3D::IsValidArea (newFace, bNegativeFlag);
-      if(bIsValidIn2D) {
-	myNewFaces.Append (newFace);
-	iNegativeFlag=(Standard_Integer)bNegativeFlag;
-	myNegatives.Append(iNegativeFlag);
-      }
-    }
-  }
-}
-*/
-/*
-//=======================================================================
-//function : InitFace
-//purpose  : 
-//=======================================================================
-  Standard_Integer BOP_FaceBuilder::InitFace()
-{
-  Standard_Integer n = myFaceAreaBuilder.InitArea();
-  return n;
-}
-//=======================================================================
-//function : MoreFace
-//purpose  : 
-//=======================================================================
-  Standard_Boolean BOP_FaceBuilder::MoreFace() const
-{
-  Standard_Boolean b = myFaceAreaBuilder.MoreArea();
-  return b;
-}
-//=======================================================================
-//function : NextFace
-//purpose  : 
-//=======================================================================
-  void BOP_FaceBuilder::NextFace()
-{
-  myFaceAreaBuilder.NextArea();
-}
-
-//=======================================================================
-//function : InitWire
-//purpose  : 
-//=======================================================================
-  Standard_Integer BOP_FaceBuilder::InitWire()
-{
-  Standard_Integer n = myFaceAreaBuilder.InitLoop();
-  return n;
-}
-//=======================================================================
-//function : MoreWire
-//purpose  : 
-//=======================================================================
-  Standard_Boolean BOP_FaceBuilder::MoreWire() const
-{
-  Standard_Boolean b = myFaceAreaBuilder.MoreLoop();
-  return b;
-}
-//=======================================================================
-//function : NextWire
-//purpose  : 
-//=======================================================================
-  void BOP_FaceBuilder::NextWire()
-{
-  myFaceAreaBuilder.NextLoop();
-}
-//=======================================================================
-//function : IsOldWire
-//purpose  : 
-//=======================================================================
-  Standard_Boolean BOP_FaceBuilder::IsOldWire() const
-{
-  const Handle(BOP_Loop)& L = myFaceAreaBuilder.Loop();
-  Standard_Boolean b = L->IsShape();
-  return b;
-}
-//=======================================================================
-//function : OldWire
-//purpose  : 
-//=======================================================================
-  const TopoDS_Shape& BOP_FaceBuilder::OldWire() const
-{
-  const Handle(BOP_Loop)& L = myFaceAreaBuilder.Loop();
-  return L->Shape();
-}
-//=======================================================================
-//function : Wire
-//purpose  : 
-//=======================================================================
-  const TopoDS_Wire& BOP_FaceBuilder::Wire() const
-{
-  return TopoDS::Wire(OldWire());
-}
-*/
-/*
-//=======================================================================
-//function : InitEdge
-//purpose  : 
-//=======================================================================
-  Standard_Integer BOP_FaceBuilder::InitEdge()
-{
-  const Handle(BOP_Loop)& L = myFaceAreaBuilder.Loop();
-  if ( L->IsShape() ){
-    Standard_DomainError::Raise("BOP_FaceBuilder:InitEdge");
-  }
-  else {
-    myBlockIterator = L->BlockIterator();
-    myBlockIterator.Initialize();
-    FindNextValidElement();
-  }
-  Standard_Integer n = myBlockIterator.Extent();
-  return n;
-}
-//=======================================================================
-//function : FindNextValidElement
-//purpose  : 
-//=======================================================================
-  void BOP_FaceBuilder::FindNextValidElement()
-{
-  // prerequisites : myBlockIterator.Initialize
-  Standard_Boolean found = Standard_False;
-
-  while ( myBlockIterator.More()) {
-    const Standard_Integer i = myBlockIterator.Value();
-    found = myBlockBuilder.ElementIsValid(i);
-    if (found) break;
-    else myBlockIterator.Next();
-  }
-}
-//=======================================================================
-//function : MoreEdge
-//purpose  : 
-//=======================================================================
-  Standard_Boolean BOP_FaceBuilder::MoreEdge() const
-{
-  Standard_Boolean b = myBlockIterator.More();
-  return b;
-}
-//=======================================================================
-//function : NextEdge
-//purpose  : 
-//=======================================================================
-  void BOP_FaceBuilder::NextEdge()
-{
-  myBlockIterator.Next();
-  FindNextValidElement();
-}
-//=======================================================================
-//function : Edge
-//purpose  : 
-//=======================================================================
-  const TopoDS_Edge& BOP_FaceBuilder::Edge() const
-{
-  if (!myBlockIterator.More()) {
-    Standard_Failure::Raise("OutOfRange");
-  }
-  
-  Standard_Integer i = myBlockIterator.Value();
-  
-  Standard_Boolean isvalid = myBlockBuilder.ElementIsValid(i);
- 
-  if (!isvalid) {
-    Standard_Failure::Raise("Edge not Valid");
-  }
 
-  const TopoDS_Shape& E = myBlockBuilder.Element(i);
-  const TopoDS_Edge& anEdge = TopoDS::Edge(E);
-  
-  return anEdge;
-}
-*/
-/*
-//=======================================================================
-//function : SetManifoldFlag
-//purpose  : 
-//=======================================================================
-  void BOP_FaceBuilder::SetManifoldFlag(const Standard_Boolean aManifoldFlag)
-{
-  myManifoldFlag=aManifoldFlag;
-}
-//=======================================================================
-//function : ManifoldFlag
-//purpose  : 
-//=======================================================================
-  Standard_Boolean BOP_FaceBuilder::ManifoldFlag()const
-{
-  return myManifoldFlag;
-}
-*/
-//modified by NIZNHY-PKV Wed Feb 29 10:07:05 2012t
diff --git a/src/BOP/BOP_SDFWESFiller.cxx b/src/BOP/BOP_SDFWESFiller.cxx
index 2c2784d..2818165 100644
--- a/src/BOP/BOP_SDFWESFiller.cxx
+++ b/src/BOP/BOP_SDFWESFiller.cxx
@@ -84,6 +84,11 @@ static void TreatSDSeams (const TopoDS_Edge& aSpE1Seam11,
 			  BOP_WireEdgeSet& aWES,
 			  const Handle(IntTools_Context)& aContext);
 
+//modified by NIZNHY-PKV Tue Sep 25 14:26:14 2012f
+static 
+  Standard_Boolean IsClosed(const TopoDS_Edge& aE,
+			    const TopoDS_Face& aF);
+//modified by NIZNHY-PKV Tue Sep 25 14:26:17 2012t
 
 //=======================================================================
 // function: BOP_SDFWESFiller::BOP_SDFWESFiller
@@ -663,7 +668,10 @@ static void TreatSDSeams (const TopoDS_Edge& aSpE1Seam11,
 	  //
 	  aWES.AddStartElement (aSS);
 	  //
-	  if (BRep_Tool::IsClosed(aSS, aF2FWD)){
+	  //modified by NIZNHY-PKV Tue Sep 25 14:25:13 2012f
+	  if (IsClosed(aSS, aF2FWD)){
+	  //if (BRep_Tool::IsClosed(aSS, aF2FWD)){
+	    //modified by NIZNHY-PKV Tue Sep 25 14:25:35 2012t
 	    TopoDS_Shape EE=aSS.Reversed();
 	    aWES.AddStartElement (EE);
 	  }
@@ -1318,3 +1326,40 @@ void TreatSDSeams (const TopoDS_Edge& aSpE1Seam11,
     aSS=aSpE1Seam21;
   }
 }
+//modified by NIZNHY-PKV Tue Sep 25 14:25:53 2012f
+//=======================================================================
+//function : IsClosed
+//purpose  :
+//=======================================================================
+Standard_Boolean IsClosed(const TopoDS_Edge& aE,
+			  const TopoDS_Face& aF)
+{
+  Standard_Boolean bRet;
+  //
+  bRet=BRep_Tool::IsClosed(aE, aF);
+  if (bRet) {
+    Standard_Integer iCnt;
+    TopoDS_Shape aE1;
+    //
+    bRet=!bRet;
+    iCnt=0;
+    TopExp_Explorer aExp(aF, TopAbs_EDGE);
+    for (; aExp.More(); aExp.Next()) {
+      const TopoDS_Shape& aEx=aExp.Current();
+      //
+      if (aEx.IsSame(aE)) {
+	++iCnt;
+	if (iCnt==1) {
+	  aE1=aEx;
+	}
+	else if (iCnt==2){
+	  aE1.Reverse();
+	  bRet=(aE1==aEx);
+	  break;
+	}
+      }
+    }
+  }
+  return bRet;
+}
+//modified by NIZNHY-PKV Tue Sep 25 14:25:56 2012t
diff --git a/src/BOP/BOP_ShellFaceClassifier.cxx b/src/BOP/BOP_ShellFaceClassifier.cxx
index 9a84a70..a9130c3 100644
--- a/src/BOP/BOP_ShellFaceClassifier.cxx
+++ b/src/BOP/BOP_ShellFaceClassifier.cxx
@@ -24,6 +24,8 @@
 #include <TopExp_Explorer.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Surface.hxx>
+#include <Geom_Curve.hxx>
+#include <IntTools_Tools.hxx>
 
 // ==================================================================
 // function: BOP_ShellFaceClassifier::BOP_ShellFaceClassifier
@@ -89,14 +91,36 @@ BOP_ShellFaceClassifier::BOP_ShellFaceClassifier
 // function: ResetElement
 // purpose: 
 // ===============================================================================================
-  void BOP_ShellFaceClassifier::ResetElement(const TopoDS_Shape& theElement) 
+void BOP_ShellFaceClassifier::ResetElement(const TopoDS_Shape& theElement) 
 {
-  const TopAbs_ShapeEnum aShapeType= theElement.ShapeType();
-
+  Standard_Boolean bFound;
+  TopAbs_ShapeEnum aShapeType;
+  TopExp_Explorer anExp;
+  //
+  myFirstCompare=Standard_True;
+  aShapeType=theElement.ShapeType();
+  //
+  bFound=Standard_False;
+  anExp.Init(theElement, TopAbs_EDGE);
+  for(; anExp.More(); anExp.Next()) {
+    const TopoDS_Edge& aE=*((TopoDS_Edge*)&anExp.Current());
+    if (!BRep_Tool::Degenerated(aE)) {
+      Standard_Real aT, aT1, aT2;
+      Handle(Geom_Curve) aC;
+      //
+      aC=BRep_Tool::Curve(aE, aT1, aT2);
+      aT=IntTools_Tools::IntermediatePoint(aT1, aT2);
+      aC->D0(aT, myPoint);
+      bFound=Standard_True;
+      break;
+    }
+  }
+  if (bFound) {
+    return;
+  }
+  //
   // initialize myPoint with first vertex of face <E>
-  myFirstCompare = Standard_True;
-  TopExp_Explorer anExp(theElement, TopAbs_VERTEX);
-
+  anExp.Init(theElement, TopAbs_VERTEX);
   if(anExp.More()) {
     const TopoDS_Vertex& aVertex = TopoDS::Vertex(anExp.Current());
     myPoint = BRep_Tool::Pnt(aVertex);
diff --git a/src/BOP/BOP_ShellShell.cxx b/src/BOP/BOP_ShellShell.cxx
index 2431d8b..48f1671 100644
--- a/src/BOP/BOP_ShellShell.cxx
+++ b/src/BOP/BOP_ShellShell.cxx
@@ -65,6 +65,7 @@
 #include <BOP_Refiner.hxx>
 #include <Standard_Failure.hxx>
 #include <Standard_ErrorHandler.hxx>
+#include <TopTools_DataMapOfShapeInteger.hxx>
 
 
 
@@ -80,13 +81,14 @@ BOP_ShellShell::BOP_ShellShell()
 // function: Destroy
 // purpose: 
 //=======================================================================
-  void BOP_ShellShell::Destroy() {}
+void BOP_ShellShell::Destroy() {
+}
 
 //=======================================================================
 // function: DoWithFiller
 // purpose: 
 //=======================================================================
-  void BOP_ShellShell::DoWithFiller(const BOPTools_DSFiller& aDSFiller) 
+void BOP_ShellShell::DoWithFiller(const BOPTools_DSFiller& aDSFiller) 
 {
   myErrorStatus=0;
   myIsDone=Standard_False;
@@ -99,14 +101,12 @@ BOP_ShellShell::BOP_ShellShell()
   try {
     OCC_CATCH_SIGNALS
 
-    // modified by NIZHNY-MKK  Fri Sep  3 15:14:17 2004.BEGIN
     if(!myDSFiller->IsDone()) {
       myErrorStatus = 1;
       BOPTColStd_Dump::PrintMessage("DSFiller is invalid: Can not build result\n");
       return;
     }
-    // modified by NIZHNY-MKK  Fri Sep  3 15:14:20 2004.END
-
+    //
     Standard_Boolean bIsNewFiller;
     bIsNewFiller=aDSFiller.IsNewFiller();
     
@@ -141,7 +141,7 @@ BOP_ShellShell::BOP_ShellShell()
 // function: BuildResult
 // purpose: 
 //=================================================================================
-  void BOP_ShellShell::BuildResult()
+void BOP_ShellShell::BuildResult()
 {
   const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS();
   
@@ -231,7 +231,7 @@ BOP_ShellShell::BOP_ShellShell()
   //
   // vars
   Standard_Boolean bIsTouchCase, bIsTouch;
-  Standard_Integer i, aNb, j, aNbj, iFF, nF1;
+  Standard_Integer i, aNb, j, aNbj, iFF, nF1, iRank, nF2;
   TopTools_ListOfShape aListOfNewFaces;
   TopTools_IndexedMapOfShape anEMap;
   TopAbs_Orientation anOriF1;
@@ -282,6 +282,65 @@ BOP_ShellShell::BOP_ShellShell()
 	}
       }
       // 3. Add IN2D, ON2D Parts to the WES 
+      //
+      //modified by NIZNHY-PKV Fri Sep 14 10:00:44 2012f
+      BOP_WireEdgeSet aWES1 (myFace);
+      //
+      for (j=1; j<=aNbj; j++) {
+	iFF=aFFIndicesMap(j);
+	BOPTools_SSInterference& aFF=aFFs(iFF);
+	bIsTouch=aFF.IsTangentFaces();
+	if (bIsTouch) {
+	  nF2=aFF.OppositeIndex(nF1);
+	  AddINON2DPartsSh(nF1, iFF, aWES1);
+	}
+      }
+      //
+      if (iRank==2 || (iRank==1 && myOperation==BOP_CUT)) {
+	// #0023431
+	// Refine WES to remove duplicated edges: 
+	// - for the faces of the Object: Cut operation
+	// - for the faces of the Tool: all operations
+	//
+	// The duplications caused by the separated treatment
+	// the faces of an argument for the cases when: 
+	// -these faces contain shared edges and 
+	// -they are same domain faces with the faces of the other argument.
+	TopTools_DataMapOfShapeInteger aDMSI;
+
+	//--
+	aWES1.InitStartElements();
+	for (; aWES1.MoreStartElements(); aWES1.NextStartElement()) {
+	  const TopoDS_Edge& aE=*((TopoDS_Edge*)&aWES1.StartElement()); 
+	  if (!aDMSI.IsBound(aE)) {
+	    Standard_Integer iCnt=1;
+	    //
+	    aDMSI.Bind(aE, iCnt);
+	  }
+	  else {
+	    Standard_Integer& iCnt=aDMSI.ChangeFind(aE);
+	    ++iCnt;
+	  }
+	}
+	//
+	aWES1.InitStartElements();
+	for (; aWES1.MoreStartElements(); aWES1.NextStartElement()) {
+	  const TopoDS_Shape& aE=aWES1.StartElement(); 
+	  const Standard_Integer& iCnt=aDMSI.Find(aE);
+	  if (iCnt==1) {
+	    aWES.AddStartElement(aE);
+	  }
+	}
+      }
+      else {
+	aWES1.InitStartElements();
+	for (; aWES1.MoreStartElements(); aWES1.NextStartElement()) {
+	  const TopoDS_Shape& aE=aWES1.StartElement(); 
+	  aWES.AddStartElement(aE);
+	}
+      }
+      //--
+      /*
       for (j=1; j<=aNbj; j++) {
 	iFF=aFFIndicesMap(j);
 	BOPTools_SSInterference& aFF=aFFs(iFF);
@@ -290,6 +349,8 @@ BOP_ShellShell::BOP_ShellShell()
 	  AddINON2DPartsSh(nF1, iFF, aWES);
 	}
       }
+      */
+      //modified by NIZNHY-PKV Fri Sep 14 10:00:48 2012t
       // 4. Add EF parts (E (from F2) on F1 ),
       // where F2 is non-same-domain face to F1
       anEMap.Clear();
@@ -355,15 +416,6 @@ BOP_ShellShell::BOP_ShellShell()
       }
     }// end of (bIsTouchCase)'s else
     //
-    //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-    // Display the WES
-    if (myDraw)  {
-      const TopTools_ListOfShape& aWESL=aWES.StartElements();
-      BOP_Draw::DrawListOfEdgesWithPC (myFace, aWESL, i, "ew_"); 
-      BOP_Draw::Wait();
-    }
-    //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
     //
     // d. Build new Faces from myFace
     BOP_FaceBuilder aFB;
@@ -393,12 +445,24 @@ BOP_ShellShell::BOP_ShellShell()
     //
   }//  for (i=1; i<=aNb; i++)
   //
-  //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-  // Display the new Faces
-  if (myDraw) { 
-    BOP_Draw::DrawListOfShape(aListOfNewFaces, "fn_");
-  }
-  //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ 
   myNewFaces.Clear();
   myNewFaces.Append(aListOfNewFaces);
 }
+/* DEB
+    {
+      TopoDS_Compound aCx;
+      BRep_Builder aBB;
+      //
+      aBB.MakeCompound(aCx);
+      aBB.Add(aCx, myFace);
+      //
+      aWES.InitStartElements();
+      for (; aWES.MoreStartElements(); aWES.NextStartElement()) {
+	const TopoDS_Shape& aE = aWES.StartElement(); 
+	aBB.Add(aCx, aE);
+      }
+      int a=0;
+    }
+ 
+*/
diff --git a/src/BOPTest/BOPTest_BOPCommands.cxx b/src/BOPTest/BOPTest_BOPCommands.cxx
index 102e771..7ea27d2 100644
--- a/src/BOPTest/BOPTest_BOPCommands.cxx
+++ b/src/BOPTest/BOPTest_BOPCommands.cxx
@@ -1506,7 +1506,7 @@ Standard_Integer bopsinf (Draw_Interpretor& di,
   }
   
   if (aS1.ShapeType()!=TopAbs_FACE ||
-      aS1.ShapeType()!=TopAbs_FACE ) {
+      aS2.ShapeType()!=TopAbs_FACE ) {
     //printf(" Shapes #%d #%d are not faces\n", nF1, nF2 );
     di << " Shapes #" << nF1 << " #" << nF2 << " are not faces\n";
     return 0;
@@ -1568,7 +1568,7 @@ Standard_Integer bopsonf (Draw_Interpretor& di,
   }
   
   if (aS1.ShapeType()!=TopAbs_FACE ||
-      aS1.ShapeType()!=TopAbs_FACE ) {
+      aS2.ShapeType()!=TopAbs_FACE ) {
     //printf(" Shapes #%d #%d are not faces\n", nF1, nF2 );
     di << " Shapes #" << nF1 << " #" << nF2 << " are not faces\n";
     return 0;
diff --git a/src/BOPTools/BOPTools_PaveFiller_3.cxx b/src/BOPTools/BOPTools_PaveFiller_3.cxx
index 76ee262..36892fc 100644
--- a/src/BOPTools/BOPTools_PaveFiller_3.cxx
+++ b/src/BOPTools/BOPTools_PaveFiller_3.cxx
@@ -2038,7 +2038,7 @@ void ProcessAloneStickVertices(const Standard_Integer nF1,
 	const IntTools_Curve& aIC=aBC.Curve();
 	//Handle(Geom_Curve) aC3D=aIC.Curve(); //DEB
 	aTypeC=aIC.Type();
-	if (!(aTypeC==GeomAbs_BezierCurve || GeomAbs_BSplineCurve)) {
+	if (!(aTypeC==GeomAbs_BezierCurve || aTypeC==GeomAbs_BSplineCurve)) {
 	  continue;
 	}
 	//
diff --git a/src/BOPTools/BOPTools_Tools2D.cxx b/src/BOPTools/BOPTools_Tools2D.cxx
index 584b0d2..6ea6565 100644
--- a/src/BOPTools/BOPTools_Tools2D.cxx
+++ b/src/BOPTools/BOPTools_Tools2D.cxx
@@ -453,9 +453,6 @@ static
     
     decalu = mincond || maxcond;
     if (decalu) {
-      //modified by NIZNHY-PKV Mon Mar 25 16:44:46 2008f
-      //du = ( mincond ) ? UPeriod : -UPeriod;
-      //
       iCnt=1;
       aUP2=aUPeriod+aUPeriod+aDelta;
       aUP1=aUPeriod+aDelta;
@@ -473,14 +470,16 @@ static
 	for(k=1; 1; ++k) {
 	  aUx=u2+k*aUPeriod;
 	  if (aUx > -aUP1) {
-	    iCnt=k;
+	    //modified by NIZNHY-PKV Thu Apr 12 08:12:09 2012f
+	    iCnt=k+1;
+	    //iCnt=k;
+	    //modified by NIZNHY-PKV Thu Apr 12 08:12:11 2012t
 	    break;
 	  }
 	}
       }
       du = ( mincond ) ? aUPeriod : -aUPeriod;
       du=iCnt*du;
-      //modified by NIZNHY-PKV Mon Mar 25 16:44:49 2008t
     }
     //
     aUNew=u2+du;
@@ -705,6 +704,9 @@ static
   Standard_Real aT, aT1, aT2;
 
   Handle(Geom_Curve)aC1=BRep_Tool::Curve(aE, aT1, aT2);
+  if (aC1.IsNull())
+    BRep_Tool::Range(aE, aT1, aT2);
+  
   aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2);
   return aT;
 }
diff --git a/src/BOPTools/BOPTools_Tools3D.cxx b/src/BOPTools/BOPTools_Tools3D.cxx
index 0c42ee5..47a3cd8 100644
--- a/src/BOPTools/BOPTools_Tools3D.cxx
+++ b/src/BOPTools/BOPTools_Tools3D.cxx
@@ -510,6 +510,9 @@ Standard_Boolean BOPTools_Tools3D::DoSplitSEAMOnFace(const TopoDS_Edge& theSplit
   gp_Dir aDT1(aV1);
   //
   aFlag=aContext->ProjectPointOnEdge(aP, aEF2, aT2);
+  if(!aFlag) {
+    return Standard_False;
+  }
   //
   aFlag=BOPTools_Tools2D::EdgeTangent(aEF2, aT2, aV2);
   if(!aFlag) {
diff --git a/src/BOPTools/BOPTools_Tools3D_1.cxx b/src/BOPTools/BOPTools_Tools3D_1.cxx
index 26762e1..e235c47 100644
--- a/src/BOPTools/BOPTools_Tools3D_1.cxx
+++ b/src/BOPTools/BOPTools_Tools3D_1.cxx
@@ -50,6 +50,12 @@
 
 #include <BOPTools_Tools2D.hxx>
 
+static Standard_Boolean CheckPointInside(BRepClass3d_SolidClassifier& aSolidClassifier,
+                                         const gp_Pnt& aP3d,
+                                         const Standard_Real aTolerance,
+                                         const Handle(IntTools_Context)& theContext,
+                                         TopAbs_State& aState,
+                                         Standard_Boolean& bFoundInFacePoint);
 
 //=======================================================================
 //function : GetApproxNormalToFaceOnEdge
@@ -909,43 +915,54 @@ Standard_Boolean BOPTools_Tools3D::ComputeFaceState(const TopoDS_Face&  theFace,
       Standard_Real V = (vmin + vmax) * 0.5;
 
       for(j = 1; !bFoundValidPoint && (j <= nbpoints); j++, V+=adeltav) {
-	gp_Pnt2d aPoint(U,V);
-
-	if(theContext->IsPointInOnFace(theFace, aPoint)) {
-	  bFoundInFacePoint = Standard_True;
-	  gp_Pnt aP3d = aSurface->Value(U, V);
-    
-	  aSolidClassifier.Perform(aP3d, aTolerance);
-	  aState = aSolidClassifier.State();
-
-	  if(aState != TopAbs_ON) {
-
-	    if(!aSolidClassifier.Rejected()) {
-	      TopoDS_Face aFace2 = aSolidClassifier.Face();
-
-	      if(!aFace2.IsNull()) {
-		GeomAPI_ProjectPointOnSurf& aProjector = theContext->ProjPS(aFace2);
-		aProjector.Perform(aP3d);
-
-		if(aProjector.IsDone()) {
-		  Standard_Real U2 = 0., V2 = 0.;
-		  aProjector.LowerDistanceParameters(U2, V2);
-		  gp_Pnt2d aPoint2(U2, V2);
-
-		  if(aProjector.LowerDistance() < aTolerance) {
-		    if(theContext->IsPointInFace(aFace2, aPoint2)) 
-		      aState = TopAbs_ON;
-		  }
-		}
-		bFoundValidPoint = Standard_True;
-		break;
-	      }
-	    }
-	    else {
-	      bFoundInFacePoint = Standard_False;
-	    }
-	  }
-	}
+        gp_Pnt2d aPoint(U,V);
+        
+        if(theContext->IsPointInOnFace(theFace, aPoint)) {
+          bFoundInFacePoint = Standard_True;
+          gp_Pnt aP3d = aSurface->Value(U, V);
+          
+          bFoundValidPoint = CheckPointInside(aSolidClassifier, aP3d, aTolerance, theContext,
+                                              aState, bFoundInFacePoint);
+          if (bFoundValidPoint) {
+            break;
+          }
+        }
+      }
+    }
+  }
+  //emv for salome bug 23160
+  if(!bFoundInFacePoint) {
+    TopExp_Explorer aExp;
+    Standard_Real aT1, aT2, aT, aDt2D;
+    gp_Pnt aPx, aP3d;
+    gp_Pnt2d aPoint;
+    aExp.Init(theFace, TopAbs_EDGE);
+    for(; aExp.More(); aExp.Next()) {
+      const TopoDS_Edge& aE=(*(TopoDS_Edge*)(&aExp.Current()));
+      if (aE.Orientation()==TopAbs_INTERNAL) {
+        continue;
+      }
+      //
+      if (BRep_Tool::Degenerated(aE)){
+        continue;
+      }
+      //
+      //get point inside face
+      Handle(Geom_Curve)aC3D = BRep_Tool::Curve(aE, aT1, aT2);
+      aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2);
+      aC3D->D0(aT, aPx);
+      aDt2D = BOPTools_Tools3D::MinStepIn2d();
+      aDt2D += 2*BRep_Tool::Tolerance(aE);
+      BOPTools_Tools3D::PointNearEdge (aE, theFace, aT, aDt2D, aPoint, aP3d);
+      //
+      if (theContext->IsPointInOnFace(theFace, aPoint)) {
+        bFoundInFacePoint = Standard_True;
+        
+        bFoundValidPoint = CheckPointInside(aSolidClassifier, aP3d, aTolerance, theContext,
+                                            aState, bFoundInFacePoint);
+        if (bFoundValidPoint) {
+          break;
+        }
       }
     }
   }
@@ -957,6 +974,7 @@ Standard_Boolean BOPTools_Tools3D::ComputeFaceState(const TopoDS_Face&  theFace,
 
   return Standard_True;
 }
+
 //modified by NIZNHY-PKV Thu Sep 22 10:55:14 2011f
 // ===========================================================================================
 // function: CheckSameDomainFaceInside
@@ -1022,3 +1040,52 @@ Standard_Boolean BOPTools_Tools3D::CheckSameDomainFaceInside(const TopoDS_Face&
   return bFoundON;
 }
 //modified by NIZNHY-PKV Thu Sep 22 10:55:19 2011t
+
+// ===========================================================================================
+// function: CheckPointInside
+// purpose: 
+// ===========================================================================================
+Standard_Boolean CheckPointInside(BRepClass3d_SolidClassifier& aSolidClassifier,
+                                  const gp_Pnt& aP3d,
+                                  const Standard_Real aTolerance,
+                                  const Handle(IntTools_Context)& theContext,
+                                  TopAbs_State& aState,
+                                  Standard_Boolean& bFoundInFacePoint) 
+{
+  Standard_Boolean bFoundValidPoint;
+
+  bFoundValidPoint = Standard_False;
+
+  aSolidClassifier.Perform(aP3d, aTolerance);
+  aState = aSolidClassifier.State();
+  
+  if(aState != TopAbs_ON) {
+    
+    if(!aSolidClassifier.Rejected()) {
+      TopoDS_Face aFace2 = aSolidClassifier.Face();
+      
+      if(!aFace2.IsNull()) {
+        GeomAPI_ProjectPointOnSurf& aProjector = theContext->ProjPS(aFace2);
+        aProjector.Perform(aP3d);
+        
+        if(aProjector.IsDone()) {
+          Standard_Real U2 = 0., V2 = 0.;
+          aProjector.LowerDistanceParameters(U2, V2);
+          gp_Pnt2d aPoint2(U2, V2);
+          
+          if(aProjector.LowerDistance() < aTolerance) {
+            if(theContext->IsPointInFace(aFace2, aPoint2)) {
+              aState = TopAbs_ON;
+            }
+          }
+        }
+        bFoundValidPoint = Standard_True;
+      }
+    }
+    else {
+      bFoundInFacePoint = Standard_False;
+    }
+  }
+
+  return bFoundValidPoint;
+}
diff --git a/src/BRepClass/BRepClass_Intersector.cxx b/src/BRepClass/BRepClass_Intersector.cxx
index a339f83..f984049 100644
--- a/src/BRepClass/BRepClass_Intersector.cxx
+++ b/src/BRepClass/BRepClass_Intersector.cxx
@@ -36,6 +36,10 @@
 
 #include <Geom2dInt_GInter.hxx>
 
+#include <Extrema_ExtPC2d.hxx>
+#include <IntRes2d_Transition.hxx>
+#include <IntRes2d_IntersectionPoint.hxx>
+
 //=======================================================================
 //function : BRepClass_Intersector
 //purpose  : 
@@ -73,6 +77,45 @@ void  BRepClass_Intersector::Perform(const gp_Lin2d& L,
     TopExp::Vertices(EE, Vdeb, Vfin);
     BRepAdaptor_Curve2d C(EE,F);
     Standard_Real deb = C.FirstParameter(), fin = C.LastParameter();
+
+    // Case of "ON": direct check of belonging to edge
+    // taking into account the tolerance
+    Extrema_ExtPC2d theExtPC2d(L.Location(), C);
+    Standard_Real MinDist = RealLast(), aDist;
+    Standard_Integer MinInd = 0, i;
+    if (theExtPC2d.IsDone())
+    {
+      for (i = 1; i <= theExtPC2d.NbExt(); i++)
+      {
+        aDist = theExtPC2d.SquareDistance(i);
+        if (aDist < MinDist)
+        {
+          MinDist = aDist;
+          MinInd = i;
+        }
+      }
+    }
+    if (MinInd)
+      MinDist = sqrt(MinDist);
+    if (MinDist <= Tol)
+    {
+      gp_Pnt2d pnt_exact = (theExtPC2d.Point(MinInd)).Value();
+      Standard_Real par = (theExtPC2d.Point(MinInd)).Parameter();
+      IntRes2d_Transition tr_on_lin(IntRes2d_Head);
+      IntRes2d_Position pos_on_curve = IntRes2d_Middle;
+      if (Abs(par - deb) <= Precision::Confusion())
+        pos_on_curve = IntRes2d_Head;
+      else if (Abs(par - fin) <= Precision::Confusion())
+        pos_on_curve = IntRes2d_End;
+      IntRes2d_Transition tr_on_curve(pos_on_curve);
+      IntRes2d_IntersectionPoint pnt_inter(pnt_exact, 0., par,
+                                           tr_on_lin, tr_on_curve, Standard_False);
+      this->Append(pnt_inter);
+      done = Standard_True;
+      return;
+    }
+    ///////////////
+    
     gp_Pnt2d pdeb,pfin;
     C.D0(deb,pdeb);
     C.D0(fin,pfin);
diff --git a/src/BRepClass3d/BRepClass3d.cdl b/src/BRepClass3d/BRepClass3d.cdl
index 057789d..c435db5 100644
--- a/src/BRepClass3d/BRepClass3d.cdl
+++ b/src/BRepClass3d/BRepClass3d.cdl
@@ -46,22 +46,19 @@ is
        DataMap from TCollection(Shape          from TopoDS,
 	    	    	    	Address        from Standard,
                                 ShapeMapHasher from TopTools);
-				
 
     class SolidExplorer;
         
-    class SolidPassiveClassifier instantiates Classifier3d from TopClass
-    	(Intersector3d  from BRepClass3d);
+    class SolidPassiveClassifier instantiates  
+    	Classifier3d from TopClass  (Intersector3d  from BRepClass3d);
 
-    ---class SClassifier instantiates SolidClassifier from TopClass
-    ---   (SolidExplorer from BRepClass3d,
-    ---	Intersector3d from BRepClass3d);
-     
-    
     class SClassifier;       
 
     class SolidClassifier;
-    
        
+    OuterShell(S : Solid from TopoDS)  
+    	    returns Shell from TopoDS;
+	---Purpose: Returns the outer most shell of <S>. Returns a Null
+	--          shell if <S> has no outer shell. 
        
 end BRepClass3d;
diff --git a/src/BRepClass3d/BRepClass3d.cxx b/src/BRepClass3d/BRepClass3d.cxx
new file mode 100644
index 0000000..cffa340
--- /dev/null
+++ b/src/BRepClass3d/BRepClass3d.cxx
@@ -0,0 +1,112 @@
+// Created on: 1993-01-21
+// Created by: Peter KURNEV
+// Copyright (c) 1993-1999 Matra Datavision
+// Copyright (c) 1999-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+// File:	BRepClass3d.cxx
+// Created:	Thu Sep 20 10:05:46 2012
+// Author:	
+//		<pkv at PETREX>
+
+#include <BRepClass3d.ixx>
+
+
+#include <TopAbs_State.hxx>
+#include <TopAbs_Orientation.hxx>
+
+#include <TopoDS_Solid.hxx>
+#include <TopoDS_Shell.hxx>
+#include <TopoDS_Iterator.hxx>
+
+#include <BRep_Builder.hxx>
+#include <BRepClass3d_SolidClassifier.hxx>
+
+
+static 
+  Standard_Boolean IsInternal(const TopoDS_Shell& aSx);
+
+//=======================================================================
+//function : OuterShell
+//purpose  : 
+//=======================================================================
+TopoDS_Shell BRepClass3d::OuterShell(const TopoDS_Solid& aSolid)
+{
+  Standard_Boolean bFound;
+  Standard_Real aTol;
+  TopoDS_Solid aSDx;
+  TopoDS_Shell aShell, aDummy;
+  TopoDS_Iterator aIt;
+  BRep_Builder aBB;
+  BRepClass3d_SolidClassifier aSC;
+  //
+  if (aSolid.IsNull()) {
+    return aDummy;
+  }
+  //
+  aTol=1.e-7;
+  bFound=Standard_False;
+  //
+  aIt.Initialize(aSolid);
+  for (; aIt.More(); aIt.Next()) { 
+    const TopoDS_Shape& aSx=aIt.Value();
+    if (aSx.ShapeType()==TopAbs_SHELL) {
+      aShell=*((TopoDS_Shell*)&aSx);
+      if (!IsInternal(aShell)) {
+	aSDx=aSolid;
+	aSDx.EmptyCopy();
+	aBB.Add(aSDx, aShell);
+	//
+	aSC.Load(aSDx);
+	aSC.PerformInfinitePoint(aTol);
+	if(aSC.State()==TopAbs_OUT) {
+	  bFound=Standard_True;
+	  break;
+	}
+      }
+    }
+  }
+  //
+  if (!bFound) {
+    return aDummy;
+  } 
+  //
+  return aShell;
+}
+
+//=======================================================================
+//function : IsInternal
+//purpose  : 
+//=======================================================================
+Standard_Boolean IsInternal(const TopoDS_Shell& aSx)
+{
+  Standard_Boolean bInternal;
+  TopAbs_Orientation aOr;
+  TopoDS_Iterator aIt; 
+  //
+  bInternal=Standard_False;
+  //
+  aIt.Initialize(aSx);
+  for (; aIt.More(); aIt.Next()) {
+    const TopoDS_Shape& aSy=aIt.Value();
+    aOr=aSy.Orientation();
+    bInternal=(aOr==TopAbs_INTERNAL);
+    break;
+  }	
+  //
+  return bInternal;
+}
diff --git a/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx b/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx
index e37009d..b2e4cca 100644
--- a/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx
+++ b/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx
@@ -338,7 +338,6 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
 //function : LimitInfiniteUV
 //purpose  : Limit infinite parameters
 //=======================================================================
-
 static void LimitInfiniteUV (Standard_Real& U1,
 			     Standard_Real& V1,
 			     Standard_Real& U2,
@@ -355,14 +354,15 @@ static void LimitInfiniteUV (Standard_Real& U1,
   if (infU2) U2 =  1e10;
   if (infV2) V2 =  1e10;
 }
-//  Modified by skv - Tue Sep 16 13:50:38 2003 OCC578 Begin
-//OCC454(apo)->
-// static Standard_Boolean IsInfiniteUV (Standard_Real& U1, Standard_Real& V1, Standard_Real& U2, Standard_Real& V2) {
-//   return (Precision::IsNegativeInfinite(U1) || Precision::IsNegativeInfinite(V1) || 
-// 	  Precision::IsNegativeInfinite(U2) || Precision::IsNegativeInfinite(V2)); 
-// }
-static Standard_Integer IsInfiniteUV (Standard_Real& U1, Standard_Real& V1,
-				      Standard_Real& U2, Standard_Real& V2) {
+//=======================================================================
+//function : IsInfiniteUV
+//purpose  : 
+//=======================================================================
+static Standard_Integer IsInfiniteUV (Standard_Real& U1, 
+				      Standard_Real& V1,
+				      Standard_Real& U2, 
+				      Standard_Real& V2) 
+{
   Standard_Integer aVal = 0;
 
   if (Precision::IsInfinite(U1))
@@ -391,27 +391,20 @@ static Standard_Integer IsInfiniteUV (Standard_Real& U1, Standard_Real& V1,
 //           The Second Call provide a line to the second face
 //           and so on. 
 //=======================================================================
-//modified by NIZNHY-PKV Thu Nov 14 14:34:05 2002 f
-//void  BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P, 
-//					      gp_Lin& L, 
-//					      Standard_Real& _Par)  
-  Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P, 
-							   gp_Lin& L, 
-							   Standard_Real& _Par) 
-//modified by NIZNHY-PKV Thu Nov 14 14:34:10 2002 t
+Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P, 
+							 gp_Lin& L, 
+							 Standard_Real& _Par) 
 {
   const Standard_Real TolU = Precision::PConfusion();
   const Standard_Real TolV = TolU;
 
   TopoDS_Face         face;
   TopExp_Explorer     faceexplorer;
-  //TopExp_Explorer     edgeexplorer;
   gp_Pnt APoint;
   gp_Vec aVecD1U, aVecD1V;
   Standard_Real maxscal=0;
   Standard_Boolean ptfound=Standard_False;
   Standard_Real Par;
-  //Standard_Integer i=1;
   Standard_Real _u,_v;
   Standard_Integer IndexPoint=0;
   Standard_Integer NbPointsOK=0;
@@ -440,42 +433,44 @@ static Standard_Integer IsInfiniteUV (Standard_Real& U1, Standard_Real& V1,
       //
       //avoid process faces from uncorrected shells
       if( Abs (U2 - U1) < 1.e-12 || Abs(V2 - V1) < 1.e-12) {
-	//modified by NIZNHY-PKV Thu Nov 14 15:03:18 2002 f
-	//gp_Vec avoidV(gp_Pnt(0.,0.,0.),gp_Pnt(0.,0.,1.));
-	//gp_Lin avoidL(gp_Pnt(0.,0.,0.),avoidV);
-	//_Par = RealLast();
-	//L = avoidL;
 	return 2;
-	//return ;
-	//modified by NIZNHY-PKV Thu Nov 14 12:25:33 2002 t
       }
       //
       Standard_Real svmyparam=myParamOnEdge;
       //
-      //  Modified by skv - Tue Sep 16 13:55:27 2003 OCC578 Begin
       // Check if the point is on the face or the face is infinite.
       Standard_Integer anInfFlag = IsInfiniteUV(U1,V1,U2,V2);
 
-//       if(IsInfiniteUV(U1,V1,U2,V2)){//OCC454(apo)->
       GeomAdaptor_Surface GA(BRep_Tool::Surface(face));
-      Extrema_ExtPS Ext(P,GA,TolU,TolV);
+      Extrema_ExtPS Ext(P, GA, TolU, TolV);
+      //
       if (Ext.IsDone() && Ext.NbExt() > 0) {
-	// evaluate the lower distance and its index;
-	Standard_Real  Dist2, Dist2Min = Ext.SquareDistance(1);
-	Standard_Integer  iNear = 1, i = 2, iEnd = Ext.NbExt();
+	Standard_Integer i, iNear,  iEnd;
+	Standard_Real  aUx, aVx, Dist2, Dist2Min;
+	Extrema_POnSurf aPx;
+	//
+	iNear = 1;
+	Dist2Min = Ext.SquareDistance(1);
+	iEnd = Ext.NbExt();
 	for (i = 2; i <= iEnd; i++) {
-	  Dist2 = Ext.SquareDistance(i);
-	  if (Dist2 < Dist2Min) {
-	    Dist2Min = Dist2; iNear = i;
+	  aPx=Ext.Point(i);
+	  aPx.Parameter(aUx, aVx);
+	  if (aUx>=U1 && aUx<=U2 && aVx>=V1 && aVx<=V2) {
+	    Dist2 = Ext.SquareDistance(i);
+	    if (Dist2 < Dist2Min) {
+	      Dist2Min = Dist2; 
+	      iNear = i;
+	    }
 	  }
 	}
-	//modified by NIZNHY-PKV Thu Nov 14 12:31:01 2002 f
+	//
 	Standard_Real aDist2Tresh=1.e-24;
-
+	//
 	if (Dist2Min<aDist2Tresh) {
 	  if (anInfFlag) {
 	    return 1;
-	  } else {
+	  } 
+	  else {
 	    BRepClass_FaceClassifier classifier2d;
 	    Standard_Real            aU;
 	    Standard_Real            aV;
@@ -488,31 +483,25 @@ static Standard_Integer IsInfiniteUV (Standard_Real& U1, Standard_Real& V1,
 
 	    TopAbs_State aState = classifier2d.State();
 
-	    if (aState == TopAbs_IN || aState == TopAbs_ON)
+	    if (aState == TopAbs_IN || aState == TopAbs_ON) {
 	      return 1;
-	    else
+	    }
+	    else {
 	      return 3; // skv - the point is on surface but outside face.
+	    }
 	  }
 	}
-	//modified by NIZNHY-PKV Thu Nov 14 12:31:03 2002 t
 	if (anInfFlag) {
 	  APoint = (Ext.Point(iNear)).Value();
 	  gp_Vec V(P,APoint);
 	  _Par = V.Magnitude(); 
 	  L = gp_Lin(P,V);
 	  ptfound=Standard_True;
-	  //modified by NIZNHY-PKV Thu Nov 14 12:25:28 2002 f
-	  //return ;
 	  return 0;
-	  //modified by NIZNHY-PKV Thu Nov 14 12:25:33 2002 t
 	}
-	//<-OCC454(apo)
-//       }else{
       }
       //The point is not ON the face or surface. The face is restricted.
       // find point in a face not too far from a projection of P on face
-      //  Modified by skv - Tue Sep 16 15:25:00 2003 OCC578 End
-
       do {
         if (PointInTheFace (face, APoint, _u, _v, myParamOnEdge, ++IndexPoint, surf,
                             U1, V1, U2, V2,
@@ -545,10 +534,7 @@ static Standard_Integer IsInfiniteUV (Standard_Real& U1, Standard_Real& V1,
 
       myParamOnEdge=svmyparam;
       if(maxscal>0.2) {		  
-	//modified by NIZNHY-PKV Thu Nov 14 12:25:28 2002 f
-	//return ;
 	return 0;
-	//modified by NIZNHY-PKV Thu Nov 14 12:25:33 2002 t
       }
 
 
@@ -568,11 +554,7 @@ static Standard_Integer IsInfiniteUV (Standard_Real& U1, Standard_Real& V1,
 	  Par= 1.0;
 	  _Par=Par;
 	  L  = gp_Lin(P,V);
-	  //modified by NIZNHY-PKV Thu Nov 14 12:25:28 2002 f
-	  //return ;
 	  return 0;
-	  //modified by NIZNHY-PKV Thu Nov 14 12:25:33 2002 t
-	  //-- cout<<" FindAPoint **** Pas OK "<<endl;
 	}
       }
     } //-- Exploration of the faces   
@@ -583,17 +565,11 @@ static Standard_Integer IsInfiniteUV (Standard_Real& U1, Standard_Real& V1,
 #if DEB
       cout<<"\nWARNING : BRepClass3d_SolidExplorer.cxx  (Solid without face)"<<endl;
 #endif  
-      //modified by NIZNHY-PKV Thu Nov 14 12:25:28 2002 f
-      //return ;
       return 0;
-      //modified by NIZNHY-PKV Thu Nov 14 12:25:33 2002 t    
     }
 
     if(ptfound) {
-      //modified by NIZNHY-PKV Thu Nov 14 12:25:28 2002 f
-      //return ;
       return 0;
-      //modified by NIZNHY-PKV Thu Nov 14 12:25:33 2002 t     
     }
     myFirstFace = 0;
     if(myParamOnEdge==0.512345)  myParamOnEdge = 0.4;
@@ -609,10 +585,7 @@ static Standard_Integer IsInfiniteUV (Standard_Real& U1, Standard_Real& V1,
     
   } //-- do { ...  } 
   while(1); 
-  //modified by NIZNHY-PKV Thu Nov 14 12:25:28 2002 f
-  //return ;
   return 0;
-  //modified by NIZNHY-PKV Thu Nov 14 12:25:33 2002 t 
 }
 
 //  Modified by skv - Thu Sep  4 12:30:14 2003 OCC578 Begin
@@ -919,23 +892,15 @@ Standard_Boolean BRepClass3d_SolidExplorer::RejectFace(const gp_Lin& ) const
 //           one  intersection  with  the  shape  boundary  to
 //           compute  intersections. 
 //=======================================================================
-//modified by NIZNHY-PKV Thu Nov 14 14:40:35 2002 f
-//void  BRepClass3d_SolidExplorer::Segment(const gp_Pnt& P, 
-//					 gp_Lin& L, 
-//					 Standard_Real& Par)  {  
-//  myFirstFace = 0;
-//  OtherSegment(P,L,Par);
-//}
-  Standard_Integer  BRepClass3d_SolidExplorer::Segment(const gp_Pnt& P, 
-						       gp_Lin& L, 
-						       Standard_Real& Par)  
+Standard_Integer  BRepClass3d_SolidExplorer::Segment(const gp_Pnt& P, 
+						     gp_Lin& L, 
+						     Standard_Real& Par)  
 {
   Standard_Integer bRetFlag;
   myFirstFace = 0;
   bRetFlag=OtherSegment(P,L,Par);
   return bRetFlag;
 }
-//modified by NIZNHY-PKV Thu Nov 14 14:41:48 2002 t
 
 //=======================================================================
 //function : Intersector
diff --git a/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx b/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx
index 766044f..a5e9347 100644
--- a/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx
+++ b/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx
@@ -453,12 +453,12 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
     
     if(Sliding && !PtOnFirstEdge) {
       BRepExtrema_ExtCF ext1(TopoDS::Edge(ee1.Shape()), FirstFace);
-      if(ext1.NbExt() < 1 || ext1.SquareDistance(1) > Precision::Confusion() * Precision::Confusion()) 
+      if(ext1.NbExt() < 1 || ext1.SquareDistance(1) > Precision::SquareConfusion())
 	Sliding = Standard_False;
     }
     if(Sliding && !PtOnLastEdge) {
       BRepExtrema_ExtCF ext2(ee2, LastFace); // ExtCF : curves and surfaces
-      if(ext2.NbExt() < 1 || ext2.SquareDistance(1) > Precision::Confusion() * Precision::Confusion()) 
+      if(ext2.NbExt() < 1 || ext2.SquareDistance(1) > Precision::SquareConfusion())
 	Sliding = Standard_False;
     }
     if(Sliding && PtOnFirstEdge) {
diff --git a/src/BRepFeat/BRepFeat_SplitShape.cdl b/src/BRepFeat/BRepFeat_SplitShape.cdl
index 8f5ddb0..6abea8c 100644
--- a/src/BRepFeat/BRepFeat_SplitShape.cdl
+++ b/src/BRepFeat/BRepFeat_SplitShape.cdl
@@ -72,6 +72,11 @@ is
 	---C++: inline      
     	is static;
 
+    SetCheckInterior(me: in out; ToCheckInterior: Boolean from Standard)
+	---Purpose: Set the flag of check internal intersections
+	--          default value is True (to check)
+	---C++: inline      
+    	is static;
 
     Add(me: in out; W: Wire from TopoDS;
     	            F: Face from TopoDS)
diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx
index 52e3ad9..c8f6bf1 100644
--- a/src/BRepFill/BRepFill_CompatibleWires.cxx
+++ b/src/BRepFill/BRepFill_CompatibleWires.cxx
@@ -1492,6 +1492,11 @@ void BRepFill_CompatibleWires::ComputeOrigin(const  Standard_Boolean polar )
       else
 	for (j = 1; j <= theLength; j++)
 	  {
+            // get a vector to superpose SeqVertices(j) on PrevSeq(1)
+            const TopoDS_Vertex& Vprev = TopoDS::Vertex( PrevSeq(1) );
+            const TopoDS_Vertex& V = TopoDS::Vertex( SeqVertices(j) );
+            gp_Vec curToPrevVec( BRep_Tool::Pnt(V), BRep_Tool::Pnt(Vprev) );
+
 	    //Forward
 	    Standard_Real SumDist = 0.;
 	    for (k = j, n = 1; k <= theLength; k++, n++)
@@ -1499,7 +1504,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const  Standard_Boolean polar )
 		const TopoDS_Vertex& Vprev = TopoDS::Vertex( PrevSeq(n) );
 		gp_Pnt Pprev = BRep_Tool::Pnt(Vprev);
 		const TopoDS_Vertex& V = TopoDS::Vertex( SeqVertices(k) );
-		gp_Pnt P = BRep_Tool::Pnt(V);
+		gp_Pnt P = BRep_Tool::Pnt(V).XYZ() + curToPrevVec.XYZ();
 		SumDist += Pprev.Distance(P);
                 if (NbSamples > 0)
                 {
@@ -1518,7 +1523,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const  Standard_Boolean polar )
                       (Ecurve.FirstParameter() + nbs*SampleOnCur) :
                       (Ecurve.FirstParameter() + (NbSamples-nbs)*SampleOnCur);
                     gp_Pnt PonPrev = PrevEcurve.Value(ParOnPrev);
-                    gp_Pnt PonCur = Ecurve.Value(ParOnCur);
+                    gp_Pnt PonCur = Ecurve.Value(ParOnCur).XYZ() + curToPrevVec.XYZ();
                     SumDist += PonPrev.Distance(PonCur);
                   }
                 }
@@ -1528,7 +1533,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const  Standard_Boolean polar )
 		const TopoDS_Vertex& Vprev = TopoDS::Vertex( PrevSeq(n) );
 		gp_Pnt Pprev = BRep_Tool::Pnt(Vprev);
 		const TopoDS_Vertex& V = TopoDS::Vertex( SeqVertices(k) );
-		gp_Pnt P = BRep_Tool::Pnt(V);
+		gp_Pnt P = BRep_Tool::Pnt(V).XYZ() + curToPrevVec.XYZ();
 		SumDist += Pprev.Distance(P);
                 if (NbSamples > 0)
                 {
@@ -1547,7 +1552,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const  Standard_Boolean polar )
                       (Ecurve.FirstParameter() + nbs*SampleOnCur) :
                       (Ecurve.FirstParameter() + (NbSamples-nbs)*SampleOnCur);
                     gp_Pnt PonPrev = PrevEcurve.Value(ParOnPrev);
-                    gp_Pnt PonCur = Ecurve.Value(ParOnCur);
+                    gp_Pnt PonCur = Ecurve.Value(ParOnCur).XYZ() + curToPrevVec.XYZ();
                     SumDist += PonPrev.Distance(PonCur);
                   }
                 }
@@ -1566,7 +1571,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const  Standard_Boolean polar )
 		const TopoDS_Vertex& Vprev = TopoDS::Vertex( PrevSeq(n) );
 		gp_Pnt Pprev = BRep_Tool::Pnt(Vprev);
 		const TopoDS_Vertex& V = TopoDS::Vertex( SeqVertices(k) );
-		gp_Pnt P = BRep_Tool::Pnt(V);
+		gp_Pnt P = BRep_Tool::Pnt(V).XYZ() + curToPrevVec.XYZ();
 		SumDist += Pprev.Distance(P);
                 if (NbSamples > 0)
                 {
@@ -1588,7 +1593,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const  Standard_Boolean polar )
                       (Ecurve.FirstParameter() + (NbSamples-nbs)*SampleOnCur) :
                       (Ecurve.FirstParameter() + nbs*SampleOnCur);
                     gp_Pnt PonPrev = PrevEcurve.Value(ParOnPrev);
-                    gp_Pnt PonCur = Ecurve.Value(ParOnCur);
+                    gp_Pnt PonCur = Ecurve.Value(ParOnCur).XYZ() + curToPrevVec.XYZ();
                     SumDist += PonPrev.Distance(PonCur);
                   }
                 }
@@ -1598,7 +1603,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const  Standard_Boolean polar )
 		const TopoDS_Vertex& Vprev = TopoDS::Vertex( PrevSeq(n) );
 		gp_Pnt Pprev = BRep_Tool::Pnt(Vprev);
 		const TopoDS_Vertex& V = TopoDS::Vertex( SeqVertices(k) );
-		gp_Pnt P = BRep_Tool::Pnt(V);
+		gp_Pnt P = BRep_Tool::Pnt(V).XYZ() + curToPrevVec.XYZ();
 		SumDist += Pprev.Distance(P);
                 if (NbSamples > 0)
                 {
@@ -1617,7 +1622,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const  Standard_Boolean polar )
                       (Ecurve.FirstParameter() + (NbSamples-nbs)*SampleOnCur) :
                       (Ecurve.FirstParameter() + nbs*SampleOnCur);
                     gp_Pnt PonPrev = PrevEcurve.Value(ParOnPrev);
-                    gp_Pnt PonCur = Ecurve.Value(ParOnCur);
+                    gp_Pnt PonCur = Ecurve.Value(ParOnCur).XYZ() + curToPrevVec.XYZ();
                     SumDist += PonPrev.Distance(PonCur);
                   }
                 }
diff --git a/src/BRepFill/BRepFill_TrimEdgeTool.cxx b/src/BRepFill/BRepFill_TrimEdgeTool.cxx
index 48afa9f..4cbee1d 100644
--- a/src/BRepFill/BRepFill_TrimEdgeTool.cxx
+++ b/src/BRepFill/BRepFill_TrimEdgeTool.cxx
@@ -174,16 +174,12 @@ static void EvalParameters(const Geom2dAdaptor_Curve& Bis,
 			         TColgp_SequenceOfPnt& Params)
 {
   Geom2dInt_GInter Intersector;
-  Standard_Real Tol = Precision::Intersection();
+  Standard_Real Tol = Precision::Confusion();
 //  Standard_Real TolC = 1.e-9;
 
   Geom2dAdaptor_Curve CBis(Bis);
   Geom2dAdaptor_Curve CAC (AC);
 
-  if(AC.GetType() != GeomAbs_Circle || AC.GetType() != GeomAbs_Line) {
-    Tol *= 100.;
-  } 
-
   //Intersector = Geom2dInt_GInter(CBis, CAC, TolC, Tol);
   Intersector = Geom2dInt_GInter(CAC, CBis, Tol, Tol);
 
diff --git a/src/BRepFill/BRepFill_TrimShellCorner.cxx b/src/BRepFill/BRepFill_TrimShellCorner.cxx
index bb26a91..9a48be0 100644
--- a/src/BRepFill/BRepFill_TrimShellCorner.cxx
+++ b/src/BRepFill/BRepFill_TrimShellCorner.cxx
@@ -352,7 +352,7 @@ void BRepFill_TrimShellCorner::Perform()
     Standard_Integer anIndex1 = aDS.ShapeIndex(aF1, 1);
     Standard_Integer anIndex2 = aDS.ShapeIndex(aF2, 2);
 
-    if((anIndex1 == 0) || (anIndex1 == 0))
+    if((anIndex1 == 0) || (anIndex2 == 0))
       continue;
     Standard_Integer i = 0;
 
diff --git a/src/BRepLib/BRepLib_FindSurface.cdl b/src/BRepLib/BRepLib_FindSurface.cdl
index 789dd4c..fb6ce8d 100644
--- a/src/BRepLib/BRepLib_FindSurface.cdl
+++ b/src/BRepLib/BRepLib_FindSurface.cdl
@@ -60,23 +60,31 @@ is
     
     Create (S         : Shape   from TopoDS; 
     	    Tol       : Real    from Standard = -1;
-    	    OnlyPlane : Boolean from Standard = Standard_False)
+    	    OnlyPlane : Boolean from Standard = Standard_False;
+            OnlyClosed: Boolean from Standard = Standard_False)
 	---Purpose: Computes the Surface from the edges of  <S> with the
 	--          given tolerance.
 	--          if <OnlyPlane> is true, the computed surface will be
 	--          a plane. If it is not possible to find a plane, the
 	--          flag NotDone will be set.
+	--          If <OnlyClosed> is true,  then  S  sould be a wire
+	--          and the existing surface,  on  which wire S is not
+	--          closed in 2D, will be ignored.
     returns FindSurface from BRepLib;
     
     Init (me : in out; 
           S         : Shape   from TopoDS; 
     	  Tol       : Real    from Standard = -1;
-    	  OnlyPlane : Boolean from Standard = Standard_False)
+    	  OnlyPlane : Boolean from Standard = Standard_False;
+          OnlyClosed: Boolean from Standard = Standard_False)
 	---Purpose: Computes the Surface from the edges of  <S> with the
 	--          given tolerance.
 	--          if <OnlyPlane> is true, the computed surface will be
 	--          a plane. If it is not possible to find a plane, the
 	--          flag NotDone will be set.
+	--          If <OnlyClosed> is true,  then  S  sould be a wire
+	--          and the existing surface,  on  which wire S is not
+	--          closed in 2D, will be ignored.
     is static;
 
     Found(me) returns Boolean
diff --git a/src/BRepLib/BRepLib_FindSurface.cxx b/src/BRepLib/BRepLib_FindSurface.cxx
index 3d1d01a..52567d9 100644
--- a/src/BRepLib/BRepLib_FindSurface.cxx
+++ b/src/BRepLib/BRepLib_FindSurface.cxx
@@ -40,15 +40,23 @@
 #include <TColgp_HArray1OfPnt.hxx>
 #include <Geom_Plane.hxx>
 
-#include <TopoDS.hxx>
-#include <TopExp_Explorer.hxx>
-#include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve.hxx>
+#include <BRepAdaptor_Surface.hxx>
+#include <BRepLib_MakeFace.hxx>
+#include <BRepTools_WireExplorer.hxx>
+#include <BRep_Tool.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Wire.hxx>
+#include <TopoDS.hxx>
 
 #include <GeomLib.hxx>
 #include <Geom2d_Curve.hxx>
 #include <Geom_BezierCurve.hxx>
 #include <Geom_BSplineCurve.hxx>
+#include <Geom_RectangularTrimmedSurface.hxx>
+#include <Standard_ErrorHandler.hxx>
 
 //=======================================================================
 //function : Controle
@@ -72,6 +80,83 @@ static Standard_Real Controle(const TColgp_SequenceOfPnt& thePoints,
 }
 
 //=======================================================================
+//function : Is2DConnected
+//purpose  : Return true if the last vertex of theEdge1 coincides with
+//           the first vertex of theEdge2 in parametric space of theFace
+//=======================================================================
+
+inline static Standard_Boolean Is2DConnected( const TopoDS_Edge& theEdge1,
+                                              const TopoDS_Edge& theEdge2,
+                                              const TopoDS_Face& theFace )
+{
+  Standard_Real f,l;
+  Handle(Geom2d_Curve) aCurve;
+  gp_Pnt2d p1, p2;
+
+  // get 2D points
+  aCurve   = BRep_Tool::CurveOnSurface( theEdge1, theFace,f,l );
+  p1       = aCurve->Value( theEdge1.Orientation() == TopAbs_FORWARD ? l : f );
+  aCurve   = BRep_Tool::CurveOnSurface( theEdge2,  theFace,f,l );
+  p2       = aCurve->Value(  theEdge2.Orientation() == TopAbs_FORWARD ? f : l );
+
+  // compare 2D points
+  BRepAdaptor_Surface aSurface( theFace );
+  TopoDS_Vertex    aV = TopExp::FirstVertex( theEdge2, /*CumOri=*/Standard_True );
+  Standard_Real tol3D = BRep_Tool::Tolerance( aV );
+  Standard_Real tol2D = aSurface.UResolution( tol3D ) + aSurface.VResolution( tol3D );
+  Standard_Real dist2 = p1.SquareDistance( p2 );
+  return dist2 < tol2D * tol2D;
+}
+
+//=======================================================================
+//function : Is2DClosed
+//purpose  : Return true if edges of theShape form a closed wire in
+//           parametric space of theSurface
+//=======================================================================
+
+static Standard_Boolean Is2DClosed( const TopoDS_Shape&         theShape,
+                                    const Handle(Geom_Surface)& theSurface)
+{
+  try
+  {
+    // get a wire theShape 
+    TopExp_Explorer aWireExp( theShape, TopAbs_WIRE );
+    if ( !aWireExp.More() )
+      return Standard_False;
+    TopoDS_Wire aWire = TopoDS::Wire( aWireExp.Current() );
+    // a tmp face
+    TopoDS_Face aTmpFace = BRepLib_MakeFace( theSurface, Precision::PConfusion() );
+
+    // check topological closeness using wire explorer, if the wire is not closed
+    // the 1st and the last vertices of wire are different
+    BRepTools_WireExplorer aWireExplorer( aWire, aTmpFace );
+    if ( !aWireExplorer.More())
+      return Standard_False;
+    // remember the 1st and the last edges of aWire
+    TopoDS_Edge aFisrtEdge = aWireExplorer.Current(), aLastEdge = aFisrtEdge;
+    // check if edges connected topologically (that is assured by BRepTools_WireExplorer)
+    // are connected in 2D
+    TopoDS_Edge aPrevEdge = aFisrtEdge;
+    for ( aWireExplorer.Next(); aWireExplorer.More(); aWireExplorer.Next() )
+    {
+      aLastEdge = aWireExplorer.Current();
+      if ( !Is2DConnected( aPrevEdge, aLastEdge, aTmpFace ))
+        return false;
+      aPrevEdge = aLastEdge;
+    }
+    // wire is closed if ( 1st vertex of aFisrtEdge ) ==
+    // ( last vertex of aLastEdge ) in 2D
+    TopoDS_Vertex aV1 = TopExp::FirstVertex( aFisrtEdge, /*CumOri=*/Standard_True );
+    TopoDS_Vertex aV2 = TopExp::LastVertex( aLastEdge, /*CumOri=*/Standard_True );
+    return ( aV1.IsSame( aV2 ) && Is2DConnected( aLastEdge, aFisrtEdge, aTmpFace ));
+  }
+  catch ( Standard_Failure )
+  {
+    return Standard_False;
+  }
+}
+
+//=======================================================================
 //function : BRepLib_FindSurface
 //purpose  : 
 //=======================================================================
@@ -84,9 +169,10 @@ BRepLib_FindSurface::BRepLib_FindSurface()
 //=======================================================================
 BRepLib_FindSurface::BRepLib_FindSurface(const TopoDS_Shape&    S, 
 					 const Standard_Real    Tol,
-					 const Standard_Boolean OnlyPlane)
+					 const Standard_Boolean OnlyPlane,
+                                         const Standard_Boolean OnlyClosed)
 {
-  Init(S,Tol,OnlyPlane);
+  Init(S,Tol,OnlyPlane,OnlyClosed);
 }
 //=======================================================================
 //function : Init
@@ -94,7 +180,8 @@ BRepLib_FindSurface::BRepLib_FindSurface(const TopoDS_Shape&    S,
 //=======================================================================
 void BRepLib_FindSurface::Init(const TopoDS_Shape&    S, 
 			       const Standard_Real    Tol,
-			       const Standard_Boolean OnlyPlane)
+			       const Standard_Boolean OnlyPlane,
+                               const Standard_Boolean OnlyClosed)
 {
   myTolerance = Tol;
   myTolReached = 0.;
@@ -154,9 +241,17 @@ void BRepLib_FindSurface::Init(const TopoDS_Shape&    S,
 
     // if OnlyPlane, eval if mySurface is a plane.
     if ( OnlyPlane && !mySurface.IsNull() ) 
+    {
+      if ( mySurface->IsKind( STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
+        mySurface = Handle(Geom_RectangularTrimmedSurface)::DownCast(mySurface)->BasisSurface();
       mySurface = Handle(Geom_Plane)::DownCast(mySurface);
+    }
 
-    if (!mySurface.IsNull()) break;
+    if (!mySurface.IsNull())
+      // if S is e.g. the bottom face of a cylinder, mySurface can be the
+      // lateral (cylindrical) face of the cylinder; reject an improper mySurface
+      if ( !OnlyClosed || Is2DClosed( S, mySurface ))
+        break;
   }
 
   if (!mySurface.IsNull()) {
diff --git a/src/BRepLib/BRepLib_MakeEdge.cxx b/src/BRepLib/BRepLib_MakeEdge.cxx
index d1a58b0..9e90393 100644
--- a/src/BRepLib/BRepLib_MakeEdge.cxx
+++ b/src/BRepLib/BRepLib_MakeEdge.cxx
@@ -152,7 +152,7 @@ static Standard_Boolean Project(const Handle(Geom2d_Curve)& C,
     
     if (index != 0) {
       Extrema_POnCurv POC = extrema.Point(index);
-      if (P.SquareDistance(POC.Value()) <= Precision::Confusion() * Precision::Confusion()) {
+      if (P.SquareDistance(POC.Value()) <= Precision::SquareConfusion()) {
 	p = POC.Parameter();
 	return Standard_True;
       }
diff --git a/src/BRepLib/BRepLib_MakeFace.cxx b/src/BRepLib/BRepLib_MakeFace.cxx
index d1c0da9..d8c002d 100644
--- a/src/BRepLib/BRepLib_MakeFace.cxx
+++ b/src/BRepLib/BRepLib_MakeFace.cxx
@@ -254,7 +254,7 @@ BRepLib_MakeFace::BRepLib_MakeFace(const TopoDS_Wire& W,
 
 {
   // Find a surface through the wire
-  BRepLib_FindSurface FS(W, -1, OnlyPlane);
+  BRepLib_FindSurface FS(W, -1, OnlyPlane, /*OnlyClosed=*/Standard_True);
   if (!FS.Found()) {
     myError = BRepLib_NotPlanar;
     return;
diff --git a/src/BRepMesh/BRepMesh_Classifier.cdl b/src/BRepMesh/BRepMesh_Classifier.cdl
index 585984b..a08c89d 100644
--- a/src/BRepMesh/BRepMesh_Classifier.cdl
+++ b/src/BRepMesh/BRepMesh_Classifier.cdl
@@ -38,16 +38,16 @@ uses
 
 is 
     
-    Create   (F      : Face                          from TopoDS; 
-    	      Tol    : Real                          from Standard;
-    	      edges  : DataMapOfShapePairOfPolygon   from BRepMesh;
-       	      themap : IndexedMapOfInteger           from TColStd;
-    	      Str    : DataStructureOfDelaun         from BRepMesh;
-    	      Umin, Umax, Vmin, Vmax: Real           from Standard)
+    Create   (theFace      : Face                          from TopoDS; 
+              theTolUV     : Real                          from Standard;
+              theEdges     : DataMapOfShapePairOfPolygon   from BRepMesh;
+              theMap       : IndexedMapOfInteger           from TColStd;
+              theStructure : DataStructureOfDelaun         from BRepMesh;
+              theUmin, theUmax, theVmin, theVmax : Real    from Standard)
     returns Classifier from BRepMesh;
 
 
-    Perform(me; Puv: Pnt2d from gp)
+    Perform(me; thePoint: Pnt2d from gp)
     returns State from TopAbs;
 
 
@@ -57,11 +57,12 @@ is
 
 
     Destroy(me: in out);
-    	---C++: alias ~
+        ---C++: alias ~
 
 
-    AnalizeWire (me: in out; theSeqPnt2d : in SequenceOfPnt2d from TColgp;
-		             Umin, Umax, Vmin, Vmax: in Real from Standard)
+    AnalizeWire (me          : in out;
+                 theSeqPnt2d : in SequenceOfPnt2d from TColgp;
+                 theUmin, theUmax, theVmin, theVmax: in Real from Standard)
     is private;
     -- Private method called from constructor after some (piece of) wire 
     -- has been explored and put into <theSeqPnt2d>. 
@@ -69,14 +70,10 @@ is
     
 fields 
 
-    TabClass    : SeqOfPtr          from BRepTopAdaptor;
-    TabOrien    : SequenceOfInteger from TColStd;
-    Toluv       : Real              from Standard;
-    Face        : Face              from TopoDS;
-    U1          : Real              from Standard;
-    V1          : Real              from Standard;    
-    U2          : Real              from Standard;
-    V2          : Real              from Standard;
+    myTabClass  : SeqOfPtr          from BRepTopAdaptor;
+    myTabOrient : SequenceOfInteger from TColStd;
+    myTolUV     : Real              from Standard;
+    myFace      : Face              from TopoDS;
     myState     : Status            from BRepMesh;
 
 end Classifier from BRepMesh;
diff --git a/src/BRepMesh/BRepMesh_Classifier.cxx b/src/BRepMesh/BRepMesh_Classifier.cxx
index 3275651..03ce5db 100644
--- a/src/BRepMesh/BRepMesh_Classifier.cxx
+++ b/src/BRepMesh/BRepMesh_Classifier.cxx
@@ -57,43 +57,38 @@
 #include <BRepMesh_Array1OfBiPoint.hxx>
 #include <BRepMesh_PairOfPolygon.hxx>
 
-#ifdef DEB_MESH
-static Standard_Integer debwire;
-static Standard_Integer debedge;
-static Standard_Integer debclass = 0;
-#endif
-static const Standard_Real MIN_DIST = 2.E-5; //EPA: real mesh is created in the grid 10E5x10E5, so intersection should be cheched
-                                             //     with double of discretization.
 static const Standard_Real PARALL_COND = Sin(M_PI/3.0);
-static const Standard_Real RESOLUTION = 1.0E-16; //OCC319
+static const Standard_Real RESOLUTION = 1.0E-16;
 
+// Real mesh is created in the grid 10E5x10E5, so intersection
+// should be cheched with double of discretization.
+static const Standard_Real MIN_DIST = 2.E-5;
 
 //=======================================================================
 //function : IsLine
 //purpose  : 
 //=======================================================================
-
-static Standard_Boolean IsLine(const Handle(Geom2d_Curve)& C2d)
+static Standard_Boolean IsLine(const Handle(Geom2d_Curve)& theCurve2d)
 {
   Standard_Boolean IsALine = Standard_False;
-  if ( C2d->IsKind(STANDARD_TYPE(Geom2d_Line)) )
+  if ( theCurve2d->IsKind( STANDARD_TYPE(Geom2d_Line) ) )
   {
     IsALine = Standard_True;
   }
-  else if ( C2d->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve)) )
+  else if ( theCurve2d->IsKind( STANDARD_TYPE(Geom2d_BSplineCurve) ) )
   {
-    Handle(Geom2d_BSplineCurve) BS = *((Handle(Geom2d_BSplineCurve)*)&C2d);
-    IsALine = (BS->NbPoles() == 2);
+    Handle(Geom2d_BSplineCurve) aBSpline = *((Handle(Geom2d_BSplineCurve)*)&theCurve2d);
+    IsALine = (aBSpline->NbPoles() == 2);
   }
-  else if ( C2d->IsKind(STANDARD_TYPE(Geom2d_BezierCurve)) )
+  else if ( theCurve2d->IsKind( STANDARD_TYPE(Geom2d_BezierCurve) ) )
   {
-    Handle(Geom2d_BezierCurve) Bz = *((Handle(Geom2d_BezierCurve)*)&C2d);
-    IsALine = (Bz->NbPoles() == 2);
+    Handle(Geom2d_BezierCurve) aBezier = *((Handle(Geom2d_BezierCurve)*)&theCurve2d);
+    IsALine = (aBezier->NbPoles() == 2);
   }
-  else if ( C2d->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve)) )
+  else if ( theCurve2d->IsKind( STANDARD_TYPE(Geom2d_TrimmedCurve) ) )
   {
-    Handle(Geom2d_TrimmedCurve) Curv = *((Handle(Geom2d_TrimmedCurve)*)&C2d);
-    IsALine = IsLine(Curv->BasisCurve());
+    Handle(Geom2d_TrimmedCurve) aTrimmedCurve = *((Handle(Geom2d_TrimmedCurve)*)&theCurve2d);
+    IsALine = IsLine(aTrimmedCurve->BasisCurve());
   }
   return IsALine;
 }
@@ -102,59 +97,60 @@ static Standard_Boolean IsLine(const Handle(Geom2d_Curve)& C2d)
 //function : AnalizeWire
 //purpose  : 
 //=======================================================================
-
 void BRepMesh_Classifier::AnalizeWire (const TColgp_SequenceOfPnt2d&  theSeqPnt2d,
-                                       const Standard_Real Umin,  const Standard_Real Umax,
-                                       const Standard_Real Vmin,  const Standard_Real Vmax)
+                                       const Standard_Real theUmin,  const Standard_Real theUmax,
+                                       const Standard_Real theVmin,  const Standard_Real theVmax)
 {
-  const Standard_Integer nbpnts = theSeqPnt2d.Length();
-  if (nbpnts < 2) return;
+  const Standard_Integer aNbPnts = theSeqPnt2d.Length();
+  if (aNbPnts < 2)
+    return;
 
   // Accumulate angle
-  TColgp_Array1OfPnt2d PClass(1,nbpnts);
-  Standard_Integer i, ii;
-  Standard_Real theangle = 0.0;
+  TColgp_Array1OfPnt2d aPClass(1, aNbPnts);
+  Standard_Real anAngle = 0.0;
   gp_Pnt2d p1 = theSeqPnt2d(1), p2 = theSeqPnt2d(2), p3;
-  PClass(1) = p1;
-  PClass(2) = p2;
-  for (i = 1; i <= nbpnts; i++)
+  aPClass(1) = p1;
+  aPClass(2) = p2;
+  for (Standard_Integer i = 1; i <= aNbPnts; i++)
   { 
-    ii = i + 2;
-    if (ii > nbpnts)
+    Standard_Integer ii = i + 2;
+    if (ii > aNbPnts)
     {
-      p3 = PClass(ii-nbpnts);
+      p3 = aPClass(ii - aNbPnts);
     }
     else
     {
       p3 = theSeqPnt2d.Value(ii);
-      PClass(ii) = p3;
+      aPClass(ii) = p3;
     }
+
     gp_Vec2d A(p1,p2), B(p2,p3);
     if (A.SquareMagnitude() > 1.e-16 && B.SquareMagnitude() > 1.e-16)
     {
-      const Standard_Real a = A.Angle(B);
-      const Standard_Real aa = Abs(a);
+      const Standard_Real aCurAngle    = A.Angle(B);
+      const Standard_Real aCurAngleAbs = Abs(aCurAngle);
       // Check if vectors are opposite
-      if (aa > Precision::Angular() && (M_PI - aa) > Precision::Angular())
+      if (aCurAngleAbs > Precision::Angular() && (M_PI - aCurAngleAbs) > Precision::Angular())
       {
-        theangle += a;
+        anAngle += aCurAngle;
         p1 = p2;
       }
     }
     p2 = p3;
   }
   // Check for zero angle - treat self intersecting wire as outer
-  if (Abs(theangle) < Precision::Angular()) theangle = 0.0;
+  if (Abs(anAngle) < Precision::Angular())
+    anAngle = 0.0;
 
-  TabClass.Append((void *)new CSLib_Class2d(PClass,Toluv,Toluv,Umin,Vmin,Umax,Vmax));
-  TabOrien.Append((theangle < 0.0) ? 0 : 1);
+  myTabClass.Append( (void *)new CSLib_Class2d(aPClass, myTolUV, myTolUV,
+                                               theUmin, theVmin, theUmax, theVmax) );
+  myTabOrient.Append( ((anAngle < 0.0) ? 0 : 1) );
 }
 
 //=======================================================================
 //function : triangle2Area
 //purpose  : calculating area under triangle
 //=======================================================================
-
 inline static Standard_Real triangle2Area(const gp_XY& p1, const gp_XY& p2)
 {
   return p1.Crossed(p2);
@@ -164,7 +160,6 @@ inline static Standard_Real triangle2Area(const gp_XY& p1, const gp_XY& p2)
 //function : getSegmentParams
 //purpose  : extracting segment attributes 
 //=======================================================================
-
 static Standard_Real getSegmentParams(const BRepMesh_Array1OfBiPoint& theBiPoints,
                                       const Standard_Integer Index,
                                       Standard_Real& x11,
@@ -192,19 +187,18 @@ static Standard_Real getSegmentParams(const BRepMesh_Array1OfBiPoint& theBiPoint
 //purpose  : finding intersection.
 //           If the intersection is found return Standard_True
 //=======================================================================
-
-static Standard_Boolean checkWiresIntersection(const Standard_Integer            theFirstWireId,
-                                              const Standard_Integer            theSecondWireId,
-                                              Standard_Integer* const           theFirstOuterSegmentId,
-                                              Standard_Integer                  theLastOuterSegmentId,
-                                              const TColStd_SequenceOfInteger&  theWireLength,
-                                              const BRepMesh_Array1OfBiPoint&   theBiPoints,
-                                              const Standard_Boolean            findNextIntersection   = Standard_False,
-                                              const Standard_Boolean            isFirstSegment         = Standard_False,
-                                              Standard_Integer* const           theFirstInnerSegmentId = 0)
+static Standard_Boolean checkWiresIntersection(const Standard_Integer           theFirstWireId,
+                                               const Standard_Integer           theSecondWireId,
+                                               Standard_Integer* const          theFirstOuterSegmentId,
+                                               Standard_Integer                 theLastOuterSegmentId,
+                                               const TColStd_SequenceOfInteger& theWireLength,
+                                               const BRepMesh_Array1OfBiPoint&  theBiPoints,
+                                               const Standard_Boolean           findNextIntersection   = Standard_False,
+                                               const Standard_Boolean           isFirstSegment         = Standard_False,
+                                               Standard_Integer* const          theFirstInnerSegmentId = 0)
 {
   Standard_Real A1, B1, C1, A2, B2, C2, AB, BC, CA, xc, yc;
-  Standard_Real  mu1, d, mu2;
+  Standard_Real mu1, d, mu2;
   Standard_Integer ik = *theFirstOuterSegmentId, jk;
   Standard_Real x11, x12, y11, y12, x21, x22, y21, y22;
 
@@ -212,9 +206,7 @@ static Standard_Boolean checkWiresIntersection(const Standard_Integer
   Standard_Integer ikEnd = theLastOuterSegmentId;
   Standard_Boolean isFirst = Standard_True;
   if ( findNextIntersection )
-  {
     isFirst = isFirstSegment;
-  }
 
   // Calculate bounds for second wire
   Standard_Integer jkStart = 0, jkEnd = 0;
@@ -244,24 +236,19 @@ static Standard_Boolean checkWiresIntersection(const Standard_Integer
 
     //for theFirstWireId == theSecondWireId the algorithm check current wire on selfintersection
     if ( findNextIntersection && theFirstInnerSegmentId && isFirst)
-    {
       jk = *theFirstInnerSegmentId;
-    }
     else if (theSecondWireId == theFirstWireId)
-    {
       jk = ik + 2;
-    }
     else
-    {
       jk = jkStart;
-    }
 
     // Explore second wire
     Standard_Boolean aFirstPass = Standard_True;
     for (; jk <= jkEnd; jk++)
     {
       // don't check end's segment of the wire on selfrestriction
-      if ( theSecondWireId == theFirstWireId && isFirst && jk == ikEnd ) continue;
+      if ( theSecondWireId == theFirstWireId && isFirst && jk == ikEnd )
+        continue;
 
       mu2 = getSegmentParams(theBiPoints, jk, x21, y21, x22, y22, A2, B2, C2);
       gp_XY p2(x21, y21), p3(x22, y22);
@@ -273,7 +260,7 @@ static Standard_Boolean checkWiresIntersection(const Standard_Integer
       Standard_Real dTol = MIN_DIST*MIN_DIST;
       if(theFirstWireId != theSecondWireId       && // if compared wires are different &&
          AB*AB > PARALL_COND*PARALL_COND*mu1*mu2 && // angle between two segments greater then PARALL_COND &&
-         d*d   < dTol*mu1 &&             // distance between vertex of the segment and other one's less then MIN_DIST
+         d*d   < dTol*mu1 &&                        // distance between vertex of the segment and other one's less then MIN_DIST
          (x22-x11)*(x22-x12) < 0.0 && (y22-y11)*(y22-y12) < 0.0)
       {
         // if we finding the second intersection we must return Standard_False for setting
@@ -286,9 +273,8 @@ static Standard_Boolean checkWiresIntersection(const Standard_Integer
       }
 
       if( aFirstPass )
-      {
         aFirstTriangleArea = triangle2Area(aStartPoint, p2);
-      }
+      
       Standard_Real aTmpArea = triangle2Area(p2, p3);
 
       //look for intersection of two linear segments
@@ -386,17 +372,13 @@ static Standard_Boolean checkWiresIntersection(const Standard_Integer
         }
       }
       if ( aFirstPass )
-      {
         aFirstPass = Standard_False;
-      }
 
       aLoopArea += aTmpArea;
     }
     
     if ( isFirst )
-    {
       isFirst = Standard_False;
-    }
   }
   return Standard_False;
 }
@@ -406,48 +388,32 @@ static Standard_Boolean checkWiresIntersection(const Standard_Integer
 //function : BRepMesh_Classifier
 //purpose  : 
 //=======================================================================
-
-BRepMesh_Classifier::BRepMesh_Classifier(const TopoDS_Face& aFace,
-                                         const Standard_Real TolUV,
-                                         const BRepMesh_DataMapOfShapePairOfPolygon& edges,
-                                         const TColStd_IndexedMapOfInteger& themap,
-                                         const Handle(BRepMesh_DataStructureOfDelaun)& Str,
-                                         const Standard_Real Umin,
-                                         const Standard_Real Umax,
-                                         const Standard_Real Vmin,
-                                         const Standard_Real Vmax):
-                                         Toluv(TolUV), Face(aFace),
-                                         myState(BRepMesh_NoError)
+BRepMesh_Classifier::BRepMesh_Classifier(const TopoDS_Face& theFace,
+                                         const Standard_Real theTolUV,
+                                         const BRepMesh_DataMapOfShapePairOfPolygon& theEdges,
+                                         const TColStd_IndexedMapOfInteger& theMap,
+                                         const Handle(BRepMesh_DataStructureOfDelaun)& theStructure,
+                                         const Standard_Real theUmin,
+                                         const Standard_Real theUmax,
+                                         const Standard_Real theVmin,
+                                         const Standard_Real theVmax)
+: myTolUV( theTolUV ),
+  myFace ( theFace ),
+  myState( BRepMesh_NoError )
 {
   //-- impasse sur les surfs definies sur plus d une periode
-
   //-- once definition
-  Face.Orientation(TopAbs_FORWARD);
-
-  TopoDS_Edge  edge;
-  BRepTools_WireExplorer WireExplorer;
-  //TopExp_Explorer FaceExplorer;
-  TopoDS_Iterator FaceExplorer;
-
-  TColgp_SequenceOfPnt2d aWirePoints, aWire;
+  myFace.Orientation(TopAbs_FORWARD);
+  
+  TColgp_SequenceOfPnt2d    aWirePoints, aWire;
   TColStd_SequenceOfInteger aWireLength;
 
-
-  //-- twice definitions
-  TopAbs_Orientation anOr = TopAbs_FORWARD;
-  Standard_Boolean falsewire = Standard_False;
-  Standard_Integer i, index, firstindex = 0, lastindex = 0, nbedges = 0;
-#ifdef DEB_MESH
-  debwire = 0;
-#endif
-
-  for(FaceExplorer.Initialize(Face); FaceExplorer.More(); FaceExplorer.Next())
+  TopoDS_Iterator aFaceExplorer;
+  for(aFaceExplorer.Initialize(myFace); aFaceExplorer.More(); aFaceExplorer.Next())
   {
-    if( FaceExplorer.Value().ShapeType()!= TopAbs_WIRE)
+    if(aFaceExplorer.Value().ShapeType() != TopAbs_WIRE)
       continue;
-#ifdef DEB_MESH
-    if (debclass) { debwire++;  cout <<endl;  cout << "#wire no "<<debwire; debedge = 0;}
-#endif
+
     // For each wire we create a data map, linking vertices (only
     // the ends of edges) with their positions in the sequence of
     // all 2d points from this wire.
@@ -456,156 +422,158 @@ BRepMesh_Classifier::BRepMesh_Classifier(const TopoDS_Face& aFace,
     // Actually, we must unbind the vertices belonging to the
     // loop from the map, but since they can't appear twice on the
     // valid wire, leave them for a little speed up.
-    nbedges = 0;
-    TColgp_SequenceOfPnt2d SeqPnt2d;
-    TColStd_DataMapOfIntegerInteger NodeInSeq;
+    Standard_Integer aNbEdges = 0;
+    Standard_Integer aFirstIndex = 0, aLastIndex = 0;
+    Standard_Boolean isFalseWire = Standard_False;
+
+    TColgp_SequenceOfPnt2d aSeqPnt2d;
+    TColStd_DataMapOfIntegerInteger aNodeInSeq;
+
     // Start traversing the wire
-    for (WireExplorer.Init(TopoDS::Wire(FaceExplorer.Value()),Face); WireExplorer.More(); WireExplorer.Next())
+    BRepTools_WireExplorer aWireExplorer;
+    for (aWireExplorer.Init(TopoDS::Wire( aFaceExplorer.Value() ), myFace); aWireExplorer.More(); aWireExplorer.Next())
     {
-      edge = WireExplorer.Current();
-#ifdef DEB_MESH
-      if (debclass) { debedge++; cout << endl; cout << "#edge no "<<debedge <<endl;}
-#endif
-      anOr = edge.Orientation();
-      if (anOr != TopAbs_FORWARD && anOr != TopAbs_REVERSED) continue;
-      if (edges.IsBound(edge))
+      TopoDS_Edge        anEdge   = aWireExplorer.Current();
+      TopAbs_Orientation anOrient = anEdge.Orientation();
+      if (anOrient != TopAbs_FORWARD && anOrient != TopAbs_REVERSED)
+        continue;
+
+      if (theEdges.IsBound(anEdge))
       {
         // Retrieve polygon
-        // Define the direction for adding points to SeqPnt2d
-        Standard_Integer iFirst,iLast,iIncr;
-        const BRepMesh_PairOfPolygon& pair = edges.Find(edge);
-        Handle(Poly_PolygonOnTriangulation) NOD;
-        if (anOr == TopAbs_FORWARD)
+        // Define the direction for adding points to aSeqPnt2d
+        Standard_Integer aIdxFirst, aIdxLast, aIdxIncr;
+
+        const BRepMesh_PairOfPolygon& aPair = theEdges.Find(anEdge);
+        Handle(Poly_PolygonOnTriangulation) aNOD;
+        if (anOrient == TopAbs_FORWARD)
         {
-          NOD = pair.First();
-          iFirst = 1;
-          iLast  = NOD->NbNodes();
-          iIncr  = 1;
+          aNOD = aPair.First();
+          aIdxFirst = 1;
+          aIdxLast  = aNOD->NbNodes();
+          aIdxIncr  = 1;
         }
         else
         {
-          NOD = pair.Last();
-          iFirst = NOD->NbNodes();
-          iLast  = 1;
-          iIncr  = -1;
+          aNOD = aPair.Last();
+          aIdxFirst = aNOD->NbNodes();
+          aIdxLast  = 1;
+          aIdxIncr  = -1;
         }
-        const TColStd_Array1OfInteger& indices = NOD->Nodes();
+        const TColStd_Array1OfInteger& anIndices = aNOD->Nodes();
 
-        // indexFirst and indexLast are the indices of first and last
+        // anIndexFirst and anIndexLast are the indices of first and last
         // vertices of the edge in IndexedMap <Str>
-        const Standard_Integer indexFirst = themap.FindKey(indices(iFirst));
-        const Standard_Integer indexLast = themap.FindKey(indices(iLast));
+        const Standard_Integer anIndexFirst = theMap.FindKey( anIndices(aIdxFirst) );
+        const Standard_Integer anIndexLast  = theMap.FindKey( anIndices(aIdxLast) );
 
-        // Skip degenerated edge : OCC481(apo)
-        if (indexLast == indexFirst && (iLast-iFirst) == iIncr) continue;
+        if (anIndexLast == anIndexFirst && (aIdxLast - aIdxFirst) == aIdxIncr)
+        {
+          // case of continuous set of degenerated edges
+          aLastIndex = anIndexLast;
+          continue;
+        }
 
-        // If there's a gap between edges -> raise <falsewire> flag
-        if (nbedges)
+        // If there's a gap between edges -> raise <isFalseWire> flag
+        if (aNbEdges)
         {
-          if (indexFirst != lastindex)
+          if (anIndexFirst != aLastIndex)
           {
-            falsewire = Standard_True;
+            isFalseWire = Standard_True;
             break;
           }
         }
-        else firstindex = indexFirst;
-              lastindex = indexLast;
+        else
+          aFirstIndex = anIndexFirst;
+
+        aLastIndex = anIndexLast;
 
         // Record first vertex (to detect loops)
-        NodeInSeq.Bind(indexFirst,SeqPnt2d.Length()+1);
+        aNodeInSeq.Bind(anIndexFirst, (aSeqPnt2d.Length() + 1));
 
         // Add vertices in sequence
-        for (i = iFirst; i != iLast; i += iIncr)
+        for (Standard_Integer i = aIdxFirst; i != aIdxLast; i += aIdxIncr)
         {
-          index = (i == iFirst)? indexFirst : themap.FindKey(indices(i));
+          Standard_Integer anIndex = ((i == aIdxFirst) ? anIndexFirst : theMap.FindKey( anIndices(i) ));
 
-          gp_Pnt2d vp(Str->GetNode(index).Coord());
-          SeqPnt2d.Append(vp);
-#ifdef DEB_MESH
-          if (debclass) cout<<"point p"<<index<<" "<<vp.X()<<" "<< vp.Y()<<endl;
-#endif
+          gp_Pnt2d aPnt( theStructure->GetNode(anIndex).Coord() );
+          aSeqPnt2d.Append(aPnt);
         }
 
         // Now, is there a loop?
-        if (NodeInSeq.IsBound(indexLast))
+        if (aNodeInSeq.IsBound(anIndexLast))
         {
           // Yes, treat it separately as a hole
           // 1. Divide points into main wire and a loop
-          const Standard_Integer iWireStart = NodeInSeq(indexLast);
-          if(iWireStart < SeqPnt2d.Length()) {
-            SeqPnt2d.Split(iWireStart, aWire);
-            //OCC319->  the operation will be done later
+          const Standard_Integer aIdxWireStart = aNodeInSeq(anIndexLast);
+          if(aIdxWireStart < aSeqPnt2d.Length())
+          {
+            aSeqPnt2d.Split(aIdxWireStart, aWire);
             // 2. Proceed the loop
             //AnalizeWire(aLoop, Umin, Umax, Vmin, Vmax, aWirePoints, aWireLength, NbBiPoint);
-            aWireLength.Append(aWire.Length());
-            aWirePoints.Append(aWire);
-            //<-OCC319
+            aWireLength.Append( aWire.Length() );
+            aWirePoints.Append( aWire );
           }
         }
-        nbedges++;
+        aNbEdges++;
       }
     }
 
-    if (nbedges)
+    if (aNbEdges)
     {
       // Isn't it open?
-      if (falsewire || (firstindex != lastindex) || SeqPnt2d.Length() > 1)
+      if (isFalseWire || (aFirstIndex != aLastIndex) || aSeqPnt2d.Length() > 1)
       {
         myState = BRepMesh_OpenWire;
         return;
       }
     }
-    else
-    {
-#ifdef DEB_MESH
-      cout <<"Warning : empty wire" <<endl;
-#endif
-    }
   }
 
-  const Standard_Integer nbwires = aWireLength.Length();
-  Standard_Integer NbBiPoint = aWirePoints.Length();
-  BRepMesh_Array1OfBiPoint BiPoints(0,NbBiPoint);
-
-  BRepMesh_BiPoint *BP;
-  Standard_Real *Coordinates1;
-  Standard_Real x1 = 0, y1 = 0, x2, y2, xstart = 0, ystart = 0;
-  Standard_Integer j, l = 1;
-  BP = &(BiPoints.ChangeValue(1));
+  const Standard_Integer aNbWires = aWireLength.Length();
+  Standard_Integer aNbBiPoint = aWirePoints.Length();
+  BRepMesh_Array1OfBiPoint aBiPoints(0, aNbBiPoint);
+  BRepMesh_BiPoint *aBiPoint = &(aBiPoints.ChangeValue(1));
 
   // Fill array of segments (bi-points)
-  for (i = 1; i <= nbwires; i++)
+  Standard_Integer k = 1;
+  for (Standard_Integer i = 1; i <= aNbWires; i++)
   {
-    const Standard_Integer len = aWireLength(i) + 1;
-    for (j = 1; j <= len; j++)
+    Standard_Real x1, y1, x2, y2, aXstart, aYstart;
+    const Standard_Integer aLen = aWireLength(i) + 1;
+    for (Standard_Integer j = 1; j <= aLen; j++)
     {
       // Obtain last point of the segment
-      if (j == len)
+      if (j == aLen)
       {
-        x2 = xstart;
-        y2 = ystart;
+        x2 = aXstart;
+        y2 = aYstart;
       }
       else
       {
-        const gp_Pnt2d& PT = aWirePoints(l); l++;
-        x2 = PT.X();
-        y2 = PT.Y();
+        const gp_Pnt2d& aPnt = aWirePoints(k);
+        k++;
+
+        x2 = aPnt.X();
+        y2 = aPnt.Y();
       }
       // Build segment (bi-point)
       if (j == 1)
       {
-        xstart = x2;
-        ystart = y2;
+        aXstart = x2;
+        aYstart = y2;
       }
       else
       {
-        Coordinates1 = ((Standard_Real*)(BP->Coordinates())); BP++;
-        Coordinates1[0] = x1;
-        Coordinates1[1] = y1;
-        Coordinates1[2] = x2;
-        Coordinates1[3] = y2;
-        Coordinates1[4] = x2 - x1;
-        Coordinates1[5] = y2 - y1;
+        Standard_Real *aCoordinates1 = ((Standard_Real*)(aBiPoint->Coordinates()));
+        aBiPoint++;
+
+        aCoordinates1[0] = x1;
+        aCoordinates1[1] = y1;
+        aCoordinates1[2] = x2;
+        aCoordinates1[3] = y2;
+        aCoordinates1[4] = x2 - x1;
+        aCoordinates1[5] = y2 - y1;
       }
       x1 = x2;
       y1 = y2;
@@ -614,26 +582,29 @@ BRepMesh_Classifier::BRepMesh_Classifier(const TopoDS_Face& aFace,
 
   // Search the intersection
   // Explore first wire
-  Standard_Integer ik, ikEnd = 0;
-  for(i = 1; i <= nbwires; i++)
+  Standard_Integer ikEnd = 0;
+  for(Standard_Integer i = 1; i <= aNbWires; i++)
   {
-    ik = ikEnd + 1;  ikEnd += aWireLength(i);
+    Standard_Integer ik = ikEnd + 1;
+    ikEnd += aWireLength(i);
+
     // Explore second wire
-    for (j = i; j <= nbwires; j++)
+    for (Standard_Integer j = i; j <= aNbWires; j++)
     {
-      if ( checkWiresIntersection(i, j, &ik, ikEnd, aWireLength, BiPoints) )
+      if ( checkWiresIntersection(i, j, &ik, ikEnd, aWireLength, aBiPoints) )
       {
-        myState = BRepMesh_SelfIntersectingWire; return;
+        myState = BRepMesh_SelfIntersectingWire;
+        return;
       }
     }
   }
 
   // Find holes
-  for (i = nbwires; i >= 1; i--)
+  for (Standard_Integer i = aNbWires; i >= 1; i--)
   {
-    NbBiPoint = aWirePoints.Length() - aWireLength(i) + 1;
-    aWirePoints.Split(NbBiPoint, aWire);
-    AnalizeWire(aWire, Umin, Umax, Vmin, Vmax);
+    aNbBiPoint = aWirePoints.Length() - aWireLength(i) + 1;
+    aWirePoints.Split(aNbBiPoint, aWire);
+    AnalizeWire(aWire, theUmin, theUmax, theVmin, theVmax);
   }
 }
 
@@ -642,26 +613,24 @@ BRepMesh_Classifier::BRepMesh_Classifier(const TopoDS_Face& aFace,
 //function : Perform
 //purpose  : 
 //=======================================================================
-
-TopAbs_State BRepMesh_Classifier::Perform(const gp_Pnt2d& aPoint) const
+TopAbs_State BRepMesh_Classifier::Perform(const gp_Pnt2d& thePoint) const
 {
   Standard_Boolean isOut = Standard_False;
-
-  Standard_Integer cur, i, nb = TabClass.Length();
+  Standard_Integer aNb   = myTabClass.Length();
   
-  for (i = 1; i <= nb; i++)
+  for (Standard_Integer i = 1; i <= aNb; i++)
   {
-    cur = ((CSLib_Class2d*)TabClass(i))->SiDans(aPoint);
-    if (cur == 0)
+    Standard_Integer aCur = ((CSLib_Class2d*)myTabClass(i))->SiDans(thePoint);
+    if (aCur == 0)
     {
       // Point is ON, but mark it as OUT
       isOut = Standard_True;
     }
     else
-    {
-      isOut = TabOrien(i)? (cur == -1) : (cur == 1);
-    }
-    if (isOut) return TopAbs_OUT;
+      isOut = myTabOrient(i)? (aCur == -1) : (aCur == 1);
+    
+    if (isOut)
+      return TopAbs_OUT;
   }
 
   return TopAbs_IN;
@@ -672,16 +641,15 @@ TopAbs_State BRepMesh_Classifier::Perform(const gp_Pnt2d& aPoint) const
 //function : Destroy
 //purpose  : 
 //=======================================================================
-
 void BRepMesh_Classifier::Destroy()
 {
-  Standard_Integer i, nb = TabClass.Length();
-  for (i = 1; i <= nb; i++)
+  Standard_Integer aNb = myTabClass.Length();
+  for (Standard_Integer i = 1; i <= aNb; i++)
   {
-    if (TabClass(i))
+    if (myTabClass(i))
     {
-      delete ((CSLib_Class2d*)TabClass(i));
-      TabClass(i) = NULL;
+      delete ((CSLib_Class2d*)myTabClass(i));
+      myTabClass(i) = NULL;
     }
   }
 }
diff --git a/src/BRepMesh/BRepMesh_Delaun.cdl b/src/BRepMesh/BRepMesh_Delaun.cdl
index 2892458..f037241 100644
--- a/src/BRepMesh/BRepMesh_Delaun.cdl
+++ b/src/BRepMesh/BRepMesh_Delaun.cdl
@@ -28,6 +28,7 @@ class Delaun from BRepMesh
 
   uses    Integer from Standard,
           SequenceOfInteger from TColStd,
+          MapOfInteger from TColStd,
           Array1OfInteger from TColStd,
           Box2d from Bnd,
           CircleTool from BRepMesh,
@@ -209,16 +210,51 @@ class Delaun from BRepMesh
                 --vertex        : in Vertex from BRepMesh; 
                 ---Purpose: Creates the triangles on new nodes
               is private;
+	      
+            IntSegSeg     (me        : in out;
+                           theEdge1  : in Edge from BRepMesh;
+                           theEdge2  : in Edge from BRepMesh)    
+            ---Purpose: Check intersection between the two segments.
+            returns Boolean is private;
+            
+            KillInternalTriangles(me: in out;
+                                  theEdgeId       : Integer from Standard;
+                                  theIgnoredEdges : in MapOfInteger from TColStd;
+                                  theLoopEdges    : out MapOfIntegerInteger from BRepMesh)
+              ---Purpose: Removes triangles within polygon
+              is private;
+              
+            CleanupMesh(me: in out)
+              ---Purpose: Cleanup mesh from the free triangles
+              is private;
+              
+            RemovePivotTriangles(me: in out;
+                                 theEdgeInfo      : Integer from Standard;
+                                 thePivotNode     : Integer from Standard;
+                                 theInfectedEdges : out MapOfInteger from TColStd;
+                                 theLoopEdges     : out MapOfIntegerInteger from BRepMesh;
+                                 isFirstPass      : Boolean from Standard)
+              ---Purpose: Removes triangles around the given pivot node
+              is private;
+              
+            CleanupPolygon(me: in out;
+                           thePolygon       : in SequenceOfInteger from TColStd;
+                           theInfectedEdges : out MapOfInteger from TColStd;
+                           theLoopEdges     : out MapOfIntegerInteger from BRepMesh)
+              ---Purpose: Remove internal triangles from the given polygon
+              is private;
+
+
 
 
-            fields  MeshData               : DataStructureOfDelaun from BRepMesh;
-                    PositiveOrientation    : Boolean from Standard;
-                    tCircles               : CircleTool from BRepMesh;
-                    supVert1               : Integer from Standard;
-                    supVert2               : Integer from Standard;
-                    supVert3               : Integer from Standard;
-                    supTrian               : Triangle from BRepMesh;
-                    mapEdges               : MapOfInteger from BRepMesh;
+            fields  myMeshData               : DataStructureOfDelaun from BRepMesh;
+                    myPositiveOrientation    : Boolean from Standard;
+                    myCircles                : CircleTool from BRepMesh;
+                    mySupVert1               : Integer from Standard;
+                    mySupVert2               : Integer from Standard;
+                    mySupVert3               : Integer from Standard;
+                    mySupTrian               : Triangle from BRepMesh;
+                    myMapEdges               : MapOfInteger from BRepMesh;
 
 
 end Delaun;
diff --git a/src/BRepMesh/BRepMesh_Delaun.cxx b/src/BRepMesh/BRepMesh_Delaun.cxx
index 6838f8f..7f8f31a 100644
--- a/src/BRepMesh/BRepMesh_Delaun.cxx
+++ b/src/BRepMesh/BRepMesh_Delaun.cxx
@@ -29,6 +29,7 @@
 #include <Bnd_Box2d.hxx>
 #include <gp.hxx>
 #include <TColStd_MapOfInteger.hxx>
+#include <TColStd_MapIteratorOfMapOfInteger.hxx>
 #include <TColStd_Array1OfBoolean.hxx>
 #include <BRepMesh_MapOfIntegerInteger.hxx>
 #include <BRepMesh_HeapSortIndexedVertexOfDelaun.hxx>
@@ -43,1253 +44,1789 @@
 typedef TColStd_ListIteratorOfListOfInteger  IteratorOnListOfInteger;
 typedef TColStd_ListOfInteger                ListOfInteger;
 
-#define EPSEPS Precision::PConfusion()*Precision::PConfusion()
-
+const Standard_Real EPSEPS = Precision::PConfusion() * Precision::PConfusion();
 const gp_XY SortingDirection(M_SQRT1_2, M_SQRT1_2);
 
-//#define TRIANGULATION_MESURE
-
-#ifdef TRIANGULATION_MESURE
-#include <OSD_Chronometer.hxx>
-#include <NCollection_IncAllocator.hxx>
-static OSD_Chronometer ChroTrigu;
-static OSD_Chronometer ChroSearch;
-static OSD_Chronometer ChroDelete;
-static OSD_Chronometer ChroDelTri;
-static OSD_Chronometer ChroDelCir;
-static OSD_Chronometer ChroCreate;
-static OSD_Chronometer ChroFront;
-Standard_EXPORT Standard_Boolean Triangulation_Chrono;
-#endif
-
-//#define TRIANGULATION_DEBUG
-
-#ifdef TRIANGULATION_DEBUG
-Standard_IMPORT Standard_Integer Triangulation_Trace;
-#endif
-
+//=======================================================================
+//function : fillBndBox
+//purpose  : Add boundig box for edge defined by start & end point to
+//           the given vector of bounding boxes for triangulation edges
+//=======================================================================
+static void fillBndBox( NCollection_Vector <Bnd_Box2d>& theVB,
+                        const BRepMesh_Vertex& theV1,
+                        const BRepMesh_Vertex& theV2 )
+{
+  Bnd_Box2d aBox;      
+  aBox.Add( gp_Pnt2d( theV1.Coord() ) );
+  aBox.Add( gp_Pnt2d( theV2.Coord() ) );
+  theVB.Append( aBox );
+}
 
 //=======================================================================
 //function : BRepMesh_Delaun
-//purpose  : 
+//purpose  : Creates the triangulation with an empty Mesh data structure
 //=======================================================================
-BRepMesh_Delaun::BRepMesh_Delaun
-(BRepMesh_Array1OfVertexOfDelaun& Vertices, const Standard_Boolean ZPositive)
-:  PositiveOrientation(ZPositive), tCircles(Vertices.Length(),new NCollection_IncAllocator())
+BRepMesh_Delaun::BRepMesh_Delaun( BRepMesh_Array1OfVertexOfDelaun& theVertices,
+                                  const Standard_Boolean isPositive )
+: myPositiveOrientation( isPositive ),
+  myCircles( theVertices.Length(), new NCollection_IncAllocator() )
 {
-  if (Vertices.Length()>2) {
-    MeshData=new BRepMesh_DataStructureOfDelaun(new NCollection_IncAllocator(),Vertices.Length());
-    Init(Vertices);
+  if ( theVertices.Length() > 2 )
+  {
+    myMeshData = new BRepMesh_DataStructureOfDelaun( new NCollection_IncAllocator(),
+                                                     theVertices.Length() );
+    Init( theVertices );
   }
 }
 
 //=======================================================================
 //function : BRepMesh_Delaun
-//purpose  : 
+//purpose  : Creates the triangulation with and existent Mesh data structure
 //=======================================================================
-BRepMesh_Delaun::BRepMesh_Delaun 
-(const Handle(BRepMesh_DataStructureOfDelaun)& OldMesh, 
- BRepMesh_Array1OfVertexOfDelaun& Vertices,
- const Standard_Boolean ZPositive)
- :  PositiveOrientation(ZPositive), tCircles(Vertices.Length(),OldMesh->Allocator())
+BRepMesh_Delaun::BRepMesh_Delaun ( const Handle( BRepMesh_DataStructureOfDelaun )& theOldMesh, 
+                                   BRepMesh_Array1OfVertexOfDelaun& theVertices,
+                                   const Standard_Boolean isPositive )
+ : myPositiveOrientation( isPositive ),
+   myCircles( theVertices.Length(), theOldMesh->Allocator() )
 {
-  MeshData=OldMesh;
-  if (Vertices.Length()>2)
-    Init(Vertices);
+  myMeshData = theOldMesh;
+  if ( theVertices.Length() > 2 )
+    Init( theVertices );
 }
 
+//=======================================================================
+//function : BRepMesh_Delaun
+//purpose  : Creates the triangulation with and existent Mesh data structure
+//=======================================================================
+BRepMesh_Delaun::BRepMesh_Delaun( const Handle( BRepMesh_DataStructureOfDelaun )& theOldMesh, 
+                                  TColStd_Array1OfInteger& theVertexIndexes,
+                                  const Standard_Boolean isPositive )
+ : myPositiveOrientation( isPositive ),
+   myCircles( theVertexIndexes.Length(), theOldMesh->Allocator() )
+{
+  myMeshData = theOldMesh;
+  if ( theVertexIndexes.Length() > 2 )
+  {
+    Bnd_Box2d aBox;
+    Standard_Integer anIndex = theVertexIndexes.Lower();
+    Standard_Integer anUpper = theVertexIndexes.Upper();
+    for ( ; anIndex <= anUpper; ++anIndex )
+      aBox.Add( gp_Pnt2d( GetVertex( theVertexIndexes( anIndex) ).Coord() ) );
+
+    Perform( aBox, theVertexIndexes );
+  }
+}
 
 //=======================================================================
 //function : Init
-//purpose  : 
+//purpose  : Initializes the triangulation with an Array of Vertex
 //=======================================================================
-void BRepMesh_Delaun::Init(BRepMesh_Array1OfVertexOfDelaun& Vertices)
+void BRepMesh_Delaun::Init( BRepMesh_Array1OfVertexOfDelaun& theVertices )
 {
-  Bnd_Box2d theBox;
-  TColStd_Array1OfInteger vertexIndices(Vertices.Lower(), Vertices.Upper());
-  Standard_Integer niver;
-
-  for (niver=Vertices.Lower(); niver<=Vertices.Upper(); niver++) {
-    theBox.Add(gp_Pnt2d(Vertices(niver).Coord()));
-    vertexIndices(niver)=MeshData->AddNode(Vertices(niver));
+  Bnd_Box2d aBox;
+  Standard_Integer aLowerIdx  = theVertices.Lower();
+  Standard_Integer anUpperIdx = theVertices.Upper();
+  TColStd_Array1OfInteger aVertexIndexes( aLowerIdx, anUpperIdx );
+  
+  Standard_Integer anIndex = aLowerIdx;
+  for ( ; anIndex <= anUpperIdx; ++anIndex )
+  {
+    aBox.Add( gp_Pnt2d( theVertices( anIndex ).Coord() ) );
+    aVertexIndexes( anIndex ) = myMeshData->AddNode( theVertices( anIndex ) );
   }
 
-  Perform(theBox, vertexIndices);
+  Perform( aBox, aVertexIndexes );
 }
 
+//=======================================================================
+//function : Perform
+//purpose  : Create super mesh and run triangulation procedure
+//=======================================================================
+void BRepMesh_Delaun::Perform( Bnd_Box2d& theBndBox,
+                               TColStd_Array1OfInteger& theVertexIndexes )
+{
+  theBndBox.Enlarge( Precision::PConfusion() );
+  SuperMesh( theBndBox );
+
+  BRepMesh_HeapSortIndexedVertexOfDelaun::Sort( theVertexIndexes, 
+      BRepMesh_ComparatorOfIndexedVertexOfDelaun( SortingDirection,
+        Precision::PConfusion(), myMeshData ) );
+
+  Compute( theVertexIndexes );
+}
 
 //=======================================================================
-//function : BRepMesh_Delaun
-//purpose  : 
+//function : SuperMesh
+//purpose  : Build the super mesh
 //=======================================================================
-BRepMesh_Delaun::BRepMesh_Delaun 
-(const Handle(BRepMesh_DataStructureOfDelaun)& OldMesh, 
- TColStd_Array1OfInteger& VertexIndices,
- const Standard_Boolean ZPositive)
- :  PositiveOrientation(ZPositive), tCircles(VertexIndices.Length(),OldMesh->Allocator())
+void BRepMesh_Delaun::SuperMesh( const Bnd_Box2d& theBox )
 {
-  MeshData=OldMesh;
-  if (VertexIndices.Length()>2) {
-    Bnd_Box2d theBox;
-    Standard_Integer niver;
-    for (niver=VertexIndices.Lower(); niver<=VertexIndices.Upper(); niver++) {
-      theBox.Add(gp_Pnt2d(GetVertex(VertexIndices(niver)).Coord()));
-    }
+  Standard_Real aMinX, aMinY, aMaxX, aMaxY;
+  theBox.Get( aMinX, aMinY, aMaxX, aMaxY );
+  Standard_Real aDeltaX = aMaxX - aMinX;
+  Standard_Real aDeltaY = aMaxY - aMinY;
+
+  Standard_Real aDeltaMin = Min( aDeltaX, aDeltaY );
+  Standard_Real aDeltaMax = Max( aDeltaX, aDeltaY );
+  Standard_Real aDelta    = aDeltaX + aDeltaY;
+  
+  myCircles.SetMinMaxSize( gp_XY( aMinX, aMinY ), gp_XY( aMaxX, aMaxY ) );
+
+  Standard_Integer aScaler = 2;
+  if ( myMeshData->NbNodes() > 100 )
+    aScaler = 5;
+  else if( myMeshData->NbNodes() > 1000 )
+    aScaler = 7;
+
+  myCircles.SetCellSize( aDeltaX / aScaler,
+                         aDeltaY / aScaler );
 
-    Perform(theBox, VertexIndices);
+  mySupVert1 = myMeshData->AddNode(
+    BRepMesh_Vertex( ( aMinX + aMaxX ) / 2, aMaxY + aDeltaMax, BRepMesh_Free ) );
+    
+  mySupVert2 = myMeshData->AddNode(
+    BRepMesh_Vertex( aMinX - aDelta, aMinY - aDeltaMin, BRepMesh_Free ) );
+    
+  mySupVert3 = myMeshData->AddNode(
+    BRepMesh_Vertex( aMaxX + aDelta, aMinY - aDeltaMin, BRepMesh_Free ) );
+
+  if ( !myPositiveOrientation )
+  {
+    Standard_Integer aTmp;
+    aTmp       = mySupVert2;
+    mySupVert2 = mySupVert3;
+    mySupVert3 = aTmp;
   }
+
+  Standard_Integer anEdge1, anEdge2, anEdge3;
+  
+  anEdge1 = myMeshData->AddLink( BRepMesh_Edge( mySupVert1, mySupVert2, BRepMesh_Free ) );
+  anEdge2 = myMeshData->AddLink( BRepMesh_Edge( mySupVert2, mySupVert3, BRepMesh_Free ) );
+  anEdge3 = myMeshData->AddLink( BRepMesh_Edge( mySupVert3, mySupVert1, BRepMesh_Free ) );
+  
+  mySupTrian = BRepMesh_Triangle( Abs( anEdge1 ), Abs( anEdge2 ), Abs( anEdge3 ), 
+    ( anEdge1 > 0 ), ( anEdge2 > 0 ), ( anEdge1 > 0), BRepMesh_Free);
 }
 
 //=======================================================================
-//function : Perform
-//purpose  : 
+//function : DeleteTriangle
+//purpose : The concerned triangles are deleted and the freed edges are added in 
+//           <theLoopEdges>. If an edge is added twice, it does not exist and
+//          it is necessary to destroy it. This corresponds to the destruction of two
+//          connected triangles.
 //=======================================================================
-void BRepMesh_Delaun::Perform (Bnd_Box2d& theBndBox, TColStd_Array1OfInteger& theVertexIndices)
+void  BRepMesh_Delaun::DeleteTriangle( const Standard_Integer theIndex, 
+                                       BRepMesh_MapOfIntegerInteger& theLoopEdges )
 {
-  theBndBox.Enlarge(Precision::PConfusion());
-  SuperMesh(theBndBox);
+  myCircles.Delete( theIndex );
 
-  BRepMesh_HeapSortIndexedVertexOfDelaun::Sort
-    (theVertexIndices, 
-    BRepMesh_ComparatorOfIndexedVertexOfDelaun(SortingDirection,
-    Precision::PConfusion(),
-    MeshData));
+  Standard_Integer e[3];
+  Standard_Boolean o[3];
+  GetTriangle( theIndex ).Edges( e[0], e[1], e[2],
+                                 o[0], o[1], o[2] );
+                                 
+  myMeshData->RemoveElement( theIndex );
 
-  Compute(theVertexIndices);
+  for ( Standard_Integer i = 0; i < 3; ++i )
+  {
+    if ( !theLoopEdges.Bind( e[i], o[i] ) ) 
+    {
+      theLoopEdges.UnBind( e[i] );
+      myMeshData->RemoveLink( e[i] );
+    }
+  }
 }
 
 //=======================================================================
 //function : Compute
-//purpose  : 
+//purpose  : Computes the triangulation and add the vertices edges and 
+//           triangles to the Mesh data structure
 //=======================================================================
-void BRepMesh_Delaun::Compute (TColStd_Array1OfInteger& VertexIndices)
+void BRepMesh_Delaun::Compute( TColStd_Array1OfInteger& theVertexIndexes )
 {
   // Insertion of edges of super triangles in the list of free edges: 
-  BRepMesh_MapOfIntegerInteger loopEdges(10,MeshData->Allocator());
-  Standard_Integer e1, e2, e3;
-  Standard_Boolean o1, o2, o3;
-  supTrian.Edges(e1, e2, e3, o1, o2, o3);
-  loopEdges.Bind(e1, Standard_True);
-  loopEdges.Bind(e2, Standard_True);
-  loopEdges.Bind(e3, Standard_True);
-
-  if (VertexIndices.Length()>0) {
-
-    // Creation of 3 trianglers with the node and the edges of the super triangle:
-    Standard_Integer iVert=VertexIndices.Lower();
-    CreateTriangles(VertexIndices(iVert), loopEdges);
-
-    CreateTrianglesOnNewVertices(VertexIndices);
-
-        // To add a node in the mesh it is necessary to check to conditions
-        // - the node should be located on the border of the mesh and in an existing triangle
-        // - all adjacent triangles should belong to a component connected with this triangle 
-      /*  if (Contains(itT.Value(), refToVert, edgeOn)) {
-          triPerce=itT.Value();
-          cirL.Remove(itT);
-          break;
-        }*/
-        // Insertion of nodes :
-  }
+  BRepMesh_MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
+  Standard_Integer e[3];
+  Standard_Boolean o[3];
+  mySupTrian.Edges( e[0], e[1], e[2],
+                    o[0], o[1], o[2] );
+                    
+  aLoopEdges.Bind( e[0], Standard_True );
+  aLoopEdges.Bind( e[1], Standard_True );
+  aLoopEdges.Bind( e[2], Standard_True );
+
+  if ( theVertexIndexes.Length() > 0 )
+  {
+    // Creation of 3 trianglers with the first node and the edges of the super triangle:
+    Standard_Integer anVertexIdx = theVertexIndexes.Lower();
+    CreateTriangles( theVertexIndexes( anVertexIdx ), aLoopEdges );
 
-  // destruction of triangles containing a top of the super triangle
-  BRepMesh_SelectorOfDataStructureOfDelaun select(MeshData);
-  select.NeighboursOfNode(supVert1);
-  select.NeighboursOfNode(supVert2);
-  select.NeighboursOfNode(supVert3);
-  BRepMesh_MapOfInteger::Iterator trs(select.Elements());
-  loopEdges.Clear();
-  for (;trs.More(); trs.Next()) {
-    DeleteTriangle(trs.Key(), loopEdges);
+    // Add other nodes to the mesh
+    CreateTrianglesOnNewVertices( theVertexIndexes );
   }
 
-  // all edges that remain free are removed from loopEdges;
-  // only the boundary edges of the triangulation remain in loopEdges
-  BRepMesh_MapOfIntegerInteger::Iterator itLEd(loopEdges);
-  for (; itLEd.More(); itLEd.Next()) {
-    if (MeshData->ElemConnectedTo(itLEd.Key()).IsEmpty())
-      MeshData->RemoveLink(itLEd.Key());
+  // Destruction of triangles containing a top of the super triangle
+  BRepMesh_SelectorOfDataStructureOfDelaun aSelector( myMeshData );
+  aSelector.NeighboursOfNode( mySupVert1 );
+  aSelector.NeighboursOfNode( mySupVert2 );
+  aSelector.NeighboursOfNode( mySupVert3 );
+  
+  aLoopEdges.Clear();
+  BRepMesh_MapOfInteger::Iterator aFreeTriangles( aSelector.Elements() );
+  for ( ; aFreeTriangles.More(); aFreeTriangles.Next() )
+    DeleteTriangle( aFreeTriangles.Key(), aLoopEdges );
+
+  // All edges that remain free are removed from aLoopEdges;
+  // only the boundary edges of the triangulation remain there
+  BRepMesh_MapOfIntegerInteger::Iterator aFreeEdges( aLoopEdges );
+  for ( ; aFreeEdges.More(); aFreeEdges.Next() )
+  {
+    if ( myMeshData->ElemConnectedTo( aFreeEdges.Key() ).IsEmpty() )
+      myMeshData->RemoveLink( aFreeEdges.Key() );
   }
 
-  //the tops of the super triangle are destroyed
-  MeshData->RemoveNode(supVert1);
-  MeshData->RemoveNode(supVert2);
-  MeshData->RemoveNode(supVert3);
-
+  // The tops of the super triangle are destroyed
+  myMeshData->RemoveNode( mySupVert1 );
+  myMeshData->RemoveNode( mySupVert2 );
+  myMeshData->RemoveNode( mySupVert3 );
 }
 
 //=======================================================================
-//function : FrontierAdjust
-//purpose  : 
+//function : CreateTriangles
+//purpose  : Creates the triangles beetween the node and the polyline.
 //=======================================================================
-void BRepMesh_Delaun::FrontierAdjust()
+void BRepMesh_Delaun::CreateTriangles ( const Standard_Integer theVertexIndex,  
+                                        BRepMesh_MapOfIntegerInteger& thePoly )
 {
-  Standard_Integer e1, e2, e3;
-  Standard_Boolean o1, o2, o3;
-  BRepMesh_MapOfIntegerInteger loopEdges(10,MeshData->Allocator());
-  BRepMesh_ListOfInteger::Iterator itconx;
-  ListOfInteger tril;
-
-  Standard_Integer pass = 1;
-  for (; pass <= 2; pass++ )
+  ListOfInteger aLoopEdges, anExternalEdges;
+  const gp_XY& aVertexCoord = myMeshData->GetNode( theVertexIndex ).Coord();
+  
+  BRepMesh_MapOfIntegerInteger::Iterator anEdges( thePoly );
+  for ( ; anEdges.More(); anEdges.Next() )
   {
-    // 1 pass): find external triangles on boundary edges
-    // 2 pass): find external triangles on boundary edges
-    // because in comlex curved boundaries external triangles can appear  
-    // after "mesh left polygon"
-    BRepMesh_MapOfInteger::Iterator itFr(Frontier());
-    for (; itFr.More(); itFr.Next()) {
-      const BRepMesh_PairOfIndex& aPair = MeshData->ElemConnectedTo(itFr.Key());
-      for(Standard_Integer j = 1, jn = aPair.Extent(); j <= jn; j++) {
-        const BRepMesh_Triangle& trc=GetTriangle(aPair.Index(j));
-        trc.Edges(e1,e2,e3,o1,o2,o3);
-        if      ((itFr.Key()==e1 && !o1) || 
-          (itFr.Key()==e2 && !o2) ||
-          (itFr.Key()==e3 && !o3))   {
-#ifdef TRIANGULATION_DEBUG
-            if (Triangulation_Trace>0) {
-              cout << "---> destruction du triangle " << aPair.Index(j) << endl;
-            }
-#endif
-            tril.Append(aPair.Index(j));
-        }
-      }
+    const BRepMesh_Edge& anEdge = GetEdge( anEdges.Key() );
+    Standard_Integer aFirstNode = anEdge.FirstNode();
+    Standard_Integer aLastNode  = anEdge.LastNode();
+    Standard_Boolean isPositive = (Standard_Boolean)thePoly( anEdges.Key() );
+    if ( !isPositive )
+    {
+      Standard_Integer aTmp;
+      aTmp       = aFirstNode;
+      aFirstNode = aLastNode;
+      aLastNode  = aTmp;
     }
 
-    // destruction  of external triangles on boundary edges
-    for (; !tril.IsEmpty(); tril.RemoveFirst()) {
-      DeleteTriangle(tril.First(), loopEdges);
-    }
+    const BRepMesh_Vertex& aFirstVertex = GetVertex( aFirstNode );
+    const BRepMesh_Vertex& aLastVertex  = GetVertex( aLastNode  );
 
-    // destrucrion of remaining hanging edges :
-    BRepMesh_MapOfIntegerInteger::Iterator itFE(loopEdges);
+    gp_XY aVEdge1, aVEdge2, aVEdge3;
+    aVEdge1 = aFirstVertex.Coord();
+    aVEdge1.Subtract( aVertexCoord );
+    
+    aVEdge2 = aLastVertex.Coord();
+    aVEdge2.Subtract( aFirstVertex.Coord() );
+    
+    aVEdge3 = aVertexCoord;
+    aVEdge3.Subtract( aLastVertex.Coord() );
 
-    for (; itFE.More(); itFE.Next()) {
-      if (MeshData->ElemConnectedTo(itFE.Key()).IsEmpty())
-        MeshData->RemoveLink(itFE.Key());
+    Standard_Real aDist12 = 0., aDist23 = 0.;
+    Standard_Real aV2Len  = aVEdge2.Modulus();
+    if ( aV2Len > Precision::PConfusion() )
+    {
+      aVEdge2.SetCoord( aVEdge2.X() / aV2Len,
+                        aVEdge2.Y() / aV2Len );
+                        
+      aDist12 = aVEdge1 ^ aVEdge2;
+      aDist23 = aVEdge2 ^ aVEdge3;
     }
 
-    // destruction of triangles crossing the boundary edges and 
-    // their replacement by makeshift triangles
-    if ( pass == 1 )
+    if ( Abs( aDist12 ) >= Precision::PConfusion() && 
+         Abs( aDist23 ) >= Precision::PConfusion() )
     {
-      itFr.Reset();
+      Standard_Boolean isSensOK;
+      if ( myPositiveOrientation )
+        isSensOK = ( aDist12 > 0. && aDist23 > 0.);
+      else
+        isSensOK = ( aDist12 < 0. && aDist23 < 0.);
+        
+      Standard_Integer aNewEdge1, aNewEdge3, aNewTriangle;
+      if ( isSensOK )
+      {
+        aNewEdge1 = myMeshData->AddLink( 
+          BRepMesh_Edge( theVertexIndex, aFirstNode, BRepMesh_Free ) );
+          
+        aNewEdge3 = myMeshData->AddLink(
+          BRepMesh_Edge( aLastNode, theVertexIndex, BRepMesh_Free ) );
+          
+        aNewTriangle = myMeshData->AddElement(
+          BRepMesh_Triangle( Abs( aNewEdge1 ), anEdges.Key(), Abs( aNewEdge3 ), 
+                             ( aNewEdge1 > 0 ), isPositive, ( aNewEdge3 > 0 ),
+                             BRepMesh_Free) );
+
+        Standard_Boolean isCircleCreated = 
+          myCircles.Add( aVertexCoord, aFirstVertex.Coord(), aLastVertex.Coord(),
+                         aNewTriangle );
+                         
+        if ( !isCircleCreated )
+          myMeshData->RemoveElement( aNewTriangle );
+      }
+      else
+      {
+        if ( isPositive )
+          aLoopEdges.Append(  anEdges.Key() );
+        else
+          aLoopEdges.Append( -anEdges.Key() );
+          
+        if ( aVEdge1.SquareModulus() > aVEdge3.SquareModulus() )
+        {
+          aNewEdge1 = myMeshData->AddLink(
+            BRepMesh_Edge( theVertexIndex, aFirstNode, BRepMesh_Free ) );
+            
+          anExternalEdges.Append( Abs( aNewEdge1) );
+        }
+        else
+        {
+          aNewEdge1 = myMeshData->AddLink(
+            BRepMesh_Edge( aLastNode, theVertexIndex, BRepMesh_Free ) );
+            
+          anExternalEdges.Append( Abs( aNewEdge3 ) );
+        }
+      }
     }
-    else
+  }
+  
+  thePoly.Clear();
+  while ( !anExternalEdges.IsEmpty() )
+  {
+    const BRepMesh_PairOfIndex& aPair = 
+      myMeshData->ElemConnectedTo( Abs( anExternalEdges.First() ) );
+    
+    
+    if ( !aPair.IsEmpty() )
+      DeleteTriangle( aPair.FirstIndex(), thePoly );
+      
+    anExternalEdges.RemoveFirst();
+  }
+
+  for ( anEdges.Initialize( thePoly ); anEdges.More(); anEdges.Next() )
+  {
+    if ( myMeshData->ElemConnectedTo( anEdges.Key() ).IsEmpty() )
+      myMeshData->RemoveLink( anEdges.Key() );
+  }
+
+  while ( !aLoopEdges.IsEmpty() )
+  {
+    const BRepMesh_Edge& anEdge = GetEdge( Abs( aLoopEdges.First() ) );
+    if ( anEdge.Movability() != BRepMesh_Deleted )
     {
-      // in some cases there remain unused boundaries check
-      itFr.Initialize(Frontier());
+      Standard_Integer anEdgeIdx = aLoopEdges.First();
+      MeshLeftPolygonOf( Abs( anEdgeIdx ), ( anEdgeIdx > 0 ) );
     }
+      
+    aLoopEdges.RemoveFirst();
+  }
+}
+
+//=======================================================================
+//function : CreateTrianglesOnNewVertices
+//purpose  : Creation of triangles from the new nodes
+//=======================================================================
+void BRepMesh_Delaun::CreateTrianglesOnNewVertices( TColStd_Array1OfInteger& theVertexIndexes )
+{
+  BRepMesh_MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
+
+  // Insertion of nodes :
+  Standard_Boolean isModify = Standard_True;
+  
+  Standard_Integer anIndex = theVertexIndexes.Lower();
+  Standard_Integer anUpper = theVertexIndexes.Upper();
+  for( ; anIndex <= anUpper; ++anIndex ) 
+  {
+    aLoopEdges.Clear();
     
-    for (; itFr.More(); itFr.Next()) {
-      if (MeshData->ElemConnectedTo(itFr.Key()).IsEmpty()) { 
-        MeshLeftPolygonOf(itFr.Key(), Standard_True); 
-      }
-    }
+    Standard_Integer aVertexIdx = theVertexIndexes( anIndex );    
+    const BRepMesh_Vertex& aVertex = GetVertex( aVertexIdx );
 
-    if ( pass == 2 ) break;
-
-    // After this processing there sometimes remain triangles outside boundaries.
-    // Destruction of these triangles : 
-    Standard_Integer nbFront;
-
-    // For each edge with only one connection
-    // If one of its tops already passes two boundary edges, 
-    // the connected triangle is outside of the contour 
-    Standard_Boolean again = Standard_True;
-
-    while (again) {
-      tril.Clear();
-      loopEdges.Clear();
-
-      for (itFr.Initialize(FreeEdges()); itFr.More(); itFr.Next()) {
-        const BRepMesh_Edge& edg=GetEdge(itFr.Key());
-        if (edg.Movability()!=BRepMesh_Frontier) {
-          nbFront=0;
-          if (MeshData->ElemConnectedTo(itFr.Key()).IsEmpty()) 
-            loopEdges.Bind(itFr.Key(), Standard_True);
-          else {
-            for (itconx.Init(MeshData->LinkNeighboursOf(edg.FirstNode()));
-              itconx.More(); itconx.Next()) {
-                if (GetEdge(itconx.Value()).Movability()==BRepMesh_Frontier) {
-                  nbFront++;
-                  if (nbFront>1) break;
-                }
-            }
-            if (nbFront==2) {
-              const BRepMesh_PairOfIndex& aPair = MeshData->ElemConnectedTo(itFr.Key());
-              for(Standard_Integer j = 1, jn = aPair.Extent(); j <= jn; j++) {
-                const Standard_Integer elemId = aPair.Index(j);
-                GetTriangle(elemId).Edges(e1, e2, e3, o1, o2, o3);
-                if (GetEdge(e1).Movability()==BRepMesh_Free &&
-                  GetEdge(e2).Movability()==BRepMesh_Free &&
-                  GetEdge(e3).Movability()==BRepMesh_Free) {
-  #ifdef TRIANGULATION_DEBUG
-                    if (Triangulation_Trace>0) {
-                      cout << " ----> destruction du triangle" << elemId <<endl;
-                    }
-  #endif
-                    tril.Append(elemId);
-                }
-              }
-            }
-          }
+    // Iterator in the list of indexes of circles containing the node
+    BRepMesh_ListOfInteger& aCirclesList = myCircles.Select( aVertex.Coord() );
+    
+    Standard_Integer onEgdeId = 0, aTriangleId = 0;
+    BRepMesh_ListOfInteger::Iterator aCircleIt( aCirclesList );
+    for ( ; aCircleIt.More(); aCircleIt.Next() )
+    {
+      // To add a node in the mesh it is necessary to check conditions: 
+      // - the node should be within the boundaries of the mesh and so in an existing triangle
+      // - all adjacent triangles should belong to a component connected with this triangle
+      if ( Contains( aCircleIt.Value(), aVertex, onEgdeId ) )
+      {
+        if ( onEgdeId == 0 )
+        {
+          aTriangleId = aCircleIt.Value();
+          aCirclesList.Remove( aCircleIt );
+          break;
+        }
+        else if ( GetEdge( onEgdeId ).Movability() == BRepMesh_Free )
+        {
+          aTriangleId = aCircleIt.Value();
+          aCirclesList.Remove( aCircleIt );
+          break;
         }
       }
+    }
 
-    // Destruction of triangles :
-      Standard_Integer kk = 0;
-      for (; !tril.IsEmpty(); tril.RemoveFirst()) {
-        DeleteTriangle(tril.First(), loopEdges);
-        kk++;
-      }
+    if ( aTriangleId > 0 )
+    {
+      DeleteTriangle( aTriangleId, aLoopEdges );
 
-      // destruction of remaining hanging edges
-      for (itFE.Initialize(loopEdges); itFE.More(); itFE.Next()) {
-        if (MeshData->ElemConnectedTo(itFE.Key()).IsEmpty())
-          MeshData->RemoveLink(itFE.Key());
+      isModify = Standard_True;    
+      while ( isModify && !aCirclesList.IsEmpty() )
+      {
+        isModify = Standard_False;
+        BRepMesh_ListOfInteger::Iterator aCircleIt1( aCirclesList );
+        for ( ; aCircleIt1.More(); aCircleIt1.Next() )
+        {
+          Standard_Integer e[3];
+          Standard_Boolean o[3];
+          GetTriangle( aCircleIt1.Value() ).Edges( e[0], e[1], e[2],
+                                                   o[0], o[1], o[2] );
+                                                   
+          if ( aLoopEdges.IsBound( e[0] ) || 
+               aLoopEdges.IsBound( e[1] ) || 
+               aLoopEdges.IsBound( e[2] ) )
+          {
+            isModify = Standard_True;
+            DeleteTriangle( aCircleIt1.Value(), aLoopEdges );
+            aCirclesList.Remove( aCircleIt1 );
+            break;
+          }
+        }
       }
 
-      if (kk == 0) break;
+      // Creation of triangles with the current node and free edges
+      // and removal of these edges from the list of free edges
+      CreateTriangles( aVertexIdx, aLoopEdges );
     }
   }
+  // Check that internal edges are not crossed by triangles
+  BRepMesh_MapOfInteger::Iterator anInernalEdgesIt( InternalEdges() );
 
-/*   // find external triangles on boundary edges
-  // because in comlex curved boundaries external triangles can appear
-  // after "mesh left polygon"
-  for (itFr.Initialize(Frontier()); itFr.More(); itFr.Next()) {
-    const BRepMesh_PairOfIndex& aPair = MeshData->ElemConnectedTo(itFr.Key());
-    for(Standard_Integer j = 1, jn = aPair.Extent(); j <= jn; j++) {
-      const BRepMesh_Triangle& trc=GetTriangle(aPair.Index(j));
-      trc.Edges(e1,e2,e3,o1,o2,o3);
-      if      ((itFr.Key()==e1 && !o1) || 
-        (itFr.Key()==e2 && !o2) ||
-        (itFr.Key()==e3 && !o3))   {
-#ifdef TRIANGULATION_DEBUG
-          if (Triangulation_Trace>0) {
-            cout << "---> destruction of triangle " << aPair.Index(j) << endl;
-          }
-#endif
-          tril.Append(aPair.Index(j));
-      }
+  // Destruction of triancles intersecting internal edges 
+  // and their replacement by makeshift triangles
+  anInernalEdgesIt.Reset();
+  for ( ; anInernalEdgesIt.More(); anInernalEdgesIt.Next() )
+  {
+    Standard_Integer aNbC;
+    aNbC = myMeshData->ElemConnectedTo( anInernalEdgesIt.Key() ).Extent();
+    if ( aNbC == 0 )
+    {
+      MeshLeftPolygonOf( anInernalEdgesIt.Key(), Standard_True  ); 
+      MeshLeftPolygonOf( anInernalEdgesIt.Key(), Standard_False ); 
     }
   }
 
-  // destruction  of external triangles on boundary edges
-  for (; !tril.IsEmpty(); tril.RemoveFirst()) {
-    DeleteTriangle(tril.First(), loopEdges);
-  }
-
-  for (itFE.Initialize(loopEdges); itFE.More(); itFE.Next()) {
-    if (MeshData->ElemConnectedTo(itFE.Key()).IsEmpty())
-      MeshData->RemoveLink(itFE.Key());
-  }
-
-
-  // in some cases there remain unused boundaries check
-  for (itFr.Initialize(Frontier()); itFr.More(); itFr.Next()) {
-    if (MeshData->ElemConnectedTo(itFr.Key()).IsEmpty()) { 
-      MeshLeftPolygonOf(itFr.Key(), Standard_True); 
-    }
-  } */
+  // Adjustment of meshes to boundary edges
+  FrontierAdjust();
 }
 
-
 //=======================================================================
-//function : MeshLeftPolygonOf
-//purpose  : Triangulation of the polygon to the left of <indexEdg>.(material side)
+//function : CleanupMesh
+//purpose  : Cleanup mesh from the free triangles
 //=======================================================================
-void BRepMesh_Delaun::MeshLeftPolygonOf(const Standard_Integer indexEdg,
-                                        const Standard_Boolean forwdEdg)
+void BRepMesh_Delaun::CleanupMesh()
 {
-  const BRepMesh_Edge& edg=GetEdge(indexEdg);
-  TColStd_SequenceOfInteger polyg;
-  BRepMesh_MapOfIntegerInteger loopEdges(10,MeshData->Allocator());
-  TColStd_MapOfInteger usedEdges;
-
-  // Find the polygon
-  usedEdges.Add(indexEdg);
-  Standard_Integer debut, prem, pivo;
-  Standard_Integer ders =0, oth =0;
-
-  if (forwdEdg) {
-    polyg.Append(indexEdg);
-    prem=edg.FirstNode();
-    pivo=edg.LastNode();
-  }
-  else {
-    polyg.Append(-indexEdg);
-    prem=edg.LastNode();
-    pivo=edg.FirstNode();
-  }
-  debut=prem;
-  const BRepMesh_Vertex& debEd=GetVertex(debut);
-  const BRepMesh_Vertex& finEd=GetVertex(pivo);
-
-  // Check the presence of the previous edge <indexEdg> :
-  BRepMesh_ListOfInteger::Iterator itLiVer(MeshData->LinkNeighboursOf(prem));
-  for (; itLiVer.More(); itLiVer.Next()) {
-    oth=0;
-    if (itLiVer.Value()!=indexEdg) {
-      const BRepMesh_Edge& nedg=GetEdge(itLiVer.Value());
-      oth=nedg.LastNode();
-      if (oth==prem) oth=nedg.FirstNode();
-      break;
-    }
-  }
-  if (oth==0) {
-#ifdef TRIANGULATION_DEBUG
-    if (Triangulation_Trace>0)
-      cout << " MeshLeftPolygonOf : No path previous Edge!" << endl; 
-#endif
-    return;
-  }
-
+  BRepMesh_MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
+  ListOfInteger aTrianglesList;
 
-  gp_XY vedge(finEd.Coord());
-  vedge.Subtract(debEd.Coord());
-  gp_XY ved1(vedge);
-  gp_XY ved2;
-  Standard_Integer curEdg=indexEdg, e1, e2, e3;
-  Standard_Boolean o1, o2, o3;
-
-  // Find the nearest to <indexEdg> closed polygon :
-  Standard_Boolean InMesh, notInters;
-  Standard_Integer nextedge;
-  Standard_Real ang, angref;
-  gp_XY vpivo, vedcur, voth;
-
-  while (pivo!=debut) {
-    nextedge=0;
-    if (PositiveOrientation) angref=RealFirst();
-    else                     angref=RealLast();
-    const BRepMesh_Vertex& vertPivo=GetVertex(pivo);
-    vpivo=vertPivo.Coord();
-    vpivo.Subtract(debEd.Coord());
-
-    itLiVer.Init(MeshData->LinkNeighboursOf(pivo));
-
-    // Find the next edge with the greatest angle with <indexEdg>
-    // and non intersecting <indexEdg> :
-
-    for (; itLiVer.More(); itLiVer.Next()) {
-      if (itLiVer.Value()!=curEdg) {
-        notInters=Standard_True;
-        const BRepMesh_Edge& nedg=GetEdge(itLiVer.Value());
-
-        InMesh=Standard_True;
-        if (nedg.Movability()==BRepMesh_Free) {
-          if (MeshData->ElemConnectedTo(itLiVer.Value()).IsEmpty()) 
-            InMesh=Standard_False;
-        }
+  while ( Standard_True )
+  {
+    aTrianglesList.Clear();
+    aLoopEdges.Clear();
 
-        if (InMesh) {
-          oth=nedg.FirstNode();
-          if (oth==pivo) oth=nedg.LastNode();
-
-          vedcur=GetVertex(oth).Coord();
-          vedcur.Subtract(vertPivo.Coord());
-          if (vedcur.Modulus() >= gp::Resolution() &&
-            ved1.Modulus() >= gp::Resolution()) {
-              if (prem!=debut && oth!=debut) {
-                voth=GetVertex(oth).Coord();
-                voth.Subtract(debEd.Coord());
-                if ((vedge^vpivo)*(vedge^voth)<0.) {
-                  voth=vertPivo.Coord();
-                  voth.Subtract(finEd.Coord());
-                  if ((vedcur^vpivo)*(vedcur^voth)<0.) 
-                    notInters=Standard_False;
+    BRepMesh_MapOfInteger::Iterator aFreeEdgesIt( FreeEdges() );
+    for ( ; aFreeEdgesIt.More(); aFreeEdgesIt.Next() )
+    {
+      const BRepMesh_Edge& anEdge = GetEdge( aFreeEdgesIt.Key() );
+      if ( anEdge.Movability() != BRepMesh_Frontier )
+      {
+        Standard_Integer aFrontierNb = 0;
+        if ( myMeshData->ElemConnectedTo( aFreeEdgesIt.Key() ).IsEmpty() ) 
+          aLoopEdges.Bind( aFreeEdgesIt.Key(), Standard_True );
+        else
+        {
+          BRepMesh_ListOfInteger::Iterator aConnectedLinksIt( 
+            myMeshData->LinkNeighboursOf( anEdge.FirstNode() ) );
+            
+          for ( ; aConnectedLinksIt.More(); aConnectedLinksIt.Next() )
+          {
+            if ( GetEdge( aConnectedLinksIt.Value() ).Movability() == BRepMesh_Frontier )
+            {
+              aFrontierNb++;
+              if ( aFrontierNb > 1 )
+                break;
+            }
+          }
+          
+          if ( aFrontierNb == 2 )
+          {
+            const BRepMesh_PairOfIndex& aPair = myMeshData->ElemConnectedTo( aFreeEdgesIt.Key() );
+            for ( Standard_Integer j = 1, jn = aPair.Extent(); j <= jn; ++j )
+            {
+              const Standard_Integer anElemId = aPair.Index(j);
+              if ( anElemId < 0 )
+                continue;
+                
+              Standard_Integer e[3];
+              Standard_Boolean o[3];
+              GetTriangle( anElemId ).Edges( e[0], e[1], e[2],
+                                             o[0], o[1], o[2] );
+              
+              Standard_Boolean isTriangleToDelete = Standard_True;
+              for ( Standard_Integer k = 0; k < 3; ++k )
+              {
+                if ( GetEdge( e[k] ).Movability() != BRepMesh_Free )
+                {
+                  isTriangleToDelete = Standard_False;
+                  break;
                 }
               }
 
-              if (notInters) {
-                ang=gp_Vec2d(ved1).Angle(gp_Vec2d(vedcur));
-
-                if ((PositiveOrientation && ang>angref) ||
-                  (!PositiveOrientation && ang<angref)) {
-                    angref=ang;
-                    ved2=vedcur;
-                    if (nedg.FirstNode()==pivo) nextedge=itLiVer.Value();
-                    else                        nextedge=-itLiVer.Value();
-                    ders=oth;
-
-                    //epa: Find correct closing not direct to
-                    // link but with maximal angle
-                    // otherwise, polygon greater that expected is found
-                    //if (ders==debut) break;
-                }
-              }
+              if ( isTriangleToDelete )
+                aTrianglesList.Append( anElemId );
+            }
           }
         }
       }
     }
 
-    if (nextedge!=0) {
-      if (Abs(nextedge)!=indexEdg && Abs(nextedge)!=curEdg) {
-        curEdg=Abs(nextedge);
+    // Destruction of triangles :
+    Standard_Integer aDeletedTrianglesNb = 0;
+    for ( ; !aTrianglesList.IsEmpty(); aTrianglesList.RemoveFirst() )
+    {
+      DeleteTriangle( aTrianglesList.First(), aLoopEdges );
+      aDeletedTrianglesNb++;
+    }
 
-        if (!usedEdges.Add(curEdg)) {
+    // Destruction of remaining hanging edges
+    BRepMesh_MapOfIntegerInteger::Iterator aLoopEdgesIt( aLoopEdges );
+    for ( ; aLoopEdgesIt.More(); aLoopEdgesIt.Next() )
+    {
+      if ( myMeshData->ElemConnectedTo( aLoopEdgesIt.Key() ).IsEmpty() )
+        myMeshData->RemoveLink( aLoopEdgesIt.Key() );
+    }
 
-          //if this edge has already been added to the polygon, 
-          //there is a risk of looping (attention to open contours)
-#ifdef TRIANGULATION_DEBUG
-          if (Triangulation_Trace>0)
-            cout << " MeshLeftPolygonOf : no closing of the polygon !" 
-            << endl; 
-#endif
-
-          // all edges of the boundary contour are removed from the polygon
-          curEdg=Abs(polyg(polyg.Length()));
-          while (GetEdge(curEdg).Movability()==BRepMesh_Frontier){
-            polyg.Remove(polyg.Length());
-            if (polyg.Length()<=0) break;
-            curEdg=Abs(polyg(polyg.Length()));
-          }
-          return;
-        }
+    if ( aDeletedTrianglesNb == 0 )
+      break;
+  }
+}
 
-        polyg.Append(nextedge);
-
-        Standard_Boolean forw=nextedge>0;
-        const BRepMesh_PairOfIndex& aPair = MeshData->ElemConnectedTo(curEdg);
-        for(Standard_Integer j = 1, jn = aPair.Extent(); j <= jn; j++) {
-          const Standard_Integer elemId = aPair.Index(j);
-          GetTriangle(elemId).Edges(e1,e2,e3,o1,o2,o3);
-          if ((e1==curEdg && o1==forw) || 
-            (e2==curEdg && o2==forw) ||
-            (e3==curEdg && o3==forw)) {
-              DeleteTriangle(elemId, loopEdges);
-              break;
+//=======================================================================
+//function : FrontierAdjust
+//purpose  : Adjust the mesh on the frontier
+//=======================================================================
+void BRepMesh_Delaun::FrontierAdjust()
+{
+  BRepMesh_MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
+  ListOfInteger aTrianglesList;
+
+  for ( Standard_Integer aPass = 1; aPass <= 2; ++aPass )
+  {      
+    // 1 pass): find external triangles on boundary edges
+    // 2 pass): find external triangles on boundary edges
+    // because in comlex curved boundaries external triangles can appear  
+    // after "mesh left aPolygonon"
+    
+    BRepMesh_MapOfInteger::Iterator aFrontierIt( Frontier() );
+    for ( ; aFrontierIt.More(); aFrontierIt.Next() )
+    {
+      const BRepMesh_PairOfIndex& aPair = myMeshData->ElemConnectedTo( aFrontierIt.Key() );
+      for( Standard_Integer j = 1, jn = aPair.Extent(); j <= jn; ++j )
+      {
+        const Standard_Integer aPriorElemId = aPair.Index(j);
+        if( aPriorElemId < 0 )
+            continue;
+            
+        Standard_Integer e[3];
+        Standard_Boolean o[3];
+        GetTriangle( aPriorElemId ).Edges( e[0], e[1], e[2],
+                                           o[0], o[1], o[2] );
+
+        for ( Standard_Integer n = 0; n < 3; ++n )
+        {
+          if ( aFrontierIt.Key() == e[n] && !o[n] )
+          {
+            aTrianglesList.Append( aPriorElemId );
+            break;
           }
         }
       }
     }
-    else {
-#ifdef TRIANGULATION_DEBUG
-      if (Triangulation_Trace>0)
-        cout << " MeshLeftPolygonOf : No next !" << endl; 
-#endif
-      return;
+
+    // destruction  of external triangles on boundary edges
+    for ( ; !aTrianglesList.IsEmpty(); aTrianglesList.RemoveFirst() )
+      DeleteTriangle( aTrianglesList.First(), aLoopEdges );
+
+    // destrucrion of remaining hanging edges :
+    BRepMesh_MapOfIntegerInteger::Iterator aLoopEdgesIt( aLoopEdges );
+    for ( ; aLoopEdgesIt.More(); aLoopEdgesIt.Next() )
+    {
+      if (myMeshData->ElemConnectedTo( aLoopEdgesIt.Key() ).IsEmpty() )
+        myMeshData->RemoveLink( aLoopEdgesIt.Key() );
     }
-    prem=pivo;
-    pivo=ders;
-    ved1=ved2;
-  }
+      
+
+    // destruction of triangles crossing the boundary edges and 
+    // their replacement by makeshift triangles
+    if ( aPass == 1 )
+      aFrontierIt.Reset();
+    else
+      // in some cases there remain unused boundaries check
+      aFrontierIt.Initialize( Frontier() );
 
+    NCollection_Vector<Bnd_Box2d> aFrontBoxes;
+    for ( ; aFrontierIt.More(); aFrontierIt.Next() )
+    {
+      const BRepMesh_Edge& anEdge = GetEdge( aFrontierIt.Key() );
+      const BRepMesh_Vertex& aV1  = GetVertex( anEdge.FirstNode() );
+      const BRepMesh_Vertex& aV2  = GetVertex( anEdge.LastNode()  );
+      fillBndBox( aFrontBoxes, aV1, aV2 );
 
-  // Destruction of unused free edges :
-  BRepMesh_MapOfIntegerInteger::Iterator itFE(loopEdges);
+      if ( myMeshData->ElemConnectedTo( aFrontierIt.Key() ).IsEmpty() )
+        MeshLeftPolygonOf( aFrontierIt.Key(), Standard_True ); 
+    }
 
-  for (; itFE.More(); itFE.Next()) {
-    if (MeshData->ElemConnectedTo(itFE.Key()).IsEmpty())
-      MeshData->RemoveLink(itFE.Key());
-  }
+    if ( aPass == 1 ) 
+      continue;
 
-  MeshPolygon(polyg);
+    CleanupMesh();
+  }
 }
 
-
 //=======================================================================
-//function : MeshPolygon
-//purpose  : Triangulatiion of a closed polygon described by the list of indexes of
-//           its edges in the structure. (negative index == reversed)
+//function : KillInternalTriangles
+//purpose  : Removes triangles within polygon
 //=======================================================================
-void BRepMesh_Delaun::MeshPolygon  (TColStd_SequenceOfInteger& poly)
+void BRepMesh_Delaun::KillInternalTriangles( Standard_Integer theEdgeId, 
+                                             const TColStd_MapOfInteger& theIgnoredEdges,
+                                             BRepMesh_MapOfIntegerInteger& theLoopEdges )
 {
-  Standard_Integer vert, vert1, vert2, vert3 =0, tri;
-
-  if (poly.Length()==3) {
-    tri=MeshData->AddElement(BRepMesh_Triangle(Abs(poly(1)),Abs(poly(2)),Abs(poly(3)), 
-      poly(1)>0,   poly(2)>0,   poly(3)>0,
-      BRepMesh_Free));
-    tCircles.MocAdd(tri);
-    const BRepMesh_Edge& edg1=GetEdge(Abs(poly(1)));
-    const BRepMesh_Edge& edg2=GetEdge(Abs(poly(2)));
-    if (poly(1)>0) {
-      vert1=edg1.FirstNode();
-      vert2=edg1.LastNode();
-    }
-    else {
-      vert1=edg1.LastNode();
-      vert2=edg1.FirstNode();
-    }
-    if (poly(2)>0) 
-      vert3=edg2.LastNode();
-    else
-      vert3=edg2.FirstNode();
+  if ( theIgnoredEdges.Contains( theEdgeId ) )
+    return;   
 
-    if (!tCircles.Add(GetVertex(vert1).Coord(), 
-      GetVertex(vert2).Coord(), 
-      GetVertex(vert3).Coord(),
-      tri)) {
-        MeshData->RemoveElement(tri);
-    }
-  }
+  const BRepMesh_PairOfIndex& aPair = myMeshData->ElemConnectedTo( theEdgeId );
+  for ( Standard_Integer i = 1; i <= aPair.Extent(); ++i )
+  {
+    Standard_Integer anElemId = aPair.Index(i);
+    if( anElemId < 0 )
+      continue;
 
-  else if (poly.Length()>3) {
-    const BRepMesh_Edge& edg=GetEdge(Abs(poly(1)));
-    Standard_Real distmin=RealLast();
-    Standard_Integer ip, used =0;
+    Standard_Integer e[3];
+    Standard_Boolean o[3];
+    GetTriangle( anElemId ).Edges( e[0], e[1], e[2],
+                                   o[0], o[1], o[2] );
 
-    if (poly(1)>0) {
-      vert1=edg.FirstNode();
-      vert2=edg.LastNode();
-    }
-    else {
-      vert1=edg.LastNode();
-      vert2=edg.FirstNode();
-    }
-    gp_XY vedg(GetVertex(vert2).Coord()-
-      GetVertex(vert1).Coord());
-    Standard_Real modul=vedg.Modulus();
-    if (modul>0.) {
-      vedg.SetCoord(vedg.X()/modul, vedg.Y()/modul);
-
-      for (ip=3; ip<=poly.Length(); ip++) {
-        const BRepMesh_Edge& nedg=GetEdge(Abs(poly(ip)));
-        if (poly(ip)>0) vert=nedg.FirstNode();
-        else            vert=nedg.LastNode();
-        gp_XY vep(GetVertex(vert).Coord()-GetVertex(vert2).Coord());
-
-        Standard_Real dist=vedg^vep;
-        if (Abs(dist)>Precision::PConfusion()) {
-          if ((dist>0. && PositiveOrientation) || 
-            (dist<0. && !PositiveOrientation)) { 
-              if (Abs(dist)<distmin) {
-                distmin=dist;
-                vert3=vert;
-                used=ip;
-              }
-          }
+    for ( Standard_Integer anIndex = 0; anIndex < 3; ++anIndex )
+    {
+      if ( e[anIndex] == theEdgeId )
+      {
+        DeleteTriangle( anElemId, theLoopEdges );
+        for ( Standard_Integer n = 0; n < 2; ++n )
+        {
+          Standard_Integer aCurEdge = e[(anIndex + n + 1) % 3];
+          KillInternalTriangles( aCurEdge, theIgnoredEdges, theLoopEdges );
         }
       }
     }
+  }
+}
 
-    Standard_Integer ne2, ne3;
-    if (distmin<RealLast()) {
-      ne2=MeshData->AddLink(BRepMesh_Edge(vert2, vert3, BRepMesh_Free));
-      ne3=MeshData->AddLink(BRepMesh_Edge(vert3, vert1, BRepMesh_Free));
-      tri=MeshData->AddElement(BRepMesh_Triangle(Abs(poly(1)), Abs(ne2), Abs(ne3), 
-        (poly(1)>0),  (ne2>0),  (ne3>0),
-        BRepMesh_Free));
-
-      if (!tCircles.Add(GetVertex(vert1).Coord(), 
-        GetVertex(vert2).Coord(), 
-        GetVertex(vert3).Coord(),
-        tri)) {
-          MeshData->RemoveElement(tri);
-      }
+//=======================================================================
+//function : RemovePivotTriangles
+//purpose  : Removes triangles around the given pivot node
+//=======================================================================
+void BRepMesh_Delaun::RemovePivotTriangles( const Standard_Integer theEdgeInfo,
+                                            const Standard_Integer thePivotNode,
+                                            TColStd_MapOfInteger& theInfectedEdges,
+                                            BRepMesh_MapOfIntegerInteger& theLoopEdges,
+                                            const Standard_Boolean isFirstPass )
+{
+  Standard_Integer e[3];
+  Standard_Boolean o[3];
+  Standard_Integer aGeneralEdgeId = -1;
+
+  Standard_Integer anMainEdgeId = Abs( theEdgeInfo );
+  Standard_Boolean anIsForward = theEdgeInfo > 0;
+  const BRepMesh_PairOfIndex& aPair = myMeshData->ElemConnectedTo( anMainEdgeId );
+  for ( Standard_Integer j = 1, jn = aPair.Extent(); j <= jn; ++j )
+  {
+    Standard_Integer anElemId = aPair.Index(j);
+    if( anElemId < 0 )
+      continue;
+
+    GetTriangle( anElemId ).Edges( e[0], e[1], e[2],
+                                   o[0], o[1], o[2] );
 
-      if (used<poly.Length()) {
-        TColStd_SequenceOfInteger suitePoly;
-        poly.Split(used, suitePoly);
-        suitePoly.Prepend(-ne3);
-        MeshPolygon(suitePoly);
+    Standard_Boolean isFind = Standard_False;
+    for ( Standard_Integer anIndex = 0; anIndex < 3; ++anIndex )
+    {
+      if ( e[anIndex] == anMainEdgeId && o[anIndex] == anIsForward )
+      {
+        // triangle detected
+        DeleteTriangle( anElemId, theLoopEdges );
+        aGeneralEdgeId = anIndex;
+        break;
       }
-      else 
-        poly.Remove(poly.Length());
+    }
+       
+    if ( aGeneralEdgeId != -1 )
+      break;
+  }
 
-      if (used>3) {
-        poly.SetValue(1, -ne2);
-        MeshPolygon(poly);
+  if ( aGeneralEdgeId != -1 )
+  {
+    // delete triangles around of aPivotNode starting from the bounding one
+    // define edge connected to vertes
+    Standard_Integer anEdgeId = -1;
+    for ( Standard_Integer i = 0; i < 2; ++i )
+    {
+      Standard_Integer aTmpEdgeId = e[(aGeneralEdgeId + i + 1) % 3];
+      const BRepMesh_Edge& anEdge = GetEdge( aTmpEdgeId );
+      if ( anEdge.FirstNode() == thePivotNode || 
+           anEdge.LastNode()  == thePivotNode )
+      {
+        anEdgeId = aTmpEdgeId;
       }
+
+      if ( theInfectedEdges.Contains( aTmpEdgeId ) )
+        theInfectedEdges.Remove( aTmpEdgeId );
+      else
+        theInfectedEdges.Add( aTmpEdgeId );
     }
-    else {
-#ifdef TRIANGULATION_DEBUG
-      if (Triangulation_Trace>0) {
-        cout << " MeshPolygon : aucune possibilité !" << endl;
-        if (Triangulation_Trace==5) {
-          cout << " MeshPolygon : ";
-          for (vert=1; vert<=poly.Length(); vert++) 
-            cout << poly(vert) << " ";
-          cout<<endl;
+
+    if ( isFirstPass )
+      return;
+
+    while ( anEdgeId > 0 )
+    {
+      const BRepMesh_PairOfIndex& aFreePair = myMeshData->ElemConnectedTo( anEdgeId );
+      Standard_Integer anOldEdge = anEdgeId;
+      anEdgeId = -1;
+
+      for ( Standard_Integer aPairIndex = 1; aPairIndex <= aFreePair.Extent(); ++aPairIndex )
+      {
+        Standard_Integer anElemId = aFreePair.Index( aPairIndex );
+        if( anElemId < 0 )
+          continue;
+          
+        Standard_Integer e1[3];
+        Standard_Boolean o1[3];
+        GetTriangle( anElemId ).Edges( e1[0], e1[1], e1[2],
+                                       o1[0], o1[1], o1[2] );
+        
+        DeleteTriangle( anElemId, theLoopEdges );
+
+        for ( Standard_Integer i = 0; i < 3; ++i )
+        {
+          if ( e1[i] == anOldEdge )
+          {
+            for ( Standard_Integer i = 0; i < 2; ++i )
+            {
+              Standard_Integer aTmpEdgeId = e1[(i + 1) % 3];
+              const BRepMesh_Edge& anEdge = GetEdge( aTmpEdgeId );
+              if ( anEdge.FirstNode() == thePivotNode || 
+                   anEdge.LastNode()  == thePivotNode )
+              {
+                anEdgeId = aTmpEdgeId;
+              }
+            
+              if ( theInfectedEdges.Contains( aTmpEdgeId ) )
+                theInfectedEdges.Remove( aTmpEdgeId );
+              else
+                theInfectedEdges.Add( aTmpEdgeId );
+            }
+            break;
+          }
         }
       }
-#endif
     }
   }
 }
 
 //=======================================================================
-//function : SuperMesh
-//purpose  : 
+//function : CleanupPolygon
+//purpose  : Remove internal triangles from the given polygon
 //=======================================================================
-void BRepMesh_Delaun::SuperMesh  (const Bnd_Box2d& theBox)
+void BRepMesh_Delaun::CleanupPolygon( const TColStd_SequenceOfInteger& thePolygon,
+                                      TColStd_MapOfInteger& theInfectedEdges,
+                                      BRepMesh_MapOfIntegerInteger& theLoopEdges )
 {
-  Standard_Real xMin, yMin, xMax, yMax;
-  theBox.Get(xMin, yMin, xMax, yMax);
-  Standard_Real deltax=xMax-xMin;
-  Standard_Real deltay=yMax-yMin;
-
-  Standard_Real deltaMin=Min(deltax, deltay);
-  Standard_Real deltaMax=Max(deltax, deltay);
-  Standard_Real delta=deltax+deltay;
-  tCircles.SetMinMaxSize(gp_XY(xMin, yMin), gp_XY(xMax, yMax));
-
-  Standard_Integer koeff = 2;
-  if(MeshData->NbNodes()>100)
-    koeff = 5;
-  else if(MeshData->NbNodes()>1000)
-    koeff = 7;
-
-  tCircles.SetCellSize(deltax/koeff, deltay/koeff);
-
-  supVert1=MeshData->AddNode(BRepMesh_Vertex((xMin+xMax)/2, yMax+deltaMax, BRepMesh_Free));
-  supVert2=MeshData->AddNode(BRepMesh_Vertex(xMin-delta, yMin-deltaMin, BRepMesh_Free));
-  supVert3=MeshData->AddNode(BRepMesh_Vertex(xMax+delta, yMin-deltaMin, BRepMesh_Free));
-
-  Standard_Integer niver;
-  if (!PositiveOrientation) {
-    niver=supVert2;
-    supVert2=supVert3;
-    supVert3=niver;
-  }
+  Standard_Integer aPolyLen = thePolygon.Length();
 
-  Standard_Integer 
-    ed1=MeshData->AddLink(BRepMesh_Edge(supVert1,supVert2,BRepMesh_Free));
-  Standard_Integer 
-    ed2=MeshData->AddLink(BRepMesh_Edge(supVert2,supVert3,BRepMesh_Free));
-  Standard_Integer 
-    ed3=MeshData->AddLink(BRepMesh_Edge(supVert3,supVert1,BRepMesh_Free));
-  supTrian=BRepMesh_Triangle(Abs(ed1), Abs(ed2), Abs(ed3), 
-    (ed1>0), (ed2>0), (ed3>0), BRepMesh_Free);
-}
+  TColStd_MapOfInteger anIgnoredEdges;
+  NCollection_Map<Standard_Integer> aPolyVertices;
+  for ( Standard_Integer i = 1; i <= aPolyLen; ++i )
+  {
+    Standard_Integer aPolyEdgeId = Abs( thePolygon(i) );
+    anIgnoredEdges.Add( aPolyEdgeId );
 
+    const BRepMesh_Edge& aPolyEdge = GetEdge( aPolyEdgeId );
+    aPolyVertices.Add( aPolyEdge.FirstNode() );
+    aPolyVertices.Add( aPolyEdge.LastNode() );
 
-//=======================================================================
-//function : CreateTriangles
-//purpose  : Creation of triangles from the current node and free edges
-//           and deletion of these edges in the list :
-//=======================================================================
-void BRepMesh_Delaun::CreateTriangles (const Standard_Integer theVertexIndex,  
-                                       BRepMesh_MapOfIntegerInteger& theEdges)
-{
-  BRepMesh_MapOfIntegerInteger::Iterator itFE(theEdges);
-  Standard_Real z12, z23, modul;
-  Standard_Integer ne1, ne3, nt;
-  gp_XY vl1, vl2, vl3;
-  ListOfInteger EdgLoop, EdgOK, EdgExter;
-
-  const gp_XY& VertexCoord = MeshData->GetNode(theVertexIndex).Coord();
-  for (; itFE.More(); itFE.Next()) {
-    const BRepMesh_Edge& edg=GetEdge(itFE.Key());
-    Standard_Integer deb=edg.FirstNode();
-    Standard_Integer fin=edg.LastNode();
-    Standard_Boolean sens=(Standard_Boolean)theEdges(itFE.Key());
-    if (!sens) {
-      nt=deb;
-      deb=fin;
-      fin=nt;
-    }
+    if ( theInfectedEdges.Contains( aPolyEdgeId ) )
+      theInfectedEdges.Remove( aPolyEdgeId );
+  }
 
-    const BRepMesh_Vertex& debVert=GetVertex(deb);
-    const BRepMesh_Vertex& finVert=GetVertex(fin);
-
-    vl1=debVert.Coord();
-    vl1.Subtract(VertexCoord);
-    vl2=finVert.Coord();
-    vl2.Subtract(debVert.Coord());
-    //    vl3=theVertex.Coord();
-    vl3=VertexCoord;
-    vl3.Subtract(finVert.Coord());
-
-    z12=z23=0.;
-    modul=vl2.Modulus();
-    if (modul>Precision::PConfusion()) {
-      vl2.SetCoord(vl2.X()/modul, vl2.Y()/modul);
-      z12=vl1^vl2;
-      z23=vl2^vl3;
-    }
+  Standard_Real aRefTotalAngle = 2 * M_PI;
+  TColStd_MapIteratorOfMapOfInteger anInfectedIt( theInfectedEdges );
+  for ( ; anInfectedIt.More(); anInfectedIt.Next() )
+  {
+    Standard_Integer anEdgeId = anInfectedIt.Key();
+    const BRepMesh_Edge& anInfectedEdge = GetEdge( anEdgeId );
+    Standard_Integer anEdgeVertices[2] = { anInfectedEdge.FirstNode(),
+                                           anInfectedEdge.LastNode() };
 
-    if (Abs(z12)>=Precision::PConfusion() && 
-      Abs(z23)>=Precision::PConfusion()) {
-        Standard_Boolean sensOK;
-        if (PositiveOrientation) sensOK=(z12>0. && z23>0.);
-        else                     sensOK=(z12<0. && z23<0.);
-        if (sensOK) {
-          ne1=MeshData->AddLink(BRepMesh_Edge(theVertexIndex, deb, BRepMesh_Free));
-          ne3=MeshData->AddLink(BRepMesh_Edge(fin, theVertexIndex, BRepMesh_Free));
-          nt=MeshData->AddElement(BRepMesh_Triangle(Abs(ne1), itFE.Key(), Abs(ne3), 
-            (ne1>0), sens, (ne3>0),
-            BRepMesh_Free));
-
-          if (!tCircles.Add(VertexCoord, 
-            debVert.Coord(), 
-            finVert.Coord(), nt))
-            MeshData->RemoveElement(nt);
-        }
-        else {
+    Standard_Boolean isToExclude = Standard_False;
+    for ( Standard_Integer i = 0; i < 2; ++i )
+    {
+      Standard_Integer aCurVertex = anEdgeVertices[i];
+      if ( aPolyVertices.Contains( aCurVertex ) )
+        continue;
 
-          if (sens) EdgLoop.Append(itFE.Key());
-          else      EdgLoop.Append(-itFE.Key());
-          if (vl1.SquareModulus()>vl3.SquareModulus()) {
-            ne1=MeshData->AddLink(BRepMesh_Edge(theVertexIndex, deb, BRepMesh_Free));
-            EdgExter.Append(Abs(ne1));
-          }
-          else{
-            ne3=MeshData->AddLink(BRepMesh_Edge(fin, theVertexIndex, BRepMesh_Free));
-            EdgExter.Append(Abs(ne3));
-          }
+      gp_XY aCenterPointXY = GetVertex( aCurVertex ).Coord();
+      Standard_Real aTotalAng = 0.0;
+
+      for ( Standard_Integer i = 1; i <= aPolyLen; ++i )
+      {
+        Standard_Integer aPolyEdgeId = thePolygon(i);
+        const BRepMesh_Edge& aPolyEdge = GetEdge( Abs( aPolyEdgeId ) );
+        Standard_Integer aStartPoint, anEndPoint;
+        if ( aPolyEdgeId >= 0 )
+        {
+          aStartPoint = aPolyEdge.FirstNode();
+          anEndPoint  = aPolyEdge.LastNode();
         }
+        else
+        {
+          aStartPoint = aPolyEdge.LastNode();
+          anEndPoint  = aPolyEdge.FirstNode();
+        }
+
+        gp_XY aStartV = GetVertex( aStartPoint ).Coord() - aCenterPointXY;
+        gp_XY anEndV  = GetVertex( anEndPoint ).Coord()  - aCenterPointXY;
+
+        Standard_Real anAngle = gp_Vec2d( anEndV ).Angle( gp_Vec2d( aStartV ) );
+        aTotalAng += anAngle;
+      }
+      
+      if ( Abs( aRefTotalAngle - aTotalAng ) > Precision::Angular() )
+        isToExclude = Standard_True;
     }
-#ifdef TRIANGULATION_DEBUG
-    else {
-      if (Triangulation_Trace>0)
-        cout << " CreateTriangles : vector product too small !" << endl;
-    }
-#endif
-  }
-  theEdges.Clear();
-  while (!EdgExter.IsEmpty()) {
-    const BRepMesh_PairOfIndex& conx = MeshData->ElemConnectedTo(Abs(EdgExter.First()));
-    if (!conx.IsEmpty())
-      DeleteTriangle(conx.FirstIndex(), theEdges);
-    EdgExter.RemoveFirst();
+
+    if ( isToExclude )
+      anIgnoredEdges.Add( anEdgeId );
   }
 
-  for (itFE.Initialize(theEdges); itFE.More(); itFE.Next()) {
-    if (MeshData->ElemConnectedTo(itFE.Key()).IsEmpty())
-      MeshData->RemoveLink(itFE.Key());
+
+  anInfectedIt.Initialize( theInfectedEdges );
+  for ( ; anInfectedIt.More(); anInfectedIt.Next() )
+  {
+    Standard_Integer anEdgeId = anInfectedIt.Key();
+    KillInternalTriangles( anEdgeId, anIgnoredEdges, theLoopEdges);
   }
 
-  while (!EdgLoop.IsEmpty()) {
-    if (GetEdge(Abs(EdgLoop.First())).Movability()!=BRepMesh_Deleted) {
-      MeshLeftPolygonOf(Abs(EdgLoop.First()), (EdgLoop.First()>0));
-    }
-    EdgLoop.RemoveFirst();
+  BRepMesh_MapOfIntegerInteger::Iterator aLoopEdgesIt( theLoopEdges );
+  for ( ; aLoopEdgesIt.More(); aLoopEdgesIt.Next() )
+  {
+    if ( myMeshData->ElemConnectedTo( aLoopEdgesIt.Key() ).IsEmpty() )
+      myMeshData->RemoveLink( aLoopEdgesIt.Key() );
   }
 }
 
 //=======================================================================
-//function : CreateTrianglesOnNewVertices
-//purpose  : Creation of triangles from the new nodes
+//function : MeshLeftPolygonOf
+//purpose  : Triangulation of the aPolygonon to the left of <theEdgeIndex>.(material side)
 //=======================================================================
-void BRepMesh_Delaun::CreateTrianglesOnNewVertices (TColStd_Array1OfInteger& theVertexIndices)
+void BRepMesh_Delaun::MeshLeftPolygonOf( const Standard_Integer theEdgeIndex,
+                                         const Standard_Boolean isForward )
 {
-  BRepMesh_MapOfIntegerInteger loopEdges(10,MeshData->Allocator());
+  const BRepMesh_Edge& anEdge = GetEdge( theEdgeIndex );
+  NCollection_Map<Standard_Integer> aDealLinks;
+  TColStd_SequenceOfInteger aPolygon;
+  BRepMesh_MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
+  TColStd_MapOfInteger anUsedEdges;
+  TColStd_MapOfInteger anInfectedEdges;
+  
+  // Find the aPolygonon
+  anUsedEdges.Add( theEdgeIndex );
+  Standard_Integer aFirstNode, aStartNode, aPivotNode;
+  
+  if ( isForward )
+  {
+    aPolygon.Append( theEdgeIndex );
+    aStartNode = anEdge.FirstNode();
+    aPivotNode = anEdge.LastNode();
+  }
+  else
+  {
+    aPolygon.Append( -theEdgeIndex );
+    aStartNode = anEdge.LastNode();
+    aPivotNode = anEdge.FirstNode();
+  }
+  aFirstNode = aStartNode;
 
-  Standard_Integer iVert;
-  // Insertion of nodes :
-  Standard_Boolean modif=Standard_True;
-  Standard_Integer edgon, triPer;
-  Standard_Integer e1, e2, e3;
-  Standard_Boolean o1, o2, o3;
-  Standard_Integer aVertIdx;
+  const BRepMesh_Vertex& aStartVertex = GetVertex( aFirstNode );
+  const BRepMesh_Vertex& anEndVertex  = GetVertex( aPivotNode );
 
-  for( iVert = theVertexIndices.Lower(); iVert<=theVertexIndices.Upper(); iVert++ ) 
+  Standard_Integer aRefOtherNode = 0, anOtherNode = 0;
+  // Check the presence of the previous edge <theEdgeIndex> :
+  BRepMesh_ListOfInteger::Iterator aLinkIt( myMeshData->LinkNeighboursOf( aStartNode ) );
+  for ( ; aLinkIt.More(); aLinkIt.Next() )
   {
-    loopEdges.Clear();
-    edgon = 0, triPer = 0;
-    aVertIdx = theVertexIndices(iVert);    
-    const BRepMesh_Vertex& aVert = GetVertex(aVertIdx);  
+    if ( aLinkIt.Value() != theEdgeIndex )
+    {
+      const BRepMesh_Edge& aNextEdge = GetEdge( aLinkIt.Value() );
+      anOtherNode = aNextEdge.LastNode();
+      if ( anOtherNode == aStartNode )
+        anOtherNode = aNextEdge.FirstNode();
+      break;
+    }
+  }
+  if ( anOtherNode == 0 )
+    return;
 
-    // Iterator in the list of indexes of circles containing the node
-    BRepMesh_ListOfInteger& cirL=tCircles.Select(aVert.Coord());
+
+  gp_XY aVEdge( anEndVertex.Coord() );
+  aVEdge.Subtract( aStartVertex.Coord() );
+  gp_XY aPrevVEdge( aVEdge );
+  gp_XY aRefCurrVEdge, aCurrVEdge;
+  
+  Standard_Integer aCurrEdgeId = theEdgeIndex;
+  Standard_Integer aNextEdgeId;
+
+  // Find the nearest to <theEdgeIndex> closed aPolygonon :
+  Standard_Boolean isInMesh, isNotInters;
+  Standard_Real anAngle, aRefAngle;
+
+  NCollection_Vector <Bnd_Box2d> aBoxes;
+  fillBndBox( aBoxes, aStartVertex, anEndVertex );
     
-    BRepMesh_ListOfInteger::Iterator itT(cirL);
-    for (; itT.More(); itT.Next()) {
+  while ( aPivotNode != aFirstNode )
+  {
+    aNextEdgeId = 0;
+    if ( myPositiveOrientation )
+      aRefAngle = RealFirst();
+    else
+      aRefAngle = RealLast();
 
-      // To add a node in the mesh it is necessary to check conditions: 
-      // - the node should be within the boundaries of the mesh and so in an existing triangle
-      // - all adjacent triangles should belong to a component connected with this triangle
-      if (Contains(itT.Value(), aVert, edgon)) {
-        if (edgon==0) {
-          triPer=itT.Value();
-          cirL.Remove(itT);
-          break;
-        }
-        else if (GetEdge(edgon).Movability()==BRepMesh_Free) {
-          triPer=itT.Value();
-          cirL.Remove(itT);
-          break;
+    const BRepMesh_Vertex& aPivotVertex = GetVertex( aPivotNode );
+
+    // Find the next edge with the greatest angle with <theEdgeIndex>
+    // and non intersecting <theEdgeIndex> :
+    
+    aLinkIt.Init( myMeshData->LinkNeighboursOf( aPivotNode ) );
+    for ( ; aLinkIt.More(); aLinkIt.Next() )
+    {
+      Standard_Integer aNextLink = aLinkIt.Value();
+      Standard_Integer aNextLinkId = Abs( aNextLink );
+      if ( aDealLinks.Contains( aNextLinkId ) )
+        continue;
+
+      if ( aNextLinkId != aCurrEdgeId )
+      {
+        isNotInters = Standard_True;
+        const BRepMesh_Edge& aNextEdge = GetEdge( aNextLinkId );
+
+        isInMesh = Standard_True;
+        
+        //define if link exist in mesh      
+        if ( aNextEdge.Movability() == BRepMesh_Free )
+        {
+          if ( myMeshData->ElemConnectedTo( aLinkIt.Value() ).IsEmpty() ) 
+            isInMesh = Standard_False;
         }
-      }
-    }
 
-    if (triPer>0) {
-      DeleteTriangle(triPer, loopEdges);
-
-      modif=Standard_True;    
-      while (modif && !cirL.IsEmpty()) {
-        modif=Standard_False;
-        BRepMesh_ListOfInteger::Iterator itT1(cirL);
-        for (; itT1.More(); itT1.Next()) {
-          GetTriangle(itT1.Value()).Edges(e1,e2,e3,o1,o2,o3);
-          if (loopEdges.IsBound(e1) || 
-            loopEdges.IsBound(e2) || 
-            loopEdges.IsBound(e3)) {
-              modif=Standard_True;
-              DeleteTriangle(itT1.Value(), loopEdges);
-              cirL.Remove(itT1);
-              break;
+        if ( isInMesh )
+        {
+          anOtherNode = aNextEdge.FirstNode();
+          if ( anOtherNode == aPivotNode )
+            anOtherNode = aNextEdge.LastNode();
+
+          aCurrVEdge = GetVertex( anOtherNode ).Coord();
+          aCurrVEdge.Subtract( aPivotVertex.Coord() );
+          
+          if ( aCurrVEdge.Modulus() >= gp::Resolution() &&
+               aPrevVEdge.Modulus() >= gp::Resolution() )
+          {
+            anAngle = gp_Vec2d( aPrevVEdge ).Angle( gp_Vec2d( aCurrVEdge ) );
+
+            if ( ( myPositiveOrientation && anAngle > aRefAngle ) ||
+                ( !myPositiveOrientation && anAngle < aRefAngle ) )
+            {
+              Bnd_Box2d aBox;
+              aBox.Add( gp_Pnt2d( GetVertex( aNextEdge.FirstNode() ).Coord() ) );
+              aBox.Add( gp_Pnt2d( GetVertex( aNextEdge.LastNode()  ).Coord() ) );
+              
+              for ( Standard_Integer k = 0, aLen = aPolygon.Length(); k < aLen; ++k )
+              {
+                if ( !aBox.IsOut( aBoxes.Value( k ) ) )
+                {
+                  // intersection is possible...
+                  if ( IntSegSeg( aNextEdge, GetEdge( Abs( aPolygon( k + 1 ) ) ) ) )
+                  {
+                    isNotInters = Standard_False;
+                    break;
+                  }
+                }
+              }
+              
+              if( isNotInters )
+              {              
+                aRefAngle = anAngle;
+                aRefCurrVEdge = aCurrVEdge;
+                
+                if ( aNextEdge.FirstNode() == aPivotNode )
+                  aNextEdgeId =  aLinkIt.Value();
+                else
+                  aNextEdgeId = -aLinkIt.Value();
+                  
+                aRefOtherNode = anOtherNode;
+              }
+            }
           }
         }
       }
+    }
+    if ( aNextEdgeId != 0 )
+    {
+      if ( Abs( aNextEdgeId ) != theEdgeIndex && Abs( aNextEdgeId ) != aCurrEdgeId )
+      {
+        aCurrEdgeId = Abs( aNextEdgeId );
 
-      // Creation of triangles with the current node and free edges
-      // and removal of these edges from the list of free edges
-      CreateTriangles(aVertIdx, loopEdges);
+        if ( !anUsedEdges.Add( aCurrEdgeId ) )
+        {
+          //if this edge has already been added to the aPolygon, 
+          //there is a risk of looping (attention to open contours)
+          //remove last edge and continue
+          
+          aDealLinks.Add( aCurrEdgeId );
+
+          //roll back
+          continue;
+        }        
+
+        aPolygon.Append( aNextEdgeId );
+
+        const BRepMesh_Edge& aCurrEdge = GetEdge( aCurrEdgeId );
+        Standard_Integer aVert1 = aCurrEdge.FirstNode();
+        Standard_Integer aVert2 = aCurrEdge.LastNode();
+        fillBndBox( aBoxes, GetVertex( aVert1 ), GetVertex( aVert2 ) );
+
+        RemovePivotTriangles( aNextEdgeId, aPivotNode,
+          anInfectedEdges, aLoopEdges, (aPolygon.Length() == 2) );
+      }
     }
-  }
-  // check that internal edges are not crossed by triangles
-  BRepMesh_MapOfInteger::Iterator itFr(InternalEdges());
+    else
+    {
+      //hanging end
+      if ( aPolygon.Length() == 1 )
+        return;
 
-  // destruction of triancles intersecting internal edges 
-  // and their replacement by makeshift triangles
-  Standard_Integer nbc;
-
-  itFr.Reset();
-  for (; itFr.More(); itFr.Next()) {
-    nbc = MeshData->ElemConnectedTo(itFr.Key()).Extent();
-    if (nbc == 0) {
-      MeshLeftPolygonOf(itFr.Key(), Standard_True); 
-      MeshLeftPolygonOf(itFr.Key(), Standard_False); 
+      Standard_Integer aDeadEdgeId = Abs( aPolygon.Last() );
+      const BRepMesh_Edge& aDeadEdge = GetEdge( aDeadEdgeId );
+
+      aDealLinks.Add( aDeadEdgeId );
+
+      anUsedEdges.Remove( aDeadEdgeId );
+      aPolygon.Remove( aPolygon.Length() );
+
+      // return to previous point
+      Standard_Integer aLastValidEdge = aPolygon.Last();
+      const BRepMesh_Edge& aLastEdge = GetEdge( Abs( aLastValidEdge ) );
+
+      if( aLastValidEdge > 0 )
+      {
+        aStartNode = aLastEdge.FirstNode();
+        aPivotNode = aLastEdge.LastNode();
+      }
+      else
+      {
+        aStartNode = aLastEdge.LastNode();
+        aPivotNode = aLastEdge.FirstNode();
+      }
+      
+      const BRepMesh_Vertex& dV = GetVertex( aStartNode );
+      const BRepMesh_Vertex& fV = GetVertex( aPivotNode );
+      aPrevVEdge = fV.Coord() - dV.Coord();
+      continue;
     }
+    
+    aStartNode = aPivotNode;
+    aPivotNode = aRefOtherNode;
+    aPrevVEdge = aRefCurrVEdge;
   }
 
-  // adjustment of meshes to boundary edges
-  FrontierAdjust();
+  CleanupPolygon( aPolygon, anInfectedEdges, aLoopEdges );
+  MeshPolygon( aPolygon );
 }
 
 //=======================================================================
-//function : DeleteTriangle
-//purpose : The concerned triangles are deleted and the freed edges are added in 
-//           <loopEdges>.  If an edge is added twice, it does not exist and
-//          it is necessary to destroy it.  This corresponds to the destruction of two
-//          connected triangles.
+//function : MeshPolygon
+//purpose  : Triangulatiion of a closed aPolygonon described by the list of indexes of
+//           its edges in the structure. (negative index == reversed)
 //=======================================================================
-
-void  BRepMesh_Delaun::DeleteTriangle (const Standard_Integer tIndex, 
-                                       BRepMesh_MapOfIntegerInteger& fEdges)
+void BRepMesh_Delaun::MeshPolygon( TColStd_SequenceOfInteger& thePoly )
 {
-  tCircles.Delete(tIndex);
+  Standard_Integer aPivotNode, aVertex3 = 0;
+  Standard_Integer aFirstNode, aLastNode;
+  Standard_Integer aTriId;
 
-  TColStd_Array1OfInteger fe(1,3);
-  TColStd_Array1OfBoolean ornt(1,3);
-  GetTriangle(tIndex).Edges(fe(1), fe(2), fe(3), ornt(1), ornt(2), ornt(3));
-  MeshData->RemoveElement(tIndex);
+  if ( thePoly.Length() == 3 )
+  {
+    aTriId = myMeshData->AddElement( BRepMesh_Triangle( 
+      Abs( thePoly(1) ), Abs( thePoly(2) ), Abs( thePoly(3) ), 
+      thePoly(1) > 0,    thePoly(2) > 0,    thePoly(3) > 0,
+      BRepMesh_Free ) );
+      
+    myCircles.MocAdd( aTriId );
+    const BRepMesh_Edge& anEdge1 = GetEdge( Abs( thePoly(1) ) );
+    const BRepMesh_Edge& anEdge2 = GetEdge( Abs( thePoly(2) ) );
+    
+    if ( thePoly(1) > 0)
+    {
+      aFirstNode = anEdge1.FirstNode();
+      aLastNode  = anEdge1.LastNode();
+    }
+    else
+    {
+      aFirstNode = anEdge1.LastNode();
+      aLastNode  = anEdge1.FirstNode();
+    }
+    
+    if ( thePoly(2) > 0 ) 
+      aVertex3 = anEdge2.LastNode();
+    else
+      aVertex3 = anEdge2.FirstNode();
 
-  Standard_Integer i = 1;
-  for(; i <= 3; i++ )
+    Standard_Boolean isAdded = myCircles.Add( GetVertex( aFirstNode ).Coord(), 
+      GetVertex( aLastNode ).Coord(), GetVertex( aVertex3 ).Coord(), aTriId );
+      
+    if ( !isAdded )
+      myMeshData->RemoveElement( aTriId );
+  }
+  else if ( thePoly.Length() > 3 )
   {
-    if (!fEdges.Bind(fe(i), ornt(i))) 
+    NCollection_Vector <Bnd_Box2d> aBoxes;
+    Standard_Integer aPolyIdx, aUsedIdx = 0;
+    Standard_Integer aPolyLen = thePoly.Length();
+
+    for ( aPolyIdx = 1; aPolyIdx <= aPolyLen; ++aPolyIdx )
+    {
+      const BRepMesh_Edge& anEdge = GetEdge( Abs( thePoly( aPolyIdx ) ) );
+      aFirstNode = anEdge.FirstNode();
+      aLastNode  = anEdge.LastNode();
+      fillBndBox( aBoxes, GetVertex( aFirstNode ), GetVertex( aLastNode ) );
+    }
+    
+    const BRepMesh_Edge& anEdge = GetEdge( Abs( thePoly(1) ) );
+    Standard_Real aMinDist = RealLast();
+
+    if ( thePoly(1) > 0 )
+    {
+      aFirstNode = anEdge.FirstNode();
+      aLastNode  = anEdge.LastNode();
+    }
+    else
     {
-      fEdges.UnBind(fe(i));
-      MeshData->RemoveLink(fe(i));
+      aFirstNode = anEdge.LastNode();
+      aLastNode  = anEdge.FirstNode();
+    }
+    
+    gp_XY aVEdge( GetVertex( aLastNode  ).Coord() -
+                  GetVertex( aFirstNode ).Coord() );
+                  
+    Standard_Real aVEdgeLen = aVEdge.Modulus();
+    if ( aVEdgeLen > 0.)
+    {
+      aVEdge.SetCoord( aVEdge.X() / aVEdgeLen,
+                       aVEdge.Y() / aVEdgeLen );
+
+      for ( aPolyIdx = 3; aPolyIdx <= aPolyLen; ++aPolyIdx )
+      {
+        const BRepMesh_Edge& aNextEdge = GetEdge( Abs( thePoly( aPolyIdx ) ) );
+        if ( thePoly( aPolyIdx ) > 0)
+          aPivotNode = aNextEdge.FirstNode();
+        else
+          aPivotNode = aNextEdge.LastNode();
+          
+        gp_XY aVEdgePivot( GetVertex( aPivotNode ).Coord() -
+                           GetVertex( aLastNode  ).Coord() );
+
+        Standard_Real aDist = aVEdge ^ aVEdgePivot;
+        if ( Abs( aDist ) > Precision::PConfusion() )
+        {
+          if ( ( aDist > 0. &&  myPositiveOrientation ) || 
+               ( aDist < 0. && !myPositiveOrientation ) )
+          { 
+            if ( Abs( aDist ) < aMinDist )
+            {
+              Bnd_Box2d aBoxFirst, aBoxLast;
+              aBoxFirst.Add( gp_Pnt2d( GetVertex( aPivotNode ).Coord() ) );
+              aBoxFirst.Add( gp_Pnt2d( GetVertex( aLastNode  ).Coord() ) );
+              
+              aBoxLast.Add( gp_Pnt2d( GetVertex( aPivotNode ).Coord() ) );
+              aBoxLast.Add( gp_Pnt2d( GetVertex( aFirstNode ).Coord() ) );
+              
+              BRepMesh_Edge aCheckE1( aLastNode,  aPivotNode, BRepMesh_Free );
+              BRepMesh_Edge aCheckE2( aFirstNode, aPivotNode, BRepMesh_Free );
+              
+              Standard_Boolean isIntersect = Standard_False;
+              for ( Standard_Integer aPolyIdx1 = 2; aPolyIdx1 <= aPolyLen; ++aPolyIdx1 )
+              {
+                if( aPolyIdx1 == aPolyIdx )
+                  continue;
+                
+                const BRepMesh_Edge& aNextEdge1 = GetEdge( Abs( thePoly( aPolyIdx1 ) ) );
+                if ( !aBoxFirst.IsOut( aBoxes.Value( aPolyIdx1 - 1 ) ) )
+                {                    
+                  // intersection is possible...                  
+                  if( IntSegSeg( aCheckE1, aNextEdge1 ) )
+                  {
+                    isIntersect = Standard_True;
+                    break;
+                  }
+                }
+                
+                if ( !aBoxLast.IsOut( aBoxes.Value( aPolyIdx1 - 1 ) ) &&
+                     !aCheckE2.IsEqual( aNextEdge1 ) )
+                {
+                  // intersection is possible...                  
+                  if( IntSegSeg( aCheckE2, aNextEdge1 ) )
+                  {
+                    isIntersect = Standard_True;
+                    break;
+                  }
+                }
+              }
+              
+              if( !isIntersect )
+              {
+                aMinDist = aDist;
+                aVertex3 = aPivotNode;
+                aUsedIdx = aPolyIdx;
+              }
+            }
+          }
+        }
+      }
+    }
+
+    Standard_Integer aNewEdge2, aNewEdge3;
+    if ( aMinDist < RealLast() )
+    {
+      aNewEdge2 = myMeshData->AddLink( BRepMesh_Edge( aLastNode, aVertex3,   BRepMesh_Free ) );
+      aNewEdge3 = myMeshData->AddLink( BRepMesh_Edge( aVertex3,  aFirstNode, BRepMesh_Free ) );
+      aTriId    = myMeshData->AddElement( BRepMesh_Triangle( 
+        Abs( thePoly(1) ), Abs( aNewEdge2 ), Abs( aNewEdge3 ), 
+        thePoly(1) > 0,    aNewEdge2 > 0,    aNewEdge3 > 0,
+        BRepMesh_Free ) );
+
+      Standard_Boolean isAdded = myCircles.Add( GetVertex( aFirstNode ).Coord(), 
+        GetVertex( aLastNode ).Coord(), GetVertex( aVertex3 ).Coord(), aTriId );
+        
+      if ( !isAdded )
+        myMeshData->RemoveElement( aTriId );
+
+      if ( aUsedIdx < aPolyLen )
+      {
+        TColStd_SequenceOfInteger aSuitePoly;
+        thePoly.Split( aUsedIdx, aSuitePoly );
+        aSuitePoly.Prepend( -aNewEdge3 );
+        MeshPolygon( aSuitePoly );
+      }
+      else 
+        thePoly.Remove( aPolyLen );
+
+      if ( aUsedIdx > 3 )
+      {
+        thePoly.SetValue( 1, -aNewEdge2 );
+        MeshPolygon( thePoly );
+      }
     }
   }
 }
 
 //=======================================================================
 //function : RemoveVertex
-//purpose  : 
+//purpose  : Removes a vertex from the triangulation
 //=======================================================================
-void  BRepMesh_Delaun::RemoveVertex(const BRepMesh_Vertex& theVert)
+void  BRepMesh_Delaun::RemoveVertex( const BRepMesh_Vertex& theVertex )
 {
-  BRepMesh_SelectorOfDataStructureOfDelaun select(MeshData);
-  select.NeighboursOf(theVert);
+  BRepMesh_SelectorOfDataStructureOfDelaun aSelector( myMeshData );
+  aSelector.NeighboursOf( theVertex );
 
-  BRepMesh_MapOfIntegerInteger loopEdges(10,MeshData->Allocator());
+  BRepMesh_MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
 
   // Loop on triangles to be destroyed :
-  BRepMesh_MapOfInteger::Iterator trs(select.Elements());
-  for (;trs.More(); trs.Next()) {
-    DeleteTriangle(trs.Key(), loopEdges);
-  }
+  BRepMesh_MapOfInteger::Iterator aTriangleIt( aSelector.Elements() );
+  for ( ; aTriangleIt.More(); aTriangleIt.Next() )
+    DeleteTriangle( aTriangleIt.Key(), aLoopEdges );
 
-  TColStd_SequenceOfInteger polyg;
-  Standard_Integer iv;
-  Standard_Integer nbLi=loopEdges.Extent();
-  BRepMesh_MapOfIntegerInteger::Iterator itFE(loopEdges);
-
-  if (itFE.More()) {
-    const BRepMesh_Edge& edg=GetEdge(itFE.Key());
-    Standard_Integer deb=edg.FirstNode();
-    Standard_Integer fin;
-    Standard_Integer pivo=edg.LastNode();
-    Standard_Integer iseg=itFE.Key();
-    Standard_Boolean sens=(Standard_Boolean)loopEdges(iseg);
-    if (!sens) {
-      iv=deb;
-      deb=pivo;
-      pivo=iv;
-      polyg.Append(-iseg);
-    }
-    else {
-      polyg.Append(iseg);
+  TColStd_SequenceOfInteger aPolygon;
+  Standard_Integer aLoopEdgesCount = aLoopEdges.Extent();
+  BRepMesh_MapOfIntegerInteger::Iterator aLoopEdgesIt( aLoopEdges );
+
+  if ( aLoopEdgesIt.More() )
+  {
+    const BRepMesh_Edge& anEdge = GetEdge( aLoopEdgesIt.Key() );
+    Standard_Integer aFirstNode = anEdge.FirstNode();
+    Standard_Integer aLastNode;
+    Standard_Integer aPivotNode = anEdge.LastNode();
+    Standard_Integer anEdgeId   = aLoopEdgesIt.Key();
+    
+    Standard_Boolean isPositive = (Standard_Boolean)aLoopEdges( anEdgeId );
+    if ( !isPositive )
+    {
+      Standard_Integer aTmp;
+      aTmp       = aFirstNode;
+      aFirstNode = aPivotNode;
+      aPivotNode = aTmp;
+      
+      aPolygon.Append( -anEdgeId );
     }
-    loopEdges.UnBind(iseg);
-    fin=deb;
-    BRepMesh_ListOfInteger::Iterator itLiV;
-    Standard_Integer vcur;
-    while (pivo!=fin) {
-      itLiV.Init(MeshData->LinkNeighboursOf(pivo));
-      for (; itLiV.More(); itLiV.Next()) {
-        if (itLiV.Value()!=iseg && loopEdges.IsBound(itLiV.Value())) {
-          iseg=itLiV.Value();
-          const BRepMesh_Edge& edg1=GetEdge(iseg);
-          vcur=edg1.LastNode();
-          if (vcur!=pivo) {
-            vcur=edg1.FirstNode();
-            polyg.Append(-iseg);
+    else
+      aPolygon.Append( anEdgeId );
+
+    aLoopEdges.UnBind( anEdgeId );
+    
+    aLastNode = aFirstNode;
+    while ( aPivotNode != aLastNode )
+    {
+      BRepMesh_ListOfInteger::Iterator aLinkIt( myMeshData->LinkNeighboursOf( aPivotNode ) );
+      for ( ; aLinkIt.More(); aLinkIt.Next() )
+      {
+        if ( aLinkIt.Value() != anEdgeId &&
+             aLoopEdges.IsBound( aLinkIt.Value() ) )
+        {
+          Standard_Integer aCurrentNode;
+          anEdgeId = aLinkIt.Value();
+          const BRepMesh_Edge& anEdge1 = GetEdge( anEdgeId );
+          
+          aCurrentNode = anEdge1.LastNode();
+          if ( aCurrentNode != aPivotNode )
+          {
+            aCurrentNode = anEdge1.FirstNode();
+            aPolygon.Append( -anEdgeId );
           }
           else
-            polyg.Append(iseg);
-          pivo=vcur;
-          loopEdges.UnBind(iseg);
+            aPolygon.Append( anEdgeId );
+            
+          aPivotNode = aCurrentNode;
+          aLoopEdges.UnBind( anEdgeId );
           break;
         }
       }
-      if (nbLi<=0) break;
-      nbLi--;
+      
+      if ( aLoopEdgesCount <= 0 )
+        break;
+      --aLoopEdgesCount;
     }
-    MeshPolygon(polyg);
+    
+    MeshPolygon( aPolygon );
   }
 }
 
 
 //=======================================================================
 //function : AddVertices
-//purpose  : 
+//purpose  : Adds some vertices in the triangulation.
 //=======================================================================
-void  BRepMesh_Delaun::AddVertices(BRepMesh_Array1OfVertexOfDelaun& vertices)
+void  BRepMesh_Delaun::AddVertices( BRepMesh_Array1OfVertexOfDelaun& theVertices )
 {
-  BRepMesh_HeapSortVertexOfDelaun::Sort
-    (vertices, 
-    BRepMesh_ComparatorOfVertexOfDelaun(SortingDirection, Precision::PConfusion()));
+  BRepMesh_HeapSortVertexOfDelaun::Sort( theVertices, 
+    BRepMesh_ComparatorOfVertexOfDelaun( SortingDirection, Precision::PConfusion() ) );
 
-  Standard_Integer niver;
+  Standard_Integer aLower  = theVertices.Lower();
+  Standard_Integer anUpper = theVertices.Upper();
     
-  TColStd_Array1OfInteger vertexIndices(vertices.Lower(), vertices.Upper());
-
-  for (niver=vertices.Lower(); niver<=vertices.Upper(); niver++)     
-    vertexIndices(niver)=MeshData->AddNode(vertices(niver));
+  TColStd_Array1OfInteger aVertexIndexes( aLower, anUpper );
+  for ( Standard_Integer i = aLower; i <= anUpper; ++i )     
+    aVertexIndexes(i) = myMeshData->AddNode( theVertices(i) );
 
-  CreateTrianglesOnNewVertices(vertexIndices);
+  CreateTrianglesOnNewVertices( aVertexIndexes );
 }
 
 //=======================================================================
 //function : UseEdge
-//purpose  : 
+//purpose  : Modify mesh to use the edge. Return True if done
 //=======================================================================
-Standard_Boolean BRepMesh_Delaun::UseEdge(const Standard_Integer ind)
+Standard_Boolean BRepMesh_Delaun::UseEdge( const Standard_Integer theIndex )
 {
-  const BRepMesh_PairOfIndex& elConx=MeshData->ElemConnectedTo(ind);
-  if (elConx.Extent()==0) {
-    const BRepMesh_Edge& lEdge = GetEdge(ind);
-    Standard_Integer vdeb, pivo, othV, leftEdge, rightEdge;
-    vdeb=lEdge.FirstNode();
-    pivo=lEdge.LastNode();
-    const BRepMesh_ListOfInteger& neigVDeb = MeshData->LinkNeighboursOf(vdeb);
-    const BRepMesh_ListOfInteger& neigPivo = MeshData->LinkNeighboursOf(pivo);
-    if (neigVDeb.Extent()>0 && neigPivo.Extent()>0) {
-      const BRepMesh_Vertex& vertDeb=GetVertex(vdeb);
-      const BRepMesh_Vertex& vertPivo=GetVertex(pivo);
-
-      gp_XY vedcur;
-      gp_XY vedge(vertPivo.Coord());
-      vedge.Subtract(vertDeb.Coord());
-
-      BRepMesh_ListOfInteger::Iterator itNeig(neigPivo);
-
-      Standard_Real ang =0.;
-
-      Standard_Real angMin=RealLast();
-      Standard_Real angMax=RealFirst();
-      Standard_Boolean InMesh;
-      leftEdge=rightEdge=0;
-
-      for (; itNeig.More(); itNeig.Next()) {
-        if (itNeig.Value()!=ind) {
-          const BRepMesh_Edge& nedg=GetEdge(itNeig.Value());
-
-          InMesh=Standard_True;
-          if (nedg.Movability()==BRepMesh_Free) {
-            if (MeshData->ElemConnectedTo(itNeig.Value()).IsEmpty()) 
-              InMesh=Standard_False;
+  /*
+  const BRepMesh_PairOfIndex& aPair = myMeshData->ElemConnectedTo( theIndex );
+  if ( aPair.Extent() == 0 )
+  {
+    const BRepMesh_Edge& anEdge = GetEdge( theIndex );
+    
+    Standard_Integer aStartNode, aPivotNode, anOtherNode;
+    aStartNode = anEdge.FirstNode();
+    aPivotNode = anEdge.LastNode();
+    
+    const BRepMesh_ListOfInteger& aStartNodeNeighbors = myMeshData->LinkNeighboursOf( aStartNode );
+    const BRepMesh_ListOfInteger& aPivotNodeNeighbors = myMeshData->LinkNeighboursOf( aPivotNode );
+    
+    if ( aStartNodeNeighbors.Extent() > 0 &&
+         aPivotNodeNeighbors.Extent() > 0 )
+    {
+      const BRepMesh_Vertex& aStartVertex = GetVertex( aStartNode );
+      const BRepMesh_Vertex& aPivotVertex = GetVertex( aPivotNode );
+
+      gp_XY aVEdge   ( aPivotVertex.Coord() );
+      aVEdge.Subtract( aStartVertex.Coord() );
+
+      Standard_Real    anAngle    = 0.;
+      Standard_Real    anAngleMin = RealLast();
+      Standard_Real    anAngleMax = RealFirst();
+      Standard_Integer aLeftEdge  = 0, aRightEdge = 0;
+
+      BRepMesh_ListOfInteger::Iterator aNeighborIt( aPivotNodeNeighbors );
+      for ( ; aNeighborIt.More(); aNeighborIt.Next() )
+      {
+        Standard_Integer anEdgeId = aNeighborIt.Value();
+        if ( anEdgeId != theIndex )
+        {
+          const BRepMesh_Edge& aNextEdge = GetEdge( anEdgeId );
+
+          Standard_Boolean isInMesh = Standard_True;
+          if ( aNextEdge.Movability() == BRepMesh_Free )
+          {
+            if ( myMeshData->ElemConnectedTo( anEdgeId ).IsEmpty() ) 
+              isInMesh = Standard_False;
           }
 
-          if (InMesh) {
-            othV=nedg.FirstNode();
-            if (othV==pivo) othV=nedg.LastNode();
+          if ( isInMesh )
+          {
+            anOtherNode = aNextEdge.FirstNode();
+            if ( anOtherNode == aPivotNode )
+              anOtherNode = aNextEdge.LastNode();
 
-            vedcur=GetVertex(othV).Coord();
-            vedcur.Subtract(vertPivo.Coord());
+            gp_XY aVEdgeCur = GetVertex( anOtherNode ).Coord();
+            aVEdgeCur.Subtract( aPivotVertex.Coord() );
 
-            ang=gp_Vec2d(vedge).Angle(gp_Vec2d(vedcur));
+            anAngle = gp_Vec2d( aVEdge ).Angle( gp_Vec2d( aVEdgeCur ) );
           }
-          if (ang>angMax) {
-            angMax=ang;
-            leftEdge=itNeig.Value();
+          
+          if ( anAngle > anAngleMax )
+          {
+            anAngleMax = anAngle;
+            aLeftEdge  = anEdgeId;
           }
-          if (ang<angMin) {
-            angMin=ang;
-            rightEdge=itNeig.Value();
+          if ( anAngle < anAngleMin )
+          {
+            anAngleMin = anAngle;
+            aRightEdge = anEdgeId;
           }
         }
       }
-      if (leftEdge>0) {
-        if (leftEdge==rightEdge) {
+      
+      if ( aLeftEdge > 0 )
+      {
+        if (aLeftEdge==aRightEdge)
+        {
         }
-        else {
+        else
+        {
         }
       }
     }
   }
+  */
   return Standard_False;
 }
 
 //=======================================================================
 //function : Result
-//purpose  : 
+//purpose  : Gives the Mesh data structure
 //=======================================================================
-const Handle(BRepMesh_DataStructureOfDelaun)& BRepMesh_Delaun::Result()const
+const Handle( BRepMesh_DataStructureOfDelaun )& BRepMesh_Delaun::Result() const
 {
-  return MeshData;
+  return myMeshData;
 }
 
 //=======================================================================
 //function : Frontier
-//purpose  : 
+//purpose  : Gives the list of frontier edges
 //=======================================================================
-const BRepMesh_MapOfInteger& BRepMesh_Delaun::Frontier ()
+const BRepMesh_MapOfInteger& BRepMesh_Delaun::Frontier()
 {
-  BRepMesh_MapOfInteger::Iterator triDom(MeshData->LinkOfDomain());
+  BRepMesh_MapOfInteger::Iterator anEdgeIt( myMeshData->LinkOfDomain() );
 
-  mapEdges.Clear();
-  for (; triDom.More(); triDom.Next()) {
-    if (GetEdge(triDom.Key()).Movability()==BRepMesh_Frontier) {
-      mapEdges.Add(triDom.Key());
-    }
+  myMapEdges.Clear();
+  for ( ; anEdgeIt.More(); anEdgeIt.Next() )
+  {
+    Standard_Integer anEdge = anEdgeIt.Key();
+    if ( GetEdge( anEdge ).Movability() == BRepMesh_Frontier )
+      myMapEdges.Add( anEdge );
   }
-  return mapEdges;
+  
+  return myMapEdges;
 }
 
 //=======================================================================
 //function : InternalEdges
-//purpose  : 
+//purpose  : Gives the list of internal edges
 //=======================================================================
-const BRepMesh_MapOfInteger& BRepMesh_Delaun::InternalEdges ()
+const BRepMesh_MapOfInteger& BRepMesh_Delaun::InternalEdges()
 {
-  BRepMesh_MapOfInteger::Iterator triDom(MeshData->LinkOfDomain());
+  BRepMesh_MapOfInteger::Iterator anEdgeIt( myMeshData->LinkOfDomain() );
 
-  mapEdges.Clear();
-  for (; triDom.More(); triDom.Next()) {
-    if (GetEdge(triDom.Key()).Movability()==BRepMesh_Fixed) {
-      mapEdges.Add(triDom.Key());
-    }
+  myMapEdges.Clear();
+  for ( ; anEdgeIt.More(); anEdgeIt.Next() )
+  {
+    Standard_Integer anEdge = anEdgeIt.Key();
+    if ( GetEdge( anEdge ).Movability() == BRepMesh_Fixed )
+      myMapEdges.Add( anEdge );
   }
-  return mapEdges;
+  
+  return myMapEdges;
 }
 
 //=======================================================================
 //function : FreeEdges
-//purpose  : 
+//purpose  : Gives the list of free edges used only one time
 //=======================================================================
-const BRepMesh_MapOfInteger& BRepMesh_Delaun::FreeEdges ()
+const BRepMesh_MapOfInteger& BRepMesh_Delaun::FreeEdges()
 {
-  BRepMesh_MapOfInteger::Iterator triDom(MeshData->LinkOfDomain());
+  BRepMesh_MapOfInteger::Iterator anEdgeIt( myMeshData->LinkOfDomain() );
 
-  mapEdges.Clear();
-  for (; triDom.More(); triDom.Next()) {
-    if (MeshData->ElemConnectedTo(triDom.Key()).Extent()<=1) {
-      mapEdges.Add(triDom.Key());
-    }
+  myMapEdges.Clear();
+  for ( ; anEdgeIt.More(); anEdgeIt.Next() )
+  {
+    Standard_Integer anEdge = anEdgeIt.Key();
+    if ( myMeshData->ElemConnectedTo( anEdge ).Extent() <= 1 )
+      myMapEdges.Add( anEdge );
   }
-  return mapEdges;
+  
+  return myMapEdges;
 }
 
-
 //=======================================================================
-//function : Contains
-//purpose  : 
+//function : calculateDist
+//purpose  : Calculates distances between the given point and edges of
+//           triangle
 //=======================================================================
-
-static Standard_Real calculateDist(const TColgp_Array1OfXY& E,
-                                   const TColgp_Array1OfXY& P,
-                                   const TColStd_Array1OfInteger& e,
-                                   const BRepMesh_Vertex& vert,
-                                   TColStd_Array1OfReal& v,
-                                   TColStd_Array1OfReal& mode,
-                                   Standard_Integer& edgOn)
+static Standard_Real calculateDist( const gp_XY theVEdges[3],
+                                    const gp_XY thePoints[3],
+                                    const Standard_Integer theEdgesId[3],
+                                    const BRepMesh_Vertex& theVertex,
+                                    Standard_Real theDistance[3],
+                                    Standard_Real theSqModulus[3],
+                                    Standard_Integer& theEdgeOn )
 {
-  Standard_Real distMin = -1;
-  Standard_Integer i = 1;
-  for(; i <= 3; i++ )
+  Standard_Real aMinDist = -1;
+  if ( !theVEdges || !thePoints || !theEdgesId || 
+       !theDistance || !theSqModulus )
+    return aMinDist;
+    
+  for( Standard_Integer i = 0; i < 3; ++i )
   {
-    mode(i) = E(i).SquareModulus();
-    if (mode(i) <= EPSEPS) return -1;
-    v(i) = E(i)^(vert.Coord()-P(i));
-    Standard_Real dist = (v(i)*v(i))/mode(i);
+    theSqModulus[i] = theVEdges[i].SquareModulus();
+    if ( theSqModulus[i] <= EPSEPS )
+      return -1;
+      
+    theDistance[i] = theVEdges[i] ^ ( theVertex.Coord() - thePoints[i] );
+    
+    Standard_Real aDist = theDistance[i] * theDistance[i];
+    aDist /= theSqModulus[i];
     
-    if ( distMin < 0 || dist < distMin )
+    if ( aMinDist < 0 || aDist < aMinDist )
     {
-      edgOn   = e(i);
-      distMin = dist;
+      theEdgeOn = theEdgesId[i];
+      aMinDist  = aDist;
     }
   }
-  return distMin;
+  
+  return aMinDist;
 }
 
-Standard_Boolean BRepMesh_Delaun::Contains(const Standard_Integer tri,
-                                           const BRepMesh_Vertex& vert,
-                                           Standard_Integer& edgOn)const
+//=======================================================================
+//function : Contains
+//purpose  : Test if triangle of index <TrianIndex> contains geometricaly
+//           <theVertex>. If <theEdgeOn> is != 0 then theVertex is on Edge 
+//           of  index <theEdgeOn>
+//=======================================================================
+Standard_Boolean BRepMesh_Delaun::Contains( const Standard_Integer theTriangleId,
+                                            const BRepMesh_Vertex& theVertex,
+                                            Standard_Integer& theEdgeOn ) const
 {
-  edgOn = 0;
-  TColStd_Array1OfInteger e(1,3);
-  TColStd_Array1OfInteger p(1,3);
-  TColStd_Array1OfBoolean o(1,3);
-  GetTriangle(tri).Edges(e(1), e(2), e(3), o(1), o(2), o(3));
-  const BRepMesh_Edge* edg[3] = { &GetEdge(e(1)),
-                                  &GetEdge(e(2)),
-                                  &GetEdge(e(3)) };
-  if (o(1)) {
-    p(1) = edg[0]->FirstNode();
-    p(2) = edg[0]->LastNode();
+  theEdgeOn = 0;
+  
+  Standard_Integer e[3];
+  Standard_Boolean o[3];
+  Standard_Integer p[3];
+
+  GetTriangle( theTriangleId ).Edges( e[0], e[1], e[2],
+                                      o[0], o[1], o[2] );
+                                      
+  const BRepMesh_Edge* anEdges[3] = { &GetEdge( e[0] ),
+                                      &GetEdge( e[1] ),
+                                      &GetEdge( e[2] ) };
+  if ( o[0] )
+  {
+    p[0] = anEdges[0]->FirstNode();
+    p[1] = anEdges[0]->LastNode();
   }
-  else {
-    p(2) = edg[0]->FirstNode();
-    p(1) = edg[0]->LastNode();
+  else
+  {
+    p[1] = anEdges[0]->FirstNode();
+    p[0] = anEdges[0]->LastNode();
   }
-  if (o(3)) p(3) = edg[2]->FirstNode();
-  else      p(3) = edg[2]->LastNode();
-
-  TColgp_Array1OfXY P(1,3);
-  P(1) = GetVertex(p(1)).Coord();
-  P(2) = GetVertex(p(2)).Coord();
-  P(3) = GetVertex(p(3)).Coord();
   
-  TColgp_Array1OfXY E(1,3);
-  E(1) = P(2); E(1).Subtract(P(1));
-  E(2) = P(3); E(2).Subtract(P(2));
-  E(3) = P(1); E(3).Subtract(P(3));
-
-  Standard_Real distMin;
-  TColStd_Array1OfReal v   (1,3);
-  TColStd_Array1OfReal mode(1,3);
+  if ( o[2] )
+    p[2] = anEdges[2]->FirstNode();
+  else
+    p[2] = anEdges[2]->LastNode();
+
+  gp_XY aPoints[3];
+  aPoints[0] = GetVertex( p[0] ).Coord();
+  aPoints[1] = GetVertex( p[1] ).Coord();
+  aPoints[2] = GetVertex( p[2] ).Coord();
+  
+  gp_XY aVEdges[3];
+  aVEdges[0] = aPoints[1]; 
+  aVEdges[0].Subtract( aPoints[0] );
+  
+  aVEdges[1] = aPoints[2]; 
+  aVEdges[1].Subtract( aPoints[1] );
   
-  distMin = calculateDist(E, P, e, vert, v, mode, edgOn);
-  if ( distMin < 0 )
+  aVEdges[2] = aPoints[0];
+  aVEdges[2].Subtract( aPoints[2] );
+
+  Standard_Real aDistance[3];
+  Standard_Real aSqModulus[3];
+
+  Standard_Real aMinDist;  
+  aMinDist = calculateDist( aVEdges, aPoints, e, theVertex, aDistance, aSqModulus, theEdgeOn );
+  if ( aMinDist < 0 )
     return Standard_False;
       
-  if ( distMin > EPSEPS ) {
-    Standard_Integer edf = edgOn;
-    edgOn = 0;
-    if ( edf != 0 ) 
+  if ( aMinDist > EPSEPS )
+  {
+    Standard_Integer anEdgeId = theEdgeOn;
+    theEdgeOn = 0;
+    
+    if ( anEdgeId != 0 ) 
     {
-      Standard_Integer i = 1;
-      for(; i <= 3; i++ )
+      Standard_Integer i = 0;
+      for ( ; i < 3; ++i )
       {
-        if( edf == e(i) )
+        if( e[i] == anEdgeId )
           break;
       }
       
-      if( edg[i-1]->Movability() != BRepMesh_Free )
-        if ( v(i) < (mode(i)/5.) ) edgOn = e(i);
+      if( anEdges[i]->Movability() != BRepMesh_Free )
+        if ( aDistance[i] < ( aSqModulus[i] / 5. ) )
+          theEdgeOn = e[i];
     }
   }
 
-  return (v(1)+v(2)+v(3) != 0. && ((v(1) >= 0. && v(2) >= 0. && v(3) >= 0.) ||
-                                   (v(1) <= 0. && v(2) <= 0. && v(3) <= 0.)));
+  return ( aDistance[0] + aDistance[1] + aDistance[2] != 0. &&
+            ( ( aDistance[0] >= 0. && aDistance[1] >= 0. && aDistance[2] >= 0. ) ||
+              ( aDistance[0] <= 0. && aDistance[1] <= 0. && aDistance[2] <= 0. ) ) );
 }
 
+
+//=============================================================================
+// Function: classifyPoint
+// This function is used for point classifying in case of coincidence of two 
+// vectors.
+// Returns zero value if point is out of segment and non zero value if point is
+// between the first and the second point of segment.
+//
+// thePoint1       - the start point of a segment (base point)
+// thePoint2       - the end point of a segment
+// thePointToCheck - the point to classify
+//=============================================================================
+static Standard_Integer classifyPoint( const gp_XY& thePoint1,
+                                       const gp_XY& thePoint2,
+                                       const gp_XY& thePointToCheck )
+{
+  gp_XY aP1 = thePoint2       - thePoint1;
+  gp_XY aP2 = thePointToCheck - thePoint1;
+  
+  Standard_Real aDist = Abs( aP1 ^ aP2 );
+  if ( aDist >= Precision::PConfusion() )
+  {
+    aDist = ( aDist * aDist ) / aP1.SquareModulus();
+    if ( aDist >= EPSEPS )
+      return 0; //out
+  }
+    
+  gp_XY aMult = aP1.Multiplied( aP2 );
+  if ( aMult.X() < 0.0 || aMult.Y() < 0.0 )
+    return 0; //out
+    
+  if ( aP1.SquareModulus() < aP2.SquareModulus() )
+    return 0; //out
+    
+  if ( thePointToCheck.IsEqual( thePoint1, Precision::PConfusion() ) || 
+       thePointToCheck.IsEqual( thePoint2, Precision::PConfusion() ) )
+    return -1; //end point
+    
+  return 1;
+}
+
+//=============================================================================
+// Function: IntSegSeg
+//=============================================================================
+Standard_Boolean BRepMesh_Delaun::IntSegSeg( const BRepMesh_Edge& theEdg1,
+                                             const BRepMesh_Edge& theEdg2 )
+{
+  gp_XY p1, p2, p3, p4;
+  p1 = GetVertex( theEdg1.FirstNode() ).Coord();
+  p2 = GetVertex( theEdg1.LastNode()  ).Coord();
+  p3 = GetVertex( theEdg2.FirstNode() ).Coord();
+  p4 = GetVertex( theEdg2.LastNode()  ).Coord();
+  
+  Standard_Integer aPoint1 = classifyPoint( p1, p2, p3 );
+  Standard_Integer aPoint2 = classifyPoint( p1, p2, p4 );
+  Standard_Integer aPoint3 = classifyPoint( p3, p4, p1 );
+  Standard_Integer aPoint4 = classifyPoint( p3, p4, p2 );
+  
+  if ( aPoint1 > 0 || aPoint2 > 0 ||
+       aPoint3 > 0 || aPoint4 > 0 )
+    return Standard_True;
+                    
+  gp_XY aPl1 = p2 - p1;
+  gp_XY aPl2 = p4 - p3;
+  gp_XY aPl3 = p1 - p3;
+    
+  Standard_Real aCrossD1D2 = aPl1 ^ aPl2;
+  Standard_Real aCrossD1D3 = aPl1 ^ aPl3;
+  if ( Abs( aCrossD1D2 ) < Precision::PConfusion() )
+  {
+    if( Abs( aCrossD1D3 ) < Precision::PConfusion() )
+    {
+      Standard_Integer aPosHash = aPoint1 + aPoint2;
+      if ( ( !aPosHash && aPoint3 ) ) //|| aPosHash < -1 )
+        return Standard_True;
+        
+      return Standard_False;
+    }
+    else
+      //parallel case
+      return Standard_False;
+  }
+
+  Standard_Real aPar = aCrossD1D3 / aCrossD1D2;
+  // inrersects out of first segment range
+  if( aPar < Precision::Angular() || aPar > 1 - Precision::Angular() )
+    return Standard_False;
+ 
+  Standard_Real aCrossD2D3 = aPl2 ^ aPl3;
+  aPar = aCrossD2D3 / aCrossD1D2;
+  // inrersects out of second segment range
+  if( aPar < Precision::Angular() || aPar > 1 - Precision::Angular() )
+    return Standard_False;
+ 
+  return Standard_True;
+}
diff --git a/src/BRepMesh/BRepMesh_Edge.cdl b/src/BRepMesh/BRepMesh_Edge.cdl
index 83b1d7a..4d6c88d 100644
--- a/src/BRepMesh/BRepMesh_Edge.cdl
+++ b/src/BRepMesh/BRepMesh_Edge.cdl
@@ -30,7 +30,11 @@ uses    Boolean from Standard,
         DegreeOfFreedom from BRepMesh
 
 
-is          Create         (vDebut    : Integer from Standard;
+is            Create
+              returns Edge from BRepMesh;
+    	          ---C++: inline
+    	          
+              Create       (vDebut    : Integer from Standard;
                             vFin      : Integer from Standard;
                             canMove   : DegreeOfFreedom from BRepMesh)
               ---Purpose: Contructs a link beetween to vertices.
diff --git a/src/BRepMesh/BRepMesh_FastDiscret.cdl b/src/BRepMesh/BRepMesh_FastDiscret.cdl
index 183a881..7affa55 100644
--- a/src/BRepMesh/BRepMesh_FastDiscret.cdl
+++ b/src/BRepMesh/BRepMesh_FastDiscret.cdl
@@ -67,8 +67,9 @@ uses    Boolean                   from Standard,
         MapOfInteger              from BRepMesh,
         BaseAllocator             from BRepMesh,
         DataMapOfFaceAttribute    from BRepMesh,
-        IndexedDataMapOfShapeListOfShape from TopTools
-
+        IndexedDataMapOfShapeListOfShape from TopTools,
+        MutexForShapeProvider     from TopTools,
+        ShapeEnum                 from TopAbs
 
 is
 
@@ -193,6 +194,17 @@ is
             returns Boolean from Standard;
         ---Purpose:
         -- Returns the multi-threading usage flag.
+        
+        CreateMutexesForSubShapes(me               : mutable;
+                                  theShape : Shape      from TopoDS;
+                                  theType  : ShapeEnum  from TopAbs);
+         ---Purpose:
+         -- Creates mutexes for each sub-shape of type theType in theShape.
+         -- Used to avoid data races.
+                            
+        RemoveAllMutexes(me: mutable);
+        ---Purpose:
+        -- Removes all created mutexes
 
 -- Output :
 
@@ -338,5 +350,6 @@ fields
       myMapdefle     : DataMapOfShapeReal            from TopTools;
       myNottriangulated : ListOfShape                from TopTools;
       myAllocator    : BaseAllocator                 from BRepMesh;
+      myMutexProvider: MutexForShapeProvider         from TopTools;
 
 end FastDiscret;
diff --git a/src/BRepMesh/BRepMesh_FastDiscret.cxx b/src/BRepMesh/BRepMesh_FastDiscret.cxx
index 0bc8ea7..283bd03 100644
--- a/src/BRepMesh/BRepMesh_FastDiscret.cxx
+++ b/src/BRepMesh/BRepMesh_FastDiscret.cxx
@@ -258,6 +258,7 @@ void BRepMesh_FastDiscret::Perform(const TopoDS_Shape& theShape)
   if (myInParallel)
   {
   #ifdef HAVE_TBB
+    CreateMutexesForSubShapes(theShape, TopAbs_EDGE);
     // mesh faces in parallel threads using TBB
     tbb::parallel_for_each (aFaces.begin(), aFaces.end(), *this);
   #else
@@ -267,6 +268,7 @@ void BRepMesh_FastDiscret::Perform(const TopoDS_Shape& theShape)
     for (i = 0; i < n; ++i)
       Process (aFaces[i]);
   #endif
+    RemoveAllMutexes();
   }
   else
   {
@@ -288,7 +290,7 @@ void BRepMesh_FastDiscret::Process(const TopoDS_Face& theFace) const
   if ( GetFaceAttribute (theFace, fattribute) ) 
   {
     BRepMesh_FastDiscretFace aTool (GetAngle(), WithShare());
-    aTool.Add (theFace, fattribute, GetMapOfDefEdge());
+    aTool.Add (theFace, fattribute, GetMapOfDefEdge(), myMutexProvider);
   }
   //cout << "END   face " << theFace.TShape().operator->() << endl << flush;
 }
@@ -1689,3 +1691,22 @@ void BRepMesh_FastDiscret::RemoveFaceAttribute(const TopoDS_Face& theFace)
   if(myMapattrib.IsBound(theFace))
     myMapattrib.UnBind(theFace);
 }
+
+//=======================================================================
+//function : CreateMutexesForSubShapes
+//purpose  : 
+//=======================================================================
+void BRepMesh_FastDiscret::CreateMutexesForSubShapes(const TopoDS_Shape& theShape,
+                                                     const TopAbs_ShapeEnum theType)
+{
+  myMutexProvider.CreateMutexesForSubShapes(theShape, theType);
+}
+
+//=======================================================================
+//function : RemoveAllMutexes
+//purpose  : 
+//=======================================================================
+void BRepMesh_FastDiscret::RemoveAllMutexes()
+{
+  myMutexProvider.RemoveAllMutexes();
+}
\ No newline at end of file
diff --git a/src/BRepMesh/BRepMesh_FastDiscretFace.cdl b/src/BRepMesh/BRepMesh_FastDiscretFace.cdl
index 3930b32..b35e17f 100644
--- a/src/BRepMesh/BRepMesh_FastDiscretFace.cdl
+++ b/src/BRepMesh/BRepMesh_FastDiscretFace.cdl
@@ -39,6 +39,7 @@ uses    Boolean                   from Standard,
         DataMapOfVertexInteger    from BRepMesh,
         DataMapOfIntegerListOfXY  from BRepMesh,
         DataMapOfShapeReal        from TopTools,
+        MutexForShapeProvider     from TopTools,
         ListOfVertex              from BRepMesh,
         ClassifierPtr             from BRepMesh,
         Triangle                  from BRepMesh,
@@ -54,7 +55,6 @@ uses    Boolean                   from Standard,
         Triangulation             from Poly,
         Location                  from TopLoc
 
-
 is 
 
         Create (theAngle      : Real    from Standard;
@@ -67,7 +67,8 @@ is
         Add  (me       : mutable;
               theFace     : Face from TopoDS;
               theAttrib   : FaceAttribute from BRepMesh;
-              theMapDefle : DataMapOfShapeReal from TopTools)
+              theMapDefle : DataMapOfShapeReal from TopTools;
+              theMutexProvider : MutexForShapeProvider from TopTools)
           is static;
 
       
@@ -83,7 +84,8 @@ is
                 theSurf    : HSurface      from BRepAdaptor;
                 theTrigu   : Triangulation from Poly;
                 theDefEdge : Real          from Standard;
-                theLoc     : Location      from TopLoc)
+                theLoc     : Location      from TopLoc;
+                theMutexProvider: MutexForShapeProvider from TopTools)
           returns Boolean from Standard is protected;
         
  
@@ -116,7 +118,8 @@ is
 
         AddInShape (me: mutable;
                     theFace   : Face     from TopoDS;
-                    theDefFace: Real     from Standard)
+                    theDefFace: Real     from Standard;
+                    theMutexProvider: MutexForShapeProvider from TopTools)
           is static private;
 
 
diff --git a/src/BRepMesh/BRepMesh_FastDiscretFace.cxx b/src/BRepMesh/BRepMesh_FastDiscretFace.cxx
index a0bc03d..6d0c079 100644
--- a/src/BRepMesh/BRepMesh_FastDiscretFace.cxx
+++ b/src/BRepMesh/BRepMesh_FastDiscretFace.cxx
@@ -57,6 +57,8 @@
 
 #define UVDEFLECTION 1.e-05
 
+static Standard_Mutex DummyMutex;
+
 static Standard_Real FUN_CalcAverageDUV(TColStd_Array1OfReal& P, const Standard_Integer PLen)
 {
   Standard_Integer i, j, n = 0;
@@ -108,7 +110,8 @@ BRepMesh_FastDiscretFace::BRepMesh_FastDiscretFace
 
 void BRepMesh_FastDiscretFace::Add(const TopoDS_Face&                    theFace,
                                    const Handle(BRepMesh_FaceAttribute)& theAttrib,
-                                   const TopTools_DataMapOfShapeReal&    theMapDefle)
+                                   const TopTools_DataMapOfShapeReal&    theMapDefle,
+                                   const TopTools_MutexForShapeProvider& theMutexProvider)
 {
 #ifndef DEB_MESH
   try
@@ -172,8 +175,7 @@ void BRepMesh_FastDiscretFace::Add(const TopoDS_Face&                    theFace
         const TopoDS_Edge& edge = TopoDS::Edge(ex.Value());
         if(edge.IsNull())
           continue;
-
-        RestoreStructureFromTriangulation(edge, face, gFace, aFaceTrigu, theMapDefle(edge), loc);
+        RestoreStructureFromTriangulation(edge, face, gFace, aFaceTrigu, theMapDefle(edge), loc, theMutexProvider);
       }
     }
     
@@ -324,7 +326,7 @@ void BRepMesh_FastDiscretFace::Add(const TopoDS_Face&                    theFace
     }
     myStructure->ReplaceNodes(aMoveNodes);
   
-    AddInShape(face, (aDef < 0.0)? theAttrib->GetDefFace() : aDef);
+    AddInShape(face, (aDef < 0.0)? theAttrib->GetDefFace() : aDef, theMutexProvider);
 #ifndef DEB_MESH
   }
   catch(Standard_Failure)
@@ -348,22 +350,28 @@ Standard_Boolean BRepMesh_FastDiscretFace::RestoreStructureFromTriangulation
                                 const Handle(BRepAdaptor_HSurface)& theSurf,
                                 const Handle(Poly_Triangulation)&   theTrigu,
                                 const Standard_Real                 theDefEdge,
-                                const TopLoc_Location&              theLoc)
+                                const TopLoc_Location&              theLoc,
+                                const TopTools_MutexForShapeProvider& theMutexProvider)
 {
+  // 2d vertex indices
+  TopAbs_Orientation orEdge = theEdge.Orientation();
+  // Get end points on 2d curve
+  gp_Pnt2d uvFirst, uvLast;
   // oan: changes for right restoring of triangulation data from face & edges
   Handle(Poly_PolygonOnTriangulation) Poly;
-  Poly = BRep_Tool::PolygonOnTriangulation(theEdge, theTrigu, theLoc);
 
-  if (Poly.IsNull() || !Poly->HasParameters())
   {
-    return Standard_False;
+    // lock mutex during querying data from edge curves to prevent parallel change of the same data
+    Standard_Mutex* aMutex = theMutexProvider.GetMutex(theEdge);
+    Standard_Mutex::SentryNested aSentry(aMutex == NULL ? DummyMutex : *aMutex,
+                                  aMutex != NULL);
+
+    Poly = BRep_Tool::PolygonOnTriangulation(theEdge, theTrigu, theLoc);
+    if (Poly.IsNull() || !Poly->HasParameters())
+      return Standard_False;
+
+    BRep_Tool::UVPoints(theEdge, theFace, uvFirst, uvLast);
   }
-  
-  // 2d vertex indices
-  TopAbs_Orientation orEdge = theEdge.Orientation();
-  // Get end points on 2d curve
-  gp_Pnt2d uvFirst, uvLast;
-  BRep_Tool::UVPoints(theEdge, theFace, uvFirst, uvLast);
 
   // Get vertices
   TopoDS_Vertex pBegin, pEnd;
@@ -939,7 +947,7 @@ void BRepMesh_FastDiscretFace::InternalVertices(const Handle(BRepAdaptor_HSurfac
     Standard_Real u, v, dist;
 
     // precision for compare square distances
-    double dPreci = Precision::Confusion()*Precision::Confusion();
+    double dPreci = Precision::SquareConfusion();
 
     // Insert V parameters by deflection criterion
     Standard_Integer i,j;
@@ -1529,7 +1537,8 @@ Standard_Real BRepMesh_FastDiscretFace::Control(const Handle(BRepAdaptor_HSurfac
 //purpose  : 
 //=======================================================================
 void BRepMesh_FastDiscretFace::AddInShape(const TopoDS_Face&  theFace,
-                                          const Standard_Real theDefFace)
+                                          const Standard_Real theDefFace,
+                                          const TopTools_MutexForShapeProvider& theMutexProvider)
 {
 //  gp_Pnt Pt;
   BRep_Builder B;
@@ -1626,6 +1635,12 @@ void BRepMesh_FastDiscretFace::AddInShape(const TopoDS_Face&  theFace,
       const BRepMesh_PairOfPolygon& pair = It.Value();
       const Handle(Poly_PolygonOnTriangulation)& NOD1 = pair.First();
       const Handle(Poly_PolygonOnTriangulation)& NOD2 = pair.Last();
+
+      // lock mutex to prevent parallel change of the same data
+      Standard_Mutex* aMutex = theMutexProvider.GetMutex(It.Key());
+      Standard_Mutex::SentryNested aSentry(aMutex == NULL ? DummyMutex : *aMutex,
+                                    aMutex != NULL);
+
       if ( NOD1 == NOD2 ) {
         B.UpdateEdge(TopoDS::Edge(It.Key()), NullPoly, TOld,loc);
         B.UpdateEdge(TopoDS::Edge(It.Key()), NOD1, T, loc);
diff --git a/src/BRepMesh/BRepMesh_IncrementalMesh.cxx b/src/BRepMesh/BRepMesh_IncrementalMesh.cxx
index 4d223ff..eba1291 100644
--- a/src/BRepMesh/BRepMesh_IncrementalMesh.cxx
+++ b/src/BRepMesh/BRepMesh_IncrementalMesh.cxx
@@ -40,6 +40,7 @@
 #include <TopExp_Explorer.hxx>
 #include <TopAbs.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopTools_MutexForShapeProvider.hxx>
 #include <TColgp_Array1OfPnt.hxx>
 #include <TColStd_Array1OfReal.hxx>
 #include <TopoDS_Shape.hxx>
@@ -260,6 +261,7 @@ void BRepMesh_IncrementalMesh::Update(const TopoDS_Shape& S)
   if (myInParallel)
   {
   #ifdef HAVE_TBB
+    myMesh->CreateMutexesForSubShapes(S, TopAbs_EDGE);
     // mesh faces in parallel threads using TBB
     tbb::parallel_for_each (aFaces.begin(), aFaces.end(), *myMesh.operator->());
   #else
@@ -268,6 +270,7 @@ void BRepMesh_IncrementalMesh::Update(const TopoDS_Shape& S)
     for (i = 0; i < n; ++i)
       myMesh->Process (aFaces[i]);
   #endif
+    myMesh->RemoveAllMutexes();
   }
   else
   {
diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx
index 6e1109e..731b31c 100644
--- a/src/BRepOffset/BRepOffset_MakeOffset.cxx
+++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx
@@ -115,6 +115,9 @@
 #include <Adaptor3d_CurveOnSurface.hxx>
 #include <GeomLib.hxx>
 #include <GeomFill_Generator.hxx>
+#include <Geom_Plane.hxx>
+#include <IntTools_FClass2d.hxx>
+#include <BRepLib_FindSurface.hxx>
 
 
 // POP for NT
@@ -2862,9 +2865,55 @@ void BRepOffset_MakeOffset::MakeMissingWalls ()
             gp_Dir CircAxisDir = aCirc.Axis().Direction();
             if (aCirc.Axis().IsParallel(aCircOE.Axis(), Precision::Confusion()) &&
                 anAxisLine.Contains(aCircOE.Location(), Precision::Confusion()))
-            { //cylinder or cone
+            { //cylinder, plane or cone
               if (Abs(aCirc.Radius() - aCircOE.Radius()) <= Precision::Confusion()) //case of cylinder
                 theSurf = GC_MakeCylindricalSurface(aCirc).Value();
+              else if (aCirc.Location().Distance(aCircOE.Location()) <= Precision::Confusion()) {//case of plane
+                IsPlanar = Standard_True;
+                //
+                gp_Pnt PonEL = BAcurve.Value(lpar);
+                if (PonEL.Distance(PonE) <= Precision::PConfusion()) {
+                  Standard_Boolean bIsHole;
+                  TopoDS_Edge aE1, aE2;
+                  TopoDS_Wire aW1, aW2;
+                  Handle(Geom_Plane) aPL;
+                  IntTools_FClass2d aClsf;
+                  //
+                  if (aCirc.Radius()>aCircOE.Radius()) {
+                    aE1 = anEdge;
+                    aE2 = OE;
+                  } else {
+                    aE1 = OE;
+                    aE2 = anEdge;
+                  }
+                  //
+                  BB.MakeWire(aW1);
+                  BB.Add(aW1, aE1);
+                  BB.MakeWire(aW2);
+                  BB.Add(aW2, aE2);
+                  //
+                  aPL = new Geom_Plane(aCirc.Location(), CircAxisDir);
+                  for (Standard_Integer i = 0; i < 2; ++i) {
+                    TopoDS_Wire& aW = (i==0) ? aW1 : aW2;
+                    TopoDS_Edge& aE = (i==0) ? aE1 : aE2;
+                    //
+                    TopoDS_Face aFace;
+                    BB.MakeFace(aFace, aPL, Precision::Confusion());
+                    BB.Add (aFace, aW);
+                    aClsf.Init(aFace, Precision::Confusion());
+                    bIsHole=aClsf.IsHole();
+                    if ((bIsHole && !i) || (!bIsHole && i)) {
+                      aW.Nullify();
+                      BB.MakeWire(aW);
+                      BB.Add(aW, aE.Reversed());
+                    }
+                  }
+                  //
+                  BB.MakeFace(NewFace, aPL, Precision::Confusion());
+                  BB.Add(NewFace, aW1);
+                  BB.Add(NewFace, aW2);
+                }
+              }
               else //case of cone
               {
                 gp_Cone theCone = gce_MakeCone(aCirc.Location(), aCircOE.Location(),
@@ -2878,42 +2927,44 @@ void BRepOffset_MakeOffset::MakeMissingWalls ()
                 theCone.SetPosition(theAx3);
                 theSurf = new Geom_ConicalSurface(theCone);
               }
-              TopLoc_Location Loc;
-              EdgeLine2d = new Geom2d_Line(gp_Pnt2d(0., 0.), gp_Dir2d(1., 0.));
-              BB.UpdateEdge(anEdge, EdgeLine2d, theSurf, Loc, Precision::Confusion());
-              Standard_Real Coeff = (OffsetDir * CircAxisDir > 0.)? 1. : -1.;
-              OELine2d = new Geom2d_Line(gp_Pnt2d(0., OffsetVal*Coeff), gp_Dir2d(1., 0.));
-              BB.UpdateEdge(OE, OELine2d, theSurf, Loc, Precision::Confusion());
-              aLine2d  = new Geom2d_Line(gp_Pnt2d(ParV2, 0.), gp_Dir2d(0., Coeff));
-              aLine2d2 = new Geom2d_Line(gp_Pnt2d(ParV1, 0.), gp_Dir2d(0., Coeff));
-              if (E3.IsSame(E4))
-              {
-                if (Coeff > 0.)
-                  BB.UpdateEdge(E3, aLine2d, aLine2d2, theSurf, Loc, Precision::Confusion());
+              if (!IsPlanar) {
+                TopLoc_Location Loc;
+                EdgeLine2d = new Geom2d_Line(gp_Pnt2d(0., 0.), gp_Dir2d(1., 0.));
+                BB.UpdateEdge(anEdge, EdgeLine2d, theSurf, Loc, Precision::Confusion());
+                Standard_Real Coeff = (OffsetDir * CircAxisDir > 0.)? 1. : -1.;
+                OELine2d = new Geom2d_Line(gp_Pnt2d(0., OffsetVal*Coeff), gp_Dir2d(1., 0.));
+                BB.UpdateEdge(OE, OELine2d, theSurf, Loc, Precision::Confusion());
+                aLine2d  = new Geom2d_Line(gp_Pnt2d(ParV2, 0.), gp_Dir2d(0., Coeff));
+                aLine2d2 = new Geom2d_Line(gp_Pnt2d(ParV1, 0.), gp_Dir2d(0., Coeff));
+                if (E3.IsSame(E4))
+                {
+                  if (Coeff > 0.)
+                    BB.UpdateEdge(E3, aLine2d, aLine2d2, theSurf, Loc, Precision::Confusion());
+                  else
+                  {
+                    BB.UpdateEdge(E3, aLine2d2, aLine2d, theSurf, Loc, Precision::Confusion());
+                    theWire.Nullify();
+                    BB.MakeWire(theWire);
+                    BB.Add(theWire, anEdge.Oriented(TopAbs_REVERSED));
+                    BB.Add(theWire, E4);
+                    BB.Add(theWire, OE.Oriented(TopAbs_FORWARD));
+                    BB.Add(theWire, E3);
+                    theWire.Closed(Standard_True);
+                  }
+                }
                 else
                 {
-                  BB.UpdateEdge(E3, aLine2d2, aLine2d, theSurf, Loc, Precision::Confusion());
-                  theWire.Nullify();
-                  BB.MakeWire(theWire);
-                  BB.Add(theWire, anEdge.Oriented(TopAbs_REVERSED));
-                  BB.Add(theWire, E4);
-                  BB.Add(theWire, OE.Oriented(TopAbs_FORWARD));
-                  BB.Add(theWire, E3);
-                  theWire.Closed(Standard_True);
+                  BB.SameParameter(E3, Standard_False);
+                  BB.SameRange(E3, Standard_False);
+                  BB.SameParameter(E4, Standard_False);
+                  BB.SameRange(E4, Standard_False);
+                  BB.UpdateEdge(E3, aLine2d,  theSurf, Loc, Precision::Confusion());
+                  BB.Range(E3, theSurf, Loc, 0., OffsetVal);
+                  BB.UpdateEdge(E4, aLine2d2, theSurf, Loc, Precision::Confusion());
+                  BB.Range(E4, theSurf, Loc, 0., OffsetVal);
                 }
+                NewFace = BRepLib_MakeFace(theSurf, theWire);
               }
-              else
-              {
-                BB.SameParameter(E3, Standard_False);
-                BB.SameRange(E3, Standard_False);
-                BB.SameParameter(E4, Standard_False);
-                BB.SameRange(E4, Standard_False);
-                BB.UpdateEdge(E3, aLine2d,  theSurf, Loc, Precision::Confusion());
-                BB.Range(E3, theSurf, Loc, 0., OffsetVal);
-                BB.UpdateEdge(E4, aLine2d2, theSurf, Loc, Precision::Confusion());
-                BB.Range(E4, theSurf, Loc, 0., OffsetVal);
-              }
-              NewFace = BRepLib_MakeFace(theSurf, theWire);
             } //cylinder or cone
           } //if both edges are arcs of circles
 	  if (NewFace.IsNull())
diff --git a/src/BRepOffset/BRepOffset_Tool.cxx b/src/BRepOffset/BRepOffset_Tool.cxx
index d4bdcf8..6d04d71 100644
--- a/src/BRepOffset/BRepOffset_Tool.cxx
+++ b/src/BRepOffset/BRepOffset_Tool.cxx
@@ -2410,7 +2410,7 @@ void BRepOffset_Tool::Inter2d (const TopoDS_Face&    F,
 			    IndexMin = ind;
 			  }
 		      }
-		    if (Dist2Min <= Precision::Confusion() * Precision::Confusion())
+            if (Dist2Min <= Precision::SquareConfusion())
 		      {
 			YaSol = Standard_True;
 			P2d = P1[i1];
@@ -2437,7 +2437,7 @@ void BRepOffset_Tool::Inter2d (const TopoDS_Face&    F,
 			    IndexMin = ind;
 			  }
 		      }
-		    if (Dist2Min <= Precision::Confusion() * Precision::Confusion())
+            if (Dist2Min <= Precision::SquareConfusion())
 		      {
 			YaSol = Standard_True;
 			P2d = P2[i2];
diff --git a/src/BRepOffsetAPI/BRepOffsetAPI.cdl b/src/BRepOffsetAPI/BRepOffsetAPI.cdl
index 71e16c8..dbdadcd 100644
--- a/src/BRepOffsetAPI/BRepOffsetAPI.cdl
+++ b/src/BRepOffsetAPI/BRepOffsetAPI.cdl
@@ -98,6 +98,9 @@ is
     class ThruSections;	      ---  inherits  MakeShape  from  BRepBuilderAPI
 
     class NormalProjection ;  ---  inherits  MakeShape  from  BRepBuilderAPI
+
+    class MiddlePath;	      ---  inherits  MakeShape  from  BRepBuilderAPI
+    
     -- 
     --   Plate
     --     
diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cdl b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cdl
index d881dba..fad86aa 100644
--- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cdl
+++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cdl
@@ -40,7 +40,7 @@ uses
     
     
 raises
-    ConstructionError from Standard
+    NotDone from StdFail
     
 is
     Create returns MakeOffset from BRepOffsetAPI;
@@ -80,9 +80,9 @@ is
 	---Purpose:  Computes a parallel to the spine at distance Offset and
     	-- at an altitude Alt from the plane of the spine in relation
     	-- to the normal to the spine.
-    	-- Exceptions: Standard_ConstructionError if the offset is not built.
+    	-- Exceptions: StdFail_NotDone if the offset is not built.
     raises
-    	ConstructionError from Standard
+    	NotDone from StdFail
     is static;
 
 	
diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cdl b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cdl
new file mode 100644
index 0000000..ea0b74e
--- /dev/null
+++ b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cdl
@@ -0,0 +1,53 @@
+-- File:      BRepOffsetAPI_MiddlePath.cdl
+-- Created:   06.08.12 15:56:30
+-- Author:    jgv at ROLEX
+---Copyright: Open CASCADE 2012
+
+class MiddlePath from BRepOffsetAPI inherits MakeShape from BRepBuilderAPI
+
+    	---Purpose: Describes functions to build a middle path of a
+    	--          pipe-like shape
+
+uses
+
+    Shape from TopoDS,
+    Wire  from TopoDS,
+    Edge  from TopoDS,
+    Face  from TopoDS,
+    MapOfShape from TopTools,
+    SequenceOfSequenceOfShape from BRepOffsetAPI
+    
+is
+    --Create(aShape    : Shape from TopoDS;
+    	--   StartWire : Wire from TopoDS)
+    --returns MiddlePath from BRepOffsetAPI;
+    
+    --Create(aShape    : Shape from TopoDS;
+    	--   StartEdge : Edge from TopoDS)
+    --returns MiddlePath from BRepOffsetAPI;
+    
+    Create(aShape     : Shape from TopoDS;
+    	   StartShape : Shape from TopoDS;
+	   EndShape   : Shape from TopoDS)
+    ---Purpose: General constructor.
+    --          StartShape and EndShape may be
+    --          a wire or a face
+    returns MiddlePath from BRepOffsetAPI;
+
+    Build(me: in out)
+    is redefined;
+
+fields
+    
+    myInitialShape : Shape from TopoDS;
+    myStartWire    : Wire  from TopoDS;
+    myEndWire      : Wire  from TopoDS;
+    myClosedSection  : Boolean from Standard;
+    myClosedRing     : Boolean from Standard;
+    
+    myStartWireEdges : MapOfShape from TopTools;
+    myEndWireEdges   : MapOfShape from TopTools;
+    
+    myPaths        : SequenceOfSequenceOfShape from BRepOffsetAPI;
+    
+end MiddlePath;
diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx
new file mode 100644
index 0000000..e9bcb40
--- /dev/null
+++ b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx
@@ -0,0 +1,1022 @@
+// File:      BRepOffsetAPI_MiddlePath.cxx
+// Created:   06.08.12 16:53:16
+// Author:    jgv at ROLEX
+// Copyright: Open CASCADE 2012
+
+#include <BRepOffsetAPI_MiddlePath.ixx>
+#include <BRepOffsetAPI_MiddlePath.hxx>
+
+#include <ShapeUpgrade_UnifySameDomain.hxx>
+
+#include <gp_Lin.hxx>
+#include <Geom_Curve.hxx>
+#include <Geom_TrimmedCurve.hxx>
+#include <Geom_Line.hxx>
+#include <Geom_BezierCurve.hxx>
+#include <Geom_BSplineCurve.hxx>
+#include <BRep_Tool.hxx>
+#include <gce_MakeLin.hxx>
+
+#include <BRepLib_MakeWire.hxx>
+
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_MapIteratorOfMapOfShape.hxx>
+#include <TopExp.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopoDS.hxx>
+#include <BRepTools.hxx>
+#include <TopTools_SequenceOfShape.hxx>
+#include <BRepTools_WireExplorer.hxx>
+#include <TopoDS_Iterator.hxx>
+#include <BRep_Builder.hxx>
+#include <Precision.hxx>
+#include <TopExp_Explorer.hxx>
+#include <BRepExtrema_DistShapeShape.hxx>
+#include <Geom2d_Curve.hxx>
+#include <Geom2d_Line.hxx>
+#include <GCE2d_MakeLine.hxx>
+#include <BRepLib_MakeEdge.hxx>
+#include <BRepLib.hxx>
+#include <GeomAbs_CurveType.hxx>
+#include <BRepAdaptor_Curve.hxx>
+#include <TopTools_Array1OfShape.hxx>
+#include <BRepLib_MakeFace.hxx>
+#include <TColgp_Array1OfPnt.hxx>
+#include <TColgp_HArray1OfPnt.hxx>
+#include <TColgp_Array1OfVec.hxx>
+#include <TColStd_HArray1OfBoolean.hxx>
+#include <GProp_GProps.hxx>
+#include <BRepGProp.hxx>
+#include <Geom_Circle.hxx>
+#include <gp_Circ.hxx>
+#include <GC_MakeCircle.hxx>
+#include <TColgp_SequenceOfPnt.hxx>
+#include <GeomLib.hxx>
+#include <GeomAPI_Interpolate.hxx>
+
+static Standard_Boolean IsClosed(const TopoDS_Wire& aWire)
+{
+  TopoDS_Vertex V1, V2;
+  TopExp::Vertices(aWire, V1, V2);
+  return (V1.IsSame(V2));
+}
+
+static Standard_Boolean IsLinear(const TopoDS_Edge& anEdge,
+                                 gp_Lin& aLine)
+{
+  Standard_Real fpar, lpar;
+  Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
+  if (aCurve->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
+    aCurve = ((Handle(Geom_TrimmedCurve)&) aCurve)->BasisCurve();
+
+  gp_Pnt Pnt1, Pnt2;
+  if (aCurve->IsKind(STANDARD_TYPE(Geom_Line)))
+  {
+    aLine = ((Handle(Geom_Line)&) aCurve)->Lin();
+    return Standard_True;
+  }
+  else if (aCurve->IsKind(STANDARD_TYPE(Geom_BezierCurve)))
+  {
+    Handle(Geom_BezierCurve) theBezier = (Handle(Geom_BezierCurve)&) aCurve;
+    if (theBezier->NbPoles() == 2)
+    {
+      Pnt1 = theBezier->Pole(1);
+      Pnt2 = theBezier->Pole(2);
+      aLine = gce_MakeLin(Pnt1, Pnt2);
+      return Standard_True;
+    }
+  }
+  else if (aCurve->IsKind(STANDARD_TYPE(Geom_BSplineCurve)))
+  {
+    Handle(Geom_BSplineCurve) theBSpline = (Handle(Geom_BSplineCurve)&) aCurve;
+    if (theBSpline->NbPoles() == 2)
+    {
+      Pnt1 = theBSpline->Pole(1);
+      Pnt2 = theBSpline->Pole(2);
+      aLine = gce_MakeLin(Pnt1, Pnt2);
+      return Standard_True;
+    }
+  }
+
+  return Standard_False;
+}
+
+static GeomAbs_CurveType TypeOfEdge(const TopoDS_Edge& anEdge)
+{
+  gp_Lin aLin;
+  if (IsLinear(anEdge, aLin))
+    return GeomAbs_Line;
+
+  BRepAdaptor_Curve BAcurve(anEdge);
+  return BAcurve.GetType();
+}
+
+static gp_Vec TangentOfEdge(const TopoDS_Shape& aShape,
+                            const Standard_Boolean OnFirst)
+{
+  TopoDS_Edge anEdge = TopoDS::Edge(aShape);
+  TopAbs_Orientation anOr = anEdge.Orientation();
+  
+  Standard_Real fpar, lpar;
+  Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
+  Standard_Real thePar;
+  if (OnFirst)
+    thePar = (anOr == TopAbs_FORWARD)? fpar : lpar;
+  else
+    thePar = (anOr == TopAbs_FORWARD)? lpar : fpar;
+
+  gp_Pnt thePoint;
+  gp_Vec theTangent;
+  aCurve->D1(thePar, thePoint, theTangent);
+  if (anOr == TopAbs_REVERSED)
+    theTangent.Reverse();
+
+  return theTangent;
+}
+
+
+static Standard_Boolean IsValidEdge(const TopoDS_Edge& theEdge,
+                                    const TopoDS_Face& theFace)
+{
+  TopoDS_Vertex V1, V2;
+  TopExp::Vertices(theEdge, V1, V2);
+
+  Standard_Real Tol = Precision::Confusion();
+  Standard_Integer i;
+  
+  TopExp_Explorer Explo(theFace, TopAbs_EDGE);
+  for (; Explo.More(); Explo.Next())
+  {
+    const TopoDS_Shape& anEdge = Explo.Current();
+    BRepExtrema_DistShapeShape DistMini(theEdge, anEdge);
+    if (DistMini.Value() <= Tol)
+    {
+      for (i = 1; i <= DistMini.NbSolution(); i++)
+      {
+        BRepExtrema_SupportType theType = DistMini.SupportTypeShape2(i);
+        if (theType == BRepExtrema_IsOnEdge)
+          return Standard_False;
+        //theType is "IsVertex"
+        TopoDS_Shape aVertex = DistMini.SupportOnShape2(i);
+        if (!(aVertex.IsSame(V1) || aVertex.IsSame(V2)))
+          return Standard_False;
+      }
+    }
+  }
+
+  return Standard_True;
+}
+
+/*
+//=======================================================================
+//function : BRepOffsetAPI_MiddlePath
+//purpose  : Constructor
+//=======================================================================
+
+BRepOffsetAPI_MiddlePath::BRepOffsetAPI_MiddlePath(const TopoDS_Shape& aShape,
+                                                   const TopoDS_Wire&  StartWire)
+{
+  myInitialShape = aShape;
+  myStartWire    = StartWire;
+  myClosedSection = myStartWire.Closed();
+}
+
+//=======================================================================
+//function : BRepOffsetAPI_MiddlePath
+//purpose  : Constructor
+//=======================================================================
+
+BRepOffsetAPI_MiddlePath::BRepOffsetAPI_MiddlePath(const TopoDS_Shape& aShape,
+                                                   const TopoDS_Edge&  StartEdge)
+{
+  myInitialShape = aShape;
+
+  BRepLib_MakeWire MW(StartEdge);
+  
+  //BB.Add(myStartWire, StartEdge);
+
+  TopTools_IndexedDataMapOfShapeListOfShape EFmap;
+  TopTools_IndexedDataMapOfShapeListOfShape VEmap;
+  TopExp::MapShapesAndAncestors(myInitialShape, TopAbs_EDGE,   TopAbs_FACE, EFmap);
+  TopExp::MapShapesAndAncestors(myInitialShape, TopAbs_VERTEX, TopAbs_EDGE, VEmap);
+  
+  //Standard_Boolean Start = Standard_True;
+  //if (Start)
+  //{
+  //TopExp::Vertices(CurEdge, V1, V2);
+  //  StartVertex = V1;
+  //  CurVertex   = V2;
+  //  if (VEmap(CurVertex).Extent() == 2) //end: two free edges
+  //  {
+  //    StartVertex = V2;
+  //    CurVertex   = V1;
+  //    if (VEmap(CurVertex).Extent() == 2) //end: two free edges
+  //      break;
+  //  }
+  //  Start = Standard_False;
+  //  continue;
+  //}
+
+  TopoDS_Vertex StartVertex, CurVertex, V1, V2;
+  TopExp::Vertices(StartEdge, StartVertex, CurVertex);
+  TopoDS_Edge CurEdge = StartEdge;
+  Standard_Integer i;
+  for (i = 1; i <= 2; i++)
+  {
+    for (;;)
+    {
+      const TopTools_ListOfShape& LE = VEmap.FindFromKey(CurVertex);
+      if (LE.Extent() == 2) //end: two free edges or one closed free edge
+        break;
+      TopTools_ListIteratorOfListOfShape itl(LE);
+      TopoDS_Edge anEdge;
+      for (; itl.More(); itl.Next())
+      {
+        anEdge = TopoDS::Edge(itl.Value());
+        if (anEdge.IsSame(CurEdge))
+          continue;
+        if (EFmap.FindFromKey(anEdge).Extent() == 1) //another free edge found
+          break;
+      }
+      //BB.Add(myStartWire, anEdge);
+      MW.Add(anEdge);
+      TopExp::Vertices(anEdge, V1, V2);
+      CurVertex = (V1.IsSame(CurVertex))? V2 : V1;
+      CurEdge = anEdge;
+      if (CurVertex.IsSame(StartVertex))
+        break;
+    }
+    if (CurVertex.IsSame(StartVertex))
+      break;
+    CurVertex = StartVertex;
+    CurEdge = StartEdge;
+  }
+  
+  myStartWire = MW.Wire();
+  myClosedSection = myStartWire.Closed();
+}
+*/
+
+//=======================================================================
+//function : BRepOffsetAPI_MiddlePath
+//purpose  : Constructor
+//=======================================================================
+
+BRepOffsetAPI_MiddlePath::BRepOffsetAPI_MiddlePath(const TopoDS_Shape& aShape,
+                                                   const TopoDS_Shape& StartShape,
+                                                   const TopoDS_Shape& EndShape)
+{
+  ShapeUpgrade_UnifySameDomain Unifier(aShape);
+  Unifier.Build();
+  myInitialShape = Unifier.Shape();
+
+  TopoDS_Wire aStartWire, anEndWire;
+  if (StartShape.ShapeType() == TopAbs_FACE)
+  {
+    const TopoDS_Face& StartFace = TopoDS::Face(StartShape);
+    aStartWire = BRepTools::OuterWire(StartFace);
+  }
+  else
+    aStartWire = TopoDS::Wire(StartShape);
+  
+  if (EndShape.ShapeType() == TopAbs_FACE)
+  {
+    const TopoDS_Face& EndFace = TopoDS::Face(EndShape);
+    anEndWire = BRepTools::OuterWire(EndFace);
+  }
+  else
+    anEndWire = TopoDS::Wire(EndShape);
+
+  BRepLib_MakeWire MWstart;
+  //TopTools_MapOfShape MapEdges;
+  BRepTools_WireExplorer wexp(aStartWire);
+  for (; wexp.More(); wexp.Next())
+  {
+    TopoDS_Shape anEdge = wexp.Current();
+    TopoDS_Shape NewEdge = Unifier.Generated(anEdge);
+    if (!NewEdge.IsNull())
+      MWstart.Add(TopoDS::Edge(NewEdge));
+  }
+  myStartWire = MWstart.Wire();
+
+  BRepLib_MakeWire MWend;
+  //MapEdges.Clear();
+  for (wexp.Init(anEndWire); wexp.More(); wexp.Next())
+  {
+    TopoDS_Shape anEdge = wexp.Current();
+    TopoDS_Shape NewEdge = Unifier.Generated(anEdge);
+    if (!NewEdge.IsNull())
+      MWend.Add(TopoDS::Edge(NewEdge));
+  }
+  myEndWire = MWend.Wire();
+
+  myClosedSection = myStartWire.Closed();
+  myClosedRing    = myStartWire.IsSame(myEndWire);
+}
+
+//=======================================================================
+//function : Build
+//purpose  : 
+//=======================================================================
+
+void BRepOffsetAPI_MiddlePath::Build()
+{
+  TopTools_ListIteratorOfListOfShape itl;
+  
+  TopTools_SequenceOfShape StartVertices;
+  TopTools_MapOfShape EndVertices;
+  TopTools_MapOfShape EndEdges;
+  BRepOffsetAPI_SequenceOfSequenceOfShape SectionsEdges;
+  
+  BRepTools_WireExplorer wexp(myStartWire);
+  TopTools_SequenceOfShape EdgeSeq;
+  for (; wexp.More(); wexp.Next())
+  {
+    StartVertices.Append(wexp.CurrentVertex());
+    EdgeSeq.Append(wexp.Current());
+  }
+  if (!myClosedSection)
+    StartVertices.Append(wexp.CurrentVertex());
+  SectionsEdges.Append(EdgeSeq);
+  
+  for (wexp.Init(myEndWire); wexp.More(); wexp.Next())
+  {
+    EndVertices.Add(wexp.CurrentVertex());
+    EndEdges.Add(wexp.Current());
+  }
+  if (!myClosedSection)
+    EndVertices.Add(wexp.CurrentVertex());
+  
+
+  TopoDS_Iterator itw(myStartWire);
+  for (; itw.More(); itw.Next())
+    myStartWireEdges.Add(itw.Value());
+  for (itw.Initialize(myEndWire); itw.More(); itw.Next())
+    myEndWireEdges.Add(itw.Value());
+
+  TopTools_IndexedDataMapOfShapeListOfShape VEmap;
+  TopTools_IndexedDataMapOfShapeListOfShape EFmap;
+  TopExp::MapShapesAndAncestors(myInitialShape, TopAbs_VERTEX, TopAbs_EDGE, VEmap);
+  TopExp::MapShapesAndAncestors(myInitialShape, TopAbs_EDGE,   TopAbs_FACE, EFmap);
+
+  TopTools_MapOfShape CurVertices;
+  
+  Standard_Integer i, j, k;
+  TopoDS_Edge anEdge;
+  TopoDS_Vertex V1, V2, NextVertex;
+  //Initialization of <myPaths>
+  for (i = 1; i <= StartVertices.Length(); i++)
+  {
+    TopTools_SequenceOfShape Edges;
+    const TopTools_ListOfShape& LE = VEmap.FindFromKey(StartVertices(i));
+    for (itl.Initialize(LE); itl.More(); itl.Next())
+    {
+      anEdge = TopoDS::Edge(itl.Value());
+      if (!myStartWireEdges.Contains(anEdge))
+      {
+        TopExp::Vertices(anEdge, V1, V2, Standard_True);
+        if (V1.IsSame(StartVertices(i)))
+          CurVertices.Add(V2);
+        else
+        {
+          anEdge.Reverse();
+          CurVertices.Add(V1);
+        }
+        Edges.Append(anEdge);
+        break;
+      }
+    }
+    myPaths.Append(Edges);
+  }
+
+  //Filling of "myPaths"
+  TopTools_ListOfShape NextVertices;
+  for (;;)
+  {
+    for (i = 1; i <= myPaths.Length(); i++)
+    {
+      const TopoDS_Shape& theShape = myPaths(i).Last();
+      TopoDS_Edge theEdge;
+      TopoDS_Vertex theVertex;
+      if (theShape.ShapeType() == TopAbs_EDGE)
+      {
+        theEdge = TopoDS::Edge(theShape);
+        theVertex = TopExp::LastVertex(theEdge, Standard_True);
+      }
+      else //last segment of path was punctual
+      {
+        theEdge = TopoDS::Edge(myPaths(i)(myPaths(i).Length()-1));
+        theVertex = TopoDS::Vertex(theShape);
+      }
+      
+      if (EndVertices.Contains(theVertex))
+        continue;
+      const TopTools_ListOfShape& LE = VEmap.FindFromKey(theVertex);
+      TopTools_MapOfShape NextEdgeCandidates;
+      for (itl.Initialize(LE); itl.More(); itl.Next())
+      {
+        anEdge = TopoDS::Edge(itl.Value());
+        if (anEdge.IsSame(theEdge))
+          continue;
+        TopExp::Vertices(anEdge, V1, V2, Standard_True);
+        if (V1.IsSame(theVertex))
+          NextVertex = V2;
+        else
+        {
+          anEdge.Reverse();
+          NextVertex = V1;
+        }
+        if (!CurVertices.Contains(NextVertex))
+          NextEdgeCandidates.Add(anEdge);
+      }
+      if (!NextEdgeCandidates.IsEmpty())
+      {
+        if (NextEdgeCandidates.Extent() > 1)
+          myPaths(i).Append(theVertex); //punctual segment of path
+        else
+        {
+          TopTools_MapIteratorOfMapOfShape mapit(NextEdgeCandidates);
+          anEdge = TopoDS::Edge(mapit.Key());
+          myPaths(i).Append(anEdge);
+          NextVertex = TopExp::LastVertex(anEdge, Standard_True);
+          NextVertices.Append(NextVertex);
+        }
+      }
+    }
+    if (NextVertices.IsEmpty())
+      break;
+    for (itl.Initialize(NextVertices); itl.More(); itl.Next())
+      CurVertices.Add(itl.Value());
+    NextVertices.Clear();
+  }
+
+  //Temporary
+  /*
+  TopoDS_Compound aCompound, aCmp1;
+  BRep_Builder BB;
+  BB.MakeCompound(aCompound);
+  BB.MakeCompound(aCmp1);
+  for (i = 1; i <= myPaths.Length(); i++)
+  {
+    TopoDS_Compound aCmp;
+    BB.MakeCompound(aCmp);
+    for (j = 1; j <= myPaths(i).Length(); j++)
+      BB.Add(aCmp, myPaths(i)(j));
+    BB.Add(aCmp1, aCmp);
+  }
+  BB.Add(aCompound, aCmp1);
+         
+  myShape = aCompound;
+
+  Done();
+  return;
+  */
+  ////////////
+  
+  //Building of set of sections
+  Standard_Integer NbE = EdgeSeq.Length();
+  Standard_Integer NbPaths = myPaths.Length();
+  Standard_Integer NbVer = myPaths.Length();
+  if (myClosedSection)
+    NbVer++;
+  i = 1;
+  for (;;)
+  {
+    for (j = 1; j <= EdgeSeq.Length(); j++)
+      EdgeSeq(j).Nullify();
+
+    Standard_Boolean ToInsertVertex = Standard_False;
+    
+    for (j = 2; j <= NbVer; j++)
+    {
+      if (!EdgeSeq(j-1).IsNull())
+        continue;
+
+      //for the end of initial shape
+      if (myPaths(j-1).Length() < i)
+      {
+        TopoDS_Edge aE1 = TopoDS::Edge(myPaths(j-1)(i-1));
+        TopoDS_Shape LastVer = TopExp::LastVertex(aE1, Standard_True);
+        myPaths(j-1).Append(LastVer);
+      }
+      if (myPaths((j<=NbPaths)? j : 1).Length() < i)
+      {
+        TopoDS_Edge aE2 = TopoDS::Edge(myPaths((j<=NbPaths)? j : 1)(i-1));
+        TopoDS_Shape LastVer = TopExp::LastVertex(aE2, Standard_True);
+        myPaths((j<=NbPaths)? j : 1).Append(LastVer);
+      }
+      //////////////////////////////
+      
+      if (ToInsertVertex)
+      {
+        if (myPaths(j-1)(i).ShapeType() == TopAbs_EDGE)
+        {
+          TopoDS_Edge aE1 = TopoDS::Edge(myPaths(j-1)(i));
+          TopoDS_Shape fver = TopExp::FirstVertex(aE1, Standard_True);
+          myPaths(j-1).InsertBefore(i, fver);
+        }
+        if (myPaths((j<=NbPaths)? j : 1)(i).ShapeType() == TopAbs_EDGE)
+        {
+          TopoDS_Edge aE2 = TopoDS::Edge(myPaths((j<=NbPaths)? j : 1)(i));
+          TopoDS_Shape fver = TopExp::FirstVertex(aE2, Standard_True);
+          myPaths((j<=NbPaths)? j : 1).InsertBefore(i, fver);
+        }
+        ToInsertVertex = Standard_False;
+      }
+      
+      TopoDS_Edge E1, E2;
+      if (myPaths(j-1)(i).ShapeType() == TopAbs_EDGE)
+        E1 = TopoDS::Edge(myPaths(j-1)(i));
+      if (myPaths((j<=NbPaths)? j : 1)(i).ShapeType() == TopAbs_EDGE)
+        E2 = TopoDS::Edge(myPaths((j<=NbPaths)? j : 1)(i));
+      TopoDS_Edge E12 = TopoDS::Edge(SectionsEdges(i)(j-1));
+      
+      //TopoDS_Vertex PrevVertex = TopoDS::Vertex(VerSeq(j-1));
+      //TopoDS_Vertex CurVertex  = TopoDS::Vertex(VerSeq(j));
+      TopoDS_Vertex PrevVertex = (E1.IsNull())? TopoDS::Vertex(myPaths(j-1)(i))
+        : TopExp::LastVertex(E1, Standard_True);
+      TopoDS_Vertex CurVertex = (E2.IsNull())? TopoDS::Vertex(myPaths((j<=NbPaths)? j : 1)(i))
+        : TopExp::LastVertex(E2, Standard_True);
+      
+      TopoDS_Edge ProperEdge;
+      const TopTools_ListOfShape& LE = VEmap.FindFromKey(PrevVertex);
+      //Temporary
+      Standard_Integer LenList = LE.Extent();
+      ///////////
+      for (itl.Initialize(LE); itl.More(); itl.Next())
+      {
+        anEdge = TopoDS::Edge(itl.Value());
+        TopExp::Vertices(anEdge, V1, V2);
+        if ((V1.IsSame(PrevVertex) && V2.IsSame(CurVertex) ||
+             V1.IsSame(CurVertex) && V2.IsSame(PrevVertex)) &&
+            !anEdge.IsSame(E1))
+        {
+          ProperEdge = anEdge;
+          break;
+        }
+      }
+      
+      if ((myPaths(j-1)(i)).ShapeType() == TopAbs_VERTEX &&
+          (myPaths((j<=NbPaths)? j : 1)(i)).ShapeType() == TopAbs_VERTEX)
+      {
+        EdgeSeq(j-1) = ProperEdge;
+        continue;
+      }
+
+      TopoDS_Vertex PrevPrevVer = (E1.IsNull())? PrevVertex
+        : TopExp::FirstVertex(E1, Standard_True);
+      TopoDS_Vertex PrevCurVer  = (E2.IsNull())? CurVertex
+        : TopExp::FirstVertex(E2, Standard_True);
+      if (ProperEdge.IsNull()) //no connection between these two vertices
+      {
+        //Find the face on which E1, E2 and E12 lie
+        //ToInsertVertex = Standard_False;
+        const TopoDS_Shape& EE1 = (E1.IsNull())?
+          myPaths(j-1)(i-1) : E1;
+        const TopoDS_Shape& EE2 = (E2.IsNull())?
+          myPaths((j<=NbPaths)? j : 1)(i-1) : E2;
+        const TopTools_ListOfShape& LF = EFmap.FindFromKey(EE1);
+        TopoDS_Face theFace;
+        for (itl.Initialize(LF); itl.More(); itl.Next())
+        {
+          const TopoDS_Shape& aFace = itl.Value();
+          TopExp_Explorer Explo(aFace, TopAbs_EDGE);
+          for (; Explo.More(); Explo.Next())
+          {
+            if (EE2.IsSame(Explo.Current()))
+            {
+              const TopTools_ListOfShape& LFsec = EFmap.FindFromKey(E12);
+              TopTools_ListIteratorOfListOfShape itlsec(LFsec);
+              for (; itlsec.More(); itlsec.Next())
+                if (aFace.IsSame(itlsec.Value()))
+                {
+                  theFace = TopoDS::Face(aFace);
+                  break;
+                }
+              if (!theFace.IsNull())
+                break;
+            }
+          }
+          if (!theFace.IsNull())
+            break;
+        }
+        TopTools_ListOfShape ListOneFace;
+        ListOneFace.Append(theFace);
+
+        if (E1.IsNull() || E2.IsNull())
+        {
+          if (E1.IsNull())
+            E1 = TopoDS::Edge(myPaths(j-1)(i-1));
+          if (E2.IsNull())
+            E2 = TopoDS::Edge(myPaths((j<=NbPaths)? j : 1)(i-1));
+          Standard_Real fpar1, lpar1, fpar2, lpar2;
+          Standard_Real FirstPar1, LastPar1, FirstPar2, LastPar2;
+          Handle(Geom2d_Curve) PCurve1 = BRep_Tool::CurveOnSurface(E1, theFace, fpar1, lpar1);
+          Handle(Geom2d_Curve) PCurve2 = BRep_Tool::CurveOnSurface(E2, theFace, fpar2, lpar2);
+          if (E1.Orientation() == TopAbs_FORWARD)
+          { FirstPar1 = fpar1; LastPar1 = lpar1; }
+          else
+          { FirstPar1 = lpar1; LastPar1 = fpar1; }
+          if (E2.Orientation() == TopAbs_FORWARD)
+          { FirstPar2 = fpar2; LastPar2 = lpar2; }
+          else
+          { FirstPar2 = lpar2; LastPar2 = fpar2; }
+          gp_Pnt2d FirstPnt2d = PCurve1->Value(LastPar1);
+          gp_Pnt2d LastPnt2d  = PCurve2->Value(LastPar2);
+          Handle(Geom_Surface) theSurf = BRep_Tool::Surface(theFace);
+          Handle(Geom2d_Line) theLine = GCE2d_MakeLine(FirstPnt2d, LastPnt2d);
+          Standard_Real len_ne = FirstPnt2d.Distance(LastPnt2d);
+          TopoDS_Edge NewEdge = BRepLib_MakeEdge(theLine, theSurf,
+                                                 PrevVertex, CurVertex,
+                                                 0., len_ne);
+          BRepLib::BuildCurve3d(NewEdge);
+          EdgeSeq(j-1) = NewEdge;
+          EFmap.Add(NewEdge, ListOneFace);
+        }
+        else //E1 is edge
+        {
+          //Extract points 2d
+          Standard_Real fpar1, lpar1, fpar2, lpar2;
+          Standard_Real FirstPar1, LastPar1, FirstPar2, LastPar2;
+          Handle(Geom2d_Curve) PCurve1 = BRep_Tool::CurveOnSurface(E1, theFace, fpar1, lpar1);
+          Handle(Geom2d_Curve) PCurve2 = BRep_Tool::CurveOnSurface(E2, theFace, fpar2, lpar2);
+          if (E1.Orientation() == TopAbs_FORWARD)
+          { FirstPar1 = fpar1; LastPar1 = lpar1; }
+          else
+          { FirstPar1 = lpar1; LastPar1 = fpar1; }
+          if (E2.Orientation() == TopAbs_FORWARD)
+          { FirstPar2 = fpar2; LastPar2 = lpar2; }
+          else
+          { FirstPar2 = lpar2; LastPar2 = fpar2; }
+          gp_Pnt2d FirstPnt2d = PCurve1->Value(LastPar1);
+          gp_Pnt2d LastPnt2d  = PCurve2->Value(LastPar2);
+          Handle(Geom_Surface) theSurf = BRep_Tool::Surface(theFace);
+          Handle(Geom2d_Line) theLine = GCE2d_MakeLine(FirstPnt2d, LastPnt2d);
+          Standard_Real len_ne = FirstPnt2d.Distance(LastPnt2d);
+          TopoDS_Edge NewEdge = BRepLib_MakeEdge(theLine, theSurf,
+                                                 PrevVertex, CurVertex,
+                                                 0., len_ne);
+          BRepLib::BuildCurve3d(NewEdge);
+          gp_Pnt2d PrevFirstPnt2d = PCurve1->Value(FirstPar1);
+          gp_Pnt2d PrevLastPnt2d  = PCurve2->Value(FirstPar2);
+          Handle(Geom2d_Line) Line1 = GCE2d_MakeLine(PrevFirstPnt2d, LastPnt2d);
+          Handle(Geom2d_Line) Line2 = GCE2d_MakeLine(FirstPnt2d, PrevLastPnt2d);
+          Standard_Real len_ne1 = PrevFirstPnt2d.Distance(LastPnt2d);
+          TopoDS_Edge NewEdge1 = BRepLib_MakeEdge(Line1, theSurf,
+                                                  PrevPrevVer, CurVertex,
+                                                  0., len_ne1);
+          BRepLib::BuildCurve3d(NewEdge1);
+          Standard_Real len_ne2 = FirstPnt2d.Distance(PrevLastPnt2d);
+          TopoDS_Edge NewEdge2 = BRepLib_MakeEdge(Line2, theSurf,
+                                                  PrevVertex, PrevCurVer,
+                                                  0., len_ne2);
+          BRepLib::BuildCurve3d(NewEdge2);
+          Standard_Boolean good_ne  = IsValidEdge(NewEdge, theFace);
+          Standard_Boolean good_ne1 = IsValidEdge(NewEdge1, theFace);
+          Standard_Boolean good_ne2 = IsValidEdge(NewEdge2, theFace);
+
+          GeomAbs_CurveType type_E1 = TypeOfEdge(E1);
+          GeomAbs_CurveType type_E2 = TypeOfEdge(E2);
+
+          Standard_Integer ChooseEdge = 0;
+          
+          if (!good_ne || type_E1 != type_E2)
+          {
+            if (type_E1 == type_E2) //!good_ne
+            {
+              if (good_ne1)
+                ChooseEdge = 1;
+              else
+                ChooseEdge = 2;
+            }
+            else //types are different
+            {
+              if (type_E1 == GeomAbs_Line)
+                ChooseEdge = 1;
+              else if (type_E2 == GeomAbs_Line)
+                ChooseEdge = 2;
+              else //to be developed later...
+              {}
+            }
+          }
+          
+          if (ChooseEdge == 0)
+          {
+            EdgeSeq(j-1) = NewEdge;
+            EFmap.Add(NewEdge, ListOneFace);
+          }
+          else if (ChooseEdge == 1)
+          {
+            EdgeSeq(j-1) = NewEdge1;
+            EFmap.Add(NewEdge1, ListOneFace);
+            for (k = 1; k < j-1; k++)
+              EdgeSeq(k).Nullify();
+            for (k = 1; k <= j-1; k++)
+            {
+              TopoDS_Edge aLastEdge = TopoDS::Edge(myPaths(k)(i));
+              TopoDS_Shape VertexAsEdge = TopExp::FirstVertex(aLastEdge, Standard_True);
+              myPaths(k).InsertBefore(i, VertexAsEdge);
+            }
+            j = 1; //start from beginning
+          }
+          else if (ChooseEdge == 2)
+          {
+            EdgeSeq(j-1) = NewEdge2;
+            EFmap.Add(NewEdge2, ListOneFace);
+            ToInsertVertex = Standard_True;
+          }
+        } //else //E1 is edge
+      } //if (ProperEdge.IsNull())
+      else //connecting edge exists
+      {
+        /*
+        if (ToInsertVertex)
+        {
+          myPaths(j-1).InsertBefore(i, PrevPrevVer);
+          myPaths((j<=NbPaths)? j : 1).InsertBefore(i, PrevCurVer);
+          EdgeSeq(j-1) = E12;
+        }
+        else
+        */
+          EdgeSeq(j-1) = ProperEdge;
+      }
+    } //for (j = 2; j <= NbVer; j++)
+    SectionsEdges.Append(EdgeSeq);
+
+    //check for exit from for(;;)
+    Standard_Integer NbEndEdges = 0;
+    for (j = 1; j <= EdgeSeq.Length(); j++)
+      if (EndEdges.Contains(EdgeSeq(j)))
+        NbEndEdges++;
+    if (NbEndEdges == NbE)
+      break;
+    
+    i++;
+  } //for (;;)
+  
+
+  //final phase: building of middle path
+  Standard_Integer NbSecFaces = SectionsEdges.Length();
+  TopTools_Array1OfShape SecFaces(1, NbSecFaces);
+  for (i = 1; i <= NbSecFaces; i++)
+  {
+    BRepLib_MakeWire MW;
+    for (j = 1; j <= NbE; j++)
+    {
+      anEdge = TopoDS::Edge(SectionsEdges(i)(j));
+      MW.Add(anEdge);
+    }
+    if (!myClosedSection)
+    {
+      TopExp::Vertices(MW.Wire(), V1, V2);
+      anEdge = BRepLib_MakeEdge(V2, V1);
+      MW.Add(anEdge);
+    }
+    TopoDS_Wire aWire = MW.Wire();
+    BRepLib_MakeFace MF(aWire, Standard_True); //Only plane
+    if (MF.IsDone())
+      SecFaces(i) = MF.Face();
+    else
+      SecFaces(i) = aWire;
+  }
+
+  TColgp_Array1OfPnt Centers(1, NbSecFaces);
+  for (i = 1; i <= NbSecFaces; i++)
+  {
+    GProp_GProps Properties;
+    if (SecFaces(i).ShapeType() == TopAbs_FACE)
+      BRepGProp::SurfaceProperties(SecFaces(i), Properties);
+    else //wire
+      BRepGProp::LinearProperties(SecFaces(i), Properties);
+      
+    Centers(i) = Properties.CentreOfMass();
+  }
+
+  TopTools_Array1OfShape MidEdges(1, NbSecFaces-1);
+  Standard_Real LinTol = 1.e-5;
+  Standard_Real AngTol = 1.e-7;
+  gp_Pnt Pnt1, Pnt2;
+  for (i = 1; i < NbSecFaces; i++)
+  {
+    GeomAbs_CurveType TypeOfMidEdge = GeomAbs_OtherCurve;
+    for (j = 1; j <= myPaths.Length(); j++)
+    {
+      const TopoDS_Shape& aShape = myPaths(j)(i);
+      if (aShape.ShapeType() == TopAbs_VERTEX)
+      {
+        TypeOfMidEdge = GeomAbs_OtherCurve;
+        break;
+      }
+      anEdge = TopoDS::Edge(aShape);
+      GeomAbs_CurveType aType = TypeOfEdge(anEdge);
+      if (j == 1)
+        TypeOfMidEdge = aType;
+      else
+      {
+        if (aType != TypeOfMidEdge)
+        {
+          TypeOfMidEdge = GeomAbs_OtherCurve;
+          break;
+        }
+      }
+    }
+    if (TypeOfMidEdge == GeomAbs_Line)
+      MidEdges(i) = BRepLib_MakeEdge(Centers(i), Centers(i+1));
+    else if (TypeOfMidEdge == GeomAbs_Circle)
+    {
+      gp_Ax1 theAxis;
+      gp_Dir theDir1, theDir2;
+      Standard_Real theAngle;
+      gp_Vec theTangent;
+      Standard_Boolean SimilarArcs = Standard_True;
+      for (j = 1; j <= myPaths.Length(); j++)
+      {
+        anEdge = TopoDS::Edge(myPaths(j)(i));
+        Standard_Real fpar, lpar;
+        Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
+        if (aCurve->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
+          aCurve = ((Handle(Geom_TrimmedCurve)&) aCurve)->BasisCurve();
+        Pnt1 = aCurve->Value(fpar);
+        Pnt2 = aCurve->Value(lpar);
+        Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve);
+        gp_Circ aCirc = aCircle->Circ();
+        if (j == 1)
+        {
+          theAxis = aCirc.Axis();
+          theDir1 = gp_Vec(aCirc.Location(), Pnt1);
+          theDir2 = gp_Vec(aCirc.Location(), Pnt2);
+          theAngle = lpar - fpar;
+          Standard_Real theParam = (anEdge.Orientation() == TopAbs_FORWARD)?
+            fpar : lpar;
+          aCurve->D1(theParam, Pnt1, theTangent);
+          if (anEdge.Orientation() == TopAbs_REVERSED)
+            theTangent.Reverse();
+        }
+        else
+        {
+          gp_Ax1 anAxis = aCirc.Axis();
+          gp_Lin aLin(anAxis);
+          if (!aLin.Contains(theAxis.Location(), LinTol) ||
+              !anAxis.IsParallel(theAxis, AngTol))
+          {
+            SimilarArcs = Standard_False;
+            break;
+          }
+          gp_Dir aDir1 = gp_Vec(aCirc.Location(), Pnt1);
+          gp_Dir aDir2 = gp_Vec(aCirc.Location(), Pnt2);
+          if (!(aDir1.IsEqual(theDir1, AngTol) && aDir2.IsEqual(theDir2, AngTol) ||
+                aDir1.IsEqual(theDir2, AngTol) && aDir2.IsEqual(theDir1, AngTol)))
+          {
+            SimilarArcs = Standard_False;
+            break;
+          }
+        }
+      }
+      if (SimilarArcs)
+      {
+        gp_XYZ AxisLoc = theAxis.Location().XYZ();
+        gp_XYZ AxisDir = theAxis.Direction().XYZ();
+        Standard_Real Parameter = (Centers(i).XYZ() - AxisLoc) * AxisDir;
+        gp_Pnt theCenterOfCirc(AxisLoc + Parameter*AxisDir);
+        
+        gp_Vec Vec1(theCenterOfCirc, Centers(i));
+        gp_Vec Vec2(theCenterOfCirc, Centers(i+1));
+        /*
+        gp_Dir VecProd = Vec1 ^ Vec2;
+        if (theAxis.Direction() * VecProd < 0.)
+          theAxis.Reverse();
+        */
+        
+        Standard_Real anAngle = Vec1.AngleWithRef(Vec2, theAxis.Direction());
+        if (anAngle < 0.)
+          anAngle += 2.*M_PI;
+        if (Abs(anAngle - theAngle) > AngTol)
+          theAxis.Reverse();
+        gp_Ax2 theAx2(theCenterOfCirc, theAxis.Direction(), Vec1);
+        Handle(Geom_Circle) theCircle = GC_MakeCircle(theAx2, Vec1.Magnitude());
+        gp_Vec aTangent;
+        theCircle->D1( 0., Pnt1, aTangent );
+        if (aTangent * theTangent < 0.)
+        {
+          theAxis.Reverse();
+          theAx2 = gp_Ax2(theCenterOfCirc, theAxis.Direction(), Vec1);
+          theCircle = GC_MakeCircle(theAx2, Vec1.Magnitude());
+        }
+        MidEdges(i) = BRepLib_MakeEdge(theCircle, 0., theAngle);
+      }
+    }
+  }
+
+  //Build missed edges
+  for (i = 1; i < NbSecFaces; i++)
+  {
+    if (MidEdges(i).IsNull())
+    {
+      for (j = i+1; j < NbSecFaces; j++)
+      {
+        if (!MidEdges(j).IsNull())
+          break;
+      }
+      //from i to j-1 all edges are null
+      Handle(TColgp_HArray1OfPnt) thePoints = new TColgp_HArray1OfPnt(1, j-i+1);
+      TColgp_Array1OfVec theTangents(1, j-i+1);
+      Handle(TColStd_HArray1OfBoolean) theFlags = new TColStd_HArray1OfBoolean(1, j-i+1);
+      for (k = i; k <= j; k++)
+        thePoints->SetValue(k-i+1, Centers(k));
+      for (k = i; k <= j; k++)
+      {
+        TColgp_SequenceOfPnt PntSeq;
+        for (Standard_Integer indp = 1; indp <= myPaths.Length(); indp++)
+        {
+          gp_Vec aTangent;
+          if (k == i)
+          {
+            if (myPaths(indp)(k).ShapeType() == TopAbs_VERTEX)
+              continue;
+            aTangent = TangentOfEdge(myPaths(indp)(k), Standard_True); //at begin
+          }
+          else if (k == j)
+          {
+            if (myPaths(indp)(k-1).ShapeType() == TopAbs_VERTEX)
+              continue;
+            aTangent = TangentOfEdge(myPaths(indp)(k-1), Standard_False); //at end
+          }
+          else
+          {
+            if (myPaths(indp)(k-1).ShapeType() == TopAbs_VERTEX ||
+                myPaths(indp)(k).ShapeType() == TopAbs_VERTEX)
+              continue;
+            gp_Vec Tangent1 = TangentOfEdge(myPaths(indp)(k-1), Standard_False); //at end
+            gp_Vec Tangent2 = TangentOfEdge(myPaths(indp)(k), Standard_True); //at begin
+            aTangent = Tangent1 + Tangent2;
+          }
+          aTangent.Normalize();
+          gp_Pnt aPnt(aTangent.XYZ());
+          PntSeq.Append(aPnt);
+        }
+        TColgp_Array1OfPnt PntArray(1, PntSeq.Length());
+        for (Standard_Integer ip = 1; ip <= PntSeq.Length(); ip++)
+          PntArray(ip) = PntSeq(ip);
+        gp_Pnt theBary;
+        gp_Dir xdir, ydir;
+        Standard_Real xgap, ygap, zgap;
+        GeomLib::Inertia(PntArray, theBary, xdir, ydir, xgap, ygap, zgap);
+        gp_Vec theTangent(theBary.XYZ());
+        theTangents(k-i+1) = theTangent;
+      }
+      theFlags->Init(Standard_True);
+
+      GeomAPI_Interpolate Interpol(thePoints, Standard_False, LinTol);
+      Interpol.Load(theTangents, theFlags);
+      Interpol.Perform();
+      if (!Interpol.IsDone())
+      {
+        cout<<endl<<"Interpolation failed"<<endl;
+      }
+      Handle(Geom_Curve) InterCurve = Interpol.Curve();
+      MidEdges(i) = BRepLib_MakeEdge(InterCurve);
+      i = j;
+    }
+  }  
+
+  BRepLib_MakeWire MakeFinalWire;
+  for (i = 1; i < NbSecFaces; i++)
+    if (!MidEdges(i).IsNull())
+      MakeFinalWire.Add(TopoDS::Edge(MidEdges(i)));
+
+  TopoDS_Wire FinalWire = MakeFinalWire.Wire();
+  myShape = MakeFinalWire.Wire();
+  
+  //Temporary
+  /*
+  TopoDS_Compound aCompound, aCmp1, aCmp2;
+  BRep_Builder BB;
+  BB.MakeCompound(aCompound);
+  BB.MakeCompound(aCmp1);
+  BB.MakeCompound(aCmp2);
+  for (i = 1; i <= myPaths.Length(); i++)
+  {
+    TopoDS_Compound aCmp;
+    BB.MakeCompound(aCmp);
+    for (j = 1; j <= myPaths(i).Length(); j++)
+      BB.Add(aCmp, myPaths(i)(j));
+    BB.Add(aCmp1, aCmp);
+  }
+  for (i = 1; i <= SectionsEdges.Length(); i++)
+  {
+    TopoDS_Wire aWire;
+    BB.MakeWire(aWire);
+    for (j = 1; j <= SectionsEdges(i).Length(); j++)
+      BB.Add(aWire, SectionsEdges(i)(j));
+    BB.Add(aCmp2, aWire);
+  }
+  BB.Add(aCompound, aCmp1);
+  BB.Add(aCompound, aCmp2);
+  BB.Add(aCompound, FinalWire);
+         
+  myShape = aCompound;
+  */
+  ////////////
+
+  Done();
+}
diff --git a/src/BRepTest/BRepTest_OtherCommands.cxx b/src/BRepTest/BRepTest_OtherCommands.cxx
index 04114ce..9abac47 100644
--- a/src/BRepTest/BRepTest_OtherCommands.cxx
+++ b/src/BRepTest/BRepTest_OtherCommands.cxx
@@ -23,7 +23,32 @@
 
 #include <Draw_Interpretor.hxx>
 #include <DBRep.hxx>
-#include <BRep_Builder.hxx>
+#include <DrawTrSurf.hxx>
+
+#include <string.h>
+#include <stdio.h>
+
+#include <Standard_ErrorHandler.hxx>
+#include <Precision.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <gp_Lin.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Ax1.hxx>
+
+#include <ElCLib.hxx>
+
+#include <TColgp_SequenceOfPnt.hxx>
+
+#include <GeomAbs_JoinType.hxx>
+#include <Geom_Line.hxx>
+
+#include <IntCurvesFace_Intersector.hxx>
+
+#include <TopAbs.hxx>
+#include <TopAbs_Orientation.hxx>
+
+#include <TopoDS.hxx>
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Compound.hxx>
 #include <TopoDS_CompSolid.hxx>
@@ -33,29 +58,82 @@
 #include <TopoDS_Wire.hxx>
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Vertex.hxx>
-#include <TCollection_AsciiString.hxx>
-
-#include <BRepIntCurveSurface_Inter.hxx>
-#include <Geom_Line.hxx>
-#include <DrawTrSurf.hxx>
+#include <TopoDS_Iterator.hxx>
 
-#include <string.h>
+#include <BRep_Builder.hxx>
+#include <BRep_Tool.hxx>
 
-#include <TopoDS_Iterator.hxx>
 #include <TopExp_Explorer.hxx>
+
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <TopTools_MapOfShape.hxx>
 
-#include <Standard_ErrorHandler.hxx>
+#include <LocOpe_CSIntersector.hxx>
+#include <LocOpe_SequenceOfLin.hxx>
+#include <LocOpe_PntFace.hxx>
+#include <BRepFeat_MakeDPrism.hxx>
 
-//#ifdef WNT
-#include <stdio.h>
-//#endif
+#include <BRepTools.hxx>
+#include <BRepIntCurveSurface_Inter.hxx>
+#include <BRepOffset.hxx>
+#include <BRepOffset_MakeOffset.hxx>
+#include <BRepClass3d_SolidClassifier.hxx>
+
+static 
+  void SampleEdges (const TopoDS_Shape&   theShape, 
+		    TColgp_SequenceOfPnt& theSeq);
+static 
+  TopoDS_Face NextFaceForPrism (const TopoDS_Shape& shape, 
+				const TopoDS_Shape& basis,
+				const gp_Ax1&       ax1);
+static
+  void PrintState (Draw_Interpretor& aDI, 
+		   const TopAbs_State& aState);
+//
+static Standard_Integer emptyshape(Draw_Interpretor&, Standard_Integer, const char** );
+static Standard_Integer subshape  (Draw_Interpretor&, Standard_Integer, const char** );
+static Standard_Integer brepintcs (Draw_Interpretor&, Standard_Integer, const char** );
+static Standard_Integer MakeBoss  (Draw_Interpretor&, Standard_Integer, const char** );
+static Standard_Integer MakeShell (Draw_Interpretor&, Standard_Integer, const char** );
+static Standard_Integer xbounds   (Draw_Interpretor&, Standard_Integer, const char** );
+static Standard_Integer xclassify (Draw_Interpretor&, Standard_Integer, const char** );
 
 //=======================================================================
-// shape : shape name V/E/W/F/SH/SO/CS/C
+//function : OtherCommands
+//purpose  : 
 //=======================================================================
+void  BRepTest::OtherCommands(Draw_Interpretor& theCommands)
+{
+  static Standard_Boolean done = Standard_False;
+  if (done) return;
+  done = Standard_True;
+
+  const char* g = "TOPOLOGY other commands";
+
+  theCommands.Add("shape",
+		  "shape name V/E/W/F/Sh/So/CS/C; make a empty shape",__FILE__,emptyshape,g);
 
-static Standard_Integer emptyshape(Draw_Interpretor& , Standard_Integer n, const char** a)
+  theCommands.Add("subshape",
+		  "subshape name V/E/W/F/Sh/So/CS/C index; get subsshape <index> of given type"
+		  ,__FILE__,subshape,g);
+
+  theCommands.Add("BRepIntCS",
+		  "Calcul d'intersection entre face et curve : BRepIntCS curve shape"
+		  ,__FILE__,brepintcs,g);
+
+  theCommands.Add("makeboss",  "create a boss on the shape myS", __FILE__, MakeBoss, g);
+  theCommands.Add("mksh", "create a shell on Shape", __FILE__, MakeShell, g);
+  theCommands.Add("xbounds",  "xbounds face", __FILE__, xbounds, g);
+  theCommands.Add("xclassify",  "use xclassify Solid [Tolerance=1.e-7]", __FILE__, xclassify, g);
+  
+
+}
+//=======================================================================
+//function : emptyshape
+//purpose  : shape : shape name V/E/W/F/SH/SO/CS/C
+//=======================================================================
+Standard_Integer emptyshape(Draw_Interpretor& , Standard_Integer n, const char** a)
 {
   if (n <= 1) return 1;
 
@@ -101,10 +179,10 @@ static Standard_Integer emptyshape(Draw_Interpretor& , Standard_Integer n, const
 }
 
 //=======================================================================
-// subshape
+//function : subshape
+//purpose  : 
 //=======================================================================
-
-static Standard_Integer subshape(Draw_Interpretor& di, Standard_Integer n, const char** a)
+Standard_Integer subshape(Draw_Interpretor& di, Standard_Integer n, const char** a)
 {
   if (n <= 2) return 1;
 
@@ -195,12 +273,11 @@ static Standard_Integer subshape(Draw_Interpretor& di, Standard_Integer n, const
   }
   return 0;
 }
-
 //=======================================================================
-// subshape
+//function : brepintcs
+//purpose  : 
 //=======================================================================
-
-static Standard_Integer brepintcs(Draw_Interpretor& , Standard_Integer n, const char** a)
+Standard_Integer brepintcs(Draw_Interpretor& , Standard_Integer n, const char** a)
 {
   if (n <= 2) return 1;
   TopoDS_Shape S = DBRep::Get(a[n-1]);
@@ -247,40 +324,12 @@ static Standard_Integer brepintcs(Draw_Interpretor& , Standard_Integer n, const
   //POP pour NT
   return 0;
 }
-
-
-
-#include <TopoDS.hxx>
-#include <TopAbs.hxx>
-#include <gp_Lin.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-#include <Precision.hxx>
-#include <IntCurvesFace_Intersector.hxx>
-#include <ElCLib.hxx>
-#include <BRepFeat_MakeDPrism.hxx>
-#include <BRepTools.hxx>
-#include <TopoDS.hxx>
-//#include <SaveShape.hxx>
-#include <gp_Ax1.hxx>
-#include <TColgp_SequenceOfPnt.hxx>
-#include <LocOpe_CSIntersector.hxx>
-#include <LocOpe_SequenceOfLin.hxx>
-#include <TopAbs_Orientation.hxx>
-#include <LocOpe_PntFace.hxx>
-
-static void SampleEdges (const TopoDS_Shape&   theShape, TColgp_SequenceOfPnt& theSeq);
-static TopoDS_Face NextFaceForPrism (const TopoDS_Shape& shape, 
-				     const TopoDS_Shape& basis,
-				     const gp_Ax1&       ax1);
-
 //=======================================================================
-// intgo
+//function : MakeBoss
+//purpose  : 
 //=======================================================================
-static Standard_Integer MakeBoss(Draw_Interpretor& , Standard_Integer , const char** a)
+Standard_Integer MakeBoss(Draw_Interpretor& , Standard_Integer , const char** a)
 {
-
-
   TopoDS_Shape myS = DBRep::Get( a[2] );
 
   TopoDS_Shape myBasis = DBRep::Get( a[3] ) ;
@@ -306,18 +355,11 @@ static Standard_Integer MakeBoss(Draw_Interpretor& , Standard_Integer , const ch
 
   return 0;
 }
-
-#include <BRepOffset_MakeOffset.hxx>
-#include <BRepOffset.hxx>
-//#include <SaveShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <GeomAbs_JoinType.hxx>
-
 //=======================================================================
-// Create a shell
+//function : MakeShell
+//purpose  : 
 //=======================================================================
-static Standard_Integer MakeShell(Draw_Interpretor& , Standard_Integer , const char** a)
+Standard_Integer MakeShell(Draw_Interpretor& , Standard_Integer , const char** a)
 {
 
   TopoDS_Shape aShape = DBRep::Get( a[1] ); 
@@ -342,7 +384,6 @@ static Standard_Integer MakeShell(Draw_Interpretor& , Standard_Integer , const c
   }
   return 0;
 }
-
 //=======================================================================
 //function : xbounds
 //purpose  : 
@@ -387,53 +428,76 @@ Standard_Integer xbounds(Draw_Interpretor& di, Standard_Integer n, const char**
   //
   return 0;
 }
-
 //=======================================================================
-//function : OtherCommands
+//function : xclassify
 //purpose  : 
 //=======================================================================
-
-void  BRepTest::OtherCommands(Draw_Interpretor& theCommands)
+Standard_Integer xclassify (Draw_Interpretor& aDI, Standard_Integer n, const char** a)
 {
-  static Standard_Boolean done = Standard_False;
-  if (done) return;
-  done = Standard_True;
-
-  const char* g = "TOPOLOGY other commands";
-
-  theCommands.Add("shape",
-		  "shape name V/E/W/F/Sh/So/CS/C; make a empty shape",__FILE__,emptyshape,g);
-
-  theCommands.Add("subshape",
-		  "subshape name V/E/W/F/Sh/So/CS/C index; get subsshape <index> of given type"
-		  ,__FILE__,subshape,g);
-
-  theCommands.Add("BRepIntCS",
-		  "Calcul d'intersection entre face et curve : BRepIntCS curve shape"
-		  ,__FILE__,brepintcs,g);
-
-  theCommands.Add("makeboss",
-		  "create a boss on the shape myS", __FILE__, MakeBoss, g);
-
-  theCommands.Add("mksh",
-		  "create a shell on Shape", __FILE__, MakeShell, g);
-
-
-  theCommands.Add("xbounds",
-		  "xbounds face", __FILE__, xbounds, g);
-
+  if (n < 2) {
+    aDI<<" use xclassify Solid [Tolerance=1.e-7]\n";
+    return 1;
+  }
+  
+  TopoDS_Shape aS = DBRep::Get(a[1]);
+  if (aS.IsNull()) {
+    aDI<<" Null Shape is not allowed here\n";
+    return 0;
+  }
+  
+  if (aS.ShapeType()!=TopAbs_SOLID) {
+    aDI<< " Shape type must be SOLID\n";
+    return 0;
+  }
+  //
+  Standard_Real aTol=1.e-7;
+  TopAbs_State aState = TopAbs_UNKNOWN;
+  //
+  aTol=1.e-7; 
+  if (n==3) {
+    aTol=atof(a[2]);
+  }
+  //
+  BRepClass3d_SolidClassifier aSC(aS);
+  aSC.PerformInfinitePoint(aTol);
+  
+  aState = aSC.State();
+  PrintState(aDI, aState);
+  //
+  return 0;
+}
+//=======================================================================
+//function : PrintState
+//purpose  : 
+//=======================================================================
+void PrintState (Draw_Interpretor& aDI, 
+		 const TopAbs_State& aState)
+{
+  aDI<<"state is: ";
+  switch (aState) {
+  case TopAbs_IN:
+    aDI<<"IN\n"; 
+    break;
+  case TopAbs_OUT:
+    aDI<<"OUT\n";		
+    break;
+  case TopAbs_ON:	 
+    aDI<<"ON\n";	
+    break;
+  case TopAbs_UNKNOWN:
+  default:
+    aDI<<"UNKNOWN\n";		
+    break;
+  }
 }
-
-
-
 //=======================================================================
 //function : NextFaceForPrism
 //purpose  : Search a face from <shape> which intersects with a line of
 //           direction <ax1> and location a point of <basis>.
 //=======================================================================
-static TopoDS_Face NextFaceForPrism (const TopoDS_Shape& shape, 
-				     const TopoDS_Shape& basis,
-				     const gp_Ax1&       ax1)
+TopoDS_Face NextFaceForPrism (const TopoDS_Shape& shape, 
+			      const TopoDS_Shape& basis,
+			      const gp_Ax1&       ax1)
 {
   TopoDS_Face nextFace;
 
@@ -465,14 +529,13 @@ static TopoDS_Face NextFaceForPrism (const TopoDS_Shape& shape,
   return nextFace;
 }
 
-#include <BRep_Tool.hxx>
 
 //=======================================================================
 //function : SampleEdges
 //purpose  : Sampling of <theShape>.
 //design   : Collect the vertices and points on the edges
 //=======================================================================
-static void SampleEdges (const TopoDS_Shape&   theShape, TColgp_SequenceOfPnt& theSeq)
+void SampleEdges (const TopoDS_Shape&   theShape, TColgp_SequenceOfPnt& theSeq)
 {
 
   theSeq.Clear();
diff --git a/src/BRepTest/BRepTest_ShellCommands.cxx b/src/BRepTest/BRepTest_ShellCommands.cxx
index 81fccdc..2cde4c9 100644
--- a/src/BRepTest/BRepTest_ShellCommands.cxx
+++ b/src/BRepTest/BRepTest_ShellCommands.cxx
@@ -37,49 +37,81 @@
 #include <TopAbs.hxx>
 #include <TopoDS_Face.hxx>
 #include <TopoDS.hxx>
+#include <TopoDS_Shell.hxx>
+#include <TopoDS_Solid.hxx>
+#include <BRepClass3d.hxx>
 
+//
+static 
+  Standard_Boolean issame(TopoDS_Face& face, 
+			  TopoDS_Face& newface);
+static 
+  TopoDS_Face findface(TopoDS_Shape& shape, 
+		       TopoDS_Face& face);
+//
+static Standard_Integer shell(Draw_Interpretor&, Standard_Integer, const char** );
+static Standard_Integer outershell(Draw_Interpretor&, Standard_Integer, const char** );
 
+//=======================================================================
+//function : ShellCommands
+//purpose  : 
+//=======================================================================
+void BRepTest::ShellCommands(Draw_Interpretor& theCommands)
+{
+  static Standard_Boolean loaded = Standard_False;
+  if (loaded) return;
+  loaded = Standard_True;
 
+  const char* g = "Projection of wire commands";
 
-static Standard_Boolean issame(TopoDS_Face& face, TopoDS_Face& newface)
-{
-  TopExp_Explorer exp(face,TopAbs_VERTEX),newexp(newface,TopAbs_VERTEX);
-  Standard_Integer newcounter=0,counter=0;
-  for (;exp.More();exp.Next())
-    {
-      counter++;
-      gp_Pnt p(BRep_Tool::Pnt(TopoDS::Vertex(exp.Current())));
-      for (;newexp.More();newexp.Next())
-	{
-	  gp_Pnt newp(BRep_Tool::Pnt(TopoDS::Vertex(newexp.Current())));
-	  if (p.IsEqual(newp,1e-7))
-	    {
-	      newcounter++;
-	      break;
-	    };
-	};
-    };
-  if (counter==newcounter)
-    return Standard_True;
-  return Standard_False;
-}
+  theCommands.Add("shell","Make shell on bugged object",  __FILE__, shell,g);
+  theCommands.Add("outershell","use outershell r s",  __FILE__, outershell,g);
 
-static TopoDS_Face findface(TopoDS_Shape& shape, TopoDS_Face& face)
-{
-  TopoDS_Face newface;
-  TopExp_Explorer exp(shape,TopAbs_FACE);
-  for (;exp.More();exp.Next())
-    {
-      newface = TopoDS::Face(exp.Current());
-      if (issame(face,newface))
-	{
-	  break;
-	};
-    };
-  return newface;
+}
+//modified by NIZNHY-PKV Thu Sep 20 10:44:11 2012f
+//=======================================================================
+//function : outershell
+//purpose  : 
+//=======================================================================
+Standard_Integer outershell(Draw_Interpretor& di, Standard_Integer n, const char** a)
+{  
+  TopoDS_Shape aS;
+  TopoDS_Solid aSd;
+  TopoDS_Shell aSh;
+  //
+  if (n!=3) {
+    di << " use outershell r s\n";
+    return 1;
+  }
+  //
+  aS=DBRep::Get(a[2]);
+  if (aS.IsNull()) {
+    di << " Null shape is not allowed\n";
+    return 1;
+  }
+  if (aS.ShapeType()!=TopAbs_SOLID) {
+    di << " The shape must be a solid\n";
+    return 1;
+  }
+  //
+  aSd=*((TopoDS_Solid*)&aS);
+  //
+  aSh=BRepClass3d::OuterShell(aSd);
+  if (aSh.IsNull()) {
+    di << " not found\n";
+  }
+  else {
+    DBRep::Set(a[1],aSh);
+  }
+  return 0;
 }
 
-static Standard_Integer shell(Draw_Interpretor& di, Standard_Integer n, const char** a)
+//modified by NIZNHY-PKV Thu Sep 20 10:44:17 2012t
+//=======================================================================
+//function : shell
+//purpose  : 
+//=======================================================================
+Standard_Integer shell(Draw_Interpretor& di, Standard_Integer n, const char** a)
 { 
   TopoDS_Shape Shape =  DBRep::Get(a[1]);
   TopTools_ListOfShape ListOfCorks;
@@ -117,18 +149,52 @@ static Standard_Integer shell(Draw_Interpretor& di, Standard_Integer n, const ch
   DBRep::Set("S",MKTS.Shape());
   return 0;
 }
-/*********************************************************************************/
 
-void  BRepTest::ShellCommands(Draw_Interpretor& theCommands)
+
+//=======================================================================
+//function : issame
+//purpose  : 
+//=======================================================================
+Standard_Boolean issame(TopoDS_Face& face, TopoDS_Face& newface)
 {
-  static Standard_Boolean loaded = Standard_False;
-  if (loaded) return;
-  loaded = Standard_True;
+  TopExp_Explorer exp(face,TopAbs_VERTEX),newexp(newface,TopAbs_VERTEX);
+  Standard_Integer newcounter=0,counter=0;
+  for (;exp.More();exp.Next())
+    {
+      counter++;
+      gp_Pnt p(BRep_Tool::Pnt(TopoDS::Vertex(exp.Current())));
+      for (;newexp.More();newexp.Next())
+	{
+	  gp_Pnt newp(BRep_Tool::Pnt(TopoDS::Vertex(newexp.Current())));
+	  if (p.IsEqual(newp,1e-7))
+	    {
+	      newcounter++;
+	      break;
+	    };
+	};
+    };
+  if (counter==newcounter)
+    return Standard_True;
+  return Standard_False;
+}
 
-  const char* g = "Projection of wire commands";
+//=======================================================================
+//function : findface
+//purpose  : 
+//=======================================================================
+TopoDS_Face findface(TopoDS_Shape& shape, TopoDS_Face& face)
+{
+  TopoDS_Face newface;
+  TopExp_Explorer exp(shape,TopAbs_FACE);
+  for (;exp.More();exp.Next())
+    {
+      newface = TopoDS::Face(exp.Current());
+      if (issame(face,newface))
+	{
+	  break;
+	};
+    };
+  return newface;
+}
 
-  theCommands.Add("shell","Make shell on bugged object",
-		  __FILE__,
-		  shell,g);
 
-}
diff --git a/src/BRepTest/BRepTest_SweepCommands.cxx b/src/BRepTest/BRepTest_SweepCommands.cxx
index 755ebbe..dc75ab1 100644
--- a/src/BRepTest/BRepTest_SweepCommands.cxx
+++ b/src/BRepTest/BRepTest_SweepCommands.cxx
@@ -35,6 +35,7 @@
 #include <BRepOffsetAPI_MakeEvolved.hxx>
 #include <BRepOffsetAPI_ThruSections.hxx>
 #include <BRepOffsetAPI_MakePipeShell.hxx>
+#include <BRepOffsetAPI_MiddlePath.hxx>
 
 #include <BRepLib_MakeWire.hxx>
 #include <TopoDS.hxx>
@@ -773,6 +774,32 @@ static Standard_Integer simulsweep(Draw_Interpretor& di,
 }
 
 //=======================================================================
+//  middlepath
+//=======================================================================
+static Standard_Integer middlepath(Draw_Interpretor& di,
+				   Standard_Integer n, const char** a)
+{
+  if (n < 5) return 1;
+
+  TopoDS_Shape aShape = DBRep::Get(a[2]);
+  if (aShape.IsNull()) return 1;
+
+  TopoDS_Shape StartShape = DBRep::Get(a[3]);
+  if (StartShape.IsNull()) return 1;
+  
+  TopoDS_Shape EndShape   = DBRep::Get(a[4]);
+  if (EndShape.IsNull()) return 1;
+
+  BRepOffsetAPI_MiddlePath Builder(aShape, StartShape, EndShape);
+  Builder.Build();
+
+  TopoDS_Shape Result = Builder.Shape();
+  DBRep::Set(a[1], Result);
+
+  return 0;
+}
+
+//=======================================================================
 //function : SweepCommands
 //purpose  : 
 //=======================================================================
@@ -839,5 +866,8 @@ void  BRepTest::SweepCommands(Draw_Interpretor& theCommands)
 		  __FILE__,simulsweep,g);
   theCommands.Add("geompipe", "geompipe r spineedge profileedge radius [byACR [byrotate]]"
 		  __FILE__,geompipe,g);
+  
+  theCommands.Add("middlepath", "middlepath res shape startshape endshape",
+		  __FILE__,middlepath,g);
 }
 
diff --git a/src/BSplCLib/BSplCLib.cxx b/src/BSplCLib/BSplCLib.cxx
index 4e6ab86..2af3c75 100644
--- a/src/BSplCLib/BSplCLib.cxx
+++ b/src/BSplCLib/BSplCLib.cxx
@@ -1639,7 +1639,7 @@ Standard_Boolean  BSplCLib::PrepareInsertKnots
   if (adeltaK1 > Tolerance) return Standard_False;
   if (adeltaK2  > Tolerance) return Standard_False;
   
-  Standard_Integer sigma = 0, mult, amult, lastmult = 0;
+  Standard_Integer sigma = 0, mult, amult;
   NbKnots = 0;
   Standard_Integer  k  = Knots.Lower() - 1;
   Standard_Integer  ak = AddKnots.Lower();
@@ -1684,18 +1684,15 @@ Standard_Boolean  BSplCLib::PrepareInsertKnots
     if (Abs(au - Knots(k)) <= Eps) {
       // identic to existing knot
       mult = Mults(k);
-      lastmult = mult;//gka 
       if (Add) {
 	if (mult + amult > Degree)
 	  amult = Max(0,Degree - mult);
 	sigma += amult;
-        //lastmult = mult + amult;
 	
       }
       else if (amult > mult) {
 	if (amult > Degree) amult = Degree;
 	sigma += amult - mult;
-	//lastmult = amult;//gka modified
       }
       /*
       // on periodic curves if this is the last knot
@@ -1713,7 +1710,6 @@ Standard_Boolean  BSplCLib::PrepareInsertKnots
       if (amult > 0) {
 	if (amult > Degree) amult = Degree;
 	NbKnots++;
-	//lastmult = amult;
 	sigma += amult;
       }
     }
@@ -1722,9 +1718,6 @@ Standard_Boolean  BSplCLib::PrepareInsertKnots
   }
   
   // count the last knots
-  if (lastmult == 0)// || k < Knots.Upper())
-    lastmult = Mults(Knots.Upper());
-
   while (k < Knots.Upper()) {
     k++;
     NbKnots++;
@@ -1732,7 +1725,12 @@ Standard_Boolean  BSplCLib::PrepareInsertKnots
   }
 
   if (Periodic) {
-    NbPoles = sigma - lastmult;
+    //for periodic B-Spline the requirement is that multiplicites of the first
+    //and last knots must be equal (see Geom_BSplineCurve constructor for
+    //instance);
+    //respectively AddMults() must meet this requirement if AddKnots() contains
+    //knot(s) coincident with first or last
+    NbPoles = sigma - Mults(Knots.Upper());
   }
   else {
     NbPoles = sigma - Degree - 1;
diff --git a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx
index 2b09562..147c99c 100644
--- a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx
+++ b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx
@@ -210,7 +210,7 @@ void BinLDrivers_DocumentRetrievalDriver::Read
   mySections.Clear();
   myPAtt.Init();
   Handle(TDF_Data) aData = new TDF_Data();
-  std::streamoff aDocumentPos = -1;
+  streampos aDocumentPos = -1;
 
   // 2b. Read the TOC of Sections
   if (aFileVer >= 3) {
@@ -274,7 +274,7 @@ void BinLDrivers_DocumentRetrievalDriver::Read
   } // end of reading Sections or shape section
 
   // Return to read of the Document structure
-  anIS.seekg((streampos) aDocumentPos);
+  anIS.seekg(aDocumentPos);
 
   // read the header (tag) of the root label
   Standard_Integer aTag;
diff --git a/src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.cxx b/src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.cxx
index ee70d9c..7befd9d 100644
--- a/src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.cxx
+++ b/src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.cxx
@@ -79,17 +79,21 @@ Standard_Boolean BinMDataStd_ExtStringArrayDriver::Paste
   }
 
   if(ok) {
-#ifdef DEB
-  //cout << "CurDocVersion = " << BinMDataStd::DocumentVersion() <<endl;
-#endif
+//#ifdef DEB
+//  cout << "CurDocVersion = " << BinMDataStd::DocumentVersion() <<endl;
+//#endif
     Standard_Boolean aDelta(Standard_False);
     if(BinMDataStd::DocumentVersion() > 2) {
       Standard_Byte aDeltaValue;
-      if (! (theSource >> aDeltaValue))
-	return Standard_False;
+	  if (! (theSource >> aDeltaValue)) {
+//#ifdef DEB
+//      cout <<"DeltaValue = " << (Standard_Integer)aDeltaValue <<endl;
+//#endif
+	    return Standard_False;
+	  }
       else
 	aDelta = (Standard_Boolean)aDeltaValue;
-    }
+	}
     anAtt->SetDelta(aDelta);
   }
   return ok;
@@ -113,4 +117,6 @@ void BinMDataStd_ExtStringArrayDriver::Paste
   theTarget << aFirstInd << aLastInd;
   for (Standard_Integer i = aFirstInd; i <= aLastInd; i ++)
     theTarget << anAtt->Value( i );
+
+  theTarget << (Standard_Byte)anAtt->GetDelta();
 }
diff --git a/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx b/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx
index 0a18c4c..a67035a 100644
--- a/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx
+++ b/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx
@@ -42,7 +42,7 @@ static Standard_Character EvolutionToChar(const TNaming_Evolution theEvol)
     case TNaming_MODIFY       : return 'M';
     case TNaming_DELETE       : return 'D';
     case TNaming_SELECTED     : return 'S';
-    case TNaming_REPLACE      : return 'R';
+      //    case TNaming_REPLACE      : return 'R';
   default:
     Standard_DomainError::Raise("TNaming_Evolution:: Evolution Unknown");
   }
@@ -58,7 +58,7 @@ static TNaming_Evolution EvolutionToEnum(const Standard_Character theEvol)
     case 'M': return TNaming_MODIFY;
     case 'D': return TNaming_DELETE;
     case 'S': return TNaming_SELECTED;
-    case 'R': return TNaming_REPLACE;
+    case 'R': return TNaming_MODIFY; //for compatibility //TNaming_REPLACE;
   default:
     Standard_DomainError::Raise("TNaming_Evolution:: Evolution Unknown");
   }
@@ -211,9 +211,9 @@ Standard_Boolean BinMNaming_NamedShapeDriver::Paste
     case TNaming_SELECTED     : 
       aBuilder.Select(aNewShape, anOldShape); 
       break;
-    case TNaming_REPLACE      :
-      aBuilder.Replace(anOldShape, aNewShape); 
-      break;
+      //    case TNaming_REPLACE      :
+      //      aBuilder.Replace(anOldShape, aNewShape); 
+      //      break;
       default :
         Standard_DomainError::Raise("TNaming_Evolution:: Evolution Unknown");
     }
diff --git a/src/BinMNaming/BinMNaming_NamingDriver.cxx b/src/BinMNaming/BinMNaming_NamingDriver.cxx
index 87a292a..999ed9c 100644
--- a/src/BinMNaming/BinMNaming_NamingDriver.cxx
+++ b/src/BinMNaming/BinMNaming_NamingDriver.cxx
@@ -56,6 +56,7 @@ static Standard_Character NameTypeToChar(const TNaming_NameType theNameType)
     case TNaming_FILTERBYNEIGHBOURGS : return 'F';
     case TNaming_ORIENTATION  : return 'O'; 
     case TNaming_WIREIN       : return 'W';
+    case TNaming_SHELLIN      : return 'H';
   default:
     Standard_DomainError::Raise("TNaming_NameType:: Name Type Unknown");
   }
@@ -77,6 +78,7 @@ static TNaming_NameType CharTypeToName(const Standard_Character theCharType)
     case 'F'  : return TNaming_FILTERBYNEIGHBOURGS;
     case 'O'  : return TNaming_ORIENTATION;
     case 'W'  : return TNaming_WIREIN;
+    case 'H'  : return TNaming_SHELLIN;
   default:
     Standard_DomainError::Raise("TNaming_NameType:: Name Type Unknown");
   }
diff --git a/src/BinTools/BinTools_ShapeSet.cxx b/src/BinTools/BinTools_ShapeSet.cxx
index 9da9050..3c18ed1 100644
--- a/src/BinTools/BinTools_ShapeSet.cxx
+++ b/src/BinTools/BinTools_ShapeSet.cxx
@@ -386,7 +386,7 @@ void  BinTools_ShapeSet::Read(Standard_IStream& IS)
     IS.getline(vers,100,'\n');
     // BUC60769 PTV 18.10.2000: remove possible '\r' at the end of the line
     
-    for (Standard_Integer lv = (strlen(vers)- 1); lv > 1 && (vers[lv] == '\r' || vers[lv] == '\n') ;lv--) 
+    for (Standard_Size lv = (strlen(vers)- 1); lv > 1 && (vers[lv] == '\r' || vers[lv] == '\n') ;lv--) 
       vers[lv] = '\0';
     
   } while ( ! IS.fail() && strcmp(vers,Version_1) && strcmp(vers,Version_2) &&
@@ -805,7 +805,7 @@ void  BinTools_ShapeSet::ReadGeometry(const TopAbs_ShapeEnum T,
 	    if (val > 0 && val <= 3) 
 	      BinTools::GetReal(IS, p1); 
 	  } else {
-	    std::streamoff aPos = IS.tellg();
+        streampos aPos = IS.tellg();
 	    BinTools::GetReal(IS, p1); 	    
 	    val = (Standard_Integer)IS.get();//case {0|1|2|3}
 #ifdef MDTV_DEB
diff --git a/src/BndLib/BndLib_Add2dCurve.cxx b/src/BndLib/BndLib_Add2dCurve.cxx
index 55b3a02..7c95adc 100644
--- a/src/BndLib/BndLib_Add2dCurve.cxx
+++ b/src/BndLib/BndLib_Add2dCurve.cxx
@@ -19,6 +19,7 @@
 
 #include <BndLib_Add2dCurve.ixx>
 #include <BndLib.hxx>
+#include <ElCLib.hxx>
 #include <GeomAbs_CurveType.hxx>
 
 #include <TColgp_Array1OfPnt2d.hxx>
@@ -121,15 +122,18 @@ void BndLib_Add2dCurve::Add( const Adaptor2d_Curve2d& C,
 
 
 	Handle(Geom2d_Geometry) G = Bs->Copy();
-
 	const Handle(Geom2d_BSplineCurve)& Bsaux = (*((Handle(Geom2d_BSplineCurve)*)&G));
-//  modified by NIZHNY-EAP Fri Dec  3 14:29:14 1999 ___BEGIN___
-	// To avoid exeption in Segment
 	Standard_Real u1 = U1, u2 = U2;
-	if(Bsaux->FirstParameter() > U1) u1 = Bsaux->FirstParameter();
-	if(Bsaux->LastParameter()  < U2 ) u2  = Bsaux->LastParameter();
-//  modified by NIZHNY-EAP Fri Dec  3 14:29:18 1999 ___END___
-
+	if (Bsaux->IsPeriodic())
+	  ElCLib::AdjustPeriodic( Bsaux->FirstParameter(), Bsaux->LastParameter(), Precision::PConfusion(), u1, u2 );
+	else {
+	  ////////////////////////////////////////////////
+	  //  modified by NIZHNY-EAP Fri Dec  3 14:29:14 1999 ___BEGIN___
+	  // To avoid exeption in Segment
+	  if(Bsaux->FirstParameter() > U1) u1 = Bsaux->FirstParameter();
+	  if(Bsaux->LastParameter()  < U2 ) u2  = Bsaux->LastParameter();
+	  //  modified by NIZHNY-EAP Fri Dec  3 14:29:18 1999 ___END___
+	}
 	Bsaux->Segment(u1, u2);
 	for (Standard_Integer i = 1; i <= Bsaux->NbPoles(); i++) {
 	  B.Add(Bsaux->Pole(i));
diff --git a/src/BndLib/BndLib_Add3dCurve.cxx b/src/BndLib/BndLib_Add3dCurve.cxx
index 312bc92..acf686f 100644
--- a/src/BndLib/BndLib_Add3dCurve.cxx
+++ b/src/BndLib/BndLib_Add3dCurve.cxx
@@ -146,12 +146,14 @@ void BndLib_Add3dCurve::Add( const Adaptor3d_Curve& C,
 	//// modified by jgv, 24.10.01 for BUC61031 ////
 	if (Bsaux->IsPeriodic())
 	  ElCLib::AdjustPeriodic( Bsaux->FirstParameter(), Bsaux->LastParameter(), Precision::PConfusion(), u1, u2 );
-	////////////////////////////////////////////////
-	//  modified by NIZHNY-EAP Fri Dec  3 14:29:14 1999 ___BEGIN___
-	// To avoid exeption in Segment
-	if(Bsaux->FirstParameter() > U1) u1 = Bsaux->FirstParameter();
-	if(Bsaux->LastParameter()  < U2 ) u2  = Bsaux->LastParameter();
-	//  modified by NIZHNY-EAP Fri Dec  3 14:29:18 1999 ___END___
+	else {
+	  ////////////////////////////////////////////////
+	  //  modified by NIZHNY-EAP Fri Dec  3 14:29:14 1999 ___BEGIN___
+	  // To avoid exeption in Segment
+	  if(Bsaux->FirstParameter() > U1) u1 = Bsaux->FirstParameter();
+	  if(Bsaux->LastParameter()  < U2 ) u2  = Bsaux->LastParameter();
+	  //  modified by NIZHNY-EAP Fri Dec  3 14:29:18 1999 ___END___
+	}
 	Bsaux->Segment(u1, u2);
 	Bs = Bsaux;
       }
diff --git a/src/CGM/CGM_Driver.cxx b/src/CGM/CGM_Driver.cxx
index f216d2f..86ea67a 100644
--- a/src/CGM/CGM_Driver.cxx
+++ b/src/CGM/CGM_Driver.cxx
@@ -382,7 +382,7 @@ void CGM_Driver::InitializeWidthMap (const Handle(Aspect_WidthMap)& aWidthMap)
   if (WIDTHMAP)
     delete[] WIDTHMAP;
   WIDTHMAP = new float[Size];
-  memset (WIDTHMAP, 0, sizeof(WIDTHMAP));
+  memset (WIDTHMAP, 0, Size * sizeof(float));
   for (Standard_Integer i=1; i<= Size; i++) {
     Standard_Real w = aWidthMap->Entry(i).Width();
     WIDTHMAP[aWidthMap->Entry(i).Index()] = (float)w;
diff --git a/src/CGM/cgmobin.c b/src/CGM/cgmobin.c
index 4b2b050..bb9793b 100644
--- a/src/CGM/cgmobin.c
+++ b/src/CGM/cgmobin.c
@@ -196,7 +196,7 @@ CGMObin(FILE *stream, Code c, Long *pi, Float *pr, char *str)
             {
                register Long *pt = pi, i, k;
                Long red, green, blue, nc, ncol;
-               unsigned short run, packed;
+               Long run, packed;
                Long last, lastred, lastgreen, lastblue;
                static Long nx, ny;
                static Prec lprec;
diff --git a/src/CSLib/CSLib.cxx b/src/CSLib/CSLib.cxx
index 5deb3c7..af66fce 100644
--- a/src/CSLib/CSLib.cxx
+++ b/src/CSLib/CSLib.cxx
@@ -303,7 +303,7 @@ void CSLib::Normal(const Standard_Integer MaxOrder,
 	    sup = M_PI;
 	 }
 	 Standard_Boolean CS=0;
-	 Standard_Real Vprec=0,Vsuiv;
+	 Standard_Real Vprec = 0., Vsuiv = 0.;
 	 //Creation of the polynom
 	 CSLib_NormalPolyDef  Poly(Order,Ratio);
 	 //Find zeros of SAPS
@@ -311,9 +311,7 @@ void CSLib::Normal(const Standard_Integer MaxOrder,
 			           Precision::Confusion(),
                                    Precision::Confusion());
 	 //If there are zeros
-	 if(FindRoots.IsDone())
-	 {
-	    if(FindRoots.NbSolutions()>0)
+	 if (FindRoots.IsDone() && FindRoots.NbSolutions() > 0)
 	    {
                //ranking by increasing order of roots of SAPS in Sol0
 
@@ -357,14 +355,14 @@ void CSLib::Normal(const Standard_Integer MaxOrder,
                    }
                }
             }
-            else
+         else
             {
                //SAPS has no root, so forcedly do not change the sign
                CS=Standard_False;
                Poly.Value(inf,Vsuiv);
             }
-            //fin if(MFR.NbSolutions()>0)
-         }//fin if(MFR>IsDone())
+         //fin if(MFR.IsDone() && MFR.NbSolutions()>0)
+
          if(CS)
          //Polynom changes the sign
             SP=0;
diff --git a/src/ChFi2d/ChFi2d_Builder_0.cxx b/src/ChFi2d/ChFi2d_Builder_0.cxx
index 1070db4..26c4bbc 100644
--- a/src/ChFi2d/ChFi2d_Builder_0.cxx
+++ b/src/ChFi2d/ChFi2d_Builder_0.cxx
@@ -172,7 +172,7 @@ TopoDS_Edge ChFi2d_Builder::AddChamfer(const TopoDS_Edge& E,
   } //  if (IsAChamfer ...
 
   if (!IsLineOrCircle(adjEdge1,newFace) 
-      || !IsLineOrCircle(adjEdge1,newFace) ) {
+      || !IsLineOrCircle(adjEdge2,newFace) ) {
     status = ChFi2d_NotAuthorized;
     return aChamfer;
   } //  if (!IsLineOrCircle ...
diff --git a/src/ChFi3d/ChFi3d_Builder_C1.cxx b/src/ChFi3d/ChFi3d_Builder_C1.cxx
index d1f2121..ea4a2c4 100644
--- a/src/ChFi3d/ChFi3d_Builder_C1.cxx
+++ b/src/ChFi3d/ChFi3d_Builder_C1.cxx
@@ -378,6 +378,29 @@ static Standard_Boolean Update(Handle(Adaptor3d_HSurface)& face,
     pared = ponc1.Parameter();
     parltg = ponc2.Parameter();
     if ((parltg > f) && (parltg < l)) {
+#ifdef OCC23139
+      ////modified by jgv, 10.05.2012 for the bug 23139////
+      Handle(Geom2d_Curve) PConF = fi.PCurveOnFace();
+      if (!PConF.IsNull())
+      {
+        Handle(Geom2d_TrimmedCurve) aTrCurve = Handle(Geom2d_TrimmedCurve)::DownCast(PConF);
+        if (!aTrCurve.IsNull())
+          PConF = aTrCurve->BasisCurve();
+        if (isfirst)
+        {
+          Standard_Real fpar = PConF->FirstParameter();
+          if (parltg < fpar)
+            parltg = fpar;
+        }
+        else
+        {
+          Standard_Real lpar = PConF->LastParameter();
+          if (parltg > lpar)
+            parltg = lpar;
+        }
+      }
+      /////////////////////////////////////////////////////
+#endif
       fi.SetParameter(parltg,isfirst);
       cp.SetArc(cp.Tolerance(),cp.Arc(),pared,cp.TransitionOnArc());
       return Standard_True;
@@ -889,7 +912,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
             distmin2 = extCC.SquareDistance(i);
             imin = i;
           }
-        if (distmin2 <= Precision::Confusion() * Precision::Confusion())
+        if (distmin2 <= Precision::SquareConfusion())
         {
           Extrema_POnCurv ponc1,ponc2;
           extCC.Points( imin, ponc1, ponc2 );
@@ -4079,7 +4102,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
 		dist2min = extCC.SquareDistance(i);
 		imin = i;
 	      }
-	  if (dist2min <= Precision::Confusion() * Precision::Confusion())
+      if (dist2min <= Precision::SquareConfusion())
 	    {
 	      Extrema_POnCurv ponc1,ponc2;
 	      extCC.Points( imin, ponc1, ponc2 );
diff --git a/src/DDF/DDF_IOStream.cxx b/src/DDF/DDF_IOStream.cxx
index 176df42..d4fb175 100644
--- a/src/DDF/DDF_IOStream.cxx
+++ b/src/DDF/DDF_IOStream.cxx
@@ -635,7 +635,7 @@ Storage_Error DDF_IOStream::BeginReadInfoSection()
 {
   Storage_Error s;
   TCollection_AsciiString l;
-  Standard_Integer        len = strlen(DDF_IOStream::MagicNumber());
+  Standard_Integer        len = (Standard_Integer) strlen(DDF_IOStream::MagicNumber());
 
   // Added because of Draw:
   // It don't go to next line after reading its own header line information!
@@ -1336,7 +1336,7 @@ Storage_Error DDF_IOStream::IsGoodFileType(istream* anIStream)
 
   if (s == Storage_VSOk) {
     TCollection_AsciiString l;
-    Standard_Integer        len = strlen(DDF_IOStream::MagicNumber());
+    Standard_Integer        len = (Standard_Integer) strlen(DDF_IOStream::MagicNumber());
 
     f.ReadChar(l,len);
 
diff --git a/src/DNaming/DNaming_SelectionCommands.cxx b/src/DNaming/DNaming_SelectionCommands.cxx
index b21d52f..8a2039d 100644
--- a/src/DNaming/DNaming_SelectionCommands.cxx
+++ b/src/DNaming/DNaming_SelectionCommands.cxx
@@ -36,6 +36,7 @@
 #include <TNaming_Name.hxx>
 #include <TNaming.hxx>
 #include <TNaming_Naming.hxx>
+#include <TNaming_NamingTool.hxx>
 #include <TNaming_MapOfNamedShape.hxx>
 #include <TNaming_MapIteratorOfMapOfNamedShape.hxx>
 #include <TDF_ChildIterator.hxx>
@@ -44,6 +45,7 @@
 #include <TopAbs.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TDF_LabelMap.hxx>
+#include <TDF_MapIteratorOfLabelMap.hxx>
 
 #include <DBRep.hxx>
 #include <Draw_Appli.hxx>
@@ -115,7 +117,7 @@ static void DumpNaming (const Handle(TNaming_Naming)& naming, Draw_Interpretor&
 static Standard_Integer DNaming_Select (Draw_Interpretor& di, Standard_Integer n, const char** a)
 {
   if (n > 3) {
-    Standard_Boolean geometry = (strcmp(a[0],"SelectGeometry")); 
+    Standard_Boolean geometry = !(strcmp(a[0],"SelectGeometry")); 
     Handle(TDF_Data) DF;
     if(!DDF::GetDF(a[1], DF))  return 1;
     TDF_Label L;
@@ -137,7 +139,51 @@ static Standard_Integer DNaming_Select (Draw_Interpretor& di, Standard_Integer n
   di << "DNaming_Select : Error" << "\n";
   return 1;
 }
+// #define DEB_SELN 1
+//=======================================================================
+//function : FillValidMap
+//purpose  : 
+//=======================================================================
 
+Standard_Boolean FillValidMap(const TDF_Label& theLabel, TDF_LabelMap& theValidMap)
+{
+  Standard_Boolean extRefFound = Standard_False;
+  TDF_AttributeMap anExtMap;
+#ifdef DEB_SELN
+	  TCollection_AsciiString entr1;
+      TDF_Tool::Entry(theLabel, entr1);  
+      cout<<"\tNaming Attribute at = "<< entr1 <<endl;
+#endif
+  TDF_ChildIterator itr(theLabel, Standard_True);
+  for ( ;itr.More(); itr.Next()) {
+	  const TDF_Label& aLabel = itr.Value();
+	  Handle(TNaming_Naming) aNaming;
+	  if(!aLabel.IsNull()) 
+		  aLabel.FindAttribute(TNaming_Naming::GetID(), aNaming);
+	  if(aNaming.IsNull()) continue;
+#ifdef DEB_SELN	  
+      TDF_Tool::Entry(aLabel, entr1);  
+      cout<<"\tNaming Attribute at = "<< entr1 <<endl;
+#endif
+	  TDF_Tool::OutReferences(aLabel,anExtMap);
+	  for (TDF_MapIteratorOfAttributeMap attMItr(anExtMap);attMItr.More(); attMItr.Next()) {
+        Handle(TDF_Attribute) att = attMItr.Key();
+#ifdef DEB_SELN
+        TDF_Tool::Entry(att->Label(), entr1);
+	    cout<<"## References attribute dynamic type = "<<att->DynamicType()<<" at Label = "<<entr1 <<endl;
+#endif	
+	    if (att->Label().IsDifferent(aLabel) && !att->Label().IsDescendant(theLabel)) {
+        theValidMap.Add(att->Label());
+		Handle(TNaming_NamedShape) aNS;
+		att->Label().FindAttribute(TNaming_NamedShape::GetID(), aNS);
+		if(!aNS.IsNull())
+		  TNaming_NamingTool::BuildDescendants(aNS, theValidMap);
+        extRefFound = Standard_True;
+	   }     
+	}
+  }
+  return extRefFound;
+}
 
 //=======================================================================
 //function : SolveSelection
@@ -151,23 +197,32 @@ static Standard_Integer DNaming_SolveSelection (Draw_Interpretor& di, Standard_I
     Handle(TDF_Data) DF;
     if(!DDF::GetDF(a[1], DF))  return 1;
     TDF_Label L;
-    DDF::AddLabel(DF,a[2],L);   
-    //Handle(TNaming_Naming) naming;    
-    //if (!L.FindAttribute(TNaming_Naming::GetID(),naming)) {  
-    //  cout <<"DNaming_DumpSelection : not a selection" << endl;
-    //  return 1;
-    //}
-    //naming->Solve();
-    //Handle(TNaming_NamedShape) NS;
-    //if  (!L.FindAttribute(TNaming_NamedShape::GetID(),NS)) {  
-    //  cout <<"DNaming_DumpSelection : not done" << endl;
-    //  return 1;
-    //}
+    DDF::AddLabel(DF,a[2],L);
+
+    Handle(TNaming_Naming) naming;    
+    if (!L.FindAttribute(TNaming_Naming::GetID(),naming)) {  
+      cout <<"DNaming__SolveSelection  : not a selection" << endl;
+      return 1;
+    }
+	TDF_LabelMap aValidMap;
+    if(!FillValidMap(L,aValidMap)) 
+		di << "Valid map is empty" << "\n";
+#ifdef DEB_SELN
+	cout<<"== Valid Label map =="<<endl;
+	for (TDF_MapIteratorOfLabelMap mapItr(aValidMap);mapItr.More(); mapItr.Next()) {
+      const TDF_Label& aLab = mapItr.Key();
+
+       TCollection_AsciiString entr1;
+       TDF_Tool::Entry(aLab, entr1);
+	   cout<<"  Label = "<<entr1 <<endl;
+	}
+#endif
+
     TNaming_Selector SL (L);
-    TDF_LabelMap dummy;
-    SL.Solve(dummy);
+    Standard_Boolean isSolved = SL.Solve(aValidMap);
+	if(!isSolved)
+		di << "!!! Solver is failed" <<"\n";
     TopoDS_Shape Res = TNaming_Tool::CurrentShape(SL.NamedShape());
-    //TopoDS_Shape Res = TNaming_Tool::CurrentShape(NS);
     sprintf (name,"%s_%s","new",a[2]);
     Display (name,Res);
     return 0;
diff --git a/src/DNaming/DNaming_TransformationDriver.cxx b/src/DNaming/DNaming_TransformationDriver.cxx
index 97c3678..24fb84d 100644
--- a/src/DNaming/DNaming_TransformationDriver.cxx
+++ b/src/DNaming/DNaming_TransformationDriver.cxx
@@ -51,8 +51,7 @@
 #include <gp_Ax2.hxx>
 #include <gp_Pln.hxx>
 #include <GeomLib_IsPlanarSurface.hxx>
-
-
+#include <NCollection_Handle.hxx>
 #include <ModelDefinitions.hxx>
 
 #ifdef WNT
@@ -343,7 +342,6 @@ void DNaming_TransformationDriver::LoadNamingDS (const TDF_Label& theResultLabel
 						 const Handle(TNaming_NamedShape)& theSourceNS,
 						 const gp_Trsf& theTrsf) const 
 {
-  TNaming_Builder aBuilder (theResultLabel);
   if(theSourceNS.IsNull() || theSourceNS->IsEmpty())
     return;
   const TopoDS_Shape& aSrcShape  = theSourceNS->Get();
@@ -380,6 +378,7 @@ void DNaming_TransformationDriver::LoadNamingDS (const TDF_Label& theResultLabel
   TopoDS_Shape aNewSh;
   if (aTMap.IsBound(aSrcShape)) aNewSh  = aTMap(aSrcShape);
   if(!aNewSh.IsNull()) {
+    TNaming_Builder aBuilder (theResultLabel);
     aBuilder.Modify(aSrcShape, aNewSh);
     aTMap.UnBind(aSrcShape);
   }
@@ -402,66 +401,51 @@ void DNaming_TransformationDriver::LoadNamingDS (const TDF_Label& theResultLabel
     if(it.Value() > aNextTag)
       aNextTag = it.Value();
   }
+  NCollection_Handle<TNaming_Builder> aFBuilder, anEBuilder, aVBuilder;
   TopTools_DataMapIteratorOfDataMapOfShapeShape anIt(aTMap);
-  Standard_Boolean aF, anE, aV;
-  aF = anE = aV = Standard_True;
-  TNaming_Builder* pB1 = NULL;
-  TNaming_Builder* pB2 = NULL;
-  TNaming_Builder* pB3 = NULL; 
   for(;anIt.More();anIt.Next()) {
     const TopoDS_Shape& aKey = anIt.Key();
     TopoDS_Shape newShape = anIt.Value();
+    if (SubShapes.IsBound(newShape)) {
+      newShape.Orientation((SubShapes(newShape)).Orientation());
+    }
     if(isPrimitive) {
-      if (SubShapes.IsBound(newShape)) {
-	newShape.Orientation((SubShapes(newShape)).Orientation());
-      }
       if(aTagMap.IsBound(aKey)) {
-	const TDF_Label& aLabel = theResultLabel.FindChild(aTagMap.Find(aKey),  Standard_True);
-	TNaming_Builder aBuilder(aLabel);
-	aBuilder.Modify(aKey, newShape);
+        const TDF_Label& aLabel = theResultLabel.FindChild(aTagMap.Find(aKey),  Standard_True);
+        TNaming_Builder aBuilder(aLabel);
+        aBuilder.Modify(aKey, newShape);
       } else {
-	aNextTag++;
-	const TDF_Label& aLabel = theResultLabel.FindChild(aNextTag,  Standard_True);
-	TNaming_Builder aBuilder(aLabel);
-	aBuilder.Modify(aKey, newShape);
+        aNextTag++;
+        const TDF_Label& aLabel = theResultLabel.FindChild(aNextTag,  Standard_True);
+        TNaming_Builder aBuilder(aLabel);
+        aBuilder.Modify(aKey, newShape);
       }
-    } else {
-    if(aKey.ShapeType() == TopAbs_FACE) {
-      if(aF) {
-	const TDF_Label& aFLabel = theResultLabel.FindChild(FACES_TAG,  Standard_True);
-	TNaming_Builder aFBuilder(aFLabel);
-	pB1 = &aFBuilder;
-	aF = Standard_False; 
+    } 
+    else {
+      if(aKey.ShapeType() == TopAbs_FACE) {
+        if (aFBuilder.IsNull()) 
+        {
+          const TDF_Label& aFLabel = theResultLabel.FindChild(FACES_TAG,  Standard_True);
+          aFBuilder = new TNaming_Builder (aFLabel);
+        }
+        aFBuilder->Modify(anIt.Key(), newShape);
       }
-      if (SubShapes.IsBound(newShape)) {
-	newShape.Orientation((SubShapes(newShape)).Orientation());
+      else if(aKey.ShapeType() == TopAbs_EDGE) {
+        if (anEBuilder.IsNull()) 
+        {
+          const TDF_Label& aELabel = theResultLabel.FindChild(EDGES_TAG,  Standard_True);
+          anEBuilder = new TNaming_Builder (aELabel);
+        }
+        anEBuilder->Modify(anIt.Key(), newShape);
       }
-      pB1->Modify(anIt.Key(), newShape);
-    }
-    else if(aKey.ShapeType() == TopAbs_EDGE) {
-      if(anE) {
-	const TDF_Label& aELabel = theResultLabel.FindChild(EDGES_TAG,  Standard_True);
-	TNaming_Builder anEBuilder(aELabel);
-	pB2 = &anEBuilder;
-	anE = Standard_False; 
+      else if(aKey.ShapeType() == TopAbs_VERTEX) {
+        if (aVBuilder.IsNull())
+        {
+          const TDF_Label& aVLabel = theResultLabel.FindChild(VERTEX_TAG,  Standard_True);
+          aVBuilder = new TNaming_Builder (aVLabel);
+        }
+        aVBuilder->Modify(anIt.Key(), newShape);
       }
-      if (SubShapes.IsBound(newShape)) {
-	newShape.Orientation((SubShapes(newShape)).Orientation());
-      }
-      pB2->Modify(anIt.Key(), newShape);
     }
-    else if(aKey.ShapeType() == TopAbs_VERTEX) {
-      if(aV) {
-	const TDF_Label& aVLabel = theResultLabel.FindChild(VERTEX_TAG,  Standard_True);
-	TNaming_Builder aVBuilder(aVLabel);
-	pB3 = &aVBuilder;
-	aV = Standard_False; 
-      }
-      if (SubShapes.IsBound(newShape)) {
-	newShape.Orientation((SubShapes(newShape)).Orientation());
-      }
-      pB3->Modify(anIt.Key(), newShape);
-    }
-  }
   }
 }
diff --git a/src/Dico/Dico_Dictionary.cdl b/src/Dico/Dico_Dictionary.cdl
index a54d94f..06ef58c 100644
--- a/src/Dico/Dico_Dictionary.cdl
+++ b/src/Dico/Dico_Dictionary.cdl
@@ -33,7 +33,7 @@ generic class Dictionary  from Dico  (TheItem as any)  inherits TShared
     --           size of TheItem class if it is not identified by Handle) : if
     --           this size is big, it can cause problems of memory spending
 
-uses OStream, Integer, Boolean, Character, AsciiString --, Iterator
+uses Size, OStream, Integer, Boolean, Character, AsciiString --, Iterator
 
 raises NoSuchObject
 
@@ -275,14 +275,14 @@ is
     SetNext (me : mutable; acell : mutable Dictionary)  is static private;
     ---Purpose : Defines next cell
 
-    SearchCell (me; name : CString; lmax : Integer;
-    	        car : Character; level : Integer;
-    	    	acell : out mutable Dictionary; reslev : out Integer;
+    SearchCell (me; name : CString; lmax : Size;
+    	        car : Character; level : Size;
+    	    	acell : out mutable Dictionary; reslev : out Size;
     	        stat : out Integer)  is static private;
     ---Purpose : Internal method used to get an entry from a given name
 
-    NewCell (me : mutable; name : CString; namlen : Integer;
-    	     acell : in out mutable Dictionary; reslev,stat : Integer)
+    NewCell (me : mutable; name : CString; namlen : Size;
+    	     acell : in out mutable Dictionary; reslev : Size; stat : Integer)
 	     is static private;
     ---Purpose : Internal method used to create a new entry for a name
 
diff --git a/src/Draft/Draft_Modification_1.cxx b/src/Draft/Draft_Modification_1.cxx
index 860da05..d7ae185 100644
--- a/src/Draft/Draft_Modification_1.cxx
+++ b/src/Draft/Draft_Modification_1.cxx
@@ -968,7 +968,7 @@ void Draft_Modification::Perform ()
 		      Dist2Min = myExtPC.SquareDistance(1);
 		      locpmin = myExtPC.Point(1).Parameter();
 		    }
-		    if(myExtPC.NbExt() == 2 && Dist2Min > Precision::Confusion() * Precision::Confusion()) {  
+            if(myExtPC.NbExt() == 2 && Dist2Min > Precision::SquareConfusion()) {
 		      //to avoid incorrectly choosing the image 
 		      //of the first vertex of the initial edge
 		      Standard_Real d1_2 = myExtPC.SquareDistance(1);
diff --git a/src/Draw/CommandWindow.cxx b/src/Draw/CommandWindow.cxx
index d929764..93aef2a 100644
--- a/src/Draw/CommandWindow.cxx
+++ b/src/Draw/CommandWindow.cxx
@@ -40,8 +40,6 @@
 
 
 
-Standard_Boolean Draw_Interprete(char*); // Implement in draw.cxx
-
 #define CLIENTWND 0
 
 #define PROMPT "Command >> "
diff --git a/src/Draw/Draw.cxx b/src/Draw/Draw.cxx
index 17298a3..7d22678 100644
--- a/src/Draw/Draw.cxx
+++ b/src/Draw/Draw.cxx
@@ -54,6 +54,7 @@
 #include <gp_Pnt2d.hxx>
 
 #include <Standard_Stream.hxx>
+#include <Standard_Version.hxx>
 
 #include <Draw_Drawable3D.hxx>
 #include <Draw_Interpretor.hxx>
@@ -70,9 +71,6 @@
 #include <stdio.h>
 
 extern Standard_Boolean Draw_ParseFailed;
-#ifndef WNT
-extern Standard_Boolean Draw_LowWindows;
-#endif
 
 Standard_EXPORT Draw_Viewer dout;
 Standard_EXPORT Draw_Interpretor theCommands;
@@ -95,11 +93,9 @@ static   Standard_Boolean XLoop;
 
 static Handle(Draw_ProgressIndicator) PInd = NULL;
 
-Standard_EXPORT Standard_Boolean Draw_Interprete(char* command);
+Standard_EXPORT Standard_Boolean Draw_Interprete(const char* command);
 // true if complete command
 
-//#ifndef WNT
-
 // *******************************************************************
 // read an init file
 // *******************************************************************
@@ -114,10 +110,9 @@ static void ReadInitFile (const TCollection_AsciiString& theFileName)
 #ifdef WNT
   if (!Draw_Batch) {
     try {
-      OCC_CATCH_SIGNALS
       aPath.ChangeAll ('\\', '/');
 
-      sprintf(console_command, "source \"%s\"", aPath.ToCString());
+      sprintf(console_command, "source \"%.980s\"", aPath.ToCString());
       console_semaphore = HAS_CONSOLE_COMMAND;
       while (console_semaphore == HAS_CONSOLE_COMMAND)
         Sleep(10);
@@ -136,7 +131,6 @@ static void ReadInitFile (const TCollection_AsciiString& theFileName)
   }
 #endif
 }
-//#endif
 
 //=======================================================================
 //function :
@@ -179,57 +173,79 @@ void Draw_Appli(Standard_Integer argc, char** argv,const FDraw_InitAppli Draw_In
   // analyze arguments
   // *****************************************************************
   Draw_Batch = Standard_False;
-  TCollection_AsciiString aRunFile;
+  TCollection_AsciiString aRunFile, aCommand;
   Standard_Integer i;
   Standard_Boolean isInteractiveForced = Standard_False;
-#ifndef WNT
-  for (i = 0; i < argc; i++) {
-    if (strcasecmp(argv[i],"-b") == 0)
-      Draw_Batch = Standard_True;
-# ifndef __sgi
-    else if (strcasecmp(argv[i],"-l") == 0) {
-      Draw_LowWindows = Standard_True;
+
+#ifdef WNT
+  // On NT command line arguments are in the lpzline and not in argv
+  int argc = 0;
+  const int MAXARGS = 1024;
+  const char* argv[MAXARGS];
+  for (const char* p = strtok(lpszLine, " \t"); p != NULL; p = strtok(NULL, " \t")) {
+    argv[argc++] = p;
+  }
+#endif
+
+  // parse command line
+  for (i = 1; i < argc; i++) {
+    if (strcasecmp (argv[i], "-h") == 0 || strcasecmp (argv[i], "--help") == 0)
+    {
+      cout << "Open CASCADE " << OCC_VERSION_STRING_EXT << " DRAW Test Harness" << endl << endl;
+      cout << "Options: " << endl;
+      cout << "  -b: batch mode (no GUI, no viewers)" << endl;
+      cout << "  -v: no GUI, use virtual (off-screen) windows for viewers" << endl;
+      cout << "  -i: interactive mode" << endl;
+      cout << "  -f file: execute script from file" << endl;
+      cout << "  -c command args...: execute command (with optional arguments)" << endl << endl;
+      cout << "Options -b, -v, and -i are mutually exclusive." << endl;
+      cout << "If -c or -f are given, -v is default; otherwise default is -i." << endl;
+      cout << "Options -c and -f are alternatives and should be at the end " << endl;
+      cout << "of the command line. " << endl;
+      cout << "Option -c can accept set of commands separated by ';'." << endl;
+      return;
     }
-# endif
-    else if (strcasecmp(argv[i],"-v") == 0) {
+    else if (strcasecmp (argv[i], "-b") == 0)
+      Draw_Batch = Standard_True;
+    else if (strcasecmp (argv[i], "-v") == 0) {
       // force virtual windows
       Draw_VirtualWindows = Standard_True;
-    } else if (strcasecmp(argv[i],"-i") == 0) {
+    } else if (strcasecmp (argv[i], "-i") == 0) {
       // force interactive
       Draw_VirtualWindows = Standard_False;
       isInteractiveForced = Standard_True;
-    } else if (strcasecmp(argv[i],"-f") == 0) { // -f option should be LAST!
+    } else if (strcasecmp (argv[i], "-f") == 0) { // -f option should be LAST!
       Draw_VirtualWindows = !isInteractiveForced;
       if (++i < argc) {
         aRunFile = TCollection_AsciiString (argv[i]);
       }
       break;
-    }
-  }
-#else
-  // On NT command line arguments are in the lpzline and not in argv
-  for (char* p = strtok(lpszLine, " \t"); p != NULL; p = strtok(NULL, " \t")) {
-    if (strcasecmp(p, "-v") == 0) {
-      Draw_VirtualWindows = Standard_True;
-    } else if (strcasecmp(p, "-i") == 0) {
-      // force interactive
-      Draw_VirtualWindows = Standard_False;
-      isInteractiveForced = Standard_True;
-    } else if (strcasecmp(p, "-f") == 0) { // -f option should be LAST!
+    } else if (strcasecmp (argv[i], "-c") == 0) { // -c option should be LAST!
       Draw_VirtualWindows = !isInteractiveForced;
-      p = strtok(NULL," \t");
-      if (p != NULL) {
-        aRunFile = TCollection_AsciiString (p);
+      if (++i < argc) {
+        aCommand = TCollection_AsciiString (argv[i]);
+      }
+      while (++i < argc) {
+        aCommand.AssignCat (" ");
+        aCommand.AssignCat (argv[i]);
       }
       break;
+    } else {
+      cout << "Error: unsupported option " << argv[i] << endl;
     }
   }
-#endif
+
   // *****************************************************************
   // set signals
   // *****************************************************************
   OSD::SetSignal();
 
+#ifdef _WIN32
+  // in interactive mode, force Windows to report dll loading problems interactively
+  if ( ! Draw_VirtualWindows && ! Draw_Batch )
+    ::SetErrorMode (0);
+#endif
+
   // *****************************************************************
   // init X window and create display
   // *****************************************************************
@@ -239,12 +255,12 @@ void Draw_Appli(Standard_Integer argc, char** argv,const FDraw_InitAppli Draw_In
 
   if (!Draw_Batch)
 #ifdef WNT
-	Draw_Batch=!Init_Appli(hInst, hPrevInst, nShow, hWnd);
+    Draw_Batch=!Init_Appli(hInst, hPrevInst, nShow, hWnd);
 #else
     Draw_Batch=!Init_Appli();
 #endif
   else
-    cout << "batch mode" << endl;
+    cout << "DRAW is running in batch mode" << endl;
 
   XLoop = !Draw_Batch;
   if (XLoop) {
@@ -307,24 +323,27 @@ void Draw_Appli(Standard_Integer argc, char** argv,const FDraw_InitAppli Draw_In
     ReadInitFile (getenv ("DRAWDEFAULT"));
   }
 
-  // pure batch
+  // read commands from file
   if (!aRunFile.IsEmpty()) {
-    // do not map raise the windows, so test programs are discrete
+    ReadInitFile (aRunFile);
+    // provide a clean exit, this is useful for some analysis tools
+    if ( ! isInteractiveForced )
 #ifndef WNT
-    Draw_LowWindows = Standard_True;
-#endif
-  // comme on ne peut pas photographier les fenetres trop discretes sur sgi
-  // on se met en vedette !! (pmn 20/02/97)
-#ifdef __sgi
-    Draw_LowWindows = Standard_False;
+      return;
+#else
+      ExitProcess(0);
 #endif
+  }
 
-    ReadInitFile (aRunFile);
-    // provide a clean exit, this is usefull for some analysis tools
+  // execute command from command line
+  if (!aCommand.IsEmpty()) {
+    Draw_Interprete (aCommand.ToCString());
+    // provide a clean exit, this is useful for some analysis tools
+    if ( ! isInteractiveForced )
 #ifndef WNT
-    return;
+      return;
 #else
-    ExitProcess(0);
+      ExitProcess(0);
 #endif
   }
 
@@ -333,7 +352,7 @@ void Draw_Appli(Standard_Integer argc, char** argv,const FDraw_InitAppli Draw_In
   // *****************************************************************
   if (XLoop) {
 #ifdef WNT
-	Run_Appli(hWnd);
+    Run_Appli(hWnd);
 #else
     Run_Appli(Draw_Interprete);
 #endif
@@ -361,7 +380,7 @@ void Draw_Appli(Standard_Integer argc, char** argv,const FDraw_InitAppli Draw_In
 void (*Draw_BeforeCommand)() = NULL;
 void (*Draw_AfterCommand)(Standard_Integer) = NULL;
 
-Standard_Boolean Draw_Interprete(char* com)
+Standard_Boolean Draw_Interprete(const char* com)
 {
 
   static Standard_Boolean first = Standard_True;
diff --git a/src/Draw/Draw_BasicCommands.cxx b/src/Draw/Draw_BasicCommands.cxx
index 92532d5..2fca639 100644
--- a/src/Draw/Draw_BasicCommands.cxx
+++ b/src/Draw/Draw_BasicCommands.cxx
@@ -211,6 +211,67 @@ static Standard_Integer spy(Draw_Interpretor& di, Standard_Integer n, const char
   return 0;
 }
 
+static Standard_Integer dlog(Draw_Interpretor& di, Standard_Integer n, const char** a)
+{
+  if (n != 2 && n != 3)
+  {
+    cout << "Enable or disable logging: " << a[0] << " {on|off}" << endl;
+    cout << "Reset log: " << a[0] << " reset" << endl;
+    cout << "Get log content: " << a[0] << " get" << endl;
+    return 1;
+  }
+
+  if (! strcmp (a[1], "on") && n == 2)
+  {
+    di.SetDoLog (Standard_True);
+//    di.Log() << "dlog on" << endl; // for symmetry
+  }
+  else if (! strcmp (a[1], "off") && n == 2)
+  {
+    di.SetDoLog (Standard_False);
+  }
+  else if (! strcmp (a[1], "reset") && n == 2)
+  {
+    di.Log().str("");
+  }
+  else if (! strcmp (a[1], "get") && n == 2)
+  {
+    di << di.Log().str().c_str();
+  }
+  else if (! strcmp (a[1], "add") && n == 3)
+  {
+    di.Log() << a[2] << "\n";
+  }
+  else {
+    cout << "Unrecognized option(s): " << a[1] << endl;
+    return 1;
+  }
+  return 0;
+}
+
+static Standard_Integer decho(Draw_Interpretor& di, Standard_Integer n, const char** a)
+{
+  if (n != 2)
+  {
+    cout << "Enable or disable echoing: " << a[0] << " {on|off}" << endl;
+    return 1;
+  }
+
+  if (! strcmp (a[1], "on"))
+  {
+    di.SetDoEcho (Standard_True);
+  }
+  else if (! strcmp (a[1], "off"))
+  {
+    di.SetDoEcho (Standard_False);
+  }
+  else {
+    cout << "Unrecognized option: " << a[1] << endl;
+    return 1;
+  }
+  return 0;
+}
+
 //=======================================================================
 //function : wait
 //purpose  : 
@@ -479,6 +540,8 @@ void Draw::BasicCommands(Draw_Interpretor& theCommands)
   if (Done) return;
   Done = Standard_True;
 
+  ios::sync_with_stdio();
+
   const char* g = "DRAW General Commands";
   
   theCommands.Add("batch", "returns 1 in batch mode",
@@ -500,4 +563,11 @@ void Draw::BasicCommands(Draw_Interpretor& theCommands)
     "meminfo [virt|v] [wset|w] [wsetpeak] [swap] [swappeak] [private]"
     " : memory counters for this process",
 	  __FILE__, dmeminfo, g);
+
+  // Logging commands; note that their names are hard-coded in the code 
+  // of Draw_Interpretor, thus should not be changed without update of that code!
+  theCommands.Add("dlog", "manage logging of commands and output; run without args to get help",
+		  __FILE__,dlog,g);
+  theCommands.Add("decho", "switch on / off echo of commands to cout; run without args to get help",
+		  __FILE__,decho,g);
 }
diff --git a/src/Draw/Draw_Interpretor.cdl b/src/Draw/Draw_Interpretor.cdl
index fc87d47..5c563d1 100644
--- a/src/Draw/Draw_Interpretor.cdl
+++ b/src/Draw/Draw_Interpretor.cdl
@@ -27,6 +27,7 @@ class Interpretor from Draw
 
 uses
 
+        SStream         from Standard,
 	PInterp         from Draw,
 	CommandFunction from Draw,
 	AsciiString     from TCollection,
@@ -143,10 +144,37 @@ is
     Set(me : in out; anInterp : PInterp from Draw);
     
     Interp (me) returns PInterp from Draw;
+
+    SetDoLog (me: in out; doLog: Boolean);
+    ---Purpose: Enables or disables logging of all commands and their
+    -- results
+    ---Level: Advanced
+
+    SetDoEcho (me: in out; doEcho: Boolean);
+    ---Purpose: Enables or disables eachoing of all commands and their
+    -- results to cout
+    ---Level: Advanced
+
+    GetDoLog (me) returns Boolean;
+    ---Purpose: Returns true if logging of commands is enabled
+    ---Level: Advanced
+
+    GetDoEcho (me) returns Boolean;
+    ---Purpose: Returns true if echoing of commands is enabled
+    ---Level: Advanced
+
+    Log (me: in out) returns SStream;
+    ---Purpose: Returns log stream
+    ---Level: Advanced
+    ---C++: return &
 	
  fields
  
     isAllocated : Boolean from Standard;
     myInterp    : PInterp from Draw;
 
+    myDoLog: Boolean;
+    myDoEcho: Boolean;
+    myLog: SStream from Standard;
+
 end Interpretor;
diff --git a/src/Draw/Draw_Interpretor.cxx b/src/Draw/Draw_Interpretor.cxx
index e8f9ff3..2fc151c 100644
--- a/src/Draw/Draw_Interpretor.cxx
+++ b/src/Draw/Draw_Interpretor.cxx
@@ -29,11 +29,26 @@
 
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
+#include <OSD_Path.hxx>
 
 #include <string.h>
-
 #include <tcl.h>
 
+// for capturing of cout and cerr (dup(), dup2())
+#ifdef _MSC_VER
+#include <io.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if ! defined(STDOUT_FILENO)
+#define STDOUT_FILENO fileno(stdout)
+#endif
+#if ! defined(STDERR_FILENO)
+#define STDERR_FILENO fileno(stderr)
+#endif
+
 #include <stdio.h>
 
 #if ((TCL_MAJOR_VERSION > 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 1)))
@@ -89,6 +104,66 @@ struct CData {
   Draw_Interpretor*    i;
 };
 
+// logging helpers
+namespace {
+  void dumpArgs (Standard_OStream& os, int argc, const char *argv[])
+  {
+    for (int i=0; i < argc; i++)
+      os << argv[i] << " ";
+    os << endl;
+  }
+
+  void flush_standard_streams ()
+  {
+    fflush (stderr);
+    fflush (stdout);
+    cerr << flush;
+    cout << flush;
+  }
+
+  FILE* capture_start (int std_fd, int *save_fd)
+  {
+    (*save_fd) = 0;
+
+    // open temporary files
+    FILE * aTmpFile = tmpfile();
+    int fd_tmp = fileno(aTmpFile);
+
+    if (fd_tmp <0) 
+    {
+      cerr << "Error: cannot create temporary file for capturing console output" << endl;
+      fclose (aTmpFile);
+      return NULL;
+    }
+
+    // remember current file descriptors of standard stream, and replace it by temporary
+    (*save_fd) = dup(std_fd);
+    dup2(fd_tmp, std_fd);
+    return aTmpFile;
+  }
+
+  void capture_end (FILE* tmp_file, int std_fd, int save_fd, Standard_OStream &log, Standard_Boolean doEcho)
+  {
+    // restore normal descriptors of console stream
+    dup2 (save_fd, std_fd);
+    close(save_fd);
+
+    // extract all output and copy it to log and optionally to cout
+    const int BUFSIZE = 2048;
+    char buf[BUFSIZE];
+    rewind(tmp_file);
+    while (fgets (buf, BUFSIZE, tmp_file) != NULL)
+    {
+      log << buf;
+      if (doEcho) 
+        cout << buf;
+    }
+
+    // close temporary file
+    fclose (tmp_file);
+  }
+};
+
 // MKV 29.03.05
 #if ((TCL_MAJOR_VERSION > 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4))) && !defined(USE_NON_CONST)
 static Standard_Integer CommandCmd 
@@ -103,14 +178,39 @@ static Standard_Integer CommandCmd
   static Standard_Integer code;
   code = TCL_OK;
   CData* C = (CData*) clientData;
+  Draw_Interpretor& di = *(C->i);
+
+  // log command execution, except commands manipulating log itself and echo
+  Standard_Boolean isLogManipulation = (strcmp (argv[0], "dlog") == 0 || 
+                                        strcmp (argv[0], "decho") == 0);
+  Standard_Boolean doLog  = (di.GetDoLog() && ! isLogManipulation);
+  Standard_Boolean doEcho = (di.GetDoEcho() && ! isLogManipulation);
+  if (doLog)
+    dumpArgs (di.Log(), argc, argv);
+  if (doEcho)
+    dumpArgs (cout, argc, argv);
+
+  // flush cerr and cout
+  flush_standard_streams();
+
+  // capture cout and cerr to log
+  FILE * aFile_err = NULL;
+  FILE * aFile_out = NULL;
+  int fd_err_save = 0;
+  int fd_out_save = 0;
+  if (doLog)
+  {
+    aFile_out = capture_start (STDOUT_FILENO, &fd_out_save);
+    aFile_err = capture_start (STDERR_FILENO, &fd_err_save);
+  }
 
+  // run command
   try {
     OCC_CATCH_SIGNALS
 
     // OCC63: Convert strings from UTF-8 to local encoding, normally expected by OCC commands
     TclUTFToLocalStringSentry anArgs ( argc, (const char**)argv );
       
-    Draw_Interpretor& di = *(C->i);
     Standard_Integer fres = C->f ( di, argc, anArgs.GetArgv() );
     if (fres != 0) 
       code = TCL_ERROR;
@@ -149,7 +249,33 @@ static Standard_Integer CommandCmd
 #endif    
     code = TCL_ERROR;
   }
-  
+
+  // flush streams
+  flush_standard_streams();
+
+  // end capturing cout and cerr 
+  if (doLog) 
+  {
+    capture_end (aFile_err, STDERR_FILENO, fd_err_save, di.Log(), doEcho);
+    capture_end (aFile_out, STDOUT_FILENO, fd_out_save, di.Log(), doEcho);
+  }
+
+  // log command result
+  const char* aResultStr = NULL;
+  if (doLog)
+  {
+    aResultStr = Tcl_GetStringResult (interp);
+    if (aResultStr != 0 && aResultStr[0] != '\0' )
+      di.Log() << Tcl_GetStringResult (interp) << endl;
+  }
+  if (doEcho)
+  {
+    if (aResultStr == NULL)
+      aResultStr = Tcl_GetStringResult (interp);
+    if (aResultStr != 0 && aResultStr[0] != '\0' )
+      cout << Tcl_GetStringResult (interp) << endl;
+  }
+
   return code;
 }
 
@@ -166,7 +292,7 @@ static void CommandDelete (ClientData clientData)
 //=======================================================================
 
 Draw_Interpretor::Draw_Interpretor() :
-  isAllocated(Standard_False)
+  isAllocated(Standard_False), myDoLog(Standard_False), myDoEcho(Standard_False)
 {
 // The tcl interpreter is not created immediately as it is kept 
 // by a global variable and created and deleted before the main().
@@ -193,7 +319,9 @@ void Draw_Interpretor::Init()
 
 Draw_Interpretor::Draw_Interpretor(const Draw_PInterp& p) :
   isAllocated(Standard_False),
-  myInterp(p)
+  myInterp(p),
+  myDoLog(Standard_False),
+  myDoEcho(Standard_False)
 {
 }
 
@@ -250,36 +378,23 @@ void Draw_Interpretor::Add(const Standard_CString n,
   if (myInterp==NULL) Init();
 
   CData* C = new CData(f,this);
-  Standard_Integer length, num_slashes,  ii,  jj,  kk;
   Tcl_CreateCommand(myInterp,pN,CommandCmd, (ClientData) C, CommandDelete);
 
   // add the help
   Tcl_SetVar2(myInterp,"Draw_Helps",pN,pHelp,TCL_GLOBAL_ONLY);
   Tcl_SetVar2(myInterp,"Draw_Groups",pGroup,pN,
 	      TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT);
-  length = strlen(pFileName) ;
-  char * a_string = 
-    new char[length + 1] ;
-  jj = 0 ;
-  num_slashes = 0 ;
-  ii = length ;
-  while (num_slashes < 3 && ii >= 0) {
-    if (file_name[ii] == '/') {
-      num_slashes += 1 ;
-    }
-    ii -= 1 ; 
-  } 
-  jj = 0 ;
-  for (kk = ii+2 , jj =0 ; kk < length ; kk++) {
-     a_string[jj] = file_name[kk] ;
-     jj += 1 ;
-   }
-  a_string[jj] = '\0' ;
- 
-  Tcl_SetVar2(myInterp,"Draw_Files",pN,a_string,TCL_GLOBAL_ONLY);
-
-  delete [] a_string;
 
+  // add path to source file (keep not more than two last subdirectories)
+  OSD_Path aPath (pFileName);
+  Standard_Integer nbTrek = aPath.TrekLength();
+  for (Standard_Integer i = 2; i < nbTrek; i++)
+    aPath.RemoveATrek (1);
+  aPath.SetDisk("");
+  aPath.SetNode("");
+  TCollection_AsciiString aSrcPath;
+  aPath.SystemName (aSrcPath);
+  Tcl_SetVar2(myInterp,"Draw_Files",pN,aSrcPath.ToCString(),TCL_GLOBAL_ONLY);
 }
 
 
@@ -537,3 +652,33 @@ void Draw_Interpretor::Set(const Draw_PInterp& PIntrp)
   isAllocated = Standard_False;
   myInterp = PIntrp;
 }
+
+//=======================================================================
+//function : Logging
+//purpose  : 
+//=======================================================================
+
+void Draw_Interpretor::SetDoLog (Standard_Boolean doLog)
+{
+  myDoLog = doLog;
+}
+
+void Draw_Interpretor::SetDoEcho (Standard_Boolean doEcho)
+{
+  myDoEcho = doEcho;
+}
+
+Standard_Boolean Draw_Interpretor::GetDoLog () const
+{
+  return myDoLog;
+}
+
+Standard_Boolean Draw_Interpretor::GetDoEcho () const
+{
+  return myDoEcho;
+}
+
+Standard_SStream& Draw_Interpretor::Log ()
+{
+  return myLog;
+}
diff --git a/src/Draw/Draw_Main.cxx b/src/Draw/Draw_Main.cxx
index c42126c..d6eeb09 100644
--- a/src/Draw/Draw_Main.cxx
+++ b/src/Draw/Draw_Main.cxx
@@ -86,7 +86,7 @@ static char* ColorNames[MAXCOLOR] = {
 static   Standard_Boolean XLoop;
 
 // extern Standard_IMPORT Standard_Boolean Draw_Interprete(char* command); //for C21
-Standard_IMPORT Standard_Boolean Draw_Interprete(char* command); //for C30
+Standard_IMPORT Standard_Boolean Draw_Interprete(const char* command); //for C30
 // true if complete command
 
 // necessary for WNT in C21 only
diff --git a/src/Draw/Draw_VariableCommands.cxx b/src/Draw/Draw_VariableCommands.cxx
index 295790d..479da5b 100644
--- a/src/Draw/Draw_VariableCommands.cxx
+++ b/src/Draw/Draw_VariableCommands.cxx
@@ -55,6 +55,7 @@ extern Draw_Viewer dout;
 #include <tcl.h>
 #include <errno.h>
 
+#include <OSD_Environment.hxx>
 
 Standard_Boolean Draw_ParseFailed;
 
@@ -593,6 +594,46 @@ static Standard_Integer set(Draw_Interpretor& di, Standard_Integer n, const char
 }
 
 //=======================================================================
+//function : dsetenv
+//purpose  : 
+//=======================================================================
+
+static Standard_Integer dsetenv(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
+{
+  if (argc < 2) {
+    cout << "Use: " << argv[0] << " {varname} [value]" << endl;
+    return 1;
+  }
+
+  OSD_Environment env (argv[1]);
+  if (argc > 2 && argv[2][0] != '\0')
+  {
+    env.SetValue (argv[2]);
+    env.Build();
+  }
+  else
+    env.Remove();
+  return env.Failed();
+}
+
+//=======================================================================
+//function : dgetenv
+//purpose  : 
+//=======================================================================
+
+static Standard_Integer dgetenv(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
+{
+  if (argc < 2) {
+    cout << "Use: " << argv[0] << " {varname}" << endl;
+    return 1;
+  }
+
+  const char* val = getenv (argv[1]);
+  di << ( val ? val : "" );
+  return 0;
+}
+
+//=======================================================================
 //function : isdraw
 //purpose  : 
 //=======================================================================
@@ -996,7 +1037,7 @@ static Standard_Real ParseValue(char*& name)
 	  // count arguments
 	  Standard_Integer argc = 1;
 	  char* q = p;
-	  while ((*q == ' ') && (*q == '\t')) q++;
+	  while ((*q == ' ') || (*q == '\t')) q++;
 	  if (*q == '(') {
 	    Standard_Integer pc = 1;
 	    argc = 2;
@@ -1270,6 +1311,10 @@ void  Draw::VariableCommands(Draw_Interpretor& theCommands)
   theCommands.Add("renamevar","renamevar name1 toname1 name2 toname2 ...",__FILE__,copy,g);
   theCommands.Add("dset","var1 value1 vr2 value2 ...",__FILE__,set,g);
 
+  // commands to access C environment variables; see Mantis issue #23197
+  theCommands.Add("dgetenv","var : get value of environment variable in C subsystem",__FILE__,dgetenv,g);
+  theCommands.Add("dsetenv","var [value] : set (unset if value is empty) environment variable in C subsystem",__FILE__,dsetenv,g);
+
   theCommands.Add("pick","pick id X Y Z b [nowait]",__FILE__,pick,g);
   theCommands.Add("lastrep","lastrep id X Y [Z] b, return name",__FILE__,lastrep,g);
 
diff --git a/src/Draw/Draw_Window.cxx b/src/Draw/Draw_Window.cxx
index 8a26b43..181f3d3 100644
--- a/src/Draw/Draw_Window.cxx
+++ b/src/Draw/Draw_Window.cxx
@@ -34,7 +34,7 @@
 #include <Draw_Interpretor.hxx>
 #include <Draw_Appli.hxx>
 #include <TCollection_AsciiString.hxx>
-#include <Image_PixMap.hxx>
+#include <Image_AlienPixMap.hxx>
 
 #include <stdio.h>
 
@@ -181,7 +181,6 @@ Display*         Draw_WindowDisplay = NULL;
 Standard_Integer Draw_WindowScreen = 0;
 Colormap         Draw_WindowColorMap;
 Standard_Boolean Draw_BlackBackGround = Standard_True;
-Standard_Boolean Draw_LowWindows = Standard_False;
 
 
 // Initialization of static variables of Draw_Window
@@ -573,13 +572,6 @@ void Draw_Window::DisplayWindow()
   {
     return;
   }
-  else if (Draw_LowWindows)
-  {
-    // the window <win> will be displayed so that not to be hidden
-    // by any other window (on top)
-    XMapWindow(Draw_WindowDisplay, win);
-    XLowerWindow(Draw_WindowDisplay, win);
-  }
   else
   {
     XMapRaised(Draw_WindowDisplay, win);
@@ -726,38 +718,43 @@ Standard_Boolean Draw_Window::Save (const char* theFileName) const
     }
   }
 
-  // find the image
-  XImage* pximage = XGetImage (Draw_WindowDisplay, GetDrawable(),
-                               0, 0, winAttr.width, winAttr.height,
-                               AllPlanes, ZPixmap);
-  if (pximage == NULL)
+  XVisualInfo aVInfo;
+  if (XMatchVisualInfo (Draw_WindowDisplay, Draw_WindowScreen, 32, TrueColor, &aVInfo) == 0
+   && XMatchVisualInfo (Draw_WindowDisplay, Draw_WindowScreen, 24, TrueColor, &aVInfo) == 0)
   {
+    std::cerr << "24-bit TrueColor visual is not supported by server!\n";
     return Standard_False;
   }
 
-  if (winAttr.visual->c_class == TrueColor)
+  Image_AlienPixMap anImage;
+  bool isBigEndian = Image_PixMap::IsBigEndianHost();
+  const Standard_Size aSizeRowBytes = Standard_Size(winAttr.width) * 4;
+  if (!anImage.InitTrash (isBigEndian ? Image_PixMap::ImgRGB32 : Image_PixMap::ImgBGR32,
+                          Standard_Size(winAttr.width), Standard_Size(winAttr.height), aSizeRowBytes))
   {
-    Standard_Byte* aDataPtr = (Standard_Byte* )pximage->data;
-    Handle(Image_PixMap) anImagePixMap = new Image_PixMap (aDataPtr,
-                                                           pximage->width, pximage->height,
-                                                           pximage->bytes_per_line,
-                                                           pximage->bits_per_pixel,
-                                                           Standard_True);
-    // destroy the image
-    XDestroyImage (pximage);
-
-    // save the image
-    return anImagePixMap->Dump (theFileName);
+    return Standard_False;
   }
-  else
+  anImage.SetTopDown (true);
+
+  XImage* anXImage = XCreateImage (Draw_WindowDisplay, aVInfo.visual,
+                                   32, ZPixmap, 0, (char* )anImage.ChangeData(), winAttr.width, winAttr.height, 32, int(aSizeRowBytes));
+  anXImage->bitmap_bit_order = anXImage->byte_order = (isBigEndian ? MSBFirst : LSBFirst);
+  if (XGetSubImage (Draw_WindowDisplay, GetDrawable(),
+                    0, 0, winAttr.width, winAttr.height,
+                    AllPlanes, ZPixmap, anXImage, 0, 0) == NULL)
   {
-    std::cerr << "Visual Type not supported!";
-    // destroy the image
-    XDestroyImage (pximage);
+    anXImage->data = NULL;
+    XDestroyImage (anXImage);
     return Standard_False;
   }
-}
 
+  // destroy the image
+  anXImage->data = NULL;
+  XDestroyImage (anXImage);
+
+  // save the image
+  return anImage.Save (theFileName);
+}
 
 //=======================================================================
 //function : ProcessEvent
@@ -948,9 +945,9 @@ static void ProcessEvents(ClientData,int)
 //======================================================
 
 
-static Standard_Boolean(*Interprete) (char*);
+static Standard_Boolean(*Interprete) (const char*);
 
-void Run_Appli(Standard_Boolean (*interprete) (char*))
+void Run_Appli(Standard_Boolean (*interprete) (const char*))
 {
   Tcl_Channel outChannel, inChannel ;
   Interprete = interprete;
@@ -1705,63 +1702,44 @@ void DrawWindow::Clear()
 /*--------------------------------------------------------*\
 |  SaveBitmap
 \*--------------------------------------------------------*/
-static Standard_Boolean SaveBitmap (HBITMAP theHBitmap,
+static Standard_Boolean SaveBitmap (HBITMAP     theHBitmap,
                                     const char* theFileName)
 {
-  // Copy data from HBITMAP
+  // Get informations about the bitmap
   BITMAP aBitmap;
+  if (GetObject (theHBitmap, sizeof(BITMAP), (LPSTR )&aBitmap) == 0)
+  {
+    return Standard_False;
+  }
 
-  // Get informations about the bitmap
-  GetObject (theHBitmap, sizeof(BITMAP), (LPSTR )&aBitmap);
-  Standard_Integer aWidth  = aBitmap.bmWidth;
-  Standard_Integer aHeight = aBitmap.bmHeight;
+  Image_AlienPixMap anImage;
+  const Standard_Size aSizeRowBytes = Standard_Size(aBitmap.bmWidth) * 4;
+  if (!anImage.InitTrash (Image_PixMap::ImgBGR32, Standard_Size(aBitmap.bmWidth), Standard_Size(aBitmap.bmHeight), aSizeRowBytes))
+  {
+    return Standard_False;
+  }
+  anImage.SetTopDown (false);
 
   // Setup image data
   BITMAPINFOHEADER aBitmapInfo;
   memset (&aBitmapInfo, 0, sizeof(BITMAPINFOHEADER));
-  aBitmapInfo.biSize = sizeof(BITMAPINFOHEADER);
-  aBitmapInfo.biWidth = aWidth;
-  aBitmapInfo.biHeight = aHeight; // positive means bottom-up!
-  aBitmapInfo.biPlanes = 1;
-  aBitmapInfo.biBitCount = 32;
+  aBitmapInfo.biSize        = sizeof(BITMAPINFOHEADER);
+  aBitmapInfo.biWidth       = aBitmap.bmWidth;
+  aBitmapInfo.biHeight      = aBitmap.bmHeight; // positive means bottom-up!
+  aBitmapInfo.biPlanes      = 1;
+  aBitmapInfo.biBitCount    = 32; // use 32bit for automatic word-alignment per row
   aBitmapInfo.biCompression = BI_RGB;
 
-  Standard_Integer aBytesPerLine = aWidth * 4;
-  Standard_Byte* aDataPtr = new Standard_Byte[aBytesPerLine * aHeight];
-
   // Copy the pixels
   HDC aDC = GetDC (NULL);
-  Standard_Boolean isSuccess
-    = GetDIBits (aDC,             // handle to DC
-                 theHBitmap,      // handle to bitmap
-                 0,               // first scan line to set
-                 aHeight,         // number of scan lines to copy
-                 aDataPtr,        // array for bitmap bits
-                 (LPBITMAPINFO )&aBitmapInfo, // bitmap data info
-                 DIB_RGB_COLORS   // RGB
-                 ) != 0;
-
-  if (isSuccess)
-  {
-    Handle(Image_PixMap) anImagePixMap = new Image_PixMap (aDataPtr,
-                                                           aWidth, aHeight,
-                                                           aBytesPerLine,
-                                                           aBitmapInfo.biBitCount,
-                                                           Standard_False); // bottom-up!
-
-    // Release dump memory here
-    delete[] aDataPtr;
-
-    // save the image
-    anImagePixMap->Dump (theFileName);
-  }
-  else
-  {
-    // Release dump memory
-    delete[] aDataPtr;
-  }
+  Standard_Boolean isSuccess = GetDIBits (aDC, theHBitmap,
+                                          0,                           // first scan line to set
+                                          aBitmap.bmHeight,            // number of scan lines to copy
+                                          anImage.ChangeData(),        // array for bitmap bits
+                                          (LPBITMAPINFO )&aBitmapInfo, // bitmap data info
+                                          DIB_RGB_COLORS) != 0;
   ReleaseDC (NULL, aDC);
-  return isSuccess;
+  return isSuccess && anImage.Save (theFileName);
 }
 
 /*--------------------------------------------------------*\
@@ -2025,7 +2003,7 @@ Standard_Boolean Init_Appli(HINSTANCE hInst,
   return Standard_True;
 }
 
-Standard_Boolean Draw_Interprete (char*);
+Standard_Boolean Draw_Interprete (const char*);
 
 /*--------------------------------------------------------*\
 |  readStdinThreadFunc
diff --git a/src/Draw/MainWindow.cxx b/src/Draw/MainWindow.cxx
index 0c71af4..3c0f012 100644
--- a/src/Draw/MainWindow.cxx
+++ b/src/Draw/MainWindow.cxx
@@ -31,7 +31,7 @@
 #include <Draw_Window.hxx>
 #include <CommandWindow.h>
 
-Standard_Boolean Draw_Interprete(char* command); // Implemented in Draw.cxx
+Standard_Boolean Draw_Interprete(const char* command); // Implemented in Draw.cxx
 extern Standard_Boolean Draw_IsConsoleSubsystem;
 
 //extern "C" int  compat_unlink(const char *fname); // Implemente dans TCL
diff --git a/src/Draw/umake.ini b/src/Draw/umake.ini
index 0d462ad..2c44ec8 100644
--- a/src/Draw/umake.ini
+++ b/src/Draw/umake.ini
@@ -1,6 +1,6 @@
-#ifdef sun
-CMPLRS_CXX_OPT "-I/usr/openwin/include $CMPLRS_CXX_OPT"
-#endif
-#ifdef hp
-CMPLRS_CXX_OPT "-I/usr/include/X11R5 $CMPLRS_CXX_OPT"
-#endif
+#ifdef sun
+CMPLRS_CXX_OPT "-I/usr/openwin/include $CMPLRS_CXX_OPT"
+#endif
+#ifdef hp
+CMPLRS_CXX_OPT "-I/usr/include/X11R5 $CMPLRS_CXX_OPT"
+#endif
diff --git a/src/DrawResources/CURVES.tcl b/src/DrawResources/CURVES.tcl
index 0d99966..40b281e 100644
--- a/src/DrawResources/CURVES.tcl
+++ b/src/DrawResources/CURVES.tcl
@@ -15,6 +15,8 @@
 # purpose or non-infringement. Please see the License for the specific terms
 # and conditions governing the rights and limitations under the License.
 
+if { [info commands addmenu] == "" } { return }
+
 addmenu Curves "Line"    {
     dialbox line name l origin {0 0 0} direction {1 0 0}
 }
diff --git a/src/DrawResources/DRAW.info b/src/DrawResources/DRAW.info
index c354cfa..1bc6a73 100644
--- a/src/DrawResources/DRAW.info
+++ b/src/DrawResources/DRAW.info
@@ -1,6253 +1,6253 @@
-
-
-Node: Top,  Prev: ,  Next: ,  Up: (MODEL),
-
-
-This document is the reference manual for  the harness Draw, Draw is a
-command  interpreter based on TCL and  a graphical system used to test
-and demonstrate  CAS.CADE  modeling  libraries. In this   document are
-described the basics of the TCL command  language and Draw extensions,
-the commands to do geometry and the commands to do topology.
-
-
-
-* Menu:
-
-* Overview::
-* The command language::
-* Basic commands::
-* Geometry commands::
-* Topology commands::
-* Index::
-
-
-Node: Overview,  Prev: ,  Next: The command language,  Up: Top,
-
-
-Draw is a test and development harness for CAS.CADE. It is intended to
-provide a flexible and easy-to-use means  of testing and demonstrating
-the CAS.CADE modeling libraries.
-
-Draw can be  used interactively to  create, display and modify objects
-such as curves, surfaces and topological shapes.
-
-Scripts can be written to customize  Draw and perform tests. New types
-of objects  and new commands  can be  added  using the  C++ programing
-language.
-
-Draw is basically made up of 
-
-- a command interpreter based on the TCL command language
-
-- a 3d graphic viewer based on the X system
-
-- a basic set of commands covering scripts, variables and graphics
-
-- a set of geometric  commands, allowing to  create and modify  curves
-and surfaces  and  to use  CAS.CADE  geometry algorithms.  This set of
-commands is optional
-
-- a set of topological commands  to create and  modify BRep shapes and
-to use the CAS.CADE topology algorithms
-
-As a rule  there is an "official"  set  of commands for  each delivery
-unit  in   the modeling   libraries : GEOMETRY,    TOPOLOGY, ADVALGOS,
-GRAPHIC, PRESENTATION
-
-
-
-* Menu:
-
-* Contents of the documentation::
-* Getting started::
-
-
-Node: Contents of the documentation,  Prev: ,  Next: Getting started,  Up: Overview,
-
-
-This documentation describes 
-
-- the command language
-
-- the basic set of commands
-
-- the graphical commands
-
-- the geometry set of commands
-
-- the topology set of commands
-
-This document does  not describe the  other sets of commands  and does
-not explain how to extend Draw using C++.
-
-This document is mainly a  reference manual, it contains  descriptions
-of  commands, all  descriptions have the   same format which is  above
-illustrated with the exit command.
-
-
-
-* Menu:
-
-* exit::
-
-
-Node: exit,  Prev: ,  Next: ,  Up: Contents of the documentation,
-
-
-SYNOPSIS
-
-
-	exit
-
-
-PURPOSE
-
-
-Terminates the Draw, TCL session. If the commands are read from a file
-using the source command this will terminante reading from the file.
-
-
-EXAMPLE
-
-
-	# this is a very short example
-	exit
-
-
-SEE ALSO
-
-
-source
-
-
-Node: Getting started,  Prev: Contents of the documentation,  Next: ,  Up: Overview,
-
-
-We will now try a simple example. The first thing  to do is to setup a
-Draw executable,  check if the DRAW and  TCL  ULs are visible  in your
-workbench with the wok command "ulinuse". If  DRAW does not appear you
-should check with your workshop manager to install DRAW and TCL.
-
-We will now suppose that you have a DRAW version, at least DRAW-7 (use
-"ulinuse -v" to check so).   You must now find  an executable.  Let us
-try TGEOMETRY.    Just type  TGEOMETRY,  if  you do  not get  a prompt
-"Draw[1]> " you must create an executable by  linking the program from
-the  source example  TestDraw.cxx which   can  be  found  in the   src
-directory of the UL.
-
-Draw displays prompt and waits for commands,  here is a sample session
-:
-
-
-EXAMPLE
-
-
-# create Two views 2d and axonometric 
-Draw[1]> av2d				
-# create a 2d circle
-Draw[2]> circle c 0 0 1 0 5
-Draw[3]> 2dfit
-
-# trim the circle and dump it
-Draw[4]> trim c c 0 pi/2
-Draw[5]> dump c
-
-
-0*********** Dump of c *************
-Trimmed curve
-Parameters : 0 1.5707963267949
-Basis curve :
-Circle
-  Center :0, 0 
-  XAxis  :1, 0 
-  YAxis  :-0, 1 
-  Radius :5
-
-# make a 3d circle from it, and turn it into a bspline
-
-Draw[6]> to3d c c
-Draw[7]> fit
-Draw[8]> convert c c
-Draw[9]> dump c
-
-
-0*********** Dump of c *************
-BSplineCurve rational
-  Degree 2, 3 Poles, 2  Knots
-Poles :
-
-   1 : 5, 0, 0  1
-   2 : 5, 5, 0  0.707106781186548
-   3 : 3.06161699786838e-16, 5, 0  1
-Knots :
-
-   1 :  0 3
-   2 :  1.5707963267949 3
-
-
-EXAMPLE
-
-
-# make a surface of revolution from the spline
-Draw[10]> fit
-Draw[11]> help rev
-reverse         : reverse name ... 
-revsurf         : revsurf name curvename x y z dx dy dz
-
-# here you must click on the curve with the mouse
-Draw[12]> revsurf s . 5 5 0 -1 1 0
-Pick an object
-Draw[13]> fit
-
-# rotate the view
-Draw[14]> u
-Draw[15]> erase c
-c 
-
-# make a bspline surface and intersect with a plane
-Draw[20]> convert s s
-Draw[21]> fit
-Draw[22]> plane p 5 5 5 1 1 1 1 0 0
-Draw[23]> intersect c p s
-
-# pick on one of the intersection curves
-# you may get c_2 onstead of c_1
-Draw[24]> whatis .
-Pick an object
-c_1 is a  a 3d curve
-Draw[25]> clear
-Draw[27]> rename c_1 c
-Draw[28]> fit
-
-# save the curve, use any directory where you can write
-Draw[29]> datadir $env(WBCONTAINER)/data/default
-/adv_20/BAG/data/default
-Draw[30]> save c curveinter
-c
-Draw[31]> exit
-
-
-In  this example  some geometrical   operations have been   performed,
-objects have been displayed and wrote to files.
-
-
-
-Node: The command language,  Prev: Overview,  Next: Basic commands,  Up: Top,
-
-
-The command language used in Draw is the  TCL command language.  It is
-highly recommended, if you want to use  Draw extensively, to read some
-TCL documentation like "TCL and the  TK Toolkit" by John K. Ousterhout
-(Addison-Wesley).
-
-The following section  is a short outline  of the TCL language and its
-extensions incorporated in Draw. The following topics will be covered.
-
-- syntax of the TCL language
-
-- accessing variables in TCL and Draw
-
-- control structures
-
-- procedures
-
-
-
-* Menu:
-
-* Syntax of TCL::
-* Accessing variables in TCL and Draw::
-* lists::
-* Control Structures::
-* Procedures::
-
-
-Node: Syntax of TCL,  Prev: ,  Next: Accessing variables in TCL and Draw,  Up: The command language,
-
-
-TCL  is an interpreted command    language,  it is  not a   structured
-language like C, Pascal,  LISP or Basic, it is  rather a line oriented
-language like a shell  (csh for example).  However you will  find that
-TCL   is  easier to  use  than  shell  because  control structures and
-procedure are easier to define. TCL is  also faster than shell because
-it does not fork a process for each command.
-
-The  basic program for TCL  is a script. A  script consists  of one or
-more commands. Commands are separated by newlines or semicolons.
-
-
-EXAMPLE
-
-	set a 24
-	set b 15
-	set a 25; set b 15
-
-
-Each command consists of one or more words, the first word is the name
-of a command  and  additional words are  arguments  for that  command.
-Words are separated by spaces  or tabs. In  the preceding example each
-command has three words. There may be any number of words in a command
-and each word is a string of arbitrary length.
-
-The  evaluation of a  command by TCL  follows two steps.  In the first
-step  the    command  is  parsed  and  broken  into   words  and  some
-substitutions are performed. In the  second step the command procedure
-corresponding to  the first  word is called  with  the other words  as
-arguments. In  the first   step there  is only   string  manipulation,
-meaning is given to  the words only in the  second step by the command
-procedure.
-
-The following substitutions are performed by TCL
-
-- Variable substitution is triggered by the $ character (as with csh),
-the content of the variable is substituted,  {} may be  used as in csh
-to enclose the name of the variable.
-
-
-EXAMPLE
-
-
-	# set a variable value
-	set file documentation
-
-	# a simple substitution, set psfile to documentation.ps
-	set psfile $file.ps
-
-	# another substitution, set pfile to documentationPS
-	set pfile ${file}PS
-
-	# a last one, 
-	# delete files NEWdocumentation and OLDdocumentation
-	foreach prefix {NEW OLD} {rm $prefix$file}
-
-
-- Command substitution is triggered by the [] characters. The brackets
-must enclose a valid script, this scrit is evaluated and the result is
-substituted. This is similar to the `command` construction in csh.
-
-
-EXAMPLE
-
-
-	set degree 30
-	set pi 3.14159265
-
-	# expr is a command evaluating a numeric expression
-	set radian [expr $pi*$degree/180]
-
-
-- Backslash substitution is  triggered by the backslash character.  It
-is  used  to  insert special characters  like  :   $,[,].  A backslash
-terminated line is continued on the following line.
-
-TCL   uses two  forms of  quoting   to prevent  substitution and  word
-breaking.
-
-- Double quote quoting enables to define  a string with space and tabs
-as a single word, substitutions are still performed inside the "".
-
-
-EXAMPLE
-
-
-	# set msg to "the price is 12.00$"
-	set price "\$ 12.00"
-	set msg "the price is $price"
-
-
--  Braces  quoting prevent all    the  substitutions. Braces are  also
-nested. The  main use of braces is  to defer evaluation  when defining
-procedures and control structures. Braces are useful to present nicely
-TCL scripts on multiple lines.
-
-
-EXAMPLE
-
-
-	set x 0
-
-	# this will loop for ever 
-	# because while argument is "0 < 3"
-	while "$x < 3" {set x [expr $x+1]}
-
-	# this will terminate as expected because
-	# while argument is {$x < 3}
-	while {$x < 3} {set x [expr $x+1]}
-
-	# this can be written also
-	while {$x < 3} {
-	   set x [expr $x+1]
-	}
-
-	# the following cannot be written
-	# because while requires two arguments
-	while {$x < 3} 
-	{
-	   set x [expr $x+1]
-	}
-
-
-Comments start with a # character as the first  non blank character in
-a command. If  you want to comment at  the end  of  the line you  must
-precede the comment by semi-colon to end the preceding command.
-
-
-EXAMPLE
-
-
-	# This is a comment
-	set a 1 # this is not a comment
-
-	set b 1; # this is a comment
-
-
-Last  but not least thing  to know  about parsing in   TCL is that the
-number of  words is  never changed  by  substitution.  For example the
-result  of a substitution is always  a single word.  This is different
-than csh but it  is very convenient  as the behavior  of the parser is
-more predictable.  Sometimes it  may be necessary  to enforce a second
-round  of evaluation to  reparse, the  eval command  is useful to that
-purpose. This command  concatenates  all its arguments   and evaluates
-this script.
-
-
-EXAMPLE
-
-
-	# I want to delete two files
-	set files "foo bar"
-
-	# this will fail because rm will receive only one argument
-	# and complain that "foo bar" does not exists
-	exec rm $files
-
-	# a second evaluation will do it
-	eval exec rm $files
-
-
-Node: Accessing variables in TCL and Draw,  Prev: Syntax of TCL,  Next: lists,  Up: The command language,
-
-
-TCL variables have only string  values. Note that even numeric  values
-are stored as  string literals and computations  with the expr command
-start by parsing the strings. This approach is not sufficient for Draw
-where  variables  with other kinds   of values are  necessary, such as
-curves, surfaces or topological shapes.
-
-Fortunately  TCL provides a mechanism  to link user data to variables,
-this mechanism is used  with Draw.  Draw  variables are TCL  variables
-with associated data.    The   string value  of  a Draw    variable is
-meaningless, it is usually set to the name  of the variable itself, so
-preceding  a  Draw variable with  a $  do not  change  the result of a
-command.  The content of a  Draw variable is accessed with appropriate
-commands. There are many kinds of Draw variables,  and new ones may be
-added with  C++.  We  will  describe later geometric   and topological
-variables, for the moment we will only describe the numeric variables.
-
-Draw numeric variables  can be used within  an expression whereever  a
-Draw comand requires  a numeric value. The  expr command is useless in
-this  case. Those variables are not  stored as strings but as floating
-point values.
-
-
-EXAMPLE
-
-
-	# dset is used for numeric variables
-	# pi is a predefined Draw variable
-	
-	dset angle pi/3 radius 10
-	point p radius*cos(angle) radius*sin(angle) 0
-
-
-At the beginning the difference between  TCL and Draw variables may be
-confusing but you will be quickly used to it.  My advice is to use TCL
-variable only  for strings and to   use Draw for  numerics  as you can
-avoid the  expr command.  Usually for  geometry and topology  you will
-only need numbers no strings.
-
-
-
-* Menu:
-
-* set, unset::
-* dset, dval::
-
-
-Node: set, unset,  Prev: ,  Next: dset, dval,  Up: Accessing variables in TCL and Draw,
-
-
-SYNOPSIS
-
-
-	set varname [value]
-
-	unset varname [varname varname ...]
-
-
-PURPOSE
-
-
-Use the set command  to assign a string   value to a variable. If  the
-variable does not exist it is created.
-
-Without the   value argument the  command  returns the content  of the
-variable.
-
-Use the unset command  to destroy the variables. This  is is also used
-to destroy Draw variables.
-
-
-EXAMPLE
-
-
-	set a "Hello world"
-	set b "Goodbye"
-	set a
-	==> "Hello world"
-	unset a b
-	set a
-	==> Error message....
-
-
-WARNINGS
-
-
-The set command can set only one variable, unlike the dset command.
-
-
-SEE ALSO
-
-dset, dval
-
-
-Node: dset, dval,  Prev: set, unset,  Next: ,  Up: Accessing variables in TCL and Draw,
-
-
-SYNOPSIS
-
-
-	dset varname expression [varname expression ...]
-
-	dval expression
-
-
-
-PURPOSE
-
-
-Use the dset  command to assign values  to Draw numeric variables. The
-expression  may be   any numeric  expression  including  Draw  numeric
-variables, as any Draw command expecting a numeric expression there is
-no need for $ or expr. The dset command can  assign many variables, if
-there is an odd number of argument the last  variable will be assigned
-a value of 0. If the variable does not exist it will be created.
-
-Use dval  to evaluate an  expression containing Draw numeric variables
-and return the result as a string, including  a single variable.  This
-not useful for Draw commands as they usually interpret expression, but
-this is useful for TCL basic commands expecting strings.
-
-
-EXAMPLE
-
-
-	# z is set to 0
-	dset x 10 y 15 z
-	
-	# no $ required for Draw commands
-	point p x y z
-
-	# puts prints a string
-	puts "x = [dval x], cos(x/pi) = [dval cos(x/pi)]"
-
-
-WARNINGS
-
-
-In TCL parentheses are not considered as special characters, so do not
-forget to quote  an expression if it  contains spaces to avoid parsing
-different words.
-
-(a + b) is parsed as three words, "(a + b)" or (a+b) are correct.
-
-
-SEE ALSO
-
-set, unset
-
-
-Node: lists,  Prev: Accessing variables in TCL and Draw,  Next: Control Structures,  Up: The command language,
-
-
-TCL uses  lists a lot, a  list is  only  a string  containing elements
-separated by spaces or tabs. If  the string contains braces the braced
-part count for one element, this allows to put lists in lists.
-
-
-EXAMPLE
-
-
-	# a list of 3 strings
-	"a b c"
-
-	# a list of two strings the first is a list of 2
-	"{a b} c"
-
-
-Many TCL  commands return lists and  the foreach  command is an useful
-way to loop on list elements.
-
-
-Node: Control Structures,  Prev: lists,  Next: Procedures,  Up: The command language,
-
-
-TCL allows repetition of an  execution using control structures.   The
-control structures are implemented  with commands and their syntax  is
-very similar to their C  counterpart (if, while, switch,..). There are
-two   main differences  with  C. Do    not use parentheses  to enclose
-conditions but  braces, do not  start the script  on the  next line or
-your command will not have enough argument.
-
-
-
-
-* Menu:
-
-* if::
-* while, for, foreach::
-* break, continue::
-
-
-Node: if,  Prev: ,  Next: while, for, foreach,  Up: Control Structures,
-
-
-SYNOPSIS
-
-
-	if condition script [elseif script .... else script]
-
-
-PURPOSE
-
-
-If evaluate the condition and evaluate the script if the condition is
-true, and so on.
-
-
-EXAMPLE
-
-
-	# note the position of the braces
-	# even if you find it ugly, you must do it this way
-
-	if {$x > 0} { 
-		puts "positive"
-         } elseif {$x == 0} {
-		puts "null"
-         } else {
-		puts "negative"
-	 }
-
-
-Node: while, for, foreach,  Prev: if,  Next: break, continue,  Up: Control Structures,
-
-
-SYNOPSIS
-
-
-	while condition script
-
-	for init condition reinit script
-
-	foreach varname list script
-
-
-PURPOSE
-
-
-The three loop structures are similar to their C or csh equivalent. It
-is important to  use braces to delay  evaluation.  foreach will assign
-the elements of the list to the variable before evaluating the script.
-
-
-EXAMPLE
-
-
-	# while example
-	dset x 1.1
-	while {[dval x] < 100} {
-		circle c 0 0 x
-		dset x x*x
-	}
-
-	# for example
-	# incr var d, incremente une variable de d (defaut 1)
-	for {set i 0} {$i < 10} {incr i} {
-		dset angle $i*pi/10
-		point p$i cos(angle0 sin(angle) 0
-	}
-
-	# foreach example
-	foreach object {crapo tomson lucas} {display $object}
-
-
-
-SEE ALSO
-
-
-break, continue
-
-
-
-Node: break, continue,  Prev: while, for, foreach,  Next: ,  Up: Control Structures,
-
-
-SYNOPSIS
-
-
- 	break
-
- 	continue
-
-
-PURPOSE
-
-
-Within  loops  the, break and  continue commands  have the same effect
-than in  C. break interrupts the  innermost loop and continue steps to
-the next iteration.
-
-
-EXAMPLE
-
-
-	# search the index for which t$i has value "secret"
-	for {set i 1} {$i <= 100} {incr i} {
-		if {[set t$i] == "secret"} break;
-	}
-
-
-Node: Procedures,  Prev: Control Structures,  Next: ,  Up: The command language,
-
-
-TCL can be extended by defining procedures using the proc command. The
-proc commandsetup a  context of local  variables, binds  arguments and
-executes a TCL script.
-
-The only confusing point in procedures  is that variables are strictly
-local, and  as they  are   implicitly created  when  used it   may  be
-difficult to detect the errors.
-
-There  are  two means to  access a  variable outside  the scope of the
-current procedure.  The global command may be used to declare a global
-variable (a variable outside all procedures), the upvar command can be
-used to access a variable in the scope of the caller. In TCL arguments
-are always string  values, the only way to  pass Draw variables is  to
-pass by reference, i.e.   passing the name of  the variable  and using
-the upvar command as in the following examples.
-
-TCL is not a  strongly typed language, it  is  thus very difficult  to
-detect programming errors and debugging can be tedious, TCL procedures
-are not designed for large scale  software development but for testing
-and simple command or interactive writing.
-
-
-
-* Menu:
-
-* proc::
-* global, upvar::
-
-
-Node: proc,  Prev: ,  Next: global, upvar,  Up: Procedures,
-
-
-SYNOPSIS
-
-
-	proc arglist script
-
-
-PURPOSE
-
-
-Use  the proc command  to define a procedure, arglist   is the list of
-arguments, it  must be an  empty list  if there  are no  arguments. An
-argument  may have  a default value,  it  is then a  list  of the form
-{argument value}. The script is the body of the procedure.
-
-The return command is used to give a return value to the procedure.
-
-
-EXAMPLE
-
-
-	# simple procedure
-	proc hello {} {
-		puts "hello world"
-	}
-
-	# procedure with arguments and default values
-	proc distance {x1 y1 {x2 0} {y2 0}} {
-		set d [expr (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)]
-		return [expr sqrt(d)]
-	}
-
-	# we could not resist the classical one
-	proc fact n {
-		if {$n == 0} {return 1} else {
-			return [expr n*[fact [expr n -1]]]
-		}
-	}
-
-
-SEE ALSO
-
-
-global, upvar
-
-
-Node: global, upvar,  Prev: proc,  Next: ,  Up: Procedures,
-
-
-SYNOPSIS
-
-
-	global varname [varname ...]
-
-	upvar varname localname [varname localname ...]
-
-
-PURPOSE
-
-
-Use  the global  command to access   top level variables.  Unlike in C
-global variables are not visible in procedures.
-
-Use the upvar command to give a local name to a variable in the caller
-scope, this is when an argument is the name of a variable instead of a
-value, this  is call by  reference and it is the  only way to use Draw
-variables as arguments.
-
-Note in  the  following examples that   the $ is  always necessary  to
-access the arguments.
-
-
-EXAMPLE
-
-
-	# convert degree to radian
-	# pi is a global variable
-	proc deg2rad (degree} {
-		global pi
-		return [dval pi*$degree/180.]
-	}
-
-	# create line with a point and an angle
-	proc linang {linename x y angle} {
-		upvar linename l
-		line l $x $y cos($angle) sin($angle)
-        }
-		
-
-
-Node: Basic commands,  Prev: The command language,  Next: Geometry commands,  Up: Top,
-
-
-We  will now   describe all the  commands  defined  in  the basic Draw
-package. Some of the commands are  TCL commands, but  most of them are
-defined by Draw. Those commands are found in all Draw applications.
-
-The commands are grouped in four sections 
-
-- general commandsused for Draw and TCL management
-
-- variable commands used to manage Draw variables, storing, dumping ...
-
-- graphic commands used to manage the graphic system : views ...
-
-- variables display commands are used to manage the display of objects
-
-
-
-* Menu:
-
-* General commands::
-* Variables management commands::
-* Graphic Commands::
-* Variables display commands::
-
-
-Node: General commands,  Prev: ,  Next: Variables management commands,  Up: Basic commands,
-
-
-This section describes some  useful commands, help to get information,
-source to eval a script from a file, spy  to capture the commands in a
-file, cpulimit limit the  process cpu time,  wait to waste some  time,
-chrono to time commands.
-
-
-
-* Menu:
-
-* help::
-* source::
-* spy::
-* cpulimit::
-* wait::
-* chrono::
-
-
-Node: help,  Prev: ,  Next: source,  Up: General commands,
-
-
-SYNOPSIS
-
-
-	help [command [helpstring group]]
-
-
-PURPOSE
-
-
-Provides help or modifies the help information.
-
-help,  without arguments  list all groups    and the commands  in each
-group.
-
-help command, provides information on a command or  a set of commands,
-command  may be a   shell-like regular expression. * is  automatically
-added at the end so that all completing commands match.
-
-
-help command  helpstring group, defines  helpstring to be the help for
-command,  put the command in  the group. The   group defaults to "User
-commands".
-
-
-EXAMPLE
-
-
-# Gives help on all command starting with a
-help a
-
-# defines help for the help command
-help {help [command [helpstring group = "Use commands"]]} "DRAW Basic Commands"
-
-
-Node: source,  Prev: help,  Next: spy,  Up: General commands,
-
-
-SYNOPSIS
-
-
-	source file
-
-
-PURPOSE
-
-
-Reads and evaluates commands from a file.
-
-The exit command will terminate the file.
-
-
-SEE ALSO
-
-exit
-
-
-Node: spy,  Prev: source,  Next: cpulimit,  Up: General commands,
-
-
-SYNOPSIS
-
-
-	spy [file]
-
-
-PURPOSE
-
-
-Save interactive commands in the file.  If there is already spying the
-current file is closed.  spy without  argument closes the current file
-and  stops spying.
-
-If a command returns an error it is saved with a comment mark.
-
-The file created by spy can be played with the source command.
-
-
-EXAMPLE
-
-
-# from now all commands will be saved in the file "session"
-spy session
-
-# the file "session" is closed and commands are not saved
-spy
-
-
-SEE ALSO
-
-source
-
-
-Node: cpulimit,  Prev: spy,  Next: wait,  Up: General commands,
-
-
-SYNOPSIS
-
-
-	cpulimit [nbseconds]
-
-
-PURPOSE
-
-
-The process will be interrupted after nbseconds of cpu, this is useful
-during tests  to   avoid infinite loops.  cpulimit   without arguments
-removes all existing limits.
-
-
-EXAMPLE
-
-
-	#limit cpu to one hour
-	cpulimit 3600
-
-
-Node: wait,  Prev: cpulimit,  Next: chrono,  Up: General commands,
-
-
-SYNOPSIS
-
-
-	wait [nbseconds]
-
-
-PURPOSE
-
-
-Interrupt  execution   for nbseconds, the default    value is ten (10)
-seconds.  This is usefull in a  demo to give people   time to admire a
-nice picture.
-
-
-EXAMPLE
-
-
-	# You have ten seconds ...
-	wait 
-
-
-
-Node: chrono,  Prev: wait,  Next: ,  Up: General commands,
-
-
-SYNOPSIS
-
-
-	chrono [ name start/stop/reset/show]
-
-
-PURPOSE
-
-
-The chrono command  has two usages,  without arguments  it toggles the
-timing of commands. When chronometers  are activated each command will
-be timed, i.e. the cpu and user time of the command will be printed.
-
-With arguments the chrono  command is used  to manage chronometers,  a
-chronometer  is  a  special kind  of Draw    variable used to  measure
-time. The following action can be performed on a chronometer.
-
-- start : to run the chronometer.
-
-- stop : to stop the chronometer.
-
-- reset : to reset the chronometer to 0.
-
-- show : to display the current time.
-
-Chronometers  are  useful to print  partial  times as in the following
-example, the timing of the command foreach will only give you the time
-for all the process.
-
-
-EXAMPLE
-
-
-	# use of a chronometer
-	chrono swatch
-	foreach face {f1 f2 f3 f4 f5} {
-		chrono swatch reset
-		processface $face
-		chrono swatch stop
-		puts "$face is processed"
-		chrono swatch show
-	}
-
-
-Node: Variables management commands,  Prev: General commands,  Next: Graphic Commands,  Up: Basic commands,
-
-
-We describe now commands used to manage Draw variables. isdraw test if
-a variable  is a draw variable, directory  list draw variables, whatis
-gives the type of a  variable, dump prints  the content of a variable,
-rename and copy  change  the content  of variables,  datadir, save and
-restore are used to put the contents of variables in files.
-
-
-
-
-* Menu:
-
-* isdraw, directory::
-* whatis, dump::
-* rename, copy::
-* datadir, save, restore::
-
-
-Node: isdraw, directory,  Prev: ,  Next: whatis, dump,  Up: Variables management commands,
-
-
-SYNOPSIS
-
-
-	isdraw varname
-
-	directory [pattern]
-
-
-PURPOSE
-
-
-Use  isdraw to test  if  a variable is   a draw variable, isdraw  will
-return 1 if there is a Draw value attached to the variable.
-
-Use directory to return a list of all Draw global variables matching a
-pattern, like the shell ls command.
-
-
-EXAMPLE
-
-
-	set a 1
-	isdraw a
-	===> 0
-
-	dset a 1
-	isdraw a
-	===> 1
-
-	circle c 0 0 1 0 5
-	isdraw c
-	===> 1
-
-	# to destroy all Draw objects with name containing curve
-	foreach var [directory *curve*] {unset $var}
-
-
-SEE ALSO
-
-whatis
-
-
-Node: whatis, dump,  Prev: isdraw, directory,  Next: rename, copy,  Up: Variables management commands,
-
-
-SYNOPSIS
-
-
-	whatis varname [varname ...]
-
-	dump varname [varname ...]
-	
-
-PURPOSE
-
-
-Use  whatis to get  a  short information   about a Draw  variable, the
-result depends  on the type of the  object. Usually it  is the name of
-the type.
-
-Use dump to  get a long information about  a Draw variable, the result
-depends on the type of  the object. Usually it is  a full dump (may be
-rather long for geometry or topology).
-
-
-EXAMPLE
-
-
-	dset x 3
-	whatis x
-	==> x is a numeric
-
-	dump x
-	==> *********** Dump of x *************
-	==> 3
-
-
-WARNINGS
-
-
-The behavior of whatis on other variables (not Draw) is not excellent.
-
-
-Node: rename, copy,  Prev: whatis, dump,  Next: datadir, save, restore,  Up: Variables management commands,
-
-
-SYNOPSIS
-
-
-	rename varname tovarname  [varname tovarname ...]
-
-	copy varname tovarname  [varname tovarname ...]
-
-
-PURPOSE
-
-
-Use   rename to change   the name  of   a Draw variable, the  original
-variable  does not  exist  any  more, note   that the content  is  not
-modified, only the name is changed.
-
-Use  copy to make  a new variable   with a copy of   the content of an
-existing variable.   The exact behavior of copy  is type dependent, in
-some cases   the content may  still  be  shared (see  the  topological
-variables for example).
-
-
-EXAMPLE
-
-
-	circle c1 0 0 1 0 5
-	rename c1 c2
-
-	# curves are copied, c2 will not be modified
-	copy c2 c3
-	2dtranslate c3 10 0
-
-
-
-Node: datadir, save, restore,  Prev: rename, copy,  Next: ,  Up: Variables management commands,
-
-
-SYNOPSIS
-
-
-	datadir [data-path]
-
-	save name [filename]
-
-	restore filename [name]
-
-
-PURPOSE
-
-
-Use save  and restore to  transfert the  content  of Draw variables to
-files,  the files are located  in the  data directory.
-
-Use save to write a file  in the data directory  with the content of a
-variable, by default the name of the file is the name of the variable,
-to give a different name use a second argument.
-
-Use restore to read  the content of a file  in the data directory in a
-local variable, by default the name of the variable if the name of the
-file, to give a different name use a second argument.
-
-The exact  content of  the file is  type  dependent, they are  usually
-ASCII files, so they are architecture independnts.
-
-
-
-EXAMPLE
-
-
-	# note how TCL access shell environment variables
-	# using $env()
-	datadir $env(WBCONTAINER)/data/default
-	datadir
-	==> /adv_20/BAG/data/default
-
-	box b 10 20 30
-	save b theBox
-	
-	# when TCL does not find a command it tries a shell command
-	ls [datadir]
-	==> theBox
-
-	restore theBox
-	datadir ./bugs
-	datadir
-	==> /adv_20/BAG/data/bugs
-
-	# now the box is saved in both the default and data directories
-	save theBox
-
-
-
-Node: Graphic Commands,  Prev: Variables management commands,  Next: Variables display commands,  Up: Basic commands,
-
-
-Graphic  commands  are used to manage  the  Draw graphic system.  Draw
-provides a 2d and a 3d viewer with up to  30 views, views are numbered
-and    the index  of   the view  is  visible  in  the    title of  the
-window. Objects are  displayed  in all 2d views   or in  all  3d views
-depending on their type but never on both.
-
-The view  and delete commands  are the basic view management commands,
-but  useful procedures for screen layout  are defined, axo, left, top.
-
-Commands are provided  to modify the view  parameters, fit,  zoom, pu,
-pd, pl, pr to pan, u,d,l,r to rotate. fu, fd to change the focal.
-
-The  view parameters commands  process all views or  only one view, in
-this case the index of the view must be given as the first argument. A
-command  control 3d views or   2d views, the 2d  views  version of the
-command starts with 2d, for example zoom and 2dzoom.
-
-Colors are numbered from 1  to 15, the  aspect can be changed with the
-color command.
-
-To put some text on the screen use the dtext command.
-
-Postscript drawings  can  be made with  the hardcopy  command and  xwd
-files with the xwd command.
-
-To use the mouse you can use the pick and the wclick commands.
-
-
-
-
-* Menu:
-
-* view, delete::
-* axo, pers, top, ...::
-* mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
-* pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
-* fit, 2dfit::
-* u, d, l, r::
-* focal, fu, fd::
-* color::
-* dtext::
-* hardcopy, hcolor, xwd::
-* wclick, pick::
-
-
-Node: view, delete,  Prev: ,  Next: axo, pers, top, ...,  Up: Graphic Commands,
-
-
-SYNOPSIS
-
-
-	view index type [X Y W H]
-
-	delete [index]
-
-
-PURPOSE
-
-
-view is the basic view  creation command. It  creates a new view  with
-the given   index,  if a  view already   exits with  this index it  is
-destroyed. The view is created with default parameters and X Y W H are
-the  position and dimensions on  the window on the  screen, they are X
-window system coordinates in pixel, 0,0 being the upper left corner of
-the   screen.  Default values are 0,   0, 500, 500  which  is not very
-convenient.
-
-Usually it is far simpler to use the procedures as axo, top, left to
-create views.
-
-delete destroy a view, if no index is given all views are destroyed.
-
-The type is a four letter upper case code among the followings 
-
-- AXON	: Axonometric view
-
-- PERS  : Perspective view
-
-- +X+Y  : View on the two axes (i.e. a top view), other codes are
-	  -X+Y +Y-Z etc...
-
-- -2D- : 2d view
-
-The  index, the  type,  the current zoom are  displayed  in the window
-title.
-
-
-EXAMPLE
-
-
-	# this is the content of the mu4 procedure
-	proc mu4 {} {
-		delete
-		view 1 +X+Z 320 20 400 400
-		view 2 +X+Y 320 450 400 400
-		view 3 +Y+Z 728 20 400 400
-		view 4 AXON 728 450 400 400
-	}
-
-
-SEE ALSO
-
-
-axo, pers, top, bottom, left, right, front, back, mu4
-v2d, av2d, smallview
-
-
-Node: axo, pers, top, ...,  Prev: view, delete,  Next: mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom,  Up: Graphic Commands,
-
-
-SYNOPSIS
-
-
-	axo
-
-	pers
-
-	...
-
-	smallview type
-
-
-PURPOSE
-
-
-All these  commands  are  procedures used  to  define  standard screen
-layout, they delete all  existing views and   create some views.   The
-layout usually abides by the european convention, i.e. the top view is
-under the front view.
-
-- axo  : One big axonometric view
-
-- pers : One big perspective view
-
-- top, bottom, left, right, front, back : One big  axis view
-
--  mu4 : Four views layout with front, left, top and axo
-
-- v2d : One big 2d view
-
-- av2d : Two views, one 2d and one axo
-
-The smallview command creates a view at the right bottom of the screen
-with the given type. See the view command for the type list.
-
-
-
-EXAMPLE
-
-
-	# just try them !!
-
-	# here we give the body of smallview
-
-	proc smallview {{v AXON}} {
-		delete
-		view 1 $v 728 450 400 400
-	}
-
-
-SEE ALSO
-
-
-view, delete
-
-
-Node: mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom,  Prev: axo, pers, top, ...,  Next: pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr,  Up: Graphic Commands,
-
-
-SYNOPSIS
-
-
-	mu [index]
-
-	2dmu [index]
-
-	zoom [index] value
-
-	wzoom
-
-
-PURPOSE
-
-
-Use mu (magnify up) to increase the zoom in a view or  in all views by
-a factor of  10%. md (magnify down) decrease  the zoom by the  inverse
-factor. 2dmu and 2dmd do the same on one or all 2d views.
-
-Use zoom  or  2dzoom to set the   zoom  factor to  a given  value. The
-current zoom is always displayed in the window title.
-
-Use wzoom (window zoom) to select with the mouse the  area you want to
-zoom in a view. You will be prompted for two graphic selections in the
-same  view and the  rectangle you  defined will  be  set to the  whole
-window of the view.
-
-
-EXAMPLE
-
-
-	# set a zoom of 2.5 on all 2d views
-	zoom 2.5
-
-	# magnify on 
-	mu 1
-
-
-
-SEE ALSO
-
-
-fit, 2dfit
-
-
-Node: pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr,  Prev: mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom,  Next: fit, 2dfit,  Up: Graphic Commands,
-
-
-SYNOPSIS
-
-
-	pu [index]
-
-	pd [index]
-
-
-PURPOSE
-
-
-Use the pu, .. commands to pan the  view, pu and  pd pan vertically up
-and down,  pl and pr pan  horizontally left and   right. The views are
-panned by a quantity of 40 pixels.
-
-
-EXAMPLE
-
-
-	# pan up the first view
-	pu 1
-
-
-
-SEE ALSO
-
-fit, 2dfit
-
-
-Node: fit, 2dfit,  Prev: pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr,  Next: u, d, l, r,  Up: Graphic Commands,
-
-
-SYNOPSIS
-
-
-	fit [index]
-
-	2dfit [index]
-
-
-PURPOSE
-
-
-Use the fit command to compute automatically a best zoom and panning on
-the content of the view. The content of the view will be centered and
-fit the whole window.
-
-When fitting all views a unique zoom is computed for all the views, so
-each view is not  best fitted but all views  are on the same scale. To
-compute a best fit on all views fit them one by one.
-
-
-EXAMPLE
-
-
-	# fit only view 1
-	fit 1
-
-	# fit all 2d views
-	2dfit
-
-
-SEE ALSO
-
-zoom, mu, pu
-
-
-Node: u, d, l, r,  Prev: fit, 2dfit,  Next: focal, fu, fd,  Up: Graphic Commands,
-
-
-SYNOPSIS
-
-
-	u [index]
-
-	d [index]
-
-	l [index]
-
-	r [index]
-
-
-PURPOSE
-
-
-Rotate the view in the up, down, left or right direction  by five
-degrees. This is only for axonometric and perspective views.
-
-
-EXAMPLE
-
-
-	# rotate the view up
-	u
-
-
-Node: focal, fu, fd,  Prev: u, d, l, r,  Next: color,  Up: Graphic Commands,
-
-
-SYNOPSIS
-
-
-	focal [index] value
-
-	fu [index]
-
-	fd [index]
-
-
-PURPOSE
-
-
-Use the  focal method  to change the   focal distance for  perspective
-views. The focal is the distance form the eye to the view point. A low
-focal  increases the perspective  effect, a  high  focal looks like an
-axonometric. The default value is 500.
-
-Use fu and fd to increase or decrease the focal value by 10%. fd makes
-the eye closer to the object.
-
-
-EXAMPLE
-
-
-	# create a perspective and look closer
-	pers
-	repeat 10 fd
-
-
-WARNINGS
-
-
-A negative or null focal is not a bright idea !!
-
-
-SEE ALSO
-
-pers
-
-
-Node: color,  Prev: focal, fu, fd,  Next: dtext,  Up: Graphic Commands,
-
-
-SYNOPSIS
-
-
-	color index name
-
-
-PURPOSE
-
-
-Set the color to a value, index is the index of the color between 0
-and 15, name is a X window color name. The list can be found in the
-file rgb.txt in the X library directory.
-
-The default value are
-
-0 White
-, 1 Red
-, 2 Green
-, 3 Blue
-, 4 Cyan
-, 5 Gold
-, 6 Magenta
-, 7 Marron
-, 8 Orange
-, 9 Pink
-, 10 Salmon
-, 11 Violet
-, 12 Yellow
-, 13 Khaki
-, 14 Coral
-
-
-
-EXAMPLE
-
-
-	# change the hue of the blue
-	color 3 "navy blue"
-
-
-WARNINGS
-
-
-The color change will be visible on the next  redraw of the views, for
-example after fit or mu.
-
-
-Node: dtext,  Prev: color,  Next: hardcopy, hcolor, xwd,  Up: Graphic Commands,
-
-
-SYNOPSIS
-
-
-	dtext [x y [z]] string
-
-
-PURPOSE
-
-
-Display a string in all 3d or 2d views.  If no coordinates are given a
-graphic selection  is required. If  two coordinates are given the text
-is created in 2d views at  this position, with  3 coordinates the text
-is created in 3d views. The coordinates are real space coordinates.
-
-
-EXAMPLE
-
-
-	# mark the origins
-	dtext 0 0 "This is the 2d origin"
-	dtext 0 0 0 "This is the 3d origin"
-
-	# write on the views
-	dtext "You just clicked here"
-
-
-Node: hardcopy, hcolor, xwd,  Prev: dtext,  Next: wclick, pick,  Up: Graphic Commands,
-
-
-SYNOPSIS
-
-
-	hardcopy [index]
-
-	hcolor index width gray
-	
-	xwd [index] filename
-
-
-PURPOSE
-
-
-The hardcopy   command creates a  postcript file  named post.ps  in the
-current  directory. This file  contains  the postscript description of
-the view index, or of all the views.
-
-The hcolor command   lets you  change   the  aspect of   lines in  the
-postscript file, it allows to specify a width and a gray level for one
-of the 16 colors. width is measured in points, the default value is 1,
-gray is a grey level from 0 = black to 1 = white, the default value is
-0. All colors are bound to the default values at the beginning.
-
-The xwd command  creates an X window xwd  file from a view, by default
-index is 1.   To visualize an  xwd file you  can use the unix  command
-xwud.
-
-
-EXAMPLE
-
-
-	# all blue lines (color 3) 
-	# will be half-width and grey
-
-	hcolor 3 0.5 
-
-	# make a postscript file and print it
-	hardcopy
-	lpr post.ps
-
-	# make an xwd file and display it
-	xwd theview
-	xwud -in theview
-
-
-WARNINGS
-
-
-There are bugs  when using hardcopy  without index with more than  one
-view.
-
-You need a postscript printer or your harcopy will not look great.
-
-
-SEE ALSO
-
-color
-
-
-Node: wclick, pick,  Prev: hardcopy, hcolor, xwd,  Next: ,  Up: Graphic Commands,
-
-
-SYNOPSIS
-
-
-	wclick
-
-	pick  index X Y Z b [nowait]
-
-
-PURPOSE
-
-
-Use  the wclick command to wait  until a mouse  button is clicked, the
-message   "just click" is displayed.    This  is useful to let  people
-admire a drawing until they are fed up with it.
-
-Use the pick command to get a graphical input, the arguments must be
-names for variables where the results are stored.
-
-- index : will be the index of the view where the input was made
-
-- X,Y,Z : Are 3d coordinates in real world
-
-- b : b is the mouse button 1,2 or 3
-
-When there is an extra argument its value  is not used and the command
-do not wait for a button click, the value of b  may then be 0 if there
-was no click. This option is useful for tracking the pointer.
-
-Note that the results are stored in Draw numeric variables.
-
-
-EXAMPLE
-
-
-	# make a circle at mouse location
-	pick index x y z b
-	circle c x y z 0 0 1 1 0 0 0 30
-
-	# make a dynamic circle at mouse location
-	# stop when a button is clicked
-	# (see the repaint command)
-
-	dset b 0
-	while {[dval b] == 0} {
-		pick index x y z b nowait
-		circle c x y z 0 0 1 1 0 0 0 30
-		repaint
-	}
-
-
-SEE ALSO
-
-repaint
-
-
-Node: Variables display commands,  Prev: Graphic Commands,  Next: ,  Up: Basic commands,
-
-
-Many Draw objects  can  be displayed,  for example curves,   surfaces,
-shapes.  Draw provides commands to manage the  display of the objects.
-display, donly  are used to display  objects, erase, clear, 2dclear to
-erase them.  The autodisplay command is used   to control if variables
-are displayed as soon as created.
-
-The variable name "." (dot) has a special status within Draw, any draw
-command expecting a Draw  object as argument  can be passed a dot. The
-meaning of the dot is the following.
-
-If the  dot is an input  argument a graphical  selection will be made,
-instead of getting the object  from a variable.  Draw will ask you  to
-select an object on a view.
-
-If the dot is  an output argument, an  unnamed object will be created,
-of  course this will make   sense only for  graphical  objects, if you
-create an  unnamed  number you will not  be  able  to  access it. This
-feature is useful when you want to create objects for display only.
-
-If you do not see what you expected while  executing loops or sourcing
-files you may want to consider the repaint and dflush commands.
-
-
-EXAMPLE
-
-
-	# use dot to dump an object on the screen
-	dump .
-
-	# display points on a curve c
-	# with dot no variables are created
-	for {set i 0} {$i <= 10} {incr i} {
-		cvalue c $i/10 x y z
-		point . x y z
-	}
-
-	# point p x y z
-	# would have displayed only one point
-	# because the precedent content of a variable is erased
-
-
-	# point p$i x y z
-	# is an other solution, creating variables
-	# p0, p1, p2, ....
-
-	# give a name to a graphic object
-	rename . x
-
-
-
-* Menu:
-
-* autodisplay::
-* display, donly::
-* erase, clear, 2dclear::
-* repaint, dflush::
-
-
-Node: autodisplay,  Prev: ,  Next: display, donly,  Up: Variables display commands,
-
-
-SYNOPSIS
-
-
-	autodisplay [0/1]
-
-
-PURPOSE
-
-
-By default Draw displays automatically any graphical object as soon as
-it is created. This behavior known as  autodisplay can be removed with
-this command. Without  arguments, autodisplay  toggles the autodisplay
-mode, the command always returns the current mode.
-
-When autodisplay is off, using the dot return argument is ineffective.
-
-
-EXAMPLE
-
-
-	# c is dislayed
-	circle c 0 0 1 0 5
-
-	# toggle the mode
-	autodisplay
-	==> 0
-	circle c 0 0 1 0 5
-
-	# c is erased, but not displayed
-	display c
-
-
-SEE ALSO
-
-display
-
-
-Node: display, donly,  Prev: autodisplay,  Next: erase, clear, 2dclear,  Up: Variables display commands,
-
-
-SYNOPSIS
-
-
-	display varname [varname ...]
-
-	donly  varname [varname ...]
-
-
-PURPOSE
-
-
-Use display to make objects visible. Use donly to make objects visible
-and erase all other objects, it stands for "display only".
-
-As you  may have  guessed "display ."  is quite  useless, "donly ." is
-very useful to extract one object from a messy screen.
-
-
-EXAMPLE
-
-
-	# to see everybody
-	foreach var [directory] {display $var}
-
-	# to select two objects and erase the others
-	donly . .
-
-
-
-SEE ALSO
-
-erase
-
-
-Node: erase, clear, 2dclear,  Prev: display, donly,  Next: repaint, dflush,  Up: Variables display commands,
-
-
-SYNOPSIS
-
-
-	erase [varname varname ...]
-
-	clear
-
-	2dclear
-
-
-PURPOSE
-
-
-Use erase to erase objects from all the views, erase without arguments
-erase everything in 3d and 2d. To erase unnamed objects use "erase .".
-
-Use clear to erase  only 3d objects and 2dclear  for 2d objects, erase
-without arguments is the same thing as "clear; 2dclear".
-
-
-EXAMPLE
-
-
-	# erase all guys with name starting by c_
-	foreach var [directory c_*] {erase $var}
-
-	# clear 2d views
-	2d clear
-
-
-SEE ALSO
-
-
-display
-
-
-Node: repaint, dflush,  Prev: erase, clear, 2dclear,  Next: ,  Up: Variables display commands,
-
-
-SYNOPSIS
-
-
-	repaint
-
-	dflush
-
-
-PURPOSE
-
-
-The repaint command enforces pending repaint  of the views. The dflush
-command flushes the graphic buffers.  These commands are useful within
-loops or in scripts.
-
-A  new object is immediatly displayed,  but when an object is modified
-or erased the whole view must be repainted. To avoid doing it too many
-times, Draw only sets a flag and delays the  repaint to the end of the
-command when the new prompt is issued. Within a script you may want to
-display immediatly  the result of a  modification, the repaint command
-will repaint the views if the flag is raised and clear the flag.
-
-Graphical operations are buffered by Draw (and also  by the X system),
-usually the buffer is flushed   at the end  of  a command and   before
-graphical selection. If  you want to  flush the buffer within a script
-use the dflush command.
-
-
-EXAMPLE
-
-
-	# See the example with the pick command
-
-
-SEE ALSO
-
-pick
-
-
-Node: Geometry commands,  Prev: Basic commands,  Next: Topology commands,  Up: Top,
-
-
-Draw  provides a set of commands  to test geometry libraries. Geometry
-libraries are provided with the GEOMETRY  UL. These commands are found
-in the TGEOMETRY executable, or in  any Draw executable  as long as it
-includes the GeometryTest commands.
-
-The geometry with Draw includes new  types of variables
-
-- The 2d and 3d point will be referred to as Draw points.
-
-- The 2d curve, it is exactly the same as the Geom2d_Curve class. Will
-be referred to as Draw 2d curve.
-
-- The 3d  curve and the surface,  they are exactly the Geom_Curve  and
-Geom_Surface classes.  Will  be referred  to as  Draw  curve  and Draw
-surface.
-
-Please refer to  the  Geom and Geom2d   packages to learn  more  about
-CAS.CADE geometry.
-
-Draw geometric variables never share their data, the copy command will
-always make a complete copy of the content of the variable.
-
-The following sections cover the topics 
-
--  crves creation,  the different types  of curves  and how to create
-them.
-
-- surfaces creation, the different types of surfaces and how to create
-them.
-
-- curves and surfaces modification, commands  to modify the definition
-of curves and surfaces, a majority is for bezier and bspline.
-
-- geometric transformations, i.e. translation, rotation, mirror, ...
-
-- analysis  of  curves  and   surfaces, commands to  compute   points,
-derivatives, curvatures.
-
-- intersections of surfaces and curves.
-
-- approximations of set of points to create curves and surfaces.
-
-- construction of 2d circles and lines by constraints like tangency.
-
-- the  last  section describes  commands which control  the display of
-curves and surfaces.
-
-When possible the commands are general, i.e. they process 2d curves 3d
-curves and surfaces, for example the circle command may create a 2d or
-a 3d circle  depending on the number  of  arguments and the  translate
-command will process points, curves or  surfaces depending on the type
-of the argument. So when  you do not find a  command in a section  you
-may look in another section, for example the trim command is described
-in the surface section but it can be used with curves.
-
-
-
-
-* Menu:
-
-* Creation of curves::
-* Creation of surfaces::
-* Modifications of Curves and surfaces::
-* Transformations::
-* Analysis of curves and surfaces ::
-* Intersections::
-* Approximations::
-* Constraints::
-* Display::
-
-
-Node: Creation of curves,  Prev: ,  Next: Creation of surfaces,  Up: Geometry commands,
-
-
-To  create  points use the point   command, to create  curves use the
-command corresponding to the type. The types of curves are :
-
-- Analytical curves : line, circle, ellipse, parabola, hyperbola. 
-
-- Polar curves : beziercurve, bsplinecurve.
-
--  Trimmed curves and Offset  curves made  from  other curves with the
-trim and offset command.  Note that  the trim  and offset command  are
-described in the surface section, as they work on curves or surfaces.
-
-- Bspline  curves (NURBS) can be  created from other curves  using the
-convert command (see the surface creation).
-
-- Curves can be created from surface isoparametric lines with the uiso
-and viso commands.
-
-- 3d curves  can be created from 2d  curves and the contrary using the
-to3d  and to2d commands. The project   command more generally computes
-the 2d curve on a surface.
-
-Curves are displayed with an arrow to indicate the last parameter.
-
-
-
-* Menu:
-
-* point::
-* line::
-* circle::
-* ellipse::
-* hyperbola::
-* parabola::
-* beziercurve, 2dbeziercurve::
-* bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve::
-* uiso, viso::
-* to2d, to3d::
-* project::
-
-
-Node: point,  Prev: ,  Next: line,  Up: Creation of curves,
-
-
-SYNOPSIS
-
-
-	point name x y [z]
-
-
-PURPOSE
-
-
-Use the point command to create a 2d or 3d point, depending on the
-number of arguments.
-
-
-EXAMPLE
-
-
-	# 2d point
-	point p1 1 2
-
-	# 3d point
-	point p2 10 20 -5
-
-
-
-Node: line,  Prev: point,  Next: circle,  Up: Creation of curves,
-
-
-SYNOPSIS
-
-
-	line name x y [z] dx dy [dz]
-
-
-PURPOSE
-
-
-Use the line  command  to create a  3d  or 2d line.   x  y z are   the
-coordinates of  the origin of the  line,  dx, dy, dz  is the direction
-vector. Of course the dimension must be  consistent, either line l x y
-dx dy in 2d or line l x y z dx dy dz in 3d.
-
-A  line is parametrised  by the length  starting form the origin along
-the direction vector, the direction vector will be normalised, it must
-not be null. The lines are infinite, but not the drawing.
-
-
-EXAMPLE
-
-
-	# a 2d line at 45 degrees of the X axis
-	line l2d 0 0 1 1
-
-	# a 3d line trough the point 10 0 0 parallel to Z
-	line l 10 0 0 0 0 1
-
-
-Node: circle,  Prev: line,  Next: ellipse,  Up: Creation of curves,
-
-
-SYNOPSIS
-
-
-	circle name x y [z [dx dy dz]] [ux uy [uz]] radius
-
-
-PURPOSE
-
-
-Use this  command to create a 2d  or  a 3d circle,  in  2d x,y are the
-coordinates of the center and ux, uy is the vector in the direction of
-the origin of the parameters, by default this direction is (1,0) the X
-axis. Use another vector to change the origin of parameters.
-
-In 3d x,y,z are the coordinates of the  center, dx,dy,dz is the normal
-vector defining the plane through the center where the circle is, this
-vector is normalised and must  not be null, by  default this vector is
-(0,0,1) i.e. the Z axis.  ux,uy,uz is  the direction of the origin, if
-it is not given a default direction will be computed, this vector must
-not be null or parallel to dx,dy,dz.
-
-The circle is parametrised by the  angle in [0,2*pi] starting from the
-origin. Note  that the specification of origin  direction and plane is
-the same for all analytical curves and surfaces.
-
-
-EXAMPLE
-
-
-	# A 2d circle of radius 5 centered at 10,-2
-	circle c1 10 -2 5
-
-	# an other 2d circle with a user defined origin
-	# the point of parameter 0 on this circle will be
-	# 1+sqrt(2),1+sqrt(2)
-	circle c2 1 1 1 1 2
-
-	# a 3d circle, center 10 20 -5, axis Z, radius 17
-	circle c3 10 20 -5 17
-
-	# same 3d circle with axis Y
-	circle c4 10 20 -5 0 1 0 17
-
-	# full 3d circle, axis X, origin on Z
-	circle c5 10 20 -5 1 0 0 0 0 1 17
-
-	
-
-
-Node: ellipse,  Prev: circle,  Next: hyperbola,  Up: Creation of curves,
-
-
-SYNOPSIS
-
-
-	ellipse name x y [z [dx dy dz]] [ux uy [uz]] firstradius secondradius
-
-
-PURPOSE
-
-
-Create a 2d or 3d ellipse, the first arguments are the same as for the
-circle to define the center  and the system of  axis. The ellipse will
-have  firstradius on its  X axis and  secondradius  on its Y axis. The
-ellipse is parametrised by [0,2*pi] starting from the  X axis going to
-the Y axis. Note that this is not an  angle, the local parametrisation
-of the ellipse is (firstradius * cos(t), secondradius * sin(t))
-
-
-EXAMPLE
-
-
-	# default 2d ellipse
-	ellipse e1 10 5 20 10
-
-	# 2d ellipse at angle 60 degree
-	ellipse e2 0 0 1 2 30 5
-
-	# 3d ellipse, in the XY plane
-	ellipse e3 0 0 0 25 5
-
-	# 3d ellipse in the X,Z plane with axis 1, 0 ,1
-	ellipse e4 0 0 0 0 1 0 1 0 1 25 5
-
-
-
-SEE ALSO
-
-
-circle
-
-
-Node: hyperbola,  Prev: ellipse,  Next: parabola,  Up: Creation of curves,
-
-
-SYNOPSIS
-
-
-	hyperbola name x y [z [dx dy dz]] [ux uy [uz]] firstradius secondradius
-
-
-PURPOSE
-
-
-Create a 2d or 3d ellipse, the first arguments are the same as for the
-circle to define the center and the system of axis. The hyperbola will
-have firstradius on its X  axis and secondradius  on its Y axis.  This
-values  are not real  radius but  the  coefficients of  the parametric
-equation, where  the  parameters run    for -infinite  to    +infinite
-(firstradius * ch(t),  secondradius * sh(t)).  Note that the hyperbola
-has only one branch, the one in the X direction.
-
-
-EXAMPLE
-
-
-	# default 2d hyperbola, with asymptotes 1,1 -1,1
-	hyperbola h1 0 0  30 30
-
-	# 2d hyperbola at angle 60 degree
-	hyperbola h2 0 0 1 2 20 20
-
-	# 3d hyperbola, in the XY plane
-	hyperbola h3 0 0 0 50 50
-
-
-
-SEE ALSO
-
-
-circle
-
-
-Node: parabola,  Prev: hyperbola,  Next: beziercurve, 2dbeziercurve,  Up: Creation of curves,
-
-
-SYNOPSIS
-
-
-	parabola name x y [z [dx dy dz]] [ux uy [uz]] focal
-
-
-PURPOSE
-
-
-Create  a 2d or 3d  parabola in the   axis-system defined by the first
-arguments (see  the  circle command),  the origin  is the apex  of the
-parabola and focal  is the coefficient in the  parametric equation : (
-x= t*t / 4*focal, y = t).
-
-
-EXAMPLE
-
-
-	# 2d parabola
-	parabola p1 0 0 50
-
-	# 2d parabola with convexity +Y
-	parabola p2 0 0 0 1 50
-
-	# 3d parabola in the Y-Z plane, convexity +Z
-	parabola p3 0 0 0 1 0 0 0 0 1 50
-
-
-SEE ALSO
-
-circle
-
-
-Node: beziercurve, 2dbeziercurve,  Prev: parabola,  Next: bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve,  Up: Creation of curves,
-
-
-SYNOPSIS
-
-
-	beziercurve name nbpoles x1 y1 z1 [w1] x2 y2 z2 [w2] ....
-
-	2dbeziercurve name nbpoles x1 y1 z1 [w1] x2 y2 z2 [w2] ....
-
-
-PURPOSE
-
-
-Use the beziercurve command  to create a 3d curve,  give the number of
-poles then  the   coordinates of  the  poles,   the   degree will   be
-nbpoles-1.  You can give  weights with the poles  to create a rational
-curve, you must give weights for all poles or for none.
-
-Use  2dbeziercurve to create  a 2d curve with   the same conditions as
-above.
-
-
-EXAMPLE
-
-
-	# a rational 2d bezier curve (arc of circle)
-	2dbeziercurve ci 3 0 0 1 10 0 sqrt(2.)/2. 10 10 1
-
-	# a 3d bezier curve, not rational
-	beziercurve cc 4 0 0 0 10 0 0 10 0 10 10 10 10
-
-
-Node: bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve,  Prev: beziercurve, 2dbeziercurve,  Next: uiso, viso,  Up: Creation of curves,
-
-
-SYNOPSIS
-
-
-	bsplinecurve name degree nbknots k1 m1 ... x1 y1 z1 w1 ...
-
-	2dbsplinecurve name degree nbknots k1 m1 ... x1 y1 w1 ...
-
-	pbsplinecurve name degree nbknots k1 m1 ... x1 y1 z1 w1 ...
-
-	2dpbsplinecurve name degree nbknots k1 m1 ... x1 y1 w1 ...
-
-
-PURPOSE
-
-
-Use the bsplinecurve commands  to create 3d  or  2d NURBS curves,  the
-pbsplinecurve  and   2dpbsplinecurve commands      create     periodic
-curves. Degree  is the  degree for  the curves,  nbknots the number of
-knots,  then you must  give  the knots with  their multiplicities, the
-knots must  be non decreasing,   if succcessive  knots are  equal  the
-multiplicities will be added, multiplicities must be lower or equal to
-the degree, on non  periodic curves the  first and last multiplicities
-can  be equal to degree+1, this  is even  recommended  if you like the
-curve to go from the first pole to the last pole.  On a periodic curve
-the first and last multiplicity must be equal.
-
-The poles must be given with their weights, use weights of 1 for a non
-rational curve, the number of poles must be
-
-For a non periodic curve, Sum of multiplicities - degree + 1
-
-For a periodic curve, Sum of multiplicities - last multiplicity
-
-
-EXAMPLE
-
-
-	# a 2d periodic circle (parameter from 0 to 2*pi !!)
-	dset h sqrt(3)/2
-	2dpbsplinecurve c 2 \
-	4 0 2 pi/1.5 2 pi/0.75 2 2*pi 2 \
-	0 -h/3 1 \
-	0.5 -h/3 0.5 \
-	0.25 h/6 1 \
-	0 2*h/3 0.5 \
-	-0.25 h/6 1 \
-	-0.5 -h/3 0.5 \
-	0 -h/3 1 
-
-
-Node: uiso, viso,  Prev: bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve,  Next: to2d, to3d,  Up: Creation of curves,
-
-
-SYNOPSIS
-
-
-	uiso name surface u
-
-	viso name surface u
-
-
-PURPOSE
-
-
-Use these commands to create a U or V isoparametric curve from a surface.
-
-
-EXAMPLE
-
-
-	# create a cylinder and extract to iso curves
-	# see the cylinder command
-
-	cylinder c 10
-	uiso c1 c pi/6
-	viso c2 c 5
-
-
-WARNINGS
-
-
-It is not possible to extract isoparametric curves on offset surfaces.
-
-
-Node: to2d, to3d,  Prev: uiso, viso,  Next: project,  Up: Creation of curves,
-
-
-SYNOPSIS
-
-
-	to3d name curve2d [plane]
-
-	to2d name curve3d [plane]
-
-
-PURPOSE
-
-
-to3d and to2d commands  are used to create a  3d curve from a 2d curve
-and a 2d curve   from a 3d curve.   The  transformation uses  a planar
-surface  to define the  XY plane in  3d, by default  this plane is the
-default OXY plane.  to3d  always gives a correct  result, but to2d may
-surprise you as it is  not a projection.  It is  always correct if the
-curve  is planar and  parallel to the plane  of projection, the points
-defining the  curve  are projected  onto the plane   but a circle will
-remain a circle for example, it will not be changed to an ellipse.
-
-
-EXAMPLE
-
-
-	# the following commands
-	circle c 0 0 5
-	plane p -2 1 0 1 2 3
-	to3d c c p
-
-	# will create the same circle as
-	circle c -2 1 0 1 2 3 5
-
-
-SEE ALSO
-
-
-project
-
-
-Node: project,  Prev: to2d, to3d,  Next: ,  Up: Creation of curves,
-
-
-SYNOPSIS
-
-
-	project name curve3d surface
-
-
-PURPOSE
-
-
-Computes    the 2d curve  in   the   parametric space  of  the surface
-correponding  to the 3d curve.  This  can be  used  only on analytical
-surface and for curves lying on the surface.
-
-
-EXAMPLE
-
-
-	# intersect a cylinder and a plane
-	# and project the resulting ellipse on the cylinder
-	# this will create a 2d sinusoid-like bspline
-	cylinder c 5
-	plane p 0 0 0 0 1 1
-	intersect i c p
-	project i2d i c
-
-
-Node: Creation of surfaces,  Prev: Creation of curves,  Next: Modifications of Curves and surfaces,  Up: Geometry commands,
-
-
-To create surfaces use also the type, types of surfaces are
-
-- Analytical surface : plane, cylinder, cone, sphere, torus.
-
-- Polar surfaces : beziersurf, bsplinesurf
-
--  Trimmed and Offset surface,  using the commands trim, trimu, trimv,
-offset.
-
--  Surface of Revolution and  Extrusion, created  from curves with the
-revsurf and extsurf commands.
-
--  NURBS surface  can be  constructed from   other  surfaces using the
-convert command.
-
-Surfaces are displayed  with isoparametric  lines, a small  parametric
-line is displayed  at 1/10 of U  with a length  1/10 of V to  show the
-parametrisation.
-
-
-
-* Menu:
-
-* plane::
-* cylinder::
-* cone::
-* sphere::
-* torus::
-* beziersurf::
-* bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf::
-* trim, trimu, trimv::
-* offset::
-* revsurf::
-* extsurf::
-* convert::
-
-
-Node: plane,  Prev: ,  Next: cylinder,  Up: Creation of surfaces,
-
-
-SYNOPSIS
-
-
-	plane name [x y z [dx dy dz [ux uy uz]]]
-
-
-PURPOSE
-
-
-Uses  this command to create  an infinite plane, a  plane  is the same
-thing as a 3d  coordinate system, x,y,z is the  origin, dx, dy, dz  is
-the Z direction  and  ux, uy, uz is  the  X direction.  The   plane is
-perpendicular to Z  and X is the  U  parameter. dx,dy,dz and  ux,uy,uz
-must not be  null and not colinear. ux,uy,uz  will  be modified to  be
-orthogonal to  dx,dy,dz. There are  default values for  the coordinate
-system, if no  arguments are given  the  default is the global  system
-(0,0,0), (0,0,1),  (1,0,0), if only the origin  is given the  axis are
-the default  ones (0,0,1), (1,0,0), if the  origin and the Z  axis are
-given the X axis is generated perpendicular to  the Z axis.  Note that
-this definition will be used for all analytical surfaces.
-
-
-EXAMPLE
-
-
-	# a plane through the point 10,0,0 perpendicular to X
-	# with U direction on Y 
-	plane p1 10 0 0 1 0 0 0 1 0 
-
-	# an horixontal plane with origin 10, -20, -5
-	plane p2 10 -20 -5
-
-
-Node: cylinder,  Prev: plane,  Next: cone,  Up: Creation of surfaces,
-
-
-SYNOPSIS
-
-
-	cylinder name [x y z [dx dy dz [ux uy uz]]] radius
-
-
-PURPOSE
-
-
-A cylinder is defined by a coordinate system, just like a plane, and a
-radius. The cylinder is an infinite cylinder  with the Z axis as axis,
-the  U  parameter  is  the angle   starting  from  X going  to   the Y
-direction. The V  coordinate is the  length along the Z  axis starting
-from the origin.
-
-
-EXAMPLE
-
-
-	# a cylinder on the default Z axis, radius 10
-	cylinder c1 10
-
-	# a cylinder, also with Z axis but with origin 5, 10, -3
-	cylinder c2 5 10 -3 10
-
-	# a cylinder through the origin 
-	# with longitude pi/3 and latitude pi/4 (euler angles)
-	dset lo pi/3. la pi/4.
-	cylinder c3 0 0 0 cos(la)*cos(lo) cos(la)*sin(lo) sin(la) 10
-
-
-SEE ALSO
-
-plane
-
-
-Node: cone,  Prev: cylinder,  Next: sphere,  Up: Creation of surfaces,
-
-
-SYNOPSIS
-
-
-	cone name [x y z [dx dy dz [ux uy uz]]] semi-angle radius
-
-
-PURPOSE
-
-
-Creates a cone in the  coordinate system, the radius  is the radius of
-the section of the cone  in the XY plane,  the semi-angle is the angle
-in degree of the cone with the axis, it  should be between -90 and 90,
-both and 0  excluded. The  vertex is on  the Z  axis  in the  negative
-direction at a distance radius/tan(semi-angle) from the origin. If the
-radius is 0 the vertex is the origin.
-
-To parametrise the cone,  U is  the angle  starting  from 0, in  the Y
-direction,   V is the length   along  the the  side  starting from the
-origin, in the local system V = Z / cos(semi-angle).
-
-The definition of the cone may seem redundant but it is very useful to
-disconnect the origin of the V parameter and the apex, mainly for very
-small angle when the cone is  like a cylinder,  the useful part of the
-surface may  be very far from  the  apex and  would require very large
-parameter values.
-
-
-EXAMPLE
-
-
-	# a cone a 45 degree at the origin on Z
-	cone c1 45 0
-
-	# a cone on axis Z with radius r1 at z1 and r2 at z2
-	cone c2 0 0 z1 180.*atan2(r2-r1,z2-z1)/pi r1
-
-
-WARNINGS
-
-The angle is in degree.
-
-
-SEE ALSO
-
-plane
-
-
-Node: sphere,  Prev: cone,  Next: torus,  Up: Creation of surfaces,
-
-
-SYNOPSIS
-
-
-	sphere name [x y z [dx dy dz [ux uy uz]]] radius
-
-
-PURPOSE
-
-
-Creates a  sphere  in a local coordinate  system  defined like for the
-lane command. The   sphere is centered at  the  origin with  the given
-radius. To  parametrise the sphere, U  is the angle from  X to Y, U is
-between o and  2*pi, V is  the angle in the  half-circle at angle U in
-the  plane  containing the Z axis,  V  is between -pi/2  and pi/2. The
-poles  are the points  Z = +/-  radius, their parameters are U,+/-pi/2
-for any U in 0,2*pi.
-
-
-EXAMPLE
-
-
-	# a sphere at the origin
-	sphere s1 10
-
-	# a sphere at 10 10 10, with poles on the axis 1,1,1
-	sphere s2 10 10 10 1 1 1 10
-
-
-SEE ALSO
-
-plane
-
-
-Node: torus,  Prev: sphere,  Next: beziersurf,  Up: Creation of surfaces,
-
-
-SYNOPSIS
-
-
-	torus name [x y z [dx dy dz [ux uy uz]]] major minor
-
-
-PURPOSE
-
-
-Creates a torus  in the local coordinate system  with the given  major
-and minor radius, Z is the axis for the major radius. The major radius
-can be lower than the minor one.
-
-To parametrize a torus, U is the angle from X to  Y, V is the angle in
-the plane at angle U from the XY plane to Z. U and V are in 0,2*pi.
-
-
-EXAMPLE
-
-
-	# a torus at the origin
-	torus t1 20 5
-
-	# a torus in another system
-	torus t2 10 5 -2  2 1 0 20 5
-
-
-SEE ALSO
-
-plane
-
-
-Node: beziersurf,  Prev: torus,  Next: bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf,  Up: Creation of surfaces,
-
-
-SYNOPSIS
-
-
-	beziersurf name nbupoles nbvolpes x y z [w] ....
-
-
-PURPOSE
-
-
-Use this command to create a bezier surface, rational or not. You must
-first give the numbers  of poles in  the  U and V  directions, degrees
-will be nbupoles-1  and  nbvpoles-1. Then give the   nbupoles*nbvpoles
-poles, starting with U.  i.e.  P(1,1) P(2,1) ,... P(nbupoles,1) P(1,2)
-,... P(nbupoles,nbvpoles).  You can omit weights, but  if you give one
-weight you must give them all.
-
-
-EXAMPLE
-
-
-	# a non-rational degree 2,3 surface
-	beziersurf s 3 4 \
-	0 0 0  10 0 5  20 0 0 \
-	0 10 2 10 10 3 20 10 2 \
-	0 20 10 10 20 20 20 20 10 \
-	0 30 0 10 30 0 20 30 0
-
-
-SEE ALSO
-
-beziercurve
-
-
-Node: bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf,  Prev: beziersurf,  Next: trim, trimu, trimv,  Up: Creation of surfaces,
-
-
-SYNOPSIS
-
-
-	bsplinesurf name udegree nbuknots uknot umult ... nbvknot  vknot vmult ...  x y z w ...
-
-	upbsplinesurf ...
-
-	vpbsplinesurf ...
-
-	uvpbsplinesurf ...
-		    
-
-PURPOSE
-
-
-Use  the bsplinesurf     command   to create    NURBS   surfaces,  the
-upbsplinesurf  command to  create  a  NURBS   surface  periodic in  U,
-vpbsplinesurf periodic in V, and uvpbsplinesurf periodic in UV.
-
-The description is similar to the bsplinecurve command, first you give
-the degree in U and the knots in U with their multiplicities, then the
-same in V. The poles follow, the number of poles is the product of the
-number in  U and  the  number in V,  see  bsplinecurve to compute  the
-number of poles,  the poles are first given  in U as in the beziersurf
-command.  Note that  you must give  the  weights, use  1 for  rational
-surface.
-
-
-EXAMPLE
-
-
-	# create a bspline surface of degree 1 2
-	# with two knots in U and three in V
-
-	bsplinesurf s \
-	1 2 0 2 1 2 \
-	2 3 0 3 1 1 2 3 \
-	0 0 0 1  10 0 5 1  \
-	0 10 2 1 10 10 3 1 \
-	0 20 10 1 10 20 20 1 \
-	0 30 0 1 10 30 0 1
-	
-
-
-WARNINGS
-
-The weights are mandatory.
-
-
-SEE ALSO
-
-bsplinecurve
-beziersurf
-convert
-
-
-Node: trim, trimu, trimv,  Prev: bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf,  Next: offset,  Up: Creation of surfaces,
-
-
-SYNOPSIS
-
-
-	trim newname name [u1 u2 [v1 v2]]
-
-	trimu newname name [u1 u2]
-
-	trimv newname name [v1 v2]
-
-
-PURPOSE
-
-
-The trim  commands  are used  to  create  trimmed  curves  or  trimmed
-surfaces.   Note that trimmed  curves and surfaces  are classes of the
-Geom packages. The  trim  command creates a  new trimmed  curve from a
-curve,  or a new trimmed  surface in u  and  v from  a surface.  trimu
-creates  a u  trimmed surface, and  trimv a  vtrimmed surface.  If  no
-parameters are given,   the  command recreates   the  basis curve  and
-surface if the argument is trimmed. The curves can  be either 2d or 3d
-curves.  If  the  trimming  parameters are   decreasing,  direction is
-reversed if the curve or surface is not periodic.
-
-Note that  a  trimmed curve or surface  contains  a copy  of the basis
-geometry, so  modifying it will  not modify the trimmed geometry. Note
-also that trimmig  a trimmed geometry  will not create multiple levels
-of trimming, the basic geometry will be used.
-
-
-EXAMPLE
-
-
-	# create a 3d circle
-	circle c 0 0 0 10
-
-	# trim it, use the same variable, the original is destroyed
-	trim c c 0 pi/2
-
-	# original can be recovered !
-	trim orc c
-
-	# trim again
-	trim c c pi/4 pi/2
-
-	# original is not the trimmed curve but the basis
-	trim orc c
-
-	# as the circle is periodic the two following commands are identical
-	trim cc c pi/2 0
-	trim cc c pi/2 2*pi
-
-	# trim an infinite cylinder
-	cylinder cy 10
-	trimv cy cy 0 50
-
-
-SEE ALSO
-
-reverse
-
-
-Node: offset,  Prev: trim, trimu, trimv,  Next: revsurf,  Up: Creation of surfaces,
-
-
-SYNOPSIS
-
-
-	offset newname name distance [dx dy dz]
-
-
-PURPOSE
-
-
-Use the offset command to create offset  curve or surface from a basis
-curve or surface at a  given distance, offset  curves and surfaces are
-classes from  the Geom package. The  curve can be  a 2d or a 3d curve,
-for a 3d curve  you must give also  a  vector dx,dy,dz to compute  the
-offsets, usually for a planar  curve this vector is  the normal to the
-plane containing the curve.
-
-The offset curve or  surface copies the   basis geometry which  can be
-modified later.
-
-
-EXAMPLE
-
-
-	# graphical demonstration that the outline of a torus
-	# is the offset of an ellipse
-	# Please do this in a top view
-
-	smallview +X+Y
-	dset angle pi/6
-	torus t 0 0 0 0 cos(angle) sin(angle) 50 20
-	fit
-	ellipse e 0 0 0 50 50*sin(angle)
-	# note that the distance can be negative
-	offset l1 e 20 0 0 1
-	offset l2 e -20 0 0 1
-	
-	# Admire...
-
-
-Node: revsurf,  Prev: offset,  Next: extsurf,  Up: Creation of surfaces,
-
-
-SYNOPSIS
-
-
-	revsurf newname curvename x y z dx dy dz
-
-
-PURPOSE
-
-
-This command creates a surface of revolution  from a 3d curve, this is
-the  class SurfaceOfRevolution from   Geom, x,y,z and dx,dy,dz defines
-the axis  of revolution. To parametrize a  surface of revolution U, is
-the angle around the axis, starting from the curve, V is the parameter
-of the curve.
-
-
-EXAMPLE
-
-
-	# another way to make a torus like surface
-	circle c 50 0 0 20
-	revsurf s c 0 0 0 0 1 0
-
-
-Node: extsurf,  Prev: revsurf,  Next: convert,  Up: Creation of surfaces,
-
-
-SYNOPSIS
-
-
-	extsurf newname curvename dx dy dz
-
-
-PURPOSE
-
-
-Use the extsurf command to create a surface of linear extrusion from a
-3d  curve. dx,dy,dz is the  direction of  extrusion.  To parametrize a
-surface of extrusion, U is the parameter on the curve, V is the length
-along the direction of extrusion.
-
-
-EXAMPLE
-
-
-	# an elliptic cylinder
-	ellipse e 0 0 0 10 5
-	extsurf s e 0 0 1
-	# to make it finite
-	trimv s s 0 10
-
-
-
-Node: convert,  Prev: extsurf,  Next: ,  Up: Creation of surfaces,
-
-
-SYNOPSIS
-
-
-	convert newname name
-
-
-PURPOSE
-
-
-The convert command creates a NURBS 2d curve, 3d curve or surface from
-any  2d curve, curve,   and  surface. essentially  conics  curves  and
-quadric surfaces are turned to NURBS, it does not process offsets.
-
-
-EXAMPLE
-
-
-	# turn a 2d arc of circle into a 2d nurbs
-	circle c 0 0 5
-	trim c c 0 pi/3
-	convert c c
-
-	# an easy way to make a planar bspline surface
-	plane p
-	trim p p -1 1 -1 1
-	convert p p
-
-
-WARNINGS
-
-
-Offset curves and surfaces are not processed.
-
-
-SEE ALSO
-
-bsplinecurve, bsplinesurf
-
-
-Node: Modifications of Curves and surfaces,  Prev: Creation of surfaces,  Next: Transformations,  Up: Geometry commands,
-
-
-Draw provides commands to modify curves and surfaces, some of them are
-general, others are restricted to bezier or bsplines.
-
-General modification are
-
-- Reversing the parametrisation : reverse, ureverse, vreverse.
-
-Modifications for bezier and bspline are 
-
-- Exchanging U and V on a surface : exchuv
-
-- segmentation, segment, segsur
-
-- Increasing the degree, incdeg, incudeg, incvdeg
-
-- moving poles, cmovep, movep, movecolp, moverowp
-
-- moving a point on a curve or a surface, cmovepoint, movepoint
-
-Modifications for bezier are 
-
-- adding and removing poles, insertpole, rempole, remcolpole, remrowpole
-
-Modifications for bspline are 
-
--  inserting  and removing   knots, insertknot,  remknot, insertuknot,
-remuknot, insetvknot, remvknot
-
-- modifying periodic curves and surfaces, setperiodic, setnotperiodic,
-setorigin, setuperiodic,  setunotperiodic,   setuorigin, setvperiodic,
-setvnotperiodic, setvorigin
-
-
-
-
-* Menu:
-
-* reverse, ureverse, vreverse::
-* exchuv::
-* segment, segsur::
-* incdeg, incudeg, incvdeg::
-* cmovep, movep, movecolp, moverowp::
-* cmovepoint, movepoint::
-* insertpole, rempole, remcolpole, remrowpole::
-* insertknot, insertuknot, insertvknot::
-* remknot, remulnot, remvknot::
-* setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
-* setorigin, setuorigin, setvorigin::
-
-
-Node: reverse, ureverse, vreverse,  Prev: ,  Next: exchuv,  Up: Modifications of Curves and surfaces,
-
-
-SYNOPSIS
-
-
-	reverse curvename
-
-	ureverse surfacename
-
-	vreverse surfacename
-
-
-PURPOSE
-
-
-Use the reverse  command to reverse the  parametrisation of a 3d or 2d
-curve, use ureverse  or vreverse to reverse the  U or V parameter of a
-surface.  Note  that the    new  parameters of  the  curve  may change
-according to the type of curve. For example they will change sign on a
-line or stay 0,1 on a bezier.
-
-Reversing a parameter on an analytical surface  may create an indirect
-coordinate system,  i.e. for example Z  is not the  cross product of X
-and Y, because reversing a parameter will reverse only one axis.
-
-
-EXAMPLE
-
-
-	# reverse a trimmed 2d circle
-	circle c 0 0 5
-	trim c c pi/4 pi/2
-	reverse c
-
-	# dumping c will show that it is now trimmed between
-	# 3*pi/2 and 7*pi/4 i.e. 2*pi-pi/2 and 2*pi-pi/4
-
-
-WARNINGS
-
-
-The geometry has been  modified, if you want  to keep the curve or the
-surface you must copy it before.
-
-
-Node: exchuv,  Prev: reverse, ureverse, vreverse,  Next: segment, segsur,  Up: Modifications of Curves and surfaces,
-
-
-SYNOPSIS
-
-
-	exchuv surfacename
-
-
-PURPOSE
-
-
-For a bezier or bspline surface this command exchange the U and V parameters.
-
-
-EXAMPLE
-
-
-	# exchanging u and v on a spline (made from a cylinder)
-	# this is impossible on the cylinder
-	cylinder c 5
-	trimv c c 0 10
-	convert c c
-	exchuv c
-
-
-Node: segment, segsur,  Prev: exchuv,  Next: incdeg, incudeg, incvdeg,  Up: Modifications of Curves and surfaces,
-
-
-SYNOPSIS
-
-
-	segment curve ufirst ulast
-
-	segsur surface ufirst ulast vfirst vlast
-
-
-PURPOSE
-
-
-Use the segment and segsur  commands to segment respectively a  bezier
-or   bspline curve and  surface.  This  command  modifies the curve to
-restrict it  between  the new parameters.   This command  must  not be
-confused with the trim command which creates a new geometry.
-
-
-EXAMPLE
-
-
-	# segment a bezier curve in half
-	beziercurve c 3 0 0 0 10 0 0 10 10 0
-	segment c 0.5 1
-
-
-Node: incdeg, incudeg, incvdeg,  Prev: segment, segsur,  Next: cmovep, movep, movecolp, moverowp,  Up: Modifications of Curves and surfaces,
-
-
-SYNOPSIS
-
-
-	incdeg curvename newdegree
-
-	incudeg surfacename newdegree
-
-	incvdeg surfacename newdegree
-
-
-PURPOSE
-
-
-Use the incdeg command to increase the degree of a 2d or 3d bezier or
-bspline curve to a new value higher than the current one. Use incudeg
-and incvdeg to increase the degree in U or V of a surface.
-
-
-EXAMPLE
-
-
-	# make a planar bspline and increase the degree to 2 3
-	plane p 
-	trim p p -1 1 -1 1
-	convert p p
-	incudeg p 2
-	incvdeg p 3
-
-
-WARNINGS
-
-
-The geometry is modified.
-
-
-Node: cmovep, movep, movecolp, moverowp,  Prev: incdeg, incudeg, incvdeg,  Next: cmovepoint, movepoint,  Up: Modifications of Curves and surfaces,
-
-
-SYNOPSIS
-
-
-	cmovep curve index dx dy [dz]
-
-	movep surface uindex vindex dx dy dz
-
-	movecolp uindex dx dy dz
-
-	moverowp vindex dx dy dz
-
-
-PURPOSE
-
-
-Use the move methods to translate poles of a bezier or a bspline curve
-or surface. cmovep and movep translate the pole with the given index.
-
-movecolp and moverowp translate a whole column or row of poles.
-
-
-EXAMPLE
-
-
-	# start with a plane
-	# turn to bspline, raise degree and raise poles
-	plane p
-	trim p p -10 10 -10 10
-	convert p p
-	incud p 2
-	incvd p 2
-	movecolp p 2 0 0 5
-	moverowp p 2 0 0 5
-	movep p 2 2 0 0 5
-
-
-Node: cmovepoint, movepoint,  Prev: cmovep, movep, movecolp, moverowp,  Next: insertpole, rempole, remcolpole, remrowpole,  Up: Modifications of Curves and surfaces,
-
-
-SYNOPSIS
-
-
-	cmovepoint curve u dx dy [dz]
-
-	movepoint surface u v dx dy dz
-
-
-PURPOSE
-
-
-Use the cmovepoint command to modify a curve so the point of parameter
-u have a new position translated by dx,dy,dz (no dz in 2d).
-
-Use   the  movepoint command  to modify   a  surface so   the point of
-parameters u,v have a new position translated by dx,dy,dz.
-
-
-EXAMPLE
-
-
-	# Create a spline curve and move 100 times a point
-
-	bsplinecurve bscurv  \
-	3 2  -1.0 4   1.0 4  0 0 0 1   1 0 0 1   2 0 0 1   3 0 0 1
-
-	incdeg bscurv 10
-	translate bscurv 0 -4 0
-
-	set i 1
-	repeat 100 {cmovepoint bscurv 0.3 0. 0.05 0.0e0 ; incr i 1; repaint}
-	dump bscurv
-
-	set i 1
-	repeat 100 {cmovepoint bscurv 0.3 0. -0.05 0.0e0 ; incr i 1;repaint}
-
-
-
-WARNINGS
-
-
-The geometry is modfied. Do not confuse with cmovep and movep which
-modifies a pole and not a point.
-
-
-SEE ALSO
-
-
-cmovep, movep
-
-
-Node: insertpole, rempole, remcolpole, remrowpole,  Prev: cmovepoint, movepoint,  Next: insertknot, insertuknot, insertvknot,  Up: Modifications of Curves and surfaces,
-
-
-SYNOPSIS
-
-
-	insertpole curvename index x y [z] [w]
-
-	rempole curvename index
-
-	remcolpole surfacename index
-
-	remrowpole surfacename index
-
-
-PURPOSE
-
-
-Use the insertpole command  to insert a new pole  on a 2d or 3d bezier
-curve, you can  add a weight for the  pole, the default value  for the
-weight is 1. The pole is added at the position after the index, use an
-index 0 to insert before the first pole.
-
-Use the rempole command to remove a pole from a 2d or 3d bezier curve,
-you must leave at least two poles in the curves.
-
-Use the remcolpole and remrowpole commands to remove a column or a row
-of poles from a bezier surface.  A column is in the  V direction and a
-row in the U direction, the resulting  degree must be  at least 1, i.e
-there are two rows and two columns.
-
-
-EXAMPLE
-
-
-	# start with a segment, insert a pole at end
-	# then remove the central pole
-
-	beziercurve c 2 0 0 0 10 0 0
-	insertpole c 2 10 10 0
-	rempole c 2
-
-
-
-Node: insertknot, insertuknot, insertvknot,  Prev: insertpole, rempole, remcolpole, remrowpole,  Next: remknot, remulnot, remvknot,  Up: Modifications of Curves and surfaces,
-
-
-SYNOPSIS
-
-
-	insertknot curvename knot [mult]
-	
-	insertuknot surfacename knot [mult]
-
-	insertvknot surfacename knot [mult]
-
-
-
-PURPOSE
-
-
-Insert knots in the  knot sequence of  a bspline curve or surface, use
-insertknot for   a curve, you  must  give a  knot   value and a target
-multiplicity, the default multiplicity is  1.  If  there is already  a
-knot with  the given value  its multiplicity will be  raised if  it is
-lower than the target multiplicity. Use insertuknot and insertvknot to
-insert knots in a surface.
-
-
-EXAMPLE
-
-
-	# create a cylindrical surface and insert a knot
-	cylinder c 10
-	trim c c 0 pi/2 0 10
-	convert c c
-	insertuknot c pi/4 1
-
-
-Node: remknot, remulnot, remvknot,  Prev: insertknot, insertuknot, insertvknot,  Next: setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic,  Up: Modifications of Curves and surfaces,
-
-
-SYNOPSIS
-
-
-	remknot index [mult] [tol]
-
-	remuknot index [mult] [tol]
-
-	remvknot index [mult] [tol]
-
-
-PURPOSE
-
-
-To  remove a knot from the  knot sequence of  a curve or a surface use
-the remknot   commands, give the  index  of the  knot  and  the target
-multiplicity, default is    0 to  remove   the knot,   if the   target
-multiplicity is   not  0,  the  multiplicity  of   the  knot will   be
-lowered. You can give a tolerance value to  control the process as the
-curve  may be modified, if the  tolerance is  low  the removal will be
-done only   if the curve is not   modified. By default  the removal is
-always done.
-
-
-EXAMPLE
-
-
-	# bspline circle, remove a knot
-	circle c 0 0 5
-	convert c c
-	incd c 5
-	remknot c 2
-
-
-WARNINGS
-
-
-The curve or the surface may be modified.
-
-
-Node: setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic,  Prev: remknot, remulnot, remvknot,  Next: setorigin, setuorigin, setvorigin,  Up: Modifications of Curves and surfaces,
-
-
-SYNOPSIS
-
-
-	setperiodic curve
-
-	setnotperiodic curve
-
-	setuperiodic surface
-
-	setunotperiodic surface
-
-	setvperiodic surface
-
-	setvnotperiodic surface
-
-
-PURPOSE
-
-
-setperiodic turns a  bspline curve in   a periodic bspline  curve, the
-knot vector is the same and excess poles are  truncated, the curve may
-be  modified   if it   was  not  closed.    setnotperiodic removes the
-periodicity of a periodic curve, poles are duplicated. Note that knots
-are added at  the begining  and  the end  of the  knot vector  and the
-multiplicity are knot set to degree+1 at the start and the end.
-
-
-EXAMPLE
-
-
-	# a circle deperiodicised
-	circle c 0 0 5
-	convert c c
-	setnotperiodic c
-
-
-Node: setorigin, setuorigin, setvorigin,  Prev: setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic,  Next: ,  Up: Modifications of Curves and surfaces,
-
-
-SYNOPSIS
-
-
-	setorigin curvename index
-
-	setuorigin surfacename index
-
-	setuorigin surfacename index
-
-
-PURPOSE
-
-
-Use these commands to change the origin  of the parameters on periodic
-curves or surfaces, the new origin must be an existing knot. To set an
-origin outside a knot you must first insert a knot with the insertknot
-command.
-
-
-EXAMPLE
-
-
-	# a torus with new U and V origins
-	torus t 20 5
-	convert t t
-	setuorigin t 2
-	setvorigin t 2
-
-
-
-SEE ALSO
-
-
-insertknot
-
-
-Node: Transformations,  Prev: Modifications of Curves and surfaces,  Next: Analysis of curves and surfaces ,  Up: Geometry commands,
-
-
-Draw provides commands to apply linear transformations to geometric
-objects, they include translation, rotation, mirror and scale.
-
-
-
-
-* Menu:
-
-* translate, 2dtranslate::
-* rotate, 2drotate::
-* pmirror, lmirror, smirror, 2dpmirror, 2dlmirror::
-* pscale, 2dpscale::
-
-
-Node: translate, 2dtranslate,  Prev: ,  Next: rotate, 2drotate,  Up: Transformations,
-
-
-SYNOPSIS
-
-
-	translate name [name ...] dx dy dz
-
-	2dtranslate name [name ...] dx dy
-
-
-PURPOSE
-
-
-To translate  3d  points,   curves  and  surfaces use   the  translate
-commands, giving a vector dx,dy,dz.  You  can translate more than  one
-object with the same command.
-
-For 2d points or curves use the 2dtranslate command.
-
-
-EXAMPLE
-
-
-	# 3d translation
-	point p 10 20 30
-	circle c 10 20 30 5
-	torus t 10 20 30 5 2
-	translate p c t 0 0 15
-
-
-WARNINGS
-
-
-Objects are modified.
-
-
-Node: rotate, 2drotate,  Prev: translate, 2dtranslate,  Next: pmirror, lmirror, smirror, 2dpmirror, 2dlmirror,  Up: Transformations,
-
-
-SYNOPSIS
-
-	
-	rotate name [name ...] x y z dx dy dz angle
-
-	2drotate name [name ...] x y angle
-
-
-PURPOSE
-
-
-To rotate a 3d point,  curve or surface use   the rotate command.  You
-must give an  axis of rotation with  a point x,y,z, a  vector dx,dy,dz
-and an angle in degree.
-
-For a 2d rotation you must only give the center and the angle. In 3d
-or 2d the angle can be negative.
-
-
-EXAMPLE
-
-
-	# make an helix of circles
-	circle c0 10 0 0 3
-	for {set i 1} {$i <= 10} {incr i} {
-		copy c[expr $i-1] c$i
-		translate c$i 0 0 3
-		rotate c$i 0 0 0 0 0 1 36
-	}
-
-
-Node: pmirror, lmirror, smirror, 2dpmirror, 2dlmirror,  Prev: rotate, 2drotate,  Next: pscale, 2dpscale,  Up: Transformations,
-
-
-SYNOPSIS
-
-
-	pmirror name [name ...] x y z
-
-	lmirror name [name ...] x y z dx dy dz
-
-	smirror name [name ...] x y z dx dy dz
-
-	2dpmirror name [name ...] x y
-
-	2dlmirror name [name ...] x y dx dy
-
-
-PURPOSE
-
-
-The  mirrors  command make  a  mirror transformation   of  a 3d or  2d
-geometry. pmirror is the point  mirror, or central symetry, lmirror is
-the  line mirror  or axial symetry,  smirror is  the surface mirror or
-planar symetry, the plane of symetry is perpendicular to dx,dy,dz.
-
-In  2d we  have only 2dpmirror,  the  point symetry, and 2dlmirror the
-axis symetry.
-
-
-EXAMPLE
-
-
-	# build 3 images of a torus
-
-	torus t 10 10 10 1 2 3 5 1
-	copy t t1
-	pmirror t1 0 0 0
-	copy t t2
-	lmirror t2 0 0 0 1 0 0
-	copy t t3 
-	smirror t3 0 0 0 1 0 0
-
-
-Node: pscale, 2dpscale,  Prev: pmirror, lmirror, smirror, 2dpmirror, 2dlmirror,  Next: ,  Up: Transformations,
-
-
-SYNOPSIS
-
-
-	pscale name [name ...] x y z s
-
-	2dpscale name [name ...] x y s
-
-
-PURPOSE
-
-
-Use  the pscale and  2dpscale commands to  transform  an object with a
-point scaling  (central homotetic).  You must give  the center and the
-scaling factor.  Using a scaling factor of -1 is similar to pmirror.
-
-
-EXAMPLE
-
-
-	# double the size of a sphere
-	sphere s 0 0 0 10
-	pscale s 0 0 0 2
-
-
-Node: Analysis of curves and surfaces ,  Prev: Transformations,  Next: Intersections,  Up: Geometry commands,
-
-
-Draw   provides methods to     compute  information about curves   and
-surfaces.
-
-- Use coord to find the coordinates of a point.
-
-- Use cvalue and    2dcvalue to compute  points and    derivatives on
-curves.
-
-- Use svalue to compute points and derivatives on a surface.
-
-- Use localprop   and minmaxcurandif to   compute the curvature  on  a
-curve.
-
-- Use parameters to compute U,V values for a point on a surface.
-
-- Use proj and 2dproj to project a point on a curve or a surface.
-
-- Use surface_radius to compute the curvalture on a surface.
-
-
-
-
-* Menu:
-
-* coord::
-* cvalue, 2dcvalue::
-* svalue::
-* localprop, minmaxcurandif::
-* parameters::
-* proj, 2dproj::
-* surface_radius::
-
-
-Node: coord,  Prev: ,  Next: cvalue, 2dcvalue,  Up: Analysis of curves and surfaces ,
-
-
-SYNOPSIS
-
-
-	coord point x y [z]
-
-
-PURPOSE
-
-
-The  coord command will   store in  the   variable x,   y  and  z  the
-coordinates of the point.
-
-
-EXAMPLE
-
-
-	# translate a point
-	point p 10 5 5
-	translate p 5 0 0
-	coord p x y z
-	# x value is 15
-
-
-SEE ALSO
-
-point
-
-
-Node: cvalue, 2dcvalue,  Prev: coord,  Next: svalue,  Up: Analysis of curves and surfaces ,
-
-
-SYNOPSIS
-
-
-	cvalue curve u [x y z [d1x d1y d1z [d2x d2y d2z]]] [P]
-
-	2dcvalue curve u [x y [d1x d1y [d2x d2y]]] [P]
-
-
-PURPOSE
-
-
-Depending on the number of arguments this command  computes on a curve
-at a given parameter : the  coordinates in x,y,z, the first derivative
-in d1x,d1y,d1z, the second derivative in d2x,d2y,d2z  and set in P the
-point of coordinates x,y,z.
-
-
-EXAMPLE
-
-
-	# on a bezier curve at parameter 0
-	# the point is the first pole
-	# the derivative is the vector first to second pole 
-	# multiplied by the degree
-	# the second derivative is the difference
-	#  first to second pole, second to third pole
-	# multiplied by degree * degree-1
-	2dbeziercurve c 4 0 0 1 1 2 1 3 0
-	2dcvalue c 0 x y d1x d1y d2x d2y P
-
-	# values of x y d1x d1y d2x d2y
-	# are 0 0 3 3 0 -6
-	# and displays the point P(0,0,3)
-
-
-Node: svalue,  Prev: cvalue, 2dcvalue,  Next: localprop, minmaxcurandif,  Up: Analysis of curves and surfaces ,
-
-
-SYNOPSIS
-
-
-	svalue surface u v [x y z [dux duy duz dvx dvy dvz [d2ux d2uy
-d2uz d2vx d2vy d2vz d2uvx d2uvy d2uvz]]] [P]
-
-
-PURPOSE
-
-
-Use  the svalue command to compute  point and derivatives on a surface
-at a  pair of parameter  values, the  result depends on  the number of
-arguments. You can compute up  to order two  of derivation and display
-the resulting point.
-
-
-EXAMPLE
-
-
-	# display points on a sphere
-	sphere s 10
-	for {dset t 0} {[dval t] <= 1} {dset t t+0.01} {
-	   svalue s t*2*pi t*pi-pi/2 x y z
-	   point . x y z
-	}
-
-	# can also be written
-	sphere s 10
-	for {dset t 0} {[dval t] <= 1} {dset t t+0.01} {
-	   svalue s t*2*pi t*pi-pi/2 .
-	}
-
-
-Node: localprop, minmaxcurandif,  Prev: svalue,  Next: parameters,  Up: Analysis of curves and surfaces ,
-
-
-SYNOPSIS
-
-
-	localprop curve u
-	
-	minmaxcurandif curve
-
-
-PURPOSE
-
-
-The localprop  command computes on a  curve the  curvature and display
-the osculationg circle. The  minmaxcurandif command computes and print
-the parameters where the curvature is minimum or maximum on a curve.
-
-
-EXAMPLE
-
-
-	# show curvature at the center of a bezier curve
-	beziercurve c 3 0 0 0 10 2 0 20 0 0
-	localprop c 0.5
-
-
-SEE ALSO
-
-surface_radius
-
-
-Node: parameters,  Prev: localprop, minmaxcurandif,  Next: proj, 2dproj,  Up: Analysis of curves and surfaces ,
-
-
-SYNOPSIS
-
-
-	parameters surface x y z u v
-
-
-PURPOSE
-
-
-The parameters command returns in variables u and  v the parameters on
-the surface of  the 3d point x,y,z. This  command can be used  only on
-analytical surfaces, plane, cylinder, cone, sphere, torus.
-
-
-EXAMPLE
-
-
-	# Compute parameters on a plane
-	plane p 0 0 10 1 1 0
-	parameters p 5 5 5 u v
-	# the values of u and v are 0 5
-
-
-Node: proj, 2dproj,  Prev: parameters,  Next: surface_radius,  Up: Analysis of curves and surfaces ,
-
-
-SYNOPSIS
-
-
-	proj name x y z
-
-	2dproj name xy
-
-
-PURPOSE
-
-
-Use proj to project a point on a  curve or a  surface and 2dproj for a
-2d  curve, the  command  will  compute  and display  all points  at an
-extreme distance. The  lines joining the point  to the projections are
-created with names such as ext_1, ext_2, ...
-
-
-EXAMPLE
-
-
-	# project point on a torus
-	torus t 20 5
-	proj t 30 10 7
-
-
-Node: surface_radius,  Prev: proj, 2dproj,  Next: ,  Up: Analysis of curves and surfaces ,
-
-
-SYNOPSIS
-
-
-	surface_radius surface u v [c1 c2]
-
-
-PURPOSE
-
-
-Use the  surface radius command  to compute  the  main curvatures of a
-surface at parameters u,v. If there are extra arguments the curvatures
-are stored in variables c1 and c2.
-
-
-EXAMPLE
-
-
-	# computes curvatures of a cylinder
-	cylinder c 5
-	surface_radius c pi 3 c1 c2
-
-
-WARNINGS
-
-
-The radii are displayed and the curvatures are returned, the radius is
-the inverse of the curvature.
-
-
-Node: Intersections,  Prev: Analysis of curves and surfaces ,  Next: Approximations,  Up: Geometry commands,
-
-
-To  compute intersections of surfaces,   use the intersect command; to
-compute intersections of 2d curves, use the 2dintersect command.
-
-
-
-
-* Menu:
-
-* intersect::
-* 2dintersect::
-
-
-Node: intersect,  Prev: ,  Next: 2dintersect,  Up: Intersections,
-
-
-SYNOPSIS
-
-
-	intersect name surface1 surface2 [tolerance]
-
-
-PURPOSE
-
-
-Use the intersect  command to intersect  two surfaces, if there is one
-intersection curve it will be named "name", if there are more than one
-they will be named "name_1", "name_2", ... The precision of the result
-is the given tolerance,  this is important  when a spline is fitted to
-the result curve. The default tolerance is 1e-7.
-
-
-EXAMPLE
-
-
-	# create an ellipse
-	cone c 45 0
-	plane p 0 0 40 0 1 5
-	intersect e c p
-
-
-Node: 2dintersect,  Prev: intersect,  Next: ,  Up: Intersections,
-
-
-SYNOPSIS
-
-
-	2dintersect curve1 curve2
-
-
-PURPOSE
-
-
-Display the intersection points between two 2d curves.
-
-
-EXAMPLE
-
-
-	# intersect two 2d ellipses
-	ellipse e1 0 0 5 2
-	ellipse e2 0 0 0 1 5 2
-	2dintersect e1 e2
-
-
-Node: Approximations,  Prev: Intersections,  Next: Constraints,  Up: Geometry commands,
-
-
-Draw   provides   commandd   to  create   curves    and  surfaces   by
-approximations.  2dapprox to fit  a curve through  2d points. appro to
-fit  a curve through  3d points. surfapp and  grilapp to fit a surface
-through 3d points. 2dinterpolate can be used to interpolate a curve.
-
-
-
-
-* Menu:
-
-* appro, 2dapprox, 2dinterpolate::
-* surfapp, grilapp::
-
-
-Node: appro, 2dapprox, 2dinterpolate,  Prev: ,  Next: surfapp, grilapp,  Up: Approximations,
-
-
-SYNOPSIS
-
-
-	appro name nbpoints [curve]
-
-	2dapprox name name nbpoints [curve / x1 y1 x2 y2 ...] 
-
-	2dinterpolate name name nbpoints [curve / x1 y1 x2 y2 ...] 
-
-
-PURPOSE
-
-
-Fit a curve through a set of points, first  give the number of points,
-then there   are three ways   to  give the points.  Without  arguments
-interactivly click  the points,  with a  curve  argument  computes the
-points on the curve, else give a list of points.
-
-
-EXAMPLE
-
-
-	# pick ten points and they will be fit
-	2dapprox c 10
-
-
-Node: surfapp, grilapp,  Prev: appro, 2dapprox, 2dinterpolate,  Next: ,  Up: Approximations,
-
-
-SYNOPSIS
-
-
-	surfapp name nbupoints nbvpoints x y z ....
-
-	grilapp name nbupoints nbvpoints xo dx yo dy z11 z12 ...
-
-
-PURPOSE
-
-
-Use   surfapp   to   fit a    surface  through an    array   of points
-nbupoints*nbvpoints. grilapp do  the same but  the  x,y coordinates of
-the points are on a grid starting at x0,y0 with steps dx,dy.
-
-
-Node: Constraints,  Prev: Approximations,  Next: Display,  Up: Geometry commands,
-
-
-The command cirtang is used to construct 2d  circles tangent to curves
-and lintan to construct 2d lines tangent to curves.
-
-
-
-
-* Menu:
-
-* cirtang::
-* lintan::
-
-
-Node: cirtang,  Prev: ,  Next: lintan,  Up: Constraints,
-
-
-SYNOPSIS
-
-
-	cirtang name  c1 c2 c3
-
-
-PURPOSE
-
-
-The  cirtang  command will build   all  circles satsifying  the  three
-constraints  c1,c2,c3.  The constraints are   either, a curve then the
-circle must be  tangent to that curve,   a point then the  circle must
-pass through that point, a radius for the circle.  Only one constraint
-can  be a radius.  The  solutions will be  stored  in variables called
-name_1, name_2, ...
-
-
-EXAMPLE
-
-
-	# a point, a line and a radius. 2 solutions
-	point p 0 0
-	line l 10 0 -1 1
-	cirtan c p l 4
-
-
-Node: lintan,  Prev: cirtang,  Next: ,  Up: Constraints,
-
-
-SYNOPSIS
-
-
-	lintan name curve curve [angle]
-
-
-PURPOSE
-
-
-
-The lintan command will build all 2d lines tangent to two curves. If a
-third angle  argument  is given the second   curve must be a line  and
-lintan  will build  all lines tangent  to the  first curve  making the
-given angle  with the  line.   The angle  is defined  in  degree.  The
-solutions are named name_1, name_2, ...
-
-
-EXAMPLE
-
-
-	# lines tangent to 2 circles, 4 solutions
-	circle c1 -10 0 10
-	circle c2 10 0 5
-	lintan l c1 c2
-
-
-Node: Display,  Prev: Constraints,  Next: ,  Up: Geometry commands,
-
-
-Draw     provides  commands to   control    the  display of  geometric
-objects. Some  display parameters are used  for all  objects, some are
-valid only for  surfaces, some are  valid only for bezier and bspline,
-and some only for bspline.
-
-On curve and surfaces you can control the display mode (how points are
-computed)  with the dmode  command.  And the   parameters for the mode
-with the defle command and the discr command to control the deflection
-and the discretisation.
-
-On  surfaces you    can control the   number   of isoparametric curves
-displayed on the surface with the nbiso command.
-
-On bezier and bspline curve and surface you can toggle the display of
-the control points with the clpoles and shpoles commands.
-
-On bspline curves and surfaces you can toggle the display of the knots
-with the shknots clknots commands.
-
-
-
-* Menu:
-
-* dmod, discr, defle::
-* nbiso::
-* clpoles, shpoles::
-* clknots, shknots::
-
-
-Node: dmod, discr, defle,  Prev: ,  Next: nbiso,  Up: Display,
-
-
-SYNOPSIS
-
-
-	dmode name [name ...] u/d
-
-	discr name [name ...] nbintervals
-
-	defle name [name ...] deflection
-
-
-PURPOSE
-
-
-You can choose   the display mode for a   curve or a  surface with the
-dmode command. The display mode defines how the points are computed to
-create the polygon  to display the  curve or the  surface.
-
-In "u"  mode, known as uniform  deflection, the points are computed to
-keep the  polygon  at a distance  lower  than the deflection  from the
-geometry. The  deflection is set with the  defle command. This mode is
-more computer intensive.
-
-In "d"  mode,  known as  discretisation, a fixed  number of  points is
-computed, this  number  is set  with the discr  command.   This is the
-default mode. On a bspline the fixed  number of points is computed for
-each span of the curve. (A span is the interval between two knots).
-
-If  the   curves  are    not smooth  you  can    either  increase  the
-discretisation  or lower the  deflection,  depending  on the mode   in
-use. This will increase the number of points.
-
-
-EXAMPLE
-
-
-	# increment the number of points on a big circle
-	circle c 0 0 50 50
-	discr 100
-
-	# change the mode
-	dmode c u
-
-
-Node: nbiso,  Prev: dmod, discr, defle,  Next: clpoles, shpoles,  Up: Display,
-
-
-SYNOPSIS
-
-
-	nbiso surface [surface  ...] nbuiso nbviso
-
-
-PURPOSE
-
-	
-Use the nbiso  command to change  the  number of  isoparametric curves
-displayed  on a surface  in  the U and V   directions. Note that on  a
-bspline surface  by  default  isoparametrics  are displayed  at  knots
-values, using nbiso will remove this feature.
-
-
-EXAMPLE
-
-
-	# display 35 meridians and 15 parallels on a sphere
-	sphere s 20
-	nbiso s 35 15
-
-
-Node: clpoles, shpoles,  Prev: nbiso,  Next: clknots, shknots,  Up: Display,
-
-
-SYNOPSIS
-
-
-	clpoles name
-
-	shpoles name
-
-
-PURPOSE
-
-
-On bezier and  bspline  curves and   surfaces the control  polygon  is
-displayed by default, you can suppress it with the clpoles command and
-restore it with the shpoles command.
-
-
-EXAMPLE
-
-
-	# create a bezier curve and erase the poles
-	beziercurve c 3 0 0 0 10 0 0 10 10 0
-	clpoles c
-
-
-Node: clknots, shknots,  Prev: clpoles, shpoles,  Next: ,  Up: Display,
-
-
-SYNOPSIS
-
-
-	clknots name
-
-	shknots name
-
-
-PURPOSE
-
-
-By default on a  bspline curve and  surface knots are displayed with a
-marker at the points  with a parametric value equal  to the knots. You
-can remove  them with the clknots  commands and restore them  with the
-shknots command.
-
-
-EXAMPLE
-
-
-	# hide the knots on a circle converted to spline
-	circle c 0 0 5
-	convert c c
-	clknots c
-
-
-Node: Topology commands,  Prev: Geometry commands,  Next: Index,  Up: Top,
-
-
-Draw  provides a set of commands  to test topology libraries. Topology
-libraries are provided with the  TOPOLOGY UL. Those commnads are found
-in the  TTOPOLOGY  executable   or in any   executable   including the
-BRepTest commands.
-
-The topology adds a new type of  variable in Draw, the shape variable,
-shape is a topological object, it can be a Vertex,  an Edge, a Wire, a
-Face, a Shell, a Solid, a CompSolid or a Compound,  you are invited to
-refer to the topology documentation for more information.
-
-Shapes are usually shared,  i.e. the Draw  copy command will create  a
-new shape sharing its representation with the original, but two shapes
-sharing  their  topology can  be moved independently  (see the section
-about transformations for more details).
-
-The following sections cover the topics
-
-- Basic shape commands, to handle the structure of shapes and control
-the display.
-
--  Curves  and   surfaces  topology,  methods  to   make topology from
-geometry, or vice versa.
-
-- The profile method to make planar profiles.
-
-- Primitive construction commands. Box, cylinder, ...
-
-- Sweeping of shapes.
-
-- Transformations of shapes. Translation, copy, ....
-
-- Topological operations, also known as booleans.
-
-- Local operations. Features, holes.
-
-- Drafting and blending.
-
-- Analysis of shapes. Length, area, volume....
-
-
-
-* Menu:
-
-* Basic topology::
-* Curve and surfaces topology::
-* Making profiles::
-* Primitives::
-* Sweeping::
-* Topology transformation::
-* Topological operations::
-* Local operations::
-* Drafting and blending::
-* Topology analysis::
-
-
-Node: Basic topology,  Prev: ,  Next: Curve and surfaces topology,  Up: Topology commands,
-
-
-The basic  set of  commands  allows simple  operations  on shapes,  or
-stepwise constructions of objects which  may be far from simple.  They
-are useful for analysis of shapes structure.
-
-- Shapes are displayed with isoparametric curves on the faces, this is
-controlled with the isos command. The number of points used to display
-the shapes curves can be modified with the discretisation command.
-
-- To  modify  topological   attributes such  as  the  orientation  use
-orientation, complement and invert.
-
--  To analyse   the structure  of  a  shape, use  explode,  exwire and
-nbshapes.
-
-- To create   shapes by  stepwise  construction,  use emptycopy,  add,
-compound.
-
-
-
-
-* Menu:
-
-* isos, discretisation::
-* orientation, complement, invert::
-* explode, exwire, nbshapes::
-* emptycopy, add, compound::
-
-
-Node: isos, discretisation,  Prev: ,  Next: orientation, complement, invert,  Up: Basic topology,
-
-
-SYNOPSIS
-
-
-	isos [name ...] nbisos
-
-	discretisation nbpoints
-
-
-PURPOSE
-
-
-Shapes are displayed  by a set of curves,  the edges and isoparametric
-curves on the faces.  There is color coding for  the edges, a red edge
-is  an isolated edge (belongs to   no faces), a  green edge  is a free
-boundary edge (belongs  to one face), a  yellow edge is  a shared edge
-(at least two faces).
-
-You can change the number of  isoparametric curves on shapes using the
-isos commands. Nnote that the  same number  is  used for  the U and  V
-directions, if you give no shape arguments the value  you give will be
-the new default value (originally 2), if  you give no arguments at all
-the command prints the current default value.
-
-You can change the default number of points used to display the curves
-with the discretisation command. The original value is 30.
-
-
-EXAMPLE
-
-
-	# Display only the edges (the wireframe)
-	isos 0
-
-
-WARNINGS
-
-
-Do not get confused with the geometric commands nbisos and discr which
-control the display of geometry.
-
-
-Node: orientation, complement, invert,  Prev: isos, discretisation,  Next: explode, exwire, nbshapes,  Up: Basic topology,
-
-
-SYNOPSIS
-
-
-	orientation name [name ...] F/R/E/I
-	
-	complement name [name ...]
-
-	invert name
-
-
-PURPOSE
-
-
-These commands are used to change the orientation of shapes.
-
-The orientation command sets one of the four values, FORWARD, REVERSED,
-INTERNAL, EXTERNAL
-
-The   complement command changes    the   current orientation to   its
-complement, FORWARD <-> REVERSED, INTERNAL <-> EXTERNAL.
-
-The invert command creates a new shape which is a copy of the original
-with all subshapes orientation  reversed. It is  useful for example to
-reverse the normals of a solid.
-
-
-EXAMPLE
-
-
-	# invert normals of a box
-	box b 10 20 30
-	normals b 5
-	invert b
-	normals b 5
-
-
-Node: explode, exwire, nbshapes,  Prev: orientation, complement, invert,  Next: emptycopy, add, compound,  Up: Basic topology,
-
-
-SYNOPSIS
-
-
-	explode name [C/So/Sh/F/W/E/V]
-
-	exwire name
-
-	nbshapes name
-
-
-PURPOSE
-
-
-The explode command is very useful to extract  subshapes from a shape,
-the subshapes will be named name_1, name_2, ... Note that they are not
-copied but shared with the original.  Without other arguments than the
-shape explode will extract the first sublevel of shapes, the shells of
-a solid, the  edges of a wire for  example.  With  an argument explode
-will extract all subshapes of the given type,  C for compounds, So for
-solids, Sh for shells, F  for faces, W for  wires, E for edges, V  for
-vertices.
-
-The  exwire command  is a  special case  of   explode for  wires which
-extract the edges in an  ordered way  if  possible. i/e/ each edge  is
-connected to the following one by a vertex.
-
-The  nbshapes command counts the  number of shapes  of  each type in a
-shape.
-
-
-EXAMPLE
-
-
-	# on a box
-	box b 10 20 30
-
-	# whatis returns the type and various information
-	whatis b
-	=> b is a shape SOLID FORWARD Free Modified	
-
-	# make one shell
-	explode b
-	whatis b_1
-	=> b_1 is a shape SHELL REVERSED Modified Orientable Closed
-
-	# extract the edges b_1, ... , b_12
-	explode b e
-	==> b_12
-
-	# count subshapes
-	nbshapes b
-	==>
-	Number of shapes in b
-	 VERTEX    : 8
-	 EDGE      : 12
-	 WIRE      : 6
-	 FACE      : 6
-	 SHELL     : 1
-	 SOLID     : 1
-	 COMPSOLID : 0
-	 COMPOUND  : 0
-	 SHAPE     : 34
-	
-
-
-Node: emptycopy, add, compound,  Prev: explode, exwire, nbshapes,  Next: ,  Up: Basic topology,
-
-
-SYNOPSIS
-
-
-	emptycopy [newname] name
-
-	add name toname
-
-	compound [name ...] compoundname
-
-
-PURPOSE
-
-
-The emptycopy command creates a new shape from an existing one without
-subshapes, only the geometry, if there is one,  is used. The new shape
-is  stored with  the   same  name  if   the newname  argument  is  not
-given. This command is useful to modify a frozen shape, a frozen shape
-is a shape used by an other shape, it cannot be modifed, so it must be
-emptycopied and its subshape may be reinserted with the add command.
-
-The  add command insert a  reference to a shape in   an other one, the
-shapes must be compatible (you cannot insert a face  into an edge) and
-the modified shape must not be  frozen.  (However, using emptycopy and
-add requires caution).
-
-The compound command is very safe, it  creates a compound from shapes,
-if no shapes are given the compound is empty.
-
-
-EXAMPLE
-
-
-	# a compound with three boxes
-
-	box b1 0 0 0 1 1 1
-	box b2 3 0 0 1 1 1
-	box b3 6 0 0 1 1 1
-	compound b1 b2 b3 c
-
-
-Node: Curve and surfaces topology,  Prev: Basic topology,  Next: Making profiles,  Up: Topology commands,
-
-
-This group  of commands is used to  create topology from shapes and to
-extract shapes geometry. Note   that these commands are  low-level, to
-create    faces or wires the  profile   command described  in the next
-section is usually more appropriate.
-
-- To create vertices use the vertex command.
-
-- To create edges use the edge, mkedge commands.
-
-- To create wires use the wire, polyline, polyvertex commands.
-
-- To create faces use the mkplane, mkface commands.
-
-- To extract the geometry from edges or faces use the mkcurve and
-mkface commands.
-
-- To extract the 2d curves for edges on faces use the pcurve command.
-
-
-
-
-* Menu:
-
-* vertex::
-* edge, mkedge::
-* wire, polyline, polyvertex::
-* mkplane, mkface::
-* mkcurve, mkface::
-* pcurve::
-
-
-Node: vertex,  Prev: ,  Next: edge, mkedge,  Up: Curve and surfaces topology,
-
-
-SYNOPSIS
-
-
-	vertex name [x y z / p edge]
-
-
-PURPOSE
-
-
-Creates a vertex at a  3d location, the  location is a x,y,z point  or
-the point at parameter p on an edge.
-
-
-EXAMPLE
-
-
-	vertex v1 10 20 30
-
-
-Node: edge, mkedge,  Prev: vertex,  Next: wire, polyline, polyvertex,  Up: Curve and surfaces topology,
-
-
-SYNOPSIS
-
-
-	edge name vertex1 vertex2
-
-	mkedge edge curve [surface] [pfirst plast] [vfirst [pfirst] vlast [plast]] 
-
-
-PURPOSE
-
-
-The edge command creates a straight line edge between two vertices. Of
-course they must not be at the same location.
-
-The mkedge command allows the creation  of edges from  curves, it is a
-quite complete command corresponding to the BRepAPI_MakeEdge class. It
-can create an edge from  a curve, two parameters can  be given for the
-vertices (the default are the first and last parameters of the curve),
-vertices can also be given  with their parameters, this option  allows
-to  inhibate the creation of  new  vertices, if  the parameters of the
-vertices are    not  given they are  computed    by projection on  the
-curve. Instead of a 3d curve a 2d curve and a surface can be given.
-
-
-EXAMPLE
-
-
-	# straight line edge
-	vertex v1 10 0 0
-	vertex v2 10 10 0
-	edge e1 v1 v2
-
-	# make a circular edge
-	circle c  0 0 0 5
-	mkedge e2 c 0 pi/2
-
-	# the same result may be achieved with a trimmed curve
-	# trimmed curves are recognised removed my mkedge
-	trim c c 0 pi/2
-	mkedge e2 c
-
-
-Node: wire, polyline, polyvertex,  Prev: edge, mkedge,  Next: mkplane, mkface,  Up: Curve and surfaces topology,
-
-
-SYNOPSIS
-
-
-	wire name name1 [name2 ...]
-
-	polyline name x1 y1 z1 x2 y2 z2 ...
-
-	polyvertex name v1 v2 ...
-
-
-PURPOSE
-
-
-The wire command creates a wire from edges or wires,  the order of the
-elements  must  ensure  that  the  wire  is  connected.   The vertices
-locations  are compared to   detect  connection, if the vertices   are
-differents new  edges are created  to ensure topological connectivity,
-so the original edge may be copied in the wire.
-
-The polyline command creates a polygonal wire from points coordinates,
-to make a closed wire you should repeat the first point at the end.
-
-The polyvertex command creates a polygonal wire from vertices.
-
-
-EXAMPLE
-
-
-	# create two polygonal wires
-	# and glue them
-
-	polyline w1 0 0 0 10 0 0 10 10 0
-	polyline w2 10 10 0 0 10 0 0 0 0
-	wire w w1 w2	
-
-
-Node: mkplane, mkface,  Prev: wire, polyline, polyvertex,  Next: mkcurve, mkface,  Up: Curve and surfaces topology,
-
-
-SYNOPSIS
-
-
-	mkplane name wire
-
-	mkface mkface name surface [ufirst ulast vfirst vlast]
-
-
-PURPOSE
-
-
-Use the mkplane command  to make a face  from a planar wire, the plane
-surface will be  constructed with  an  orientation  to keep  the  face
-inside the wire.
-
-Use the mkface command to make a face from a surface, parameter values
-can be given to trim a rectangular area, the default are the bounds of
-the surface.
-
-
-EXAMPLE
-
-
-	# make a polygonal face
-	polyline f 0 0 0 20 0 0 20 10 0 10 10 0 10 20 0 0 20 0 0 0 0
-	mkplane f f
-
-	# make a cylindrical face
-	cylinder g 10
-	trim g g -pi/3 pi/2 0 15
-	mkface g g
-
-
-Node: mkcurve, mkface,  Prev: mkplane, mkface,  Next: pcurve,  Up: Curve and surfaces topology,
-
-
-SYNOPSIS
-
-
-	mkcurve name edge
-	
-	mksurface name face
-
-
-PURPOSE
-
-
-Use the mkcurve command  to create a 3d curve  from an edge, the curve
-will be  trimmed to the  edge boundaries, this  is not possible if the
-edge has no 3d curve.
-
-Use the mksurface command to make a surface from a face, the surface
-is not trimmed.
-
-
-EXAMPLE
-
-
-	# make a line
-	vertex v1 0 0 0
-	vertex v2 10 0 0
-	edge e v1 v2
-	mkcurve l e
-
-
-Node: pcurve,  Prev: mkcurve, mkface,  Next: ,  Up: Curve and surfaces topology,
-
-
-SYNOPSIS
-
-
-	pcurve [name edge] face
-
-
-PURPOSE
-
-
-The pcurve command extracts the 2d curve of an edge  on a face. If the
-only argument is a face the command extracts all  the curves and color
-them according to their orientation.  This is very  useful to check if
-the edges    in  a face  are   correctly  oriented,  i.e.   they  turn
-counterclockwise.
-
-
-EXAMPLE
-
-
-	# view the pcurves of a face
-	plane p 
-	trim p p -1 1 -1 1
-	mkface p p
-	av2d; # a 2d view
-	pcurve p
-	2dfit
-
-
-WARNINGS
-
-
-If you do not see anything, may  you forgot to create  a 2d view or to
-fit it woth the 2dfit command.
-
-
-Node: Making profiles,  Prev: Curve and surfaces topology,  Next: Primitives,  Up: Topology commands,
-
-
-The  profile command is  a  powerfull tool  to  create planar faces or
-wires made   of   straight lines an  circles   which  are  current  in
-mechanical applications.
-
-
-
-
-* Menu:
-
-* profile::
-
-
-Node: profile,  Prev: ,  Next: ,  Up: Making profiles,
-
-
-SYNOPSIS
-
-
-	profile name [instruction parameters instruction parameters ....]
-
-
-PURPOSE
-
-
-The  profile command  creates  a   planar  profile  from   a list   of
-instructions.  The profile  is created in 2d on  a plane starting from
-point 0,0 and  direction X (1,0), some  instructions creates a segment
-of line or   an arc of   circle moving the  point  and setting  a  new
-direction to the tangent of the profile. Other instructions modify the
-current direction, the plane or terminate the profile.
-
-Instructions are one or  two upper or  lowercase letter, followed by a
-fixed number of arguments. The angles are given in degree.
-
-
-- O X Y Z, Set the origin of the plane (default value is 0 0 0)
-
-- P DX DY DZ UX UY UZ, Set the normal and X direction of the plane,
-(default value is 0 0 1 1 0 0, an X Y plane)
-
-- X DX, Move the point along X axis.
-
-- Y DY, Move the point along Y axis.
-
-- L DL, Move the point along the current direction by length DL.
-
-- XX X, Set point X coordinate (absolute value).
-
-- YY Y, Set point Y coordinate (absolute value).
-
-- T DX DY, Translate the point.
-
-- TT X Y, Set the point (absolute coordinates).
-
-- R Angle, Rotate the direction (clockwise).
-
-- RR Angle, Set the direction (absolute angle from X axis).
-
-- D DX DY, Set the direction (DX DY will be normalized).
-
-The instructions starting with I  will   intersect the line defined   by the
-point and the direction with a curve and move to this new point.
-
-- IX X, Intersect with a vertical (absolute X value).
-
-- IY Y, Intersect with an horizontal (absolute X value).
-
-- C Radius Angle, Make an arc of circle tangent to the current direction.
-
-By  default the profile  is closed and a face  is created, to create a
-closed or open   wire  the following instructions  may  be  used.  The
-profile will be terminated.
-
-- W, Make a closed wire.
-
-- WW, Make an open wire.
-
-
-EXAMPLE
-
-
-	# Make a square with two fillets on the top 
-	# and a half-circle on the bottom
-	
-	profile f x 5 r -90 c 5 180 x 5 y 8 c 2 90 xx 2 c 2 90
-
-
-Node: Primitives,  Prev: Making profiles,  Next: Sweeping,  Up: Topology commands,
-
-
-Primitive commands allow the creation of simple shapes.
-
-- box and wedge commands.
-
-- pcylinder, pcone, psphere, ptorus commands.
-
-
-
-
-* Menu:
-
-* box, wedge::
-* pcylinder, pcone, psphere, ptorus::
-
-
-Node: box, wedge,  Prev: ,  Next: pcylinder, pcone, psphere, ptorus,  Up: Primitives,
-
-
-SYNOPSIS
-
-
-	box name [x y z] dx dy dz
-
-	wedge name dx dy dz ltx / xmin zmin xmax xmax
-
-
-PURPOSE
-
-
-Use  the box  command to   create a  box   parallel to  the axes  with
- dx,dy,dz dimensions.  x,y,z  is the corner  of the box, by default it
-is the origin.
-
-Use the wedge  command to create  a wedge, a wedge  has six faces, one
-face in  the OXZ plane has  dimensions dx,dz the  other face is in the
-plane y  = dy.    It  has  dimensions ltx,dz   or  it is    bounded by
-xmin,zmin,xmax,zmax. The other faces are  defined between those faces.
-The face in the y=yd plane may  be degenerated into a  line if ltx = 0
-or a point if xmin =  xmax and ymin  = ymax, in  this case there are 5
-faces. To position the wedge use the ttranslate and trotate commands.
-
-
-EXAMPLE
-
-
-	# a box at the origin
-	box b1 10 20 30
-	
-	# an other box
-	box b2 30 30 40 10 20 30
-
-	# a wedge
-	wedge w1 10 20 30 5
-
-	# a wedge with a sharp edge (5 faces)
-	wedge w2 10 20 30 0
-
-	# a pyramid
-	wedge w3 20 20 20 10 10 10 10
-
-
-Node: pcylinder, pcone, psphere, ptorus,  Prev: box, wedge,  Next: ,  Up: Primitives,
-
-
-SYNOPSIS
-
-
-	pcylinder name [plane] radius height [angle]
-
-	pcone name [plane] radius1 radius2 height [angle]
-
-	pcone name [plane] radius1 radius2 height [angle]
-
-	psphere name [plane] radius1 [angle1 angle2] [angle]
-
-	psphere name [plane] radius1 radius2 [angle1 angle2] [angle]
-
-
-PURPOSE
-
-
-All  these commands create   solids in the default  coordinate system,
-using the Z axis as the axis of revolution and the X axis as origin of
-angles.   To  use  another system  you  can  translate and rotate  the
-resulting solid  or  use a plane  as  the first  argument to specify a
-coordinate  system.   Note that  this is   quite different because the
-translation and  rotation only change  the  coordinate  system of  the
-object.  All  primitives have an optional  last  argument which  is an
-angle  in degree around  the  Z axis, starting from   the X axis.  The
-default is 360.
-
-The  pcylinder command creates a cylindrical   block around with given
-radius and height.
-
-The pcone command creates a truncated cone of given height with radius
-radius1 in  the plane z =  0 and radius2 in the  plane z = heigth. The
-radii must not be negative but one of them can be null.
-
-The psphere command creates a solid sphere  centered at the origin, if
-two angles angle1 and  angle2 are given the solid  will be  limited by
-two planes at latitude angle1 and angle2 in degree. The angles must be
-increasing and in the range -90,90.
-
-The ptorus command creates a solid torus centered at the origin around
-the z axis with given radii, if two increasing angles in degree in the
-range 0 360 are given the solid will be bounded by two planar surfaces
-at these positions on the circle.
-
-
-EXAMPLE
-
-
-	# make a can
-	pcylinder cy 5 10
-
-	# a quarter of trucated cone
-	pcone co 15 10 10 90
-
-	# three-quarters of sphere
-	psphere sp 10 270
-
-	# half torus
-	ptorus to 20 5 0 90
-
-
-Node: Sweeping,  Prev: Primitives,  Next: Topology transformation,  Up: Topology commands,
-
-
-Sweepinf creates shapes by sweeping a shape along a path.
-
-- prism sweeps along a direction.
-
-- revol sweeps around an axis.
-
-- pipe sweeps along a wire.
-
-
-
-
-
-* Menu:
-
-* prism::
-* revol::
-* pipe::
-
-
-Node: prism,  Prev: ,  Next: revol,  Up: Sweeping,
-
-
-SYNOPSIS
-
-
-	prism name shape dx dy dz ["Copy | Inf | SemiInf]
-
-
-PURPOSE
-
-
-The  prism command creates  a  new shape by  sweeping  a shape along a
-direction. Any  shape can be swept, a   vertex gives an edge,  en edge
-gives a face, a face gives a solid...
-
-The sweeping is  done along  the vector  dx dy dz.  The original shape
-will be shared in  the result unless   "Copy" is specified. If  Inf is
-specified  the  prism is infinite  in  both directions, if  SemiInf is
-specified  the prism is infinite  in the  dx,dy,dz direction, then the
-length of the vector has no meaning.
-
-
-EXAMPLE
-
-
-	# sweep a planar face to make a solid
-	polyline f 0 0 0 10 0 0 10 5 0 5 5 0 5 15 0 0 15 0 0 0 0
-	mkplane f f
-	prism p f 0 0 10
-
-
-Node: revol,  Prev: prism,  Next: pipe,  Up: Sweeping,
-
-
-SYNOPSIS
-
-
-	revol name shape x y z dx dy dz angle [Copy]
-
-
-PURPOSE
-
-
-The revol command creates a new  shape by sweeping  a shape around the
-axis x,y,z dx,dy,dz by  an angle in  degree. As with the prism command
-the shape can be of any type and is not shared if Copy is specified.
-
-
-EXAMPLE
-
-
-	# shell by wire rotation
-	polyline w 0 0 0 10 0 0 10 5 0 5 5 0 5 15 0 0 15 0 
-	revol s w 20 0 0 0 1 0 90
-
-
-Node: pipe,  Prev: revol,  Next: ,  Up: Sweeping,
-
-
-SYNOPSIS
-
-
-	pipe name wire shape
-
-
-PURPOSE
-
-
-The pipe command creates a shape by sweeping a shape known as the
-profile along a wire known as the spine.
-
-
-EXAMPLE
-
-
-	# sweep a circle along a bezier curve to make a solid pipe
-	beziercurve spine 4 0 0 0 10 0 0 10 10 0 20 10 0
-	mkedge spine spine
-	wire spine spine
-	circle profile 0 0 0 1 0 0 2
-	mkedge profile profile
-	wire profile profile
-	mkplane profile profile
-	pipe p spine profile
-
-
-Node: Topology transformation,  Prev: Sweeping,  Next: Topological operations,  Up: Topology commands,
-
-
-Transformations are application  of matrices, when the  transformation
-is  non deforming,  like translation or  rotation,  the object is  not
-copied, we use the topology  local coordinate system feature. The copy
-can be enforced with the tcopy command.
-
-- tcopy makes a copy of the structure of a shape.
-
-- ttranslate, trotate, tmove, reset moves a shape.
-
-- tmirror, tscale always modify the shape.
-
-
-
-
-* Menu:
-
-* tcopy::
-* tmove, treset::
-* ttranslate, trotate::
-* tmirror, tscale::
-
-
-Node: tcopy,  Prev: ,  Next: tmove, treset,  Up: Topology transformation,
-
-
-SYNOPSIS
-
-
-	tcopy name toname [name toname ...]
-
-
-PURPOSE
-
-
-Copy the structure of a shape in a new shape, including the geometry.
-
-
-EXAMPLE
-
-
-	# create an edge from  a curve and copy it
-	beziercurve c 3 0 0 0 10 0 0 20 10 0
-	mkedge e1 c
-	ttranslate e1 0 5 0
-	tcopy e1 e2
-	ttranslate e2 0 5 0
-	
-	# now modify the curve, only e1 will be modified
-	cmovep c 2 0 0 20
-
-
-Node: tmove, treset,  Prev: tcopy,  Next: ttranslate, trotate,  Up: Topology transformation,
-
-
-SYNOPSIS
-
-
-	tmove name [name ...] shape
-
-	reset name [name ...]
-
-
-PURPOSE
-
-
-The tmove and reset command are used to modify  the location, or local
-coordinate system  of  a shape,  tmove  applies  to some  shapes   the
-location  of a  given shape.  reset  removes the location of  a shape,
-restoring it in its original coordinate system.
-
-
-EXAMPLE
-
-
-	# create two boxes
-	box b1 10 10 10
-	box b2 20 0 0 10 10 10
-	# translate the first box
-	ttranslate b1 0 10 0
-	# and apply the same location to b2
-	tmove b2 b1
-	# return to original positions
-	reset b1 b2
-
-
-Node: ttranslate, trotate,  Prev: tmove, treset,  Next: tmirror, tscale,  Up: Topology transformation,
-
-
-SYNOPSIS
-
-
-	ttranslate [name ...] dx dy dz
-
-	trotate [name ...] x y z dx dy dz angle
-
-
-PURPOSE
-
-
-Use the ttranslate  command to translate a  set  of shapes by  a given
-vector, and the  trotate command to rotate  them  by a given angle  in
-degree around  an axis. Both commands  only modify the location of the
-shape. When transforming multiple shapes the same location is used for
-all the shapes,  when a command is used   for each shape,  even if the
-translation or the rotation are the same, a new location is created.
-
-Locations  are very economic in   the data structure because  multiple
-occurrences of an object share the topological description.
-
-
-EXAMPLE
-
-
-	# make rotated copy of a sphere and cylinders
-	pcylinder c1 30 5
-	copy c1 c2
-	ttranslate c2 0 0 20
-	psphere s 3
-	ttranslate s 25 0 12.5
-	for {set i 0} {$i < 360} {incr i 20} {
-	  copy s s$i
-	  trotate s$i 0 0 0 0 0 1 $i
-	}
-
-
-Node: tmirror, tscale,  Prev: ttranslate, trotate,  Next: ,  Up: Topology transformation,
-
-
-SYNOPSIS
-
-
-	tmirror name x y z dx dy dz
-	
-	tscale name x y z scale
-
-
-PURPOSE
-
-
-The tmirror command makes a mirror copy of a shape about a plane x,y,z
-dx,dy,dz, the tscale command applies a central homothety to the shape.
-
-
-EXAMPLE
-
-
-	# mirror a portion of cylinder about the YZ plane
-	pcylinder c1 10 10 270
-	copy c1 c2	
-	tmirror c2 15 0 0 1 0 0
-	# and scale it
-	tscale c1 0 0 0 0.5
-
-
-Node: Topological operations,  Prev: Topology transformation,  Next: Local operations,  Up: Topology commands,
-
-
-Topological operations includes the boolean operations, they are using
-intersections.
-
-- fuse, cut, common are the boolean operations.
-
-- section, psection computes sections.
-
-
-
-
-* Menu:
-
-* fuse, cut, common::
-* section, psection::
-
-
-Node: fuse, cut, common,  Prev: ,  Next: section, psection,  Up: Topological operations,
-
-
-SYNOPSIS
-
-
-	fuse name shape1 shape2
-
-	cut name shape1 shape2
-
-	common name shape1 shape2
-
-
-PURPOSE
-
-
-Creation  of a new  shape by a  boolean  operation between two shapes,
-fuse is  the union, cut  substract the second to  the first, common is
-the intersection.
-
-
-EXAMPLE
-
-
-	# the four boolean operations between a box and a cylinder
-
-	box b 0 -10 5 20 20 10
-	pcylinder c 5 20
-
-	fuse s1 b c
-	ttranslate s1 40 0 0
-
-	cut s2 b c
-	ttranslate s2 -40 0 0
-
-	cut s3 c b
-	ttranslate s3 0 40 0
-
-	common s4 b c
-	ttranslate s4 0 -40 0
-
-
-Node: section, psection,  Prev: fuse, cut, common,  Next: ,  Up: Topological operations,
-
-
-SYNOPSIS
-
-
-	section name shape1 shape2
-
-	psection name shape plane
-
-
-PURPOSE
-
-
-The section  command creates a  compound  with the  intersection edges
-created from the faces of  two shapes, this is  the section line.  The
-psection command do the same between a shape and  a plane. This is the
-planar section.
-
-
-EXAMPLE
-
-
-	# section line between a cylinder and a box
-	pcylinder c 10 20
-	box b 0 0 5 15 15 15
-	trotate b 0 0 0 1 1 1 20
-	section s b c
-
-	# planar section of a cone
-	pcone c 10 30 30
-	plane p 0 0 15 1 1 2
-	psection s c p
-
-
-Node: Local operations,  Prev: Topological operations,  Next: Drafting and blending,  Up: Topology commands,
-
-
-Local operations are boolean operations restricted to some faces of a
-solid.
-
-- localope is the general local operation command, to perform local
-boolean operations.
-
-- hole, firsthole, holend, blindhole are various commands to create
-cylindrical holes.
-
-
-
-
-* Menu:
-
-* localope::
-* hole, firsthole, holend, blindhole, holecontrol::
-
-
-Node: localope,  Prev: ,  Next: hole, firsthole, holend, blindhole, holecontrol,  Up: Local operations,
-
-
-SYNOPSIS
-
-
-	localope name shape tool F/C face [face ...]
-
-
-PURPOSE
-
-
-Use the localope command to perform a  local operation on a shape with
-a  tool. The operation   is a fusion or a   cut (use 'F' or  'C'). The
-operation will  be restricted  to  the designates  faces. The  tool is
-intersected only  with the given  faces  and other faces  necessary to
-close the intersection curves.
-
-This operation is the basis for features implementation.
-
-
-EXAMPLE
-
-
-	# make a box and fuse a cylinder on one side
-	box b 10 10 10
-	pcylinder c 1 20
-	ttranslate c 5 5 -5
-	
-	# click on the top or bottom face and observe the result...
-	localope a b c F .
-
-
-Node: hole, firsthole, holend, blindhole, holecontrol,  Prev: localope,  Next: ,  Up: Local operations,
-
-
-SYNOPSIS
-
-
-	hole name shape  Or.X Or.Y Or.Z Dir.X Dir.Y Dir.Z Radius [Pfrom Pto]
-
-	firsthole name shape Or.X Or.Y Or.Z Dir.X Dir.Y Dir.Z Radius
-
-	holend name shape Or.X Or.Y Or.Z Dir.X Dir.Y Dir.Z Radius
-
-	blindhole name shape Or.X Or.Y Or.Z Dir.X Dir.Y Dir.Z Radius Length
-
-	holecontrol [0/1]
-
-
-PURPOSE
-
-
-Use the hole  commands to make a  cylindrical hole in  a solid, in any
-case you must give  an axis  and a  radius  with Or.X Or.Y Or.Z  Dir.X
-Dir.Y Dir.Z Radius. 
-
-- hole will make a hole through  the whole solid or between parameters
-Pfrom and Pto on the axis.
-
-- firsthole will make only the  first possible hole along the positive
-side of the axis.
-
-- holend will make  all possible holes along the  positive side of the
-axis.
-
-- blindhole will make  a blind hole of depth  Length starting from the
-origin of the axis on the positive side.
-
-The holecontrol command  is   used  to set   or display  the   control
-mode. When the value is 1  a check of  validity is performed after all
-the hole commands.
-
-
-EXAMPLE
-
-
-	# make a hole through a cylinder
-
-	pcylinder c 5 10
-
-	firsthole r c 0 -10 5 0 1 0 1
-
-
-WARNINGS
-
-
-If the axis does not intersect the solid  nothing is done, this is not
-the same as a full boolean operation.
-
-
-Node: Drafting and blending,  Prev: Local operations,  Next: Topology analysis,  Up: Topology commands,
-
-
-Drafting is  the creation  of  a new shape by   tilting faces with  an
-angle, blending is the creation of a new shapes by rounding of edges.
-
-- Use the depouille command for drafting.
-
-- Use the blend command for simple blending.
-
-- Use the chfi2d command for blending or chamfering planar faces.
-
-- Use fubl for a fusion + blending operation.
-
-- Use buildevol, mkevol, updatevol to make varying radius blending.
-
-
-
-
-* Menu:
-
-* depouille::
-* blend::
-* chfi2d::
-* fubl::
-* mkevol, updatevol, buildevol::
-
-
-Node: depouille,  Prev: ,  Next: blend,  Up: Drafting and blending,
-
-
-SYNOPSIS
-
-
-depouille name shape dirx diry dirz face angle x y x dx dy dz [face angle...]
-
-
-PURPOSE
-
-
-Use this command to create a  new shape by drafting  faces of a shape,
-you  must  give the shape  to  be drafted  and the  drafting direction
-(think of it  as an unmolding direction), then  faces with  angles and
-axis of rotation.  The faces must  be faces of  the shape, you can use
-the dot syntax to pick the faces.
-
-
-EXAMPLE
-
-
-	# draft a face of a box
-	box b 10 10 10
-	explode b f
-	depouille a b 0 0 1 b_2 10 0 10 0 1 0 5
-
-
-Node: blend,  Prev: depouille,  Next: chfi2d,  Up: Drafting and blending,
-
-
-SYNOPSIS
-
-
-	blend name shape radius edge [radius edge ...]
-
-
-PURPOSE
-
-
-The blend  command creates a new  shape by rounding  edges of a shape,
-you must give the  shape and pairs radius, edge.  The edge must  be in
-the shape, you may use the dot syntax.  Not that the blend is expanded
-to other  edges when  the  faces are tangent.  Blends  are also called
-fillets.
-
-
-EXAMPLE
-
-
-	# blend a box, click on an edge
-	box b 20 20 20
-	blend b b 2 .
-
-
-Node: chfi2d,  Prev: blend,  Next: fubl,  Up: Drafting and blending,
-
-
-SYNOPSIS
-
-
-	chfi2d result face [edge1 edge2 (F radius/CDD d1 d2/CDA d ang) ....]
-
-
-PURPOSE
-
-
-Creates a  new face name  result from an  existing face adding fillets
-and chamfers. The face must be planar, if  it is a  wire a planar face
-can  be made with the mkplane  command. Multiples fillets and chamfers
-can be built.
-
-edge1 edge2 F radius,   builds a fillet of  the  given radius  on  the
-vertex connecting the two edges.
-
-edge1 edge2 CDD d1  d2, builds a chamfer on the vertex  connecting the
-two edges with distance d1 on edge1 and d2 on edge2.
-
-edge1 edge2 CDA d  ang, builds a chamfer on  the vertex connecting the
-two  edges at distance d  on edge1 making  an  angle ang (degree) with
-edge1.
-
-
-EXAMPLE
-
-
-	# Make a fillet and the two kinds of vertices 
-	# with graphical selection of the edges
-
-	polyline f 0 0 0 20 0 0 20 10 0 10 10 0 10 30 0 0 30 0 0 0 0
-	mkplane f f
-
-	chfi2d f f . . F 3 . . CDD 1 2 . . CDA 1.5 60
-
-
-SEE ALSO
-
-mkplane
-
-
-Node: fubl,  Prev: chfi2d,  Next: mkevol, updatevol, buildevol,  Up: Drafting and blending,
-
-
-SYNOPSIS
-
-
-	fubl name shape1 shape2 radius
-
-
-PURPOSE
-
-
-Make a fusion boolean operation between two shapes then blend the
-intersection edges with the radius.
-
-
-EXAMPLE
-
-
-	# fuse-blend two boxes
-	box b1 20 20 5
-	copy b1 b2
-	ttranslate b2 -10 10 3
-	fubl a b1 b2 1
-
-
-SEE ALSO
-
-fuse
-blend
-
-
-Node: mkevol, updatevol, buildevol,  Prev: fubl,  Next: ,  Up: Drafting and blending,
-
-
-SYNOPSIS
-
-
-	mkevol name shape
-
-	updatevol edge u1 radius1 [u2 radius2 ...]
-
-	buildevol
-
-
-PURPOSE
-
-
-These three commands work   together  to blend shapes  with   evolving
-radius. First you give  the shape and the name  of the result with the
-mkevol  command.    Then you describe  edges   to be blended  with the
-updatevol command., for each edge you give a  set of pairs : parameter
-radius, the  parameters will be  scaled along the  edge and the radius
-function interpolated for  the  whole  edge.  At last  the   buildevol
-command computes the result.
-
-
-EXAMPLE
-
-
-	# makes an evolved radius on a box
-	box b 10 10 10
-	mkevol b b
-	# click an edge
-	updatevol . 0 1 1 3 2 2
-	buildevol
-
-
-Node: Topology analysis,  Prev: Drafting and blending,  Next: ,  Up: Topology commands,
-
-
-Analysis of  shapes includes  the  commands  to  compute length,  area
-volumes and inertia properties.
-
-- Use lprops, sprops, vprops to compute properties.
-
-- Use bounding to display the bounding box of a shape.
-
-
-
-
-* Menu:
-
-* lprops, sprops, vprops::
-* bounding::
-
-
-Node: lprops, sprops, vprops,  Prev: ,  Next: bounding,  Up: Topology analysis,
-
-
-SYNOPSIS
-
-
-	lprops shape
-
-	sprops shape
-
-	vprops shape
-
-
-PURPOSE
-
-
-lprops  computes massic properties  of all  edges  in the shape with a
-linear density of 1, sprops of all faces  with a surfacic density of 1
-and vprops of all solids with a density of 1.
-
-The  three commands print the  mass,  which is  either the length, the
-area  or  the volume, the  coordinates of  the center of  gravity, the
-matrix of inertia and  the moments. The center   and the main axis  of
-inertia are displayed.
-
-
-EXAMPLE
-
-
-	# volume of a cylinder
-	pcylinder c 10 20
-	vprops c
-	==> results
-	Mass : 6283.18529981086
-
-	Center of gravity : 
-	X = 4.1004749224903e-06
-	Y = -2.03392858349861e-16
-	Z = 9.9999999941362
-
-	Matrix of Inertia : 
-	366519.141445068 5.71451850691484e-12 0.257640437382627
-	5.71451850691484e-12 366519.141444962 2.26823064169991e-10
-	0.257640437382627 2.26823064169991e-10 314159.265358863
-
-	Moments : 
-	IX = 366519.141446336
-	IY = 366519.141444962
-	IZ = 314159.265357595
-
-
-Node: bounding,  Prev: lprops, sprops, vprops,  Next: ,  Up: Topology analysis,
-
-
-SYNOPSIS
-
-
-	bounding shape
-
-
-PURPOSE
-
-
-Display the bounding box of a shape and returns the string "xmin ymin
-zmin xmax ymax zmax"
-
-
-EXAMPLE
-
-
-	# bounding box of a torus
-	ptorus t 20 5
-	bounding t
-	==> 
-	-25.000000100000001 -25.000000100000001 -5.0000001000000003 
-	25.000000100000001 25.000000100000001 5.0000001000000003
-
-
-Node: Index,  Up: Top,
-
-2dapprox command                *Note appro, 2dapprox, 2dinterpolate::
-2dbeziercurve command           *Note beziercurve, 2dbeziercurve::
-2dbsplinecurve command          *Note bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve::
-2dclear command                 *Note erase, clear, 2dclear::
-2dcvalue command                *Note cvalue, 2dcvalue::
-2dfit command                   *Note fit, 2dfit::
-2dintersect command             *Note 2dintersect::
-2dlmirror command               *Note pmirror, lmirror, smirror, 2dpmirror, 2dlmirror::
-2dmd command                    *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
-2dmu command                    *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
-2dpbsplinecurve command         *Note bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve::
-2dpd command                    *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
-2dpl command                    *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
-2dpmirror command               *Note pmirror, lmirror, smirror, 2dpmirror, 2dlmirror::
-2dpr command                    *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
-2dproj command                  *Note proj, 2dproj::
-2dpscale command                *Note pscale, 2dpscale::
-2dpu command                    *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
-2drotate command                *Note rotate, 2drotate::
-2dtranslate command             *Note translate, 2dtranslate::
-2dzoom command                  *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
-add command                     *Note emptycopy, add, compound::
-appro command                   *Note appro, 2dapprox, 2dinterpolate::
-approximation                   *Note appro, 2dapprox, 2dinterpolate::
-area                            *Note lprops, sprops, vprops::
-autodisplay command             *Note autodisplay::
-av2d command                    *Note axo, pers, top, ...::
-axo command                     *Note axo, pers, top, ...::
-back command                    *Note axo, pers, top, ...::
-beziercurve command             *Note beziercurve, 2dbeziercurve::
-beziersurf command              *Note beziersurf::
-blend command                   *Note blend::
-blindhole command               *Note hole, firsthole, holend, blindhole, holecontrol::
-boolean operations              *Note fuse, cut, common::
-bottom command                  *Note axo, pers, top, ...::
-bounding command                *Note bounding::
-box command                     *Note box, wedge::
-box, bounding                   *Note bounding::
-break command                   *Note break, continue::
-bsplinecurve command            *Note bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve::
-bsplinesurf command             *Note bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf::
-buildevol command               *Note mkevol, updatevol, buildevol::
-chamfer 2d                      *Note chfi2d::
-chfi2d command                  *Note chfi2d::
-chrono command                  *Note chrono::
-circle command                  *Note circle::
-cirtang command                 *Note cirtang::
-clear command                   *Note erase, clear, 2dclear::
-clknots command                 *Note clknots, shknots::
-clpoles command                 *Note clpoles, shpoles::
-cmovep command                  *Note cmovep, movep, movecolp, moverowp::
-cmovepoint command              *Note cmovepoint, movepoint::
-color command                   *Note color::
-command                         *Note Syntax of TCL::
-common command                  *Note fuse, cut, common::
-complement command              *Note orientation, complement, invert::
-compound command                *Note emptycopy, add, compound::
-cone command                    *Note cone::
-cone solid                      *Note pcylinder, pcone, psphere, ptorus::
-continue command                *Note break, continue::
-convert command                 *Note convert::
-coord command                   *Note coord::
-coordinate system               *Note plane::
-copy command                    *Note rename, copy::
-copying shapes                  *Note tcopy::
-cpulimit command                *Note cpulimit::
-curvature                       *Note localprop, minmaxcurandif::
-curvature of surfaces           *Note surface_radius::
-curve from edge                 *Note mkcurve, mkface::
-curve to edge                   *Note edge, mkedge::
-cut command                     *Note fuse, cut, common::
-cvalue command                  *Note cvalue, 2dcvalue::
-cylinder command                *Note cylinder::
-cylinder solid                  *Note pcylinder, pcone, psphere, ptorus::
-d command                       *Note u, d, l, r::
-datadir command                 *Note datadir, save, restore::
-defle command                   *Note dmod, discr, defle::
-delete command                  *Note view, delete::
-depouille command               *Note depouille::
-derivative on curves            *Note cvalue, 2dcvalue::
-dflush command                  *Note repaint, dflush::
-directory command               *Note isdraw, directory::
-discr command                   *Note dmod, discr, defle::
-discretisation command          *Note isos, discretisation::
-display command                 *Note display, donly::
-display of curves and surfaces  *Note Display::
-display of shapes               *Note isos, discretisation::
-dmod command                    *Note dmod, discr, defle::
-donly command                   *Note display, donly::
-dot argument                    *Note Variables display commands::
-Draw variables                  *Note Accessing variables in TCL and Draw::
-dset command                    *Note dset, dval::
-dtext command                   *Note dtext::
-dump command                    *Note whatis, dump::
-dump of image                   *Note hardcopy, hcolor, xwd::
-dval command                    *Note dset, dval::
-edge command                    *Note edge, mkedge::
-edge from curve                 *Note edge, mkedge::
-edge to curve                   *Note mkcurve, mkface::
-ellipse command                 *Note ellipse::
-emptycopy command               *Note emptycopy, add, compound::
-environment variables           *Note datadir, save, restore::
-erase command                   *Note erase, clear, 2dclear::
-euler angles                    *Note cylinder::
-eval command                    *Note Syntax of TCL::
-exchuv command                  *Note exchuv::
-exec command	                   *Note Syntax of TCL::
-exit command                    *Note exit::
-explode command                 *Note explode, exwire, nbshapes::
-exploring a shape               *Note explode, exwire, nbshapes::
-expr command                    *Note Syntax of TCL::
-extsurf command                 *Note extsurf::
-exwire command                  *Note explode, exwire, nbshapes::
-face creation                   *Note profile::
-face from surface               *Note mkplane, mkface::
-fd command                      *Note focal, fu, fd::
-features                        *Note localope::
-fillet 2d                       *Note chfi2d::
-fillets                         *Note blend::
-firsthole command               *Note hole, firsthole, holend, blindhole, holecontrol::
-fit command                     *Note fit, 2dfit::
-focal command                   *Note focal, fu, fd::
-for command                     *Note while, for, foreach::
-foreach command                 *Note while, for, foreach::
-free boundary                   *Note isos, discretisation::
-front command                   *Note axo, pers, top, ...::
-fu command                      *Note focal, fu, fd::
-fubl command                    *Note fubl::
-fuse command                    *Note fuse, cut, common::
-global command                  *Note global, upvar::
-grilapp command                 *Note surfapp, grilapp::
-hardcopy command                *Note hardcopy, hcolor, xwd::
-hcolor command                  *Note hardcopy, hcolor, xwd::
-help command                    *Note help::
-hole command                    *Note hole, firsthole, holend, blindhole, holecontrol::
-holecontrol command             *Note hole, firsthole, holend, blindhole, holecontrol::
-holend command                  *Note hole, firsthole, holend, blindhole, holecontrol::
-hyperbola command               *Note hyperbola::
-if command                      *Note if::
-incdeg command                  *Note incdeg, incudeg, incvdeg::
-incr command                    *Note while, for, foreach::
-incudeg command                 *Note incdeg, incudeg, incvdeg::
-incvdeg command                 *Note incdeg, incudeg, incvdeg::
-inertia                         *Note lprops, sprops, vprops::
-insertknot command              *Note insertknot, insertuknot, insertvknot::
-insertpole command              *Note insertpole, rempole, remcolpole, remrowpole::
-insertuknot command             *Note insertknot, insertuknot, insertvknot::
-insertvknot command             *Note insertknot, insertuknot, insertvknot::
-intersect command               *Note intersect::
-invert command                  *Note orientation, complement, invert::
-isdraw command                  *Note isdraw, directory::
-isoparametric curves            *Note uiso, viso::
-isos command                    *Note isos, discretisation::
-knot insertion                  *Note insertknot, insertuknot, insertvknot::
-knot removal                    *Note remknot, remulnot, remvknot::
-knots display                   *Note clknots, shknots::
-l command                       *Note u, d, l, r::
-layout of views                 *Note axo, pers, top, ...::
-left command                    *Note axo, pers, top, ...::
-length                          *Note lprops, sprops, vprops::
-line command                    *Note line::
-lintan command                  *Note lintan::
-lmirror command                 *Note pmirror, lmirror, smirror, 2dpmirror, 2dlmirror::
-localope command                *Note localope::
-localprop command               *Note localprop, minmaxcurandif::
-location                        *Note tmove, treset::
-longitude and latitude          *Note cylinder::
-lprops command                  *Note lprops, sprops, vprops::
-md command                      *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
-minmaxcurandif command          *Note localprop, minmaxcurandif::
-mirroring shapes                *Note tmirror, tscale::
-mkcurve command                 *Note mkcurve, mkface::
-mkedge command                  *Note edge, mkedge::
-mkevol command                  *Note mkevol, updatevol, buildevol::
-mkface command                  *Note mkcurve, mkface::
-mkplane command                 *Note mkplane, mkface::
-movecolp command                *Note cmovep, movep, movecolp, moverowp::
-movep command                   *Note cmovep, movep, movecolp, moverowp::
-movepoint command               *Note cmovepoint, movepoint::
-moverowp command                *Note cmovep, movep, movecolp, moverowp::
-mu command                      *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
-mu4 command                     *Note axo, pers, top, ...::
-nbiso command                   *Note nbiso::
-nbshapes command                *Note explode, exwire, nbshapes::
-numeric variables               *Note Accessing variables in TCL and Draw::
-offset command                  *Note offset::
-orientation command             *Note orientation, complement, invert::
-parabola command                *Note parabola::
-parameters command              *Note parameters::
-pbsplinecurve command           *Note bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve::
-pcone command                   *Note pcylinder, pcone, psphere, ptorus::
-pcurve command                  *Note pcurve::
-pcylinder command               *Note pcylinder, pcone, psphere, ptorus::
-pd command                      *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
-periodic bsplines               *Note bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf::
-pers command                    *Note axo, pers, top, ...::
-pi                              *Note Accessing variables in TCL and Draw::
-pick command                    *Note wclick, pick::
-pipe command                    *Note pipe::
-pl command                      *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
-planar section                  *Note section, psection::
-plane command                   *Note plane::
-pmirror command                 *Note pmirror, lmirror, smirror, 2dpmirror, 2dlmirror::
-point command                   *Note point::
-pole insertion and removal      *Note insertpole, rempole, remcolpole, remrowpole::
-poles display                   *Note clpoles, shpoles::
-polyline command                *Note wire, polyline, polyvertex::
-polyvertex command              *Note wire, polyline, polyvertex::
-postscript                      *Note hardcopy, hcolor, xwd::
-pr command                      *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
-prism command                   *Note prism::
-proc command                    *Note proc::
-procedure                       *Note proc::
-profile command                 *Note profile::
-proj command                    *Note proj, 2dproj::
-project command                 *Note project::
-pscale command                  *Note pscale, 2dpscale::
-psection command                *Note section, psection::
-psphere command                 *Note pcylinder, pcone, psphere, ptorus::
-ptorus command                  *Note pcylinder, pcone, psphere, ptorus::
-pu command                      *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
-quoting                         *Note Syntax of TCL::
-r command                       *Note u, d, l, r::
-radius of curvature             *Note localprop, minmaxcurandif::
-reference, call by              *Note global, upvar::
-remcolpole command              *Note insertpole, rempole, remcolpole, remrowpole::
-remknot command                 *Note remknot, remulnot, remvknot::
-rempole command                 *Note insertpole, rempole, remcolpole, remrowpole::
-remrowpole command              *Note insertpole, rempole, remcolpole, remrowpole::
-remulnot command                *Note remknot, remulnot, remvknot::
-remvknot command                *Note remknot, remulnot, remvknot::
-rename command                  *Note rename, copy::
-repaint command                 *Note repaint, dflush::
-restore command                 *Note datadir, save, restore::
-reverse command                 *Note reverse, ureverse, vreverse::
-revol command                   *Note revol::
-revsurf command                 *Note revsurf::
-right command                   *Note axo, pers, top, ...::
-rotate command                  *Note rotate, 2drotate::
-rotating shapes                 *Note ttranslate, trotate::
-rounding                        *Note chfi2d::
-save command                    *Note datadir, save, restore::
-scaling shapes                  *Note tmirror, tscale::
-screen layout                   *Note axo, pers, top, ...::
-script                          *Note Syntax of TCL::
-section command                 *Note section, psection::
-segment command                 *Note segment, segsur::
-segsur command                  *Note segment, segsur::
-selection, graphical            *Note Variables display commands::
-set command                     *Note set, unset::
-setnotperiodic command          *Note setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
-setorigin command               *Note setorigin, setuorigin, setvorigin::
-setperiodic command             *Note setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
-setunotperiodic command         *Note setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
-setuorigin command              *Note setorigin, setuorigin, setvorigin::
-setuperiodic command            *Note setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
-setvnotperiodic command         *Note setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
-setvorigin command              *Note setorigin, setuorigin, setvorigin::
-setvperiodic command            *Note setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
-shknots command                 *Note clknots, shknots::
-shpoles command                 *Note clpoles, shpoles::
-smallview command               *Note axo, pers, top, ...::
-smirror command                 *Note pmirror, lmirror, smirror, 2dpmirror, 2dlmirror::
-source command                  *Note source::
-sphere command                  *Note sphere::
-sphere solid                    *Note pcylinder, pcone, psphere, ptorus::
-sprops command                  *Note lprops, sprops, vprops::
-spy command                     *Note spy::
-spying session                  *Note spy::
-substitution                    *Note Syntax of TCL::
-surface to face                 *Note mkplane, mkface::
-surface_radius command          *Note surface_radius::
-surfapp command                 *Note surfapp, grilapp::
-svalue command                  *Note svalue::
-sweeping                        *Note prism::
-tangent circle                  *Note cirtang::
-tangent line                    *Note lintan::
-TCL                             *Note Syntax of TCL::
-tcopy command                   *Note tcopy::
-text display                    *Note dtext::
-tmirror command                 *Note tmirror, tscale::
-tmove command                   *Note tmove, treset::
-to2d command                    *Note to2d, to3d::
-to3d command                    *Note to2d, to3d::
-top command                     *Note axo, pers, top, ...::
-torus command                   *Note torus::
-torus solid                     *Note pcylinder, pcone, psphere, ptorus::
-translate command               *Note translate, 2dtranslate::
-translating shapes              *Note ttranslate, trotate::
-treset command                  *Note tmove, treset::
-trim command                    *Note trim, trimu, trimv::
-trimu command                   *Note trim, trimu, trimv::
-trimv command                   *Note trim, trimu, trimv::
-trotate command                 *Note ttranslate, trotate::
-tscale command                  *Note tmirror, tscale::
-ttranslate command              *Note ttranslate, trotate::
-u command                       *Note u, d, l, r::
-uiso command                    *Note uiso, viso::
-unnamed objects                 *Note Variables display commands::
-unset command                   *Note set, unset::
-upbsplinesurf command           *Note bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf::
-updatevol command               *Note mkevol, updatevol, buildevol::
-upvar command                   *Note global, upvar::
-ureverse command                *Note reverse, ureverse, vreverse::
-uvpbsplinesurf command          *Note bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf::
-v2d command                     *Note axo, pers, top, ...::
-value on curves                 *Note cvalue, 2dcvalue::
-value, call by                  *Note global, upvar::
-vertex command                  *Note vertex::
-view command                    *Note view, delete::
-viso command                    *Note uiso, viso::
-volume                          *Note lprops, sprops, vprops::
-vpbsplinesurf command           *Note bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf::
-vprops command                  *Note lprops, sprops, vprops::
-vreverse command                *Note reverse, ureverse, vreverse::
-wait command                    *Note wait::
-wclick command                  *Note wclick, pick::
-wedge command                   *Note box, wedge::
-whatis command                  *Note whatis, dump::
-while command                   *Note while, for, foreach::
-window                          *Note view, delete::
-wire command                    *Note wire, polyline, polyvertex::
-wire exploration                *Note explode, exwire, nbshapes::
-word                            *Note Syntax of TCL::
-wzoom command                   *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
-xwd command                     *Note hardcopy, hcolor, xwd::
-xwud                            *Note hardcopy, hcolor, xwd::
-zoom command                    *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
+
+
+Node: Top,  Prev: ,  Next: ,  Up: (MODEL),
+
+
+This document is the reference manual for  the harness Draw, Draw is a
+command  interpreter based on TCL and  a graphical system used to test
+and demonstrate  CAS.CADE  modeling  libraries. In this   document are
+described the basics of the TCL command  language and Draw extensions,
+the commands to do geometry and the commands to do topology.
+
+
+
+* Menu:
+
+* Overview::
+* The command language::
+* Basic commands::
+* Geometry commands::
+* Topology commands::
+* Index::
+
+
+Node: Overview,  Prev: ,  Next: The command language,  Up: Top,
+
+
+Draw is a test and development harness for CAS.CADE. It is intended to
+provide a flexible and easy-to-use means  of testing and demonstrating
+the CAS.CADE modeling libraries.
+
+Draw can be  used interactively to  create, display and modify objects
+such as curves, surfaces and topological shapes.
+
+Scripts can be written to customize  Draw and perform tests. New types
+of objects  and new commands  can be  added  using the  C++ programing
+language.
+
+Draw is basically made up of 
+
+- a command interpreter based on the TCL command language
+
+- a 3d graphic viewer based on the X system
+
+- a basic set of commands covering scripts, variables and graphics
+
+- a set of geometric  commands, allowing to  create and modify  curves
+and surfaces  and  to use  CAS.CADE  geometry algorithms.  This set of
+commands is optional
+
+- a set of topological commands  to create and  modify BRep shapes and
+to use the CAS.CADE topology algorithms
+
+As a rule  there is an "official"  set  of commands for  each delivery
+unit  in   the modeling   libraries : GEOMETRY,    TOPOLOGY, ADVALGOS,
+GRAPHIC, PRESENTATION
+
+
+
+* Menu:
+
+* Contents of the documentation::
+* Getting started::
+
+
+Node: Contents of the documentation,  Prev: ,  Next: Getting started,  Up: Overview,
+
+
+This documentation describes 
+
+- the command language
+
+- the basic set of commands
+
+- the graphical commands
+
+- the geometry set of commands
+
+- the topology set of commands
+
+This document does  not describe the  other sets of commands  and does
+not explain how to extend Draw using C++.
+
+This document is mainly a  reference manual, it contains  descriptions
+of  commands, all  descriptions have the   same format which is  above
+illustrated with the exit command.
+
+
+
+* Menu:
+
+* exit::
+
+
+Node: exit,  Prev: ,  Next: ,  Up: Contents of the documentation,
+
+
+SYNOPSIS
+
+
+	exit
+
+
+PURPOSE
+
+
+Terminates the Draw, TCL session. If the commands are read from a file
+using the source command this will terminante reading from the file.
+
+
+EXAMPLE
+
+
+	# this is a very short example
+	exit
+
+
+SEE ALSO
+
+
+source
+
+
+Node: Getting started,  Prev: Contents of the documentation,  Next: ,  Up: Overview,
+
+
+We will now try a simple example. The first thing  to do is to setup a
+Draw executable,  check if the DRAW and  TCL  ULs are visible  in your
+workbench with the wok command "ulinuse". If  DRAW does not appear you
+should check with your workshop manager to install DRAW and TCL.
+
+We will now suppose that you have a DRAW version, at least DRAW-7 (use
+"ulinuse -v" to check so).   You must now find  an executable.  Let us
+try TGEOMETRY.    Just type  TGEOMETRY,  if  you do  not get  a prompt
+"Draw[1]> " you must create an executable by  linking the program from
+the  source example  TestDraw.cxx which   can  be  found  in the   src
+directory of the UL.
+
+Draw displays prompt and waits for commands,  here is a sample session
+:
+
+
+EXAMPLE
+
+
+# create Two views 2d and axonometric 
+Draw[1]> av2d				
+# create a 2d circle
+Draw[2]> circle c 0 0 1 0 5
+Draw[3]> 2dfit
+
+# trim the circle and dump it
+Draw[4]> trim c c 0 pi/2
+Draw[5]> dump c
+
+
+0*********** Dump of c *************
+Trimmed curve
+Parameters : 0 1.5707963267949
+Basis curve :
+Circle
+  Center :0, 0 
+  XAxis  :1, 0 
+  YAxis  :-0, 1 
+  Radius :5
+
+# make a 3d circle from it, and turn it into a bspline
+
+Draw[6]> to3d c c
+Draw[7]> fit
+Draw[8]> convert c c
+Draw[9]> dump c
+
+
+0*********** Dump of c *************
+BSplineCurve rational
+  Degree 2, 3 Poles, 2  Knots
+Poles :
+
+   1 : 5, 0, 0  1
+   2 : 5, 5, 0  0.707106781186548
+   3 : 3.06161699786838e-16, 5, 0  1
+Knots :
+
+   1 :  0 3
+   2 :  1.5707963267949 3
+
+
+EXAMPLE
+
+
+# make a surface of revolution from the spline
+Draw[10]> fit
+Draw[11]> help rev
+reverse         : reverse name ... 
+revsurf         : revsurf name curvename x y z dx dy dz
+
+# here you must click on the curve with the mouse
+Draw[12]> revsurf s . 5 5 0 -1 1 0
+Pick an object
+Draw[13]> fit
+
+# rotate the view
+Draw[14]> u
+Draw[15]> erase c
+c 
+
+# make a bspline surface and intersect with a plane
+Draw[20]> convert s s
+Draw[21]> fit
+Draw[22]> plane p 5 5 5 1 1 1 1 0 0
+Draw[23]> intersect c p s
+
+# pick on one of the intersection curves
+# you may get c_2 onstead of c_1
+Draw[24]> whatis .
+Pick an object
+c_1 is a  a 3d curve
+Draw[25]> clear
+Draw[27]> rename c_1 c
+Draw[28]> fit
+
+# save the curve, use any directory where you can write
+Draw[29]> datadir $env(WBCONTAINER)/data/default
+/adv_20/BAG/data/default
+Draw[30]> save c curveinter
+c
+Draw[31]> exit
+
+
+In  this example  some geometrical   operations have been   performed,
+objects have been displayed and wrote to files.
+
+
+
+Node: The command language,  Prev: Overview,  Next: Basic commands,  Up: Top,
+
+
+The command language used in Draw is the  TCL command language.  It is
+highly recommended, if you want to use  Draw extensively, to read some
+TCL documentation like "TCL and the  TK Toolkit" by John K. Ousterhout
+(Addison-Wesley).
+
+The following section  is a short outline  of the TCL language and its
+extensions incorporated in Draw. The following topics will be covered.
+
+- syntax of the TCL language
+
+- accessing variables in TCL and Draw
+
+- control structures
+
+- procedures
+
+
+
+* Menu:
+
+* Syntax of TCL::
+* Accessing variables in TCL and Draw::
+* lists::
+* Control Structures::
+* Procedures::
+
+
+Node: Syntax of TCL,  Prev: ,  Next: Accessing variables in TCL and Draw,  Up: The command language,
+
+
+TCL  is an interpreted command    language,  it is  not a   structured
+language like C, Pascal,  LISP or Basic, it is  rather a line oriented
+language like a shell  (csh for example).  However you will  find that
+TCL   is  easier to  use  than  shell  because  control structures and
+procedure are easier to define. TCL is  also faster than shell because
+it does not fork a process for each command.
+
+The  basic program for TCL  is a script. A  script consists  of one or
+more commands. Commands are separated by newlines or semicolons.
+
+
+EXAMPLE
+
+	set a 24
+	set b 15
+	set a 25; set b 15
+
+
+Each command consists of one or more words, the first word is the name
+of a command  and  additional words are  arguments  for that  command.
+Words are separated by spaces  or tabs. In  the preceding example each
+command has three words. There may be any number of words in a command
+and each word is a string of arbitrary length.
+
+The  evaluation of a  command by TCL  follows two steps.  In the first
+step  the    command  is  parsed  and  broken  into   words  and  some
+substitutions are performed. In the  second step the command procedure
+corresponding to  the first  word is called  with  the other words  as
+arguments. In  the first   step there  is only   string  manipulation,
+meaning is given to  the words only in the  second step by the command
+procedure.
+
+The following substitutions are performed by TCL
+
+- Variable substitution is triggered by the $ character (as with csh),
+the content of the variable is substituted,  {} may be  used as in csh
+to enclose the name of the variable.
+
+
+EXAMPLE
+
+
+	# set a variable value
+	set file documentation
+
+	# a simple substitution, set psfile to documentation.ps
+	set psfile $file.ps
+
+	# another substitution, set pfile to documentationPS
+	set pfile ${file}PS
+
+	# a last one, 
+	# delete files NEWdocumentation and OLDdocumentation
+	foreach prefix {NEW OLD} {rm $prefix$file}
+
+
+- Command substitution is triggered by the [] characters. The brackets
+must enclose a valid script, this scrit is evaluated and the result is
+substituted. This is similar to the `command` construction in csh.
+
+
+EXAMPLE
+
+
+	set degree 30
+	set pi 3.14159265
+
+	# expr is a command evaluating a numeric expression
+	set radian [expr $pi*$degree/180]
+
+
+- Backslash substitution is  triggered by the backslash character.  It
+is  used  to  insert special characters  like  :   $,[,].  A backslash
+terminated line is continued on the following line.
+
+TCL   uses two  forms of  quoting   to prevent  substitution and  word
+breaking.
+
+- Double quote quoting enables to define  a string with space and tabs
+as a single word, substitutions are still performed inside the "".
+
+
+EXAMPLE
+
+
+	# set msg to "the price is 12.00$"
+	set price "\$ 12.00"
+	set msg "the price is $price"
+
+
+-  Braces  quoting prevent all    the  substitutions. Braces are  also
+nested. The  main use of braces is  to defer evaluation  when defining
+procedures and control structures. Braces are useful to present nicely
+TCL scripts on multiple lines.
+
+
+EXAMPLE
+
+
+	set x 0
+
+	# this will loop for ever 
+	# because while argument is "0 < 3"
+	while "$x < 3" {set x [expr $x+1]}
+
+	# this will terminate as expected because
+	# while argument is {$x < 3}
+	while {$x < 3} {set x [expr $x+1]}
+
+	# this can be written also
+	while {$x < 3} {
+	   set x [expr $x+1]
+	}
+
+	# the following cannot be written
+	# because while requires two arguments
+	while {$x < 3} 
+	{
+	   set x [expr $x+1]
+	}
+
+
+Comments start with a # character as the first  non blank character in
+a command. If  you want to comment at  the end  of  the line you  must
+precede the comment by semi-colon to end the preceding command.
+
+
+EXAMPLE
+
+
+	# This is a comment
+	set a 1 # this is not a comment
+
+	set b 1; # this is a comment
+
+
+Last  but not least thing  to know  about parsing in   TCL is that the
+number of  words is  never changed  by  substitution.  For example the
+result  of a substitution is always  a single word.  This is different
+than csh but it  is very convenient  as the behavior  of the parser is
+more predictable.  Sometimes it  may be necessary  to enforce a second
+round  of evaluation to  reparse, the  eval command  is useful to that
+purpose. This command  concatenates  all its arguments   and evaluates
+this script.
+
+
+EXAMPLE
+
+
+	# I want to delete two files
+	set files "foo bar"
+
+	# this will fail because rm will receive only one argument
+	# and complain that "foo bar" does not exists
+	exec rm $files
+
+	# a second evaluation will do it
+	eval exec rm $files
+
+
+Node: Accessing variables in TCL and Draw,  Prev: Syntax of TCL,  Next: lists,  Up: The command language,
+
+
+TCL variables have only string  values. Note that even numeric  values
+are stored as  string literals and computations  with the expr command
+start by parsing the strings. This approach is not sufficient for Draw
+where  variables  with other kinds   of values are  necessary, such as
+curves, surfaces or topological shapes.
+
+Fortunately  TCL provides a mechanism  to link user data to variables,
+this mechanism is used  with Draw.  Draw  variables are TCL  variables
+with associated data.    The   string value  of  a Draw    variable is
+meaningless, it is usually set to the name  of the variable itself, so
+preceding  a  Draw variable with  a $  do not  change  the result of a
+command.  The content of a  Draw variable is accessed with appropriate
+commands. There are many kinds of Draw variables,  and new ones may be
+added with  C++.  We  will  describe later geometric   and topological
+variables, for the moment we will only describe the numeric variables.
+
+Draw numeric variables  can be used within  an expression whereever  a
+Draw comand requires  a numeric value. The  expr command is useless in
+this  case. Those variables are not  stored as strings but as floating
+point values.
+
+
+EXAMPLE
+
+
+	# dset is used for numeric variables
+	# pi is a predefined Draw variable
+	
+	dset angle pi/3 radius 10
+	point p radius*cos(angle) radius*sin(angle) 0
+
+
+At the beginning the difference between  TCL and Draw variables may be
+confusing but you will be quickly used to it.  My advice is to use TCL
+variable only  for strings and to   use Draw for  numerics  as you can
+avoid the  expr command.  Usually for  geometry and topology  you will
+only need numbers no strings.
+
+
+
+* Menu:
+
+* set, unset::
+* dset, dval::
+
+
+Node: set, unset,  Prev: ,  Next: dset, dval,  Up: Accessing variables in TCL and Draw,
+
+
+SYNOPSIS
+
+
+	set varname [value]
+
+	unset varname [varname varname ...]
+
+
+PURPOSE
+
+
+Use the set command  to assign a string   value to a variable. If  the
+variable does not exist it is created.
+
+Without the   value argument the  command  returns the content  of the
+variable.
+
+Use the unset command  to destroy the variables. This  is is also used
+to destroy Draw variables.
+
+
+EXAMPLE
+
+
+	set a "Hello world"
+	set b "Goodbye"
+	set a
+	==> "Hello world"
+	unset a b
+	set a
+	==> Error message....
+
+
+WARNINGS
+
+
+The set command can set only one variable, unlike the dset command.
+
+
+SEE ALSO
+
+dset, dval
+
+
+Node: dset, dval,  Prev: set, unset,  Next: ,  Up: Accessing variables in TCL and Draw,
+
+
+SYNOPSIS
+
+
+	dset varname expression [varname expression ...]
+
+	dval expression
+
+
+
+PURPOSE
+
+
+Use the dset  command to assign values  to Draw numeric variables. The
+expression  may be   any numeric  expression  including  Draw  numeric
+variables, as any Draw command expecting a numeric expression there is
+no need for $ or expr. The dset command can  assign many variables, if
+there is an odd number of argument the last  variable will be assigned
+a value of 0. If the variable does not exist it will be created.
+
+Use dval  to evaluate an  expression containing Draw numeric variables
+and return the result as a string, including  a single variable.  This
+not useful for Draw commands as they usually interpret expression, but
+this is useful for TCL basic commands expecting strings.
+
+
+EXAMPLE
+
+
+	# z is set to 0
+	dset x 10 y 15 z
+	
+	# no $ required for Draw commands
+	point p x y z
+
+	# puts prints a string
+	puts "x = [dval x], cos(x/pi) = [dval cos(x/pi)]"
+
+
+WARNINGS
+
+
+In TCL parentheses are not considered as special characters, so do not
+forget to quote  an expression if it  contains spaces to avoid parsing
+different words.
+
+(a + b) is parsed as three words, "(a + b)" or (a+b) are correct.
+
+
+SEE ALSO
+
+set, unset
+
+
+Node: lists,  Prev: Accessing variables in TCL and Draw,  Next: Control Structures,  Up: The command language,
+
+
+TCL uses  lists a lot, a  list is  only  a string  containing elements
+separated by spaces or tabs. If  the string contains braces the braced
+part count for one element, this allows to put lists in lists.
+
+
+EXAMPLE
+
+
+	# a list of 3 strings
+	"a b c"
+
+	# a list of two strings the first is a list of 2
+	"{a b} c"
+
+
+Many TCL  commands return lists and  the foreach  command is an useful
+way to loop on list elements.
+
+
+Node: Control Structures,  Prev: lists,  Next: Procedures,  Up: The command language,
+
+
+TCL allows repetition of an  execution using control structures.   The
+control structures are implemented  with commands and their syntax  is
+very similar to their C  counterpart (if, while, switch,..). There are
+two   main differences  with  C. Do    not use parentheses  to enclose
+conditions but  braces, do not  start the script  on the  next line or
+your command will not have enough argument.
+
+
+
+
+* Menu:
+
+* if::
+* while, for, foreach::
+* break, continue::
+
+
+Node: if,  Prev: ,  Next: while, for, foreach,  Up: Control Structures,
+
+
+SYNOPSIS
+
+
+	if condition script [elseif script .... else script]
+
+
+PURPOSE
+
+
+If evaluate the condition and evaluate the script if the condition is
+true, and so on.
+
+
+EXAMPLE
+
+
+	# note the position of the braces
+	# even if you find it ugly, you must do it this way
+
+	if {$x > 0} { 
+		puts "positive"
+         } elseif {$x == 0} {
+		puts "null"
+         } else {
+		puts "negative"
+	 }
+
+
+Node: while, for, foreach,  Prev: if,  Next: break, continue,  Up: Control Structures,
+
+
+SYNOPSIS
+
+
+	while condition script
+
+	for init condition reinit script
+
+	foreach varname list script
+
+
+PURPOSE
+
+
+The three loop structures are similar to their C or csh equivalent. It
+is important to  use braces to delay  evaluation.  foreach will assign
+the elements of the list to the variable before evaluating the script.
+
+
+EXAMPLE
+
+
+	# while example
+	dset x 1.1
+	while {[dval x] < 100} {
+		circle c 0 0 x
+		dset x x*x
+	}
+
+	# for example
+	# incr var d, incremente une variable de d (defaut 1)
+	for {set i 0} {$i < 10} {incr i} {
+		dset angle $i*pi/10
+		point p$i cos(angle0 sin(angle) 0
+	}
+
+	# foreach example
+	foreach object {crapo tomson lucas} {display $object}
+
+
+
+SEE ALSO
+
+
+break, continue
+
+
+
+Node: break, continue,  Prev: while, for, foreach,  Next: ,  Up: Control Structures,
+
+
+SYNOPSIS
+
+
+ 	break
+
+ 	continue
+
+
+PURPOSE
+
+
+Within  loops  the, break and  continue commands  have the same effect
+than in  C. break interrupts the  innermost loop and continue steps to
+the next iteration.
+
+
+EXAMPLE
+
+
+	# search the index for which t$i has value "secret"
+	for {set i 1} {$i <= 100} {incr i} {
+		if {[set t$i] == "secret"} break;
+	}
+
+
+Node: Procedures,  Prev: Control Structures,  Next: ,  Up: The command language,
+
+
+TCL can be extended by defining procedures using the proc command. The
+proc commandsetup a  context of local  variables, binds  arguments and
+executes a TCL script.
+
+The only confusing point in procedures  is that variables are strictly
+local, and  as they  are   implicitly created  when  used it   may  be
+difficult to detect the errors.
+
+There  are  two means to  access a  variable outside  the scope of the
+current procedure.  The global command may be used to declare a global
+variable (a variable outside all procedures), the upvar command can be
+used to access a variable in the scope of the caller. In TCL arguments
+are always string  values, the only way to  pass Draw variables is  to
+pass by reference, i.e.   passing the name of  the variable  and using
+the upvar command as in the following examples.
+
+TCL is not a  strongly typed language, it  is  thus very difficult  to
+detect programming errors and debugging can be tedious, TCL procedures
+are not designed for large scale  software development but for testing
+and simple command or interactive writing.
+
+
+
+* Menu:
+
+* proc::
+* global, upvar::
+
+
+Node: proc,  Prev: ,  Next: global, upvar,  Up: Procedures,
+
+
+SYNOPSIS
+
+
+	proc arglist script
+
+
+PURPOSE
+
+
+Use  the proc command  to define a procedure, arglist   is the list of
+arguments, it  must be an  empty list  if there  are no  arguments. An
+argument  may have  a default value,  it  is then a  list  of the form
+{argument value}. The script is the body of the procedure.
+
+The return command is used to give a return value to the procedure.
+
+
+EXAMPLE
+
+
+	# simple procedure
+	proc hello {} {
+		puts "hello world"
+	}
+
+	# procedure with arguments and default values
+	proc distance {x1 y1 {x2 0} {y2 0}} {
+		set d [expr (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)]
+		return [expr sqrt(d)]
+	}
+
+	# we could not resist the classical one
+	proc fact n {
+		if {$n == 0} {return 1} else {
+			return [expr n*[fact [expr n -1]]]
+		}
+	}
+
+
+SEE ALSO
+
+
+global, upvar
+
+
+Node: global, upvar,  Prev: proc,  Next: ,  Up: Procedures,
+
+
+SYNOPSIS
+
+
+	global varname [varname ...]
+
+	upvar varname localname [varname localname ...]
+
+
+PURPOSE
+
+
+Use  the global  command to access   top level variables.  Unlike in C
+global variables are not visible in procedures.
+
+Use the upvar command to give a local name to a variable in the caller
+scope, this is when an argument is the name of a variable instead of a
+value, this  is call by  reference and it is the  only way to use Draw
+variables as arguments.
+
+Note in  the  following examples that   the $ is  always necessary  to
+access the arguments.
+
+
+EXAMPLE
+
+
+	# convert degree to radian
+	# pi is a global variable
+	proc deg2rad (degree} {
+		global pi
+		return [dval pi*$degree/180.]
+	}
+
+	# create line with a point and an angle
+	proc linang {linename x y angle} {
+		upvar linename l
+		line l $x $y cos($angle) sin($angle)
+        }
+		
+
+
+Node: Basic commands,  Prev: The command language,  Next: Geometry commands,  Up: Top,
+
+
+We  will now   describe all the  commands  defined  in  the basic Draw
+package. Some of the commands are  TCL commands, but  most of them are
+defined by Draw. Those commands are found in all Draw applications.
+
+The commands are grouped in four sections 
+
+- general commandsused for Draw and TCL management
+
+- variable commands used to manage Draw variables, storing, dumping ...
+
+- graphic commands used to manage the graphic system : views ...
+
+- variables display commands are used to manage the display of objects
+
+
+
+* Menu:
+
+* General commands::
+* Variables management commands::
+* Graphic Commands::
+* Variables display commands::
+
+
+Node: General commands,  Prev: ,  Next: Variables management commands,  Up: Basic commands,
+
+
+This section describes some  useful commands, help to get information,
+source to eval a script from a file, spy  to capture the commands in a
+file, cpulimit limit the  process cpu time,  wait to waste some  time,
+chrono to time commands.
+
+
+
+* Menu:
+
+* help::
+* source::
+* spy::
+* cpulimit::
+* wait::
+* chrono::
+
+
+Node: help,  Prev: ,  Next: source,  Up: General commands,
+
+
+SYNOPSIS
+
+
+	help [command [helpstring group]]
+
+
+PURPOSE
+
+
+Provides help or modifies the help information.
+
+help,  without arguments  list all groups    and the commands  in each
+group.
+
+help command, provides information on a command or  a set of commands,
+command  may be a   shell-like regular expression. * is  automatically
+added at the end so that all completing commands match.
+
+
+help command  helpstring group, defines  helpstring to be the help for
+command,  put the command in  the group. The   group defaults to "User
+commands".
+
+
+EXAMPLE
+
+
+# Gives help on all command starting with a
+help a
+
+# defines help for the help command
+help {help [command [helpstring group = "Use commands"]]} "DRAW Basic Commands"
+
+
+Node: source,  Prev: help,  Next: spy,  Up: General commands,
+
+
+SYNOPSIS
+
+
+	source file
+
+
+PURPOSE
+
+
+Reads and evaluates commands from a file.
+
+The exit command will terminate the file.
+
+
+SEE ALSO
+
+exit
+
+
+Node: spy,  Prev: source,  Next: cpulimit,  Up: General commands,
+
+
+SYNOPSIS
+
+
+	spy [file]
+
+
+PURPOSE
+
+
+Save interactive commands in the file.  If there is already spying the
+current file is closed.  spy without  argument closes the current file
+and  stops spying.
+
+If a command returns an error it is saved with a comment mark.
+
+The file created by spy can be played with the source command.
+
+
+EXAMPLE
+
+
+# from now all commands will be saved in the file "session"
+spy session
+
+# the file "session" is closed and commands are not saved
+spy
+
+
+SEE ALSO
+
+source
+
+
+Node: cpulimit,  Prev: spy,  Next: wait,  Up: General commands,
+
+
+SYNOPSIS
+
+
+	cpulimit [nbseconds]
+
+
+PURPOSE
+
+
+The process will be interrupted after nbseconds of cpu, this is useful
+during tests  to   avoid infinite loops.  cpulimit   without arguments
+removes all existing limits.
+
+
+EXAMPLE
+
+
+	#limit cpu to one hour
+	cpulimit 3600
+
+
+Node: wait,  Prev: cpulimit,  Next: chrono,  Up: General commands,
+
+
+SYNOPSIS
+
+
+	wait [nbseconds]
+
+
+PURPOSE
+
+
+Interrupt  execution   for nbseconds, the default    value is ten (10)
+seconds.  This is usefull in a  demo to give people   time to admire a
+nice picture.
+
+
+EXAMPLE
+
+
+	# You have ten seconds ...
+	wait 
+
+
+
+Node: chrono,  Prev: wait,  Next: ,  Up: General commands,
+
+
+SYNOPSIS
+
+
+	chrono [ name start/stop/reset/show]
+
+
+PURPOSE
+
+
+The chrono command  has two usages,  without arguments  it toggles the
+timing of commands. When chronometers  are activated each command will
+be timed, i.e. the cpu and user time of the command will be printed.
+
+With arguments the chrono  command is used  to manage chronometers,  a
+chronometer  is  a  special kind  of Draw    variable used to  measure
+time. The following action can be performed on a chronometer.
+
+- start : to run the chronometer.
+
+- stop : to stop the chronometer.
+
+- reset : to reset the chronometer to 0.
+
+- show : to display the current time.
+
+Chronometers  are  useful to print  partial  times as in the following
+example, the timing of the command foreach will only give you the time
+for all the process.
+
+
+EXAMPLE
+
+
+	# use of a chronometer
+	chrono swatch
+	foreach face {f1 f2 f3 f4 f5} {
+		chrono swatch reset
+		processface $face
+		chrono swatch stop
+		puts "$face is processed"
+		chrono swatch show
+	}
+
+
+Node: Variables management commands,  Prev: General commands,  Next: Graphic Commands,  Up: Basic commands,
+
+
+We describe now commands used to manage Draw variables. isdraw test if
+a variable  is a draw variable, directory  list draw variables, whatis
+gives the type of a  variable, dump prints  the content of a variable,
+rename and copy  change  the content  of variables,  datadir, save and
+restore are used to put the contents of variables in files.
+
+
+
+
+* Menu:
+
+* isdraw, directory::
+* whatis, dump::
+* rename, copy::
+* datadir, save, restore::
+
+
+Node: isdraw, directory,  Prev: ,  Next: whatis, dump,  Up: Variables management commands,
+
+
+SYNOPSIS
+
+
+	isdraw varname
+
+	directory [pattern]
+
+
+PURPOSE
+
+
+Use  isdraw to test  if  a variable is   a draw variable, isdraw  will
+return 1 if there is a Draw value attached to the variable.
+
+Use directory to return a list of all Draw global variables matching a
+pattern, like the shell ls command.
+
+
+EXAMPLE
+
+
+	set a 1
+	isdraw a
+	===> 0
+
+	dset a 1
+	isdraw a
+	===> 1
+
+	circle c 0 0 1 0 5
+	isdraw c
+	===> 1
+
+	# to destroy all Draw objects with name containing curve
+	foreach var [directory *curve*] {unset $var}
+
+
+SEE ALSO
+
+whatis
+
+
+Node: whatis, dump,  Prev: isdraw, directory,  Next: rename, copy,  Up: Variables management commands,
+
+
+SYNOPSIS
+
+
+	whatis varname [varname ...]
+
+	dump varname [varname ...]
+	
+
+PURPOSE
+
+
+Use  whatis to get  a  short information   about a Draw  variable, the
+result depends  on the type of the  object. Usually it  is the name of
+the type.
+
+Use dump to  get a long information about  a Draw variable, the result
+depends on the type of  the object. Usually it is  a full dump (may be
+rather long for geometry or topology).
+
+
+EXAMPLE
+
+
+	dset x 3
+	whatis x
+	==> x is a numeric
+
+	dump x
+	==> *********** Dump of x *************
+	==> 3
+
+
+WARNINGS
+
+
+The behavior of whatis on other variables (not Draw) is not excellent.
+
+
+Node: rename, copy,  Prev: whatis, dump,  Next: datadir, save, restore,  Up: Variables management commands,
+
+
+SYNOPSIS
+
+
+	rename varname tovarname  [varname tovarname ...]
+
+	copy varname tovarname  [varname tovarname ...]
+
+
+PURPOSE
+
+
+Use   rename to change   the name  of   a Draw variable, the  original
+variable  does not  exist  any  more, note   that the content  is  not
+modified, only the name is changed.
+
+Use  copy to make  a new variable   with a copy of   the content of an
+existing variable.   The exact behavior of copy  is type dependent, in
+some cases   the content may  still  be  shared (see  the  topological
+variables for example).
+
+
+EXAMPLE
+
+
+	circle c1 0 0 1 0 5
+	rename c1 c2
+
+	# curves are copied, c2 will not be modified
+	copy c2 c3
+	2dtranslate c3 10 0
+
+
+
+Node: datadir, save, restore,  Prev: rename, copy,  Next: ,  Up: Variables management commands,
+
+
+SYNOPSIS
+
+
+	datadir [data-path]
+
+	save name [filename]
+
+	restore filename [name]
+
+
+PURPOSE
+
+
+Use save  and restore to  transfert the  content  of Draw variables to
+files,  the files are located  in the  data directory.
+
+Use save to write a file  in the data directory  with the content of a
+variable, by default the name of the file is the name of the variable,
+to give a different name use a second argument.
+
+Use restore to read  the content of a file  in the data directory in a
+local variable, by default the name of the variable if the name of the
+file, to give a different name use a second argument.
+
+The exact  content of  the file is  type  dependent, they are  usually
+ASCII files, so they are architecture independnts.
+
+
+
+EXAMPLE
+
+
+	# note how TCL access shell environment variables
+	# using $env()
+	datadir $env(WBCONTAINER)/data/default
+	datadir
+	==> /adv_20/BAG/data/default
+
+	box b 10 20 30
+	save b theBox
+	
+	# when TCL does not find a command it tries a shell command
+	ls [datadir]
+	==> theBox
+
+	restore theBox
+	datadir ./bugs
+	datadir
+	==> /adv_20/BAG/data/bugs
+
+	# now the box is saved in both the default and data directories
+	save theBox
+
+
+
+Node: Graphic Commands,  Prev: Variables management commands,  Next: Variables display commands,  Up: Basic commands,
+
+
+Graphic  commands  are used to manage  the  Draw graphic system.  Draw
+provides a 2d and a 3d viewer with up to  30 views, views are numbered
+and    the index  of   the view  is  visible  in  the    title of  the
+window. Objects are  displayed  in all 2d views   or in  all  3d views
+depending on their type but never on both.
+
+The view  and delete commands  are the basic view management commands,
+but  useful procedures for screen layout  are defined, axo, left, top.
+
+Commands are provided  to modify the view  parameters, fit,  zoom, pu,
+pd, pl, pr to pan, u,d,l,r to rotate. fu, fd to change the focal.
+
+The  view parameters commands  process all views or  only one view, in
+this case the index of the view must be given as the first argument. A
+command  control 3d views or   2d views, the 2d  views  version of the
+command starts with 2d, for example zoom and 2dzoom.
+
+Colors are numbered from 1  to 15, the  aspect can be changed with the
+color command.
+
+To put some text on the screen use the dtext command.
+
+Postscript drawings  can  be made with  the hardcopy  command and  xwd
+files with the xwd command.
+
+To use the mouse you can use the pick and the wclick commands.
+
+
+
+
+* Menu:
+
+* view, delete::
+* axo, pers, top, ...::
+* mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
+* pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
+* fit, 2dfit::
+* u, d, l, r::
+* focal, fu, fd::
+* color::
+* dtext::
+* hardcopy, hcolor, xwd::
+* wclick, pick::
+
+
+Node: view, delete,  Prev: ,  Next: axo, pers, top, ...,  Up: Graphic Commands,
+
+
+SYNOPSIS
+
+
+	view index type [X Y W H]
+
+	delete [index]
+
+
+PURPOSE
+
+
+view is the basic view  creation command. It  creates a new view  with
+the given   index,  if a  view already   exits with  this index it  is
+destroyed. The view is created with default parameters and X Y W H are
+the  position and dimensions on  the window on the  screen, they are X
+window system coordinates in pixel, 0,0 being the upper left corner of
+the   screen.  Default values are 0,   0, 500, 500  which  is not very
+convenient.
+
+Usually it is far simpler to use the procedures as axo, top, left to
+create views.
+
+delete destroy a view, if no index is given all views are destroyed.
+
+The type is a four letter upper case code among the followings 
+
+- AXON	: Axonometric view
+
+- PERS  : Perspective view
+
+- +X+Y  : View on the two axes (i.e. a top view), other codes are
+	  -X+Y +Y-Z etc...
+
+- -2D- : 2d view
+
+The  index, the  type,  the current zoom are  displayed  in the window
+title.
+
+
+EXAMPLE
+
+
+	# this is the content of the mu4 procedure
+	proc mu4 {} {
+		delete
+		view 1 +X+Z 320 20 400 400
+		view 2 +X+Y 320 450 400 400
+		view 3 +Y+Z 728 20 400 400
+		view 4 AXON 728 450 400 400
+	}
+
+
+SEE ALSO
+
+
+axo, pers, top, bottom, left, right, front, back, mu4
+v2d, av2d, smallview
+
+
+Node: axo, pers, top, ...,  Prev: view, delete,  Next: mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom,  Up: Graphic Commands,
+
+
+SYNOPSIS
+
+
+	axo
+
+	pers
+
+	...
+
+	smallview type
+
+
+PURPOSE
+
+
+All these  commands  are  procedures used  to  define  standard screen
+layout, they delete all  existing views and   create some views.   The
+layout usually abides by the european convention, i.e. the top view is
+under the front view.
+
+- axo  : One big axonometric view
+
+- pers : One big perspective view
+
+- top, bottom, left, right, front, back : One big  axis view
+
+-  mu4 : Four views layout with front, left, top and axo
+
+- v2d : One big 2d view
+
+- av2d : Two views, one 2d and one axo
+
+The smallview command creates a view at the right bottom of the screen
+with the given type. See the view command for the type list.
+
+
+
+EXAMPLE
+
+
+	# just try them !!
+
+	# here we give the body of smallview
+
+	proc smallview {{v AXON}} {
+		delete
+		view 1 $v 728 450 400 400
+	}
+
+
+SEE ALSO
+
+
+view, delete
+
+
+Node: mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom,  Prev: axo, pers, top, ...,  Next: pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr,  Up: Graphic Commands,
+
+
+SYNOPSIS
+
+
+	mu [index]
+
+	2dmu [index]
+
+	zoom [index] value
+
+	wzoom
+
+
+PURPOSE
+
+
+Use mu (magnify up) to increase the zoom in a view or  in all views by
+a factor of  10%. md (magnify down) decrease  the zoom by the  inverse
+factor. 2dmu and 2dmd do the same on one or all 2d views.
+
+Use zoom  or  2dzoom to set the   zoom  factor to  a given  value. The
+current zoom is always displayed in the window title.
+
+Use wzoom (window zoom) to select with the mouse the  area you want to
+zoom in a view. You will be prompted for two graphic selections in the
+same  view and the  rectangle you  defined will  be  set to the  whole
+window of the view.
+
+
+EXAMPLE
+
+
+	# set a zoom of 2.5 on all 2d views
+	zoom 2.5
+
+	# magnify on 
+	mu 1
+
+
+
+SEE ALSO
+
+
+fit, 2dfit
+
+
+Node: pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr,  Prev: mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom,  Next: fit, 2dfit,  Up: Graphic Commands,
+
+
+SYNOPSIS
+
+
+	pu [index]
+
+	pd [index]
+
+
+PURPOSE
+
+
+Use the pu, .. commands to pan the  view, pu and  pd pan vertically up
+and down,  pl and pr pan  horizontally left and   right. The views are
+panned by a quantity of 40 pixels.
+
+
+EXAMPLE
+
+
+	# pan up the first view
+	pu 1
+
+
+
+SEE ALSO
+
+fit, 2dfit
+
+
+Node: fit, 2dfit,  Prev: pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr,  Next: u, d, l, r,  Up: Graphic Commands,
+
+
+SYNOPSIS
+
+
+	fit [index]
+
+	2dfit [index]
+
+
+PURPOSE
+
+
+Use the fit command to compute automatically a best zoom and panning on
+the content of the view. The content of the view will be centered and
+fit the whole window.
+
+When fitting all views a unique zoom is computed for all the views, so
+each view is not  best fitted but all views  are on the same scale. To
+compute a best fit on all views fit them one by one.
+
+
+EXAMPLE
+
+
+	# fit only view 1
+	fit 1
+
+	# fit all 2d views
+	2dfit
+
+
+SEE ALSO
+
+zoom, mu, pu
+
+
+Node: u, d, l, r,  Prev: fit, 2dfit,  Next: focal, fu, fd,  Up: Graphic Commands,
+
+
+SYNOPSIS
+
+
+	u [index]
+
+	d [index]
+
+	l [index]
+
+	r [index]
+
+
+PURPOSE
+
+
+Rotate the view in the up, down, left or right direction  by five
+degrees. This is only for axonometric and perspective views.
+
+
+EXAMPLE
+
+
+	# rotate the view up
+	u
+
+
+Node: focal, fu, fd,  Prev: u, d, l, r,  Next: color,  Up: Graphic Commands,
+
+
+SYNOPSIS
+
+
+	focal [index] value
+
+	fu [index]
+
+	fd [index]
+
+
+PURPOSE
+
+
+Use the  focal method  to change the   focal distance for  perspective
+views. The focal is the distance form the eye to the view point. A low
+focal  increases the perspective  effect, a  high  focal looks like an
+axonometric. The default value is 500.
+
+Use fu and fd to increase or decrease the focal value by 10%. fd makes
+the eye closer to the object.
+
+
+EXAMPLE
+
+
+	# create a perspective and look closer
+	pers
+	repeat 10 fd
+
+
+WARNINGS
+
+
+A negative or null focal is not a bright idea !!
+
+
+SEE ALSO
+
+pers
+
+
+Node: color,  Prev: focal, fu, fd,  Next: dtext,  Up: Graphic Commands,
+
+
+SYNOPSIS
+
+
+	color index name
+
+
+PURPOSE
+
+
+Set the color to a value, index is the index of the color between 0
+and 15, name is a X window color name. The list can be found in the
+file rgb.txt in the X library directory.
+
+The default value are
+
+0 White
+, 1 Red
+, 2 Green
+, 3 Blue
+, 4 Cyan
+, 5 Gold
+, 6 Magenta
+, 7 Marron
+, 8 Orange
+, 9 Pink
+, 10 Salmon
+, 11 Violet
+, 12 Yellow
+, 13 Khaki
+, 14 Coral
+
+
+
+EXAMPLE
+
+
+	# change the hue of the blue
+	color 3 "navy blue"
+
+
+WARNINGS
+
+
+The color change will be visible on the next  redraw of the views, for
+example after fit or mu.
+
+
+Node: dtext,  Prev: color,  Next: hardcopy, hcolor, xwd,  Up: Graphic Commands,
+
+
+SYNOPSIS
+
+
+	dtext [x y [z]] string
+
+
+PURPOSE
+
+
+Display a string in all 3d or 2d views.  If no coordinates are given a
+graphic selection  is required. If  two coordinates are given the text
+is created in 2d views at  this position, with  3 coordinates the text
+is created in 3d views. The coordinates are real space coordinates.
+
+
+EXAMPLE
+
+
+	# mark the origins
+	dtext 0 0 "This is the 2d origin"
+	dtext 0 0 0 "This is the 3d origin"
+
+	# write on the views
+	dtext "You just clicked here"
+
+
+Node: hardcopy, hcolor, xwd,  Prev: dtext,  Next: wclick, pick,  Up: Graphic Commands,
+
+
+SYNOPSIS
+
+
+	hardcopy [index]
+
+	hcolor index width gray
+	
+	xwd [index] filename
+
+
+PURPOSE
+
+
+The hardcopy   command creates a  postcript file  named post.ps  in the
+current  directory. This file  contains  the postscript description of
+the view index, or of all the views.
+
+The hcolor command   lets you  change   the  aspect of   lines in  the
+postscript file, it allows to specify a width and a gray level for one
+of the 16 colors. width is measured in points, the default value is 1,
+gray is a grey level from 0 = black to 1 = white, the default value is
+0. All colors are bound to the default values at the beginning.
+
+The xwd command  creates an X window xwd  file from a view, by default
+index is 1.   To visualize an  xwd file you  can use the unix  command
+xwud.
+
+
+EXAMPLE
+
+
+	# all blue lines (color 3) 
+	# will be half-width and grey
+
+	hcolor 3 0.5 
+
+	# make a postscript file and print it
+	hardcopy
+	lpr post.ps
+
+	# make an xwd file and display it
+	xwd theview
+	xwud -in theview
+
+
+WARNINGS
+
+
+There are bugs  when using hardcopy  without index with more than  one
+view.
+
+You need a postscript printer or your harcopy will not look great.
+
+
+SEE ALSO
+
+color
+
+
+Node: wclick, pick,  Prev: hardcopy, hcolor, xwd,  Next: ,  Up: Graphic Commands,
+
+
+SYNOPSIS
+
+
+	wclick
+
+	pick  index X Y Z b [nowait]
+
+
+PURPOSE
+
+
+Use  the wclick command to wait  until a mouse  button is clicked, the
+message   "just click" is displayed.    This  is useful to let  people
+admire a drawing until they are fed up with it.
+
+Use the pick command to get a graphical input, the arguments must be
+names for variables where the results are stored.
+
+- index : will be the index of the view where the input was made
+
+- X,Y,Z : Are 3d coordinates in real world
+
+- b : b is the mouse button 1,2 or 3
+
+When there is an extra argument its value  is not used and the command
+do not wait for a button click, the value of b  may then be 0 if there
+was no click. This option is useful for tracking the pointer.
+
+Note that the results are stored in Draw numeric variables.
+
+
+EXAMPLE
+
+
+	# make a circle at mouse location
+	pick index x y z b
+	circle c x y z 0 0 1 1 0 0 0 30
+
+	# make a dynamic circle at mouse location
+	# stop when a button is clicked
+	# (see the repaint command)
+
+	dset b 0
+	while {[dval b] == 0} {
+		pick index x y z b nowait
+		circle c x y z 0 0 1 1 0 0 0 30
+		repaint
+	}
+
+
+SEE ALSO
+
+repaint
+
+
+Node: Variables display commands,  Prev: Graphic Commands,  Next: ,  Up: Basic commands,
+
+
+Many Draw objects  can  be displayed,  for example curves,   surfaces,
+shapes.  Draw provides commands to manage the  display of the objects.
+display, donly  are used to display  objects, erase, clear, 2dclear to
+erase them.  The autodisplay command is used   to control if variables
+are displayed as soon as created.
+
+The variable name "." (dot) has a special status within Draw, any draw
+command expecting a Draw  object as argument  can be passed a dot. The
+meaning of the dot is the following.
+
+If the  dot is an input  argument a graphical  selection will be made,
+instead of getting the object  from a variable.  Draw will ask you  to
+select an object on a view.
+
+If the dot is  an output argument, an  unnamed object will be created,
+of  course this will make   sense only for  graphical  objects, if you
+create an  unnamed  number you will not  be  able  to  access it. This
+feature is useful when you want to create objects for display only.
+
+If you do not see what you expected while  executing loops or sourcing
+files you may want to consider the repaint and dflush commands.
+
+
+EXAMPLE
+
+
+	# use dot to dump an object on the screen
+	dump .
+
+	# display points on a curve c
+	# with dot no variables are created
+	for {set i 0} {$i <= 10} {incr i} {
+		cvalue c $i/10 x y z
+		point . x y z
+	}
+
+	# point p x y z
+	# would have displayed only one point
+	# because the precedent content of a variable is erased
+
+
+	# point p$i x y z
+	# is an other solution, creating variables
+	# p0, p1, p2, ....
+
+	# give a name to a graphic object
+	rename . x
+
+
+
+* Menu:
+
+* autodisplay::
+* display, donly::
+* erase, clear, 2dclear::
+* repaint, dflush::
+
+
+Node: autodisplay,  Prev: ,  Next: display, donly,  Up: Variables display commands,
+
+
+SYNOPSIS
+
+
+	autodisplay [0/1]
+
+
+PURPOSE
+
+
+By default Draw displays automatically any graphical object as soon as
+it is created. This behavior known as  autodisplay can be removed with
+this command. Without  arguments, autodisplay  toggles the autodisplay
+mode, the command always returns the current mode.
+
+When autodisplay is off, using the dot return argument is ineffective.
+
+
+EXAMPLE
+
+
+	# c is dislayed
+	circle c 0 0 1 0 5
+
+	# toggle the mode
+	autodisplay
+	==> 0
+	circle c 0 0 1 0 5
+
+	# c is erased, but not displayed
+	display c
+
+
+SEE ALSO
+
+display
+
+
+Node: display, donly,  Prev: autodisplay,  Next: erase, clear, 2dclear,  Up: Variables display commands,
+
+
+SYNOPSIS
+
+
+	display varname [varname ...]
+
+	donly  varname [varname ...]
+
+
+PURPOSE
+
+
+Use display to make objects visible. Use donly to make objects visible
+and erase all other objects, it stands for "display only".
+
+As you  may have  guessed "display ."  is quite  useless, "donly ." is
+very useful to extract one object from a messy screen.
+
+
+EXAMPLE
+
+
+	# to see everybody
+	foreach var [directory] {display $var}
+
+	# to select two objects and erase the others
+	donly . .
+
+
+
+SEE ALSO
+
+erase
+
+
+Node: erase, clear, 2dclear,  Prev: display, donly,  Next: repaint, dflush,  Up: Variables display commands,
+
+
+SYNOPSIS
+
+
+	erase [varname varname ...]
+
+	clear
+
+	2dclear
+
+
+PURPOSE
+
+
+Use erase to erase objects from all the views, erase without arguments
+erase everything in 3d and 2d. To erase unnamed objects use "erase .".
+
+Use clear to erase  only 3d objects and 2dclear  for 2d objects, erase
+without arguments is the same thing as "clear; 2dclear".
+
+
+EXAMPLE
+
+
+	# erase all guys with name starting by c_
+	foreach var [directory c_*] {erase $var}
+
+	# clear 2d views
+	2d clear
+
+
+SEE ALSO
+
+
+display
+
+
+Node: repaint, dflush,  Prev: erase, clear, 2dclear,  Next: ,  Up: Variables display commands,
+
+
+SYNOPSIS
+
+
+	repaint
+
+	dflush
+
+
+PURPOSE
+
+
+The repaint command enforces pending repaint  of the views. The dflush
+command flushes the graphic buffers.  These commands are useful within
+loops or in scripts.
+
+A  new object is immediatly displayed,  but when an object is modified
+or erased the whole view must be repainted. To avoid doing it too many
+times, Draw only sets a flag and delays the  repaint to the end of the
+command when the new prompt is issued. Within a script you may want to
+display immediatly  the result of a  modification, the repaint command
+will repaint the views if the flag is raised and clear the flag.
+
+Graphical operations are buffered by Draw (and also  by the X system),
+usually the buffer is flushed   at the end  of  a command and   before
+graphical selection. If  you want to  flush the buffer within a script
+use the dflush command.
+
+
+EXAMPLE
+
+
+	# See the example with the pick command
+
+
+SEE ALSO
+
+pick
+
+
+Node: Geometry commands,  Prev: Basic commands,  Next: Topology commands,  Up: Top,
+
+
+Draw  provides a set of commands  to test geometry libraries. Geometry
+libraries are provided with the GEOMETRY  UL. These commands are found
+in the TGEOMETRY executable, or in  any Draw executable  as long as it
+includes the GeometryTest commands.
+
+The geometry with Draw includes new  types of variables
+
+- The 2d and 3d point will be referred to as Draw points.
+
+- The 2d curve, it is exactly the same as the Geom2d_Curve class. Will
+be referred to as Draw 2d curve.
+
+- The 3d  curve and the surface,  they are exactly the Geom_Curve  and
+Geom_Surface classes.  Will  be referred  to as  Draw  curve  and Draw
+surface.
+
+Please refer to  the  Geom and Geom2d   packages to learn  more  about
+CAS.CADE geometry.
+
+Draw geometric variables never share their data, the copy command will
+always make a complete copy of the content of the variable.
+
+The following sections cover the topics 
+
+-  crves creation,  the different types  of curves  and how to create
+them.
+
+- surfaces creation, the different types of surfaces and how to create
+them.
+
+- curves and surfaces modification, commands  to modify the definition
+of curves and surfaces, a majority is for bezier and bspline.
+
+- geometric transformations, i.e. translation, rotation, mirror, ...
+
+- analysis  of  curves  and   surfaces, commands to  compute   points,
+derivatives, curvatures.
+
+- intersections of surfaces and curves.
+
+- approximations of set of points to create curves and surfaces.
+
+- construction of 2d circles and lines by constraints like tangency.
+
+- the  last  section describes  commands which control  the display of
+curves and surfaces.
+
+When possible the commands are general, i.e. they process 2d curves 3d
+curves and surfaces, for example the circle command may create a 2d or
+a 3d circle  depending on the number  of  arguments and the  translate
+command will process points, curves or  surfaces depending on the type
+of the argument. So when  you do not find a  command in a section  you
+may look in another section, for example the trim command is described
+in the surface section but it can be used with curves.
+
+
+
+
+* Menu:
+
+* Creation of curves::
+* Creation of surfaces::
+* Modifications of Curves and surfaces::
+* Transformations::
+* Analysis of curves and surfaces ::
+* Intersections::
+* Approximations::
+* Constraints::
+* Display::
+
+
+Node: Creation of curves,  Prev: ,  Next: Creation of surfaces,  Up: Geometry commands,
+
+
+To  create  points use the point   command, to create  curves use the
+command corresponding to the type. The types of curves are :
+
+- Analytical curves : line, circle, ellipse, parabola, hyperbola. 
+
+- Polar curves : beziercurve, bsplinecurve.
+
+-  Trimmed curves and Offset  curves made  from  other curves with the
+trim and offset command.  Note that  the trim  and offset command  are
+described in the surface section, as they work on curves or surfaces.
+
+- Bspline  curves (NURBS) can be  created from other curves  using the
+convert command (see the surface creation).
+
+- Curves can be created from surface isoparametric lines with the uiso
+and viso commands.
+
+- 3d curves  can be created from 2d  curves and the contrary using the
+to3d  and to2d commands. The project   command more generally computes
+the 2d curve on a surface.
+
+Curves are displayed with an arrow to indicate the last parameter.
+
+
+
+* Menu:
+
+* point::
+* line::
+* circle::
+* ellipse::
+* hyperbola::
+* parabola::
+* beziercurve, 2dbeziercurve::
+* bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve::
+* uiso, viso::
+* to2d, to3d::
+* project::
+
+
+Node: point,  Prev: ,  Next: line,  Up: Creation of curves,
+
+
+SYNOPSIS
+
+
+	point name x y [z]
+
+
+PURPOSE
+
+
+Use the point command to create a 2d or 3d point, depending on the
+number of arguments.
+
+
+EXAMPLE
+
+
+	# 2d point
+	point p1 1 2
+
+	# 3d point
+	point p2 10 20 -5
+
+
+
+Node: line,  Prev: point,  Next: circle,  Up: Creation of curves,
+
+
+SYNOPSIS
+
+
+	line name x y [z] dx dy [dz]
+
+
+PURPOSE
+
+
+Use the line  command  to create a  3d  or 2d line.   x  y z are   the
+coordinates of  the origin of the  line,  dx, dy, dz  is the direction
+vector. Of course the dimension must be  consistent, either line l x y
+dx dy in 2d or line l x y z dx dy dz in 3d.
+
+A  line is parametrised  by the length  starting form the origin along
+the direction vector, the direction vector will be normalised, it must
+not be null. The lines are infinite, but not the drawing.
+
+
+EXAMPLE
+
+
+	# a 2d line at 45 degrees of the X axis
+	line l2d 0 0 1 1
+
+	# a 3d line trough the point 10 0 0 parallel to Z
+	line l 10 0 0 0 0 1
+
+
+Node: circle,  Prev: line,  Next: ellipse,  Up: Creation of curves,
+
+
+SYNOPSIS
+
+
+	circle name x y [z [dx dy dz]] [ux uy [uz]] radius
+
+
+PURPOSE
+
+
+Use this  command to create a 2d  or  a 3d circle,  in  2d x,y are the
+coordinates of the center and ux, uy is the vector in the direction of
+the origin of the parameters, by default this direction is (1,0) the X
+axis. Use another vector to change the origin of parameters.
+
+In 3d x,y,z are the coordinates of the  center, dx,dy,dz is the normal
+vector defining the plane through the center where the circle is, this
+vector is normalised and must  not be null, by  default this vector is
+(0,0,1) i.e. the Z axis.  ux,uy,uz is  the direction of the origin, if
+it is not given a default direction will be computed, this vector must
+not be null or parallel to dx,dy,dz.
+
+The circle is parametrised by the  angle in [0,2*pi] starting from the
+origin. Note  that the specification of origin  direction and plane is
+the same for all analytical curves and surfaces.
+
+
+EXAMPLE
+
+
+	# A 2d circle of radius 5 centered at 10,-2
+	circle c1 10 -2 5
+
+	# an other 2d circle with a user defined origin
+	# the point of parameter 0 on this circle will be
+	# 1+sqrt(2),1+sqrt(2)
+	circle c2 1 1 1 1 2
+
+	# a 3d circle, center 10 20 -5, axis Z, radius 17
+	circle c3 10 20 -5 17
+
+	# same 3d circle with axis Y
+	circle c4 10 20 -5 0 1 0 17
+
+	# full 3d circle, axis X, origin on Z
+	circle c5 10 20 -5 1 0 0 0 0 1 17
+
+	
+
+
+Node: ellipse,  Prev: circle,  Next: hyperbola,  Up: Creation of curves,
+
+
+SYNOPSIS
+
+
+	ellipse name x y [z [dx dy dz]] [ux uy [uz]] firstradius secondradius
+
+
+PURPOSE
+
+
+Create a 2d or 3d ellipse, the first arguments are the same as for the
+circle to define the center  and the system of  axis. The ellipse will
+have  firstradius on its  X axis and  secondradius  on its Y axis. The
+ellipse is parametrised by [0,2*pi] starting from the  X axis going to
+the Y axis. Note that this is not an  angle, the local parametrisation
+of the ellipse is (firstradius * cos(t), secondradius * sin(t))
+
+
+EXAMPLE
+
+
+	# default 2d ellipse
+	ellipse e1 10 5 20 10
+
+	# 2d ellipse at angle 60 degree
+	ellipse e2 0 0 1 2 30 5
+
+	# 3d ellipse, in the XY plane
+	ellipse e3 0 0 0 25 5
+
+	# 3d ellipse in the X,Z plane with axis 1, 0 ,1
+	ellipse e4 0 0 0 0 1 0 1 0 1 25 5
+
+
+
+SEE ALSO
+
+
+circle
+
+
+Node: hyperbola,  Prev: ellipse,  Next: parabola,  Up: Creation of curves,
+
+
+SYNOPSIS
+
+
+	hyperbola name x y [z [dx dy dz]] [ux uy [uz]] firstradius secondradius
+
+
+PURPOSE
+
+
+Create a 2d or 3d ellipse, the first arguments are the same as for the
+circle to define the center and the system of axis. The hyperbola will
+have firstradius on its X  axis and secondradius  on its Y axis.  This
+values  are not real  radius but  the  coefficients of  the parametric
+equation, where  the  parameters run    for -infinite  to    +infinite
+(firstradius * ch(t),  secondradius * sh(t)).  Note that the hyperbola
+has only one branch, the one in the X direction.
+
+
+EXAMPLE
+
+
+	# default 2d hyperbola, with asymptotes 1,1 -1,1
+	hyperbola h1 0 0  30 30
+
+	# 2d hyperbola at angle 60 degree
+	hyperbola h2 0 0 1 2 20 20
+
+	# 3d hyperbola, in the XY plane
+	hyperbola h3 0 0 0 50 50
+
+
+
+SEE ALSO
+
+
+circle
+
+
+Node: parabola,  Prev: hyperbola,  Next: beziercurve, 2dbeziercurve,  Up: Creation of curves,
+
+
+SYNOPSIS
+
+
+	parabola name x y [z [dx dy dz]] [ux uy [uz]] focal
+
+
+PURPOSE
+
+
+Create  a 2d or 3d  parabola in the   axis-system defined by the first
+arguments (see  the  circle command),  the origin  is the apex  of the
+parabola and focal  is the coefficient in the  parametric equation : (
+x= t*t / 4*focal, y = t).
+
+
+EXAMPLE
+
+
+	# 2d parabola
+	parabola p1 0 0 50
+
+	# 2d parabola with convexity +Y
+	parabola p2 0 0 0 1 50
+
+	# 3d parabola in the Y-Z plane, convexity +Z
+	parabola p3 0 0 0 1 0 0 0 0 1 50
+
+
+SEE ALSO
+
+circle
+
+
+Node: beziercurve, 2dbeziercurve,  Prev: parabola,  Next: bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve,  Up: Creation of curves,
+
+
+SYNOPSIS
+
+
+	beziercurve name nbpoles x1 y1 z1 [w1] x2 y2 z2 [w2] ....
+
+	2dbeziercurve name nbpoles x1 y1 z1 [w1] x2 y2 z2 [w2] ....
+
+
+PURPOSE
+
+
+Use the beziercurve command  to create a 3d curve,  give the number of
+poles then  the   coordinates of  the  poles,   the   degree will   be
+nbpoles-1.  You can give  weights with the poles  to create a rational
+curve, you must give weights for all poles or for none.
+
+Use  2dbeziercurve to create  a 2d curve with   the same conditions as
+above.
+
+
+EXAMPLE
+
+
+	# a rational 2d bezier curve (arc of circle)
+	2dbeziercurve ci 3 0 0 1 10 0 sqrt(2.)/2. 10 10 1
+
+	# a 3d bezier curve, not rational
+	beziercurve cc 4 0 0 0 10 0 0 10 0 10 10 10 10
+
+
+Node: bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve,  Prev: beziercurve, 2dbeziercurve,  Next: uiso, viso,  Up: Creation of curves,
+
+
+SYNOPSIS
+
+
+	bsplinecurve name degree nbknots k1 m1 ... x1 y1 z1 w1 ...
+
+	2dbsplinecurve name degree nbknots k1 m1 ... x1 y1 w1 ...
+
+	pbsplinecurve name degree nbknots k1 m1 ... x1 y1 z1 w1 ...
+
+	2dpbsplinecurve name degree nbknots k1 m1 ... x1 y1 w1 ...
+
+
+PURPOSE
+
+
+Use the bsplinecurve commands  to create 3d  or  2d NURBS curves,  the
+pbsplinecurve  and   2dpbsplinecurve commands      create     periodic
+curves. Degree  is the  degree for  the curves,  nbknots the number of
+knots,  then you must  give  the knots with  their multiplicities, the
+knots must  be non decreasing,   if succcessive  knots are  equal  the
+multiplicities will be added, multiplicities must be lower or equal to
+the degree, on non  periodic curves the  first and last multiplicities
+can  be equal to degree+1, this  is even  recommended  if you like the
+curve to go from the first pole to the last pole.  On a periodic curve
+the first and last multiplicity must be equal.
+
+The poles must be given with their weights, use weights of 1 for a non
+rational curve, the number of poles must be
+
+For a non periodic curve, Sum of multiplicities - degree + 1
+
+For a periodic curve, Sum of multiplicities - last multiplicity
+
+
+EXAMPLE
+
+
+	# a 2d periodic circle (parameter from 0 to 2*pi !!)
+	dset h sqrt(3)/2
+	2dpbsplinecurve c 2 \
+	4 0 2 pi/1.5 2 pi/0.75 2 2*pi 2 \
+	0 -h/3 1 \
+	0.5 -h/3 0.5 \
+	0.25 h/6 1 \
+	0 2*h/3 0.5 \
+	-0.25 h/6 1 \
+	-0.5 -h/3 0.5 \
+	0 -h/3 1 
+
+
+Node: uiso, viso,  Prev: bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve,  Next: to2d, to3d,  Up: Creation of curves,
+
+
+SYNOPSIS
+
+
+	uiso name surface u
+
+	viso name surface u
+
+
+PURPOSE
+
+
+Use these commands to create a U or V isoparametric curve from a surface.
+
+
+EXAMPLE
+
+
+	# create a cylinder and extract to iso curves
+	# see the cylinder command
+
+	cylinder c 10
+	uiso c1 c pi/6
+	viso c2 c 5
+
+
+WARNINGS
+
+
+It is not possible to extract isoparametric curves on offset surfaces.
+
+
+Node: to2d, to3d,  Prev: uiso, viso,  Next: project,  Up: Creation of curves,
+
+
+SYNOPSIS
+
+
+	to3d name curve2d [plane]
+
+	to2d name curve3d [plane]
+
+
+PURPOSE
+
+
+to3d and to2d commands  are used to create a  3d curve from a 2d curve
+and a 2d curve   from a 3d curve.   The  transformation uses  a planar
+surface  to define the  XY plane in  3d, by default  this plane is the
+default OXY plane.  to3d  always gives a correct  result, but to2d may
+surprise you as it is  not a projection.  It is  always correct if the
+curve  is planar and  parallel to the plane  of projection, the points
+defining the  curve  are projected  onto the plane   but a circle will
+remain a circle for example, it will not be changed to an ellipse.
+
+
+EXAMPLE
+
+
+	# the following commands
+	circle c 0 0 5
+	plane p -2 1 0 1 2 3
+	to3d c c p
+
+	# will create the same circle as
+	circle c -2 1 0 1 2 3 5
+
+
+SEE ALSO
+
+
+project
+
+
+Node: project,  Prev: to2d, to3d,  Next: ,  Up: Creation of curves,
+
+
+SYNOPSIS
+
+
+	project name curve3d surface
+
+
+PURPOSE
+
+
+Computes    the 2d curve  in   the   parametric space  of  the surface
+correponding  to the 3d curve.  This  can be  used  only on analytical
+surface and for curves lying on the surface.
+
+
+EXAMPLE
+
+
+	# intersect a cylinder and a plane
+	# and project the resulting ellipse on the cylinder
+	# this will create a 2d sinusoid-like bspline
+	cylinder c 5
+	plane p 0 0 0 0 1 1
+	intersect i c p
+	project i2d i c
+
+
+Node: Creation of surfaces,  Prev: Creation of curves,  Next: Modifications of Curves and surfaces,  Up: Geometry commands,
+
+
+To create surfaces use also the type, types of surfaces are
+
+- Analytical surface : plane, cylinder, cone, sphere, torus.
+
+- Polar surfaces : beziersurf, bsplinesurf
+
+-  Trimmed and Offset surface,  using the commands trim, trimu, trimv,
+offset.
+
+-  Surface of Revolution and  Extrusion, created  from curves with the
+revsurf and extsurf commands.
+
+-  NURBS surface  can be  constructed from   other  surfaces using the
+convert command.
+
+Surfaces are displayed  with isoparametric  lines, a small  parametric
+line is displayed  at 1/10 of U  with a length  1/10 of V to  show the
+parametrisation.
+
+
+
+* Menu:
+
+* plane::
+* cylinder::
+* cone::
+* sphere::
+* torus::
+* beziersurf::
+* bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf::
+* trim, trimu, trimv::
+* offset::
+* revsurf::
+* extsurf::
+* convert::
+
+
+Node: plane,  Prev: ,  Next: cylinder,  Up: Creation of surfaces,
+
+
+SYNOPSIS
+
+
+	plane name [x y z [dx dy dz [ux uy uz]]]
+
+
+PURPOSE
+
+
+Uses  this command to create  an infinite plane, a  plane  is the same
+thing as a 3d  coordinate system, x,y,z is the  origin, dx, dy, dz  is
+the Z direction  and  ux, uy, uz is  the  X direction.  The   plane is
+perpendicular to Z  and X is the  U  parameter. dx,dy,dz and  ux,uy,uz
+must not be  null and not colinear. ux,uy,uz  will  be modified to  be
+orthogonal to  dx,dy,dz. There are  default values for  the coordinate
+system, if no  arguments are given  the  default is the global  system
+(0,0,0), (0,0,1),  (1,0,0), if only the origin  is given the  axis are
+the default  ones (0,0,1), (1,0,0), if the  origin and the Z  axis are
+given the X axis is generated perpendicular to  the Z axis.  Note that
+this definition will be used for all analytical surfaces.
+
+
+EXAMPLE
+
+
+	# a plane through the point 10,0,0 perpendicular to X
+	# with U direction on Y 
+	plane p1 10 0 0 1 0 0 0 1 0 
+
+	# an horixontal plane with origin 10, -20, -5
+	plane p2 10 -20 -5
+
+
+Node: cylinder,  Prev: plane,  Next: cone,  Up: Creation of surfaces,
+
+
+SYNOPSIS
+
+
+	cylinder name [x y z [dx dy dz [ux uy uz]]] radius
+
+
+PURPOSE
+
+
+A cylinder is defined by a coordinate system, just like a plane, and a
+radius. The cylinder is an infinite cylinder  with the Z axis as axis,
+the  U  parameter  is  the angle   starting  from  X going  to   the Y
+direction. The V  coordinate is the  length along the Z  axis starting
+from the origin.
+
+
+EXAMPLE
+
+
+	# a cylinder on the default Z axis, radius 10
+	cylinder c1 10
+
+	# a cylinder, also with Z axis but with origin 5, 10, -3
+	cylinder c2 5 10 -3 10
+
+	# a cylinder through the origin 
+	# with longitude pi/3 and latitude pi/4 (euler angles)
+	dset lo pi/3. la pi/4.
+	cylinder c3 0 0 0 cos(la)*cos(lo) cos(la)*sin(lo) sin(la) 10
+
+
+SEE ALSO
+
+plane
+
+
+Node: cone,  Prev: cylinder,  Next: sphere,  Up: Creation of surfaces,
+
+
+SYNOPSIS
+
+
+	cone name [x y z [dx dy dz [ux uy uz]]] semi-angle radius
+
+
+PURPOSE
+
+
+Creates a cone in the  coordinate system, the radius  is the radius of
+the section of the cone  in the XY plane,  the semi-angle is the angle
+in degree of the cone with the axis, it  should be between -90 and 90,
+both and 0  excluded. The  vertex is on  the Z  axis  in the  negative
+direction at a distance radius/tan(semi-angle) from the origin. If the
+radius is 0 the vertex is the origin.
+
+To parametrise the cone,  U is  the angle  starting  from 0, in  the Y
+direction,   V is the length   along  the the  side  starting from the
+origin, in the local system V = Z / cos(semi-angle).
+
+The definition of the cone may seem redundant but it is very useful to
+disconnect the origin of the V parameter and the apex, mainly for very
+small angle when the cone is  like a cylinder,  the useful part of the
+surface may  be very far from  the  apex and  would require very large
+parameter values.
+
+
+EXAMPLE
+
+
+	# a cone a 45 degree at the origin on Z
+	cone c1 45 0
+
+	# a cone on axis Z with radius r1 at z1 and r2 at z2
+	cone c2 0 0 z1 180.*atan2(r2-r1,z2-z1)/pi r1
+
+
+WARNINGS
+
+The angle is in degree.
+
+
+SEE ALSO
+
+plane
+
+
+Node: sphere,  Prev: cone,  Next: torus,  Up: Creation of surfaces,
+
+
+SYNOPSIS
+
+
+	sphere name [x y z [dx dy dz [ux uy uz]]] radius
+
+
+PURPOSE
+
+
+Creates a  sphere  in a local coordinate  system  defined like for the
+lane command. The   sphere is centered at  the  origin with  the given
+radius. To  parametrise the sphere, U  is the angle from  X to Y, U is
+between o and  2*pi, V is  the angle in the  half-circle at angle U in
+the  plane  containing the Z axis,  V  is between -pi/2  and pi/2. The
+poles  are the points  Z = +/-  radius, their parameters are U,+/-pi/2
+for any U in 0,2*pi.
+
+
+EXAMPLE
+
+
+	# a sphere at the origin
+	sphere s1 10
+
+	# a sphere at 10 10 10, with poles on the axis 1,1,1
+	sphere s2 10 10 10 1 1 1 10
+
+
+SEE ALSO
+
+plane
+
+
+Node: torus,  Prev: sphere,  Next: beziersurf,  Up: Creation of surfaces,
+
+
+SYNOPSIS
+
+
+	torus name [x y z [dx dy dz [ux uy uz]]] major minor
+
+
+PURPOSE
+
+
+Creates a torus  in the local coordinate system  with the given  major
+and minor radius, Z is the axis for the major radius. The major radius
+can be lower than the minor one.
+
+To parametrize a torus, U is the angle from X to  Y, V is the angle in
+the plane at angle U from the XY plane to Z. U and V are in 0,2*pi.
+
+
+EXAMPLE
+
+
+	# a torus at the origin
+	torus t1 20 5
+
+	# a torus in another system
+	torus t2 10 5 -2  2 1 0 20 5
+
+
+SEE ALSO
+
+plane
+
+
+Node: beziersurf,  Prev: torus,  Next: bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf,  Up: Creation of surfaces,
+
+
+SYNOPSIS
+
+
+	beziersurf name nbupoles nbvolpes x y z [w] ....
+
+
+PURPOSE
+
+
+Use this command to create a bezier surface, rational or not. You must
+first give the numbers  of poles in  the  U and V  directions, degrees
+will be nbupoles-1  and  nbvpoles-1. Then give the   nbupoles*nbvpoles
+poles, starting with U.  i.e.  P(1,1) P(2,1) ,... P(nbupoles,1) P(1,2)
+,... P(nbupoles,nbvpoles).  You can omit weights, but  if you give one
+weight you must give them all.
+
+
+EXAMPLE
+
+
+	# a non-rational degree 2,3 surface
+	beziersurf s 3 4 \
+	0 0 0  10 0 5  20 0 0 \
+	0 10 2 10 10 3 20 10 2 \
+	0 20 10 10 20 20 20 20 10 \
+	0 30 0 10 30 0 20 30 0
+
+
+SEE ALSO
+
+beziercurve
+
+
+Node: bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf,  Prev: beziersurf,  Next: trim, trimu, trimv,  Up: Creation of surfaces,
+
+
+SYNOPSIS
+
+
+	bsplinesurf name udegree nbuknots uknot umult ... nbvknot  vknot vmult ...  x y z w ...
+
+	upbsplinesurf ...
+
+	vpbsplinesurf ...
+
+	uvpbsplinesurf ...
+		    
+
+PURPOSE
+
+
+Use  the bsplinesurf     command   to create    NURBS   surfaces,  the
+upbsplinesurf  command to  create  a  NURBS   surface  periodic in  U,
+vpbsplinesurf periodic in V, and uvpbsplinesurf periodic in UV.
+
+The description is similar to the bsplinecurve command, first you give
+the degree in U and the knots in U with their multiplicities, then the
+same in V. The poles follow, the number of poles is the product of the
+number in  U and  the  number in V,  see  bsplinecurve to compute  the
+number of poles,  the poles are first given  in U as in the beziersurf
+command.  Note that  you must give  the  weights, use  1 for  rational
+surface.
+
+
+EXAMPLE
+
+
+	# create a bspline surface of degree 1 2
+	# with two knots in U and three in V
+
+	bsplinesurf s \
+	1 2 0 2 1 2 \
+	2 3 0 3 1 1 2 3 \
+	0 0 0 1  10 0 5 1  \
+	0 10 2 1 10 10 3 1 \
+	0 20 10 1 10 20 20 1 \
+	0 30 0 1 10 30 0 1
+	
+
+
+WARNINGS
+
+The weights are mandatory.
+
+
+SEE ALSO
+
+bsplinecurve
+beziersurf
+convert
+
+
+Node: trim, trimu, trimv,  Prev: bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf,  Next: offset,  Up: Creation of surfaces,
+
+
+SYNOPSIS
+
+
+	trim newname name [u1 u2 [v1 v2]]
+
+	trimu newname name [u1 u2]
+
+	trimv newname name [v1 v2]
+
+
+PURPOSE
+
+
+The trim  commands  are used  to  create  trimmed  curves  or  trimmed
+surfaces.   Note that trimmed  curves and surfaces  are classes of the
+Geom packages. The  trim  command creates a  new trimmed  curve from a
+curve,  or a new trimmed  surface in u  and  v from  a surface.  trimu
+creates  a u  trimmed surface, and  trimv a  vtrimmed surface.  If  no
+parameters are given,   the  command recreates   the  basis curve  and
+surface if the argument is trimmed. The curves can  be either 2d or 3d
+curves.  If  the  trimming  parameters are   decreasing,  direction is
+reversed if the curve or surface is not periodic.
+
+Note that  a  trimmed curve or surface  contains  a copy  of the basis
+geometry, so  modifying it will  not modify the trimmed geometry. Note
+also that trimmig  a trimmed geometry  will not create multiple levels
+of trimming, the basic geometry will be used.
+
+
+EXAMPLE
+
+
+	# create a 3d circle
+	circle c 0 0 0 10
+
+	# trim it, use the same variable, the original is destroyed
+	trim c c 0 pi/2
+
+	# original can be recovered !
+	trim orc c
+
+	# trim again
+	trim c c pi/4 pi/2
+
+	# original is not the trimmed curve but the basis
+	trim orc c
+
+	# as the circle is periodic the two following commands are identical
+	trim cc c pi/2 0
+	trim cc c pi/2 2*pi
+
+	# trim an infinite cylinder
+	cylinder cy 10
+	trimv cy cy 0 50
+
+
+SEE ALSO
+
+reverse
+
+
+Node: offset,  Prev: trim, trimu, trimv,  Next: revsurf,  Up: Creation of surfaces,
+
+
+SYNOPSIS
+
+
+	offset newname name distance [dx dy dz]
+
+
+PURPOSE
+
+
+Use the offset command to create offset  curve or surface from a basis
+curve or surface at a  given distance, offset  curves and surfaces are
+classes from  the Geom package. The  curve can be  a 2d or a 3d curve,
+for a 3d curve  you must give also  a  vector dx,dy,dz to compute  the
+offsets, usually for a planar  curve this vector is  the normal to the
+plane containing the curve.
+
+The offset curve or  surface copies the   basis geometry which  can be
+modified later.
+
+
+EXAMPLE
+
+
+	# graphical demonstration that the outline of a torus
+	# is the offset of an ellipse
+	# Please do this in a top view
+
+	smallview +X+Y
+	dset angle pi/6
+	torus t 0 0 0 0 cos(angle) sin(angle) 50 20
+	fit
+	ellipse e 0 0 0 50 50*sin(angle)
+	# note that the distance can be negative
+	offset l1 e 20 0 0 1
+	offset l2 e -20 0 0 1
+	
+	# Admire...
+
+
+Node: revsurf,  Prev: offset,  Next: extsurf,  Up: Creation of surfaces,
+
+
+SYNOPSIS
+
+
+	revsurf newname curvename x y z dx dy dz
+
+
+PURPOSE
+
+
+This command creates a surface of revolution  from a 3d curve, this is
+the  class SurfaceOfRevolution from   Geom, x,y,z and dx,dy,dz defines
+the axis  of revolution. To parametrize a  surface of revolution U, is
+the angle around the axis, starting from the curve, V is the parameter
+of the curve.
+
+
+EXAMPLE
+
+
+	# another way to make a torus like surface
+	circle c 50 0 0 20
+	revsurf s c 0 0 0 0 1 0
+
+
+Node: extsurf,  Prev: revsurf,  Next: convert,  Up: Creation of surfaces,
+
+
+SYNOPSIS
+
+
+	extsurf newname curvename dx dy dz
+
+
+PURPOSE
+
+
+Use the extsurf command to create a surface of linear extrusion from a
+3d  curve. dx,dy,dz is the  direction of  extrusion.  To parametrize a
+surface of extrusion, U is the parameter on the curve, V is the length
+along the direction of extrusion.
+
+
+EXAMPLE
+
+
+	# an elliptic cylinder
+	ellipse e 0 0 0 10 5
+	extsurf s e 0 0 1
+	# to make it finite
+	trimv s s 0 10
+
+
+
+Node: convert,  Prev: extsurf,  Next: ,  Up: Creation of surfaces,
+
+
+SYNOPSIS
+
+
+	convert newname name
+
+
+PURPOSE
+
+
+The convert command creates a NURBS 2d curve, 3d curve or surface from
+any  2d curve, curve,   and  surface. essentially  conics  curves  and
+quadric surfaces are turned to NURBS, it does not process offsets.
+
+
+EXAMPLE
+
+
+	# turn a 2d arc of circle into a 2d nurbs
+	circle c 0 0 5
+	trim c c 0 pi/3
+	convert c c
+
+	# an easy way to make a planar bspline surface
+	plane p
+	trim p p -1 1 -1 1
+	convert p p
+
+
+WARNINGS
+
+
+Offset curves and surfaces are not processed.
+
+
+SEE ALSO
+
+bsplinecurve, bsplinesurf
+
+
+Node: Modifications of Curves and surfaces,  Prev: Creation of surfaces,  Next: Transformations,  Up: Geometry commands,
+
+
+Draw provides commands to modify curves and surfaces, some of them are
+general, others are restricted to bezier or bsplines.
+
+General modification are
+
+- Reversing the parametrisation : reverse, ureverse, vreverse.
+
+Modifications for bezier and bspline are 
+
+- Exchanging U and V on a surface : exchuv
+
+- segmentation, segment, segsur
+
+- Increasing the degree, incdeg, incudeg, incvdeg
+
+- moving poles, cmovep, movep, movecolp, moverowp
+
+- moving a point on a curve or a surface, cmovepoint, movepoint
+
+Modifications for bezier are 
+
+- adding and removing poles, insertpole, rempole, remcolpole, remrowpole
+
+Modifications for bspline are 
+
+-  inserting  and removing   knots, insertknot,  remknot, insertuknot,
+remuknot, insetvknot, remvknot
+
+- modifying periodic curves and surfaces, setperiodic, setnotperiodic,
+setorigin, setuperiodic,  setunotperiodic,   setuorigin, setvperiodic,
+setvnotperiodic, setvorigin
+
+
+
+
+* Menu:
+
+* reverse, ureverse, vreverse::
+* exchuv::
+* segment, segsur::
+* incdeg, incudeg, incvdeg::
+* cmovep, movep, movecolp, moverowp::
+* cmovepoint, movepoint::
+* insertpole, rempole, remcolpole, remrowpole::
+* insertknot, insertuknot, insertvknot::
+* remknot, remulnot, remvknot::
+* setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
+* setorigin, setuorigin, setvorigin::
+
+
+Node: reverse, ureverse, vreverse,  Prev: ,  Next: exchuv,  Up: Modifications of Curves and surfaces,
+
+
+SYNOPSIS
+
+
+	reverse curvename
+
+	ureverse surfacename
+
+	vreverse surfacename
+
+
+PURPOSE
+
+
+Use the reverse  command to reverse the  parametrisation of a 3d or 2d
+curve, use ureverse  or vreverse to reverse the  U or V parameter of a
+surface.  Note  that the    new  parameters of  the  curve  may change
+according to the type of curve. For example they will change sign on a
+line or stay 0,1 on a bezier.
+
+Reversing a parameter on an analytical surface  may create an indirect
+coordinate system,  i.e. for example Z  is not the  cross product of X
+and Y, because reversing a parameter will reverse only one axis.
+
+
+EXAMPLE
+
+
+	# reverse a trimmed 2d circle
+	circle c 0 0 5
+	trim c c pi/4 pi/2
+	reverse c
+
+	# dumping c will show that it is now trimmed between
+	# 3*pi/2 and 7*pi/4 i.e. 2*pi-pi/2 and 2*pi-pi/4
+
+
+WARNINGS
+
+
+The geometry has been  modified, if you want  to keep the curve or the
+surface you must copy it before.
+
+
+Node: exchuv,  Prev: reverse, ureverse, vreverse,  Next: segment, segsur,  Up: Modifications of Curves and surfaces,
+
+
+SYNOPSIS
+
+
+	exchuv surfacename
+
+
+PURPOSE
+
+
+For a bezier or bspline surface this command exchange the U and V parameters.
+
+
+EXAMPLE
+
+
+	# exchanging u and v on a spline (made from a cylinder)
+	# this is impossible on the cylinder
+	cylinder c 5
+	trimv c c 0 10
+	convert c c
+	exchuv c
+
+
+Node: segment, segsur,  Prev: exchuv,  Next: incdeg, incudeg, incvdeg,  Up: Modifications of Curves and surfaces,
+
+
+SYNOPSIS
+
+
+	segment curve ufirst ulast
+
+	segsur surface ufirst ulast vfirst vlast
+
+
+PURPOSE
+
+
+Use the segment and segsur  commands to segment respectively a  bezier
+or   bspline curve and  surface.  This  command  modifies the curve to
+restrict it  between  the new parameters.   This command  must  not be
+confused with the trim command which creates a new geometry.
+
+
+EXAMPLE
+
+
+	# segment a bezier curve in half
+	beziercurve c 3 0 0 0 10 0 0 10 10 0
+	segment c 0.5 1
+
+
+Node: incdeg, incudeg, incvdeg,  Prev: segment, segsur,  Next: cmovep, movep, movecolp, moverowp,  Up: Modifications of Curves and surfaces,
+
+
+SYNOPSIS
+
+
+	incdeg curvename newdegree
+
+	incudeg surfacename newdegree
+
+	incvdeg surfacename newdegree
+
+
+PURPOSE
+
+
+Use the incdeg command to increase the degree of a 2d or 3d bezier or
+bspline curve to a new value higher than the current one. Use incudeg
+and incvdeg to increase the degree in U or V of a surface.
+
+
+EXAMPLE
+
+
+	# make a planar bspline and increase the degree to 2 3
+	plane p 
+	trim p p -1 1 -1 1
+	convert p p
+	incudeg p 2
+	incvdeg p 3
+
+
+WARNINGS
+
+
+The geometry is modified.
+
+
+Node: cmovep, movep, movecolp, moverowp,  Prev: incdeg, incudeg, incvdeg,  Next: cmovepoint, movepoint,  Up: Modifications of Curves and surfaces,
+
+
+SYNOPSIS
+
+
+	cmovep curve index dx dy [dz]
+
+	movep surface uindex vindex dx dy dz
+
+	movecolp uindex dx dy dz
+
+	moverowp vindex dx dy dz
+
+
+PURPOSE
+
+
+Use the move methods to translate poles of a bezier or a bspline curve
+or surface. cmovep and movep translate the pole with the given index.
+
+movecolp and moverowp translate a whole column or row of poles.
+
+
+EXAMPLE
+
+
+	# start with a plane
+	# turn to bspline, raise degree and raise poles
+	plane p
+	trim p p -10 10 -10 10
+	convert p p
+	incud p 2
+	incvd p 2
+	movecolp p 2 0 0 5
+	moverowp p 2 0 0 5
+	movep p 2 2 0 0 5
+
+
+Node: cmovepoint, movepoint,  Prev: cmovep, movep, movecolp, moverowp,  Next: insertpole, rempole, remcolpole, remrowpole,  Up: Modifications of Curves and surfaces,
+
+
+SYNOPSIS
+
+
+	cmovepoint curve u dx dy [dz]
+
+	movepoint surface u v dx dy dz
+
+
+PURPOSE
+
+
+Use the cmovepoint command to modify a curve so the point of parameter
+u have a new position translated by dx,dy,dz (no dz in 2d).
+
+Use   the  movepoint command  to modify   a  surface so   the point of
+parameters u,v have a new position translated by dx,dy,dz.
+
+
+EXAMPLE
+
+
+	# Create a spline curve and move 100 times a point
+
+	bsplinecurve bscurv  \
+	3 2  -1.0 4   1.0 4  0 0 0 1   1 0 0 1   2 0 0 1   3 0 0 1
+
+	incdeg bscurv 10
+	translate bscurv 0 -4 0
+
+	set i 1
+	repeat 100 {cmovepoint bscurv 0.3 0. 0.05 0.0e0 ; incr i 1; repaint}
+	dump bscurv
+
+	set i 1
+	repeat 100 {cmovepoint bscurv 0.3 0. -0.05 0.0e0 ; incr i 1;repaint}
+
+
+
+WARNINGS
+
+
+The geometry is modfied. Do not confuse with cmovep and movep which
+modifies a pole and not a point.
+
+
+SEE ALSO
+
+
+cmovep, movep
+
+
+Node: insertpole, rempole, remcolpole, remrowpole,  Prev: cmovepoint, movepoint,  Next: insertknot, insertuknot, insertvknot,  Up: Modifications of Curves and surfaces,
+
+
+SYNOPSIS
+
+
+	insertpole curvename index x y [z] [w]
+
+	rempole curvename index
+
+	remcolpole surfacename index
+
+	remrowpole surfacename index
+
+
+PURPOSE
+
+
+Use the insertpole command  to insert a new pole  on a 2d or 3d bezier
+curve, you can  add a weight for the  pole, the default value  for the
+weight is 1. The pole is added at the position after the index, use an
+index 0 to insert before the first pole.
+
+Use the rempole command to remove a pole from a 2d or 3d bezier curve,
+you must leave at least two poles in the curves.
+
+Use the remcolpole and remrowpole commands to remove a column or a row
+of poles from a bezier surface.  A column is in the  V direction and a
+row in the U direction, the resulting  degree must be  at least 1, i.e
+there are two rows and two columns.
+
+
+EXAMPLE
+
+
+	# start with a segment, insert a pole at end
+	# then remove the central pole
+
+	beziercurve c 2 0 0 0 10 0 0
+	insertpole c 2 10 10 0
+	rempole c 2
+
+
+
+Node: insertknot, insertuknot, insertvknot,  Prev: insertpole, rempole, remcolpole, remrowpole,  Next: remknot, remulnot, remvknot,  Up: Modifications of Curves and surfaces,
+
+
+SYNOPSIS
+
+
+	insertknot curvename knot [mult]
+	
+	insertuknot surfacename knot [mult]
+
+	insertvknot surfacename knot [mult]
+
+
+
+PURPOSE
+
+
+Insert knots in the  knot sequence of  a bspline curve or surface, use
+insertknot for   a curve, you  must  give a  knot   value and a target
+multiplicity, the default multiplicity is  1.  If  there is already  a
+knot with  the given value  its multiplicity will be  raised if  it is
+lower than the target multiplicity. Use insertuknot and insertvknot to
+insert knots in a surface.
+
+
+EXAMPLE
+
+
+	# create a cylindrical surface and insert a knot
+	cylinder c 10
+	trim c c 0 pi/2 0 10
+	convert c c
+	insertuknot c pi/4 1
+
+
+Node: remknot, remulnot, remvknot,  Prev: insertknot, insertuknot, insertvknot,  Next: setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic,  Up: Modifications of Curves and surfaces,
+
+
+SYNOPSIS
+
+
+	remknot index [mult] [tol]
+
+	remuknot index [mult] [tol]
+
+	remvknot index [mult] [tol]
+
+
+PURPOSE
+
+
+To  remove a knot from the  knot sequence of  a curve or a surface use
+the remknot   commands, give the  index  of the  knot  and  the target
+multiplicity, default is    0 to  remove   the knot,   if the   target
+multiplicity is   not  0,  the  multiplicity  of   the  knot will   be
+lowered. You can give a tolerance value to  control the process as the
+curve  may be modified, if the  tolerance is  low  the removal will be
+done only   if the curve is not   modified. By default  the removal is
+always done.
+
+
+EXAMPLE
+
+
+	# bspline circle, remove a knot
+	circle c 0 0 5
+	convert c c
+	incd c 5
+	remknot c 2
+
+
+WARNINGS
+
+
+The curve or the surface may be modified.
+
+
+Node: setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic,  Prev: remknot, remulnot, remvknot,  Next: setorigin, setuorigin, setvorigin,  Up: Modifications of Curves and surfaces,
+
+
+SYNOPSIS
+
+
+	setperiodic curve
+
+	setnotperiodic curve
+
+	setuperiodic surface
+
+	setunotperiodic surface
+
+	setvperiodic surface
+
+	setvnotperiodic surface
+
+
+PURPOSE
+
+
+setperiodic turns a  bspline curve in   a periodic bspline  curve, the
+knot vector is the same and excess poles are  truncated, the curve may
+be  modified   if it   was  not  closed.    setnotperiodic removes the
+periodicity of a periodic curve, poles are duplicated. Note that knots
+are added at  the begining  and  the end  of the  knot vector  and the
+multiplicity are knot set to degree+1 at the start and the end.
+
+
+EXAMPLE
+
+
+	# a circle deperiodicised
+	circle c 0 0 5
+	convert c c
+	setnotperiodic c
+
+
+Node: setorigin, setuorigin, setvorigin,  Prev: setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic,  Next: ,  Up: Modifications of Curves and surfaces,
+
+
+SYNOPSIS
+
+
+	setorigin curvename index
+
+	setuorigin surfacename index
+
+	setuorigin surfacename index
+
+
+PURPOSE
+
+
+Use these commands to change the origin  of the parameters on periodic
+curves or surfaces, the new origin must be an existing knot. To set an
+origin outside a knot you must first insert a knot with the insertknot
+command.
+
+
+EXAMPLE
+
+
+	# a torus with new U and V origins
+	torus t 20 5
+	convert t t
+	setuorigin t 2
+	setvorigin t 2
+
+
+
+SEE ALSO
+
+
+insertknot
+
+
+Node: Transformations,  Prev: Modifications of Curves and surfaces,  Next: Analysis of curves and surfaces ,  Up: Geometry commands,
+
+
+Draw provides commands to apply linear transformations to geometric
+objects, they include translation, rotation, mirror and scale.
+
+
+
+
+* Menu:
+
+* translate, 2dtranslate::
+* rotate, 2drotate::
+* pmirror, lmirror, smirror, 2dpmirror, 2dlmirror::
+* pscale, 2dpscale::
+
+
+Node: translate, 2dtranslate,  Prev: ,  Next: rotate, 2drotate,  Up: Transformations,
+
+
+SYNOPSIS
+
+
+	translate name [name ...] dx dy dz
+
+	2dtranslate name [name ...] dx dy
+
+
+PURPOSE
+
+
+To translate  3d  points,   curves  and  surfaces use   the  translate
+commands, giving a vector dx,dy,dz.  You  can translate more than  one
+object with the same command.
+
+For 2d points or curves use the 2dtranslate command.
+
+
+EXAMPLE
+
+
+	# 3d translation
+	point p 10 20 30
+	circle c 10 20 30 5
+	torus t 10 20 30 5 2
+	translate p c t 0 0 15
+
+
+WARNINGS
+
+
+Objects are modified.
+
+
+Node: rotate, 2drotate,  Prev: translate, 2dtranslate,  Next: pmirror, lmirror, smirror, 2dpmirror, 2dlmirror,  Up: Transformations,
+
+
+SYNOPSIS
+
+	
+	rotate name [name ...] x y z dx dy dz angle
+
+	2drotate name [name ...] x y angle
+
+
+PURPOSE
+
+
+To rotate a 3d point,  curve or surface use   the rotate command.  You
+must give an  axis of rotation with  a point x,y,z, a  vector dx,dy,dz
+and an angle in degree.
+
+For a 2d rotation you must only give the center and the angle. In 3d
+or 2d the angle can be negative.
+
+
+EXAMPLE
+
+
+	# make an helix of circles
+	circle c0 10 0 0 3
+	for {set i 1} {$i <= 10} {incr i} {
+		copy c[expr $i-1] c$i
+		translate c$i 0 0 3
+		rotate c$i 0 0 0 0 0 1 36
+	}
+
+
+Node: pmirror, lmirror, smirror, 2dpmirror, 2dlmirror,  Prev: rotate, 2drotate,  Next: pscale, 2dpscale,  Up: Transformations,
+
+
+SYNOPSIS
+
+
+	pmirror name [name ...] x y z
+
+	lmirror name [name ...] x y z dx dy dz
+
+	smirror name [name ...] x y z dx dy dz
+
+	2dpmirror name [name ...] x y
+
+	2dlmirror name [name ...] x y dx dy
+
+
+PURPOSE
+
+
+The  mirrors  command make  a  mirror transformation   of  a 3d or  2d
+geometry. pmirror is the point  mirror, or central symetry, lmirror is
+the  line mirror  or axial symetry,  smirror is  the surface mirror or
+planar symetry, the plane of symetry is perpendicular to dx,dy,dz.
+
+In  2d we  have only 2dpmirror,  the  point symetry, and 2dlmirror the
+axis symetry.
+
+
+EXAMPLE
+
+
+	# build 3 images of a torus
+
+	torus t 10 10 10 1 2 3 5 1
+	copy t t1
+	pmirror t1 0 0 0
+	copy t t2
+	lmirror t2 0 0 0 1 0 0
+	copy t t3 
+	smirror t3 0 0 0 1 0 0
+
+
+Node: pscale, 2dpscale,  Prev: pmirror, lmirror, smirror, 2dpmirror, 2dlmirror,  Next: ,  Up: Transformations,
+
+
+SYNOPSIS
+
+
+	pscale name [name ...] x y z s
+
+	2dpscale name [name ...] x y s
+
+
+PURPOSE
+
+
+Use  the pscale and  2dpscale commands to  transform  an object with a
+point scaling  (central homotetic).  You must give  the center and the
+scaling factor.  Using a scaling factor of -1 is similar to pmirror.
+
+
+EXAMPLE
+
+
+	# double the size of a sphere
+	sphere s 0 0 0 10
+	pscale s 0 0 0 2
+
+
+Node: Analysis of curves and surfaces ,  Prev: Transformations,  Next: Intersections,  Up: Geometry commands,
+
+
+Draw   provides methods to     compute  information about curves   and
+surfaces.
+
+- Use coord to find the coordinates of a point.
+
+- Use cvalue and    2dcvalue to compute  points and    derivatives on
+curves.
+
+- Use svalue to compute points and derivatives on a surface.
+
+- Use localprop   and minmaxcurandif to   compute the curvature  on  a
+curve.
+
+- Use parameters to compute U,V values for a point on a surface.
+
+- Use proj and 2dproj to project a point on a curve or a surface.
+
+- Use surface_radius to compute the curvalture on a surface.
+
+
+
+
+* Menu:
+
+* coord::
+* cvalue, 2dcvalue::
+* svalue::
+* localprop, minmaxcurandif::
+* parameters::
+* proj, 2dproj::
+* surface_radius::
+
+
+Node: coord,  Prev: ,  Next: cvalue, 2dcvalue,  Up: Analysis of curves and surfaces ,
+
+
+SYNOPSIS
+
+
+	coord point x y [z]
+
+
+PURPOSE
+
+
+The  coord command will   store in  the   variable x,   y  and  z  the
+coordinates of the point.
+
+
+EXAMPLE
+
+
+	# translate a point
+	point p 10 5 5
+	translate p 5 0 0
+	coord p x y z
+	# x value is 15
+
+
+SEE ALSO
+
+point
+
+
+Node: cvalue, 2dcvalue,  Prev: coord,  Next: svalue,  Up: Analysis of curves and surfaces ,
+
+
+SYNOPSIS
+
+
+	cvalue curve u [x y z [d1x d1y d1z [d2x d2y d2z]]] [P]
+
+	2dcvalue curve u [x y [d1x d1y [d2x d2y]]] [P]
+
+
+PURPOSE
+
+
+Depending on the number of arguments this command  computes on a curve
+at a given parameter : the  coordinates in x,y,z, the first derivative
+in d1x,d1y,d1z, the second derivative in d2x,d2y,d2z  and set in P the
+point of coordinates x,y,z.
+
+
+EXAMPLE
+
+
+	# on a bezier curve at parameter 0
+	# the point is the first pole
+	# the derivative is the vector first to second pole 
+	# multiplied by the degree
+	# the second derivative is the difference
+	#  first to second pole, second to third pole
+	# multiplied by degree * degree-1
+	2dbeziercurve c 4 0 0 1 1 2 1 3 0
+	2dcvalue c 0 x y d1x d1y d2x d2y P
+
+	# values of x y d1x d1y d2x d2y
+	# are 0 0 3 3 0 -6
+	# and displays the point P(0,0,3)
+
+
+Node: svalue,  Prev: cvalue, 2dcvalue,  Next: localprop, minmaxcurandif,  Up: Analysis of curves and surfaces ,
+
+
+SYNOPSIS
+
+
+	svalue surface u v [x y z [dux duy duz dvx dvy dvz [d2ux d2uy
+d2uz d2vx d2vy d2vz d2uvx d2uvy d2uvz]]] [P]
+
+
+PURPOSE
+
+
+Use  the svalue command to compute  point and derivatives on a surface
+at a  pair of parameter  values, the  result depends on  the number of
+arguments. You can compute up  to order two  of derivation and display
+the resulting point.
+
+
+EXAMPLE
+
+
+	# display points on a sphere
+	sphere s 10
+	for {dset t 0} {[dval t] <= 1} {dset t t+0.01} {
+	   svalue s t*2*pi t*pi-pi/2 x y z
+	   point . x y z
+	}
+
+	# can also be written
+	sphere s 10
+	for {dset t 0} {[dval t] <= 1} {dset t t+0.01} {
+	   svalue s t*2*pi t*pi-pi/2 .
+	}
+
+
+Node: localprop, minmaxcurandif,  Prev: svalue,  Next: parameters,  Up: Analysis of curves and surfaces ,
+
+
+SYNOPSIS
+
+
+	localprop curve u
+	
+	minmaxcurandif curve
+
+
+PURPOSE
+
+
+The localprop  command computes on a  curve the  curvature and display
+the osculationg circle. The  minmaxcurandif command computes and print
+the parameters where the curvature is minimum or maximum on a curve.
+
+
+EXAMPLE
+
+
+	# show curvature at the center of a bezier curve
+	beziercurve c 3 0 0 0 10 2 0 20 0 0
+	localprop c 0.5
+
+
+SEE ALSO
+
+surface_radius
+
+
+Node: parameters,  Prev: localprop, minmaxcurandif,  Next: proj, 2dproj,  Up: Analysis of curves and surfaces ,
+
+
+SYNOPSIS
+
+
+	parameters surface x y z u v
+
+
+PURPOSE
+
+
+The parameters command returns in variables u and  v the parameters on
+the surface of  the 3d point x,y,z. This  command can be used  only on
+analytical surfaces, plane, cylinder, cone, sphere, torus.
+
+
+EXAMPLE
+
+
+	# Compute parameters on a plane
+	plane p 0 0 10 1 1 0
+	parameters p 5 5 5 u v
+	# the values of u and v are 0 5
+
+
+Node: proj, 2dproj,  Prev: parameters,  Next: surface_radius,  Up: Analysis of curves and surfaces ,
+
+
+SYNOPSIS
+
+
+	proj name x y z
+
+	2dproj name xy
+
+
+PURPOSE
+
+
+Use proj to project a point on a  curve or a  surface and 2dproj for a
+2d  curve, the  command  will  compute  and display  all points  at an
+extreme distance. The  lines joining the point  to the projections are
+created with names such as ext_1, ext_2, ...
+
+
+EXAMPLE
+
+
+	# project point on a torus
+	torus t 20 5
+	proj t 30 10 7
+
+
+Node: surface_radius,  Prev: proj, 2dproj,  Next: ,  Up: Analysis of curves and surfaces ,
+
+
+SYNOPSIS
+
+
+	surface_radius surface u v [c1 c2]
+
+
+PURPOSE
+
+
+Use the  surface radius command  to compute  the  main curvatures of a
+surface at parameters u,v. If there are extra arguments the curvatures
+are stored in variables c1 and c2.
+
+
+EXAMPLE
+
+
+	# computes curvatures of a cylinder
+	cylinder c 5
+	surface_radius c pi 3 c1 c2
+
+
+WARNINGS
+
+
+The radii are displayed and the curvatures are returned, the radius is
+the inverse of the curvature.
+
+
+Node: Intersections,  Prev: Analysis of curves and surfaces ,  Next: Approximations,  Up: Geometry commands,
+
+
+To  compute intersections of surfaces,   use the intersect command; to
+compute intersections of 2d curves, use the 2dintersect command.
+
+
+
+
+* Menu:
+
+* intersect::
+* 2dintersect::
+
+
+Node: intersect,  Prev: ,  Next: 2dintersect,  Up: Intersections,
+
+
+SYNOPSIS
+
+
+	intersect name surface1 surface2 [tolerance]
+
+
+PURPOSE
+
+
+Use the intersect  command to intersect  two surfaces, if there is one
+intersection curve it will be named "name", if there are more than one
+they will be named "name_1", "name_2", ... The precision of the result
+is the given tolerance,  this is important  when a spline is fitted to
+the result curve. The default tolerance is 1e-7.
+
+
+EXAMPLE
+
+
+	# create an ellipse
+	cone c 45 0
+	plane p 0 0 40 0 1 5
+	intersect e c p
+
+
+Node: 2dintersect,  Prev: intersect,  Next: ,  Up: Intersections,
+
+
+SYNOPSIS
+
+
+	2dintersect curve1 curve2
+
+
+PURPOSE
+
+
+Display the intersection points between two 2d curves.
+
+
+EXAMPLE
+
+
+	# intersect two 2d ellipses
+	ellipse e1 0 0 5 2
+	ellipse e2 0 0 0 1 5 2
+	2dintersect e1 e2
+
+
+Node: Approximations,  Prev: Intersections,  Next: Constraints,  Up: Geometry commands,
+
+
+Draw   provides   commandd   to  create   curves    and  surfaces   by
+approximations.  2dapprox to fit  a curve through  2d points. appro to
+fit  a curve through  3d points. surfapp and  grilapp to fit a surface
+through 3d points. 2dinterpolate can be used to interpolate a curve.
+
+
+
+
+* Menu:
+
+* appro, 2dapprox, 2dinterpolate::
+* surfapp, grilapp::
+
+
+Node: appro, 2dapprox, 2dinterpolate,  Prev: ,  Next: surfapp, grilapp,  Up: Approximations,
+
+
+SYNOPSIS
+
+
+	appro name nbpoints [curve]
+
+	2dapprox name name nbpoints [curve / x1 y1 x2 y2 ...] 
+
+	2dinterpolate name name nbpoints [curve / x1 y1 x2 y2 ...] 
+
+
+PURPOSE
+
+
+Fit a curve through a set of points, first  give the number of points,
+then there   are three ways   to  give the points.  Without  arguments
+interactivly click  the points,  with a  curve  argument  computes the
+points on the curve, else give a list of points.
+
+
+EXAMPLE
+
+
+	# pick ten points and they will be fit
+	2dapprox c 10
+
+
+Node: surfapp, grilapp,  Prev: appro, 2dapprox, 2dinterpolate,  Next: ,  Up: Approximations,
+
+
+SYNOPSIS
+
+
+	surfapp name nbupoints nbvpoints x y z ....
+
+	grilapp name nbupoints nbvpoints xo dx yo dy z11 z12 ...
+
+
+PURPOSE
+
+
+Use   surfapp   to   fit a    surface  through an    array   of points
+nbupoints*nbvpoints. grilapp do  the same but  the  x,y coordinates of
+the points are on a grid starting at x0,y0 with steps dx,dy.
+
+
+Node: Constraints,  Prev: Approximations,  Next: Display,  Up: Geometry commands,
+
+
+The command cirtang is used to construct 2d  circles tangent to curves
+and lintan to construct 2d lines tangent to curves.
+
+
+
+
+* Menu:
+
+* cirtang::
+* lintan::
+
+
+Node: cirtang,  Prev: ,  Next: lintan,  Up: Constraints,
+
+
+SYNOPSIS
+
+
+	cirtang name  c1 c2 c3
+
+
+PURPOSE
+
+
+The  cirtang  command will build   all  circles satsifying  the  three
+constraints  c1,c2,c3.  The constraints are   either, a curve then the
+circle must be  tangent to that curve,   a point then the  circle must
+pass through that point, a radius for the circle.  Only one constraint
+can  be a radius.  The  solutions will be  stored  in variables called
+name_1, name_2, ...
+
+
+EXAMPLE
+
+
+	# a point, a line and a radius. 2 solutions
+	point p 0 0
+	line l 10 0 -1 1
+	cirtan c p l 4
+
+
+Node: lintan,  Prev: cirtang,  Next: ,  Up: Constraints,
+
+
+SYNOPSIS
+
+
+	lintan name curve curve [angle]
+
+
+PURPOSE
+
+
+
+The lintan command will build all 2d lines tangent to two curves. If a
+third angle  argument  is given the second   curve must be a line  and
+lintan  will build  all lines tangent  to the  first curve  making the
+given angle  with the  line.   The angle  is defined  in  degree.  The
+solutions are named name_1, name_2, ...
+
+
+EXAMPLE
+
+
+	# lines tangent to 2 circles, 4 solutions
+	circle c1 -10 0 10
+	circle c2 10 0 5
+	lintan l c1 c2
+
+
+Node: Display,  Prev: Constraints,  Next: ,  Up: Geometry commands,
+
+
+Draw     provides  commands to   control    the  display of  geometric
+objects. Some  display parameters are used  for all  objects, some are
+valid only for  surfaces, some are  valid only for bezier and bspline,
+and some only for bspline.
+
+On curve and surfaces you can control the display mode (how points are
+computed)  with the dmode  command.  And the   parameters for the mode
+with the defle command and the discr command to control the deflection
+and the discretisation.
+
+On  surfaces you    can control the   number   of isoparametric curves
+displayed on the surface with the nbiso command.
+
+On bezier and bspline curve and surface you can toggle the display of
+the control points with the clpoles and shpoles commands.
+
+On bspline curves and surfaces you can toggle the display of the knots
+with the shknots clknots commands.
+
+
+
+* Menu:
+
+* dmod, discr, defle::
+* nbiso::
+* clpoles, shpoles::
+* clknots, shknots::
+
+
+Node: dmod, discr, defle,  Prev: ,  Next: nbiso,  Up: Display,
+
+
+SYNOPSIS
+
+
+	dmode name [name ...] u/d
+
+	discr name [name ...] nbintervals
+
+	defle name [name ...] deflection
+
+
+PURPOSE
+
+
+You can choose   the display mode for a   curve or a  surface with the
+dmode command. The display mode defines how the points are computed to
+create the polygon  to display the  curve or the  surface.
+
+In "u"  mode, known as uniform  deflection, the points are computed to
+keep the  polygon  at a distance  lower  than the deflection  from the
+geometry. The  deflection is set with the  defle command. This mode is
+more computer intensive.
+
+In "d"  mode,  known as  discretisation, a fixed  number of  points is
+computed, this  number  is set  with the discr  command.   This is the
+default mode. On a bspline the fixed  number of points is computed for
+each span of the curve. (A span is the interval between two knots).
+
+If  the   curves  are    not smooth  you  can    either  increase  the
+discretisation  or lower the  deflection,  depending  on the mode   in
+use. This will increase the number of points.
+
+
+EXAMPLE
+
+
+	# increment the number of points on a big circle
+	circle c 0 0 50 50
+	discr 100
+
+	# change the mode
+	dmode c u
+
+
+Node: nbiso,  Prev: dmod, discr, defle,  Next: clpoles, shpoles,  Up: Display,
+
+
+SYNOPSIS
+
+
+	nbiso surface [surface  ...] nbuiso nbviso
+
+
+PURPOSE
+
+	
+Use the nbiso  command to change  the  number of  isoparametric curves
+displayed  on a surface  in  the U and V   directions. Note that on  a
+bspline surface  by  default  isoparametrics  are displayed  at  knots
+values, using nbiso will remove this feature.
+
+
+EXAMPLE
+
+
+	# display 35 meridians and 15 parallels on a sphere
+	sphere s 20
+	nbiso s 35 15
+
+
+Node: clpoles, shpoles,  Prev: nbiso,  Next: clknots, shknots,  Up: Display,
+
+
+SYNOPSIS
+
+
+	clpoles name
+
+	shpoles name
+
+
+PURPOSE
+
+
+On bezier and  bspline  curves and   surfaces the control  polygon  is
+displayed by default, you can suppress it with the clpoles command and
+restore it with the shpoles command.
+
+
+EXAMPLE
+
+
+	# create a bezier curve and erase the poles
+	beziercurve c 3 0 0 0 10 0 0 10 10 0
+	clpoles c
+
+
+Node: clknots, shknots,  Prev: clpoles, shpoles,  Next: ,  Up: Display,
+
+
+SYNOPSIS
+
+
+	clknots name
+
+	shknots name
+
+
+PURPOSE
+
+
+By default on a  bspline curve and  surface knots are displayed with a
+marker at the points  with a parametric value equal  to the knots. You
+can remove  them with the clknots  commands and restore them  with the
+shknots command.
+
+
+EXAMPLE
+
+
+	# hide the knots on a circle converted to spline
+	circle c 0 0 5
+	convert c c
+	clknots c
+
+
+Node: Topology commands,  Prev: Geometry commands,  Next: Index,  Up: Top,
+
+
+Draw  provides a set of commands  to test topology libraries. Topology
+libraries are provided with the  TOPOLOGY UL. Those commnads are found
+in the  TTOPOLOGY  executable   or in any   executable   including the
+BRepTest commands.
+
+The topology adds a new type of  variable in Draw, the shape variable,
+shape is a topological object, it can be a Vertex,  an Edge, a Wire, a
+Face, a Shell, a Solid, a CompSolid or a Compound,  you are invited to
+refer to the topology documentation for more information.
+
+Shapes are usually shared,  i.e. the Draw  copy command will create  a
+new shape sharing its representation with the original, but two shapes
+sharing  their  topology can  be moved independently  (see the section
+about transformations for more details).
+
+The following sections cover the topics
+
+- Basic shape commands, to handle the structure of shapes and control
+the display.
+
+-  Curves  and   surfaces  topology,  methods  to   make topology from
+geometry, or vice versa.
+
+- The profile method to make planar profiles.
+
+- Primitive construction commands. Box, cylinder, ...
+
+- Sweeping of shapes.
+
+- Transformations of shapes. Translation, copy, ....
+
+- Topological operations, also known as booleans.
+
+- Local operations. Features, holes.
+
+- Drafting and blending.
+
+- Analysis of shapes. Length, area, volume....
+
+
+
+* Menu:
+
+* Basic topology::
+* Curve and surfaces topology::
+* Making profiles::
+* Primitives::
+* Sweeping::
+* Topology transformation::
+* Topological operations::
+* Local operations::
+* Drafting and blending::
+* Topology analysis::
+
+
+Node: Basic topology,  Prev: ,  Next: Curve and surfaces topology,  Up: Topology commands,
+
+
+The basic  set of  commands  allows simple  operations  on shapes,  or
+stepwise constructions of objects which  may be far from simple.  They
+are useful for analysis of shapes structure.
+
+- Shapes are displayed with isoparametric curves on the faces, this is
+controlled with the isos command. The number of points used to display
+the shapes curves can be modified with the discretisation command.
+
+- To  modify  topological   attributes such  as  the  orientation  use
+orientation, complement and invert.
+
+-  To analyse   the structure  of  a  shape, use  explode,  exwire and
+nbshapes.
+
+- To create   shapes by  stepwise  construction,  use emptycopy,  add,
+compound.
+
+
+
+
+* Menu:
+
+* isos, discretisation::
+* orientation, complement, invert::
+* explode, exwire, nbshapes::
+* emptycopy, add, compound::
+
+
+Node: isos, discretisation,  Prev: ,  Next: orientation, complement, invert,  Up: Basic topology,
+
+
+SYNOPSIS
+
+
+	isos [name ...] nbisos
+
+	discretisation nbpoints
+
+
+PURPOSE
+
+
+Shapes are displayed  by a set of curves,  the edges and isoparametric
+curves on the faces.  There is color coding for  the edges, a red edge
+is  an isolated edge (belongs to   no faces), a  green edge  is a free
+boundary edge (belongs  to one face), a  yellow edge is  a shared edge
+(at least two faces).
+
+You can change the number of  isoparametric curves on shapes using the
+isos commands. Nnote that the  same number  is  used for  the U and  V
+directions, if you give no shape arguments the value  you give will be
+the new default value (originally 2), if  you give no arguments at all
+the command prints the current default value.
+
+You can change the default number of points used to display the curves
+with the discretisation command. The original value is 30.
+
+
+EXAMPLE
+
+
+	# Display only the edges (the wireframe)
+	isos 0
+
+
+WARNINGS
+
+
+Do not get confused with the geometric commands nbisos and discr which
+control the display of geometry.
+
+
+Node: orientation, complement, invert,  Prev: isos, discretisation,  Next: explode, exwire, nbshapes,  Up: Basic topology,
+
+
+SYNOPSIS
+
+
+	orientation name [name ...] F/R/E/I
+	
+	complement name [name ...]
+
+	invert name
+
+
+PURPOSE
+
+
+These commands are used to change the orientation of shapes.
+
+The orientation command sets one of the four values, FORWARD, REVERSED,
+INTERNAL, EXTERNAL
+
+The   complement command changes    the   current orientation to   its
+complement, FORWARD <-> REVERSED, INTERNAL <-> EXTERNAL.
+
+The invert command creates a new shape which is a copy of the original
+with all subshapes orientation  reversed. It is  useful for example to
+reverse the normals of a solid.
+
+
+EXAMPLE
+
+
+	# invert normals of a box
+	box b 10 20 30
+	normals b 5
+	invert b
+	normals b 5
+
+
+Node: explode, exwire, nbshapes,  Prev: orientation, complement, invert,  Next: emptycopy, add, compound,  Up: Basic topology,
+
+
+SYNOPSIS
+
+
+	explode name [C/So/Sh/F/W/E/V]
+
+	exwire name
+
+	nbshapes name
+
+
+PURPOSE
+
+
+The explode command is very useful to extract  subshapes from a shape,
+the subshapes will be named name_1, name_2, ... Note that they are not
+copied but shared with the original.  Without other arguments than the
+shape explode will extract the first sublevel of shapes, the shells of
+a solid, the  edges of a wire for  example.  With  an argument explode
+will extract all subshapes of the given type,  C for compounds, So for
+solids, Sh for shells, F  for faces, W for  wires, E for edges, V  for
+vertices.
+
+The  exwire command  is a  special case  of   explode for  wires which
+extract the edges in an  ordered way  if  possible. i/e/ each edge  is
+connected to the following one by a vertex.
+
+The  nbshapes command counts the  number of shapes  of  each type in a
+shape.
+
+
+EXAMPLE
+
+
+	# on a box
+	box b 10 20 30
+
+	# whatis returns the type and various information
+	whatis b
+	=> b is a shape SOLID FORWARD Free Modified	
+
+	# make one shell
+	explode b
+	whatis b_1
+	=> b_1 is a shape SHELL REVERSED Modified Orientable Closed
+
+	# extract the edges b_1, ... , b_12
+	explode b e
+	==> b_12
+
+	# count subshapes
+	nbshapes b
+	==>
+	Number of shapes in b
+	 VERTEX    : 8
+	 EDGE      : 12
+	 WIRE      : 6
+	 FACE      : 6
+	 SHELL     : 1
+	 SOLID     : 1
+	 COMPSOLID : 0
+	 COMPOUND  : 0
+	 SHAPE     : 34
+	
+
+
+Node: emptycopy, add, compound,  Prev: explode, exwire, nbshapes,  Next: ,  Up: Basic topology,
+
+
+SYNOPSIS
+
+
+	emptycopy [newname] name
+
+	add name toname
+
+	compound [name ...] compoundname
+
+
+PURPOSE
+
+
+The emptycopy command creates a new shape from an existing one without
+subshapes, only the geometry, if there is one,  is used. The new shape
+is  stored with  the   same  name  if   the newname  argument  is  not
+given. This command is useful to modify a frozen shape, a frozen shape
+is a shape used by an other shape, it cannot be modifed, so it must be
+emptycopied and its subshape may be reinserted with the add command.
+
+The  add command insert a  reference to a shape in   an other one, the
+shapes must be compatible (you cannot insert a face  into an edge) and
+the modified shape must not be  frozen.  (However, using emptycopy and
+add requires caution).
+
+The compound command is very safe, it  creates a compound from shapes,
+if no shapes are given the compound is empty.
+
+
+EXAMPLE
+
+
+	# a compound with three boxes
+
+	box b1 0 0 0 1 1 1
+	box b2 3 0 0 1 1 1
+	box b3 6 0 0 1 1 1
+	compound b1 b2 b3 c
+
+
+Node: Curve and surfaces topology,  Prev: Basic topology,  Next: Making profiles,  Up: Topology commands,
+
+
+This group  of commands is used to  create topology from shapes and to
+extract shapes geometry. Note   that these commands are  low-level, to
+create    faces or wires the  profile   command described  in the next
+section is usually more appropriate.
+
+- To create vertices use the vertex command.
+
+- To create edges use the edge, mkedge commands.
+
+- To create wires use the wire, polyline, polyvertex commands.
+
+- To create faces use the mkplane, mkface commands.
+
+- To extract the geometry from edges or faces use the mkcurve and
+mkface commands.
+
+- To extract the 2d curves for edges on faces use the pcurve command.
+
+
+
+
+* Menu:
+
+* vertex::
+* edge, mkedge::
+* wire, polyline, polyvertex::
+* mkplane, mkface::
+* mkcurve, mkface::
+* pcurve::
+
+
+Node: vertex,  Prev: ,  Next: edge, mkedge,  Up: Curve and surfaces topology,
+
+
+SYNOPSIS
+
+
+	vertex name [x y z / p edge]
+
+
+PURPOSE
+
+
+Creates a vertex at a  3d location, the  location is a x,y,z point  or
+the point at parameter p on an edge.
+
+
+EXAMPLE
+
+
+	vertex v1 10 20 30
+
+
+Node: edge, mkedge,  Prev: vertex,  Next: wire, polyline, polyvertex,  Up: Curve and surfaces topology,
+
+
+SYNOPSIS
+
+
+	edge name vertex1 vertex2
+
+	mkedge edge curve [surface] [pfirst plast] [vfirst [pfirst] vlast [plast]] 
+
+
+PURPOSE
+
+
+The edge command creates a straight line edge between two vertices. Of
+course they must not be at the same location.
+
+The mkedge command allows the creation  of edges from  curves, it is a
+quite complete command corresponding to the BRepAPI_MakeEdge class. It
+can create an edge from  a curve, two parameters can  be given for the
+vertices (the default are the first and last parameters of the curve),
+vertices can also be given  with their parameters, this option  allows
+to  inhibate the creation of  new  vertices, if  the parameters of the
+vertices are    not  given they are  computed    by projection on  the
+curve. Instead of a 3d curve a 2d curve and a surface can be given.
+
+
+EXAMPLE
+
+
+	# straight line edge
+	vertex v1 10 0 0
+	vertex v2 10 10 0
+	edge e1 v1 v2
+
+	# make a circular edge
+	circle c  0 0 0 5
+	mkedge e2 c 0 pi/2
+
+	# the same result may be achieved with a trimmed curve
+	# trimmed curves are recognised removed my mkedge
+	trim c c 0 pi/2
+	mkedge e2 c
+
+
+Node: wire, polyline, polyvertex,  Prev: edge, mkedge,  Next: mkplane, mkface,  Up: Curve and surfaces topology,
+
+
+SYNOPSIS
+
+
+	wire name name1 [name2 ...]
+
+	polyline name x1 y1 z1 x2 y2 z2 ...
+
+	polyvertex name v1 v2 ...
+
+
+PURPOSE
+
+
+The wire command creates a wire from edges or wires,  the order of the
+elements  must  ensure  that  the  wire  is  connected.   The vertices
+locations  are compared to   detect  connection, if the vertices   are
+differents new  edges are created  to ensure topological connectivity,
+so the original edge may be copied in the wire.
+
+The polyline command creates a polygonal wire from points coordinates,
+to make a closed wire you should repeat the first point at the end.
+
+The polyvertex command creates a polygonal wire from vertices.
+
+
+EXAMPLE
+
+
+	# create two polygonal wires
+	# and glue them
+
+	polyline w1 0 0 0 10 0 0 10 10 0
+	polyline w2 10 10 0 0 10 0 0 0 0
+	wire w w1 w2	
+
+
+Node: mkplane, mkface,  Prev: wire, polyline, polyvertex,  Next: mkcurve, mkface,  Up: Curve and surfaces topology,
+
+
+SYNOPSIS
+
+
+	mkplane name wire
+
+	mkface mkface name surface [ufirst ulast vfirst vlast]
+
+
+PURPOSE
+
+
+Use the mkplane command  to make a face  from a planar wire, the plane
+surface will be  constructed with  an  orientation  to keep  the  face
+inside the wire.
+
+Use the mkface command to make a face from a surface, parameter values
+can be given to trim a rectangular area, the default are the bounds of
+the surface.
+
+
+EXAMPLE
+
+
+	# make a polygonal face
+	polyline f 0 0 0 20 0 0 20 10 0 10 10 0 10 20 0 0 20 0 0 0 0
+	mkplane f f
+
+	# make a cylindrical face
+	cylinder g 10
+	trim g g -pi/3 pi/2 0 15
+	mkface g g
+
+
+Node: mkcurve, mkface,  Prev: mkplane, mkface,  Next: pcurve,  Up: Curve and surfaces topology,
+
+
+SYNOPSIS
+
+
+	mkcurve name edge
+	
+	mksurface name face
+
+
+PURPOSE
+
+
+Use the mkcurve command  to create a 3d curve  from an edge, the curve
+will be  trimmed to the  edge boundaries, this  is not possible if the
+edge has no 3d curve.
+
+Use the mksurface command to make a surface from a face, the surface
+is not trimmed.
+
+
+EXAMPLE
+
+
+	# make a line
+	vertex v1 0 0 0
+	vertex v2 10 0 0
+	edge e v1 v2
+	mkcurve l e
+
+
+Node: pcurve,  Prev: mkcurve, mkface,  Next: ,  Up: Curve and surfaces topology,
+
+
+SYNOPSIS
+
+
+	pcurve [name edge] face
+
+
+PURPOSE
+
+
+The pcurve command extracts the 2d curve of an edge  on a face. If the
+only argument is a face the command extracts all  the curves and color
+them according to their orientation.  This is very  useful to check if
+the edges    in  a face  are   correctly  oriented,  i.e.   they  turn
+counterclockwise.
+
+
+EXAMPLE
+
+
+	# view the pcurves of a face
+	plane p 
+	trim p p -1 1 -1 1
+	mkface p p
+	av2d; # a 2d view
+	pcurve p
+	2dfit
+
+
+WARNINGS
+
+
+If you do not see anything, may  you forgot to create  a 2d view or to
+fit it woth the 2dfit command.
+
+
+Node: Making profiles,  Prev: Curve and surfaces topology,  Next: Primitives,  Up: Topology commands,
+
+
+The  profile command is  a  powerfull tool  to  create planar faces or
+wires made   of   straight lines an  circles   which  are  current  in
+mechanical applications.
+
+
+
+
+* Menu:
+
+* profile::
+
+
+Node: profile,  Prev: ,  Next: ,  Up: Making profiles,
+
+
+SYNOPSIS
+
+
+	profile name [instruction parameters instruction parameters ....]
+
+
+PURPOSE
+
+
+The  profile command  creates  a   planar  profile  from   a list   of
+instructions.  The profile  is created in 2d on  a plane starting from
+point 0,0 and  direction X (1,0), some  instructions creates a segment
+of line or   an arc of   circle moving the  point  and setting  a  new
+direction to the tangent of the profile. Other instructions modify the
+current direction, the plane or terminate the profile.
+
+Instructions are one or  two upper or  lowercase letter, followed by a
+fixed number of arguments. The angles are given in degree.
+
+
+- O X Y Z, Set the origin of the plane (default value is 0 0 0)
+
+- P DX DY DZ UX UY UZ, Set the normal and X direction of the plane,
+(default value is 0 0 1 1 0 0, an X Y plane)
+
+- X DX, Move the point along X axis.
+
+- Y DY, Move the point along Y axis.
+
+- L DL, Move the point along the current direction by length DL.
+
+- XX X, Set point X coordinate (absolute value).
+
+- YY Y, Set point Y coordinate (absolute value).
+
+- T DX DY, Translate the point.
+
+- TT X Y, Set the point (absolute coordinates).
+
+- R Angle, Rotate the direction (clockwise).
+
+- RR Angle, Set the direction (absolute angle from X axis).
+
+- D DX DY, Set the direction (DX DY will be normalized).
+
+The instructions starting with I  will   intersect the line defined   by the
+point and the direction with a curve and move to this new point.
+
+- IX X, Intersect with a vertical (absolute X value).
+
+- IY Y, Intersect with an horizontal (absolute X value).
+
+- C Radius Angle, Make an arc of circle tangent to the current direction.
+
+By  default the profile  is closed and a face  is created, to create a
+closed or open   wire  the following instructions  may  be  used.  The
+profile will be terminated.
+
+- W, Make a closed wire.
+
+- WW, Make an open wire.
+
+
+EXAMPLE
+
+
+	# Make a square with two fillets on the top 
+	# and a half-circle on the bottom
+	
+	profile f x 5 r -90 c 5 180 x 5 y 8 c 2 90 xx 2 c 2 90
+
+
+Node: Primitives,  Prev: Making profiles,  Next: Sweeping,  Up: Topology commands,
+
+
+Primitive commands allow the creation of simple shapes.
+
+- box and wedge commands.
+
+- pcylinder, pcone, psphere, ptorus commands.
+
+
+
+
+* Menu:
+
+* box, wedge::
+* pcylinder, pcone, psphere, ptorus::
+
+
+Node: box, wedge,  Prev: ,  Next: pcylinder, pcone, psphere, ptorus,  Up: Primitives,
+
+
+SYNOPSIS
+
+
+	box name [x y z] dx dy dz
+
+	wedge name dx dy dz ltx / xmin zmin xmax xmax
+
+
+PURPOSE
+
+
+Use  the box  command to   create a  box   parallel to  the axes  with
+ dx,dy,dz dimensions.  x,y,z  is the corner  of the box, by default it
+is the origin.
+
+Use the wedge  command to create  a wedge, a wedge  has six faces, one
+face in  the OXZ plane has  dimensions dx,dz the  other face is in the
+plane y  = dy.    It  has  dimensions ltx,dz   or  it is    bounded by
+xmin,zmin,xmax,zmax. The other faces are  defined between those faces.
+The face in the y=yd plane may  be degenerated into a  line if ltx = 0
+or a point if xmin =  xmax and ymin  = ymax, in  this case there are 5
+faces. To position the wedge use the ttranslate and trotate commands.
+
+
+EXAMPLE
+
+
+	# a box at the origin
+	box b1 10 20 30
+	
+	# an other box
+	box b2 30 30 40 10 20 30
+
+	# a wedge
+	wedge w1 10 20 30 5
+
+	# a wedge with a sharp edge (5 faces)
+	wedge w2 10 20 30 0
+
+	# a pyramid
+	wedge w3 20 20 20 10 10 10 10
+
+
+Node: pcylinder, pcone, psphere, ptorus,  Prev: box, wedge,  Next: ,  Up: Primitives,
+
+
+SYNOPSIS
+
+
+	pcylinder name [plane] radius height [angle]
+
+	pcone name [plane] radius1 radius2 height [angle]
+
+	pcone name [plane] radius1 radius2 height [angle]
+
+	psphere name [plane] radius1 [angle1 angle2] [angle]
+
+	psphere name [plane] radius1 radius2 [angle1 angle2] [angle]
+
+
+PURPOSE
+
+
+All  these commands create   solids in the default  coordinate system,
+using the Z axis as the axis of revolution and the X axis as origin of
+angles.   To  use  another system  you  can  translate and rotate  the
+resulting solid  or  use a plane  as  the first  argument to specify a
+coordinate  system.   Note that  this is   quite different because the
+translation and  rotation only change  the  coordinate  system of  the
+object.  All  primitives have an optional  last  argument which  is an
+angle  in degree around  the  Z axis, starting from   the X axis.  The
+default is 360.
+
+The  pcylinder command creates a cylindrical   block around with given
+radius and height.
+
+The pcone command creates a truncated cone of given height with radius
+radius1 in  the plane z =  0 and radius2 in the  plane z = heigth. The
+radii must not be negative but one of them can be null.
+
+The psphere command creates a solid sphere  centered at the origin, if
+two angles angle1 and  angle2 are given the solid  will be  limited by
+two planes at latitude angle1 and angle2 in degree. The angles must be
+increasing and in the range -90,90.
+
+The ptorus command creates a solid torus centered at the origin around
+the z axis with given radii, if two increasing angles in degree in the
+range 0 360 are given the solid will be bounded by two planar surfaces
+at these positions on the circle.
+
+
+EXAMPLE
+
+
+	# make a can
+	pcylinder cy 5 10
+
+	# a quarter of trucated cone
+	pcone co 15 10 10 90
+
+	# three-quarters of sphere
+	psphere sp 10 270
+
+	# half torus
+	ptorus to 20 5 0 90
+
+
+Node: Sweeping,  Prev: Primitives,  Next: Topology transformation,  Up: Topology commands,
+
+
+Sweepinf creates shapes by sweeping a shape along a path.
+
+- prism sweeps along a direction.
+
+- revol sweeps around an axis.
+
+- pipe sweeps along a wire.
+
+
+
+
+
+* Menu:
+
+* prism::
+* revol::
+* pipe::
+
+
+Node: prism,  Prev: ,  Next: revol,  Up: Sweeping,
+
+
+SYNOPSIS
+
+
+	prism name shape dx dy dz ["Copy | Inf | SemiInf]
+
+
+PURPOSE
+
+
+The  prism command creates  a  new shape by  sweeping  a shape along a
+direction. Any  shape can be swept, a   vertex gives an edge,  en edge
+gives a face, a face gives a solid...
+
+The sweeping is  done along  the vector  dx dy dz.  The original shape
+will be shared in  the result unless   "Copy" is specified. If  Inf is
+specified  the  prism is infinite  in  both directions, if  SemiInf is
+specified  the prism is infinite  in the  dx,dy,dz direction, then the
+length of the vector has no meaning.
+
+
+EXAMPLE
+
+
+	# sweep a planar face to make a solid
+	polyline f 0 0 0 10 0 0 10 5 0 5 5 0 5 15 0 0 15 0 0 0 0
+	mkplane f f
+	prism p f 0 0 10
+
+
+Node: revol,  Prev: prism,  Next: pipe,  Up: Sweeping,
+
+
+SYNOPSIS
+
+
+	revol name shape x y z dx dy dz angle [Copy]
+
+
+PURPOSE
+
+
+The revol command creates a new  shape by sweeping  a shape around the
+axis x,y,z dx,dy,dz by  an angle in  degree. As with the prism command
+the shape can be of any type and is not shared if Copy is specified.
+
+
+EXAMPLE
+
+
+	# shell by wire rotation
+	polyline w 0 0 0 10 0 0 10 5 0 5 5 0 5 15 0 0 15 0 
+	revol s w 20 0 0 0 1 0 90
+
+
+Node: pipe,  Prev: revol,  Next: ,  Up: Sweeping,
+
+
+SYNOPSIS
+
+
+	pipe name wire shape
+
+
+PURPOSE
+
+
+The pipe command creates a shape by sweeping a shape known as the
+profile along a wire known as the spine.
+
+
+EXAMPLE
+
+
+	# sweep a circle along a bezier curve to make a solid pipe
+	beziercurve spine 4 0 0 0 10 0 0 10 10 0 20 10 0
+	mkedge spine spine
+	wire spine spine
+	circle profile 0 0 0 1 0 0 2
+	mkedge profile profile
+	wire profile profile
+	mkplane profile profile
+	pipe p spine profile
+
+
+Node: Topology transformation,  Prev: Sweeping,  Next: Topological operations,  Up: Topology commands,
+
+
+Transformations are application  of matrices, when the  transformation
+is  non deforming,  like translation or  rotation,  the object is  not
+copied, we use the topology  local coordinate system feature. The copy
+can be enforced with the tcopy command.
+
+- tcopy makes a copy of the structure of a shape.
+
+- ttranslate, trotate, tmove, reset moves a shape.
+
+- tmirror, tscale always modify the shape.
+
+
+
+
+* Menu:
+
+* tcopy::
+* tmove, treset::
+* ttranslate, trotate::
+* tmirror, tscale::
+
+
+Node: tcopy,  Prev: ,  Next: tmove, treset,  Up: Topology transformation,
+
+
+SYNOPSIS
+
+
+	tcopy name toname [name toname ...]
+
+
+PURPOSE
+
+
+Copy the structure of a shape in a new shape, including the geometry.
+
+
+EXAMPLE
+
+
+	# create an edge from  a curve and copy it
+	beziercurve c 3 0 0 0 10 0 0 20 10 0
+	mkedge e1 c
+	ttranslate e1 0 5 0
+	tcopy e1 e2
+	ttranslate e2 0 5 0
+	
+	# now modify the curve, only e1 will be modified
+	cmovep c 2 0 0 20
+
+
+Node: tmove, treset,  Prev: tcopy,  Next: ttranslate, trotate,  Up: Topology transformation,
+
+
+SYNOPSIS
+
+
+	tmove name [name ...] shape
+
+	reset name [name ...]
+
+
+PURPOSE
+
+
+The tmove and reset command are used to modify  the location, or local
+coordinate system  of  a shape,  tmove  applies  to some  shapes   the
+location  of a  given shape.  reset  removes the location of  a shape,
+restoring it in its original coordinate system.
+
+
+EXAMPLE
+
+
+	# create two boxes
+	box b1 10 10 10
+	box b2 20 0 0 10 10 10
+	# translate the first box
+	ttranslate b1 0 10 0
+	# and apply the same location to b2
+	tmove b2 b1
+	# return to original positions
+	reset b1 b2
+
+
+Node: ttranslate, trotate,  Prev: tmove, treset,  Next: tmirror, tscale,  Up: Topology transformation,
+
+
+SYNOPSIS
+
+
+	ttranslate [name ...] dx dy dz
+
+	trotate [name ...] x y z dx dy dz angle
+
+
+PURPOSE
+
+
+Use the ttranslate  command to translate a  set  of shapes by  a given
+vector, and the  trotate command to rotate  them  by a given angle  in
+degree around  an axis. Both commands  only modify the location of the
+shape. When transforming multiple shapes the same location is used for
+all the shapes,  when a command is used   for each shape,  even if the
+translation or the rotation are the same, a new location is created.
+
+Locations  are very economic in   the data structure because  multiple
+occurrences of an object share the topological description.
+
+
+EXAMPLE
+
+
+	# make rotated copy of a sphere and cylinders
+	pcylinder c1 30 5
+	copy c1 c2
+	ttranslate c2 0 0 20
+	psphere s 3
+	ttranslate s 25 0 12.5
+	for {set i 0} {$i < 360} {incr i 20} {
+	  copy s s$i
+	  trotate s$i 0 0 0 0 0 1 $i
+	}
+
+
+Node: tmirror, tscale,  Prev: ttranslate, trotate,  Next: ,  Up: Topology transformation,
+
+
+SYNOPSIS
+
+
+	tmirror name x y z dx dy dz
+	
+	tscale name x y z scale
+
+
+PURPOSE
+
+
+The tmirror command makes a mirror copy of a shape about a plane x,y,z
+dx,dy,dz, the tscale command applies a central homothety to the shape.
+
+
+EXAMPLE
+
+
+	# mirror a portion of cylinder about the YZ plane
+	pcylinder c1 10 10 270
+	copy c1 c2	
+	tmirror c2 15 0 0 1 0 0
+	# and scale it
+	tscale c1 0 0 0 0.5
+
+
+Node: Topological operations,  Prev: Topology transformation,  Next: Local operations,  Up: Topology commands,
+
+
+Topological operations includes the boolean operations, they are using
+intersections.
+
+- fuse, cut, common are the boolean operations.
+
+- section, psection computes sections.
+
+
+
+
+* Menu:
+
+* fuse, cut, common::
+* section, psection::
+
+
+Node: fuse, cut, common,  Prev: ,  Next: section, psection,  Up: Topological operations,
+
+
+SYNOPSIS
+
+
+	fuse name shape1 shape2
+
+	cut name shape1 shape2
+
+	common name shape1 shape2
+
+
+PURPOSE
+
+
+Creation  of a new  shape by a  boolean  operation between two shapes,
+fuse is  the union, cut  substract the second to  the first, common is
+the intersection.
+
+
+EXAMPLE
+
+
+	# the four boolean operations between a box and a cylinder
+
+	box b 0 -10 5 20 20 10
+	pcylinder c 5 20
+
+	fuse s1 b c
+	ttranslate s1 40 0 0
+
+	cut s2 b c
+	ttranslate s2 -40 0 0
+
+	cut s3 c b
+	ttranslate s3 0 40 0
+
+	common s4 b c
+	ttranslate s4 0 -40 0
+
+
+Node: section, psection,  Prev: fuse, cut, common,  Next: ,  Up: Topological operations,
+
+
+SYNOPSIS
+
+
+	section name shape1 shape2
+
+	psection name shape plane
+
+
+PURPOSE
+
+
+The section  command creates a  compound  with the  intersection edges
+created from the faces of  two shapes, this is  the section line.  The
+psection command do the same between a shape and  a plane. This is the
+planar section.
+
+
+EXAMPLE
+
+
+	# section line between a cylinder and a box
+	pcylinder c 10 20
+	box b 0 0 5 15 15 15
+	trotate b 0 0 0 1 1 1 20
+	section s b c
+
+	# planar section of a cone
+	pcone c 10 30 30
+	plane p 0 0 15 1 1 2
+	psection s c p
+
+
+Node: Local operations,  Prev: Topological operations,  Next: Drafting and blending,  Up: Topology commands,
+
+
+Local operations are boolean operations restricted to some faces of a
+solid.
+
+- localope is the general local operation command, to perform local
+boolean operations.
+
+- hole, firsthole, holend, blindhole are various commands to create
+cylindrical holes.
+
+
+
+
+* Menu:
+
+* localope::
+* hole, firsthole, holend, blindhole, holecontrol::
+
+
+Node: localope,  Prev: ,  Next: hole, firsthole, holend, blindhole, holecontrol,  Up: Local operations,
+
+
+SYNOPSIS
+
+
+	localope name shape tool F/C face [face ...]
+
+
+PURPOSE
+
+
+Use the localope command to perform a  local operation on a shape with
+a  tool. The operation   is a fusion or a   cut (use 'F' or  'C'). The
+operation will  be restricted  to  the designates  faces. The  tool is
+intersected only  with the given  faces  and other faces  necessary to
+close the intersection curves.
+
+This operation is the basis for features implementation.
+
+
+EXAMPLE
+
+
+	# make a box and fuse a cylinder on one side
+	box b 10 10 10
+	pcylinder c 1 20
+	ttranslate c 5 5 -5
+	
+	# click on the top or bottom face and observe the result...
+	localope a b c F .
+
+
+Node: hole, firsthole, holend, blindhole, holecontrol,  Prev: localope,  Next: ,  Up: Local operations,
+
+
+SYNOPSIS
+
+
+	hole name shape  Or.X Or.Y Or.Z Dir.X Dir.Y Dir.Z Radius [Pfrom Pto]
+
+	firsthole name shape Or.X Or.Y Or.Z Dir.X Dir.Y Dir.Z Radius
+
+	holend name shape Or.X Or.Y Or.Z Dir.X Dir.Y Dir.Z Radius
+
+	blindhole name shape Or.X Or.Y Or.Z Dir.X Dir.Y Dir.Z Radius Length
+
+	holecontrol [0/1]
+
+
+PURPOSE
+
+
+Use the hole  commands to make a  cylindrical hole in  a solid, in any
+case you must give  an axis  and a  radius  with Or.X Or.Y Or.Z  Dir.X
+Dir.Y Dir.Z Radius. 
+
+- hole will make a hole through  the whole solid or between parameters
+Pfrom and Pto on the axis.
+
+- firsthole will make only the  first possible hole along the positive
+side of the axis.
+
+- holend will make  all possible holes along the  positive side of the
+axis.
+
+- blindhole will make  a blind hole of depth  Length starting from the
+origin of the axis on the positive side.
+
+The holecontrol command  is   used  to set   or display  the   control
+mode. When the value is 1  a check of  validity is performed after all
+the hole commands.
+
+
+EXAMPLE
+
+
+	# make a hole through a cylinder
+
+	pcylinder c 5 10
+
+	firsthole r c 0 -10 5 0 1 0 1
+
+
+WARNINGS
+
+
+If the axis does not intersect the solid  nothing is done, this is not
+the same as a full boolean operation.
+
+
+Node: Drafting and blending,  Prev: Local operations,  Next: Topology analysis,  Up: Topology commands,
+
+
+Drafting is  the creation  of  a new shape by   tilting faces with  an
+angle, blending is the creation of a new shapes by rounding of edges.
+
+- Use the depouille command for drafting.
+
+- Use the blend command for simple blending.
+
+- Use the chfi2d command for blending or chamfering planar faces.
+
+- Use fubl for a fusion + blending operation.
+
+- Use buildevol, mkevol, updatevol to make varying radius blending.
+
+
+
+
+* Menu:
+
+* depouille::
+* blend::
+* chfi2d::
+* fubl::
+* mkevol, updatevol, buildevol::
+
+
+Node: depouille,  Prev: ,  Next: blend,  Up: Drafting and blending,
+
+
+SYNOPSIS
+
+
+depouille name shape dirx diry dirz face angle x y x dx dy dz [face angle...]
+
+
+PURPOSE
+
+
+Use this command to create a  new shape by drafting  faces of a shape,
+you  must  give the shape  to  be drafted  and the  drafting direction
+(think of it  as an unmolding direction), then  faces with  angles and
+axis of rotation.  The faces must  be faces of  the shape, you can use
+the dot syntax to pick the faces.
+
+
+EXAMPLE
+
+
+	# draft a face of a box
+	box b 10 10 10
+	explode b f
+	depouille a b 0 0 1 b_2 10 0 10 0 1 0 5
+
+
+Node: blend,  Prev: depouille,  Next: chfi2d,  Up: Drafting and blending,
+
+
+SYNOPSIS
+
+
+	blend name shape radius edge [radius edge ...]
+
+
+PURPOSE
+
+
+The blend  command creates a new  shape by rounding  edges of a shape,
+you must give the  shape and pairs radius, edge.  The edge must  be in
+the shape, you may use the dot syntax.  Not that the blend is expanded
+to other  edges when  the  faces are tangent.  Blends  are also called
+fillets.
+
+
+EXAMPLE
+
+
+	# blend a box, click on an edge
+	box b 20 20 20
+	blend b b 2 .
+
+
+Node: chfi2d,  Prev: blend,  Next: fubl,  Up: Drafting and blending,
+
+
+SYNOPSIS
+
+
+	chfi2d result face [edge1 edge2 (F radius/CDD d1 d2/CDA d ang) ....]
+
+
+PURPOSE
+
+
+Creates a  new face name  result from an  existing face adding fillets
+and chamfers. The face must be planar, if  it is a  wire a planar face
+can  be made with the mkplane  command. Multiples fillets and chamfers
+can be built.
+
+edge1 edge2 F radius,   builds a fillet of  the  given radius  on  the
+vertex connecting the two edges.
+
+edge1 edge2 CDD d1  d2, builds a chamfer on the vertex  connecting the
+two edges with distance d1 on edge1 and d2 on edge2.
+
+edge1 edge2 CDA d  ang, builds a chamfer on  the vertex connecting the
+two  edges at distance d  on edge1 making  an  angle ang (degree) with
+edge1.
+
+
+EXAMPLE
+
+
+	# Make a fillet and the two kinds of vertices 
+	# with graphical selection of the edges
+
+	polyline f 0 0 0 20 0 0 20 10 0 10 10 0 10 30 0 0 30 0 0 0 0
+	mkplane f f
+
+	chfi2d f f . . F 3 . . CDD 1 2 . . CDA 1.5 60
+
+
+SEE ALSO
+
+mkplane
+
+
+Node: fubl,  Prev: chfi2d,  Next: mkevol, updatevol, buildevol,  Up: Drafting and blending,
+
+
+SYNOPSIS
+
+
+	fubl name shape1 shape2 radius
+
+
+PURPOSE
+
+
+Make a fusion boolean operation between two shapes then blend the
+intersection edges with the radius.
+
+
+EXAMPLE
+
+
+	# fuse-blend two boxes
+	box b1 20 20 5
+	copy b1 b2
+	ttranslate b2 -10 10 3
+	fubl a b1 b2 1
+
+
+SEE ALSO
+
+fuse
+blend
+
+
+Node: mkevol, updatevol, buildevol,  Prev: fubl,  Next: ,  Up: Drafting and blending,
+
+
+SYNOPSIS
+
+
+	mkevol name shape
+
+	updatevol edge u1 radius1 [u2 radius2 ...]
+
+	buildevol
+
+
+PURPOSE
+
+
+These three commands work   together  to blend shapes  with   evolving
+radius. First you give  the shape and the name  of the result with the
+mkevol  command.    Then you describe  edges   to be blended  with the
+updatevol command., for each edge you give a  set of pairs : parameter
+radius, the  parameters will be  scaled along the  edge and the radius
+function interpolated for  the  whole  edge.  At last  the   buildevol
+command computes the result.
+
+
+EXAMPLE
+
+
+	# makes an evolved radius on a box
+	box b 10 10 10
+	mkevol b b
+	# click an edge
+	updatevol . 0 1 1 3 2 2
+	buildevol
+
+
+Node: Topology analysis,  Prev: Drafting and blending,  Next: ,  Up: Topology commands,
+
+
+Analysis of  shapes includes  the  commands  to  compute length,  area
+volumes and inertia properties.
+
+- Use lprops, sprops, vprops to compute properties.
+
+- Use bounding to display the bounding box of a shape.
+
+
+
+
+* Menu:
+
+* lprops, sprops, vprops::
+* bounding::
+
+
+Node: lprops, sprops, vprops,  Prev: ,  Next: bounding,  Up: Topology analysis,
+
+
+SYNOPSIS
+
+
+	lprops shape
+
+	sprops shape
+
+	vprops shape
+
+
+PURPOSE
+
+
+lprops  computes massic properties  of all  edges  in the shape with a
+linear density of 1, sprops of all faces  with a surfacic density of 1
+and vprops of all solids with a density of 1.
+
+The  three commands print the  mass,  which is  either the length, the
+area  or  the volume, the  coordinates of  the center of  gravity, the
+matrix of inertia and  the moments. The center   and the main axis  of
+inertia are displayed.
+
+
+EXAMPLE
+
+
+	# volume of a cylinder
+	pcylinder c 10 20
+	vprops c
+	==> results
+	Mass : 6283.18529981086
+
+	Center of gravity : 
+	X = 4.1004749224903e-06
+	Y = -2.03392858349861e-16
+	Z = 9.9999999941362
+
+	Matrix of Inertia : 
+	366519.141445068 5.71451850691484e-12 0.257640437382627
+	5.71451850691484e-12 366519.141444962 2.26823064169991e-10
+	0.257640437382627 2.26823064169991e-10 314159.265358863
+
+	Moments : 
+	IX = 366519.141446336
+	IY = 366519.141444962
+	IZ = 314159.265357595
+
+
+Node: bounding,  Prev: lprops, sprops, vprops,  Next: ,  Up: Topology analysis,
+
+
+SYNOPSIS
+
+
+	bounding shape
+
+
+PURPOSE
+
+
+Display the bounding box of a shape and returns the string "xmin ymin
+zmin xmax ymax zmax"
+
+
+EXAMPLE
+
+
+	# bounding box of a torus
+	ptorus t 20 5
+	bounding t
+	==> 
+	-25.000000100000001 -25.000000100000001 -5.0000001000000003 
+	25.000000100000001 25.000000100000001 5.0000001000000003
+
+
+Node: Index,  Up: Top,
+
+2dapprox command                *Note appro, 2dapprox, 2dinterpolate::
+2dbeziercurve command           *Note beziercurve, 2dbeziercurve::
+2dbsplinecurve command          *Note bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve::
+2dclear command                 *Note erase, clear, 2dclear::
+2dcvalue command                *Note cvalue, 2dcvalue::
+2dfit command                   *Note fit, 2dfit::
+2dintersect command             *Note 2dintersect::
+2dlmirror command               *Note pmirror, lmirror, smirror, 2dpmirror, 2dlmirror::
+2dmd command                    *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
+2dmu command                    *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
+2dpbsplinecurve command         *Note bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve::
+2dpd command                    *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
+2dpl command                    *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
+2dpmirror command               *Note pmirror, lmirror, smirror, 2dpmirror, 2dlmirror::
+2dpr command                    *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
+2dproj command                  *Note proj, 2dproj::
+2dpscale command                *Note pscale, 2dpscale::
+2dpu command                    *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
+2drotate command                *Note rotate, 2drotate::
+2dtranslate command             *Note translate, 2dtranslate::
+2dzoom command                  *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
+add command                     *Note emptycopy, add, compound::
+appro command                   *Note appro, 2dapprox, 2dinterpolate::
+approximation                   *Note appro, 2dapprox, 2dinterpolate::
+area                            *Note lprops, sprops, vprops::
+autodisplay command             *Note autodisplay::
+av2d command                    *Note axo, pers, top, ...::
+axo command                     *Note axo, pers, top, ...::
+back command                    *Note axo, pers, top, ...::
+beziercurve command             *Note beziercurve, 2dbeziercurve::
+beziersurf command              *Note beziersurf::
+blend command                   *Note blend::
+blindhole command               *Note hole, firsthole, holend, blindhole, holecontrol::
+boolean operations              *Note fuse, cut, common::
+bottom command                  *Note axo, pers, top, ...::
+bounding command                *Note bounding::
+box command                     *Note box, wedge::
+box, bounding                   *Note bounding::
+break command                   *Note break, continue::
+bsplinecurve command            *Note bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve::
+bsplinesurf command             *Note bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf::
+buildevol command               *Note mkevol, updatevol, buildevol::
+chamfer 2d                      *Note chfi2d::
+chfi2d command                  *Note chfi2d::
+chrono command                  *Note chrono::
+circle command                  *Note circle::
+cirtang command                 *Note cirtang::
+clear command                   *Note erase, clear, 2dclear::
+clknots command                 *Note clknots, shknots::
+clpoles command                 *Note clpoles, shpoles::
+cmovep command                  *Note cmovep, movep, movecolp, moverowp::
+cmovepoint command              *Note cmovepoint, movepoint::
+color command                   *Note color::
+command                         *Note Syntax of TCL::
+common command                  *Note fuse, cut, common::
+complement command              *Note orientation, complement, invert::
+compound command                *Note emptycopy, add, compound::
+cone command                    *Note cone::
+cone solid                      *Note pcylinder, pcone, psphere, ptorus::
+continue command                *Note break, continue::
+convert command                 *Note convert::
+coord command                   *Note coord::
+coordinate system               *Note plane::
+copy command                    *Note rename, copy::
+copying shapes                  *Note tcopy::
+cpulimit command                *Note cpulimit::
+curvature                       *Note localprop, minmaxcurandif::
+curvature of surfaces           *Note surface_radius::
+curve from edge                 *Note mkcurve, mkface::
+curve to edge                   *Note edge, mkedge::
+cut command                     *Note fuse, cut, common::
+cvalue command                  *Note cvalue, 2dcvalue::
+cylinder command                *Note cylinder::
+cylinder solid                  *Note pcylinder, pcone, psphere, ptorus::
+d command                       *Note u, d, l, r::
+datadir command                 *Note datadir, save, restore::
+defle command                   *Note dmod, discr, defle::
+delete command                  *Note view, delete::
+depouille command               *Note depouille::
+derivative on curves            *Note cvalue, 2dcvalue::
+dflush command                  *Note repaint, dflush::
+directory command               *Note isdraw, directory::
+discr command                   *Note dmod, discr, defle::
+discretisation command          *Note isos, discretisation::
+display command                 *Note display, donly::
+display of curves and surfaces  *Note Display::
+display of shapes               *Note isos, discretisation::
+dmod command                    *Note dmod, discr, defle::
+donly command                   *Note display, donly::
+dot argument                    *Note Variables display commands::
+Draw variables                  *Note Accessing variables in TCL and Draw::
+dset command                    *Note dset, dval::
+dtext command                   *Note dtext::
+dump command                    *Note whatis, dump::
+dump of image                   *Note hardcopy, hcolor, xwd::
+dval command                    *Note dset, dval::
+edge command                    *Note edge, mkedge::
+edge from curve                 *Note edge, mkedge::
+edge to curve                   *Note mkcurve, mkface::
+ellipse command                 *Note ellipse::
+emptycopy command               *Note emptycopy, add, compound::
+environment variables           *Note datadir, save, restore::
+erase command                   *Note erase, clear, 2dclear::
+euler angles                    *Note cylinder::
+eval command                    *Note Syntax of TCL::
+exchuv command                  *Note exchuv::
+exec command	                   *Note Syntax of TCL::
+exit command                    *Note exit::
+explode command                 *Note explode, exwire, nbshapes::
+exploring a shape               *Note explode, exwire, nbshapes::
+expr command                    *Note Syntax of TCL::
+extsurf command                 *Note extsurf::
+exwire command                  *Note explode, exwire, nbshapes::
+face creation                   *Note profile::
+face from surface               *Note mkplane, mkface::
+fd command                      *Note focal, fu, fd::
+features                        *Note localope::
+fillet 2d                       *Note chfi2d::
+fillets                         *Note blend::
+firsthole command               *Note hole, firsthole, holend, blindhole, holecontrol::
+fit command                     *Note fit, 2dfit::
+focal command                   *Note focal, fu, fd::
+for command                     *Note while, for, foreach::
+foreach command                 *Note while, for, foreach::
+free boundary                   *Note isos, discretisation::
+front command                   *Note axo, pers, top, ...::
+fu command                      *Note focal, fu, fd::
+fubl command                    *Note fubl::
+fuse command                    *Note fuse, cut, common::
+global command                  *Note global, upvar::
+grilapp command                 *Note surfapp, grilapp::
+hardcopy command                *Note hardcopy, hcolor, xwd::
+hcolor command                  *Note hardcopy, hcolor, xwd::
+help command                    *Note help::
+hole command                    *Note hole, firsthole, holend, blindhole, holecontrol::
+holecontrol command             *Note hole, firsthole, holend, blindhole, holecontrol::
+holend command                  *Note hole, firsthole, holend, blindhole, holecontrol::
+hyperbola command               *Note hyperbola::
+if command                      *Note if::
+incdeg command                  *Note incdeg, incudeg, incvdeg::
+incr command                    *Note while, for, foreach::
+incudeg command                 *Note incdeg, incudeg, incvdeg::
+incvdeg command                 *Note incdeg, incudeg, incvdeg::
+inertia                         *Note lprops, sprops, vprops::
+insertknot command              *Note insertknot, insertuknot, insertvknot::
+insertpole command              *Note insertpole, rempole, remcolpole, remrowpole::
+insertuknot command             *Note insertknot, insertuknot, insertvknot::
+insertvknot command             *Note insertknot, insertuknot, insertvknot::
+intersect command               *Note intersect::
+invert command                  *Note orientation, complement, invert::
+isdraw command                  *Note isdraw, directory::
+isoparametric curves            *Note uiso, viso::
+isos command                    *Note isos, discretisation::
+knot insertion                  *Note insertknot, insertuknot, insertvknot::
+knot removal                    *Note remknot, remulnot, remvknot::
+knots display                   *Note clknots, shknots::
+l command                       *Note u, d, l, r::
+layout of views                 *Note axo, pers, top, ...::
+left command                    *Note axo, pers, top, ...::
+length                          *Note lprops, sprops, vprops::
+line command                    *Note line::
+lintan command                  *Note lintan::
+lmirror command                 *Note pmirror, lmirror, smirror, 2dpmirror, 2dlmirror::
+localope command                *Note localope::
+localprop command               *Note localprop, minmaxcurandif::
+location                        *Note tmove, treset::
+longitude and latitude          *Note cylinder::
+lprops command                  *Note lprops, sprops, vprops::
+md command                      *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
+minmaxcurandif command          *Note localprop, minmaxcurandif::
+mirroring shapes                *Note tmirror, tscale::
+mkcurve command                 *Note mkcurve, mkface::
+mkedge command                  *Note edge, mkedge::
+mkevol command                  *Note mkevol, updatevol, buildevol::
+mkface command                  *Note mkcurve, mkface::
+mkplane command                 *Note mkplane, mkface::
+movecolp command                *Note cmovep, movep, movecolp, moverowp::
+movep command                   *Note cmovep, movep, movecolp, moverowp::
+movepoint command               *Note cmovepoint, movepoint::
+moverowp command                *Note cmovep, movep, movecolp, moverowp::
+mu command                      *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
+mu4 command                     *Note axo, pers, top, ...::
+nbiso command                   *Note nbiso::
+nbshapes command                *Note explode, exwire, nbshapes::
+numeric variables               *Note Accessing variables in TCL and Draw::
+offset command                  *Note offset::
+orientation command             *Note orientation, complement, invert::
+parabola command                *Note parabola::
+parameters command              *Note parameters::
+pbsplinecurve command           *Note bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve::
+pcone command                   *Note pcylinder, pcone, psphere, ptorus::
+pcurve command                  *Note pcurve::
+pcylinder command               *Note pcylinder, pcone, psphere, ptorus::
+pd command                      *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
+periodic bsplines               *Note bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf::
+pers command                    *Note axo, pers, top, ...::
+pi                              *Note Accessing variables in TCL and Draw::
+pick command                    *Note wclick, pick::
+pipe command                    *Note pipe::
+pl command                      *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
+planar section                  *Note section, psection::
+plane command                   *Note plane::
+pmirror command                 *Note pmirror, lmirror, smirror, 2dpmirror, 2dlmirror::
+point command                   *Note point::
+pole insertion and removal      *Note insertpole, rempole, remcolpole, remrowpole::
+poles display                   *Note clpoles, shpoles::
+polyline command                *Note wire, polyline, polyvertex::
+polyvertex command              *Note wire, polyline, polyvertex::
+postscript                      *Note hardcopy, hcolor, xwd::
+pr command                      *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
+prism command                   *Note prism::
+proc command                    *Note proc::
+procedure                       *Note proc::
+profile command                 *Note profile::
+proj command                    *Note proj, 2dproj::
+project command                 *Note project::
+pscale command                  *Note pscale, 2dpscale::
+psection command                *Note section, psection::
+psphere command                 *Note pcylinder, pcone, psphere, ptorus::
+ptorus command                  *Note pcylinder, pcone, psphere, ptorus::
+pu command                      *Note pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr::
+quoting                         *Note Syntax of TCL::
+r command                       *Note u, d, l, r::
+radius of curvature             *Note localprop, minmaxcurandif::
+reference, call by              *Note global, upvar::
+remcolpole command              *Note insertpole, rempole, remcolpole, remrowpole::
+remknot command                 *Note remknot, remulnot, remvknot::
+rempole command                 *Note insertpole, rempole, remcolpole, remrowpole::
+remrowpole command              *Note insertpole, rempole, remcolpole, remrowpole::
+remulnot command                *Note remknot, remulnot, remvknot::
+remvknot command                *Note remknot, remulnot, remvknot::
+rename command                  *Note rename, copy::
+repaint command                 *Note repaint, dflush::
+restore command                 *Note datadir, save, restore::
+reverse command                 *Note reverse, ureverse, vreverse::
+revol command                   *Note revol::
+revsurf command                 *Note revsurf::
+right command                   *Note axo, pers, top, ...::
+rotate command                  *Note rotate, 2drotate::
+rotating shapes                 *Note ttranslate, trotate::
+rounding                        *Note chfi2d::
+save command                    *Note datadir, save, restore::
+scaling shapes                  *Note tmirror, tscale::
+screen layout                   *Note axo, pers, top, ...::
+script                          *Note Syntax of TCL::
+section command                 *Note section, psection::
+segment command                 *Note segment, segsur::
+segsur command                  *Note segment, segsur::
+selection, graphical            *Note Variables display commands::
+set command                     *Note set, unset::
+setnotperiodic command          *Note setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
+setorigin command               *Note setorigin, setuorigin, setvorigin::
+setperiodic command             *Note setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
+setunotperiodic command         *Note setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
+setuorigin command              *Note setorigin, setuorigin, setvorigin::
+setuperiodic command            *Note setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
+setvnotperiodic command         *Note setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
+setvorigin command              *Note setorigin, setuorigin, setvorigin::
+setvperiodic command            *Note setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic::
+shknots command                 *Note clknots, shknots::
+shpoles command                 *Note clpoles, shpoles::
+smallview command               *Note axo, pers, top, ...::
+smirror command                 *Note pmirror, lmirror, smirror, 2dpmirror, 2dlmirror::
+source command                  *Note source::
+sphere command                  *Note sphere::
+sphere solid                    *Note pcylinder, pcone, psphere, ptorus::
+sprops command                  *Note lprops, sprops, vprops::
+spy command                     *Note spy::
+spying session                  *Note spy::
+substitution                    *Note Syntax of TCL::
+surface to face                 *Note mkplane, mkface::
+surface_radius command          *Note surface_radius::
+surfapp command                 *Note surfapp, grilapp::
+svalue command                  *Note svalue::
+sweeping                        *Note prism::
+tangent circle                  *Note cirtang::
+tangent line                    *Note lintan::
+TCL                             *Note Syntax of TCL::
+tcopy command                   *Note tcopy::
+text display                    *Note dtext::
+tmirror command                 *Note tmirror, tscale::
+tmove command                   *Note tmove, treset::
+to2d command                    *Note to2d, to3d::
+to3d command                    *Note to2d, to3d::
+top command                     *Note axo, pers, top, ...::
+torus command                   *Note torus::
+torus solid                     *Note pcylinder, pcone, psphere, ptorus::
+translate command               *Note translate, 2dtranslate::
+translating shapes              *Note ttranslate, trotate::
+treset command                  *Note tmove, treset::
+trim command                    *Note trim, trimu, trimv::
+trimu command                   *Note trim, trimu, trimv::
+trimv command                   *Note trim, trimu, trimv::
+trotate command                 *Note ttranslate, trotate::
+tscale command                  *Note tmirror, tscale::
+ttranslate command              *Note ttranslate, trotate::
+u command                       *Note u, d, l, r::
+uiso command                    *Note uiso, viso::
+unnamed objects                 *Note Variables display commands::
+unset command                   *Note set, unset::
+upbsplinesurf command           *Note bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf::
+updatevol command               *Note mkevol, updatevol, buildevol::
+upvar command                   *Note global, upvar::
+ureverse command                *Note reverse, ureverse, vreverse::
+uvpbsplinesurf command          *Note bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf::
+v2d command                     *Note axo, pers, top, ...::
+value on curves                 *Note cvalue, 2dcvalue::
+value, call by                  *Note global, upvar::
+vertex command                  *Note vertex::
+view command                    *Note view, delete::
+viso command                    *Note uiso, viso::
+volume                          *Note lprops, sprops, vprops::
+vpbsplinesurf command           *Note bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf::
+vprops command                  *Note lprops, sprops, vprops::
+vreverse command                *Note reverse, ureverse, vreverse::
+wait command                    *Note wait::
+wclick command                  *Note wclick, pick::
+wedge command                   *Note box, wedge::
+whatis command                  *Note whatis, dump::
+while command                   *Note while, for, foreach::
+window                          *Note view, delete::
+wire command                    *Note wire, polyline, polyvertex::
+wire exploration                *Note explode, exwire, nbshapes::
+word                            *Note Syntax of TCL::
+wzoom command                   *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
+xwd command                     *Note hardcopy, hcolor, xwd::
+xwud                            *Note hardcopy, hcolor, xwd::
+zoom command                    *Note mu, md, 2dmu, 2dmd, zoom, 2dzoom, wzoom::
diff --git a/src/DrawResources/DataExchangeDemo.tcl b/src/DrawResources/DataExchangeDemo.tcl
deleted file mode 100644
index 131382a..0000000
--- a/src/DrawResources/DataExchangeDemo.tcl
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright (c) 1999-2012 OPEN CASCADE SAS
-#
-# The content of this file is subject to the Open CASCADE Technology Public
-# License Version 6.5 (the "License"). You may not use the content of this file
-# except in compliance with the License. Please obtain a copy of the License
-# at http://www.opencascade.org and read it completely before using this file.
-#
-# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-#
-# The Original Code and all software distributed under the License is
-# distributed on an "AS IS" basis, without warranty of any kind, and the
-# Initial Developer hereby disclaims all such warranties, including without
-# limitation, any warranties of merchantability, fitness for a particular
-# purpose or non-infringement. Please see the License for the specific terms
-# and conditions governing the rights and limitations under the License.
-
-
-set stationname $tcl_platform(platform)
-if { ${stationname} == "windows" } {
-   proc winfo { aTest aWindow } { return False }
-}
-
-
-proc sage { a} {
-    global stationname 
-    if { ${stationname} != "windows" } {
-	
-	if { ![winfo exists .h ] } {
-	    toplevel .h -bg azure3
-	    wm title .h "INFO DATAEXCHANGE TEST HARNESS"
-	    wm geometry .h +320+20
-	    
-	} 
-	if { [winfo exists .h.m ] } {
-	    set astring [.h.m cget  -text]
-	    set newstring "${astring} \n $a"
-	    .h.m configure -text $newstring 
-	    puts $a
-	} else {
-	    message .h.m -justify left -bg azure2 -width 13c -relief ridge -bd 4\
-		    -text $a
-	    puts $a
-	} 
-	pack .h.m
-	update
-   }
-}
-
-
-smallview
-if { [winfo exists .h ] } {
-    destroy .h
-}
-
-set thedir [file join [file dirname [file dirname [info script]] DEResource]
-if { [file isdirectory ${thedir}] } {
-    cd ${thedir}
-} else {
-    cd [file dirname [info script]]
-}
-
-datadir .
-sage " First, we retrieve a BREP File "
-sage "    datadir ."
-sage "    restore wing.brep wing"
-sage " "
-datadir .
-restore wing.brep wing
-disp wing
-fit
-sage "Generate the IGES File of this BREP"
-sage "   brepiges wing /tmp/wing.igs"
-sage " "
-brepiges wing /tmp/wing.igs
-wait 3
-sage "we delete all data"
-sage ""
-dall
-sage "Restore this IGES File we have created " 
-sage "   igesbrep wing.igs new *"
-sage ""
-cd /tmp
-igesbrep wing.igs new *
-disp new
-fit
-if { [winfo exists .h ] } {
-    destroy .h
-}
-puts "End IGES Elementary Test " 
-sage " "
-unlink /tmp/wing.igs
diff --git a/src/DrawResources/DrawAppliInit b/src/DrawResources/DrawAppliInit
deleted file mode 100644
index dc77141..0000000
--- a/src/DrawResources/DrawAppliInit
+++ /dev/null
@@ -1,18 +0,0 @@
-global tcl_platform
-
-if {[array get env QA_DUMP] != "" && $env(QA_DUMP) == "1"} {
-    set env(CSF_DrawPluginQADefaults) $env(CASROOT)/src/DrawResources/.
-    ###catch {pload ALL}
-    catch {pload FULL}
-    #catch {pload -DrawPluginProducts ALL}
-    catch {pload -DrawPluginProducts OMF CANONICALRECOGNITION EMESH PARASOLID DXF SAT }
-    catch {pload QAcommands}
-
-    ###foreach h [array names Draw_Groups] {
-    ###	foreach f $Draw_Groups($h) {
-    ###		QARebuild $f
-    ###	}
-    ###}
-
-catch {source $env(CSF_DrawPluginQADefaults)/QARebuildCommands}
-}
\ No newline at end of file
diff --git a/src/DrawResources/DrawDefault b/src/DrawResources/DrawDefault
index 72651dc..cfcfde4 100644
--- a/src/DrawResources/DrawDefault
+++ b/src/DrawResources/DrawDefault
@@ -1,9 +1,14 @@
+# This script is to be executed automatically at DRAWEXE start.
+#
+# For that to happen, either environment DRAWDEFAULT should be set pointing
+# to this file, or CASROOT variable should be set, so that the script is
+# found as $CASROOT/src/DrawResources/DrawDefault
+
+# indicate that DRAW is interactive environment
 set tcl_interactive 1
-set tcl_precision 17
 
-if [info exists library] {
-  source [file join $library init.tcl]
-}
+# define location of standard DRAW scripts; normally it is 
+# $CASROOT/src/DrawResources
 set dir ""
 if { [info exists env(DRAWHOME) ] } { 
   set dir $env(DRAWHOME)  
@@ -11,18 +16,17 @@ if { [info exists env(DRAWHOME) ] } {
   set dir [file dirname [info script]]
 }
 
-# san - 02/08/2002 - In Tcl8.3 it is no longer necessary to load Tix explicitly on WNT
-#if { [info exists env(STATION)] } {
-#  if { $env(STATION) == "wnt" } {
-#    load tix8183.dll Tix
-#  }
-#}
-
-if { [file exist  $dir] } { 
-  source [file join $dir StandardCommands.tcl]
-  source [file join $dir StandardViews.tcl]
-  source [file join $dir Geometry.tcl]
+# load standard DRAW scripts
+if { [file isdirectory $dir] } { 
+  foreach script {StandardCommands.tcl Geometry.tcl StandardViews.tcl TestCommands.tcl} {
+    if [file exist [file join $dir $script]] {
+      source [file join $dir $script]
+    } else {
+      puts "Warning: could not find command file $script"
+    }
+  }
 
+  # and TK extensions
   set stationname $tcl_platform(platform)
   if [info exists tk_version] {
     source [file join $dir DrawTK.tcl]
@@ -31,8 +35,71 @@ if { [file exist  $dir] } {
       wm iconbitmap . -default [file join $dir lamp.ico]
     }
   }
+} else {
+  puts "Warning: could not find DRAW directory"
+}
+
+# set default testing environment
+if { [info exists env(CASROOT)] && [file isdirectory $env(CASROOT)/tests] } {
+    if { ! [info exists env(CSF_TestScriptsPath)] } {
+        set env(CSF_TestScriptsPath) $env(CASROOT)/tests
+    } else {
+        set env(CSF_TestScriptsPath) $env(CSF_TestScriptsPath)[_path_separator]$env(CASROOT)/tests
+    }
+    if { ! [info exists env(CSF_TestDataPath)] } {
+        set env(CSF_TestDataPath) $env(CASROOT)/data
+    } else {
+        set env(CSF_TestDataPath) $env(CSF_TestDataPath)[_path_separator]$env(CASROOT)/data
+    }
+}
 
-  if { [ file readable [ file join $dir DrawAppliInit ] ] } {
-    source [file join $dir DrawAppliInit ]
+# load application-defined initialization script, which is expected to 
+# be found either in the file pointed by environment variable CSF_DrawAppliInit,
+# or in the file DrawAppliInit in the current directory
+set draw_appli_init_file DrawAppliInit
+if { [info exists env(CSF_DrawAppliInit)] } {
+  set draw_appli_init_file $env(CSF_DrawAppliInit)
+} 
+if { [file readable $draw_appli_init_file] } {
+  if { [catch {source $draw_appli_init_file} res] } {
+    puts "Warning: problem while loading file $draw_appli_init_file: $res"
   }
 } 
+
+# Temporary: load specific QA commands and handlers
+if {[array get env QA_DUMP] != "" && $env(QA_DUMP) == "1"} {
+    set env(CSF_DrawPluginQADefaults) $env(CASROOT)/src/DrawResources/.
+    catch {pload FULL}
+    catch {pload -DrawPluginProducts OMF CANONICALRECOGNITION EMESH PARASOLID DXF SAT }
+    catch {pload QAcommands}
+    catch {source $env(CSF_DrawPluginQADefaults)/QARebuildCommands}
+}
+
+# on Windows, set special handler to update automatically environment variables
+# in C subsystem when Tcl environment changes (see Mantis issue #23197)
+if { $tcl_platform(platform) == "windows" && ! [catch {dgetenv PATH} res] } {
+    proc _update_c_env {envenv var op} { 
+        global env
+        if { $op == "unset" } {
+            if { $var != "" } {
+                dsetenv $var
+            } else {
+	        #"array get env varname" command calls _update_c_env with op="unset" and var=""
+		#It leads to detach of trace from env array
+                trace add variable env array _update_c_env
+                trace add variable env read  _update_c_env
+                trace add variable env write _update_c_env
+                trace add variable env unset _update_c_env
+            }
+        } elseif { $op == "write" } {
+            dsetenv $var $env($var)
+        } elseif { $op == "read" } {
+            return dgetenv $var
+        }
+    }
+    #Execute "trace add ..." block from _update_c_env proc
+    _update_c_env env "" "unset"
+}
+
+# silent return from the script
+return
diff --git a/src/DrawResources/FILES b/src/DrawResources/FILES
index eebad74..5ffdb2f 100644
--- a/src/DrawResources/FILES
+++ b/src/DrawResources/FILES
@@ -1,4 +1,3 @@
-srcinc:::demo.tcl
 srcinc:::BuildWorkbench.tcl
 srcinc:::Tests.tcl
 srcinc:::Consultation.tcl
@@ -6,7 +5,6 @@ srcinc:::CURVES.tcl
 srcinc:::Documentation.tcl
 srcinc:::DrawTK.tcl
 srcinc:::Geometry.tcl
-srcinc:::WOKcomplement.tcl
 srcinc:::InitEnvironment.tcl
 srcinc:::PROFIL.tcl
 srcinc:::StandardCommands.tcl
@@ -27,16 +25,9 @@ srcinc:::DrawDefault
 srcinc:::TestDraw.cxx
 srcinc:::Filtre.c
 srcinc:::DIFF.c
-srcinc:::demo
-srcinc:::demo.bat
 srcinc:::lamp.ico
 srcinc:::DrawPlugin
-srcinc:::ModelingDemo.tcl
-srcinc:::DataExchangeDemo.tcl
-srcinc:::wing.brep
-srcinc:::VisualizationDemo.tcl
-srcinc:::OCAFDemo.tcl
 srcinc:::TKTopTest.tcl
 srcinc:::dftree.tcl
 srcinc:::QARebuildCommands
-srcinc:::DrawAppliInit
+srcinc:::TestCommands.tcl
diff --git a/src/DrawResources/ModelingDemo.tcl b/src/DrawResources/ModelingDemo.tcl
deleted file mode 100644
index ffb5a7e..0000000
--- a/src/DrawResources/ModelingDemo.tcl
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright (c) 1999-2012 OPEN CASCADE SAS
-#
-# The content of this file is subject to the Open CASCADE Technology Public
-# License Version 6.5 (the "License"). You may not use the content of this file
-# except in compliance with the License. Please obtain a copy of the License
-# at http://www.opencascade.org and read it completely before using this file.
-#
-# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-#
-# The Original Code and all software distributed under the License is
-# distributed on an "AS IS" basis, without warranty of any kind, and the
-# Initial Developer hereby disclaims all such warranties, including without
-# limitation, any warranties of merchantability, fitness for a particular
-# purpose or non-infringement. Please see the License for the specific terms
-# and conditions governing the rights and limitations under the License.
-
-
-set stationname $tcl_platform(platform)
-if { ${stationname} == "windows" } {
-   proc winfo { aTest aWindow } { return False }
-}
-
-
-proc sage { a} {
-    global stationname 
-    if { ${stationname} != "windows" } {
-	
-	if { ![winfo exists .h ] } {
-	    toplevel .h -bg azure3
-	    wm title .h "INFO TEST HARNESS"
-	    wm geometry .h +320+20
-	    
-	} 
-	if { [winfo exists .h.m ] } {
-	    set astring [.h.m cget  -text]
-	    set newstring "${astring} \n $a"
-	    .h.m configure -text $newstring 
-	    puts $a
-	} else {
-	    message .h.m -justify left -bg azure2 -width 13c -relief ridge -bd 4\
-		    -text $a
-	    puts $a
-	} 
-	pack .h.m
-	update
-   }
-}
-
-
-smallview
-if { [winfo exists .h ] } {
-    destroy .h
-}
-sage " Creating a box"
-sage "    box  b -10 -10 -10 20 20 20"
-sage " "
-box b -10 -10 -10 20 20 20
-fit
-nexplode b f
-erase b
-sage " Draft of two lateral faces "
-sage "    depouille r b  0 0  -1 b_6 -15 10 -10 10  0 0 -1 "
-sage "    nexplode r f"
-sage "    depouille rr r  0 0 -1   r_1 -15 -10 -10 10  0 0 -1 "
-sage " "
-depouille r b  0 0  -1 b_6 -15 10 -10 10  0 0 -1 
-clear
-nexplode r f
-depouille rr r  0 0 -1   r_1 -15 -10 -10 10  0 0 -1 
-clear
-nexplode rr e
-sage " Fillet on four lateral edges, then on the top and bottom edges  "
-sage "    nexplode rr e"
-sage "    blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11"
-sage "    nexplode result e"
-sage "    blend result result 2 result_11 3 result_12"
-sage " "
-blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11
-erase rr
-erase result
-nexplode result e
-blend result result 2 result_11 3 result_12 
-clear
-nexplode result f
-sage " Creating a profile on the top face "
-sage "    nexplode result f"
-sage "    profile p  S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
-"
-sage " "
-profile p  S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
-sage " Creating a prism"
-sage "    prism rr p 0 0 20"
-sage " "
-prism rr p 0 0 20
-fit
-sage " Fusion of this prism with the original part "
-sage "    fuse result rr result"
-sage " "
-fuse result rr result
-donl result
-nexplode result f
-erase result
-fit
-
-sage " Opening the top face"
-sage "    offsetshape r result -1 0.0001 result_17"
-sage " "
-
-nexplode result f
-offsetshape r result -1 0.0001 result_17
-sage " Creating a cylinder and positionning it"
-sage "    pcylinder cyl 2 300"
-sage "    trotate cyl cyl 0 0 0  1 0 0 45"
-sage "    ttranslate cyl cyl 0 7.5 0"
-sage " "
-pcylinder cyl 2 30
-trotate cyl cyl 0 0 0  1 0 0 45
-ttranslate cyl cyl 0 7.5 0
-sage " Display the Shape on Hidden Line Mode "
-sage "   hlr hid r"
-sage ""
-donl r
-hlr hid r
-sage " Display the Shape on HLR Mode "
-sage "   hlr nohid r"
-sage "   hlr hlr r"
-sage ""
-donl r
-hlr nohid r
-hlr hlr r
-sage "Demo completed"
-
diff --git a/src/DrawResources/OCAFDemo.tcl b/src/DrawResources/OCAFDemo.tcl
deleted file mode 100644
index d91285f..0000000
--- a/src/DrawResources/OCAFDemo.tcl
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright (c) 1999-2012 OPEN CASCADE SAS
-#
-# The content of this file is subject to the Open CASCADE Technology Public
-# License Version 6.5 (the "License"). You may not use the content of this file
-# except in compliance with the License. Please obtain a copy of the License
-# at http://www.opencascade.org and read it completely before using this file.
-#
-# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-#
-# The Original Code and all software distributed under the License is
-# distributed on an "AS IS" basis, without warranty of any kind, and the
-# Initial Developer hereby disclaims all such warranties, including without
-# limitation, any warranties of merchantability, fitness for a particular
-# purpose or non-infringement. Please see the License for the specific terms
-# and conditions governing the rights and limitations under the License.
-
-# first , Opening Document write on Unix 
-puts "First , Opening Document write on Unix "
-set Data [file join [file dirname [file dirname [info script]] TCAF]
-
-set DocName [file join ${Data} FileUnix.std]
-if [ file exists ${DocName}  ] {
-    
-    Open ${DocName} Unix
-    DumpDocument Unix
-} else {
-    puts "  ${DocName} does not exist "
-}
-
-# first , Opening Document write on WindowsNT
-puts ""
-puts "now , Opening Document write on WindowsNT "
-puts ""
-
-set DocName [file join ${Data} FileWNT.std]
-puts "trying to Open : ${DocName}  "
-if  [ file exists  ${DocName} ] {
-    catch {  Open ${DocName} WNT } filesta
-    if { ${filesta} == "" } { 
-	DumpDocument WNT
-    } else {
-	puts " Problem when trying to read ${DocName}  ==> $filesta "
-    }
-} else {
-    puts "  ${DocName} does not exist "
-}
-puts "List the Document in the Session :"
-ListDocuments
-
-puts ""
-puts "now , We create  new Document "
-puts ""
-NewDocument New MDTV-Standard
-UndoLimit New 5
-NewCommand New
-
-Label   New  0:20
-SetReal New  0:20 .12345
-
-
-set newName /tmp/New.std
-if { [info exists env(TEMP)] } {
-    set newName $env(TEMP)/New.std
-}
-SaveAs New  ${newName}
-puts " "
-puts "List the Document in the Session :"
-ListDocuments
-puts " "
-puts "We close it"
-Close  New
-puts "List the Document in the Session :"
-ListDocuments
-
-puts "Verify if the new Document is saved : ${newName} "
-if   [file exists ${newName}] { 
-   puts " ... exists : Yes "
-   puts " ... size   : [file size ${newName}]"
-
-   puts " "
-   puts " We try to read it :"
-   Open ${newName} ReadDoc
-   DumpDocument ReadDoc
-    puts "List the Document in the Session :"
-    ListDocuments
- 
-}  else {
-   puts " ... exists : No "
-}
-puts " "
-puts " "
-puts "end "
diff --git a/src/DrawResources/SURFACES.tcl b/src/DrawResources/SURFACES.tcl
index 176e5a9..d15b5e4 100644
--- a/src/DrawResources/SURFACES.tcl
+++ b/src/DrawResources/SURFACES.tcl
@@ -15,6 +15,8 @@
 # purpose or non-infringement. Please see the License for the specific terms
 # and conditions governing the rights and limitations under the License.
 
+if { [info commands addmenu] == "" } { return }
+
 proc dialanasurf {command sname args} {
     set com "dialbox $command name $sname origin {0 0 0} normal {0 0 1} xdir {1 0 0} "
     foreach l $args {append com " $l"}
diff --git a/src/DrawResources/StandardCommands.tcl b/src/DrawResources/StandardCommands.tcl
index 45a72fb..7a4f654 100644
--- a/src/DrawResources/StandardCommands.tcl
+++ b/src/DrawResources/StandardCommands.tcl
@@ -96,17 +96,16 @@ proc getsourcefile {{command ""}} {
 
     global Draw_Helps Draw_Groups Draw_Files
 
+    set out {}
     if {$command == ""} {
 
 	# help general
 	foreach h [lsort [array names Draw_Groups]] {
-	    puts ""
-	    puts ""
-	    puts $h
+	    lappend out "" "" "$h"
 	    set i 0
 	    foreach f [lsort $Draw_Groups($h)] {
 		if {$i == 0} {
-		    puts "  "
+		    lappend out ""
 		}
 		incr i
 #
@@ -114,18 +113,7 @@ proc getsourcefile {{command ""}} {
 #
 		foreach command_that_has_file [array names Draw_Files] {
 		    if {($command_that_has_file == $f)} {
-#
-#  compute the length of the string to have the right spacing
-#  with tabs
-#
-			set ll [string length $f] 
-			if {($ll >= 1) && ($ll < 8)} {
-			    puts "$f\t\t:  $Draw_Files($f) "
-			}
-			if {($ll >= 8)} {
-			    puts "$f\t:  $Draw_Files($f) "
-			}
-			 
+			lappend out [format {%-20s %s} $f $Draw_Files($f)]
 		    }
 		}
 	    }
@@ -136,17 +124,12 @@ proc getsourcefile {{command ""}} {
 	append command "*"
 	foreach f [lsort [array names Draw_Files]] {
 	    if {[string match $command $f]} {
-		puts -nonewline $f
-		for {set j [string length $f]} {$j < 15} {incr j} {
-		    puts -nonewline " "
-		}
-
-		puts "     $Draw_Files($f)"
+                lappend out [format {%-20s %s} $f $Draw_Files($f)]
 	    }
 	}
 	
     } 
-    flush stdout
+    return [join $out "\n"]
 }
 
 help getsourcefile {getsourcefile, or getsourcefile command } {DRAW General Commands}
@@ -298,7 +281,10 @@ proc save {name {file ""}} {
 help save {save variable [filename]} "DRAW Variables management"
 
 proc restore {file {name ""}} {
-    if {$name == ""} {set name $file}
+    if {$name == ""} {
+        # if name is not given explicitly, use name of the file w/o extension
+        set name [file rootname [file tail $file]]
+    }
     global Draw_DataDir
     uplevel #0 "brestore [file join $Draw_DataDir $file ] $name"
     return $name
diff --git a/src/DrawResources/TestCommands.tcl b/src/DrawResources/TestCommands.tcl
new file mode 100644
index 0000000..7aeaa81
--- /dev/null
+++ b/src/DrawResources/TestCommands.tcl
@@ -0,0 +1,1880 @@
+# Copyright (c) 2012 OPEN CASCADE SAS
+#
+# The content of this file is subject to the Open CASCADE Technology Public
+# License Version 6.5 (the "License"). You may not use the content of this file
+# except in compliance with the License. Please obtain a copy of the License
+# at http://www.opencascade.org and read it completely before using this file.
+#
+# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+#
+# The Original Code and all software distributed under the License is
+# distributed on an "AS IS" basis, without warranty of any kind, and the
+# Initial Developer hereby disclaims all such warranties, including without
+# limitation, any warranties of merchantability, fitness for a particular
+# purpose or non-infringement. Please see the License for the specific terms
+# and conditions governing the rights and limitations under the License.
+
+############################################################################
+# This file defines scripts for execution of OCCT tests.
+# It should be loaded automatically when DRAW is started, and provides
+# top-level commands starting with 'test'. Type 'help test' to get their
+# synopsys.
+# See OCCT Tests User Guide for description of the test system.
+#
+# Note: procedures with names starting with underscore are for internal use 
+# inside the test system.
+############################################################################
+
+# Default verbose level for command _run_test
+set _tests_verbose 0
+
+# regexp for parsing test case results in summary log
+set _test_case_regexp {^CASE\s+([\w.-]+)\s+([\w.-]+)\s+([\w.-]+)\s*:\s*([\w]+)(.*)}
+
+# Basic command to run indicated test case in DRAW
+help test {
+  Run specified test case
+  Use: test group grid casename [echo=0]
+  - If echo is set to 0 (default), log is stored in memory and only summary
+    is output (the log can be obtained with command "dlog get")
+  - If echo is set to 1 or "-echo", all commands and results are echoed 
+    immediately, but log is not saved and summary is not produced
+}
+proc test {group grid casename {echo 0}} {
+    # get test case paths (will raise error if input is invalid)
+    _get_test $group $grid $casename dir gridname casefile
+
+    # if echo specified as "-echo", convert it to bool
+    if { "$echo" == "-echo" } { set echo t }
+
+    # run test
+    uplevel _run_test $dir $group $gridname $casefile $echo
+
+    # check log
+    if { ! $echo } {
+        _check_log $dir $group $gridname $casename [dlog get]
+    }
+
+    return
+}
+
+# Basic command to run indicated test case in DRAW
+help testgrid {
+  Run all tests, or specified group, or one grid
+  Use: testgrid [group [grid]] [options...]
+  Allowed options are:
+  -parallel N: run N parallel processes (default is number of CPUs, 0 to disable)
+  -refresh N: save summary logs every N seconds (default 60, minimal 1, 0 to disable)
+  -outdir dirname: set log directory (should be empty or non-existing)
+  -overwrite: force writing logs in existing non-empty directory
+  -xml filename: write XML report for Jenkins (in JUnit-like format)
+}
+proc testgrid {args} {
+    global env tcl_platform _tests_verbose
+
+    ######################################################
+    # check arguments
+    ######################################################
+
+    # check that environment variable defining paths to test scripts is defined
+    if { ! [info exists env(CSF_TestScriptsPath)] || 
+         [llength $env(CSF_TestScriptsPath)] <= 0 } {
+        error "Error: Environment variable CSF_TestScriptsPath is not defined"
+    }
+
+    # treat options
+    set parallel [_get_nb_cpus]
+    set refresh 60
+    set logdir ""
+    set overwrite 0
+    set xmlfile ""
+    for {set narg 0} {$narg < [llength $args]} {incr narg} {
+	set arg [lindex $args $narg]
+
+	# parallel execution
+	if { $arg == "-parallel" } {
+	    incr narg
+	    if { $narg < [llength $args] && ! [regexp {^-} [lindex $args $narg]] } { 
+		set parallel [expr [lindex $args $narg]]
+	    } else {
+		error "Option -parallel requires argument"
+	    }
+	    continue
+	}
+
+	# refresh logs time
+	if { $arg == "-refresh" } {
+	    incr narg
+	    if { $narg < [llength $args] && ! [regexp {^-} [lindex $args $narg]] } { 
+		set refresh [expr [lindex $args $narg]]
+	    } else {
+		error "Option -refresh requires argument"
+	    }
+	    continue
+	}
+
+	# output directory
+	if { $arg == "-outdir" } {
+	    incr narg
+	    if { $narg < [llength $args] && ! [regexp {^-} [lindex $args $narg]] } { 
+		set logdir [lindex $args $narg]
+	    } else {
+		error "Option -outdir requires argument"
+	    }
+	    continue
+	}
+
+	# allow overwrite logs 
+	if { $arg == "-overwrite" } {
+	    set overwrite 1
+	    continue
+	}
+
+	# refresh logs time
+	if { $arg == "-xml" } {
+	    incr narg
+	    if { $narg < [llength $args] && ! [regexp {^-} [lindex $args $narg]] } { 
+		set xmlfile [lindex $args $narg]
+	    }
+	    if { $xmlfile == "" } {
+		set xmlfile TESTS-summary.xml
+	    }
+	    continue
+	}
+
+	# unsupported option
+	if { [regexp {^-} $arg] } {
+	    error "Error: unsupported option \"$arg\""
+	}
+
+	# treat arguments not recognized as options as group and grid names
+	if { ! [info exists groupname] } {
+	    set groupname $arg
+	} elseif { ! [info exists gridname] } {
+	    set gridname $arg
+	} else {
+	    error "Error: cannot interpret argument $narg ($arg): both group and grid names are already defined by previous args!"
+	}
+    }
+
+    # check that target log directory is empty or does not exist
+    set logdir [file normalize [string trim $logdir]]
+    if { $logdir == "" } {
+	# if specified logdir is empty string, generate unique name like 
+        # results_<branch>_<timestamp>
+        set prefix "results"
+        if { ! [catch {exec git branch} gitout] &&
+             [regexp {[*] ([\w]+)} $gitout res branch] } {
+            set prefix "${prefix}_$branch"
+        }
+	set logdir "${prefix}_[clock format [clock seconds] -format {%Y-%m-%dT%H%M}]"
+	set logdir [file normalize $logdir]
+    }
+    if { [file isdirectory $logdir] && ! $overwrite && ! [catch {glob -directory $logdir *}] } {
+	error "Error: Specified log directory \"$logdir\" is not empty; please clean it before running tests"
+    } 
+    if { [catch {file mkdir $logdir}] || ! [file writable $logdir] } {
+	error "Error: Cannot create directory \"$logdir\", or it is not writable"
+    }
+
+    ######################################################
+    # prepare list of tests to be performed
+    ######################################################
+
+    # list of tests, each defined by a list of:
+    # test scripts directory
+    # group (subfolder) name
+    # grid (subfolder) name
+    # test case name
+    # path to test case file
+    set tests_list {}
+
+    # iterate by all script paths
+    foreach dir [_split_path $env(CSF_TestScriptsPath)] {
+	# protection against empty paths
+	set dir [string trim $dir]
+	if { $dir == "" } { continue }
+
+	if { $_tests_verbose > 0 } { _log_and_puts log "Examining tests directory $dir" }
+
+        # check that directory exists
+        if { ! [file isdirectory $dir] } {
+            _log_and_puts log "Warning: directory $dir listed in CSF_TestScriptsPath does not exist, skipped"
+	    continue
+        }
+
+        # if test group is specified, check that directory with given name exists in this dir
+        # if not, continue to the next test dir
+        if { [info exists groupname] && $groupname != "" } {
+	    if { [file isdirectory $dir/$groupname] } { 
+		set groups $groupname
+	    } else {
+		continue 
+	    }
+	} else {
+	    # else search all directories in the current dir
+	    if [catch {glob -directory $dir -tail -types d *} groups] { continue }
+	}
+
+	# iterate by groups
+	if { $_tests_verbose > 0 } { _log_and_puts log "Groups to be executed: $groups" }
+	foreach group [lsort -dictionary $groups] {
+	    if { $_tests_verbose > 0 } { _log_and_puts log "Examining group directory $group" }
+
+	    # file grids.list must exist: it defines sequence of grids in the group
+            if { ! [file exists $dir/$group/grids.list] } {
+		_log_and_puts log "Warning: directory $dir/$group does not contain file grids.list, skipped"
+		continue
+	    }
+
+	    # read grids.list file and make a list of grids to be executed
+	    set gridlist {}
+	    set fd [open $dir/$group/grids.list]
+	    set nline 0
+	    while { [gets $fd line] >= 0 } {
+		incr nline
+
+		# skip comments and empty lines
+		if { [regexp "\[ \t\]*\#.*" $line] } { continue }
+		if { [string trim $line] == "" } { continue }
+
+		# get grid id and name
+		if { ! [regexp "^\(\[0-9\]+\)\[ \t\]*\(\[A-Za-z0-9_.-\]+\)\$" $line res gridid grid] } {
+		    _log_and_puts log "Warning: cannot recognize line $nline in file $dir/$group/grids.list as \"gridid gridname\"; ignored"
+		    continue
+		}
+		
+		# if specific grid is requested, check that it is present; otherwise make complete list
+		if { ! [info exists gridname] || $gridname == "" || $gridname == $gridid || $gridname == $grid } {
+		    lappend gridlist $grid
+		}
+	    }
+	    close $fd
+	    
+	    # iterate by all grids
+	    foreach grid $gridlist {
+
+		# check if this grid is aliased to another one
+		set griddir $dir/$group/$grid
+		if { [file exists $griddir/cases.list] } {
+		    set fd [open $griddir/cases.list]
+		    if { [gets $fd line] >= 0 } {
+			set griddir [file normalize $dir/$group/$grid/[string trim $line]]
+		    }
+		    close $fd
+		}
+
+		# check if grid directory actually exists
+		if { ! [file isdirectory $griddir] } { 
+		    _log_and_puts log "Error: tests directory for grid $grid ($griddir) is missing; skipped"
+		    continue 
+		}
+
+		# create directory for logging test results
+		if { $logdir != "" } { file mkdir $logdir/$group/$grid }
+
+		# iterate by all tests in the grid directory
+		if { [catch {glob -directory $griddir -type f *} testfiles] } { continue }
+		foreach casefile [lsort -dictionary $testfiles] {
+		    # filter out begin and end files
+		    set casename [file tail $casefile]
+		    if { $casename == "begin" || $casename == "end" } { continue }
+
+		    lappend tests_list [list $dir $group $grid $casename $casefile]
+		}
+	    }
+	}
+    }
+    if { [llength $tests_list] < 1 } {
+	error "Error: no tests are found, check you input arguments and variable CSF_TestScriptsPath!"
+    }
+
+    ######################################################
+    # run tests
+    ######################################################
+    
+    # log command arguments and environment
+    set log "Command: testgrid $args\nHost: [info hostname]\nStarted on: [clock format [clock seconds] -format {%Y-%m-%d %H:%M:%S}]\n"
+    set log "$log\nEnvironment:\n"
+    foreach envar [array names env] {
+	set log "$log$envar=\"$env($envar)\"\n"
+    }
+    set log "$log\n"
+
+    set refresh_timer [clock seconds]
+    uplevel dchrono _timer reset
+    uplevel dchrono _timer start
+
+    # if parallel execution is requested, allocate thread pool
+    if { $parallel > 0 } {
+	if { ! [info exists tcl_platform(threaded)] || [catch {package require Thread}] } {
+	    _log_and_puts log "Warning: Tcl package Thread is not available, running in sequential mode"
+	    set parallel 0
+	} else {
+	    set worker [tpool::create -minworkers $parallel -maxworkers $parallel]
+	    # suspend the pool until all jobs are posted, to prevent blocking of the process
+	    # of starting / processing jobs by running threads
+	    catch {tpool::suspend $worker}
+	    if { $_tests_verbose > 0 } { _log_and_puts log "Executing tests in (up to) $parallel threads" }
+	}
+    }
+
+    # start test cases
+    foreach test_def $tests_list {
+	set dir       [lindex $test_def 0]
+	set group     [lindex $test_def 1]
+	set grid      [lindex $test_def 2]
+	set casename  [lindex $test_def 3]
+	set casefile  [lindex $test_def 4]
+
+	# command to set tests for generation of image in results directory
+	set imgdir_cmd ""
+	if { $logdir != "" } { set imgdir_cmd "set imagedir $logdir/$group/$grid" }
+
+	# prepare command file for running test case in separate instance of DRAW
+	set fd_cmd [open $logdir/$group/$grid/${casename}.tcl w]
+	puts $fd_cmd "$imgdir_cmd"
+	puts $fd_cmd "set test_image $casename"
+	puts $fd_cmd "_run_test $dir $group $grid $casefile t"
+
+	# use dlog command to obtain complete output of the test when it is absent (i.e. since OCCT 6.6.0)
+	# note: this is not needed if echo is set to 1 in call to _run_test above
+	if { ! [catch {dlog get}] } {
+	    puts $fd_cmd "puts \[dlog get\]"
+	} else {
+	    # else try to use old-style QA_ variables to get more output...
+	    set env(QA_DUMP) 1
+	    set env(QA_DUP) 1
+	    set env(QA_print_command) 1
+	}
+
+	# final 'exit' is needed when running on Linux under VirtualGl
+	puts $fd_cmd "exit"
+	close $fd_cmd
+
+        # commant to run DRAW with a command file;
+        # note that empty string is passed as standard input to avoid possible 
+        # hang-ups due to waiting for stdin of the launching process
+	set command "exec <<{} DRAWEXE -f $logdir/$group/$grid/${casename}.tcl"
+
+	# alternative method to run without temporary file; disabled as it needs too many backslashes
+#	else {
+#	    set command "exec <<\"\" DRAWEXE -c $imgdir_cmd\\\; set test_image $casename\\\; \
+#		         _run_test $dir $group $grid $casefile\\\; \
+#		         puts \\\[dlog get\\\]\\\; exit"
+#	}
+
+	# run test case, either in parallel or sequentially
+	if { $parallel > 0 } {
+	    # parallel execution
+	    set job [tpool::post -nowait $worker "catch \"$command\" output; return \$output"]
+	    set job_def($job) [list $logdir $dir $group $grid $casename]
+	} else {
+	    # sequential execution
+	    catch {eval $command} output
+	    _log_test_case $output $logdir $dir $group $grid $casename log
+
+	    # update summary log with requested period
+	    if { $logdir != "" && $refresh > 0 && [expr [clock seconds] - $refresh_timer > $refresh] } {
+		# update and dump summary
+		_log_summarize $logdir $log
+		set refresh_timer [clock seconds]
+	    }
+	}
+    }
+
+    # get results of started threads
+    if { $parallel > 0 } {
+	catch {tpool::resume $worker}
+	while { [llength [array names job_def]] > 0 } {
+	    foreach job [tpool::wait $worker [array names job_def]] {
+		eval _log_test_case \[tpool::get $worker $job\] $job_def($job) log
+		unset job_def($job)
+	    }
+
+	    # update summary log with requested period
+	    if { $logdir != "" && $refresh > 0 && [clock seconds] > $refresh_timer + $refresh } {
+		_log_summarize $logdir $log
+		set refresh_timer [clock seconds]
+	    }
+	}
+	# release thread pool
+	tpool::release $worker
+    }
+
+    uplevel dchrono _timer stop
+    set time [lindex [split [uplevel dchrono _timer show] "\n"] 0]
+
+    ######################################################
+    # output summary logs and exit
+    ######################################################
+
+    _log_summarize $logdir $log $time
+    if { $logdir != "" } {
+	puts "Detailed logs are saved in $logdir"
+    }
+    if { $logdir != "" && $xmlfile != "" } {
+	# XML output file is assumed relative to log dir unless it is absolute
+	if { [ file pathtype $xmlfile] == "relative" } {
+	    set xmlfile [file normalize $logdir/$xmlfile]
+	}
+	_log_xml_summary $logdir $xmlfile $log 0
+	puts "XML summary is saved to $xmlfile"
+    }
+
+    return
+}
+
+# Procedure to regenerate summary log from logs of test cases
+help testsummarize {
+  Regenerate summary log in the test directory from logs of test cases.
+  This can be necessary if test grids are executed separately (e.g. on
+  different stations) or some grids have been re-executed.
+  Use: testsummarize dir
+}
+proc testsummarize {dir} {
+    global _test_case_regexp
+
+    if { ! [file isdirectory $dir] } {
+	error "Error: \"$dir\" is not a directory"
+    }
+
+    # get summary statements from all test cases in one log
+    set log ""
+
+    # to avoid huge listing of logs, first find all subdirectories and iterate
+    # by them, parsing log files in each subdirectory independently 
+    foreach grid [glob -directory $dir -types d -tails */*] {
+        foreach caselog [glob -nocomplain -directory [file join $dir $grid] -types f -tails *.log] {
+            set file [file join $dir $grid $caselog]
+            set nbfound 0
+            set fd [open $file r]
+	    while { [gets $fd line] >= 0 } {
+	        if { [regexp $_test_case_regexp $line res grp grd cas status message] } {
+                    if { "[file join $grid $caselog]" != "[file join $grp $grd ${cas}.log]" } { 
+                        puts "Error: $file contains status line for another test case ($line)"
+                    }
+	            set log "$log$line\n"
+	            incr nbfound
+	        }
+	    }
+            close $fd
+
+            if { $nbfound != 1 } { 
+                puts "Error: $file contains $nbfound status lines, expected 1"
+            }
+        }
+    }
+
+    _log_summarize $dir $log "Summary regenerated from logs at [clock format [clock seconds]]"
+    return
+}
+
+# Procedure to compare results of two runs of test cases
+help testdiff {
+  Compare results of two executions of tests (CPU times, ...)
+  Use: testdiff dir1 dir2 [groupname [gridname]] [options...]
+  Where dir1 and dir2 are directories containing logs of two test runs.
+  Allowed options are:
+  -save filename: save resulting log in specified file (default name is
+                  \$dir1/diff-\$dir2.log); HTML log is saved with same name
+                  and extension .html
+  -status {same|ok|all}: filter cases for comparing by their status:
+          same - only cases with same status are compared (default)
+          ok   - only cases with OK status in both logs are compared
+          all  - results are compared regardless of status
+  -verbose level: 
+          1 - output only differences 
+          2 - output also list of logs and directories present in one of dirs only
+          3 - (default) output also progress messages 
+}
+proc testdiff {dir1 dir2 args} {
+    if { "$dir1" == "$dir2" } {
+	error "Input directories are the same"
+    }
+
+    ######################################################
+    # check arguments
+    ######################################################
+
+    # treat options
+    set logfile [file join $dir1 "diff-[file tail $dir2].log"]
+    set basename ""
+    set status "same"
+    set verbose 3
+    for {set narg 0} {$narg < [llength $args]} {incr narg} {
+	set arg [lindex $args $narg]
+
+	# log file name
+	if { $arg == "-save" } {
+	    incr narg
+	    if { $narg < [llength $args] && ! [regexp {^-} [lindex $args $narg]] } { 
+		set logfile [lindex $args $narg]
+	    } else {
+		error "Error: Option -save must be followed by log file name"
+	    } 
+	    continue
+	}
+
+	# status filter
+	if { $arg == "-status" } {
+	    incr narg
+	    if { $narg < [llength $args] && ! [regexp {^-} [lindex $args $narg]] } { 
+		set status [lindex $args $narg]
+            } else { set status "" }
+	    if { "$status" != "same" && "$status" != "all" && "$status" != "ok" } {
+		error "Error: Option -status must be followed by one of \"same\", \"all\", or \"ok\""
+	    }
+	    continue
+	}
+
+	# verbose level
+	if { $arg == "-verbose" } {
+	    incr narg
+	    if { $narg < [llength $args] && ! [regexp {^-} [lindex $args $narg]] } { 
+		set verbose [expr [lindex $args $narg]]
+	    } else {
+		error "Error: Option -verbose must be followed by integer verbose level"
+	    }
+	    continue
+	}
+
+	if { [regexp {^-} $arg] } {
+	    error "Error: unsupported option \"$arg\""
+	}
+
+        # non-option arguments form a subdirectory path
+	set basename [file join $basename $arg]
+    }
+
+    # run diff procedure (recursive)
+    _test_diff $dir1 $dir2 $basename $status $verbose log
+
+    # save result to log file
+    if { "$logfile" != "" } {
+        _log_save $logfile $log
+        _log_html_diff "[file rootname $logfile].html" $log $dir1 $dir2
+        puts "Log is saved to $logfile (and .html)"
+    }
+
+    return
+}
+
+# Procedure to check data file before adding it to repository
+help testfile {
+  Check data file and prepare it for putting to test data files repository.
+  Use: testfile [filelist]
+
+  Will report if:
+  - data file (non-binary) is in DOS encoding (CR/LF)
+  - same data file (with same or another name) already exists in the repository
+  - another file with the same name already exists 
+  Note that names are assumed to be case-insensitive (for Windows).
+
+  Unless the file is already in the repository, tries to load it, reports
+  the recognized file format, file size, number of faces and edges in the 
+  loaded shape (if any), and makes snapshot (in the subdirectory tmp).
+  Finally it advises whether the file should be put to public section of the 
+  repository.
+}
+proc testfile {filelist} {
+    global env
+
+    # check that CSF_TestDataPath is defined
+    if { ! [info exists env(CSF_TestDataPath)] } {
+        error "Environment variable CSF_TestDataPath must be defined!"
+    }
+
+    # build registry of existing data files (name -> path) and (size -> path)
+    puts "Checking available test data files..."
+    foreach dir [_split_path $env(CSF_TestDataPath)] {
+        while {[llength $dir] != 0} {
+            set curr [lindex $dir 0]
+            set dir [lrange $dir 1 end]
+            eval lappend dir [glob -nocomplain -directory $curr -type d *]
+            foreach file [glob -nocomplain -directory $curr -type f *] {
+                set name [file tail $file]
+                set name_lower [string tolower $name]
+
+                # check that the file is not in DOS encoding
+                if { [_check_dos_encoding $file] } {
+                    puts "Warning: file $file is in DOS encoding; was this intended?"
+                }
+                _check_file_format $file
+
+                # check if file with the same name is present twice or more
+                if { [info exists names($name_lower)] } {
+                    puts "Error: more than one file with name $name is present in the repository:"
+                    if { [_diff_files $file $names($name_lower)] } {
+                        puts "(files are different by content)"
+                    } else {
+                        puts "(files are same by content)"
+                    }
+                    puts "--> $file"
+                    puts "--> $names($name_lower)"
+                    continue
+                } 
+                
+                # check if file with the same content exists
+                set size [file size $file]
+                if { [info exists sizes($size)] } {
+                    foreach other $sizes($size) {
+                        if { ! [_diff_files $file $other] } {
+                            puts "Warning: two files with the same content found:"
+                            puts "--> $file"
+                            puts "--> $other"
+                        }
+                    }
+                }
+
+                # add the file to the registry
+                set names($name_lower) $file
+                lappend sizes($size) $file
+	    }
+	}
+    }
+    if { [llength $filelist] <= 0 } { return }
+
+    # check the new files
+    set has_images f
+    puts "Checking new file(s)..."
+    foreach file $filelist {
+        # check for DOS encoding
+        if { [_check_dos_encoding $file] } {
+            puts "$file: Warning: DOS encoding detected"
+        }
+
+        set name [file tail $file]
+        set name_lower [string tolower $name]
+
+        # check for presence of the file with same name
+        if { [info exists names($name_lower)] } {
+            if { [_diff_files $file $names($name_lower)] } {
+                puts "$file: Error: name is already used by existing file\n--> $names($name_lower)"
+            } else {
+                puts "$file: OK: already in the repository \n--> $names($name_lower)"
+                continue
+            }
+        }
+                
+        # check if file with the same content exists
+        set size [file size $file]
+        if { [info exists sizes($size)] } {
+            set found f
+            foreach other $sizes($size) {
+                if { ! [_diff_files $file $other] } {
+                     puts "$file: OK: the same file is already present under name [file tail $other]\n--> $other"
+                     set found t
+                     break
+                }
+            }
+            if { $found } { continue }
+        }
+
+        # try to read the file
+        set format [_check_file_format $file]
+        if { [catch {uplevel load_data_file $file $format a}] } {
+            puts "$file: Error: Cannot read as $format file"
+            continue
+        }
+
+        # get number of faces and edges
+        set edges 0
+        set faces 0
+        set nbs [uplevel nbshapes a]
+        regexp {EDGE[ \t:]*([0-9]+)} $nbs res edges
+        regexp {FACE[ \t:]*([0-9]+)} $nbs res faces
+
+        # classify; first check file size and number of faces and edges
+        if { $size < 95000 && $faces < 20 && $edges < 100 } {
+            set dir public
+        } else {
+            set dir private
+            # check if one of names of that file corresponds to typical name for 
+            # MDTV bugs or has extension .rle, this should be old model
+            if { [regexp -nocase {.*(cts|ats|pro|buc|ger|fra|usa|uki)[0-9]+.*} $name] ||
+                 [regexp -nocase {[.]rle\y} $name] } {
+                set dir old
+            }
+        }
+
+        # add stats
+        puts "$file: $format size=[expr $size / 1024] KiB, nbfaces=$faces, nbedges=$edges -> $dir"
+
+        file mkdir tmp/$dir
+
+        # make snapshot
+        pload AISV
+        uplevel vdisplay a
+        uplevel vfit
+        uplevel vzfit
+        uplevel vdump tmp/$dir/[file rootname [file tail $file]].png
+        set has_images t
+    }
+    if { $has_images } {
+        puts "Snapshots are saved in subdirectory tmp"
+    }
+}
+
+# Procedure to locate data file for test given its name.
+# The search is performed assuming that the function is called
+# from the test case script; the search order is:
+# - subdirectory "data" of the test script (grid) folder
+# - subdirectories in environment variable CSF_TestDataPath
+# - subdirectory set by datadir command
+# If file is not found, raises Tcl error.
+proc locate_data_file {filename} {
+    global env groupname gridname casename
+
+    # check if the file is located in the subdirectory data of the script dir
+    set scriptfile [info script]
+    if { $scriptfile != "" } {
+        set path [file join [file dirname $scriptfile] data $filename]
+	if { [file exists $path] } {
+	    return [file normalize $path]
+	}
+    }
+
+    # check sub-directories in paths indicated by CSF_TestDataPath
+    if { [info exists env(CSF_TestDataPath)] } {
+	foreach dir [_split_path $env(CSF_TestDataPath)] {
+	    while {[llength $dir] != 0} { 
+	        set name [lindex $dir 0]
+		set dir [lrange $dir 1 end]
+		eval lappend dir [glob -nocomplain -directory $name -type d *]
+		if { [file exists $name/$filename] } {
+		    return [file normalize $name/$filename]
+		}
+	    }
+	}
+    }
+
+    # check current datadir
+    if { [file exists [uplevel datadir]/$filename] } {
+	return [file normalize [uplevel datadir]/$filename]
+    }
+
+    # raise error
+    error [join [list "Error: file $filename could not be found" \
+		      "(should be in paths indicated by CSF_TestDataPath environment variable, " \
+                      "or in subfolder data in the script directory)"] "\n"]
+}
+
+# Internal procedure to find test case indicated by group, grid, and test case names;
+# returns:
+# - dir: path to the base directory of the tests group
+# - gridname: actual name of the grid
+# - casefile: path to the test case script 
+# if no such test is found, raises error with appropriate message
+proc _get_test {group grid casename _dir _gridname _casefile} {
+    upvar $_dir dir
+    upvar $_gridname gridname
+    upvar $_casefile casefile
+
+    global env
+ 
+    # check that environment variable defining paths to test scripts is defined
+    if { ! [info exists env(CSF_TestScriptsPath)] || 
+         [llength $env(CSF_TestScriptsPath)] <= 0 } {
+        error "Error: Environment variable CSF_TestScriptsPath is not defined"
+    }
+
+    # iterate by all script paths
+    foreach dir [_split_path $env(CSF_TestScriptsPath)] {
+	# protection against empty paths
+	set dir [string trim $dir]
+	if { $dir == "" } { continue }
+
+        # check that directory exists
+        if { ! [file isdirectory $dir] } {
+            puts "Warning: directory $dir listed in CSF_TestScriptsPath does not exist, skipped"
+	    continue
+        }
+
+        # check if test group with given name exists in this dir
+        # if not, continue to the next test dir
+        if { ! [file isdirectory $dir/$group] } { continue }
+
+        # check that grid with given name (possibly alias) exists; stop otherwise
+        set gridname $grid
+        if { ! [file isdirectory $dir/$group/$gridname] } {
+            # check if grid is named by alias rather than by actual name
+            if { [file exists $dir/$group/grids.list] } {
+                set fd [open $dir/$group/grids.list]
+                while { [gets $fd line] >= 0 } {
+                    if { [regexp "\[ \t\]*\#.*" $line] } { continue }
+                    if { [regexp "^$grid\[ \t\]*\(\[A-Za-z0-9_.-\]+\)\$" $line res gridname] } {
+                        break
+                    }
+                }
+                close $fd
+	    }
+	}
+        if { ! [file isdirectory $dir/$group/$gridname] } { continue }
+
+        # get actual file name of the script; stop if it cannot be found
+        set casefile $dir/$group/$gridname/$casename
+        if { ! [file exists $casefile] } {
+            # check if this grid is aliased to another one
+            if { [file exists $dir/$group/$gridname/cases.list] } {
+                set fd [open $dir/$group/$gridname/cases.list]
+                if { [gets $fd line] >= 0 } {
+                    set casefile [file normalize $dir/$group/$gridname/[string trim $line]/$casename]
+                }
+		close $fd
+	    }
+        }
+        if { [file exists $casefile] } { 
+            # normal return
+            return 
+        }
+    }
+
+    # coming here means specified test is not found; report error
+    error [join [list "Error: test case $group / $grid / $casename is not found in paths listed in variable" \
+		     "CSF_TestScriptsPath (current value is \"$env(CSF_TestScriptsPath)\")"] "\n"]
+}
+
+# Internal procedure to run test case indicated by base directory, 
+# grid and grid names, and test case file path.
+# The log can be obtained by command "dlog get".
+proc _run_test {scriptsdir group gridname casefile echo} {
+    global env
+
+    # start timer
+    uplevel dchrono _timer reset
+    uplevel dchrono _timer start
+    catch {uplevel meminfo w} membase
+
+    # enable commands logging; switch to old-style mode if dlog command is not present
+    set dlog_exists 1
+    if { [catch {dlog reset}] } {
+	set dlog_exists 0
+    } elseif { $echo } {
+        decho on
+    } else {
+	dlog reset
+	dlog on
+	rename puts puts-saved
+	proc puts args { 
+	    global _tests_verbose
+
+	    # log only output to stdout and stderr, not to file!
+	    if {[llength $args] > 1} {
+		set optarg [lindex $args end-1]
+		if { $optarg == "stdout" || $optarg == "stderr" || $optarg == "-newline" } {
+		    dlog add [lindex $args end]
+		}
+	    } else {
+		dlog add [lindex $args end]
+	    }
+
+	    # reproduce original puts
+	    if { $_tests_verbose } {
+		eval puts-saved $args
+	    }
+	}
+    }
+
+    # evaluate test case 
+    if [catch {
+	uplevel set casename [file tail $casefile]
+	uplevel set groupname $group
+	uplevel set gridname $gridname
+
+        if { [file exists $scriptsdir/$group/begin] } {
+	    puts "Executing $scriptsdir/$group/begin..."; flush stdout
+	    uplevel source $scriptsdir/$group/begin
+	}
+	if { [file exists $scriptsdir/$group/$gridname/begin] } {
+	    puts "Executing $scriptsdir/$group/$gridname/begin..."; flush stdout
+	    uplevel source $scriptsdir/$group/$gridname/begin
+	}
+	
+	puts "Executing $casefile..."; flush stdout
+	uplevel source $casefile
+	
+	if { [file exists $scriptsdir/$group/$gridname/end] } {
+	    puts "Executing $scriptsdir/$group/$gridname/end..."; flush stdout
+	    uplevel source $scriptsdir/$group/$gridname/end
+	}
+	if { [file exists $scriptsdir/$group/end] } {
+	    puts "Executing $scriptsdir/$group/end..."; flush stdout
+	    uplevel source $scriptsdir/$group/end
+	}
+    } res] {
+	puts "Tcl Exception: $res"
+    }
+
+    # stop logging
+    if { $dlog_exists } {
+        if { $echo } {
+	    decho off
+        } else {
+            rename puts {}
+	    rename puts-saved puts
+	    dlog off
+	}
+    }
+
+    # stop cpulimit killer if armed by the test
+    cpulimit
+
+    # add memory and timing info
+    set stats ""
+    if { ! [catch {uplevel meminfo w} memuse] } {
+        set stats "MEMORY DELTA: [expr ($memuse - $membase) / 1024] KiB\n"
+    }
+    uplevel dchrono _timer stop
+    set time [uplevel dchrono _timer show]
+    if [regexp -nocase {CPU user time:[ \t]*([0-9.e-]+)} $time res cpu] {
+	set stats "${stats}TOTAL CPU TIME: $cpu sec\n"
+    }
+    if { $dlog_exists && ! $echo } {
+	dlog add $stats
+    } else {
+	puts $stats
+    }
+}
+
+# Internal procedure to check log of test execution and decide if it passed or failed
+proc _check_log {dir group gridname casename log {_summary {}} {_html_log {}}} {
+    global env
+    if { $_summary != "" } { upvar $_summary summary }
+    if { $_html_log != "" } { upvar $_html_log html_log }
+    set summary ""
+    set html_log ""
+
+if [catch {
+
+    # load definition of 'bad words' indicating test failure
+    # note that rules are loaded in the order of decreasing priority (grid - group - common),
+    # thus grid rules will override group ones
+    set badwords {}
+    foreach rulesfile [list $dir/$group/$gridname/parse.rules $dir/$group/parse.rules $dir/parse.rules] {
+	if [catch {set fd [open $rulesfile r]}] { continue }
+	while { [gets $fd line] >= 0 } {
+	    # skip comments and empty lines
+	    if { [regexp "\[ \t\]*\#.*" $line] } { continue }
+	    if { [string trim $line] == "" } { continue }
+	    # extract regexp
+	    if { ! [regexp {^([^/]*)/([^/]*)/(.*)$} $line res status rexp comment] } { 
+		puts "Warning: cannot recognize parsing rule \"$line\" in file $rulesfile"
+		continue 
+	    }
+	    set status [string trim $status]
+	    if { $comment != "" } { set status "$status ([string trim $comment])" }
+	    set rexp [regsub -all {\\b} $rexp {\\y}] ;# convert regexp from Perl to Tcl style
+	    lappend badwords [list $status $rexp]
+	}
+	close $fd
+    }
+    if { [llength $badwords] <= 0 } { 
+	puts "Warning: no definition of error indicators found (check files parse.rules)" 
+    }
+
+    # analyse log line-by-line
+    set todos {}
+    set status ""
+    foreach line [split $log "\n"] {
+	# check if line defines specific treatment of some messages
+	if [regexp -nocase {^[ \t]*TODO ([^:]*):(.*)$} $line res platforms pattern] {
+	    if { ! [regexp -nocase {\mAll\M} $platforms] && 
+                 ! [regexp -nocase "\\m$env(os_type)\\M" $platforms] } {
+		set html_log "$html_log\n$line"
+		continue ;# TODO statement is for another platform
+	    }
+
+	    # record TODOs that mark unstable cases
+	    if { [regexp {[\?]} $platforms] } {
+		set todos_unstable([llength $todos]) 1
+            }
+
+	    lappend todos [regsub -all {\\b} [string trim $pattern] {\\y}] ;# convert regexp from Perl to Tcl style
+	    set html_log "$html_log\n[_html_highlight BAD $line]"
+	    continue
+	}
+
+	# check for presence of messages indicating test result
+	set ismarked 0
+	foreach bw $badwords {
+	    if { [regexp [lindex $bw 1] $line] } { 
+		# check if this is known bad case
+		set is_known 0
+		for {set i 0} {$i < [llength $todos]} {incr i} {
+		    if { [regexp [lindex $todos $i] $line] } {
+			set is_known 1
+			incr todo_count($i)
+			set html_log "$html_log\n[_html_highlight BAD $line]"
+			break
+		    }
+		}
+
+		# if it is not in todo, define status
+		if { ! $is_known } {
+		    set stat [lindex $bw 0 0]
+		    set html_log "$html_log\n[_html_highlight $stat $line]"
+		    if { $status == "" && $stat != "OK" && ! [regexp -nocase {^IGNOR} $stat] } {
+			set status [lindex $bw 0]
+		    }
+		}
+		set ismarked 1
+		break
+	    }
+	}
+	if { ! $ismarked } { 
+	    set html_log "$html_log\n$line"
+	}
+    }
+
+    # check for presence of TEST COMPLETED statement
+    if { $status == "" && ! [regexp {TEST COMPLETED} $log] } {
+	# check whether absence of TEST COMPLETED is known problem
+	set i [lsearch $todos "TEST INCOMPLETE"]
+	if { $i >= 0 } {
+	    incr todo_count($i)
+	} else {
+	    set status "FAILED (no final message is found)"
+	}
+    }
+
+    # check declared bad cases and diagnose possible improvement 
+    # (bad case declared but not detected).
+    # Note that absence of the problem marked by TODO with question mark
+    # (unstable) is not reported as improvement.
+    if { $status == "" } {
+        for {set i 0} {$i < [llength $todos]} {incr i} {
+      	    if { ! [info exists todos_unstable($i)] &&
+                 (! [info exists todo_count($i)] || $todo_count($i) <= 0) } {
+		set status "IMPROVEMENT (expected problem TODO no. [expr $i + 1] is not detected)"
+		break;
+	    }
+	}
+    }
+
+    # report test as known bad if at least one of expected problems is found
+    if { $status == "" && [llength [array names todo_count]] > 0 } {
+	set status "BAD (known problem)"
+    }
+
+    # report normal OK
+    if { $status == "" } {set status "OK" }
+
+} res] {
+    set status "FAILED ($res)"
+}
+
+    # put final message
+    _log_and_puts summary "CASE $group $gridname $casename: $status"
+    set html_log "[_html_highlight [lindex $status 0] $summary]\n$html_log"
+}
+
+# Auxiliary procedure putting message to both cout and log variable (list)
+proc _log_and_puts {logvar message} {
+    if { $logvar != "" } { 
+	upvar $logvar log
+	if [info exists log] { 
+	    set log "$log$message\n"
+	} else {
+	    set log "$message\n"
+	}
+    }
+    puts $message
+}
+
+# Auxiliary procedure to log result on single test case
+proc _log_test_case {output logdir dir group grid casename logvar} {
+    upvar $logvar log
+
+    # check result and make HTML log
+    _check_log $dir $group $grid $casename $output summary html_log
+    set log "$log$summary"
+
+    # save log to file
+    if { $logdir != "" } {
+	_log_html $logdir/$group/$grid/$casename.html $html_log "Test $group $grid $casename"
+	_log_save $logdir/$group/$grid/$casename.log "$output\n$summary" "Test $group $grid $casename"
+    }
+}
+
+# Auxiliary procedure to save log to file
+proc _log_save {file log {title {}}} {
+    # create missing directories as needed
+    catch {file mkdir [file dirname $file]}
+
+    # try to open a file
+    if [catch {set fd [open $file w]} res] {
+	error "Error saving log file $file: $res"
+    }
+    
+    # dump log and close
+    puts $fd "$title\n"
+    puts $fd $log
+    close $fd
+    return
+}
+
+# Auxiliary procedure to make a (relative if possible) URL to a file for 
+# inclusion a reference in HTML log
+proc _make_url {htmldir file} {
+    set htmlpath [file split [file normalize $htmldir]]
+    set filepath [file split [file normalize $file]]
+    for {set i 0} {$i < [llength $htmlpath]} {incr i} {
+        if { "[lindex $htmlpath $i]" != "[lindex $filepath $i]" } {
+            if { $i == 0 } { break }
+            return "[string repeat "../" [expr [llength $htmlpath] - $i - 1]][eval file join [lrange $filepath $i end]]"
+        }
+    }
+
+    # if relative path could not be made, return full file URL
+    return "file://[file normalize $file]"
+}
+
+# Auxiliary procedure to save log to file
+proc _log_html {file log {title {}}} {
+    # create missing directories as needed
+    catch {file mkdir [file dirname $file]}
+
+    # try to open a file
+    if [catch {set fd [open $file w]} res] {
+	error "Error saving log file $file: $res"
+    }
+    
+    # print header
+    puts $fd "<html><head><title>$title</title></head><body><h1>$title</h1>"
+
+    # add images if present
+    set imgbasename [file rootname [file tail $file]]
+    foreach img [lsort [glob -nocomplain -directory [file dirname $file] -tails ${imgbasename}*.gif ${imgbasename}*.png ${imgbasename}*.jpg]] {
+	puts $fd "<p><img src=\"$img\"/><p>"
+    }
+
+    # print log body, trying to add HTML links to script files on lines like
+    # "Executing <filename>..."
+    puts $fd "<pre>"
+    foreach line [split $log "\n"] {
+        if { [regexp {Executing[ \t]+([a-zA-Z0-9._/:-]+[^.])} $line res script] &&
+             [file exists $script] } {
+            set line [regsub $script $line "<a href=\"[_make_url $file $script]\">$script</a>"]
+        }
+        puts $fd $line
+    }
+    puts $fd "</pre></body></html>"
+
+    close $fd
+    return
+}
+
+# Auxiliary method to make text with HTML highlighting according to status
+proc _html_color {status} {
+    # choose a color for the cell according to result
+    if { $status == "OK" } { 
+	return lightgreen
+    } elseif { [regexp -nocase {^FAIL} $status] } { 
+	return red
+    } elseif { [regexp -nocase {^BAD} $status] } { 
+	return yellow
+    } elseif { [regexp -nocase {^IMP} $status] } { 
+	return orange
+    } elseif { [regexp -nocase {^SKIP} $status] } { 
+	return gray
+    } elseif { [regexp -nocase {^IGNOR} $status] } { 
+	return gray
+    } else {
+	puts "Warning: no color defined for status $status, using red as if FAILED"
+	return red
+    }
+}
+
+# Format text line in HTML to be colored according to the status
+proc _html_highlight {status line} {
+    return "<table><tr><td bgcolor=\"[_html_color $status]\">$line</td></tr></table>"
+}
+
+# Internal procedure to generate HTML page presenting log of the tests
+# execution in tabular form, with links to reports on individual cases
+proc _log_html_summary {logdir log totals regressions improvements total_time} {
+    global _test_case_regexp
+
+     # create missing directories as needed
+    catch {file mkdir $logdir}
+
+    # try to open a file and start HTML
+    if [catch {set fd [open $logdir/summary.html w]} res] {
+	error "Error creating log file: $res"
+    }
+
+    # write HRML header, including command to refresh log if still in progress
+    puts $fd "<html><head>"
+    puts $fd "<title>Tests summary</title>"
+    if { $total_time == "" } {
+	puts $fd "<meta http-equiv=\"refresh\" content=\"10\">"
+    }
+    puts $fd "<meta http-equiv=\"pragma\" content=\"NO-CACHE\">"
+    puts $fd "</head><body>"
+
+    # put summary
+    set legend(OK)          "Test passed OK"
+    set legend(FAILED)      "Test failed (regression)"
+    set legend(BAD)         "Known problem"
+    set legend(IMPROVEMENT) "Possible improvement (expected problem not detected)"
+    set legend(SKIPPED)     "Test skipped due to lack of data file"
+    puts $fd "<h1>Summary</h1><table>"
+    foreach nbstat $totals {
+	set status [lindex $nbstat 1]
+	if { [info exists legend($status)] } { 
+	    set comment $legend($status) 
+	} else {
+	    set comment "User-defined status"
+	}
+	puts $fd "<tr><td align=\"right\">[lindex $nbstat 0]</td><td bgcolor=\"[_html_color $status]\">$status</td><td>$comment</td></tr>"
+    }
+    puts $fd "</table>"
+
+    # time stamp and elapsed time info
+    if { $total_time != "" } { 
+	puts $fd "<p>Generated on [clock format [clock seconds] -format {%Y-%m-%d %H:%M:%S}] on [info hostname] <p> $total_time" 
+    } else {
+	puts $fd "<p>NOTE: This is intermediate summary; the tests are still running! This page will refresh automatically until tests are finished."
+    }
+   
+    # print regressions and improvements
+    foreach featured [list $regressions $improvements] {
+	if { [llength $featured] <= 1 } { continue }
+	set status [string trim [lindex $featured 0] { :}]
+	puts $fd "<h2>$status</h2>"
+	puts $fd "<table>"
+	set groupgrid ""
+	foreach test [lrange $featured 1 end] {
+	    if { ! [regexp {^(.*)\s+([\w.]+)$} $test res gg name] } {
+		set gg UNKNOWN
+		set name "Error building short list; check details"
+	    }
+	    if { $gg != $groupgrid } {
+		if { $groupgrid != "" } { puts $fd "</tr>" }
+		set groupgrid $gg
+		puts $fd "<tr><td>$gg</td>"
+	    }
+	    puts $fd "<td bgcolor=\"[_html_color $status]\"><a href=\"[regsub -all { } $gg /]/${name}.html\">$name</a></td>"
+	}
+	if { $groupgrid != "" } { puts $fd "</tr>" }
+	puts $fd "</table>"
+    }
+
+    # put detailed log
+    puts $fd "<h1>Details</h1>"
+
+    # process log line-by-line
+    set group {}
+    set letter {}
+    foreach line [lsort -dictionary [split $log "\n"]] {
+	# check that the line is case report in the form "CASE group grid name: result (explanation)"
+	if { ! [regexp $_test_case_regexp $line res grp grd casename result message] } {
+	    continue
+	}
+
+	# start new group
+	if { $grp != $group } {
+	    if { $letter != "" } { puts $fd "</tr></table>" }
+	    set letter {}
+	    set group $grp
+	    set grid {}
+	    puts $fd "<h2>Group $group</h2>"
+	}
+
+	# start new grid
+	if { $grd != $grid } {
+	    if { $letter != "" } { puts $fd "</tr></table>" }
+	    set letter {}
+	    set grid $grd
+	    puts $fd "<h3>Grid $grid</h3>"
+	}
+
+	# check if test case name is <letter><digit>; 
+	# if not, set alnum to period "." to recognize non-standard test name
+	if { ! [regexp {([A-Za-z]+)([0-9]+)} $casename res alnum number] } {
+	    set alnum .
+	}
+
+	# start new row when letter changes or for non-standard names
+	if { $alnum != $letter || $alnum == "." } {
+	    if { $letter != "" } { 
+		puts $fd "</tr><tr>" 
+	    } else {
+		puts $fd "<table><tr>"
+	    }
+	    set letter $alnum
+	}	    
+
+	puts $fd "<td bgcolor=\"[_html_color $result]\"><a href=\"$group/$grid/${casename}.html\">$casename</a></td>"
+    }
+    puts $fd "</tr></table>"
+
+    # add remaining lines of log as plain text
+    puts $fd "<h2>Plain text messages</h2>\n<pre>"
+    foreach line [split $log "\n"] {
+	if { ! [regexp $_test_case_regexp $line] } {
+	    puts $fd "$line"
+	}
+    }
+    puts $fd "</pre>"
+
+    # close file and exit
+    puts $fd "</body>"
+    close $fd
+    return
+}
+
+# Procedure to dump summary logs of tests
+proc _log_summarize {logdir log {total_time {}}} {
+
+    # sort log records alphabetically to have the same behavior on Linux and Windows 
+    # (also needed if tests are run in parallel)
+    set loglist [lsort -dictionary [split $log "\n"]]
+
+    # classify test cases by status
+    foreach line $loglist {
+	if { [regexp {^CASE ([^:]*): ([[:alnum:]]+).*$} $line res caseid status] } {
+	    lappend stat($status) $caseid
+	}
+    }
+    set totals {}
+    set improvements {Improvements:}
+    set regressions {Failed:}
+    if { [info exists stat] } {
+	foreach status [lsort [array names stat]] {
+	    lappend totals [list [llength $stat($status)] $status]
+
+	    # separately count improvements (status starting with IMP) and regressions (all except IMP, OK, BAD, and SKIP)
+	    if { [regexp -nocase {^IMP} $status] } {
+		eval lappend improvements $stat($status)
+	    } elseif { $status != "OK" && ! [regexp -nocase {^BAD} $status] && ! [regexp -nocase {^SKIP} $status] } {
+		eval lappend regressions $stat($status)
+	    }
+	}
+    }
+
+    # if time is specified, add totals
+    if { $total_time != "" } {
+	if { [llength $improvements] > 1 } {
+	    _log_and_puts log [join $improvements "\n  "]
+	}
+	if { [llength $regressions] > 1 } {
+	    _log_and_puts log [join $regressions "\n  "]
+	}
+	if { [llength $improvements] == 1 && [llength $regressions] == 1 } {
+	    _log_and_puts log "No regressions"
+	}
+	_log_and_puts log "Total cases: [join $totals {, }]"
+	_log_and_puts log $total_time
+    }
+
+    # save log to files
+    if { $logdir != "" } {
+	_log_html_summary $logdir $log $totals $regressions $improvements $total_time
+	_log_save $logdir/tests.log $log "Tests summary"
+    }
+
+    return
+}
+
+# Internal procedure to generate XML log in JUnit style, for further
+# consumption by Jenkins or similar systems.
+#
+# The output is intended to conform to XML schema supported by Jenkins found at
+# https://svn.jenkins-ci.org/trunk/hudson/dtkit/dtkit-format/dtkit-junit-model/src/main/resources/com/thalesgroup/dtkit/junit/model/xsd/junit-4.xsd
+#
+# The mapping of the fields is inspired by annotated schema of Apache Ant JUnit XML format found at
+# http://windyroad.org/dl/Open%20Source/JUnit.xsd
+proc _log_xml_summary {logdir filename log include_cout} {
+    global _test_case_regexp
+
+    catch {file mkdir [file dirname $filename]}
+
+    # try to open a file and start XML
+    if [catch {set fd [open $filename w]} res] {
+	error "Error creating XML summary file $filename: $res"
+    }
+    puts $fd "<?xml version='1.0' encoding='utf-8'?>"
+    puts $fd "<testsuites>"
+
+    # prototype for command to generate test suite tag
+    set time_and_host "timestamp=\"[clock format [clock seconds] -format {%Y-%m-%dT%H:%M:%S}]\" hostname=\"[info hostname]\""
+    set cmd_testsuite {puts $fd "<testsuite name=\"$group $grid\" tests=\"$nbtests\" failures=\"$nbfail\" errors=\"$nberr\" time=\"$time\" skipped=\"$nbskip\" $time_and_host>\n$testcases\n</testsuite>\n"}
+
+    # sort log and process it line-by-line
+    set group {}
+    foreach line [lsort -dictionary [split $log "\n"]] {
+	# check that the line is case report in the form "CASE group grid name: result (explanation)"
+	if { ! [regexp $_test_case_regexp $line res grp grd casename result message] } {
+	    continue
+	}
+	set message [string trim $message " \t\r\n()"]
+
+	# start new testsuite for each grid
+	if { $grp != $group || $grd != $grid } {
+
+	    # write previous test suite
+	    if [info exists testcases] { eval $cmd_testsuite }
+
+	    set testcases {}
+	    set nbtests 0
+	    set nberr 0
+	    set nbfail 0
+	    set nbskip 0
+	    set time 0.
+
+	    set group $grp
+	    set grid $grd
+	}
+
+	incr nbtests
+	 
+	# parse test log and get its CPU time
+	set testout {}
+	set add_cpu {}
+	if { [catch {set fdlog [open $logdir/$group/$grid/${casename}.log r]} ret] } { 
+	    puts "Error: cannot open $logdir/$group/$grid/${casename}.log: $ret"
+	} else {
+	    while { [gets $fdlog logline] >= 0 } {
+		if { $include_cout } {
+        	    set testout "$testout$logline\n"
+		}
+		if [regexp -nocase {TOTAL CPU TIME:\s*([\d.]+)\s*sec} $logline res cpu] {
+		    set add_cpu " time=\"$cpu\""
+		    set time [expr $time + $cpu]
+		}
+	    }
+	    close $fdlog
+	}
+	if { ! $include_cout } {
+            set testout "$line\n"
+	}
+
+	# record test case with its output and status
+	# Mapping is: SKIPPED, BAD, and OK to OK, all other to failure
+	set testcases "$testcases\n  <testcase name=\"$casename\"$add_cpu status=\"$result\">\n"
+	set testcases "$testcases\n    <system-out>\n$testout    </system-out>"
+	if { $result != "OK" } {
+	    if { [regexp -nocase {^SKIP} $result] } {
+		incr nberr
+		set testcases "$testcases\n    <error name=\"$result\" message=\"$message\"/>"
+	    } elseif { [regexp -nocase {^BAD} $result] } {
+		incr nbskip
+		set testcases "$testcases\n    <skipped>$message</skipped>"
+	    } else {
+		incr nbfail
+		set testcases "$testcases\n    <failure name=\"$result\" message=\"$message\"/>"
+	    }
+	}
+	set testcases "$testcases\n  </testcase>"
+    }
+
+    # write last test suite
+    if [info exists testcases] { eval $cmd_testsuite }
+
+    # the end
+    puts $fd "</testsuites>"
+    close $fd
+    return
+}
+
+# define custom platform name 
+proc _tests_platform_def {} {
+    global env tcl_platform
+
+    if [info exists env(os_type)] { return }
+
+    set env(os_type) $tcl_platform(platform)
+
+    # use detailed mapping for various versions of Lunix
+    # (note that mapping is rather non-uniform, for historical reasons)
+    if { $env(os_type) == "unix" && ! [catch {exec cat /etc/issue} issue] } {
+	if { [regexp {Mandriva[ \tA-Za-z]+([0-9]+)} $issue res num] } {
+	    set env(os_type) Mandriva$num
+	} elseif { [regexp {Red Hat[ \tA-Za-z]+([0-9]+)} $issue res num] } {
+	    set env(os_type) RedHat$num
+	} elseif { [regexp {Debian[ \tA-Za-z/]+([0-9]+)[.]([0-9]+)} $issue res num subnum] } {
+	    set env(os_type) Debian$num$subnum
+	} elseif { [regexp {CentOS[ \tA-Za-z]+([0-9]+)[.]([0-9]+)} $issue res num subnum] } {
+	    set env(os_type) CentOS$num$subnum
+	} elseif { [regexp {Scientific[ \tA-Za-z]+([0-9]+)[.]([0-9]+)} $issue res num subnum] } {
+	    set env(os_type) SL$num$subnum
+	} elseif { [regexp {Fedora Core[ \tA-Za-z]+([0-9]+)} $issue res num] } {
+	    set env(os_type) FedoraCore$num
+	}
+	if { [exec uname -m] == "x86_64" } {
+	    set env(os_type) "$env(os_type)-64"
+	}
+    }
+}
+_tests_platform_def
+
+# Auxiliary procedure to split path specification (usually defined by
+# environment variable) into list of directories or files
+proc _split_path {pathspec} {
+    global tcl_platform
+
+    # first replace all \ (which might occur on Windows) by /  
+    regsub -all "\\\\" $pathspec "/" pathspec
+
+    # split path by platform-specific separator
+    return [split $pathspec [_path_separator]]
+}
+
+# Auxiliary procedure to define platform-specific separator for directories in
+# path specification
+proc _path_separator {} {
+    global tcl_platform
+
+    # split path by platform-specific separator
+    if { $tcl_platform(platform) == "windows" } {
+	return ";"
+    } else {
+	return ":"
+    }
+}
+
+# Procedure to make a diff and common of two lists
+proc _list_diff {list1 list2 _in1 _in2 _common} {
+    upvar $_in1 in1
+    upvar $_in2 in2
+    upvar $_common common
+
+    set in1 {}
+    set in2 {}
+    set common {}
+    foreach item $list1 {
+	if { [lsearch -exact $list2 $item] >= 0 } {
+	    lappend common $item
+        } else {
+	    lappend in1 $item
+	}
+    }
+    foreach item $list2 {
+	if { [lsearch -exact $common $item] < 0 } {
+	    lappend in2 $item
+	}
+    }
+    return
+}
+
+# procedure to load a file to Tcl string
+proc _read_file {filename} {
+    set fd [open $filename r]
+    set result [read -nonewline $fd]
+    close $fd
+    return $result
+}
+
+# procedure to construct name for the mage diff file
+proc _diff_img_name {dir1 dir2 casepath imgfile} {
+    return [file join $dir1 $casepath "diff-[file tail $dir2]-$imgfile"]
+}
+
+# Procedure to compare results of two runs of test cases
+proc _test_diff {dir1 dir2 basename status verbose _logvar {_statvar ""}} {
+    upvar $_logvar log
+
+    # make sure to load diffimage command
+    uplevel pload VISUALIZATION
+
+    # prepare variable (array) for collecting statistics
+    if { "$_statvar" != "" } {
+        upvar $_statvar stat
+    } else {
+        set stat(cpu1) 0
+        set stat(cpu2) 0
+        set stat(mem1) 0
+        set stat(mem2) 0
+        set log {}
+    }
+
+    # first check subdirectories
+    set path1 [file join $dir1 $basename]
+    set path2 [file join $dir2 $basename]
+    set list1 [glob -directory $path1 -types d -tails -nocomplain *]
+    set list2 [glob -directory $path2 -types d -tails -nocomplain *]
+    if { [llength $list1] >0 || [llength $list2] > 0 } {
+        _list_diff $list1 $list2 in1 in2 common
+        if { "$verbose" > 1 } {
+            if { [llength $in1] > 0 } { _log_and_puts log "Only in $path1: $in1" }
+            if { [llength $in2] > 0 } { _log_and_puts log "Only in $path2: $in2" }
+        }
+        foreach subdir $common {
+            if { "$verbose" > 2 } {
+	        _log_and_puts log "Checking [file join $basename $subdir]"
+	    }
+	    _test_diff $dir1 $dir2 [file join $basename $subdir] $status $verbose log stat
+        }
+    } else {
+        # check log files (only if directory has no subdirs)
+        set list1 [glob -directory $path1 -types f -tails -nocomplain *.log]
+        set list2 [glob -directory $path2 -types f -tails -nocomplain *.log]
+        _list_diff $list1 $list2 in1 in2 common
+        if { "$verbose" > 1 } {
+            if { [llength $in1] > 0 } { _log_and_puts log "Only in $path1: $in1" }
+            if { [llength $in2] > 0 } { _log_and_puts log "Only in $path2: $in2" }
+        }
+        foreach logfile $common {
+            # load two logs
+	    set log1 [_read_file [file join $dir1 $basename $logfile]]
+	    set log2 [_read_file [file join $dir2 $basename $logfile]]
+            set casename [file rootname $logfile]
+
+            # check execution statuses
+            set status1 UNDEFINED
+            set status2 UNDEFINED
+	    if { ! [regexp {CASE [^:]*:\s*([\w]+)} $log1 res1 status1] ||
+	         ! [regexp {CASE [^:]*:\s*([\w]+)} $log2 res2 status2] ||
+	         "$status1" != "$status2" } {
+	        _log_and_puts log "STATUS [split $basename /] $casename: $status1 / $status2"
+
+                # if test statuses are different, further comparison makes 
+ 		# no sense unless explicitly requested
+		if { "$status" != "all" } {
+                    continue
+		}
+	    }
+	    if { "$status" == "ok" && "$status1" != "OK" } { 
+		continue
+	    }
+
+            # check CPU times
+            set cpu1 UNDEFINED
+            set cpu2 UNDEFINED
+	    if { [regexp {TOTAL CPU TIME:\s*([\d.]+)} $log1 res1 cpu1] &&
+	         [regexp {TOTAL CPU TIME:\s*([\d.]+)} $log2 res1 cpu2] } {
+                set stat(cpu1) [expr $stat(cpu1) + $cpu1]
+                set stat(cpu2) [expr $stat(cpu2) + $cpu2]
+
+                # compare CPU times with 10% precision (but not less 0.5 sec)
+	        if { [expr abs ($cpu1 - $cpu2) > 0.5 + 0.05 * abs ($cpu1 + $cpu2)] } {
+	            _log_and_puts log "CPU [split $basename /] $casename: $cpu1 / $cpu2"
+                }
+	    }
+
+            # check memory delta
+            set mem1 UNDEFINED
+            set mem2 UNDEFINED
+	    if { [regexp {MEMORY DELTA:\s*([\d.]+)} $log1 res1 mem1] &&
+	         [regexp {MEMORY DELTA:\s*([\d.]+)} $log2 res1 mem2] } {
+                set stat(mem1) [expr $stat(mem1) + $mem1]
+                set stat(mem2) [expr $stat(mem2) + $mem2]
+
+                # compare memory usage with 10% precision (but not less 16 KiB)
+	        if { [expr abs ($mem1 - $mem2) > 16 + 0.05 * abs ($mem1 + $mem2)] } {
+	            _log_and_puts log "MEMORY [split $basename /] $casename: $mem1 / $mem2"
+                }
+	    }
+
+            # check images
+            set imglist1 [glob -directory $path1 -types f -tails -nocomplain $casename*.{png,gif}]
+            set imglist2 [glob -directory $path2 -types f -tails -nocomplain $casename*.{png,gif}]
+            _list_diff $imglist1 $imglist2 imgin1 imgin2 imgcommon
+            if { "$verbose" > 1 } {
+                if { [llength $imgin1] > 0 } { _log_and_puts log "Only in $path1: $imgin1" }
+                if { [llength $imgin2] > 0 } { _log_and_puts log "Only in $path2: $imgin2" }
+            }
+            foreach imgfile $imgcommon {
+#                if { $verbose > 1 } { _log_and_puts log "Checking [split basename /] $casename: $imgfile" }
+                set diffile [_diff_img_name $dir1 $dir2 $basename $imgfile]
+                if { [catch {diffimage [file join $dir1 $basename $imgfile] \
+                                       [file join $dir2 $basename $imgfile] \
+                                       0 0 0 $diffile} diff] } {
+                    _log_and_puts log "IMAGE [split $basename /] $casename: $imgfile cannot be compared"
+                    file delete -force $diffile ;# clean possible previous result of diffimage
+                } elseif { $diff != 0 } {
+                    _log_and_puts log "IMAGE [split $basename /] $casename: $imgfile differs"
+                } else {
+                    file delete -force $diffile ;# clean useless artifact of diffimage
+                }
+            }
+	}
+    }
+
+    if { "$_statvar" == "" } {
+        _log_and_puts log "Total MEMORY difference: $stat(mem1) / $stat(mem2)"
+        _log_and_puts log "Total CPU difference: $stat(cpu1) / $stat(cpu2)"
+    }
+}
+
+# Auxiliary procedure to save log of results comparison to file
+proc _log_html_diff {file log dir1 dir2} {
+    # create missing directories as needed
+    catch {file mkdir [file dirname $file]}
+
+    # try to open a file
+    if [catch {set fd [open $file w]} res] {
+	error "Error saving log file $file: $res"
+    }
+    
+    # print header
+    puts $fd "<html><head><title>Diff $dir1 vs. $dir2</title></head><body>"
+    puts $fd "<h1>Comparison of test results: $dir1 vs. $dir2</h1>"
+
+    # print log body, trying to add HTML links to script files on lines like
+    # "Executing <filename>..."
+    puts $fd "<pre>"
+    set logpath [file split [file normalize $file]]
+    foreach line [split $log "\n"] {
+        puts $fd $line
+
+        if { [regexp {IMAGE[ \t]+([^:]+):[ \t]+([A-Za-z0-9_.-]+)} $line res case img] } {
+            if { [catch {eval file join "" [lrange $case 0 end-1]} gridpath] } {
+               # note: special handler for the case if test grid directoried are compared directly
+               set gridpath ""
+            }
+            set img1 "<img src=\"[_make_url $file [file join $dir1 $gridpath $img]]\">"
+            set img2 "<img src=\"[_make_url $file [file join $dir2 $gridpath $img]]\">"
+
+            set difffile [_diff_img_name $dir1 $dir2 $gridpath $img]
+            if { [file exists $difffile] } {
+                set imgd "<img src=\"[_make_url $file $difffile]\">"
+            } else {
+                set imgd "N/A"
+            }
+
+            puts $fd "<table><tr><th>[file tail $dir1]</th><th>[file tail $dir2]</th><th>Different pixels</th></tr>"
+            puts $fd "<tr><td>$img1</td><td>$img2</td><td>$imgd</td></tr></table>"
+        }
+    }
+    puts $fd "</pre></body></html>"
+
+    close $fd
+    return
+}
+
+# get number of CPUs on the system
+proc _get_nb_cpus {} {
+    global tcl_platform env
+
+    if { "$tcl_platform(platform)" == "windows" } {
+        # on Windows, take the value of the environment variable 
+        if { [info exists env(NUMBER_OF_PROCESSORS)] &&
+             ! [catch {expr $env(NUMBER_OF_PROCESSORS) > 0} res] && $res >= 0 } {
+            return $env(NUMBER_OF_PROCESSORS)
+        }
+    } elseif { "$tcl_platform(os)" == "Linux" } {
+        # on Linux, take number of logical processors listed in /proc/cpuinfo
+        if { [catch {open "/proc/cpuinfo" r} fd] } { 
+            return 0 ;# should never happen, but...
+        }
+        set nb 0
+	while { [gets $fd line] >= 0 } {
+	    if { [regexp {^processor[ \t]*:} $line] } {
+	        incr nb
+	    }
+	}
+        close $fd
+        return $nb
+    } elseif { "$tcl_platform(os)" == "Darwin" } {
+        # on MacOS X, call sysctl command
+        if { ! [catch {exec sysctl hw.ncpu} ret] && 
+             [regexp {^hw[.]ncpu[ \t]*:[ \t]*([0-9]+)} $ret res nb] } {
+            return $nb
+        }
+    }
+
+    # if cannot get good value, return 0 as default
+    return 0
+}
+
+# check two files for difference
+proc _diff_files {file1 file2} {
+    set fd1 [open $file1 "r"]
+    set fd2 [open $file2 "r"]
+
+    set differ f
+    while {! $differ} {
+        set nb1 [gets $fd1 line1]
+        set nb2 [gets $fd2 line2]
+        if { $nb1 != $nb2 } { set differ t; break }
+        if { $nb1 < 0 } { break }
+        if { [string compare $line1 $line2] } {
+            set differ t
+        }
+    }
+
+    close $fd1
+    close $fd2
+
+    return $differ
+}
+
+# Check if file is in DOS encoding.
+# This check is done by presence of \r\n combination at the end of the first 
+# line (i.e. prior to any other \n symbol).
+# Note that presence of non-ascii symbols typically used for recognition
+# of binary files is not suitable since some IGES and STEP files contain
+# non-ascii symbols.
+# Special check is added for PNG files which contain \r\n in the beginning.
+proc _check_dos_encoding {file} {
+    set fd [open $file rb]
+    set isdos f
+    if { [gets $fd line] && [regexp {.*\r$} $line] && 
+         ! [regexp {^.PNG} $line] } {
+        set isdos t
+    }
+    close $fd
+    return $isdos
+}
+
+# procedure to recognize format of a data file by its first symbols (for OCCT 
+# BREP and geometry DRAW formats, IGES, and STEP) and extension (all others)
+proc _check_file_format {file} {
+    set fd [open $file rb]
+    set line [read $fd 1024]
+    close $fd
+
+    set warn f
+    set ext [file extension $file]
+    set format unknown
+    if { [regexp {^DBRep_DrawableShape} $line] } {
+        set format BREP
+        if { "$ext" != ".brep" && "$ext" != ".rle" && 
+             "$ext" != ".draw" && "$ext" != "" } {
+            set warn t
+        }
+    } elseif { [regexp {^DrawTrSurf_} $line] } {
+        set format DRAW
+        if { "$ext" != ".rle" && 
+             "$ext" != ".draw" && "$ext" != "" } {
+            set warn t
+        }
+    } elseif { [regexp {^[ \t]*ISO-10303-21} $line] } {
+        set format STEP
+        if { "$ext" != ".step" && "$ext" != ".stp" } {
+            set warn t
+        }
+    } elseif { [regexp {^.\{72\}S[0 ]\{6\}1} $line] } {
+        set format IGES
+        if { "$ext" != ".iges" && "$ext" != ".igs" } {
+            set warn t
+        }
+    } elseif { "$ext" == ".igs" } {
+        set format IGES
+    } elseif { "$ext" == ".stp" } {
+        set format STEP
+    } else {
+        set format [string toupper [string range $ext 1 end]]
+    }
+    
+    if { $warn } {
+        puts "$file: Warning: extension ($ext) does not match format ($format)"
+    }
+
+    return $format
+}
+
+# procedure to load file knowing its format
+proc load_data_file {file format shape} {
+    switch $format {
+    BREP { uplevel restore $file $shape }
+    IGES { pload XSDRAW; uplevel igesbrep $file $shape * }
+    STEP { pload XSDRAW; uplevel stepread $file __a *; uplevel renamevar __a_1 $shape }
+    STL  { pload XSDRAW; uplevel readstl $shape $file }
+    default { error "Cannot read $format file $file" }
+    }
+}
diff --git a/src/DrawResources/VisualizationDemo.tcl b/src/DrawResources/VisualizationDemo.tcl
deleted file mode 100644
index a287bdd..0000000
--- a/src/DrawResources/VisualizationDemo.tcl
+++ /dev/null
@@ -1,173 +0,0 @@
-# Copyright (c) 1999-2012 OPEN CASCADE SAS
-#
-# The content of this file is subject to the Open CASCADE Technology Public
-# License Version 6.5 (the "License"). You may not use the content of this file
-# except in compliance with the License. Please obtain a copy of the License
-# at http://www.opencascade.org and read it completely before using this file.
-#
-# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-#
-# The Original Code and all software distributed under the License is
-# distributed on an "AS IS" basis, without warranty of any kind, and the
-# Initial Developer hereby disclaims all such warranties, including without
-# limitation, any warranties of merchantability, fitness for a particular
-# purpose or non-infringement. Please see the License for the specific terms
-# and conditions governing the rights and limitations under the License.
-
-
-set stationname $tcl_platform(platform)
-if { ${stationname} == "windows" } {
-   proc winfo { aTest aWindow } { return False }
-}
-
-
-proc sage { a} {
-    global stationname 
-    if { ${stationname} != "windows" } {
-	
-	if { ![winfo exists .h ] } {
-	    toplevel .h -bg azure3
-	    wm title .h "INFO AISViewer"
-	    wm geometry .h +320+20
-	    
-	} 
-	if { [winfo exists .h.m ] } {
-	    set astring [.h.m cget  -text]
-	    set newstring "${astring} \n $a"
-	    .h.m configure -text $newstring 
-	    puts $a
-	} else {
-	    message .h.m -justify left -bg azure2 -width 13c -relief ridge -bd 4\
-		    -text $a
-	    puts $a
-	} 
-	pack .h.m
-	update
-   }
-}
-
-if { [winfo exists .h ] } {
-    destroy .h
-}
-
-sage " Creating the V3D Viewer"
-sage "    vinit"
-sage " " 
-vinit
-vclear
-clear
-
-sage " Creating the Topological Viewer"
-sage "    smallview"
-sage " " 
-smallview
-sage " Creating a box"
-sage "    box  b -10 -10 -10 20 20 20"
-sage " "
-box b -10 -10 -10 20 20 20
-fit
-sage " Display the box in the V3D Viewer"
-sage "    vdisplay b"
-sage " "
-vdisplay b
-vfit
-nexplode b f
-erase b
-sage " Draft of two lateral faces "
-sage "    nexplode b f"
-sage "    depouille r b  0 0  -1 b_6 -15 10 -10 10  0 0 -1 "
-sage "    nexplode r f"
-sage "    depouille rr r  0 0 -1   r_1 -15 -10 -10 10  0 0 -1 "
-sage " "
-depouille r b  0 0  -1 b_6 -15 10 -10 10  0 0 -1 
-clear
-nexplode r f
-depouille rr r  0 0 -1   r_1 -15 -10 -10 10  0 0 -1 
-clear
-nexplode rr e
-verase b
-vdisplay rr
-vfit
-sage " Fillet on four lateral edges, then on the top and bottom edges  "
-sage "    nexplode rr e"
-sage "    blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11"
-sage "    nexplode result e"
-sage "    blend result result 2 result_11 3 result_12"
-sage " "
-blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11
-erase rr
-erase result
-nexplode result e
-blend result result 2 result_11 3 result_12 
-clear
-nexplode result f
-verase rr
-vdisplay result
-vfit
-sage " Creating a profile on the top face "
-sage "    nexplode result f"
-sage "    profile p  S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
-"
-sage " "
-profile p  S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
-sage " Creating a prism"
-sage "    prism rr p 0 0 20"
-sage " "
-prism rr p 0 0 20
-sage " Change some attributs : MATERIAL , TRANSPARENCY"
-sage "    vsetmaterial rr PLASTIC"
-sage "    vsetcolor rr RED"
-sage "    vsettransparency result 0.5"
-sage "    vsetdispmode 1"
-sage " "
-vdisplay rr
-vsetmaterial rr PLASTIC
-vsettransparency rr 0.5
-vsetcolor rr RED
-vsettransparency result 0.5
-vsetdispmode 1
-vfit
-fit
-sage " Fusion of this prism with the original part "
-sage "    fuse result rr result"
-sage " "
-fuse result rr result
-donl result
-vdisplay result
-vdonly result
-vfit
-nexplode result f
-erase result
-fit
-
-sage " Opening the top face"
-sage "    offsetshape r result -1 0.0001 result_17"
-sage " "
-nexplode result f
-
-offsetshape r result -1 0.0001 result_17
-vdisplay r
-vdonly r
-vfit
-vsetcolor r MATRABLUE
-vsettransparency r 0
-
-sage " Creating a cylinder and positionning it"
-sage "    pcylinder cyl 2 300"
-sage "    trotate cyl cyl 0 0 0  1 0 0 45"
-sage "    ttranslate cyl cyl 0 7.5 0"
-sage " "
-pcylinder cyl 2 30
-vdisplay cyl 
-vsetcolor cyl RED
-vfit
-trotate cyl cyl 0 0 0  1 0 0 45
-ttranslate cyl cyl 0 7.5 0
-vdisplay cyl 
-vsetcolor cyl RED
-vfit
-vdisplay cyl 
-vsetcolor cyl RED
-vfit
-sage "Demo completed"
diff --git a/src/DrawResources/WOKcomplement.tcl b/src/DrawResources/WOKcomplement.tcl
deleted file mode 100644
index b7e2b97..0000000
--- a/src/DrawResources/WOKcomplement.tcl
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright (c) 1999-2012 OPEN CASCADE SAS
-#
-# The content of this file is subject to the Open CASCADE Technology Public
-# License Version 6.5 (the "License"). You may not use the content of this file
-# except in compliance with the License. Please obtain a copy of the License
-# at http://www.opencascade.org and read it completely before using this file.
-#
-# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-#
-# The Original Code and all software distributed under the License is
-# distributed on an "AS IS" basis, without warranty of any kind, and the
-# Initial Developer hereby disclaims all such warranties, including without
-# limitation, any warranties of merchantability, fitness for a particular
-# purpose or non-infringement. Please see the License for the specific terms
-# and conditions governing the rights and limitations under the License.
-
-##########################################################
-#
-#  find the name of the station
-#
-proc wokstation {} {
-    set LINE_FROM_UNAME [ exec uname -a ] ;
-    if { [ regexp SunOS $LINE_FROM_UNAME ] } {
-	return "sun"
-    } 
-    elseif { [ regexp IRIX $LINE_FROM_UNAME ] } {
-	return "sil"
-    }
-    elseif { [ regexp OSF $LINE_FROM_UNAME ] } {
-	return "ao1" 
-    }
-    elseif { [ regexp HP-UX $LINE_FROM_UNAME ] } {
-	return "hp"
-    }
-    elseif { [ regexp FreeBSD $LINE_FROM_UNAME ] } {
-	return "bsd"
-    }
-    elseif { [ regexp Darwin $LINE_FROM_UNAME ] } {
-	return "mac"
-    }
-    else {
-	return "unknown"
-    }
-    
-}
diff --git a/src/DrawResources/demo b/src/DrawResources/demo
deleted file mode 100644
index ced5b4d..0000000
--- a/src/DrawResources/demo
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/csh -f
-#
-# This is a simple script demo for Draw Module on Unix platform.
-#
-# The V.E. CASROOT must be setted to the directory where CasCade 3.0 has been
-# downloaded.
-#
-setenv station `uname`
-if ( ${station} == "IRIX64" ) setenv station IRIX
-
-if (! ($?LD_LIBRARY_PATH) ) setenv LD_LIBRARY_PATH ""
-setenv LD_LIBRARY_PATH "${CASROOT}/${station}/lib:${LD_LIBRARY_PATH}"
-
-if ( ${station} == "AIX" ) then
-   setenv LIBPATH ${LD_LIBRARY_PATH}
-endif
-if ( ${station} == "HP-UX" ) then
-   setenv SHLIB_PATH ${LD_LIBRARY_PATH}
-endif
-if ( ${station} == "Linux" ) then
-   setenv LIBPATH "/usr/X11R6/lib:${LD_LIBRARY_PATH}"
-endif
-
-#
-# This is for setting VE used by Draw
-#
-# POP : Since C31 Version ; this Varaible are not Mandatory
-#setenv DRAWHOME    $CASROOT/src/DrawResources
-#setenv DRAWDEFAULT $DRAWHOME/DrawDefault
-echo ""
-echo " Running demo using :"
-echo ""
-echo "LD_LIBRARY_PATH : $LD_LIBRARY_PATH"
-echo "CASROOT         : $CASROOT"
-if ($?DRAWHOME)    then 
-    echo "DRAWHOME        : $DRAWHOME"
-endif
-if ($?DRAWDEFAULT) then
-    echo "DRAWDEFAULT     : $DRAWDEFAULT"
-endif
-#
-# Run the executable.
-#
-$CASROOT/${station}/bin/TTOPOLOGY
-#
-exit
diff --git a/src/DrawResources/demo.bat b/src/DrawResources/demo.bat
deleted file mode 100755
index 9e14029..0000000
--- a/src/DrawResources/demo.bat
+++ /dev/null
@@ -1,40 +0,0 @@
-echo ON
-
-echo " Open CASCADE "
-
-if not DEFINED CASROOT     echo CASROOT is mandatory
-
-if %PROCESSOR_ARCHITECTURE% EQU x86 Set STATION=Windows_NT
-
-
-
-rem =========================================
-rem
-rem    LD_LIBRARY_PATH definition 
-rem
-rem =========================================
-
-if NOT DEFINED OLDPATH set OLDPATH=%PATH%
-
-
-
-set PATH=%PATH%;%CASROOT%\%STATION%\dll;
-
-rem the Path where Tcl is installed
-
-set PATH=D:/DevTools/Tcltk/bin/;%PATH%;
-
-rem ======================================
-
-
-Set DrawExe=%CASROOT%\%STATION%\bin\TTOPOLOGY.exe
-
-# POP : Since C31 Version ; this Varaible are not Mandatory
-rem if not DEFINED DRAWHOME    Set DRAWHOME=%CASROOT%/src/DrawResources
-rem if not DEFINED DRAWDEFAULT set DRAWDEFAULT=%DRAWHOME%\\DrawDefault
-
-Set MMGT_CLEAR=1
-%DRAWEXE% 
-
-
-
diff --git a/src/DrawResources/demo.tcl b/src/DrawResources/demo.tcl
deleted file mode 100644
index ffb5a7e..0000000
--- a/src/DrawResources/demo.tcl
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright (c) 1999-2012 OPEN CASCADE SAS
-#
-# The content of this file is subject to the Open CASCADE Technology Public
-# License Version 6.5 (the "License"). You may not use the content of this file
-# except in compliance with the License. Please obtain a copy of the License
-# at http://www.opencascade.org and read it completely before using this file.
-#
-# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-#
-# The Original Code and all software distributed under the License is
-# distributed on an "AS IS" basis, without warranty of any kind, and the
-# Initial Developer hereby disclaims all such warranties, including without
-# limitation, any warranties of merchantability, fitness for a particular
-# purpose or non-infringement. Please see the License for the specific terms
-# and conditions governing the rights and limitations under the License.
-
-
-set stationname $tcl_platform(platform)
-if { ${stationname} == "windows" } {
-   proc winfo { aTest aWindow } { return False }
-}
-
-
-proc sage { a} {
-    global stationname 
-    if { ${stationname} != "windows" } {
-	
-	if { ![winfo exists .h ] } {
-	    toplevel .h -bg azure3
-	    wm title .h "INFO TEST HARNESS"
-	    wm geometry .h +320+20
-	    
-	} 
-	if { [winfo exists .h.m ] } {
-	    set astring [.h.m cget  -text]
-	    set newstring "${astring} \n $a"
-	    .h.m configure -text $newstring 
-	    puts $a
-	} else {
-	    message .h.m -justify left -bg azure2 -width 13c -relief ridge -bd 4\
-		    -text $a
-	    puts $a
-	} 
-	pack .h.m
-	update
-   }
-}
-
-
-smallview
-if { [winfo exists .h ] } {
-    destroy .h
-}
-sage " Creating a box"
-sage "    box  b -10 -10 -10 20 20 20"
-sage " "
-box b -10 -10 -10 20 20 20
-fit
-nexplode b f
-erase b
-sage " Draft of two lateral faces "
-sage "    depouille r b  0 0  -1 b_6 -15 10 -10 10  0 0 -1 "
-sage "    nexplode r f"
-sage "    depouille rr r  0 0 -1   r_1 -15 -10 -10 10  0 0 -1 "
-sage " "
-depouille r b  0 0  -1 b_6 -15 10 -10 10  0 0 -1 
-clear
-nexplode r f
-depouille rr r  0 0 -1   r_1 -15 -10 -10 10  0 0 -1 
-clear
-nexplode rr e
-sage " Fillet on four lateral edges, then on the top and bottom edges  "
-sage "    nexplode rr e"
-sage "    blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11"
-sage "    nexplode result e"
-sage "    blend result result 2 result_11 3 result_12"
-sage " "
-blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11
-erase rr
-erase result
-nexplode result e
-blend result result 2 result_11 3 result_12 
-clear
-nexplode result f
-sage " Creating a profile on the top face "
-sage "    nexplode result f"
-sage "    profile p  S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
-"
-sage " "
-profile p  S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
-sage " Creating a prism"
-sage "    prism rr p 0 0 20"
-sage " "
-prism rr p 0 0 20
-fit
-sage " Fusion of this prism with the original part "
-sage "    fuse result rr result"
-sage " "
-fuse result rr result
-donl result
-nexplode result f
-erase result
-fit
-
-sage " Opening the top face"
-sage "    offsetshape r result -1 0.0001 result_17"
-sage " "
-
-nexplode result f
-offsetshape r result -1 0.0001 result_17
-sage " Creating a cylinder and positionning it"
-sage "    pcylinder cyl 2 300"
-sage "    trotate cyl cyl 0 0 0  1 0 0 45"
-sage "    ttranslate cyl cyl 0 7.5 0"
-sage " "
-pcylinder cyl 2 30
-trotate cyl cyl 0 0 0  1 0 0 45
-ttranslate cyl cyl 0 7.5 0
-sage " Display the Shape on Hidden Line Mode "
-sage "   hlr hid r"
-sage ""
-donl r
-hlr hid r
-sage " Display the Shape on HLR Mode "
-sage "   hlr nohid r"
-sage "   hlr hlr r"
-sage ""
-donl r
-hlr nohid r
-hlr hlr r
-sage "Demo completed"
-
diff --git a/src/DrawResources/idoc b/src/DrawResources/idoc
index d45b2d3..f5c2032 100644
--- a/src/DrawResources/idoc
+++ b/src/DrawResources/idoc
@@ -1,170 +1,170 @@
-#!/bin/sh
-# The next line is executed by /bin/sh, but not Tcl \
-  exec tclsh $0 ${1+"$@"}
-
-source $env(DRAWHOME)/Documentation.tcl
-
-#
-# format a documentation for info
-#
-
-proc putText {aText} {
-    global theFile
-    foreach line $aText {puts $theFile $line}
-}
-
-proc infoSection {aSection aText} {
-    global theFile index theTitle
-
-    # check if text is empty
-    set empty 1
-    foreach line $aText {
-	if {![regexp {^[ \t]*$} $line]} {
-	    set empty 0
-	    break
-	}
-    }
-    if $empty return
-
-    if {$aSection == ""} {
-	putText $aText
-	return
-    }
-
-    switch $aSection {
-		
-	.Synopsis  {
-	    puts $theFile "\nSYNOPSIS\n"
-	    putText $aText
-	}
-	
-	.Purpose    {
-	    puts $theFile "\nPURPOSE\n"
-	    putText $aText
-	}
-	
-	.Example    {
-	    puts $theFile "\nEXAMPLE\n"
-	    putText $aText
-	}
-	
-	".See also" {
-	    puts $theFile "\nSEE ALSO\n"
-	    putText $aText
-	}
-	
-	.Warning    {
-	    puts $theFile "\nWARNINGS\n"
-	    putText $aText
-	}
-	
-	.Warning    {
-	    puts "\n"
-	    putText $aText
-	}
-	
-	.Text    {
-	    putText $aText
-	}
-	
-	.Index      {
-	    foreach word $aText {
-		if {$word != ""} {
-		    set index($word) $theTitle
-		}
-	    }
-	}
-    }
-}
-
-proc dumpInfo {title ftitle up prev next} {
-    global theFile subTitles texts
-    global theTitle
-    if {![info exists texts($ftitle)] &&
-    ![info exists subTitles($ftitle)]} return
-
-    set theTitle $title
-    puts $theFile ""
-    puts $theFile "Node: $title,  Prev: $prev,  Next: $next,  Up: $up,"
-    puts $theFile ""
-
-    if [info exists texts($ftitle)] {
-	sectionText $texts($ftitle) infoSection
-    }
-    if [info exists subTitles($ftitle)] {
-	puts $theFile "\n\n* Menu:\n"
-	foreach t $subTitles($ftitle) {
-	    puts $theFile  "* $t::"
-	}
-	puts $theFile ""
-	set p ""
-	set l [lrange $subTitles($ftitle) 1 end]
-	foreach t $subTitles($ftitle) {
-	    dumpInfo $t [concat $ftitle $t] $title $p [lindex $l 0]
-	    set p $t
-	    set l [lrange $l 1 end]
-	}
-    }
-}
-
-# compare without case, used for sorting the index
-proc cmp {s1 s2} {
-    return [string compare [string tolower $s1] [string tolower $s2]]
-}
-
-proc dumpIndex {} {
-    global index theFile
-    
-    puts $theFile ""
-    puts $theFile "Node: Index,  Up: Top,"
-    puts $theFile ""
-    if [info exists index] {
-	set l 0
-	foreach word [array names index] {
-	    set ll [string length $word]
-	    if {$ll > $l} {set l $ll}
-	}
-	incr l 2
-	set letter ""
-	foreach word [lsort -command cmp [array names index]] {
-	    puts -nonewline $theFile $word
-	    for {set ll [string length $word]} {$ll < $l} {incr ll} {
-		puts -nonewline $theFile " "
-	    }
-	    puts $theFile "*Note $index($word)::"
-	}
-    }
-}
-
-#
-# process arguments
-#
-
-if {$argc < 1} {
-    puts "idoc docfile upnode"
-    puts "create an info file form a doc file, upnode is the up node of Top"
-    exit
-}
-
-set file [lindex $argv 0]
-set up ""
-if {$argc > 1} {set up [lindex $argv 1]}
-
-if [file readable $file] {
-    readFile $file
-    set file [file rootname $file]
-    # add a menu for the index
-    lappend subTitles(Top) Index
-    
-    global theFile
-    set theFile [open $file.info "w"] 
-    puts $theFile ""
-    dumpInfo Top Top $up "" ""
-    dumpIndex
-    close $theFile
-    puts "$file.info created"
-} else {
-    puts "Cannot open $file for reading"
-}
-
-
+#!/bin/sh
+# The next line is executed by /bin/sh, but not Tcl \
+  exec tclsh $0 ${1+"$@"}
+
+source $env(DRAWHOME)/Documentation.tcl
+
+#
+# format a documentation for info
+#
+
+proc putText {aText} {
+    global theFile
+    foreach line $aText {puts $theFile $line}
+}
+
+proc infoSection {aSection aText} {
+    global theFile index theTitle
+
+    # check if text is empty
+    set empty 1
+    foreach line $aText {
+	if {![regexp {^[ \t]*$} $line]} {
+	    set empty 0
+	    break
+	}
+    }
+    if $empty return
+
+    if {$aSection == ""} {
+	putText $aText
+	return
+    }
+
+    switch $aSection {
+		
+	.Synopsis  {
+	    puts $theFile "\nSYNOPSIS\n"
+	    putText $aText
+	}
+	
+	.Purpose    {
+	    puts $theFile "\nPURPOSE\n"
+	    putText $aText
+	}
+	
+	.Example    {
+	    puts $theFile "\nEXAMPLE\n"
+	    putText $aText
+	}
+	
+	".See also" {
+	    puts $theFile "\nSEE ALSO\n"
+	    putText $aText
+	}
+	
+	.Warning    {
+	    puts $theFile "\nWARNINGS\n"
+	    putText $aText
+	}
+	
+	.Warning    {
+	    puts "\n"
+	    putText $aText
+	}
+	
+	.Text    {
+	    putText $aText
+	}
+	
+	.Index      {
+	    foreach word $aText {
+		if {$word != ""} {
+		    set index($word) $theTitle
+		}
+	    }
+	}
+    }
+}
+
+proc dumpInfo {title ftitle up prev next} {
+    global theFile subTitles texts
+    global theTitle
+    if {![info exists texts($ftitle)] &&
+    ![info exists subTitles($ftitle)]} return
+
+    set theTitle $title
+    puts $theFile ""
+    puts $theFile "Node: $title,  Prev: $prev,  Next: $next,  Up: $up,"
+    puts $theFile ""
+
+    if [info exists texts($ftitle)] {
+	sectionText $texts($ftitle) infoSection
+    }
+    if [info exists subTitles($ftitle)] {
+	puts $theFile "\n\n* Menu:\n"
+	foreach t $subTitles($ftitle) {
+	    puts $theFile  "* $t::"
+	}
+	puts $theFile ""
+	set p ""
+	set l [lrange $subTitles($ftitle) 1 end]
+	foreach t $subTitles($ftitle) {
+	    dumpInfo $t [concat $ftitle $t] $title $p [lindex $l 0]
+	    set p $t
+	    set l [lrange $l 1 end]
+	}
+    }
+}
+
+# compare without case, used for sorting the index
+proc cmp {s1 s2} {
+    return [string compare [string tolower $s1] [string tolower $s2]]
+}
+
+proc dumpIndex {} {
+    global index theFile
+    
+    puts $theFile ""
+    puts $theFile "Node: Index,  Up: Top,"
+    puts $theFile ""
+    if [info exists index] {
+	set l 0
+	foreach word [array names index] {
+	    set ll [string length $word]
+	    if {$ll > $l} {set l $ll}
+	}
+	incr l 2
+	set letter ""
+	foreach word [lsort -command cmp [array names index]] {
+	    puts -nonewline $theFile $word
+	    for {set ll [string length $word]} {$ll < $l} {incr ll} {
+		puts -nonewline $theFile " "
+	    }
+	    puts $theFile "*Note $index($word)::"
+	}
+    }
+}
+
+#
+# process arguments
+#
+
+if {$argc < 1} {
+    puts "idoc docfile upnode"
+    puts "create an info file form a doc file, upnode is the up node of Top"
+    exit
+}
+
+set file [lindex $argv 0]
+set up ""
+if {$argc > 1} {set up [lindex $argv 1]}
+
+if [file readable $file] {
+    readFile $file
+    set file [file rootname $file]
+    # add a menu for the index
+    lappend subTitles(Top) Index
+    
+    global theFile
+    set theFile [open $file.info "w"] 
+    puts $theFile ""
+    dumpInfo Top Top $up "" ""
+    dumpIndex
+    close $theFile
+    puts "$file.info created"
+} else {
+    puts "Cannot open $file for reading"
+}
+
+
diff --git a/src/DrawResources/wing.brep b/src/DrawResources/wing.brep
deleted file mode 100644
index 00c426f..0000000
--- a/src/DrawResources/wing.brep
+++ /dev/null
@@ -1,404 +0,0 @@
-DBRep_DrawableShape
-
-CASCADE Topology V1, (c) Matra-Datavision
-Locations 0
-Curve2ds 16
-1 0 0 0 1 
-1 0 0 1 0 
-1 1 0 0 1 
-1 0 1 1 0 
-1 0 0 0 1 
-1 0 0 1 0 
-1 1 0 0 1 
-1 0 1 1 0 
-1 0 0 0 1 
-1 0 0 1 0 
-1 1 0 0 1 
-1 0 1 1 0 
-1 0 0 0 1 
-1 0 0 1 0 
-1 1 0 0 1 
-1 0 1 1 0 
-Curves 16
-7 0 0  1 2 2  3.3500000000000001 0 0.84999599999999997  3.0956649999999999 3.3199999999999998 0.849997 
- 0 2 1 2
-7 0 0  7 8 2  3.3500000000000001 0 0.84999599999999997  2.5594269999999999 0 1.0545310000000001  2.9291839999999998 0 0.94117300000000004  2.224526 0 1.0736730000000001  2.2209889999999999 0 0.96156200000000003  1.9382239999999999 0 0.984595  1.850238 0 0.91910099999999995  1.8500000000000001 0 0.84999999999999998 
- 0 8 1 8
-7 0 0  1 2 2  1.8500000000000001 0 0.84999999999999998  1.7956650000000001 3.3199999999999998 0.84999999999999998 
- 0 2 1 2
-7 0 0  7 8 2  3.0956649999999999 3.3199999999999998 0.849997  2.4105020000000001 3.3199999999999998 1.0272600000000001  2.7309580000000002 3.3199999999999998 0.92901699999999998  2.1202549999999998 3.3199999999999998 1.0438499999999999  2.1171880000000001 3.3199999999999998 0.94668699999999995  1.872126 3.3199999999999998 0.96664899999999998  1.795871 3.3199999999999998 0.909887  1.7956650000000001 3.3199999999999998 0.84999999999999998 
- 0 8 1 8
-7 0 0  1 2 2  1.8500000000000001 0 0.84999999999999998  1.7956650000000001 3.3199999999999998 0.84999999999999998 
- 0 2 1 2
-7 0 0  8 9 2  1.8500000000000001 0 0.84999999999999998  1.8497189999999999 0 0.76831300000000002  2.1391040000000001 0 0.76218600000000003  2.558659 0 0.68765799999999999  2.970672 0 0.84048500000000004  2.512594 0 0.70602500000000001  3.174499 0 0.87292999999999998  3.190143 0 0.84999999999999998  3.3500000000000001 0 0.84999599999999997 
- 0 9 1 9
-7 0 0  1 2 2  3.3500000000000001 0 0.84999599999999997  3.0956649999999999 3.3199999999999998 0.849997 
- 0 2 1 2
-7 0 0  8 9 2  1.7956650000000001 3.3199999999999998 0.84999999999999998  1.7954209999999999 3.3199999999999998 0.77920500000000004  2.0462220000000002 3.3199999999999998 0.773895  2.4098359999999999 3.3199999999999998 0.70930300000000002  2.7669139999999999 3.3199999999999998 0.841754  2.3699129999999999 3.3199999999999998 0.72522200000000003  2.9435639999999998 3.3199999999999998 0.86987300000000001  2.9571230000000002 3.3199999999999998 0.84999999999999998  3.0956649999999999 3.3199999999999998 0.849997 
- 0 9 1 9
-7 0 0  1 2 2  3.0956649999999999 3.3199999999999998 0.849997  2.4870429999999999 4.75 1.180139 
- 0 2 1 2
-7 0 0  7 8 2  3.0956649999999999 3.3199999999999998 0.849997  2.4105020000000001 3.3199999999999998 1.0272600000000001  2.7309580000000002 3.3199999999999998 0.92901699999999998  2.1202549999999998 3.3199999999999998 1.0438499999999999  2.1171880000000001 3.3199999999999998 0.94668699999999995  1.872126 3.3199999999999998 0.96664899999999998  1.795871 3.3199999999999998 0.909887  1.7956650000000001 3.3199999999999998 0.84999999999999998 
- 0 8 1 8
-7 0 0  1 2 2  1.7956650000000001 3.3199999999999998 0.84999999999999998  1.9370430000000001 4.75 1.1801410000000001 
- 0 2 1 2
-7 0 0  7 8 2  2.4870429999999999 4.75 1.180139  2.1971660000000002 4.75 1.2551349999999999  2.3327439999999999 4.75 1.213571  2.0743689999999999 4.75 1.262154  2.0730719999999998 4.75 1.221047  1.969392 4.75 1.229492  1.93713 4.75 1.2054769999999999  1.9370430000000001 4.75 1.1801410000000001 
- 0 8 1 8
-7 0 0  1 2 2  1.7956650000000001 3.3199999999999998 0.84999999999999998  1.9370430000000001 4.75 1.1801410000000001 
- 0 2 1 2
-7 0 0  8 9 2  1.7956650000000001 3.3199999999999998 0.84999999999999998  1.7954209999999999 3.3199999999999998 0.77920500000000004  2.0462220000000002 3.3199999999999998 0.773895  2.4098359999999999 3.3199999999999998 0.70930300000000002  2.7669139999999999 3.3199999999999998 0.841754  2.3699129999999999 3.3199999999999998 0.72522200000000003  2.9435639999999998 3.3199999999999998 0.86987300000000001  2.9571230000000002 3.3199999999999998 0.84999999999999998  3.0956649999999999 3.3199999999999998 0.849997 
- 0 9 1 9
-7 0 0  1 2 2  3.0956649999999999 3.3199999999999998 0.849997  2.4870429999999999 4.75 1.180139 
- 0 2 1 2
-7 0 0  8 9 2  1.9370430000000001 4.75 1.1801410000000001  1.9369400000000001 4.75 1.1501889999999999  2.0430480000000002 4.75 1.147942  2.196885 4.75 1.1206149999999999  2.3479559999999999 4.75 1.176652  2.1799940000000002 4.75 1.1273500000000001  2.4226930000000002 4.75 1.1885479999999999  2.4284289999999999 4.75 1.1801410000000001  2.4870429999999999 4.75 1.180139 
- 0 9 1 9
-Polygon3D 0
-PolygonOnTriangulations 0
-Surfaces 4
-9 0 0 0 0 7 1 8 2 2 2 3.3500000000000001 0 0.84999599999999997  3.0956649999999999 3.3199999999999998 0.849997  
-2.5594269999999999 0 1.0545310000000001  2.4105020000000001 3.3199999999999998 1.0272600000000001  
-2.9291839999999998 0 0.94117300000000004  2.7309580000000002 3.3199999999999998 0.92901699999999998  
-2.224526 0 1.0736730000000001  2.1202549999999998 3.3199999999999998 1.0438499999999999  
-2.2209889999999999 0 0.96156200000000003  2.1171880000000001 3.3199999999999998 0.94668699999999995  
-1.9382239999999999 0 0.984595  1.872126 3.3199999999999998 0.96664899999999998  
-1.850238 0 0.91910099999999995  1.795871 3.3199999999999998 0.909887  
-1.8500000000000001 0 0.84999999999999998  1.7956650000000001 3.3199999999999998 0.84999999999999998  
-
-0 8
-1 8
-
-0 2
-1 2
-
-9 0 0 0 0 8 1 9 2 2 2 1.8500000000000001 0 0.84999999999999998  1.7956650000000001 3.3199999999999998 0.84999999999999998  
-1.8497189999999999 0 0.76831300000000002  1.7954209999999999 3.3199999999999998 0.77920500000000004  
-2.1391040000000001 0 0.76218600000000003  2.0462220000000002 3.3199999999999998 0.773895  
-2.558659 0 0.68765799999999999  2.4098359999999999 3.3199999999999998 0.70930300000000002  
-2.970672 0 0.84048500000000004  2.7669139999999999 3.3199999999999998 0.841754  
-2.512594 0 0.70602500000000001  2.3699129999999999 3.3199999999999998 0.72522200000000003  
-3.174499 0 0.87292999999999998  2.9435639999999998 3.3199999999999998 0.86987300000000001  
-3.190143 0 0.84999999999999998  2.9571230000000002 3.3199999999999998 0.84999999999999998  
-3.3500000000000001 0 0.84999599999999997  3.0956649999999999 3.3199999999999998 0.849997  
-
-0 9
-1 9
-
-0 2
-1 2
-
-9 0 0 0 0 7 1 8 2 2 2 3.0956649999999999 3.3199999999999998 0.849997  2.4870429999999999 4.75 1.180139  
-2.4105020000000001 3.3199999999999998 1.0272600000000001  2.1971660000000002 4.75 1.2551349999999999  
-2.7309580000000002 3.3199999999999998 0.92901699999999998  2.3327439999999999 4.75 1.213571  
-2.1202549999999998 3.3199999999999998 1.0438499999999999  2.0743689999999999 4.75 1.262154  
-2.1171880000000001 3.3199999999999998 0.94668699999999995  2.0730719999999998 4.75 1.221047  
-1.872126 3.3199999999999998 0.96664899999999998  1.969392 4.75 1.229492  
-1.795871 3.3199999999999998 0.909887  1.93713 4.75 1.2054769999999999  
-1.7956650000000001 3.3199999999999998 0.84999999999999998  1.9370430000000001 4.75 1.1801410000000001  
-
-0 8
-1 8
-
-0 2
-1 2
-
-9 0 0 0 0 8 1 9 2 2 2 1.7956650000000001 3.3199999999999998 0.84999999999999998  1.9370430000000001 4.75 1.1801410000000001  
-1.7954209999999999 3.3199999999999998 0.77920500000000004  1.9369400000000001 4.75 1.1501889999999999  
-2.0462220000000002 3.3199999999999998 0.773895  2.0430480000000002 4.75 1.147942  
-2.4098359999999999 3.3199999999999998 0.70930300000000002  2.196885 4.75 1.1206149999999999  
-2.7669139999999999 3.3199999999999998 0.841754  2.3479559999999999 4.75 1.176652  
-2.3699129999999999 3.3199999999999998 0.72522200000000003  2.1799940000000002 4.75 1.1273500000000001  
-2.9435639999999998 3.3199999999999998 0.86987300000000001  2.4226930000000002 4.75 1.1885479999999999  
-2.9571230000000002 3.3199999999999998 0.84999999999999998  2.4284289999999999 4.75 1.1801410000000001  
-3.0956649999999999 3.3199999999999998 0.849997  2.4870429999999999 4.75 1.180139  
-
-0 9
-1 9
-
-0 2
-1 2
-
-Triangulations 0
-
-TShapes 41
-Ve
-1e-07
-3.35 0 0.849996
-0 0
-
-0101100
-*
-Ve
-1e-07
-3.095665 3.32 0.849997
-0 0
-
-0101100
-*
-Ed
- 1e-07 1 1 0
-1  1 0 0 1
-2  1 1 0 0 1
-0
-
-0101000
-+41 0 -40 0 *
-Ve
-1e-07
-1.85 0 0.849999999999998
-0 0
-
-0101100
-*
-Ed
- 1e-07 1 1 0
-1  2 0 0 1
-2  2 1 0 0 1
-0
-
-0101000
-+41 0 -38 0 *
-Ve
-1e-07
-1.795665 3.32 0.849999999999998
-0 0
-
-0101100
-*
-Ed
- 1e-07 1 1 0
-1  3 0 0 1
-2  3 1 0 0 1
-0
-
-0101000
-+38 0 -36 0 *
-Ed
- 1e-07 1 1 0
-1  4 0 0 1
-2  4 1 0 0 1
-0
-
-0101000
-+40 0 -36 0 *
-Wi
-
-0101100
--39 0 +37 0 +35 0 -34 0 *
-Fa
-1  1e-07 1 0
-
-0111000
-+33 0 *
-Ve
-1e-07
-1.85 0 0.85
-0 0
-
-0101100
-*
-Ve
-1e-07
-1.795665 3.32 0.85
-0 0
-
-0101100
-*
-Ed
- 1e-07 1 1 0
-1  5 0 0 1
-2  5 2 0 0 1
-0
-
-0101000
-+31 0 -30 0 *
-Ve
-1e-07
-3.35000000000001 0 0.849996000000003
-0 0
-
-0101100
-*
-Ed
- 1e-07 1 1 0
-1  6 0 0 1
-2  6 2 0 0 1
-0
-
-0101000
-+31 0 -28 0 *
-Ve
-1e-07
-3.09566500000001 3.32 0.849997000000003
-0 0
-
-0101100
-*
-Ed
- 1e-07 1 1 0
-1  7 0 0 1
-2  7 2 0 0 1
-0
-
-0101000
-+28 0 -26 0 *
-Ed
- 1e-07 1 1 0
-1  8 0 0 1
-2  8 2 0 0 1
-0
-
-0101000
-+30 0 -26 0 *
-Wi
-
-0101100
--29 0 +27 0 +25 0 -24 0 *
-Fa
-1  1e-07 2 0
-
-0111000
-+23 0 *
-Ve
-1e-07
-3.095665 3.32 0.849997
-0 0
-
-0101100
-*
-Ve
-1e-07
-2.487043 4.75 1.180139
-0 0
-
-0101100
-*
-Ed
- 1e-07 1 1 0
-1  9 0 0 1
-2  9 3 0 0 1
-0
-
-0101000
-+21 0 -20 0 *
-Ve
-1e-07
-1.79566500000001 3.32 0.850000000000001
-0 0
-
-0101100
-*
-Ed
- 1e-07 1 1 0
-1  10 0 0 1
-2  10 3 0 0 1
-0
-
-0101000
-+21 0 -18 0 *
-Ve
-1e-07
-1.93704300000001 4.75 1.180141
-0 0
-
-0101100
-*
-Ed
- 1e-07 1 1 0
-1  11 0 0 1
-2  11 3 0 0 1
-0
-
-0101000
-+18 0 -16 0 *
-Ed
- 1e-07 1 1 0
-1  12 0 0 1
-2  12 3 0 0 1
-0
-
-0101000
-+20 0 -16 0 *
-Wi
-
-0101100
--19 0 +17 0 +15 0 -14 0 *
-Fa
-1  1e-07 3 0
-
-0111000
-+13 0 *
-Ve
-1e-07
-1.795665 3.32 0.85
-0 0
-
-0101100
-*
-Ve
-1e-07
-1.937043 4.75 1.180141
-0 0
-
-0101100
-*
-Ed
- 1e-07 1 1 0
-1  13 0 0 1
-2  13 4 0 0 1
-0
-
-0101000
-+11 0 -10 0 *
-Ve
-1e-07
-3.09566499999999 3.32 0.849997000000002
-0 0
-
-0101100
-*
-Ed
- 1e-07 1 1 0
-1  14 0 0 1
-2  14 4 0 0 1
-0
-
-0101000
-+11 0 -8 0 *
-Ve
-1e-07
-2.487043 4.75 1.180139
-0 0
-
-0101100
-*
-Ed
- 1e-07 1 1 0
-1  15 0 0 1
-2  15 4 0 0 1
-0
-
-0101000
-+8 0 -6 0 *
-Ed
- 1e-07 1 1 0
-1  16 0 0 1
-2  16 4 0 0 1
-0
-
-0101000
-+10 0 -6 0 *
-Wi
-
-0101100
--9 0 +7 0 +5 0 -4 0 *
-Fa
-1  1e-07 4 0
-
-0111000
-+3 0 *
-Co
-
-1100000
-+32 0 +22 0 +12 0 +2 0 *
-
-+1 0 
diff --git a/src/DsgPrs/DsgPrs.cxx b/src/DsgPrs/DsgPrs.cxx
index f1af9b0..2427da7 100644
--- a/src/DsgPrs/DsgPrs.cxx
+++ b/src/DsgPrs/DsgPrs.cxx
@@ -322,7 +322,7 @@ void DsgPrs::ComputePlanarFacesLengthPresentation( const Standard_Real FirstArro
   EndOfArrow1 = ElCLib::Value( ElCLib::Parameter( FirstLin, OffsetPoint ), FirstLin );
   EndOfArrow2 = ElCLib::Value( ElCLib::Parameter( SecondLin, OffsetPoint ), SecondLin );
  
-  if (EndOfArrow1.SquareDistance( EndOfArrow2 ) > Precision::Confusion()*Precision::Confusion()) // not null length
+  if (EndOfArrow1.SquareDistance( EndOfArrow2 ) > Precision::SquareConfusion()) // not null length
     {
       gp_Dir LengthDir( gp_Vec( EndOfArrow1, EndOfArrow2 ) );
       if ((FirstArrowLength + SecondArrowLength)*(FirstArrowLength + SecondArrowLength) < 
@@ -359,7 +359,7 @@ void DsgPrs::ComputeCurvilinearFacesLengthPresentation( const Standard_Real Firs
   GeomAPI_ProjectPointOnCurve ProjectorOnCurve;
   Quantity_Parameter U1, V1, U2, V2;
   Standard_Real LastU, LastV;
-  Standard_Real SquareTolerance = Precision::Confusion()*Precision::Confusion();
+  Standard_Real SquareTolerance = Precision::SquareConfusion();
 
   ProjectorOnSurface.Init( AttachmentPoint1, SecondSurf );
   Standard_Integer Index(1);
@@ -391,7 +391,7 @@ void DsgPrs::ComputeCurvilinearFacesLengthPresentation( const Standard_Real Firs
   else
     DirOfArrow1 = DirAttach;
 
-  if (EndOfArrow2.SquareDistance( AttachmentPoint2 ) > Precision::Confusion()*Precision::Confusion())
+  if (EndOfArrow2.SquareDistance( AttachmentPoint2 ) > Precision::SquareConfusion())
     {
       VCurve = SecondSurf->VIso( V1 );
       ProjectorOnCurve.Init( EndOfArrow2, VCurve );
diff --git a/src/DsgPrs/DsgPrs_EqualDistancePresentation.cxx b/src/DsgPrs/DsgPrs_EqualDistancePresentation.cxx
index f6ed6de..f0d7723 100644
--- a/src/DsgPrs/DsgPrs_EqualDistancePresentation.cxx
+++ b/src/DsgPrs/DsgPrs_EqualDistancePresentation.cxx
@@ -94,7 +94,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
     {
       gp_Vec Vec1( Middle, Point1 );
 
-      if (Vec1.SquareMagnitude() > Precision::Confusion()*Precision::Confusion())
+      if (Vec1.SquareMagnitude() > Precision::SquareConfusion())
 	{
 	  Standard_Real Angle = gp_Vec( Middle, Point1 ).Angle( gp_Vec( Middle, Point3 ) );
 	  gp_Pnt MidPnt = Point1.Rotated( Plane->Pln().Axis(), Angle*0.5 );
diff --git a/src/ElSLib/ElSLib.cxx b/src/ElSLib/ElSLib.cxx
index 27df296..b741441 100644
--- a/src/ElSLib/ElSLib.cxx
+++ b/src/ElSLib/ElSLib.cxx
@@ -1644,6 +1644,14 @@ gp_Circ  ElSLib::SphereVIso(const gp_Ax3& Pos,
   Ve.Multiply(Radius * sin(V));
   axes.Translate(Ve);
   Standard_Real radius = Radius * cos(V);
+  // #23170: if V is even slightly (e.g. by double epsilon) greater than PI/2,
+  // radius will become negative and constructor of gp_Circ will raise exception.
+  // Lets try to create correct isoline even on analytical continuation for |V| > PI/2...
+  if (radius < 0.)
+  {
+    axes.SetDirection (-axes.Direction());
+    radius = -radius;
+  }
   gp_Circ Circ(axes,radius);
   return Circ;
 }
diff --git a/src/ExprIntrp/ExprIntrp.lex b/src/ExprIntrp/ExprIntrp.lex
index ae6fa2a..c1411a2 100644
--- a/src/ExprIntrp/ExprIntrp.lex
+++ b/src/ExprIntrp/ExprIntrp.lex
@@ -36,6 +36,7 @@ void ExprIntrp_start_string(char* str)
 void ExprIntrp_stop_string()
 {
   ExprIntrp_delete_buffer(ExprIntrp_bufstring);
+  ExprIntrp_bufstring = (YY_BUFFER_STATE) 0;
 }
 
 int yywrap()
diff --git a/src/Extrema/Extrema_ExtPElC.cxx b/src/Extrema/Extrema_ExtPElC.cxx
index 9686069..a3e9c64 100644
--- a/src/Extrema/Extrema_ExtPElC.cxx
+++ b/src/Extrema/Extrema_ExtPElC.cxx
@@ -401,7 +401,7 @@ Method:
       Cu = ElCLib::Value(Us,C);
       DejaEnr = Standard_False;
       for (NoExt = 0; NoExt < myNbExt; NoExt++) {
-	if (TbExt[NoExt].SquareDistance(Cu) < Precision::Confusion() * Precision::Confusion()) {
+    if (TbExt[NoExt].SquareDistance(Cu) < Precision::SquareConfusion()) {
 	  DejaEnr = Standard_True;
 	  break;
 	}
diff --git a/src/Extrema/Extrema_ExtPRevS.cxx b/src/Extrema/Extrema_ExtPRevS.cxx
index 90bcdef..a4fab0f 100644
--- a/src/Extrema/Extrema_ExtPRevS.cxx
+++ b/src/Extrema/Extrema_ExtPRevS.cxx
@@ -88,11 +88,11 @@ static Standard_Boolean HasSingularity(const Adaptor3d_SurfaceOfRevolution& S)
 
   P = C->Value(C->FirstParameter());
 
-  if(L.SquareDistance(P) < Precision::Confusion() * Precision::Confusion()) return Standard_True;
+  if(L.SquareDistance(P) < Precision::SquareConfusion()) return Standard_True;
 
   P = C->Value(C->LastParameter());
 
-  if(L.SquareDistance(P) < Precision::Confusion() * Precision::Confusion()) return Standard_True;
+  if(L.SquareDistance(P) < Precision::SquareConfusion()) return Standard_True;
   
   return Standard_False;
 }
diff --git a/src/Extrema/Extrema_ExtPS.cxx b/src/Extrema/Extrema_ExtPS.cxx
index ed4d304..cfcf009 100644
--- a/src/Extrema/Extrema_ExtPS.cxx
+++ b/src/Extrema/Extrema_ExtPS.cxx
@@ -60,41 +60,43 @@ static Standard_Boolean IsoIsDeg  (const Adaptor3d_Surface& S,
     Standard_Real Step,D1NormMax;
     if (IT == GeomAbs_IsoV) 
     {
-      Step = (U2 - U1)/10;
-      if(Step < Precision::PConfusion()) {
-        return Standard_False;
-      }
-      if(Step < Precision::PConfusion()) {
-        return Standard_False;
-      }
-      D1NormMax=0.;
-      for (T=U1;T<=U2;T=T+Step) 
+      if( !Precision::IsInfinite(U1) &&  !Precision::IsInfinite(U2) )
       {
-        S.D1(T,Param,P,D1U,D1V);
-        D1NormMax=Max(D1NormMax,D1U.Magnitude());
+        Step = (U2 - U1)/10;
+        if(Step < Precision::PConfusion()) {
+          return Standard_False;
+        }
+        D1NormMax=0.;
+
+        for (T=U1;T<=U2;T=T+Step) 
+        {
+          S.D1(T,Param,P,D1U,D1V);
+          D1NormMax=Max(D1NormMax,D1U.Magnitude());
+        }
+
+        if (D1NormMax >TolMax || D1NormMax < TolMin ) 
+          Along = Standard_False;
       }
-
-      if (D1NormMax >TolMax || D1NormMax < TolMin ) 
-           Along = Standard_False;
     }
     else 
     {
-      Step = (V2 - V1)/10;
-      if(Step < Precision::PConfusion()) {
-        return Standard_False;
-      }
-      if(Step < Precision::PConfusion()) {
-        return Standard_False;
-      }
-      D1NormMax=0.;
-      for (T=V1;T<=V2;T=T+Step) 
+      if( !Precision::IsInfinite(V1) &&  !Precision::IsInfinite(V2) )
       {
-	S.D1(Param,T,P,D1U,D1V);
-        D1NormMax=Max(D1NormMax,D1V.Magnitude());
+        Step = (V2 - V1)/10;
+        if(Step < Precision::PConfusion()) {
+          return Standard_False;
+        }
+        D1NormMax=0.;
+        for (T=V1;T<=V2;T=T+Step) 
+        {
+          S.D1(Param,T,P,D1U,D1V);
+          D1NormMax=Max(D1NormMax,D1V.Magnitude());
+        }
+
+        if (D1NormMax >TolMax || D1NormMax < TolMin ) 
+          Along = Standard_False;
       }
 
-      if (D1NormMax >TolMax || D1NormMax < TolMin ) 
-           Along = Standard_False;
 
 
     }
@@ -240,14 +242,7 @@ void Extrema_ExtPS::Perform(const gp_Pnt& P)
   myPoints.Clear();
   mySqDist.Clear();
   Standard_Integer i;
-  P11 = myS->Value(myuinf, myvinf);
-  P12 = myS->Value(myuinf, myvsup);
-  P21 = myS->Value(myusup, myvinf);
-  P22 = myS->Value(myusup, myvsup);
-  d11 = P.SquareDistance(P11);
-  d12 = P.SquareDistance(P12);
-  d21 = P.SquareDistance(P21);
-  d22 = P.SquareDistance(P22);
+  
   
   switch(mytype) {
     
diff --git a/src/Extrema/Extrema_FuncExtCS.cxx b/src/Extrema/Extrema_FuncExtCS.cxx
index bb64b83..ec8764a 100644
--- a/src/Extrema/Extrema_FuncExtCS.cxx
+++ b/src/Extrema/Extrema_FuncExtCS.cxx
@@ -23,6 +23,7 @@
 #include <Extrema_FuncExtCS.ixx>
 #include <gp_Vec.hxx>
 #include <Standard_TypeMismatch.hxx>
+#include <Precision.hxx>
 
 /*-----------------------------------------------------------------------------
  Fonction permettant de rechercher une distance extremale entre une courbe C 
@@ -209,7 +210,17 @@ Standard_Integer Extrema_FuncExtCS::GetStateNumber()
   Value(UVSol, Sol);
   cout <<"F(1)= "<<Sol(1)<<" F(2)= "<<Sol(2)<<" F(3)= "<<Sol(3)<<endl;
 #endif
-
+  //comparison of solution with previous solutions
+  Standard_Real tol2d = Precision::PConfusion() * Precision::PConfusion();
+  Standard_Integer i = 1, nbSol = mySqDist.Length();
+  for( ; i <=  nbSol; i++)
+  {
+    Standard_Real aU = myPoint1(i).Parameter();
+    if( (myU - aU) * (myU - aU) <= tol2d )
+      break;
+  }
+  if (i <= nbSol)
+    return 0;
   mySqDist.Append(myP1.SquareDistance(myP2));
   myPoint1.Append(Extrema_POnCurv(myt,myP1));
   myPoint2.Append(Extrema_POnSurf(myU,myV,myP2));
diff --git a/src/Extrema/Extrema_FuncExtPS.cxx b/src/Extrema/Extrema_FuncExtPS.cxx
index 611df8f..f80d35e 100644
--- a/src/Extrema/Extrema_FuncExtPS.cxx
+++ b/src/Extrema/Extrema_FuncExtPS.cxx
@@ -128,6 +128,19 @@ Standard_Boolean Extrema_FuncExtPS::Values (const math_Vector& UV,
 Standard_Integer Extrema_FuncExtPS::GetStateNumber ()
 {
   if (!myPinit || !mySinit) Standard_TypeMismatch::Raise();
+  //comparison of solution with previous solutions
+  Standard_Integer i = 1, nbSol = mySqDist.Length();
+  Standard_Real tol2d = Precision::PConfusion() * Precision::PConfusion();
+   
+  for( ; i <=  nbSol; i++)
+  {
+    Standard_Real aU, aV;
+	myPoint(i).Parameter(aU, aV);
+	if( ((myU - aU ) * (myU - aU ) + (myV - aV ) * (myV - aV )) <= tol2d )
+      break;
+  }
+  if( i <= nbSol)
+	  return 0;
   mySqDist.Append(myPs.SquareDistance(myP));
   myPoint.Append(Extrema_POnSurf(myU,myV,myPs));
   return 0;
diff --git a/src/Extrema/Extrema_GenExtPS.cdl b/src/Extrema/Extrema_GenExtPS.cdl
index 67f7d50..30067b8 100644
--- a/src/Extrema/Extrema_GenExtPS.cdl
+++ b/src/Extrema/Extrema_GenExtPS.cdl
@@ -36,7 +36,8 @@ uses  	POnSurf       from Extrema,
 	ExtAlgo from Extrema,
 	HArray1OfSphere from Bnd,
 	Vector        from math,
-	HArray2OfPnt from TColgp
+	HArray2OfPnt from TColgp,
+	HArray1OfReal from TColStd
 
 raises  NotDone      from StdFail,
     	OutOfRange   from Standard,
@@ -137,8 +138,15 @@ is
     BuildTree(me : in out)
     is static private;
     
-    FindSolution(me: in out; P : Pnt from gp; UV : Vector from math; PasU, PasV : Real; f : ExtFlag from Extrema)
+    FindSolution(me: in out; P : Pnt from gp; UV : Vector from math; theNoU, theNoV : Integer; f : ExtFlag from Extrema)
     is static private;
+    
+    GetGridPoints(me: in out;  theSurf: Surface from Adaptor3d) is private;
+    	---Purpose: Selection of points to build grid, depending on the type of surface
+    
+    BuildGrid(me: in out) is private;
+    	---Purpose: Creation of grid of parametric points
+  
 
 fields
     myDone    : Boolean;
@@ -158,5 +166,7 @@ fields
     myS       : SurfacePtr from Adaptor3d;
     myFlag    : ExtFlag from Extrema;
     myAlgo    : ExtAlgo from Extrema;
+    myUParams : HArray1OfReal from TColStd;
+    myVParams : HArray1OfReal from TColStd;
 
 end GenExtPS;
diff --git a/src/Extrema/Extrema_GenExtPS.cxx b/src/Extrema/Extrema_GenExtPS.cxx
index 6ae866d..adc0874 100644
--- a/src/Extrema/Extrema_GenExtPS.cxx
+++ b/src/Extrema/Extrema_GenExtPS.cxx
@@ -37,7 +37,16 @@
 #include <Extrema_ExtFlag.hxx>
 #include <Bnd_Array1OfSphere.hxx>
 #include <Bnd_HArray1OfSphere.hxx>
-
+#include <Precision.hxx>
+#include <Geom_OffsetSurface.hxx>
+#include <Geom_RectangularTrimmedSurface.hxx>
+#include <Geom_BSplineSurface.hxx>
+#include <Geom_BezierSurface.hxx>
+#include <Adaptor3d_HSurface.hxx>
+#include <Adaptor3d_HCurve.hxx>
+#include <Adaptor3d_Curve.hxx>
+#include <Geom_BSplineCurve.hxx>
+#include <Geom_BezierCurve.hxx>
 //IMPLEMENT_HARRAY1(Extrema_HArray1OfSphere)
 
 
@@ -279,7 +288,6 @@ void Extrema_GenExtPS::Initialize(const Adaptor3d_Surface& S,
 				  const Standard_Real    TolU, 
 				  const Standard_Real    TolV)
 {
-  myInit = Standard_True;
   myS = (Adaptor3d_SurfacePtr)&S;
   myusample = NbU;
   myvsample = NbV;
@@ -296,35 +304,191 @@ void Extrema_GenExtPS::Initialize(const Adaptor3d_Surface& S,
   myF.Initialize(S);
 
   mySphereUBTree.Nullify();
+  myUParams.Nullify();
+  myVParams.Nullify();
+  myInit = Standard_False;
+}
 
-  if(myAlgo == Extrema_ExtAlgo_Grad)
+inline static void fillParams(const TColStd_Array1OfReal& theKnots,
+                              Standard_Integer theDegree,
+                              Standard_Real theParMin,
+                              Standard_Real theParMax,
+                              Handle_TColStd_HArray1OfReal& theParams,
+                              Standard_Integer theSample)
+{
+  NCollection_Vector<Standard_Real> aParams;
+  Standard_Integer i = 1;
+  Standard_Real aPrevPar = theParMin;
+  aParams.Append(aPrevPar);
+  //calculation the array of parametric points depending on the knots array variation and degree of given surface
+  for ( ; i <  theKnots.Length() && theKnots(i) < (theParMax - Precision::PConfusion()); i++ )
   {
-	  //If flag was changed and extrema not reinitialized Extrema would fail
-    mypoints = new TColgp_HArray2OfPnt(0,myusample+1,0,myvsample+1);
-  Standard_Real PasU = myusup - myumin;
-  Standard_Real PasV = myvsup - myvmin;
-  Standard_Real U0 = PasU / myusample / 100.;
-  Standard_Real V0 = PasV / myvsample / 100.;
-  gp_Pnt P1;
-  PasU = (PasU - U0) / (myusample - 1);
-  PasV = (PasV - V0) / (myvsample - 1);
-  U0 = U0/2. + myumin;
-  V0 = V0/2. + myvmin;
+    if (  theKnots(i+1) < theParMin + Precision::PConfusion())
+      continue;
+
+    Standard_Real aStep = (theKnots(i+1) - theKnots(i))/Max(theDegree,2);
+    Standard_Integer k =1;
+    for( ; k <= theDegree ; k++)
+    {
+      Standard_Real aPar = theKnots(i) + k * aStep;
+      if(aPar > theParMax - Precision::PConfusion())
+        break;
+      if(aPar > aPrevPar + Precision::PConfusion() )
+      {
+        aParams.Append(aPar);
+        aPrevPar = aPar;
+      }
+    }
+
+  }
+  aParams.Append(theParMax);
+  Standard_Integer nbPar = aParams.Length();
+  //in case of an insufficient number of points the grid will be built later 
+  if (nbPar < theSample)
+    return;
+  theParams = new TColStd_HArray1OfReal(1, nbPar );
+  for( i = 0; i < nbPar; i++)
+    theParams->SetValue(i+1,aParams(i));
+}
+
+void Extrema_GenExtPS::GetGridPoints( const Adaptor3d_Surface& theSurf)
+{
+  //creation parametric points for BSpline and Bezier surfaces
+  //with taking into account of Degree and NbKnots of BSpline or Bezier geometry
+  if(theSurf.GetType() == GeomAbs_OffsetSurface)
+    GetGridPoints(theSurf.BasisSurface()->Surface());
+  //parametric points for BSpline surfaces
+  else if( theSurf.GetType() == GeomAbs_BSplineSurface) 
+  {
+    Handle(Geom_BSplineSurface) aBspl = theSurf.BSpline();
+    if(!aBspl.IsNull())
+    {
+      TColStd_Array1OfReal aUKnots(1, aBspl->NbUKnots());
+      aBspl->UKnots( aUKnots);
+      TColStd_Array1OfReal aVKnots(1, aBspl->NbVKnots());
+      aBspl->VKnots( aVKnots);
+      fillParams(aUKnots,aBspl->UDegree(),myumin, myusup, myUParams, myusample);
+      fillParams(aVKnots,aBspl->VDegree(),myvmin, myvsup, myVParams, myvsample);
+    }
+  }
+  //calculation parametric points for Bezier surfaces
+  else if(theSurf.GetType() == GeomAbs_BezierSurface)
+  {
+    Handle(Geom_BezierSurface) aBezier = theSurf.Bezier();
+    if(aBezier.IsNull())
+      return;
+
+    TColStd_Array1OfReal aUKnots(1,2);
+    TColStd_Array1OfReal aVKnots(1,2);
+    aBezier->Bounds(aUKnots(1), aUKnots(2), aVKnots(1), aVKnots(2));
+    fillParams(aUKnots, aBezier->UDegree(), myumin, myusup, myUParams, myusample);
+    fillParams(aVKnots, aBezier->VDegree(), myvmin, myvsup, myVParams, myvsample);
+
+  }
+  //creation points for surfaces based on BSpline or Bezier curves
+  else if(theSurf.GetType() == GeomAbs_SurfaceOfRevolution || 
+    theSurf.GetType() == GeomAbs_SurfaceOfExtrusion)
+  {
+    Handle(TColStd_HArray1OfReal) anArrKnots;
+    Standard_Integer aDegree = 0;
+    GeomAbs_CurveType aType = theSurf.BasisCurve()->Curve().GetType();
+    if(theSurf.BasisCurve()->Curve().GetType() == GeomAbs_BSplineCurve)
+    {
+      Handle(Geom_BSplineCurve) aBspl = theSurf.BasisCurve()->Curve().BSpline();
+      if(!aBspl.IsNull())
+      {
+        anArrKnots = new TColStd_HArray1OfReal(1,aBspl->NbKnots());
+        aBspl->Knots( anArrKnots->ChangeArray1() );
+        aDegree = aBspl->Degree();
+        
+      }
+
+    }
+    if(theSurf.BasisCurve()->Curve().GetType() == GeomAbs_BezierCurve)
+    {
+      Handle(Geom_BezierCurve) aBez = theSurf.BasisCurve()->Curve().Bezier();
+      if(!aBez.IsNull())
+      {
+        anArrKnots = new TColStd_HArray1OfReal(1,2);
+        anArrKnots->SetValue(1, aBez->FirstParameter());
+        anArrKnots->SetValue(2, aBez->LastParameter());
+        aDegree = aBez->Degree();
+        
+      }
+    }
+    if(anArrKnots.IsNull())
+      return;
+    if( theSurf.GetType() == GeomAbs_SurfaceOfRevolution )
+      fillParams( anArrKnots->Array1(), aDegree, myvmin, myvsup, myVParams, myvsample);
+    else
+      fillParams( anArrKnots->Array1(), aDegree, myumin, myusup, myUParams, myusample);
+  }
+  //update the number of points in sample
+  if(!myUParams.IsNull())
+    myusample = myUParams->Length();
+  if( !myVParams.IsNull())
+    myvsample = myVParams->Length();
+  
+}
+
+void Extrema_GenExtPS::BuildGrid()
+{
+  //if grid was already built do nothing
+  if(myInit)
+    return;
+  
+  //build parametric grid in case of a complex surface geometry (BSpline and Bezier surfaces)
+ GetGridPoints(*myS);
+  
+  //build grid in other cases 
+  if( myUParams.IsNull() )
+  {
+    Standard_Real PasU = myusup - myumin;
+    Standard_Real U0 = PasU / myusample / 100.;
+    PasU = (PasU - U0) / (myusample - 1);
+    U0 = U0/2. + myumin;
+    myUParams = new TColStd_HArray1OfReal(1,myusample );
+    Standard_Integer NoU;
+    Standard_Real U = U0;
+    for ( NoU = 1 ; NoU <= myusample; NoU++, U += PasU) 
+      myUParams->SetValue(NoU, U);
 
-// Calculation of distances
+  }
+
+  if( myVParams.IsNull())
+  {
+    Standard_Real PasV = myvsup - myvmin;
+    Standard_Real V0 = PasV / myvsample / 100.;
+    PasV = (PasV - V0) / (myvsample - 1);
+    V0 = V0/2. + myvmin;
+    
+    myVParams = new TColStd_HArray1OfReal(1,myvsample );
+    Standard_Integer  NoV;
+    Standard_Real V = V0;
+   
+    for ( NoV = 1, V = V0; NoV <= myvsample; NoV++, V += PasV)
+      myVParams->SetValue(NoV, V);
+  }
+  //If flag was changed and extrema not reinitialized Extrema would fail
+  mypoints = new TColgp_HArray2OfPnt(0,myusample+1,0,myvsample+1);
+  // Calculation of distances
 
   Standard_Integer NoU, NoV;
-  Standard_Real U, V;
-  for ( NoU = 1, U = U0; NoU <= myusample; NoU++, U += PasU) {
-    for ( NoV = 1, V = V0; NoV <= myvsample; NoV++, V += PasV) {
-      P1 = myS->Value(U, V);
+ 
+  for ( NoU = 1 ; NoU <= myusample; NoU++ ) {
+    for ( NoV = 1 ; NoV <= myvsample; NoV++) {
+      gp_Pnt P1 = myS->Value(myUParams->Value(NoU), myVParams->Value(NoV));
       mypoints->SetValue(NoU,NoV,P1);
     }
   }
-  }
+  
+  myInit = Standard_True;
+}
+
 
-  //mypoints = new TColgp_HArray2OfPnt(0,myusample+1,0,myvsample+1);
 
+
+  
 /*
 a- Constitution of the table of distances (TbDist(0,myusample+1,0,myvsample+1)):
    ---------------------------------------------------------------
@@ -332,9 +496,6 @@ a- Constitution of the table of distances (TbDist(0,myusample+1,0,myvsample+1)):
 
 // Parameterisation of the sample
 
-
-}
-
 void Extrema_GenExtPS::BuildTree()
 {
   // if tree already exists, assume it is already correctly filled
@@ -351,16 +512,26 @@ void Extrema_GenExtPS::BuildTree()
   U0 = U0/2. + myumin;
   V0 = V0/2. + myvmin;
 
+  //build grid of parametric points 
+  myUParams = new TColStd_HArray1OfReal(1,myusample );
+  myVParams = new TColStd_HArray1OfReal(1,myvsample );
+  Standard_Integer NoU, NoV;
+  Standard_Real U = U0, V = V0;
+  for ( NoU = 1 ; NoU <= myusample; NoU++, U += PasU) 
+    myUParams->SetValue(NoU, U);
+  for ( NoV = 1, V = V0; NoV <= myvsample; NoV++, V += PasV)
+    myVParams->SetValue(NoV, V);
+
   // Calculation of distances
   mySphereUBTree = new Extrema_UBTreeOfSphere;
   Extrema_UBTreeFillerOfSphere aFiller(*mySphereUBTree);
   Standard_Integer i = 0;
-  Standard_Real U, V;
+  
   mySphereArray = new Bnd_HArray1OfSphere(0, myusample * myvsample);
-  Standard_Integer NoU, NoV;
-  for ( NoU = 1, U = U0; NoU <= myusample; NoU++, U += PasU) {
-    for ( NoV = 1, V = V0; NoV <= myvsample; NoV++, V += PasV) {
-      P1 = myS->Value(U, V);
+ 
+  for ( NoU = 1; NoU <= myusample; NoU++ ) {
+    for ( NoV = 1; NoV <= myvsample; NoV++) {
+      P1 = myS->Value(myUParams->Value(NoU), myVParams->Value(NoV));
       Bnd_Sphere aSph(P1.XYZ(), 0/*mytolu < mytolv ? mytolu : mytolv*/, NoU, NoV);
       aFiller.Add(i, aSph);
       mySphereArray->SetValue( i, aSph );
@@ -370,7 +541,10 @@ void Extrema_GenExtPS::BuildTree()
   aFiller.Fill();
 }
 
-void Extrema_GenExtPS::FindSolution(const gp_Pnt& P, const math_Vector& UV, const Standard_Real PasU, const Standard_Real PasV, const Extrema_ExtFlag f)
+void Extrema_GenExtPS::FindSolution(const gp_Pnt& P, 
+                                    const math_Vector& UV, 
+                                    const Standard_Integer theNoU, 
+                                    const Standard_Integer theNoV, const Extrema_ExtFlag f)
 {
   math_Vector Tol(1,2);
   Tol(1) = mytolu;
@@ -395,6 +569,7 @@ void Extrema_GenExtPS::FindSolution(const gp_Pnt& P, const math_Vector& UV, cons
   
   math_FunctionSetRoot S (myF,UV,Tol,UVinf,UVsup, aNbMaxIter);
   Standard_Boolean ToResolveOnSubgrid = Standard_False;
+  Standard_Boolean NewSolution = Standard_False;
   if (f == Extrema_ExtFlag_MIN)
   {
     if(S.IsDone())
@@ -404,46 +579,46 @@ void Extrema_GenExtPS::FindSolution(const gp_Pnt& P, const math_Vector& UV, cons
       gp_Pnt PSol = myS->Value(root(1), root(2));
       DistSol = P.SquareDistance(PSol);
       if(Abs(errors(1)) > eps || Abs(errors(2)) > eps || DistStart < DistSol)
+      {
         //try to improve solution on subgrid of sample points
         ToResolveOnSubgrid = Standard_True;
+      }
     }
     else
+    {
+      //keep found roots and try to find solution
+      Standard_Integer nbExt = myF.NbExt();
+      Standard_Integer k = 1;
+      for( ; k <= nbExt; k++)
+      {
+        Standard_Real aD = myF.SquareDistance(k);
+        if(aD < DistSol)
+        {
+          DistSol = aD;
+          myF.Point(k).Parameter(UV(1),UV(2));
+          NewSolution = Standard_True;
+        }
+      }
       ToResolveOnSubgrid = Standard_True;
+    }
     
     if (ToResolveOnSubgrid)
     {
-      Standard_Real u1 = Max(UV(1) - PasU, myumin), u2 = Min(UV(1) + PasU, myusup);
-      Standard_Real v1 = Max(UV(2) - PasV, myvmin), v2 = Min(UV(2) + PasV, myvsup);
-      
-      if(u2 - u1 < 2.*PasU) {
-        if(Abs(u1 - myumin) < 1.e-9) {
-          u2 = u1 + 2.*PasU;
-          u2 = Min(u2, myusup);
-        }
-        if(Abs(u2 - myusup) < 1.e-9) {
-          u1 = u2 - 2.*PasU;
-          u1 = Max(u1, myumin);
-        }
-      }
-      
-      if(v2 - v1 < 2.*PasV) {
-        if(Abs(v1 - myvmin) < 1.e-9) {
-          v2 = v1 + 2.*PasV;
-          v2 = Min(v2, myvsup);
-        }
-        if(Abs(v2 - myvsup) < 1.e-9) {
-          v1 = v2 - 2.*PasV;
-          v1 = Max(v1, myvmin);
-        }
-      }
-      
+      //extension of interval to find new solution
+      Standard_Real u1 = theNoU == 1 ? myumin : myUParams->Value(theNoU-1), 
+        u2 = theNoU == myusample ? myusup : myUParams->Value(theNoU + 1);
+      Standard_Real v1 = theNoV == 1 ? myvmin : myVParams->Value(theNoV-1),
+        v2 = theNoV == myvsample ? myvsup : myVParams->Value(theNoV + 1);
+            
       Standard_Real du = (u2 - u1)/(nbsubsample-1);
       Standard_Real dv = (v2 - v1)/(nbsubsample-1);
       Standard_Real u, v;
       Standard_Real dist;
       
-      Standard_Boolean NewSolution = Standard_False;
+      //try to find solution on subgrid
       Standard_Integer Nu, Nv;
+      Standard_Integer minU = 0;
+      Standard_Integer minV = 0;
       for (Nu = 1, u = u1; Nu < nbsubsample; Nu++, u += du) {
         for (Nv = 1, v = v1; Nv < nbsubsample; Nv++, v += dv) {
           gp_Pnt Puv = myS->Value(u, v);
@@ -454,13 +629,20 @@ void Extrema_GenExtPS::FindSolution(const gp_Pnt& P, const math_Vector& UV, cons
             UV(2) = v;
             NewSolution = Standard_True;
             DistSol = dist;
+            minU = Nu;
+            minV = Nv;
           }
         }
       }
       
       if(NewSolution) {
         //try to precise
+        UVinf(1) = u1 + (minU == 1 ? 0 : minU - 2) * du;
+        UVinf(2) = v1 + (minV == 1 ? 0 : minV - 2) * dv;
+        UVsup(1) = u1 + (minU == nbsubsample ? nbsubsample : minU +1) * du;;
+        UVsup(2) = v1 + (minV == nbsubsample ? nbsubsample : minV +1) * dv;
         math_FunctionSetRoot S (myF,UV,Tol,UVinf,UVsup, aNbMaxIter);
+
       }
     } //end of if (ToResolveOnSubgrid)
   } //end of if (f == Extrema_ExtFlag_MIN)
@@ -475,40 +657,33 @@ void Extrema_GenExtPS::SetFlag(const Extrema_ExtFlag F)
 
 void Extrema_GenExtPS::SetAlgo(const Extrema_ExtAlgo A)
 {
+  if(myAlgo != A)
+     myInit = Standard_False;
   myAlgo = A;
+ 
 }
 
 void Extrema_GenExtPS::Perform(const gp_Pnt& P) 
 {  
-  //BuildTree();
   myDone = Standard_False;
   myF.SetPoint(P);
-
-  Standard_Real PasU = myusup - myumin;
-  Standard_Real PasV = myvsup - myvmin;
-  Standard_Real U, U0 = PasU / myusample / 100.;
-  Standard_Real V, V0 = PasV / myvsample / 100.;
-  PasU = (PasU - U0) / (myusample - 1);
-  PasV = (PasV - V0) / (myvsample - 1);
-  U0 = U0/2.+myumin;
-  V0 = V0/2.+myvmin;
-
-  //math_Vector Tol(1, 2);
+  
   math_Vector UV(1,2);
 
   if(myAlgo == Extrema_ExtAlgo_Grad)
   {
+    BuildGrid();
     Standard_Integer NoU,NoV;
 
     TColStd_Array2OfReal TheDist(0, myusample+1, 0, myvsample+1);
-    for ( NoU = 1, U = U0; NoU <= myusample; NoU++, U += PasU) {
-      for ( NoV = 1, V = V0; NoV <= myvsample; NoV++, V += PasV) {
+    
+    for ( NoU = 1 ; NoU <= myusample; NoU++) {
+      for ( NoV = 1; NoV <= myvsample; NoV++) {
         TheDist(NoU, NoV) = P.SquareDistance(mypoints->Value(NoU, NoV));
       }
     }
 
-    TColStd_Array2OfInteger TbSel(0,myusample+1,0,myvsample+1);
-    TbSel.Init(0);
+   
 
     Standard_Real Dist;
 
@@ -524,7 +699,6 @@ void Extrema_GenExtPS::Perform(const gp_Pnt& P)
       }
       for (NoU = 1; NoU <= myusample; NoU++) {
         for (NoV = 1; NoV <= myvsample; NoV++) {
-          if (TbSel(NoU,NoV) == 0) {
             Dist = TheDist(NoU,NoV);
             if ((TheDist(NoU-1,NoV-1) >= Dist) &&
               (TheDist(NoU-1,NoV  ) >= Dist) &&
@@ -535,11 +709,12 @@ void Extrema_GenExtPS::Perform(const gp_Pnt& P)
               (TheDist(NoU+1,NoV  ) >= Dist) &&
               (TheDist(NoU+1,NoV+1) >= Dist)) {
                 //Create array of UV vectors to calculate min
-                UV(1) = U0 + (NoU - 1) * PasU;
-                UV(2) = V0 + (NoV - 1) * PasV;
-                FindSolution(P, UV, PasU, PasV, Extrema_ExtFlag_MIN);
+                
+                UV(1) = myUParams->Value(NoU);
+                UV(2) = myVParams->Value(NoV);
+                FindSolution(P, UV, NoU, NoV, Extrema_ExtFlag_MIN);
             }
-          }
+         
         }
       }
     }
@@ -556,7 +731,6 @@ void Extrema_GenExtPS::Perform(const gp_Pnt& P)
       }
       for (NoU = 1; NoU <= myusample; NoU++) {
         for (NoV = 1; NoV <= myvsample; NoV++) {
-          if (TbSel(NoU,NoV) == 0) {
             Dist = TheDist(NoU,NoV);
             if ((TheDist(NoU-1,NoV-1) <= Dist) &&
               (TheDist(NoU-1,NoV  ) <= Dist) &&
@@ -567,12 +741,11 @@ void Extrema_GenExtPS::Perform(const gp_Pnt& P)
               (TheDist(NoU+1,NoV  ) <= Dist) &&
               (TheDist(NoU+1,NoV+1) <= Dist)) {
                 //Create array of UV vectors to calculate max
-                UV(1) = U0 + (NoU - 1) * PasU;
-                UV(2) = V0 + (NoV - 1) * PasV;
-                FindSolution(P, UV, PasU, PasV, Extrema_ExtFlag_MAX);
+                UV(1) = myUParams->Value(NoU);
+                UV(2) = myVParams->Value(NoV);
+                FindSolution(P, UV, NoU, NoV, Extrema_ExtFlag_MAX);
             }
-          }
-        }
+         }
       }
     }
   }
@@ -589,10 +762,11 @@ void Extrema_GenExtPS::Perform(const gp_Pnt& P)
       //TODO: check if no solution in binary tree
       Bnd_Sphere& aSph = aSelector.Sphere();
 
-      UV(1) = U0 + (aSph.U() - 1) * PasU;
-      UV(2) = V0 + (aSph.V() - 1) * PasV;
+      UV(1) = myUParams->Value(aSph.U());//U0 + (aSph.U() - 1) * PasU;
+      UV(2) = myVParams->Value(aSph.V());//V0 + (aSph.V() - 1) * PasV;
 
-      FindSolution(P, UV, PasU, PasV, Extrema_ExtFlag_MIN);
+      //FindSolution(P, UV, PasU, PasV, Extrema_ExtFlag_MIN);
+      FindSolution(P, UV, aSph.U(), aSph.V(), Extrema_ExtFlag_MIN);
     }
     if(myFlag == Extrema_ExtFlag_MAX || myFlag == Extrema_ExtFlag_MINMAX)
     {
@@ -603,11 +777,12 @@ void Extrema_GenExtPS::Perform(const gp_Pnt& P)
       mySphereUBTree->Select( aSelector );
       //TODO: check if no solution in binary tree
       Bnd_Sphere& aSph = aSelector.Sphere();
+      UV(1) = myUParams->Value(aSph.U());
+      UV(2) = myVParams->Value(aSph.V());
+      //UV(1) = U0 + (aSph.U() - 1) * PasU;
+      //UV(2) = V0 + (aSph.V() - 1) * PasV;
 
-      UV(1) = U0 + (aSph.U() - 1) * PasU;
-      UV(2) = V0 + (aSph.V() - 1) * PasV;
-
-      FindSolution(P, UV, PasU, PasV, Extrema_ExtFlag_MAX);
+      FindSolution(P, UV, aSph.U(),aSph.V(), Extrema_ExtFlag_MAX);
     }
   }
 }
diff --git a/src/FSD/FSD_BinaryFile.cdl b/src/FSD/FSD_BinaryFile.cdl
index 96538ae..f1df6fd 100644
--- a/src/FSD/FSD_BinaryFile.cdl
+++ b/src/FSD/FSD_BinaryFile.cdl
@@ -306,7 +306,7 @@ is
     	returns CString from Standard is private;
     ---C++: return const
  
-    ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Integer from Standard) is protected;
+    ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Size from Standard) is protected;
     ---Purpose: read <rsize> character from the current position.    
 
     ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
diff --git a/src/FSD/FSD_BinaryFile.cxx b/src/FSD/FSD_BinaryFile.cxx
index 83a1a7a..fb27422 100644
--- a/src/FSD/FSD_BinaryFile.cxx
+++ b/src/FSD/FSD_BinaryFile.cxx
@@ -61,7 +61,7 @@ Storage_Error FSD_BinaryFile::IsGoodFileType(const TCollection_AsciiString& aNam
 
   if (s == Storage_VSOk) {
     TCollection_AsciiString l;
-    Standard_Integer        len = strlen(FSD_BinaryFile::MagicNumber());
+    Standard_Size        len = strlen(FSD_BinaryFile::MagicNumber());
 
     f.ReadChar(l,len);
 
@@ -156,10 +156,10 @@ const Standard_CString FSD_BinaryFile::MagicNumber()
 //purpose  : read <rsize> character from the current position.
 //=======================================================================
 
-void FSD_BinaryFile::ReadChar(TCollection_AsciiString& buffer, const Standard_Integer rsize)
+void FSD_BinaryFile::ReadChar(TCollection_AsciiString& buffer, const Standard_Size rsize)
 {
   char             c;
-  Standard_Integer ccount = 0;
+  Standard_Size ccount = 0;
 
   buffer.Clear();
 
@@ -487,7 +487,7 @@ Storage_Error FSD_BinaryFile::BeginReadInfoSection()
 {
   Storage_Error s = Storage_VSOk;
   TCollection_AsciiString l;
-  Standard_Integer        len = strlen(FSD_BinaryFile::MagicNumber());
+  Standard_Size        len = strlen(FSD_BinaryFile::MagicNumber());
 
   ReadChar(l,len);
 
diff --git a/src/FSD/FSD_CmpFile.cdl b/src/FSD/FSD_CmpFile.cdl
index 077b4c0..417d10d 100644
--- a/src/FSD/FSD_CmpFile.cdl
+++ b/src/FSD/FSD_CmpFile.cdl
@@ -313,7 +313,7 @@ is
     WriteExtendedLine(me : in out; buffer : ExtendedString from TCollection) is protected;
     ---Purpose: write from the current position to the end of line.
 
-    ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Integer from Standard) is protected;
+    ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Size from Standard) is protected;
     ---Purpose: read <rsize> character from the current position.
 
     ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
diff --git a/src/FSD/FSD_CmpFile.cxx b/src/FSD/FSD_CmpFile.cxx
index b3899fe..a4c4af5 100644
--- a/src/FSD/FSD_CmpFile.cxx
+++ b/src/FSD/FSD_CmpFile.cxx
@@ -68,7 +68,7 @@ Storage_Error FSD_CmpFile::IsGoodFileType(const TCollection_AsciiString& aName)
 
   if (s == Storage_VSOk) {
     TCollection_AsciiString l;
-    Standard_Integer        len = strlen(FSD_CmpFile::MagicNumber());
+    Standard_Size        len = strlen(FSD_CmpFile::MagicNumber());
 
     f.ReadChar(l,len);
 
@@ -215,7 +215,7 @@ void FSD_CmpFile::ReadLine(TCollection_AsciiString& buffer)
     Buffer[0] = '\0';
     //myStream.get(Buffer,8192,'\n');
     myStream.getline(Buffer,8192,'\n');
-    for (Standard_Integer lv = (strlen(Buffer)- 1); lv > 1 && (Buffer[lv] == '\r' || Buffer[lv] == '\n') ;lv--) {
+    for (Standard_Size lv = (strlen(Buffer)- 1); lv > 1 && (Buffer[lv] == '\r' || Buffer[lv] == '\n') ;lv--) {
       Buffer[lv] = '\0';
     }  
     
@@ -332,10 +332,10 @@ void FSD_CmpFile::ReadExtendedLine(TCollection_ExtendedString& buffer)
 //purpose  : read <rsize> character from the current position.
 //=======================================================================
 
-void FSD_CmpFile::ReadChar(TCollection_AsciiString& buffer, const Standard_Integer rsize)
+void FSD_CmpFile::ReadChar(TCollection_AsciiString& buffer, const Standard_Size rsize)
 {
   char             c;
-  Standard_Integer ccount = 0;
+  Standard_Size ccount = 0;
 
   buffer.Clear();
 
@@ -363,7 +363,7 @@ void FSD_CmpFile::ReadString(TCollection_AsciiString& buffer)
     Buffer[0] = '\0';
     //myStream.get(Buffer,8192,'\n');
     myStream.getline(Buffer,8192,'\n');
-    for (Standard_Integer lv = (strlen(Buffer)- 1); lv > 1 && (Buffer[lv] == '\r' || Buffer[lv] == '\n') ;lv--) {
+    for (Standard_Size lv = (strlen(Buffer)- 1); lv > 1 && (Buffer[lv] == '\r' || Buffer[lv] == '\n') ;lv--) {
       Buffer[lv] = '\0';
     }  
     bpos = Buffer;
@@ -792,7 +792,7 @@ Storage_Error FSD_CmpFile::BeginReadInfoSection()
 {
   Storage_Error s;
   TCollection_AsciiString l;
-  Standard_Integer        len = strlen(FSD_CmpFile::MagicNumber());
+  Standard_Size        len = strlen(FSD_CmpFile::MagicNumber());
 
   ReadChar(l,len);
   
diff --git a/src/FSD/FSD_File.cdl b/src/FSD/FSD_File.cdl
index a746d7a..752641f 100644
--- a/src/FSD/FSD_File.cdl
+++ b/src/FSD/FSD_File.cdl
@@ -328,7 +328,7 @@ is
     WriteExtendedLine(me : in out; buffer : ExtendedString from TCollection) is protected;
     ---Purpose: write from the current position to the end of line.
 
-    ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Integer from Standard) is protected;
+    ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Size from Standard) is protected;
     ---Purpose: read <rsize> character from the current position.
 
     ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
diff --git a/src/FSD/FSD_File.cxx b/src/FSD/FSD_File.cxx
index 0a6ce7d..605031d 100644
--- a/src/FSD/FSD_File.cxx
+++ b/src/FSD/FSD_File.cxx
@@ -50,7 +50,7 @@ Storage_Error FSD_File::IsGoodFileType(const TCollection_AsciiString& aName)
 
   if (s == Storage_VSOk) {
     TCollection_AsciiString l;
-    Standard_Integer        len = strlen(FSD_File::MagicNumber());
+    Standard_Size        len = strlen(FSD_File::MagicNumber());
 
     f.ReadChar(l,len);
 
@@ -267,10 +267,10 @@ void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer)
 //purpose  : read <rsize> character from the current position.
 //=======================================================================
 
-void FSD_File::ReadChar(TCollection_AsciiString& buffer, const Standard_Integer rsize)
+void FSD_File::ReadChar(TCollection_AsciiString& buffer, const Standard_Size rsize)
 {
   char             c;
-  Standard_Integer ccount = 0;
+  Standard_Size ccount = 0;
 
   buffer.Clear();
 
@@ -707,7 +707,7 @@ Storage_Error FSD_File::BeginReadInfoSection()
 {
   Storage_Error s;
   TCollection_AsciiString l;
-  Standard_Integer        len = strlen(FSD_File::MagicNumber());
+  Standard_Size        len = strlen(FSD_File::MagicNumber());
 
   ReadChar(l,len);
   
diff --git a/src/FWOSDriver/FWOSDriver_Driver.cxx b/src/FWOSDriver/FWOSDriver_Driver.cxx
index 4abe913..cf0c593 100644
--- a/src/FWOSDriver/FWOSDriver_Driver.cxx
+++ b/src/FWOSDriver/FWOSDriver_Driver.cxx
@@ -30,6 +30,10 @@
 #endif  // WNT
 
 
+//==============================================================================
+//function : PutSlash
+//purpose  :
+//==============================================================================
 static void PutSlash (TCollection_ExtendedString& anXSTRING) {
 #ifdef WNT
   anXSTRING+="\\";
@@ -38,10 +42,20 @@ static void PutSlash (TCollection_ExtendedString& anXSTRING) {
 #endif  // WNT
 }
 
+//==============================================================================
+//function : FWOSDriver_Driver
+//purpose  :
+//==============================================================================
 FWOSDriver_Driver::FWOSDriver_Driver() {}
 
-
-Standard_Boolean FWOSDriver_Driver::Find(const TCollection_ExtendedString& aFolder, const TCollection_ExtendedString& aName, const TCollection_ExtendedString& aVersion) {
+//==============================================================================
+//function : Find
+//purpose  :
+//==============================================================================
+Standard_Boolean FWOSDriver_Driver::Find(const TCollection_ExtendedString& aFolder,
+                                         const TCollection_ExtendedString& aName,
+                                         const TCollection_ExtendedString& aVersion)
+{
 
   OSD_Path thePath=UTL::Path(aFolder);
   OSD_Directory theDirectory(thePath);
@@ -56,9 +70,14 @@ Standard_Boolean FWOSDriver_Driver::Find(const TCollection_ExtendedString& aFold
   return Standard_False;
 }
 
-Standard_Boolean FWOSDriver_Driver::HasReadPermission(const TCollection_ExtendedString& aFolder, const TCollection_ExtendedString& aName, const TCollection_ExtendedString& aVersion) {
-
-
+//==============================================================================
+//function : HasReadPermission
+//purpose  :
+//==============================================================================
+Standard_Boolean FWOSDriver_Driver::HasReadPermission(const TCollection_ExtendedString& aFolder,
+                                                      const TCollection_ExtendedString& aName,
+                                                      const TCollection_ExtendedString& aVersion)
+{
   OSD_SingleProtection theProtection=OSD_File(UTL::Path(Concatenate(aFolder,aName))).Protection().User();
   switch (theProtection) {
     case OSD_None:
@@ -78,31 +97,62 @@ Standard_Boolean FWOSDriver_Driver::HasReadPermission(const TCollection_Extended
   return Standard_False;
 }
 
-Handle(CDM_MetaData) FWOSDriver_Driver::MetaData(const TCollection_ExtendedString& aFolder, const TCollection_ExtendedString& aName, const TCollection_ExtendedString& aVersion) {
+//==============================================================================
+//function : MetaData
+//purpose  :
+//==============================================================================
+Handle(CDM_MetaData) FWOSDriver_Driver::MetaData(const TCollection_ExtendedString& aFolder,
+                                                 const TCollection_ExtendedString& aName,
+                                                 const TCollection_ExtendedString& aVersion)
+{
   TCollection_ExtendedString p = Concatenate(aFolder,aName);
   return CDM_MetaData::LookUp(aFolder,aName,p,p,UTL::IsReadOnly(p));
 }
 
-Handle(CDM_MetaData) FWOSDriver_Driver::CreateMetaData(const Handle(CDM_Document)& aDocument,const TCollection_ExtendedString& aFileName) {
-  return CDM_MetaData::LookUp(aDocument->RequestedFolder(),aDocument->RequestedName(),Concatenate(aDocument->RequestedFolder(),aDocument->RequestedName()),aFileName,UTL::IsReadOnly(aFileName));
+//==============================================================================
+//function : CreateMetaData
+//purpose  :
+//==============================================================================
+Handle(CDM_MetaData) FWOSDriver_Driver::CreateMetaData(const Handle(CDM_Document)& aDocument,
+                                                       const TCollection_ExtendedString& aFileName)
+{
+  return CDM_MetaData::LookUp(aDocument->RequestedFolder(),aDocument->RequestedName(),
+                              Concatenate(aDocument->RequestedFolder(),aDocument->RequestedName()),
+                              aFileName,UTL::IsReadOnly(aFileName));
 }
-TCollection_ExtendedString FWOSDriver_Driver::BuildFileName(const Handle(CDM_Document)& aDocument) {
+
+//==============================================================================
+//function : BuildFileName
+//purpose  :
+//==============================================================================
+TCollection_ExtendedString FWOSDriver_Driver::BuildFileName(const Handle(CDM_Document)& aDocument)
+{
 
   TCollection_ExtendedString retstr = TCollection_ExtendedString(aDocument->RequestedFolder());
   PutSlash(retstr);
   retstr += aDocument->RequestedName();
   return retstr;
 }
-Standard_Boolean FWOSDriver_Driver::FindFolder(const TCollection_ExtendedString& aFolder) {
+
+//==============================================================================
+//function : FindFolder
+//purpose  :
+//==============================================================================
+Standard_Boolean FWOSDriver_Driver::FindFolder(const TCollection_ExtendedString& aFolder)
+{
   
   OSD_Path thePath=UTL::Path(aFolder);
   OSD_Directory theDirectory(thePath);
   return theDirectory.Exists();
 }
 
-
-
-TCollection_ExtendedString FWOSDriver_Driver::Concatenate(const TCollection_ExtendedString& aFolder, const TCollection_ExtendedString& aName) {
+//==============================================================================
+//function : Concatenate
+//purpose  :
+//==============================================================================
+TCollection_ExtendedString FWOSDriver_Driver::Concatenate(const TCollection_ExtendedString& aFolder,
+                                                          const TCollection_ExtendedString& aName)
+{
   TCollection_ExtendedString ff(aFolder);
   ff = "";
   ff += aFolder;
@@ -111,7 +161,12 @@ TCollection_ExtendedString FWOSDriver_Driver::Concatenate(const TCollection_Exte
   return ff;
 }
 
-TCollection_ExtendedString FWOSDriver_Driver::DefaultFolder() {
+//==============================================================================
+//function : DefaultFolder
+//purpose  :
+//==============================================================================
+TCollection_ExtendedString FWOSDriver_Driver::DefaultFolder()
+{
   TCollection_ExtendedString theDefaultFolder;
   if (theDefaultFolder.Length() == 0) {
     
@@ -123,7 +178,8 @@ TCollection_ExtendedString FWOSDriver_Driver::DefaultFolder() {
     }
     else {
       theDefaultFolder=UTL::xgetenv("TEMP");
-      if(theDefaultFolder.Length()==0) Standard_Failure::Raise("cannot determine default folder; HOMEDRIVE and TEMP are undefined");
+      if(theDefaultFolder.Length()==0)
+        Standard_Failure::Raise("cannot determine default folder; HOMEDRIVE and TEMP are undefined");
     }
 #else
     TCollection_ExtendedString home=UTL::xgetenv("HOME");
@@ -136,7 +192,12 @@ TCollection_ExtendedString FWOSDriver_Driver::DefaultFolder() {
   return theDefaultFolder;
 }
 
-Handle(CDM_MetaData) FWOSDriver_Driver::BuildMetaData(const TCollection_ExtendedString& aFileName) {
+//==============================================================================
+//function : BuildMetaData
+//purpose  :
+//==============================================================================
+Handle(CDM_MetaData) FWOSDriver_Driver::BuildMetaData(const TCollection_ExtendedString& aFileName)
+{
 
   OSD_Path p = UTL::Path(aFileName);
   
@@ -148,22 +209,49 @@ Handle(CDM_MetaData) FWOSDriver_Driver::BuildMetaData(const TCollection_Extended
   return CDM_MetaData::LookUp(f,n,aFileName,aFileName,UTL::IsReadOnly(aFileName));
 }
 
-TCollection_ExtendedString FWOSDriver_Driver::SetName(const Handle(CDM_Document)& aDocument, const TCollection_ExtendedString& aName)  {
-  
-  TCollection_ExtendedString xn(aName);
+//==============================================================================
+//function : SetName
+//purpose  :
+//==============================================================================
+TCollection_ExtendedString FWOSDriver_Driver::SetName(const Handle(CDM_Document)& aDocument,
+                                                      const TCollection_ExtendedString& aName)
+{
   
-  TCollection_ExtendedString n(xn);
-  // file name may have spaces
-  //n.RemoveAll(' ');
+  TCollection_ExtendedString xn(aName), n(aName);
+
+#ifdef WNT
+  //windows is not case sensitive
+  Standard_ExtCharacter   echar;
+  //make the extension lower case
+  for(int i = 1; i <= xn.Length(); i++)
+  {
+	echar = xn.Value(i);
+	echar = towlower(echar);
+	xn.SetValue(i, echar);
+  }
+#endif
   
   TCollection_ExtendedString e (aDocument->FileExtension());
+  TCollection_ExtendedString xe(e);
   if (e.Length() > 0) {
+#ifdef WNT
+    //windows is not case sensitive
+    Standard_ExtCharacter   echar;
+    //make the extension lower case
+    for(int i = 1; i <= xe.Length(); i++)
+    {
+	  echar = xe.Value(i);
+	  echar = towlower(echar);
+	  xe.SetValue(i, echar);
+    }
+#endif
+    xe.Insert(1, '.');
     e.Insert(1, '.');
-    Standard_Integer ln = n.Length();
-    Standard_Integer le = e.Length();
+    Standard_Integer ln = xn.Length();
+    Standard_Integer le = xe.Length();
     Standard_Boolean ExtensionIsAlreadyThere = Standard_False;
     if(ln>=le) {
-      Standard_Integer ind=n.SearchFromEnd(e);
+      Standard_Integer ind=xn.SearchFromEnd(xe);
       ExtensionIsAlreadyThere = ind+le-1==ln;
     }
     if(!ExtensionIsAlreadyThere) n+=e;
diff --git a/src/Font/FILES b/src/Font/FILES
new file mode 100644
index 0000000..5c9f2ac
--- /dev/null
+++ b/src/Font/FILES
@@ -0,0 +1 @@
+Font_NListOfSystemFont.hxx
diff --git a/src/Font/Font.cdl b/src/Font/Font.cdl
new file mode 100644
index 0000000..71f2826
--- /dev/null
+++ b/src/Font/Font.cdl
@@ -0,0 +1,36 @@
+-- Copyright (c) 1992-1999 Matra Datavision
+-- Copyright (c) 1999-2012 OPEN CASCADE SAS
+--
+-- The content of this file is subject to the Open CASCADE Technology Public
+-- License Version 6.5 (the "License"). You may not use the content of this file
+-- except in compliance with the License. Please obtain a copy of the License
+-- at http://www.opencascade.org and read it completely before using this file.
+--
+-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+--
+-- The Original Code and all software distributed under the License is
+-- distributed on an "AS IS" basis, without warranty of any kind, and the
+-- Initial Developer hereby disclaims all such warranties, including without
+-- limitation, any warranties of merchantability, fitness for a particular
+-- purpose or non-infringement. Please see the License for the specific terms
+-- and conditions governing the rights and limitations under the License.
+
+package Font
+
+uses Standard ,  
+     Quantity ,  
+     TCollection,
+     OSD
+
+is
+  enumeration FontAspect is FA_Undefined, FA_Regular, FA_Bold, FA_Italic, FA_BoldItalic;
+  ---Purpose: Specifies aspect of system font.
+  
+  class SystemFont;
+  
+  imported NListOfSystemFont;
+  
+  class FontMgr;
+
+end Font;   
diff --git a/src/Font/Font_FontMgr.cdl b/src/Font/Font_FontMgr.cdl
new file mode 100644
index 0000000..160385f
--- /dev/null
+++ b/src/Font/Font_FontMgr.cdl
@@ -0,0 +1,44 @@
+-- Created on: 2008-01-20
+-- Created by: Alexander A. BORODIN
+-- Copyright (c) 2008-2012 OPEN CASCADE SAS
+--
+-- The content of this file is subject to the Open CASCADE Technology Public
+-- License Version 6.5 (the "License"). You may not use the content of this file
+-- except in compliance with the License. Please obtain a copy of the License
+-- at http://www.opencascade.org and read it completely before using this file.
+--
+-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+--
+-- The Original Code and all software distributed under the License is
+-- distributed on an "AS IS" basis, without warranty of any kind, and the
+-- Initial Developer hereby disclaims all such warranties, including without
+-- limitation, any warranties of merchantability, fitness for a particular
+-- purpose or non-infringement. Please see the License for the specific terms
+-- and conditions governing the rights and limitations under the License.
+
+class FontMgr from Font inherits TShared from MMgt
+---Purpose: Structure for store of Font System Information
+
+uses SystemFont,
+     NListOfSystemFont,
+     Path from OSD,
+     AsciiString from TCollection
+is
+  GetInstance(myclass) returns FontMgr;
+  ---Level: Public
+
+  GetAvalableFonts(me) returns NListOfSystemFont;
+
+--- Private methods
+
+  Create returns FontMgr is private;
+  ---Purpose: Creates empty font object
+  ---Level: Private
+
+ InitFontDataBase(me:mutable) is private;
+
+fields
+ MyListOfFonts:  NListOfSystemFont;
+
+end FontMgr;
diff --git a/src/Font/Font_FontMgr.cxx b/src/Font/Font_FontMgr.cxx
new file mode 100644
index 0000000..ebd886f
--- /dev/null
+++ b/src/Font/Font_FontMgr.cxx
@@ -0,0 +1,434 @@
+// Created on: 2008-01-20
+// Created by: Alexander A. BORODIN
+// Copyright (c) 2008-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#include <Font_FontMgr.ixx>
+#ifdef WNT
+# include <windows.h>
+# include <stdlib.h>
+#else  //WNT
+# include <dirent.h>
+# include <X11/Xlib.h>
+#endif //WNT
+
+#include <OSD_Environment.hxx>
+#include <NCollection_List.hxx>
+#include <TCollection_HAsciiString.hxx>  
+#include <Standard_Stream.hxx>
+
+
+#ifndef WNT
+#include <TCollection_AsciiString.hxx>
+
+#include <NCollection_DefineList.hxx>
+#include <NCollection_List.hxx>
+
+#include <OSD_Path.hxx>
+#include <OSD_FileIterator.hxx>
+#include <OSD_DirectoryIterator.hxx>
+#include <OSD_File.hxx>
+#include <OSD_FileNode.hxx>
+#include <OSD_OpenMode.hxx>
+#include <OSD_Protection.hxx>
+#include <Font_NListOfSystemFont.hxx>
+
+const  Standard_Integer font_service_conf_size = 3;
+static Standard_Character font_service_conf[font_service_conf_size][64] = { {"/etc/X11/fs/config"},
+                                                                            {"/usr/X11R6/lib/X11/fs/config"},
+                                                                            {"/usr/X11/lib/X11/fs/config"}
+                                                                           };
+
+DEFINE_LIST( StringList, NCollection_List, TCollection_HAsciiString );
+
+void find_path_with_font_dir( const TCollection_AsciiString& dir,StringList& dirs )
+{  
+  if( !dir.IsEmpty() )
+  {
+    TCollection_AsciiString PathName( dir );
+
+    Standard_Integer rem = PathName.Length();
+
+    if ( PathName.SearchFromEnd("/") == rem )
+      PathName.Remove( rem, 1 );
+
+    Standard_Boolean need_to_append = Standard_True;
+       
+    StringList::Iterator it( dirs );
+    for( ; it.More(); it.Next() )
+    {
+      if ( PathName.IsEqual(it.Value().ToCString()) ) {
+        need_to_append = Standard_False;
+        break;
+      }
+    }
+    if ( need_to_append )
+      dirs.Append( PathName );
+
+    OSD_DirectoryIterator osd_dir(PathName,"*");
+    while(osd_dir.More())
+    {
+      OSD_Path path_file;
+      osd_dir.Values().Path( path_file );
+      if( path_file.Name().Length() < 1 )
+      {
+        osd_dir.Next();
+        continue;
+      }
+      
+      TCollection_AsciiString full_path_name = PathName + "/" + path_file.Name();
+      rem = full_path_name.Length();
+      if ( full_path_name.SearchFromEnd("/") == rem )
+        full_path_name.Remove( rem, 1 );
+      find_path_with_font_dir( full_path_name, dirs );
+      osd_dir.Next();
+    }
+  }
+}
+
+#endif //WNT
+
+
+Handle(Font_FontMgr) Font_FontMgr::GetInstance() {
+
+  static Handle(Font_FontMgr) _mgr;
+  if ( _mgr.IsNull() )
+    _mgr = new Font_FontMgr();
+
+  return _mgr;
+
+}
+
+Font_FontMgr::Font_FontMgr() {
+
+  InitFontDataBase();
+
+}
+
+void Font_FontMgr::InitFontDataBase() {
+
+  MyListOfFonts.Clear();
+
+#ifdef WNT
+  //detect font directory
+
+  OSD_Environment env("windir");
+  TCollection_AsciiString windir_str = env.Value();
+  if ( windir_str.IsEmpty() )
+  {
+	  return;
+  }
+  Handle(TCollection_HAsciiString) HFontDir = new TCollection_HAsciiString( windir_str );
+  HFontDir->AssignCat( "\\Fonts\\" );
+  #ifdef TRACE
+    cout << "System font directory: " << HFontDir->ToCString() << "\n";
+  #endif
+
+  //read registry
+  HKEY fonts_hkey;
+  if( RegOpenKeyEx( HKEY_LOCAL_MACHINE,
+      TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"),
+      0,
+      KEY_READ,
+      &fonts_hkey )
+      != ERROR_SUCCESS ) 
+  {
+    return;
+  }           
+  Standard_Integer           id = 0;
+  Standard_Character         buf_name[100];
+  Standard_Byte buf_data[100];
+  DWORD size_name = 100,
+        size_data = 100;
+
+  while ( true )
+  {
+    //detect file name    
+    DWORD type;
+    size_name = 100,
+      size_data = 100;
+    Font_FontAspect aspect;
+    if( RegEnumValue( fonts_hkey,
+                      id,
+                      buf_name,
+                      &size_name,
+                      NULL,
+                      &type,
+                      buf_data,
+                      &size_data) == ERROR_NO_MORE_ITEMS ) {
+        break;
+      }
+      Handle(TCollection_HAsciiString) fname = 
+        new TCollection_HAsciiString(buf_name);
+      fname->RightAdjust();
+      fname->LeftAdjust();
+      //remove construction like (TrueType....
+      Standard_Integer anIndexTT = fname->SearchFromEnd( new TCollection_HAsciiString( " (" ) );
+      Standard_Boolean aTruncate = Standard_False;
+      if ( anIndexTT > 1 )
+        fname->Trunc( anIndexTT );
+      Standard_Integer anIndex = 0;
+      fname->RightAdjust();
+      if ( ( anIndex = fname->SearchFromEnd( new TCollection_HAsciiString("Bold Italic") ) ) > 0 ) {
+        aTruncate = ( anIndex > 1 ) && ( fname->Value(anIndex - 1 ) == ' ' );
+        aspect = Font_FA_BoldItalic;
+      } else if ( ( anIndex = fname->SearchFromEnd( new TCollection_HAsciiString("Bold") ) ) > 0 ) {
+        aTruncate = ( anIndex > 1 ) && ( fname->Value(anIndex - 1 ) == ' ' );
+        aspect = Font_FA_Bold;
+      } else if ( ( anIndex = fname->SearchFromEnd( new TCollection_HAsciiString("Italic") ) ) > 0 ) {
+        aTruncate = ( anIndex > 1 ) && ( fname->Value(anIndex - 1 ) == ' ' );
+        aspect = Font_FA_Italic;
+      } else {
+        aspect = Font_FA_Regular;
+      }
+      if( aTruncate )
+        fname->Trunc( anIndex - 1 );
+      fname->RightAdjust();
+      Handle(TCollection_HAsciiString) file_path =
+      new TCollection_HAsciiString( (Standard_Character*)buf_data );
+      if ( strchr( (Standard_Character*)buf_data, '\\' ) == NULL ) {
+        file_path->Insert( 1, HFontDir );
+      }
+
+      if( ( ( file_path->Search(".ttf") > 0 ) || ( file_path->Search(".TTF") > 0 ) ||
+            ( file_path->Search(".otf") > 0 ) || ( file_path->Search(".OTF") > 0 ) ||
+            ( file_path->Search(".ttc") > 0 ) || ( file_path->Search(".TTC") > 0 ) ) ){
+        MyListOfFonts.Append( new Font_SystemFont( fname, aspect, file_path ) );
+#ifdef TRACE
+        cout  << "Adding font...\n"
+              << "  font name: " << fname->ToCString() << "\n"
+              << "  font file: " << file_path->ToCString() << "\n"
+              << "  font aspect: ";
+        switch( aspect ) {
+        case Font_FA_Bold:
+          cout << "Font_FA_Bold\n";
+          break;
+        case Font_FA_BoldItalic:
+          cout << "Font_FA_BoldItalic\n";
+          break;
+        case Font_FA_Italic:
+          cout << "Font_FA_Italic\n";
+          break;
+        default:
+          cout << "Font_FA_Regular\n";
+          break;
+        }
+#endif
+      }
+  id++; 
+  }
+  //close registry
+  RegCloseKey( fonts_hkey );
+#endif //WNT
+
+#ifndef WNT
+  StringList dirs;
+  Handle(TCollection_HAsciiString) str = new TCollection_HAsciiString;
+  Display * disp = XOpenDisplay(NULL);
+
+  if (!disp) 
+  {
+    // let the X server find the available connection
+    disp = XOpenDisplay(":0.0");
+    if (!disp)
+    {
+      cout << "Display is NULL!" << endl;
+      return ;
+    }
+  }
+
+  Standard_Integer npaths = 0;
+
+  Standard_Character** fontpath = XGetFontPath(disp, &npaths);
+#ifdef TRACE
+  cout << "NPATHS = " << npaths << endl ;
+#endif
+  for (Standard_Integer i = 0; i < npaths; i++  ) 
+  {  
+#ifdef TRACE         
+    cout << "Font Path: " << fontpath[i] << endl;
+#endif
+    if ( fontpath[i][0] == '/' ) {
+      TCollection_AsciiString aFontPath( fontpath[i] );
+      find_path_with_font_dir( aFontPath, dirs );
+    }
+    else
+    {
+      TCollection_AsciiString aFontPath( fontpath[i] );
+      TCollection_AsciiString aCutFontPath;        
+      Standard_Integer location = -1 ;
+       location = aFontPath.Location( "/",1,aFontPath.Length() );
+      if( location > 0 )
+        aCutFontPath.AssignCat( aFontPath.SubString(location, aFontPath.Length() ) );
+      find_path_with_font_dir( aCutFontPath, dirs ); 
+    }
+  }
+  XFreeFontPath(fontpath);
+
+
+  OSD_OpenMode aMode =  OSD_ReadOnly;
+  OSD_Protection  aProtect( OSD_R, OSD_R, OSD_R, OSD_R );
+
+  for( Standard_Integer j = 0 ; j < font_service_conf_size; j++ )
+  {
+    TCollection_AsciiString fileOfFontServiceName( font_service_conf[j] );
+    OSD_File aFile( fileOfFontServiceName );
+
+    if( aFile.Exists() ) 
+      aFile.Open( aMode, aProtect );
+  
+    if( aFile.IsOpen() )//font service
+    {
+      Standard_Integer aNByte = 256;
+      Standard_Integer aNbyteRead;
+      TCollection_AsciiString aStr( aNByte );//read string with information
+      TCollection_AsciiString aStrCut( aNByte );//cut of string
+      TCollection_AsciiString endStr;//cutting string
+
+      Standard_Boolean read_dirs = Standard_False;
+      Standard_Integer location =- 1; //disposition of necessary literals
+      Standard_Integer begin =- 1; //first left entry in string
+      Standard_Integer end =- 1; //first right entry in string
+      while( !aFile.IsAtEnd() )
+      {
+        aFile.ReadLine( aStr, aNByte, aNbyteRead );//reading 1 lines(256 bytes) 
+        location = aStr.Location( "catalogue = ", 1, aStr.Length() );
+        if(location == 0)
+          location = aStr.Location( "catalogue=", 1, aStr.Length() );
+        if(location == 0)
+          location = aStr.Location( "catalogue= ", 1, aStr.Length() );
+        if(location == 0)
+          location = aStr.Location( "catalogue = ", 1, aStr.Length() );
+        if( location > 0 )  
+        {
+#ifdef TRACE
+          cout << " Font config find!!" << endl;
+#endif
+          read_dirs = Standard_True;
+        }
+  
+        if( read_dirs )
+        {  
+          begin = aStr.Location( "/", 1, aStr.Length() );//begin of path name
+          end = aStr.Location( ":", 1, aStr.Length() );//end of path name
+          if( end < 1 )
+            end = aStr.Location( ",", 1, aStr.Length() );//also end of path name
+          end -= 1;
+          if( begin > 0 && end > 0 )
+          {
+            if( ( end - begin ) > 0 )
+              endStr.AssignCat( aStr.SubString ( begin, end ) );//cutting necessary literals for string
+            dirs.Append( TCollection_HAsciiString ( endStr ) );
+            endStr.Clear();
+          }
+          else 
+            if( begin > 0 && end == -1 )
+            { 
+              //if end of string don't have "," or ":"
+              //it is possible last sentence in block of word
+              endStr.AssignCat( aStr.SubString( begin, aStr.Length() - 1 ) );
+              dirs.Append( TCollection_HAsciiString( endStr ) );   
+              endStr.Clear();
+            }
+        } 
+ 
+      }
+      aFile.Close();
+    }
+  }
+
+  if( dirs.Size() > 0 )
+  {   
+    //if dirs list contains elements
+    OSD_OpenMode aModeRead =  OSD_ReadOnly;
+    OSD_Protection  aProtectRead( OSD_R, OSD_R , OSD_R , OSD_R );
+
+    TCollection_AsciiString fileFontsDir;
+    StringList::Iterator it( dirs ); 
+    for( ; it.More(); it.Next() ) 
+    {     
+      fileFontsDir.AssignCat( it.Value().ToCString() );   
+      fileFontsDir.AssignCat( "/fonts.dir" );//append file name in path way
+
+      OSD_File readFile( fileFontsDir );  
+      readFile.Open( aModeRead, aProtectRead );
+
+      Standard_Integer aNbyteRead, aNByte = 256;
+      if( readFile.IsOpen ( ) )
+      {
+        TCollection_AsciiString aLine( aNByte );
+        Standard_Integer countOfString = 0 ;
+        while( ! readFile.IsAtEnd() )//return true if EOF
+        {
+          if( countOfString > 1 )
+          {
+            readFile.ReadLine( aLine , aNByte , aNbyteRead );
+            if( ( ( aLine.Search(".pfa") > 0 ) || ( aLine.Search(".PFA") > 0 ) ||
+                  ( aLine.Search(".pfb") > 0 ) || ( aLine.Search(".PFB") > 0 ) ||
+                  ( aLine.Search(".ttf") > 0 ) || ( aLine.Search(".TTF") > 0 ) ||
+                  ( aLine.Search(".otf") > 0 ) || ( aLine.Search(".OTF") > 0 ) ||
+                  ( aLine.Search(".ttc") > 0 ) || ( aLine.Search(".TTC") > 0 ) )
+                  && ( aLine.Search( "iso8859-1\n" ) > 0 ) )    
+            { 
+
+              // In current implementation use fonts with ISO-8859-1 coding page.
+              // OCCT not give to manage coding page by means of programm interface. 
+              // TODO: make high level interface for 
+              // choosing necessary coding page.  
+              TCollection_AsciiString aXLFD;
+              Standard_Integer leftXLFD = aLine.SearchFromEnd(" ");
+              Standard_Integer rightXLFD = aLine.Length();
+              if( leftXLFD && rightXLFD )
+                aXLFD.AssignCat(aLine.SubString( leftXLFD + 1, rightXLFD ) );
+
+              TCollection_AsciiString aPath;
+              TCollection_AsciiString aTemp( it.Value().ToCString() );
+              if ( aTemp.SearchFromEnd("/") == aTemp.Length() )
+              {
+                //this branch intend to SUN
+                aPath.AssignCat( aTemp.ToCString() );
+                aPath.AssignCat( aLine.Token( " ", 1 ) );
+              }
+              else {
+                //this branch intend to Linux       
+                aPath.AssignCat( aTemp.ToCString( ) );
+                aPath.AssignCat( "/" );
+                aPath.AssignCat( aLine.Token( " ", 1 ) );
+              }
+              MyListOfFonts.Append( new Font_SystemFont( new TCollection_HAsciiString( aXLFD ),
+                new TCollection_HAsciiString( aPath ) ) );
+            }
+            
+          }
+          else
+            readFile.ReadLine( aLine, aNByte, aNbyteRead ); 
+          countOfString++;
+        }
+        readFile.Close();
+      } 
+      fileFontsDir.Clear(); 
+    }
+  }
+#endif
+}
+
+Font_NListOfSystemFont Font_FontMgr::GetAvalableFonts() const
+{
+  return MyListOfFonts;
+}
+
+
diff --git a/src/Font/Font_SystemFont.cdl b/src/Font/Font_SystemFont.cdl
new file mode 100644
index 0000000..6fe62db
--- /dev/null
+++ b/src/Font/Font_SystemFont.cdl
@@ -0,0 +1,69 @@
+-- Created on: 2008-01-20
+-- Created by: Alexander A. BORODIN
+-- Copyright (c) 2008-2012 OPEN CASCADE SAS
+--
+-- The content of this file is subject to the Open CASCADE Technology Public
+-- License Version 6.5 (the "License"). You may not use the content of this file
+-- except in compliance with the License. Please obtain a copy of the License
+-- at http://www.opencascade.org and read it completely before using this file.
+--
+-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+--
+-- The Original Code and all software distributed under the License is
+-- distributed on an "AS IS" basis, without warranty of any kind, and the
+-- Initial Developer hereby disclaims all such warranties, including without
+-- limitation, any warranties of merchantability, fitness for a particular
+-- purpose or non-infringement. Please see the License for the specific terms
+-- and conditions governing the rights and limitations under the License.
+
+class SystemFont from Font inherits TShared from MMgt
+---Purpose: Structure for store of Font System Information
+
+uses FontAspect,
+     HAsciiString from TCollection
+
+is
+  Create returns SystemFont;
+  ---Purpose: Creates empty font object
+  ---Level: Public
+
+  Create (FontName : HAsciiString;
+          Aspect   : FontAspect;
+          FilePath : HAsciiString ) returns SystemFont;
+  ---Purpose: Creates Font object initialized with <FontName> as name
+  ---         <FontAspect>.... TODO
+  ---Level: Public
+
+  Create (XLFD     : HAsciiString;
+          FilePath : HAsciiString ) returns SystemFont;
+  ---Purpose: TODO
+  ---Level: Public
+ 
+  FontName (me) returns HAsciiString;
+  --- Purpose: Returns font family name
+  ---Level: Public    
+        
+  FontPath (me) returns HAsciiString;
+  --- Purpose: Returns font file path
+  --- Level: Public
+
+  FontAspect (me) returns FontAspect;
+  --- Purpose: Returns font aspect
+  --- Level: Public
+    
+  FontHeight (me) returns Integer from Standard;
+  --- Purpose: Returns font height
+  --- If returned value is equal -1 it means that font is resizable
+  --- Level: Public
+
+  IsValid (me) returns Boolean;
+
+fields
+  MyFontName:           HAsciiString;  --Font family name
+  MyFontAspect:         FontAspect;    
+  MyFaceSize:           Integer;       --height of font
+  MyFilePath:           HAsciiString;  --absolute path to font file
+  MyVerification:       Boolean;       --indicator of font initialization errors. False if initialization is failed.
+
+end SystemFont;
diff --git a/src/Font/Font_SystemFont.cxx b/src/Font/Font_SystemFont.cxx
new file mode 100644
index 0000000..e3ba6c9
--- /dev/null
+++ b/src/Font/Font_SystemFont.cxx
@@ -0,0 +1,123 @@
+// Created on: 2008-01-20
+// Created by: Alexander A. BORODIN
+// Copyright (c) 2008-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+
+// Updated:
+
+#include <Font_SystemFont.ixx>
+#include <OSD_Path.hxx>
+#include <TCollection_HAsciiString.hxx>
+
+#include <stdio.h>
+
+Font_SystemFont::Font_SystemFont():
+MyFontName(),
+MyFontAspect(Font_FA_Undefined),
+MyFaceSize(-1),
+MyVerification(Standard_False)
+{
+}
+
+Font_SystemFont::Font_SystemFont( const Handle(TCollection_HAsciiString)& FontName,
+                                const Font_FontAspect FontAspect,
+                                const Handle(TCollection_HAsciiString)& FilePath ):
+MyFontName(FontName),
+MyFontAspect(FontAspect),
+MyFaceSize(-1),
+MyFilePath(FilePath),
+MyVerification(Standard_True)
+{
+
+}
+
+Font_SystemFont::Font_SystemFont( const Handle(TCollection_HAsciiString)& XLFD,
+                                const Handle(TCollection_HAsciiString)& FilePath) :
+MyFontAspect(Font_FA_Undefined),
+MyFilePath(FilePath)
+{
+  MyVerification = Standard_True;
+  if ( XLFD.IsNull() )
+  {
+    MyVerification=Standard_False;
+    printf("NULL XLFD handler \n");
+  }
+  if ( XLFD->IsEmpty() )
+  {
+    MyVerification=Standard_False;
+    printf("EMPTY XLFD handler \n");
+  }
+
+  if(MyVerification)
+  {
+    MyFontName = XLFD->Token( "-", 2 );
+    TCollection_AsciiString str( XLFD->ToCString() );
+
+    if ( str.Search( "-0-0-0-0-" ) >=0 )
+      MyFaceSize = -1;
+    else
+      //TODO catch exeption
+      MyFaceSize =  str.Token( "-", 7 ).IntegerValue();
+
+    //detect aspect
+    if ( str.Token("-", 3).IsEqual( "bold" ) )
+      MyFontAspect = Font_FA_Bold;
+    else if ( str.Token("-", 3).IsEqual( "medium" ) ||
+      str.Token("-", 3).IsEqual( "normal" ) )
+      MyFontAspect = Font_FA_Regular;
+
+    if ( MyFontAspect != Font_FA_Undefined && 
+      ( str.Token("-",4 ).IsEqual( "i" ) || str.Token("-",4 ).IsEqual( "o" ) ) ) 
+    {
+      if ( MyFontAspect == Font_FA_Bold )
+        MyFontAspect = Font_FA_BoldItalic;
+      else
+        MyFontAspect = Font_FA_Italic;
+    }
+  }
+}
+
+Standard_Boolean Font_SystemFont::IsValid() const{
+  if ( !MyVerification)
+    return Standard_False;
+
+  if ( MyFontAspect == Font_FA_Undefined )
+    return Standard_False;
+
+  if ( MyFontName->IsEmpty() || !MyFontName->IsAscii() )
+    return Standard_False;
+
+  OSD_Path path;  
+  return path.IsValid( MyFilePath->String() );
+}
+
+Handle(TCollection_HAsciiString) Font_SystemFont::FontPath() const{
+  return MyFilePath;
+}
+
+Handle(TCollection_HAsciiString) Font_SystemFont::FontName() const{
+  return MyFontName;
+}
+
+Font_FontAspect Font_SystemFont::FontAspect() const{
+  return MyFontAspect;
+}
+
+Standard_Integer Font_SystemFont::FontHeight() const {
+  return MyFaceSize;
+}
diff --git a/src/GGraphic2d/GGraphic2d_SetOfCurves.cxx b/src/GGraphic2d/GGraphic2d_SetOfCurves.cxx
index 142abe0..11eacba 100644
--- a/src/GGraphic2d/GGraphic2d_SetOfCurves.cxx
+++ b/src/GGraphic2d/GGraphic2d_SetOfCurves.cxx
@@ -460,8 +460,8 @@ void GGraphic2d_SetOfCurves::Save(Aspect_FStream& aFStream) const
 	theBC->Poles( tpoles );
 	*aFStream << "Geom2d_BezierCurve" << endl;
 
-	for ( i = 1; i <= nbPoles; i++ ) 
-	  *aFStream << tpoles(i).X() << ' ' << tpoles(i).Y() << endl;
+	for ( Standard_Integer k = 1; k <= nbPoles; k++ ) 
+	  *aFStream << tpoles(k).X() << ' ' << tpoles(k).Y() << endl;
 
 	} else if ( myCurve->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve)) ) {
 	Handle(Geom2d_BSplineCurve) theBSC = Handle(Geom2d_BSplineCurve)::DownCast(myCurve);
diff --git a/src/Geom/Geom_BSplineCurve.cdl b/src/Geom/Geom_BSplineCurve.cdl
index e75a5f0..83711c3 100644
--- a/src/Geom/Geom_BSplineCurve.cdl
+++ b/src/Geom/Geom_BSplineCurve.cdl
@@ -124,7 +124,8 @@ uses  Array1OfInteger      from TColStd,
       Vec                  from gp,
       BSplKnotDistribution from GeomAbs,
       Geometry             from Geom,
-      Shape                from GeomAbs
+      Shape                from GeomAbs,
+      Mutex                from Standard
 
 
 raises ConstructionError   from Standard,
@@ -1035,4 +1036,6 @@ fields
   maxderivinv   : Real from Standard;
   maxderivinvok : Boolean from Standard;
 
+  myMutex       : Mutex from Standard;
+  -- protected bspline-cache
 end;
diff --git a/src/Geom/Geom_BSplineCurve_1.cxx b/src/Geom/Geom_BSplineCurve_1.cxx
index 740e30b..bdd16cc 100644
--- a/src/Geom/Geom_BSplineCurve_1.cxx
+++ b/src/Geom/Geom_BSplineCurve_1.cxx
@@ -36,6 +36,7 @@
 #include <Standard_OutOfRange.hxx>
 #include <Standard_DomainError.hxx>
 #include <Standard_RangeError.hxx>
+#include <Standard_Mutex.hxx>
 
 #define  POLES    (poles->Array1())
 #define  KNOTS    (knots->Array1())
@@ -105,36 +106,36 @@ Standard_Integer Geom_BSplineCurve::Degree () const
 //purpose  : 
 //=======================================================================
 
-void Geom_BSplineCurve::D0 ( const Standard_Real U, 
-                                   gp_Pnt& P)  const 
+void Geom_BSplineCurve::D0(const Standard_Real U, gp_Pnt& P) const 
 {
-  Standard_Real  NewU = U ;
-  PeriodicNormalization(NewU) ;
-  if (!IsCacheValid(NewU)) 
-    {
-     Geom_BSplineCurve  * MyCurve = (Geom_BSplineCurve *) this ;
-     MyCurve->ValidateCache(NewU) ;
-    }
-  if (rational) {
+  Standard_Real NewU(U);
+  PeriodicNormalization(NewU);
+
+  Geom_BSplineCurve* MyCurve = (Geom_BSplineCurve *) this;
+  Standard_Mutex::Sentry aSentry(MyCurve->myMutex);
 
+  if(!IsCacheValid(NewU)) 
+    MyCurve->ValidateCache(NewU);
+
+  if(rational)
+  {
     BSplCLib::CacheD0(NewU,
-		      deg,
-		      parametercache,
-		      spanlenghtcache,
-		      (cachepoles->Array1()),
-		      cacheweights->Array1(),
-		      P) ;
-    
+      deg,
+      parametercache,
+      spanlenghtcache,
+      cachepoles->Array1(),
+      cacheweights->Array1(),
+      P);
   }
-  else {
-
+  else
+  {
     BSplCLib::CacheD0(NewU,
-                    deg,
-                    parametercache,
-                    spanlenghtcache,
-                    (cachepoles->Array1()),
-                    *((TColStd_Array1OfReal*) NULL),
-		    P) ;
+      deg,
+      parametercache,
+      spanlenghtcache,
+      cachepoles->Array1(),
+      *((TColStd_Array1OfReal*) NULL),
+      P);
   }
 }
 
@@ -147,32 +148,36 @@ void Geom_BSplineCurve::D1 (const Standard_Real U,
                                   gp_Pnt& P,
                                   gp_Vec& V1) const
 {
-Standard_Real  NewU = U ;
-  PeriodicNormalization(NewU) ;
-  if (!IsCacheValid(NewU)) 
-    {
-     Geom_BSplineCurve  * MyCurve = (Geom_BSplineCurve *) this ;
-     MyCurve->ValidateCache(NewU) ;
-    }
-  if (rational) {
+  Standard_Real NewU(U);
+  PeriodicNormalization(NewU);
+
+  Geom_BSplineCurve* MyCurve = (Geom_BSplineCurve *) this;
+  Standard_Mutex::Sentry aSentry(MyCurve->myMutex);
+
+  if(!IsCacheValid(NewU)) 
+    MyCurve->ValidateCache(NewU);
+
+  if(rational)
+  {
     BSplCLib::CacheD1(NewU,
-		      deg,
-		      parametercache,
-		      spanlenghtcache,
-		      (cachepoles->Array1()),
-		      cacheweights->Array1(),
-		      P,
-		      V1) ;
+      deg,
+      parametercache,
+      spanlenghtcache,
+      cachepoles->Array1(),
+      cacheweights->Array1(),
+      P,
+      V1);
   }
-  else {
+  else
+  {
     BSplCLib::CacheD1(NewU,
-		     deg, 
-		     parametercache,
-		     spanlenghtcache,
-		     (cachepoles->Array1()),
-		     *((TColStd_Array1OfReal*) NULL),
-		     P,
-		     V1) ;
+      deg,
+      parametercache,
+      spanlenghtcache,
+      cachepoles->Array1(),
+      *((TColStd_Array1OfReal*) NULL),
+      P,
+      V1);
   }
 }
 
@@ -181,20 +186,22 @@ Standard_Real  NewU = U ;
 //purpose  : 
 //=======================================================================
 
-void Geom_BSplineCurve::D2 (const Standard_Real U ,
-                                  gp_Pnt& P ,
-                                  gp_Vec& V1,
-                                  gp_Vec& V2 ) const
+void Geom_BSplineCurve::D2(const Standard_Real U,
+                           gp_Pnt& P,
+                           gp_Vec& V1,
+                           gp_Vec& V2) const
 {
- 
-  Standard_Real  NewU = U ;
-  PeriodicNormalization(NewU) ;
-  if (!IsCacheValid(NewU)) 
-    {
-     Geom_BSplineCurve  * MyCurve = (Geom_BSplineCurve *) this ;
-     MyCurve->ValidateCache(NewU) ;
-    }
-  if (rational) {
+  Standard_Real NewU(U);
+  PeriodicNormalization(NewU);
+
+  Geom_BSplineCurve* MyCurve = (Geom_BSplineCurve *) this;
+  Standard_Mutex::Sentry aSentry(MyCurve->myMutex);
+
+  if(!IsCacheValid(NewU)) 
+    MyCurve->ValidateCache(NewU);
+
+  if(rational)
+  {
     BSplCLib::CacheD2(NewU,
 		      deg,
 		      parametercache,
@@ -203,7 +210,7 @@ void Geom_BSplineCurve::D2 (const Standard_Real U ,
 		      cacheweights->Array1(),
 		      P,
 		      V1,
-		      V2) ;
+		      V2);
   }
   else {
     BSplCLib::CacheD2(NewU,
@@ -214,7 +221,7 @@ void Geom_BSplineCurve::D2 (const Standard_Real U ,
 		      *((TColStd_Array1OfReal*) NULL),
 		      P,
 		      V1,
-		      V2) ;
+		      V2);
   }
 }
 
@@ -223,21 +230,24 @@ void Geom_BSplineCurve::D2 (const Standard_Real U ,
 //purpose  : 
 //=======================================================================
 
-void Geom_BSplineCurve::D3  (const Standard_Real U ,
-			     gp_Pnt& P ,
-			     gp_Vec& V1,
-			     gp_Vec& V2,
-			     gp_Vec& V3 ) const
+void Geom_BSplineCurve::D3(const Standard_Real U,
+                           gp_Pnt& P,
+                           gp_Vec& V1,
+                           gp_Vec& V2,
+                           gp_Vec& V3) const
 {
   
-Standard_Real  NewU = U ;
-  PeriodicNormalization(NewU) ;
-  if (!IsCacheValid(NewU)) 
-    {
-     Geom_BSplineCurve  * MyCurve = (Geom_BSplineCurve *) this ;
-     MyCurve->ValidateCache(NewU) ;
-    }
-  if (rational) {
+  Standard_Real NewU(U);
+  PeriodicNormalization(NewU);
+
+  Geom_BSplineCurve* MyCurve = (Geom_BSplineCurve *) this;
+  Standard_Mutex::Sentry aSentry(MyCurve->myMutex);
+
+  if(!IsCacheValid(NewU)) 
+    MyCurve->ValidateCache(NewU);
+
+  if(rational)
+  {
     BSplCLib::CacheD3(NewU,
 		      deg,
 		      parametercache,
@@ -249,12 +259,13 @@ Standard_Real  NewU = U ;
 		      V2,
 		      V3) ;
   }
-  else {
+  else
+  {
     BSplCLib::CacheD3(NewU,
 		      deg,
 		      parametercache,
 		      spanlenghtcache,
-		      (cachepoles->Array1()),
+		      cachepoles->Array1(),
 		      *((TColStd_Array1OfReal*) NULL),
 		      P,
 		      V1,
diff --git a/src/Geom/Geom_BSplineSurface.cdl b/src/Geom/Geom_BSplineSurface.cdl
index d3c9149..102802f 100644
--- a/src/Geom/Geom_BSplineSurface.cdl
+++ b/src/Geom/Geom_BSplineSurface.cdl
@@ -153,8 +153,8 @@ uses  Array1OfInteger      from TColStd,
       BSplKnotDistribution from GeomAbs,
       Curve                from Geom,
       Geometry             from Geom,
-      Shape                from GeomAbs
-
+      Shape                from GeomAbs,
+      Mutex                from Standard
 
 raises ConstructionError   from Standard,
        DimensionError      from Standard,
@@ -1487,4 +1487,7 @@ fields
     vmaxderivinv  : Real from Standard;
     maxderivinvok : Boolean from Standard;
 
+    myMutex       : Mutex from Standard;
+    -- protected bsplinesurface-cache
+
 end;
diff --git a/src/Geom/Geom_BSplineSurface_1.cxx b/src/Geom/Geom_BSplineSurface_1.cxx
index e36e065..9ffc3a1 100644
--- a/src/Geom/Geom_BSplineSurface_1.cxx
+++ b/src/Geom/Geom_BSplineSurface_1.cxx
@@ -48,6 +48,7 @@
 #include <Standard_DimensionError.hxx>
 #include <Standard_ConstructionError.hxx>
 #include <Standard_NotImplemented.hxx>
+#include <Standard_Mutex.hxx>
 
 #define  POLES    (poles->Array2())
 #define  WEIGHTS  (weights->Array2())
@@ -111,21 +112,19 @@ Standard_Boolean Geom_BSplineSurface::IsCNv
 //purpose  : 
 //=======================================================================
 
-void Geom_BSplineSurface::D0 (const Standard_Real U, 
-			      const Standard_Real V, 
-			            gp_Pnt&       P ) const 
+void Geom_BSplineSurface::D0(const Standard_Real U,
+                             const Standard_Real V,
+                             gp_Pnt& P) const 
 {
-  Standard_Real  new_u = U,
-                 new_v = V ;
-  PeriodicNormalization(new_u,
-			new_v) ;
-  if (!IsCacheValid(new_u,
-                    new_v))
-    {
-     Geom_BSplineSurface * my_surface = (Geom_BSplineSurface *) this ;
-     my_surface->ValidateCache(new_u,
-			       new_v) ;
-   }
+  Standard_Real  new_u(U), new_v(V);
+  PeriodicNormalization(new_u, new_v);
+
+  Geom_BSplineSurface* MySurface = (Geom_BSplineSurface *) this;
+  Standard_Mutex::Sentry aSentry(MySurface->myMutex);
+
+  if(!IsCacheValid(new_u, new_v))
+     MySurface->ValidateCache(new_u, new_v);
+
  Standard_Real uparameter_11 = (2*ucacheparameter + ucachespanlenght)/2,
                uspanlenght_11 = ucachespanlenght/2,
                vparameter_11 = (2*vcacheparameter + vcachespanlenght)/2,
@@ -164,23 +163,20 @@ void Geom_BSplineSurface::D0 (const Standard_Real U,
 //purpose  : 
 //=======================================================================
 
-void Geom_BSplineSurface::D1 (const Standard_Real U, 
-			      const Standard_Real V, 
-			            gp_Pnt&       P,
-			            gp_Vec&       D1U,
-			            gp_Vec&       D1V) const
-{
-  Standard_Real  new_u = U,
-                 new_v = V ;
-  PeriodicNormalization(new_u,
-			new_v) ;
-  if (!IsCacheValid(new_u,
-                    new_v))
-    {
-     Geom_BSplineSurface * my_surface = (Geom_BSplineSurface *) this ;
-     my_surface->ValidateCache(new_u,
-			       new_v) ;
-   }
+void Geom_BSplineSurface::D1(const Standard_Real U,
+                             const Standard_Real V,
+                             gp_Pnt& P,
+                             gp_Vec& D1U,
+                             gp_Vec& D1V) const
+{
+  Standard_Real  new_u(U), new_v(V);
+  PeriodicNormalization(new_u, new_v);
+
+  Geom_BSplineSurface* MySurface = (Geom_BSplineSurface *) this;
+  Standard_Mutex::Sentry aSentry(MySurface->myMutex);
+
+  if(!IsCacheValid(new_u, new_v))
+     MySurface->ValidateCache(new_u, new_v);
 
   Standard_Real uparameter_11 = (2*ucacheparameter + ucachespanlenght)/2,
                 uspanlenght_11 = ucachespanlenght/2,
@@ -235,18 +231,14 @@ void Geom_BSplineSurface::D2 (const Standard_Real U,
 			            gp_Vec&       D2V,
 			            gp_Vec&       D2UV) const
 {
+  Standard_Real  new_u(U), new_v(V);
+  PeriodicNormalization(new_u, new_v);
+
+  Geom_BSplineSurface* MySurface = (Geom_BSplineSurface *) this;
+  Standard_Mutex::Sentry aSentry(MySurface->myMutex);
 
-    Standard_Real  new_u = U,
-                   new_v = V ;
-  PeriodicNormalization(new_u,
-			new_v) ;
-  if (!IsCacheValid(new_u,
-                    new_v))
-    {
-     Geom_BSplineSurface * my_surface = (Geom_BSplineSurface *) this ;
-     my_surface->ValidateCache(new_u,
-			       new_v) ;
-   }
+  if(!IsCacheValid(new_u, new_v))
+     MySurface->ValidateCache(new_u, new_v);
 
   Standard_Real uparameter_11 = (2*ucacheparameter + ucachespanlenght)/2,
                 uspanlenght_11 = ucachespanlenght/2,
diff --git a/src/Geom2d/Geom2d_BSplineCurve.cdl b/src/Geom2d/Geom2d_BSplineCurve.cdl
index 530840b..3354595 100644
--- a/src/Geom2d/Geom2d_BSplineCurve.cdl
+++ b/src/Geom2d/Geom2d_BSplineCurve.cdl
@@ -129,8 +129,8 @@ uses  Array1OfInteger      from TColStd,
       Vec2d                from gp,
       BSplKnotDistribution from GeomAbs,
       Geometry             from Geom2d,
-      Shape                from GeomAbs
-
+      Shape                from GeomAbs,
+      Mutex                from Standard
 
 raises ConstructionError   from Standard,
        DimensionError      from Standard,
@@ -1044,4 +1044,7 @@ fields
   maxderivinv   : Real from Standard;
   maxderivinvok : Boolean from Standard;
 
+  myMutex       : Mutex from Standard;
+  -- protected bspline-cache
+
 end;
diff --git a/src/Geom2d/Geom2d_BSplineCurve_1.cxx b/src/Geom2d/Geom2d_BSplineCurve_1.cxx
index f1c0f0a..7122ccd 100644
--- a/src/Geom2d/Geom2d_BSplineCurve_1.cxx
+++ b/src/Geom2d/Geom2d_BSplineCurve_1.cxx
@@ -35,6 +35,7 @@
 #include <Standard_OutOfRange.hxx>
 #include <Standard_DomainError.hxx>
 #include <Standard_RangeError.hxx>
+#include <Standard_Mutex.hxx>
 
 #define  POLES    (poles->Array1())
 #define  KNOTS    (knots->Array1())
@@ -109,14 +110,17 @@ Standard_Integer Geom2d_BSplineCurve::Degree () const
 void Geom2d_BSplineCurve::D0 ( const Standard_Real U, 
 			      gp_Pnt2d& P) const
 {
-  Standard_Real  NewU = U ;
-  PeriodicNormalization(NewU) ;
-  if (!IsCacheValid(NewU)) {
-    Geom2d_BSplineCurve  * MyCurve = (Geom2d_BSplineCurve *) this ;
-    MyCurve->ValidateCache(NewU) ;
-  }
+  Standard_Real NewU(U);
+  PeriodicNormalization(NewU);
+
+  Geom2d_BSplineCurve* MyCurve = (Geom2d_BSplineCurve *) this;
+  Standard_Mutex::Sentry aSentry(MyCurve->myMutex);
+
+  if (!IsCacheValid(NewU))
+    MyCurve->ValidateCache(NewU);
   
-  if ( rational ) {
+  if(rational)
+  {
     BSplCLib::CacheD0(NewU,
 		      deg,
 		      parametercache,
@@ -146,14 +150,17 @@ void Geom2d_BSplineCurve::D1 (const Standard_Real U,
 			      gp_Pnt2d& P,
 			      gp_Vec2d& V1) const
 {
-  Standard_Real  NewU = U ;
-  PeriodicNormalization(NewU) ;
-  if (!IsCacheValid(NewU)) {
-    Geom2d_BSplineCurve  * MyCurve = (Geom2d_BSplineCurve *) this ;
-    MyCurve->ValidateCache(NewU) ;
-  }
+  Standard_Real NewU(U);
+  PeriodicNormalization(NewU);
 
-  if ( rational ) {
+  Geom2d_BSplineCurve* MyCurve = (Geom2d_BSplineCurve *) this;
+  Standard_Mutex::Sentry aSentry(MyCurve->myMutex);
+
+  if (!IsCacheValid(NewU))
+    MyCurve->ValidateCache(NewU);
+  
+  if(rational)
+  {
     BSplCLib::CacheD1(NewU,
 		      deg,
 		      parametercache,
@@ -185,14 +192,17 @@ void Geom2d_BSplineCurve::D2 (const Standard_Real U ,
 			      gp_Vec2d& V1,
 			      gp_Vec2d& V2 ) const
 {
-  Standard_Real  NewU = U ;
-  PeriodicNormalization(NewU) ;
-  if (!IsCacheValid(NewU)) {
-    Geom2d_BSplineCurve  * MyCurve = (Geom2d_BSplineCurve *) this ;
-    MyCurve->ValidateCache(NewU) ;
-  }
+  Standard_Real NewU(U);
+  PeriodicNormalization(NewU);
+
+  Geom2d_BSplineCurve* MyCurve = (Geom2d_BSplineCurve *) this;
+  Standard_Mutex::Sentry aSentry(MyCurve->myMutex);
+
+  if (!IsCacheValid(NewU))
+    MyCurve->ValidateCache(NewU);
   
-  if ( rational ) {
+  if(rational)
+  {
     BSplCLib::CacheD2(NewU,
 		      deg,
 		      parametercache,
@@ -227,14 +237,17 @@ void Geom2d_BSplineCurve::D3  (const Standard_Real U ,
 			       gp_Vec2d& V2,
 			       gp_Vec2d& V3 ) const
 {
-  Standard_Real  NewU = U ;
-  PeriodicNormalization(NewU) ;
-  if (!IsCacheValid(NewU)) {
-    Geom2d_BSplineCurve  * MyCurve = (Geom2d_BSplineCurve *) this ;
-    MyCurve->ValidateCache(NewU) ;
-  }
+  Standard_Real NewU(U);
+  PeriodicNormalization(NewU);
 
-  if ( rational ) {
+  Geom2d_BSplineCurve* MyCurve = (Geom2d_BSplineCurve *) this;
+  Standard_Mutex::Sentry aSentry(MyCurve->myMutex);
+
+  if (!IsCacheValid(NewU))
+    MyCurve->ValidateCache(NewU);
+  
+  if(rational)
+  {
     BSplCLib::CacheD3(NewU,
 		      deg,
 		      parametercache,
diff --git a/src/Geom2d/Geom2d_OffsetCurve.cxx b/src/Geom2d/Geom2d_OffsetCurve.cxx
index 5f3bc30..dfbf545 100644
--- a/src/Geom2d/Geom2d_OffsetCurve.cxx
+++ b/src/Geom2d/Geom2d_OffsetCurve.cxx
@@ -83,7 +83,7 @@ Geom2d_OffsetCurve::Geom2d_OffsetCurve (const Handle(Curve)& C,
 : offsetValue (Offset) 
 {
   if (C->DynamicType() == STANDARD_TYPE(Geom2d_OffsetCurve)) {
-    Handle(OffsetCurve) OC = Handle(OffsetCurve)::DownCast(C->Copy());
+    Handle(OffsetCurve) OC = Handle(OffsetCurve)::DownCast(C);
     if ((OC->BasisCurve())->Continuity() == GeomAbs_C0)  
       Standard_ConstructionError::Raise();
 
diff --git a/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cdl b/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cdl
index df53feb..6a42850 100644
--- a/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cdl
+++ b/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cdl
@@ -30,6 +30,7 @@ class ProjectPointOnSurf from GeomAPI
 uses
     Surface   from Geom,
     ExtPS     from Extrema,
+    ExtAlgo from Extrema,
     Pnt       from gp,
     Length    from Quantity,
     Parameter from Quantity,
@@ -50,7 +51,8 @@ is
     
     
     Create(P          : Pnt     from gp;
-    	   Surface    : Surface from Geom)
+    	   Surface    : Surface from Geom;
+    	   Algo : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
         ---Purpose: Create the projection  of a point <P> on a surface
         --          <Surface> 
 	---Level: Public          
@@ -58,7 +60,8 @@ is
 
     Create(P          : Pnt     from gp;
     	   Surface    : Surface from Geom;
-    	   Tolerance  : Real    from Standard)
+    	   Tolerance  : Real    from Standard;
+    	   Algo : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
         ---Purpose: Create the projection  of a point <P> on a surface
         --          <Surface> 
 	---Level: Public          
@@ -74,13 +77,15 @@ is
     	   Surface    : Surface   from Geom;
     	   Umin, Usup, 
     	   Vmin, Vsup : Parameter from Quantity;
-           Tolerance  : Real      from Standard)
+           Tolerance  : Real      from Standard;
+    	   Algo : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
     returns ProjectPointOnSurf from GeomAPI;
 
     Create(P          : Pnt       from gp;
     	   Surface    : Surface   from Geom;
     	   Umin, Usup, 
-    	   Vmin, Vsup : Parameter from Quantity)
+    	   Vmin, Vsup : Parameter from Quantity;
+    	   Algo : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
     returns ProjectPointOnSurf from GeomAPI;
 
 
@@ -91,12 +96,14 @@ is
     Init(me : in out;
     	 P          : Pnt     from gp;
 	 Surface    : Surface from Geom;
-    	 Tolerance  : Real    from Standard)
+    	 Tolerance  : Real    from Standard;
+    	 Algo : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
     is static;
 
     Init(me : in out;
     	 P          : Pnt     from gp;
-	 Surface    : Surface from Geom)
+	 Surface    : Surface from Geom;
+	 Algo : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
     is static;
 
 
@@ -110,7 +117,8 @@ is
 	 Surface    : Surface   from Geom;
     	 Umin, Usup, 
     	 Vmin, Vsup : Parameter from Quantity;
-    	 Tolerance  : Real    from Standard)
+    	 Tolerance  : Real    from Standard;
+    	 Algo : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
 	---Level: Public          
     is static;
 
@@ -118,7 +126,8 @@ is
     	 P          : Pnt       from gp;
 	 Surface    : Surface   from Geom;
     	 Umin, Usup, 
-    	 Vmin, Vsup : Parameter from Quantity)
+    	 Vmin, Vsup : Parameter from Quantity;
+    	 Algo : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
     is static;
 
 
@@ -131,13 +140,15 @@ is
 	 Surface    : Surface   from Geom;
     	 Umin, Usup, 
     	 Vmin, Vsup : Parameter from Quantity;
-	 Tolerance  : Real      from Standard)
+	 Tolerance  : Real      from Standard;
+	 Algo : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
     is static;
 
     Init(me : in out;
 	 Surface    : Surface   from Geom;
     	 Umin, Usup, 
-    	 Vmin, Vsup : Parameter from Quantity)
+    	 Vmin, Vsup : Parameter from Quantity;
+    	 Algo : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
     is static;
 
 
diff --git a/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx b/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx
index ecffbdc..a54a89a 100644
--- a/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx
+++ b/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx
@@ -39,9 +39,10 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
 //purpose  : 
 //=======================================================================
   GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf (const gp_Pnt&               P, 
-							  const Handle(Geom_Surface)& Surface)
+							  const Handle(Geom_Surface)& Surface,
+							  const Extrema_ExtAlgo   theProjAlgo)
 { 
-  Init (P, Surface); 
+  Init (P, Surface, theProjAlgo); 
 }
 //=======================================================================
 //function : GeomAPI_ProjectPointOnSurf
@@ -49,9 +50,10 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
 //=======================================================================
   GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf (const gp_Pnt&               P, 
 							  const Handle(Geom_Surface)& Surface,
-							  const Standard_Real         Tolerance)
+							  const Standard_Real         Tolerance,
+							  const Extrema_ExtAlgo       theProjAlgo)
 { 
-  Init (P, Surface, Tolerance); 
+  Init (P, Surface, Tolerance, theProjAlgo); 
 }
 //=======================================================================
 //function : GeomAPI_ProjectPointOnSurf
@@ -62,10 +64,11 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
 							 const Standard_Real         Umin,
 							 const Standard_Real         Usup,
 							 const Standard_Real         Vmin,
-							 const Standard_Real         Vsup)
+							 const Standard_Real         Vsup,
+							 const Extrema_ExtAlgo       theProjAlgo)
 
 { 
-  Init (P, Surface, Umin, Usup, Vmin, Vsup); 
+  Init (P, Surface, Umin, Usup, Vmin, Vsup, theProjAlgo); 
 }
 //=======================================================================
 //function : GeomAPI_ProjectPointOnSurf
@@ -77,10 +80,11 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
 							   const Standard_Real         Usup,
 							   const Standard_Real         Vmin,
 							   const Standard_Real         Vsup,
-							   const Standard_Real         Tolerance)
+							   const Standard_Real         Tolerance,
+							   const Extrema_ExtAlgo       theProjAlgo)
 
 { 
-  Init (P, Surface, Umin, Usup, Vmin, Vsup, Tolerance); 
+  Init (P, Surface, Umin, Usup, Vmin, Vsup, Tolerance, theProjAlgo); 
 }
 //=======================================================================
 //function : Init
@@ -109,10 +113,11 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
 //purpose  : 
 //=======================================================================
   void GeomAPI_ProjectPointOnSurf::Init (const gp_Pnt&               P,
-					 const Handle(Geom_Surface)& Surface)
+					 const Handle(Geom_Surface)& Surface,
+					 const Extrema_ExtAlgo   theProjAlgo)
 
 { 
-  Init (P, Surface, Precision::Confusion()); 
+  Init (P, Surface, Precision::Confusion(), theProjAlgo); 
 }
 //=======================================================================
 //function : Init
@@ -120,7 +125,8 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
 //=======================================================================
   void GeomAPI_ProjectPointOnSurf::Init(const gp_Pnt&               P,
 					const Handle(Geom_Surface)& Surface,
-					const Standard_Real         Tolerance)
+					const Standard_Real         Tolerance,
+					const Extrema_ExtAlgo       theProjAlgo)
 
 {
   //modified by NIZNHY-PKV Thu Apr  4 10:37:55 2002 f
@@ -133,6 +139,7 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
   myGeomAdaptor.Load(Surface, Umin, Usup, Vmin, Vsup);
   //
   //myExtPS = Extrema_ExtPS();
+  myExtPS.SetAlgo(theProjAlgo);
   myExtPS.Initialize(myGeomAdaptor, Umin, Usup, Vmin, Vsup, Tolerance, Tolerance);
   myExtPS.Perform(P);
   //XXXmyExtPS = Extrema_ExtPS (P, myGeomAdaptor, Tolerance, Tolerance);
@@ -152,7 +159,8 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
 					 const Standard_Real         Umin,
 					 const Standard_Real         Usup,
 					 const Standard_Real         Vmin,
-					 const Standard_Real         Vsup )
+					 const Standard_Real         Vsup,
+					 const Extrema_ExtAlgo       theProjAlgo)
 {
   Standard_Real Tolerance = Precision::PConfusion();
   //modified by NIZNHY-PKV Thu Apr  4 10:38:23 2002 f
@@ -160,6 +168,7 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
   //myExtPS = Extrema_ExtPS (P, TheSurface, Tol, Tol);
   myGeomAdaptor.Load(Surface, Umin,Usup,Vmin,Vsup);
   //myExtPS = Extrema_ExtPS();
+  myExtPS.SetAlgo(theProjAlgo);
   myExtPS.Initialize(myGeomAdaptor, Umin, Usup, Vmin, Vsup, Tolerance, Tolerance);
   myExtPS.Perform(P);
   //XXX myExtPS = Extrema_ExtPS (P, myGeomAdaptor, Tol, Tol);
@@ -177,13 +186,15 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
 					 const Standard_Real         Usup,
 					 const Standard_Real         Vmin,
 					 const Standard_Real         Vsup,
-					 const Standard_Real         Tolerance)
+					 const Standard_Real         Tolerance,
+					 const Extrema_ExtAlgo       theProjAlgo)
 {
   //modified by NIZNHY-PKV Thu Apr  4 10:39:10 2002 f
   //GeomAdaptor_Surface TheSurface (Surface,Umin,Usup,Vmin,Vsup);
   //myExtPS = Extrema_ExtPS (P, TheSurface, Tolerance, Tolerance);
   myGeomAdaptor.Load(Surface, Umin,Usup,Vmin,Vsup);
   //myExtPS = Extrema_ExtPS();
+  myExtPS.SetAlgo(theProjAlgo);
   myExtPS.Initialize(myGeomAdaptor, Umin, Usup, Vmin, Vsup, Tolerance, Tolerance);
   myExtPS.Perform(P);
   //XXX myExtPS = Extrema_ExtPS (P, myGeomAdaptor, Tolerance, Tolerance);
@@ -198,7 +209,8 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
 					 const Standard_Real       Umin,
 					 const Standard_Real       Usup,
 					 const Standard_Real       Vmin,
-					 const Standard_Real       Vsup )
+					 const Standard_Real       Vsup,
+					 const Extrema_ExtAlgo     theProjAlgo)
 {
   Standard_Real Tolerance = Precision::PConfusion();
   //modified by NIZNHY-PKV Thu Apr  4 10:41:50 2002 f
@@ -208,6 +220,7 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
   //myExtPS = Extrema_ExtPS();
   //modified by NIZNHY-PKV Thu Apr  4 10:42:32 2002 f
   //myExtPS.Initialize(TheSurface, Umin, Usup, Vmin, Vsup, Tol, Tol);
+  myExtPS.SetAlgo(theProjAlgo);
   myExtPS.Initialize(myGeomAdaptor, Umin, Usup, Vmin, Vsup, Tolerance, Tolerance);
   //modified by NIZNHY-PKV Thu Apr  4 10:42:39 2002 t
   myIsDone = Standard_False;
@@ -221,7 +234,8 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
 					 const Standard_Real         Usup,
 					 const Standard_Real         Vmin,
 					 const Standard_Real         Vsup, 
-					 const Standard_Real         Tolerance)
+					 const Standard_Real         Tolerance,
+					 const Extrema_ExtAlgo       theProjAlgo)
 {
   //modified by NIZNHY-PKV Thu Apr  4 10:43:00 2002 f
   //GeomAdaptor_Surface TheSurface (Surface,Umin,Usup,Vmin,Vsup);
@@ -230,6 +244,7 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf()
   //myExtPS = Extrema_ExtPS();
   //modified by NIZNHY-PKV Thu Apr  4 10:43:18 2002 f
   //myExtPS.Initialize(TheSurface, Umin, Usup, Vmin, Vsup, Tolerance, Tolerance);
+  myExtPS.SetAlgo(theProjAlgo);
   myExtPS.Initialize(myGeomAdaptor, Umin, Usup, Vmin, Vsup, Tolerance, Tolerance);
   //modified by NIZNHY-PKV Thu Apr  4 10:43:26 2002 t
   myIsDone = Standard_False;
diff --git a/src/GeomFill/GeomFill_NSections.cxx b/src/GeomFill/GeomFill_NSections.cxx
index c9e7aa3..98a1f33 100644
--- a/src/GeomFill/GeomFill_NSections.cxx
+++ b/src/GeomFill/GeomFill_NSections.cxx
@@ -519,11 +519,8 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
 
   Handle(Geom_BSplineSurface) BS;
   if (myRefSurf.IsNull()) {
-    Standard_Boolean s1Point = Standard_False;
-    Standard_Boolean s2Point = Standard_False;
-    Standard_Boolean vClosed = Standard_False;
-    Standard_Real myPres3d = 1.e-06;
 
+    Standard_Real myPres3d = 1.e-06;
     Standard_Integer i,j,jdeb=1,jfin=mySections.Length();
     
     GeomFill_SectionGenerator section;
@@ -533,37 +530,9 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
     Handle(Geom_Curve) curv =  mySections(1);
     Standard_Real first = curv->FirstParameter(),
                    last = curv->LastParameter();
-    
-    if (s1Point) {
-      jdeb++;
-      TColgp_Array1OfPnt Extremities(1,2);
-      Extremities(1) = curv->Value(first);
-      Extremities(2) = curv->Value(last);
-      TColStd_Array1OfReal Bounds(1,2);
-      Bounds(1) = UFirst;
-      Bounds(2) = ULast;
-      Standard_Real Deg = 1;
-      TColStd_Array1OfInteger Mult(1,2);
-      Mult(1) = (Standard_Integer ) Deg+1;
-      Mult(2) = (Standard_Integer ) Deg+1;
-      Handle(Geom_BSplineCurve) BSPoint
-        = new Geom_BSplineCurve(Extremities,Bounds,Mult,(Standard_Integer ) Deg);
-      section.AddCurve(BSPoint);
-    }
-    
-    if (s2Point) {
-      jfin--;
-    }
 
-//    Standard_Boolean urat = Standard_True;
     for (j=jdeb; j<=jfin; j++) {
-      
-      // cas des sections bouclantes
-      if (j==jfin && vClosed) {
-        section.AddCurve(curvBS1);
-      }
-      
-      else {
+
         // read the j-th curve
         curv =  mySections(j);
         curvTrim = new Geom_TrimmedCurve(curv,
@@ -580,19 +549,11 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
         curvBS->Knots(BSK);
         BSplCLib::Reparametrize(UFirst,ULast,BSK);
         curvBS->SetKnots(BSK);
-//      if (!curvBS->IsRational()) urat = Standard_False;
-        
-        section.AddCurve(curvBS);
-        
-        // cas des sections bouclantes
-        if (j==jdeb && vClosed) {
-          curvBS1 = curvBS;
-        }
         
-      }
+        section.AddCurve(curvBS);        
     }
     
-    
+    /*
     if (s2Point) {
       curv =  mySections(jfin+1);
       first =  curv->FirstParameter();
@@ -610,7 +571,7 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC,
       Handle(Geom_BSplineCurve) BSPoint
         = new Geom_BSplineCurve(Extremities,Bounds,Mult,(Standard_Integer ) Deg);
       section.AddCurve(BSPoint);
-    }
+    }*/
 
     Standard_Integer Nbcurves = mySections.Length();
     Standard_Integer Nbpar = myParams.Length();
diff --git a/src/GeomLib/GeomLib_IsPlanarSurface.cxx b/src/GeomLib/GeomLib_IsPlanarSurface.cxx
index 9cec271..b2e879c 100644
--- a/src/GeomLib/GeomLib_IsPlanarSurface.cxx
+++ b/src/GeomLib/GeomLib_IsPlanarSurface.cxx
@@ -240,6 +240,13 @@ GeomLib_IsPlanarSurface::GeomLib_IsPlanarSurface(const Handle(Geom_Surface)& S,
       Standard_Real Umin, Umax, Vmin, Vmax;
       S->Bounds(Umin, Umax, Vmin, Vmax);
       S->D1((Umin+Umax)/2, (Vmin+Vmax)/2, P, DU, DV);
+      if (DU.Magnitude() <= gp::Resolution() ||
+          DV.Magnitude() <= gp::Resolution())
+      {
+        Standard_Real NewU = (Umin+Umax)/2 + (Umax-Umin)*0.1;
+        Standard_Real NewV = (Vmin+Vmax)/2 + (Vmax-Vmin)*0.1;
+        S->D1( NewU, NewV, P, DU, DV );
+      }
       Dn = DU^DV;
       if (Dn.Magnitude() > 1.e-7) {
 	Standard_Real angle = Dir.Angle(Dn);
@@ -274,6 +281,13 @@ GeomLib_IsPlanarSurface::GeomLib_IsPlanarSurface(const Handle(Geom_Surface)& S,
 
       S->Bounds(Umin, Umax, Vmin, Vmax);
       S->D1((Umin+Umax)/2, (Vmin+Vmax)/2, P, Du, Dv);
+      if (Du.Magnitude() <= gp::Resolution() ||
+          Dv.Magnitude() <= gp::Resolution())
+      {
+        Standard_Real NewU = (Umin+Umax)/2 + (Umax-Umin)*0.1;
+        Standard_Real NewV = (Vmin+Vmax)/2 + (Vmax-Vmin)*0.1;
+        S->D1( NewU, NewV, P, Du, Dv );
+      }
       Dn = Du^Dv;
       norm = Dn.Magnitude();
       if (norm > 1.e-15) {
diff --git a/src/GeomLib/GeomLib_Tool.cxx b/src/GeomLib/GeomLib_Tool.cxx
index 2c232d2..aa712b9 100644
--- a/src/GeomLib/GeomLib_Tool.cxx
+++ b/src/GeomLib/GeomLib_Tool.cxx
@@ -296,7 +296,7 @@ Standard_Boolean GeomLib_Tool::Parameter(const Handle(Geom_Curve)& Curve,
     }
   // process parametrical curves
   else if( KindOfCurve == STANDARD_TYPE (Geom_BSplineCurve) ||
-	   KindOfCurve == STANDARD_TYPE (Geom_BSplineCurve) ||
+	   KindOfCurve == STANDARD_TYPE (Geom_BezierCurve) ||
 	   KindOfCurve == STANDARD_TYPE (Geom_TrimmedCurve) ||
 	   KindOfCurve == STANDARD_TYPE (Geom_OffsetCurve) )
     {
@@ -546,7 +546,7 @@ Standard_Boolean GeomLib_Tool::Parameter(const Handle(Geom2d_Curve)& Curve,
     }
   // process parametrical curves
   else if( KindOfCurve == STANDARD_TYPE (Geom2d_BSplineCurve) ||
-	   KindOfCurve == STANDARD_TYPE (Geom2d_BSplineCurve) ||
+	   KindOfCurve == STANDARD_TYPE (Geom2d_BezierCurve) ||
 	   KindOfCurve == STANDARD_TYPE (Geom2d_TrimmedCurve) ||
 	   KindOfCurve == STANDARD_TYPE (Geom2d_OffsetCurve) )
     {
diff --git a/src/GeomTools/GeomTools_Curve2dSet.cxx b/src/GeomTools/GeomTools_Curve2dSet.cxx
index 9344a5a..5737f1f 100644
--- a/src/GeomTools/GeomTools_Curve2dSet.cxx
+++ b/src/GeomTools/GeomTools_Curve2dSet.cxx
@@ -502,7 +502,7 @@ void  GeomTools_Curve2dSet::Dump(Standard_OStream& OS)const
 
 void  GeomTools_Curve2dSet::Write(Standard_OStream& OS)const 
 {
-  std::streamsize  prec = OS.precision(17);
+  std::streamsize prec = OS.precision(17);
 
   Standard_Integer i, nbsurf = myMap.Extent();
   OS << "Curve2ds "<< nbsurf << "\n";
diff --git a/src/GeometryTest/GeometryTest_APICommands.cxx b/src/GeometryTest/GeometryTest_APICommands.cxx
index 128ba8e..c4c0f16 100644
--- a/src/GeometryTest/GeometryTest_APICommands.cxx
+++ b/src/GeometryTest/GeometryTest_APICommands.cxx
@@ -56,7 +56,11 @@ Standard_IMPORT Draw_Viewer dout;
 
 static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const char** a)
 {
-  if ( n < 5) return 1;
+  if ( n < 5)
+  {
+    cout << " Use proj curve/surf x y z [extrema algo: g(grad)/t(tree)]" << endl;
+    return 1;
+  }
 
   gp_Pnt P(atof(a[2]),atof(a[3]),atof(a[4]));
 
@@ -64,6 +68,9 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch
 
   Handle(Geom_Curve) GC = DrawTrSurf::GetCurve(a[1]);
   Handle(Geom_Surface) GS;
+  Extrema_ExtAlgo aProjAlgo = Extrema_ExtAlgo_Grad;
+  if (n == 6 && a[5][0] == 't')
+    aProjAlgo = Extrema_ExtAlgo_Tree;
 
   if (GC.IsNull())  {
     GS = DrawTrSurf::GetSurface(a[1]);
@@ -72,7 +79,7 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch
     Standard_Real U1, U2, V1, V2;
     GS->Bounds(U1,U2,V1,V2);
 
-    GeomAPI_ProjectPointOnSurf proj(P,GS,U1,U2,V1,V2);
+    GeomAPI_ProjectPointOnSurf proj(P,GS,U1,U2,V1,V2,aProjAlgo);
     Standard_Real UU,VV;
     for ( Standard_Integer i = 1; i <= proj.NbPoints(); i++) {
       gp_Pnt P1 = proj.Point(i);
@@ -488,8 +495,13 @@ void GeometryTest::APICommands(Draw_Interpretor& theCommands)
   if (done) return;
 
   done = Standard_True;
+  const char* g;
+
+  g = "GEOMETRY curves and surfaces analysis";
+
+  theCommands.Add("proj", "proj curve/surf x y z [extrema algo: g(grad)/t(tree)]",__FILE__, proj);
 
-  theCommands.Add("proj", "proj curve/surf x y z",__FILE__, proj);
+  g = "GEOMETRY approximations";
 
   theCommands.Add("appro", "appro result nbpoint [curve]",__FILE__, appro);
   theCommands.Add("surfapp","surfapp result nbupoint nbvpoint x y z ....",
diff --git a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx
index a2dc675..7b76fe0 100644
--- a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx
+++ b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx
@@ -1419,7 +1419,7 @@ static Standard_Integer compBsplSur (Draw_Interpretor& , Standard_Integer n, con
       gp_Pnt aP1 = GBs1->Value(aU,aV);
       gp_Pnt aP2 = GBs2->Value(aU,aV);
       Standard_Real aDist = aP1.SquareDistance(aP2);
-      if(aDist > Precision::Confusion() * Precision::Confusion())
+      if(aDist > Precision::SquareConfusion())
       {
         nbErr++;
         Standard_Real aD = sqrt(aDist);
diff --git a/src/Graphic3d/FILES b/src/Graphic3d/FILES
index b985933..e095fa2 100644
--- a/src/Graphic3d/FILES
+++ b/src/Graphic3d/FILES
@@ -53,3 +53,4 @@ Graphic3d_AspectText3d.cxx
 Graphic3d_WNTGraphicDevice.cxx
 Graphic3d_NameOfFont.hxx
 Graphic3d_PtrFrameBuffer.hxx
+Graphic3d_BufferType.hxx
diff --git a/src/Graphic3d/Graphic3d.cdl b/src/Graphic3d/Graphic3d.cdl
index 843f369..fa0ca14 100644
--- a/src/Graphic3d/Graphic3d.cdl
+++ b/src/Graphic3d/Graphic3d.cdl
@@ -77,7 +77,8 @@ uses
     WNT,
     Image,
     AlienImage,
-    gp
+    gp,
+    Font
 is
 
     -----------------------
@@ -329,6 +330,7 @@ is
     ---------------------------
 
     imported PrimitiveArray;
+    imported BufferType;
 
     imported CBitFields20;
     ---Purpose: Defines the C structure
diff --git a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx
index 5f5d830..9e7b9c5 100644
--- a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx
+++ b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx
@@ -27,9 +27,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-static Standard_Integer enableArray = 1;
-static Standard_Boolean interleavedArray = Standard_False;
-
 Graphic3d_ArrayOfPrimitives :: Graphic3d_ArrayOfPrimitives (
                         const Graphic3d_TypeOfPrimitiveArray aType,
                         const Standard_Integer maxVertexs,
@@ -99,14 +96,6 @@ Graphic3d_ArrayOfPrimitives :: Graphic3d_ArrayOfPrimitives (
   myPrimitiveArray->num_bounds    = 0;
   myPrimitiveArray->num_vertexs   = 0;
   myPrimitiveArray->num_edges     = 0;
-  myPrimitiveArray->VBOEnabled    = -1;
-  myPrimitiveArray->flagBufferVBO = -1;
-  myPrimitiveArray->contextId     = 0;
-
-  for( int i =0 ; i < VBOMaxType ; i++){
-    myPrimitiveArray->bufferVBO[i] = 0;
-  }
-
 }
 
 void Graphic3d_ArrayOfPrimitives::Destroy (  ){
@@ -159,40 +148,15 @@ void Graphic3d_ArrayOfPrimitives::Destroy (  ){
 }
 
 void Graphic3d_ArrayOfPrimitives::Enable() {
-  enableArray = 1;
+  ///
 }
 
 void Graphic3d_ArrayOfPrimitives::Disable() {
-  enableArray = -1;
+  ///
 }
 
 Standard_Boolean Graphic3d_ArrayOfPrimitives::IsEnable() {
-
-  if( enableArray == 0 ) {
-    OSD_Environment csf(TCollection_AsciiString("CSF_USE_ARRAY_OF_PRIMITIVES"));
-    TCollection_AsciiString value = csf.Value();
-    enableArray = -1;
-    if( value.Length() > 0 ) {
-      if( value.IsIntegerValue() ) {
-        enableArray = value.IntegerValue();
-        if( enableArray > 1 ) {
-          enableArray = 1;
-        } else interleavedArray = Standard_False;
-      }
-    }
-#if TRACE > 0
-    if( enableArray > 0 ) {
-      if( interleavedArray ) 
-        cout << " ! ENABLE to use Interleaved arrays of primitives" << endl;
-      else
-        cout << " ! ENABLE to use Single arrays of primitives" << endl;
-    } else
-      cout << " ! DISABLE to use arrays of primitives" << endl;
-#endif
-  }
-  if( enableArray > 0 ) return Standard_True;
-
-  return Standard_False;
+  return Standard_True;
 }
 
 Standard_Integer Graphic3d_ArrayOfPrimitives::AddVertex(
diff --git a/src/Graphic3d/Graphic3d_AspectFillArea3d.cdl b/src/Graphic3d/Graphic3d_AspectFillArea3d.cdl
index a9bdfc1..040aba5 100644
--- a/src/Graphic3d/Graphic3d_AspectFillArea3d.cdl
+++ b/src/Graphic3d/Graphic3d_AspectFillArea3d.cdl
@@ -203,8 +203,8 @@ is
         -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
         SetPolygonOffsets ( me : mutable;
                             aMode   : Integer from Standard;
-                            aFactor : Real from Standard = 1.0;
-                            aUnits  : Real from Standard = 0.0 );
+                            aFactor : ShortReal from Standard = 1.0;
+                            aUnits  : ShortReal from Standard = 0.0 );
         ---Level: Public
         ---Purpose: Sets up OpenGL polygon offsets mechanism.
         --          <aMode> parameter can contain various combinations of 
@@ -291,8 +291,8 @@ is
         -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
         PolygonOffsets ( me;
                          aMode   : out Integer from Standard;
-                         aFactor : out Real from Standard;
-                         aUnits  : out Real from Standard );
+                         aFactor : out ShortReal from Standard;
+                         aUnits  : out ShortReal from Standard );
         ---Level: Public
         ---Purpose: Returns current polygon offsets settings.
         ---Category: Inquire methods    
@@ -342,7 +342,7 @@ fields
         -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
         -- polygon offsets
         MyPolygonOffsetMode     :       Integer from Standard;
-        MyPolygonOffsetFactor   :       Real from Standard;
-        MyPolygonOffsetUnits    :       Real from Standard;
+        MyPolygonOffsetFactor   :       ShortReal from Standard;
+        MyPolygonOffsetUnits    :       ShortReal from Standard;
 
 end AspectFillArea3d;
diff --git a/src/Graphic3d/Graphic3d_AspectFillArea3d.cxx b/src/Graphic3d/Graphic3d_AspectFillArea3d.cxx
index c4877bc..2e959c3 100644
--- a/src/Graphic3d/Graphic3d_AspectFillArea3d.cxx
+++ b/src/Graphic3d/Graphic3d_AspectFillArea3d.cxx
@@ -247,17 +247,17 @@ Aspect_TypeOfDegenerateModel Graphic3d_AspectFillArea3d::DegenerateModel(
 }
 
 // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets 
-void Graphic3d_AspectFillArea3d::SetPolygonOffsets(const Standard_Integer aMode,
-                                                   const Standard_Real    aFactor,
-                                                   const Standard_Real    aUnits) {
+void Graphic3d_AspectFillArea3d::SetPolygonOffsets(const Standard_Integer    aMode,
+                                                   const Standard_ShortReal  aFactor,
+                                                   const Standard_ShortReal  aUnits) {
   MyPolygonOffsetMode   = ( aMode & Aspect_POM_Mask );
   MyPolygonOffsetFactor = aFactor;
   MyPolygonOffsetUnits  = aUnits;
 }
 
-void Graphic3d_AspectFillArea3d::PolygonOffsets(Standard_Integer& aMode,
-                                                Standard_Real&    aFactor,
-                                                Standard_Real&    aUnits) const {
+void Graphic3d_AspectFillArea3d::PolygonOffsets(Standard_Integer&    aMode,
+                                                Standard_ShortReal&  aFactor,
+                                                Standard_ShortReal&  aUnits) const {
   aMode   = MyPolygonOffsetMode;
   aFactor = MyPolygonOffsetFactor;
   aUnits  = MyPolygonOffsetUnits;
diff --git a/src/Graphic3d/Graphic3d_AspectText3d.cdl b/src/Graphic3d/Graphic3d_AspectText3d.cdl
index 3e21ca1..cce8981 100644
--- a/src/Graphic3d/Graphic3d_AspectText3d.cdl
+++ b/src/Graphic3d/Graphic3d_AspectText3d.cdl
@@ -40,7 +40,7 @@ uses
     TypeOfStyleText   from Aspect,
     TypeOfDisplayText from Aspect,
     AsciiString       from TCollection,
-    FontAspect        from OSD 
+    FontAspect        from Font 
 
 raises
 
@@ -169,12 +169,12 @@ is
     ---Purpose: Returns Angle of degree
 
     SetTextFontAspect ( me          : mutable;
-                        AFontAspect : FontAspect from OSD );
+                        AFontAspect : FontAspect from Font );
     ---Level: Public
     ---Purpose: Turns usage of Aspect text 
     ---Category: Methods to modify the class definition
 
-    GetTextFontAspect( me ) returns FontAspect from OSD;
+    GetTextFontAspect( me ) returns FontAspect from Font;
     ---Level: Public 
     ---Purpose: Returns text FontAspect
 
@@ -239,7 +239,7 @@ is
              AColorSubTitle     : out Color from Quantity;  
              ATextZoomable      : out Boolean from Standard;
              ATextAngle         : out Real from Standard;
-             ATextFontAspect    : out FontAspect from OSD)
+             ATextFontAspect    : out FontAspect from Font)
             is static;
     ---Level: Public
     ---Purpose: Returns the current values of the group <me>.
@@ -290,6 +290,6 @@ fields
     MyTextAngle :   Real from Standard;
 
     -- the variable turning FontAspect of the text
-    MyTextFontAspect :  FontAspect from OSD;
+    MyTextFontAspect :  FontAspect from Font;
 
 end AspectText3d;
diff --git a/src/Graphic3d/Graphic3d_AspectText3d.cxx b/src/Graphic3d/Graphic3d_AspectText3d.cxx
index 5fe609e..e7b19cf 100644
--- a/src/Graphic3d/Graphic3d_AspectText3d.cxx
+++ b/src/Graphic3d/Graphic3d_AspectText3d.cxx
@@ -83,7 +83,7 @@ Graphic3d_AspectText3d::Graphic3d_AspectText3d ():
 MyFont (Graphic3d_NOF_ASCII_MONO), MyColor (Quantity_NOC_YELLOW), MyFactor (1.0), MySpace (0.0), MyStyle (Aspect_TOST_NORMAL), MyDisplayType (Aspect_TODT_NORMAL), MyColorSubTitle (Quantity_NOC_WHITE) {
   MyTextZoomable = Standard_False;
   MyTextAngle = 0.0;
-  MyTextFontAspect = OSD_FA_Regular;
+  MyTextFontAspect = Font_FA_Regular;
 }
 
 Graphic3d_AspectText3d::Graphic3d_AspectText3d (
@@ -96,7 +96,7 @@ Graphic3d_AspectText3d::Graphic3d_AspectText3d (
 MyFont(AFont), MyColor (AColor), MyFactor (AFactor), MySpace (ASpace), MyStyle (AStyle), MyDisplayType(ADisplayType), MyColorSubTitle   (Quantity_NOC_WHITE) {
   MyTextZoomable = Standard_False;
   MyTextAngle = 0.0;
-  MyTextFontAspect = OSD_FA_Regular;
+  MyTextFontAspect = Font_FA_Regular;
   if(MyFont.Length() == 0)
     MyFont.AssignCat(Graphic3d_NOF_ASCII_MONO);
 
@@ -181,12 +181,12 @@ Standard_Real Graphic3d_AspectText3d::GetTextAngle() const
   return MyTextAngle;
 }
 
-void Graphic3d_AspectText3d::SetTextFontAspect(const OSD_FontAspect AFontAspect) 
+void Graphic3d_AspectText3d::SetTextFontAspect(const Font_FontAspect AFontAspect) 
 {
   MyTextFontAspect = AFontAspect;
 }
 
-OSD_FontAspect Graphic3d_AspectText3d::GetTextFontAspect() const
+Font_FontAspect Graphic3d_AspectText3d::GetTextFontAspect() const
 {
   return MyTextFontAspect;
 }
@@ -236,7 +236,7 @@ void Graphic3d_AspectText3d::Values ( Quantity_Color& AColor,
                                       Quantity_Color& AColorSubTitle, 
                                       Standard_Boolean& ATextZoomable,
                                       Standard_Real& ATextAngle,
-                                      OSD_FontAspect& ATextFontAspect ) const 
+                                      Font_FontAspect& ATextFontAspect ) const 
 {
 
   AColor          = MyColor;
diff --git a/src/Graphic3d/Graphic3d_GraphicDriver.cdl b/src/Graphic3d/Graphic3d_GraphicDriver.cdl
index 7d5cf4a..3a298f9 100644
--- a/src/Graphic3d/Graphic3d_GraphicDriver.cdl
+++ b/src/Graphic3d/Graphic3d_GraphicDriver.cdl
@@ -71,6 +71,7 @@ uses
     PlaneAngle          from Quantity,
 
     AlienImage          from AlienImage,
+    PixMap              from Image,
 
     Array1OfEdge        from Aspect,
     CLayer2d            from Aspect,
@@ -93,7 +94,7 @@ uses
     CPlane              from Graphic3d,
     CStructure          from Graphic3d,
     CView               from Graphic3d,
-    CRawBufferData      from Image,
+    BufferType          from Graphic3d,
     Structure           from Graphic3d,
     TextPath            from Graphic3d,
     TypeOfComposition   from Graphic3d,
@@ -128,7 +129,7 @@ uses
     HArray1OfReal       from TColStd,
     CUserDraw           from Graphic3d,
     NListOfHAsciiString from Graphic3d,
-    FontAspect          from OSD,
+    FontAspect          from Font,
     CGraduatedTrihedron from Graphic3d
 
 raises
@@ -1008,8 +1009,9 @@ is
     ---Purpose: Change offscreen FBO viewport.
 
         BufferDump( me            : mutable;
-                    view          : CView from Graphic3d;
-                    buffer        : in out CRawBufferData from Image )
+                    theCView      : CView from Graphic3d;
+                    theImage      : in out PixMap from Image;
+                    theBufferType : BufferType from Graphic3d )
                    returns Boolean from Standard
     is deferred;
     ---Purpose: Dump active rendering buffer into specified memory buffer.
diff --git a/src/Graphic3d/Graphic3d_Group_8.cxx b/src/Graphic3d/Graphic3d_Group_8.cxx
index 5ea73d1..6ffe51b 100644
--- a/src/Graphic3d/Graphic3d_Group_8.cxx
+++ b/src/Graphic3d/Graphic3d_Group_8.cxx
@@ -278,7 +278,7 @@ void Graphic3d_Group::SetGroupPrimitivesAspect (const Handle(Graphic3d_AspectFil
 
   // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets 
   Standard_Integer aPolyMode;
-  Standard_Real    aPolyFactor, aPolyUnits;
+  Standard_ShortReal    aPolyFactor, aPolyUnits;
   CTX->PolygonOffsets(aPolyMode, aPolyFactor, aPolyUnits);
   MyCGroup.ContextFillArea.PolygonOffsetMode   = aPolyMode;
   MyCGroup.ContextFillArea.PolygonOffsetFactor = (float)aPolyFactor;
@@ -344,7 +344,7 @@ void Graphic3d_Group::SetGroupPrimitivesAspect (const Handle(Graphic3d_AspectTex
   Quantity_Color AColorSubTitle;
   Standard_Boolean ATextZoomable;
   Standard_Real    ATextAngle;
-  OSD_FontAspect   ATextFontAspect;
+  Font_FontAspect   ATextFontAspect;
 
   CTX->Values (AColor, AFont, AnExpansion, ASpace, AStyle, ADisplayType,AColorSubTitle,ATextZoomable,ATextAngle,ATextFontAspect);
   AColor.Values (R, G, B, Quantity_TOC_RGB);
@@ -362,7 +362,7 @@ void Graphic3d_Group::SetGroupPrimitivesAspect (const Handle(Graphic3d_AspectTex
   MyCGroup.ContextText.ColorSubTitle.g    = float (Gs);
   MyCGroup.ContextText.ColorSubTitle.b    = float (Bs);
   MyCGroup.ContextText.TextZoomable   = ATextZoomable;   
-  MyCGroup.ContextText.TextAngle    = (float)ATextAngle;   
+  MyCGroup.ContextText.TextAngle    = float (ATextAngle);   
   MyCGroup.ContextText.TextFontAspect   = (int)ATextFontAspect;
 
   MyCGroup.ContextText.IsDef      = 1;
@@ -598,7 +598,7 @@ void Graphic3d_Group::SetPrimitivesAspect (const Handle(Graphic3d_AspectFillArea
 
   // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets 
   Standard_Integer aPolyMode;
-  Standard_Real    aPolyFactor, aPolyUnits;
+  Standard_ShortReal    aPolyFactor, aPolyUnits;
   CTX->PolygonOffsets(aPolyMode, aPolyFactor, aPolyUnits);
   MyCGroup.ContextFillArea.PolygonOffsetMode   = aPolyMode;
   MyCGroup.ContextFillArea.PolygonOffsetFactor = (float)aPolyFactor;
@@ -664,7 +664,7 @@ void Graphic3d_Group::SetPrimitivesAspect (const Handle(Graphic3d_AspectText3d)&
   Quantity_Color AColorSubTitle;  
   Standard_Boolean ATextZoomable;
   Standard_Real ATextAngle;
-  OSD_FontAspect ATextFontAspect;
+  Font_FontAspect ATextFontAspect;
 
   CTX->Values (AColor, AFont, AnExpansion, ASpace, AStyle, ADisplayType,AColorSubTitle,ATextZoomable,ATextAngle,ATextFontAspect);
   AColor.Values (R, G, B, Quantity_TOC_RGB);
@@ -682,7 +682,7 @@ void Graphic3d_Group::SetPrimitivesAspect (const Handle(Graphic3d_AspectText3d)&
   MyCGroup.ContextText.ColorSubTitle.g    = float (Gs);
   MyCGroup.ContextText.ColorSubTitle.b    = float (Bs);
   MyCGroup.ContextText.TextZoomable   = ATextZoomable;  
-  MyCGroup.ContextText.TextAngle    = (float)ATextAngle;   
+  MyCGroup.ContextText.TextAngle    = float (ATextAngle);   
   MyCGroup.ContextText.TextFontAspect   = (int)ATextFontAspect;   
   MyCGroup.ContextText.IsDef              = 1;
 
diff --git a/src/Graphic3d/Graphic3d_Structure.cdl b/src/Graphic3d/Graphic3d_Structure.cdl
index 1e71d03..d142af8 100644
--- a/src/Graphic3d/Graphic3d_Structure.cdl
+++ b/src/Graphic3d/Graphic3d_Structure.cdl
@@ -235,9 +235,11 @@ is
 			     Priority	: Integer from Standard )
 	---Level: Public
 	---Purpose: Modifies the order of displaying the structure.
-	--	    Values are between 0 et 10.
-	--	    The priority 10 being displayed first.
-	--	    The default value is 5
+	--	    Values are between 0 and 10.
+	--      Structures are drawn according to their display priorities
+	--      in ascending order.
+	--	    A structure of priority 10 is displayed the last and appears over the others.
+	--	    The default value is 5.
 	--  Category: Methods to modify the class definition
 	--  Warning: If <me> is displayed then the SetDisplayPriority
 	--	    method erase <me> and display <me> with the
diff --git a/src/Graphic3d/Graphic3d_Structure.cxx b/src/Graphic3d/Graphic3d_Structure.cxx
index cd2abad..713806b 100644
--- a/src/Graphic3d/Graphic3d_Structure.cxx
+++ b/src/Graphic3d/Graphic3d_Structure.cxx
@@ -232,13 +232,6 @@ void Graphic3d_Structure::Clear (const Standard_Boolean WithDestruction)
   MyCStructure.ContainsFacet = 0;
 
   // clean groups in graphics driver at first
-  if (WithDestruction)
-  {
-    // clean and empty each group
-    Standard_Integer Length = MyGroups.Length();
-    for (Standard_Integer aGrId = 1; aGrId <= Length; ++aGrId)
-      MyGroups.ChangeValue (aGrId)->Clear();
-  }
   GraphicClear (WithDestruction);
 
   // only then remove group references
@@ -722,31 +715,31 @@ Standard_Boolean Graphic3d_Structure::IsInfinite () const {
 
 }
 
-void Graphic3d_Structure::GraphicClear (const Standard_Boolean WithDestruction) {
+void Graphic3d_Structure::GraphicClear (const Standard_Boolean WithDestruction)
+{
+  // clean and empty each group
+  Standard_Integer Length = MyGroups.Length();
+  for (Standard_Integer aGrId = 1; aGrId <= Length; ++aGrId)
+  {
+    MyGroups.ChangeValue (aGrId)->Clear();
+  }
 
   if (WithDestruction)
+  {
     /*
-    * Dans ce cas l'appelant dans faire :
     * void Prs3d_Presentation::Clear () {
     *   Graphic3d_Structure::Clear ();
     *   myCurrentGroup = new Graphic3d_Group (this);
     * }
     */
-    MyGraphicDriver->ClearStructure (MyCStructure);
-  else {
-    /*
-    * Dans ce cas l'appelant dans faire :
-    * void Prs3d_Presentation::Clear () {
-    *   Graphic3d_Structure::Clear ();
-    *   // myCurrentGroup = new Graphic3d_Group (this);
-    * }
-    */
-    Standard_Integer Length = MyGroups.Length ();
+    while (!MyGroups.IsEmpty())
+    {
+      Handle(Graphic3d_Group) aGroup = MyGroups.First();
+      aGroup->Remove();
+    }
 
-    for (Standard_Integer i=1; i<=Length; i++)
-      (MyGroups.Value (i))->Clear ();
+    MyGraphicDriver->ClearStructure (MyCStructure);
   }
-
 }
 
 void Graphic3d_Structure::GraphicConnect (const Handle(Graphic3d_Structure)& ADaughter) {
@@ -1262,7 +1255,7 @@ void Graphic3d_Structure::SetPrimitivesAspect (const Handle(Graphic3d_AspectFill
 
   // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
   Standard_Integer aPolyMode;
-  Standard_Real    aPolyFactor, aPolyUnits;
+  Standard_ShortReal    aPolyFactor, aPolyUnits;
   CTX->PolygonOffsets(aPolyMode, aPolyFactor, aPolyUnits);
   MyCStructure.ContextFillArea.PolygonOffsetMode   = aPolyMode;
   MyCStructure.ContextFillArea.PolygonOffsetFactor = (float)aPolyFactor;
@@ -1301,7 +1294,7 @@ void Graphic3d_Structure::SetPrimitivesAspect (const Handle(Graphic3d_AspectText
   Quantity_Color            AColorSubTitle;
   Standard_Boolean          ATextZoomable;
   Standard_Real             ATextAngle;
-  OSD_FontAspect            ATextFontAspect;
+  Font_FontAspect            ATextFontAspect;
 
   CTX->Values (AColor, AFont, AnExpansion, ASpace, AStyle, ADisplayType,AColorSubTitle,ATextZoomable,ATextAngle,ATextFontAspect);
   AColor.Values (R, G, B, Quantity_TOC_RGB);
@@ -1319,7 +1312,7 @@ void Graphic3d_Structure::SetPrimitivesAspect (const Handle(Graphic3d_AspectText
   MyCStructure.ContextText.ColorSubTitle.g  = float (Gs);
   MyCStructure.ContextText.ColorSubTitle.b  = float (Bs);
   MyCStructure.ContextText.TextZoomable     = ATextZoomable;
-  MyCStructure.ContextText.TextAngle        = (float)ATextAngle;
+  MyCStructure.ContextText.TextAngle        = float (ATextAngle);
   MyCStructure.ContextText.TextFontAspect   = (int)ATextFontAspect;
 
   MyCStructure.ContextText.IsDef          = 1;
@@ -1783,9 +1776,9 @@ void Graphic3d_Structure::SetTransformPersistence( const Graphic3d_TransModeFlag
   if (IsDeleted ()) return;
 
   MyCStructure.TransformPersistence.Flag = AFlag;
-  MyCStructure.TransformPersistence.Point.x = (float)APoint.X();
-  MyCStructure.TransformPersistence.Point.y = (float)APoint.Y();
-  MyCStructure.TransformPersistence.Point.z = (float)APoint.Z();
+  MyCStructure.TransformPersistence.Point.x = float (APoint.X());
+  MyCStructure.TransformPersistence.Point.y = float (APoint.Y());
+  MyCStructure.TransformPersistence.Point.z = float (APoint.Z());
   //MyStructureManager->Update ();
   //Update();
   MyGraphicDriver->ContextStructure( MyCStructure );
@@ -2120,7 +2113,7 @@ void Graphic3d_Structure::UpdateStructure (const Handle(Graphic3d_AspectLine3d)&
   Quantity_Color            AColorSubTitle;
   Standard_Boolean          ATextZoomable;
   Standard_Real             ATextAngle;
-  OSD_FontAspect            ATextFontAspect;
+  Font_FontAspect            ATextFontAspect;
 
 
   CTXL->Values (AColor, ALType, AWidth);
@@ -2157,7 +2150,7 @@ void Graphic3d_Structure::UpdateStructure (const Handle(Graphic3d_AspectLine3d)&
   MyCStructure.ContextText.ColorSubTitle.g  = float (Gs);
   MyCStructure.ContextText.ColorSubTitle.b  = float (Bs);
   MyCStructure.ContextText.TextZoomable     = ATextZoomable;
-  MyCStructure.ContextText.TextAngle        = (float)ATextAngle;
+  MyCStructure.ContextText.TextAngle        = float (ATextAngle);
   MyCStructure.ContextText.TextFontAspect   = (int)ATextFontAspect;
 
 
@@ -2339,7 +2332,7 @@ void Graphic3d_Structure::UpdateStructure (const Handle(Graphic3d_AspectLine3d)&
 
   // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
   Standard_Integer aPolyMode;
-  Standard_Real    aPolyFactor, aPolyUnits;
+  Standard_ShortReal    aPolyFactor, aPolyUnits;
   CTXF->PolygonOffsets(aPolyMode, aPolyFactor, aPolyUnits);
   MyCStructure.ContextFillArea.PolygonOffsetMode   = aPolyMode;
   MyCStructure.ContextFillArea.PolygonOffsetFactor = (float)aPolyFactor;
diff --git a/src/IFSelect/IFSelect_Editor.cxx b/src/IFSelect/IFSelect_Editor.cxx
index 435666f..f389a3d 100644
--- a/src/IFSelect/IFSelect_Editor.cxx
+++ b/src/IFSelect/IFSelect_Editor.cxx
@@ -41,9 +41,9 @@ IFSelect_Editor::IFSelect_Editor (const Standard_Integer nbval)
   Standard_Integer lng = shn.Length();
   if (lng > 0) thenames->SetItem (shortname,num);
   if (lng > themaxsh) themaxsh = lng;
-  lng = strlen (typval->Name());
+  lng = (Standard_Integer) strlen (typval->Name());
   if (lng > themaxco) themaxco = lng;
-  lng = strlen (typval->Label());
+  lng = (Standard_Integer) strlen (typval->Label());
   if (lng > themaxla) themaxla = lng;
 
   thenames->SetItem (typval->Name(),num);
diff --git a/src/IGESGeom/IGESGeom_BSplineSurface.cxx b/src/IGESGeom/IGESGeom_BSplineSurface.cxx
index 2c15155..62493c2 100644
--- a/src/IGESGeom/IGESGeom_BSplineSurface.cxx
+++ b/src/IGESGeom/IGESGeom_BSplineSurface.cxx
@@ -115,8 +115,13 @@ IGESGeom_BSplineSurface::IGESGeom_BSplineSurface ()    {  }
   if (flag) return isPolynomial;
   Standard_Integer i,j;
   Standard_Real w0 = theWeights->Value(0,0);
-  for ( j = 0; j < theIndexV; j ++)
-    for (i = 0; i < theIndexU; i ++)
+  /*CR23377
+  * Following fix is needed to address Rational surface with non-unitary weights at last index
+  * Limit for indices are changed from theIndexV-->theIndexV+1 (=NbPolesV())
+  *                                    theIndexU--> theIndexU+1 (=NbPolesU())
+  */
+  for ( j = 0; j < (theIndexV+1); j ++)
+    for (i = 0; i < (theIndexU+1); i ++)
       if (Abs(theWeights->Value(i,j) - w0) > 1.e-10) return Standard_False;
   return Standard_True;
 }
diff --git a/src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx b/src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx
index 2a079bc..b1002a8 100644
--- a/src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx
+++ b/src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx
@@ -330,7 +330,7 @@ void IGESGeom_ToolOffsetCurve::OwnCheck(const Handle(IGESGeom_OffsetCurve)& ent,
   if (ot == 3 && (ent->FunctionParameter() < 1 || ent->FunctionParameter() > 3))
     ach.SendFail("Offset Function Parameter != 1-2 or 3 (rq : for X-Y or Z)");
 */
-  if ((ot !=1) && //:l9 abv 15.01.99: CTS22023 and TEC0278: only if ot is function
+  if (ot !=1 && //:l9 abv 15.01.99: CTS22023 and TEC0278: only if ot is function
       ((ent->TaperedOffsetType() < 1) || (ent->TaperedOffsetType() > 2))) {
     Message_Msg Msg114("XSTEP_114");
     ach->SendFail(Msg114);
diff --git a/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx b/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx
index 58df069..218b5b3 100644
--- a/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx
+++ b/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx
@@ -93,26 +93,26 @@ Standard_Boolean  IGESGraph_ToolDrawingUnits::OwnCorrect
   Standard_CString unm = "";
   if (!ent->Unit().IsNull()) unm  = ent->Unit()->ToCString();
   switch (unf) {
-    case  1 : if (strcmp(unm,"IN") && strcmp(unm,"INCH"))
+    case  1 : if ((strcmp(unm,"IN") == 0) || (strcmp(unm,"INCH") == 0))
       name = new TCollection_HAsciiString ("IN");  break;
-    case  2 : if (strcmp(unm,"MM"))
+    case  2 : if (strcmp(unm,"MM") == 0)
       name = new TCollection_HAsciiString ("MM");  break;
     case  3 : break;  // nom libre
-    case  4 : if (strcmp(unm,"FT"))
+    case  4 : if (strcmp(unm,"FT") == 0)
       name = new TCollection_HAsciiString ("FT");  break;
-    case  5 : if (strcmp(unm,"MI"))
+    case  5 : if (strcmp(unm,"MI") == 0)
       name = new TCollection_HAsciiString ("MI");  break;
-    case  6 : if (strcmp(unm,"M"))
+    case  6 : if (strcmp(unm,"M") == 0)
       name = new TCollection_HAsciiString ("M");   break;
-    case  7 : if (strcmp(unm,"KM"))
+    case  7 : if (strcmp(unm,"KM") == 0)
       name = new TCollection_HAsciiString ("KM");  break;
-    case  8 : if (strcmp(unm,"MIL"))
+    case  8 : if (strcmp(unm,"MIL") == 0)
       name = new TCollection_HAsciiString ("MIL"); break;
-    case  9 : if (strcmp(unm,"UM"))
+    case  9 : if (strcmp(unm,"UM") == 0)
       name = new TCollection_HAsciiString ("UM");  break;
-    case 10 : if (strcmp(unm,"CM"))
+    case 10 : if (strcmp(unm,"CM") == 0)
       name = new TCollection_HAsciiString ("CM");  break;
-    case 11 : if (strcmp(unm,"UIN"))
+    case 11 : if (strcmp(unm,"UIN") == 0)
       name = new TCollection_HAsciiString ("UIN"); break;
     default : break;    // on ne peut rien faire ... ?
   }
diff --git a/src/IGESToBRep/IGESToBRep_TopoSurface.cxx b/src/IGESToBRep/IGESToBRep_TopoSurface.cxx
index 45b60e7..79c0656 100644
--- a/src/IGESToBRep/IGESToBRep_TopoSurface.cxx
+++ b/src/IGESToBRep/IGESToBRep_TopoSurface.cxx
@@ -1521,12 +1521,8 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferPlaneParts(const Handle(IGESGeom_Pl
 	gp_Trsf trans;
 	if (crv->IsKind(STANDARD_TYPE(IGESGeom_CurveOnSurface))) {
 	  DeclareAndCast(IGESGeom_CurveOnSurface, crv142, crv);
-	  if(st->HasBoundingCurveHole()) {    
-	    TopoDS_Shape myshape = TC.TransferCurveOnFace (plane, crv142, trans, TheULength, Standard_False);
-	  }
-	  else {
-	    TopoDS_Shape myshape = TC.TransferCurveOnFace (plane, crv142, trans, TheULength, Standard_False);
-	  }
+	  TopoDS_Shape myshape = TC.TransferCurveOnFace (plane, crv142, trans, TheULength, Standard_False);
+	  
 	  //:3 by ABV 5 Nov 97: set plane to be finite
 	  if ( first ) {
 	    TopExp_Explorer ws ( plane, TopAbs_WIRE ); 
diff --git a/src/Image/FILES b/src/Image/FILES
index 5b70dab..84ca817 100644
--- a/src/Image/FILES
+++ b/src/Image/FILES
@@ -6,5 +6,11 @@ Image_PixelAddress.cxx
 Image_PixelAddress.hxx
 Image.edl
 Image_CMPLRS.edl
-Image_CRawBufferData.hxx
-Image_HPrivateImage.hxx
+Image_PixMap.hxx
+Image_PixMap.cxx
+Image_PixMapData.hxx
+Image_Color.hxx
+Image_AlienPixMap.hxx
+Image_AlienPixMap.cxx
+Image_Diff.hxx
+Image_Diff.cxx
diff --git a/src/Image/Image.cdl b/src/Image/Image.cdl
index 5be5645..a34e05e 100644
--- a/src/Image/Image.cdl
+++ b/src/Image/Image.cdl
@@ -88,18 +88,16 @@ is
 				    IndexPixel from Aspect,
 				    IndexPixelMapHasher );
 
-    class PixMap;
-    ---Purpose: Aspect_PixMap implementation.
-
         -----------------------------
 	---Category: Imported types:
         -----------------------------
 
 	imported PixelAddress;
-
-    imported HPrivateImage;
-
-    imported CRawBufferData;
+	imported PixMap;
+	imported AlienPixMap;
+	imported PixMap_Handle;
+	imported AlienPixMap_Handle;
+	imported Diff;
 
         -----------------------------
         ---Category: The Enumerations
@@ -132,12 +130,7 @@ is
     	---Purpose: Type of dithering method.
     
     enumeration TypeOfImage is	TOI_ColorImage,
-                TOI_PseudoColorImage,
-                TOI_RGB,
-                TOI_RGBA,
-                TOI_RGBF,
-                TOI_RGBAF,
-                TOI_FLOAT
+                TOI_PseudoColorImage
     end TypeOfImage ;
 
     Zoom     ( aImage         : mutable Image from Image ;
diff --git a/src/Image/Image_AlienPixMap.cxx b/src/Image/Image_AlienPixMap.cxx
new file mode 100644
index 0000000..ce86854
--- /dev/null
+++ b/src/Image/Image_AlienPixMap.cxx
@@ -0,0 +1,512 @@
+// Created on: 2010-09-16
+// Created by: KGV
+// Copyright (c) 2010-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#ifdef HAVE_CONFIG_H
+  #include <config.h>
+#endif
+
+#ifdef HAVE_FREEIMAGE
+  #include <FreeImage.h>
+#endif
+
+#include <Image_AlienPixMap.hxx>
+#include <gp.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <fstream>
+
+#ifdef HAVE_FREEIMAGE
+namespace
+{
+  static Image_PixMap::ImgFormat convertFromFreeFormat (FREE_IMAGE_TYPE       theFormatFI,
+                                                        FREE_IMAGE_COLOR_TYPE theColorTypeFI,
+                                                        unsigned              theBitsPerPixel)
+  {
+    switch (theFormatFI)
+    {
+      case FIT_RGBF:   return Image_PixMap::ImgRGBF;
+      case FIT_RGBAF:  return Image_PixMap::ImgRGBAF;
+      case FIT_FLOAT:  return Image_PixMap::ImgGrayF;
+      case FIT_BITMAP:
+      {
+        switch (theColorTypeFI)
+        {
+          case FIC_MINISBLACK:
+          {
+            return Image_PixMap::ImgGray;
+          }
+          case FIC_RGB:
+          {
+            if (Image_PixMap::IsBigEndianHost())
+            {
+              return (theBitsPerPixel == 32) ? Image_PixMap::ImgRGB32 : Image_PixMap::ImgRGB;
+            }
+            else
+            {
+              return (theBitsPerPixel == 32) ? Image_PixMap::ImgBGR32 : Image_PixMap::ImgBGR;
+            }
+          }
+          case FIC_RGBALPHA:
+          {
+            return Image_PixMap::IsBigEndianHost() ? Image_PixMap::ImgRGBA : Image_PixMap::ImgBGRA;
+          }
+          default:
+            return Image_PixMap::ImgUNKNOWN;
+        }
+      }
+      default:
+        return Image_PixMap::ImgUNKNOWN;
+    }
+  }
+
+  static FREE_IMAGE_TYPE convertToFreeFormat (Image_PixMap::ImgFormat theFormat)
+  {
+    switch (theFormat)
+    {
+      case Image_PixMap::ImgGrayF:
+        return FIT_FLOAT;
+      case Image_PixMap::ImgRGBAF:
+        return FIT_RGBAF;
+      case Image_PixMap::ImgRGBF:
+        return FIT_RGBF;
+      case Image_PixMap::ImgRGBA:
+      case Image_PixMap::ImgBGRA:
+      case Image_PixMap::ImgRGB32:
+      case Image_PixMap::ImgBGR32:
+      case Image_PixMap::ImgRGB:
+      case Image_PixMap::ImgBGR:
+      case Image_PixMap::ImgGray:
+        return FIT_BITMAP;
+      default:
+        return FIT_UNKNOWN;
+    }
+  }
+};
+#endif
+
+IMPLEMENT_STANDARD_HANDLE (Image_AlienPixMap, Image_PixMap)
+IMPLEMENT_STANDARD_RTTIEXT(Image_AlienPixMap, Image_PixMap)
+
+// =======================================================================
+// function : Image_AlienPixMap
+// purpose  :
+// =======================================================================
+Image_AlienPixMap::Image_AlienPixMap()
+: myLibImage (NULL)
+{
+  SetTopDown (false);
+}
+
+// =======================================================================
+// function : ~Image_AlienPixMap
+// purpose  :
+// =======================================================================
+Image_AlienPixMap::~Image_AlienPixMap()
+{
+  Clear();
+}
+
+// =======================================================================
+// function : InitWrapper
+// purpose  :
+// =======================================================================
+bool Image_AlienPixMap::InitWrapper (ImgFormat            thePixelFormat,
+                                     Standard_Byte*       theDataPtr,
+                                     const Standard_Size  theSizeX,
+                                     const Standard_Size  theSizeY,
+                                     const Standard_Size  theSizeRowBytes)
+{
+  Clear();
+  return false;
+}
+
+// =======================================================================
+// function : InitTrash
+// purpose  :
+// =======================================================================
+bool Image_AlienPixMap::InitTrash (ImgFormat           thePixelFormat,
+                                   const Standard_Size theSizeX,
+                                   const Standard_Size theSizeY,
+                                   const Standard_Size theSizeRowBytes)
+{
+  Clear();
+#ifdef HAVE_FREEIMAGE
+  FREE_IMAGE_TYPE aFormatFI = convertToFreeFormat (thePixelFormat);
+  int aBitsPerPixel = (int )Image_PixMap::SizePixelBytes (thePixelFormat) * 8;
+  if (aFormatFI == FIT_UNKNOWN)
+  {
+    aFormatFI     = FIT_BITMAP;
+    aBitsPerPixel = 24;
+  }
+
+  FIBITMAP* anImage = FreeImage_AllocateT (aFormatFI, (int )theSizeX, (int )theSizeY, aBitsPerPixel);
+  Image_PixMap::ImgFormat aFormat = convertFromFreeFormat (FreeImage_GetImageType (anImage),
+                                                           FreeImage_GetColorType (anImage),
+                                                           FreeImage_GetBPP (anImage));
+  if (thePixelFormat == Image_PixMap::ImgBGR32
+   || thePixelFormat == Image_PixMap::ImgRGB32)
+  {
+    //FreeImage_SetTransparent (anImage, FALSE);
+    aFormat = (aFormat == Image_PixMap::ImgBGRA) ? Image_PixMap::ImgBGR32 : Image_PixMap::ImgRGB32;
+  }
+
+  Image_PixMap::InitWrapper (aFormat, FreeImage_GetBits (anImage),
+                             FreeImage_GetWidth (anImage), FreeImage_GetHeight (anImage), FreeImage_GetPitch (anImage));
+  SetTopDown (false);
+
+  // assign image after wrapper initialization (virtual Clear() called inside)
+  myLibImage = anImage;
+  return true;
+#else
+  return Image_PixMap::InitTrash (thePixelFormat, theSizeX, theSizeY, theSizeRowBytes);
+#endif
+}
+
+// =======================================================================
+// function : Clear
+// purpose  :
+// =======================================================================
+bool Image_AlienPixMap::InitCopy (const Image_PixMap& theCopy)
+{
+  if (&theCopy == this)
+  {
+    // self-copying disallowed
+    return false;
+  }
+  if (!InitTrash (theCopy.Format(), theCopy.SizeX(), theCopy.SizeY(), theCopy.SizeRowBytes()))
+  {
+    return false;
+  }
+
+  if (myImgFormat == theCopy.Format())
+  {
+    if (myData.mySizeRowBytes == theCopy.SizeRowBytes()
+     && myData.myTopToDown    == theCopy.TopDownInc())
+    {
+      // copy with one call
+      memcpy (myData.myDataPtr, theCopy.Data(), theCopy.SizeBytes());
+      return true;
+    }
+
+    // copy row-by-row
+    const Standard_Size aRowSizeBytes = (myData.mySizeRowBytes > theCopy.SizeRowBytes())
+                                      ? theCopy.SizeRowBytes() : myData.mySizeRowBytes;
+    for (Standard_Size aRow = 0; aRow < myData.mySizeY; ++aRow)
+    {
+      memcpy (ChangeRow (aRow), theCopy.Row (aRow), aRowSizeBytes);
+    }
+    return true;
+  }
+
+  // pixel format conversion required
+  Clear();
+  return false;
+}
+
+// =======================================================================
+// function : Clear
+// purpose  :
+// =======================================================================
+void Image_AlienPixMap::Clear (ImgFormat thePixelFormat)
+{
+  Image_PixMap::Clear (thePixelFormat);
+#ifdef HAVE_FREEIMAGE
+  if (myLibImage != NULL)
+  {
+    FreeImage_Unload (myLibImage);
+    myLibImage = NULL;
+  }
+#endif
+}
+
+// =======================================================================
+// function : Load
+// purpose  :
+// =======================================================================
+bool Image_AlienPixMap::Load (const TCollection_AsciiString& theImagePath)
+{
+  Clear();
+#ifdef HAVE_FREEIMAGE
+
+  FREE_IMAGE_FORMAT aFIF = FreeImage_GetFileType (theImagePath.ToCString(), 0);
+  if (aFIF == FIF_UNKNOWN)
+  {
+    // no signature? try to guess the file format from the file extension
+    aFIF = FreeImage_GetFIFFromFilename (theImagePath.ToCString());
+  }
+  if ((aFIF == FIF_UNKNOWN) || !FreeImage_FIFSupportsReading (aFIF))
+  {
+    // unsupported image format
+    return false;
+  }
+
+  int aLoadFlags = 0;
+  if (aFIF == FIF_GIF)
+  {
+    // 'Play' the GIF to generate each frame (as 32bpp) instead of returning raw frame data when loading
+    aLoadFlags = GIF_PLAYBACK;
+  }
+  else if (aFIF == FIF_ICO)
+  {
+    // convert to 32bpp and create an alpha channel from the AND-mask when loading
+    aLoadFlags = ICO_MAKEALPHA;
+  }
+
+  FIBITMAP* anImage = FreeImage_Load (aFIF, theImagePath.ToCString(), aLoadFlags);
+  if (anImage == NULL)
+  {
+    return false;
+  }
+
+  Image_PixMap::ImgFormat aFormat = convertFromFreeFormat (FreeImage_GetImageType (anImage),
+                                                           FreeImage_GetColorType (anImage),
+                                                           FreeImage_GetBPP (anImage));
+  if (aFormat == Image_PixMap::ImgUNKNOWN)
+  {
+    //anImage = FreeImage_ConvertTo24Bits (anImage);
+    return false;
+  }
+
+  Image_PixMap::InitWrapper (aFormat, FreeImage_GetBits (anImage),
+                             FreeImage_GetWidth (anImage), FreeImage_GetHeight (anImage), FreeImage_GetPitch (anImage));
+  SetTopDown (false);
+
+  // assign image after wrapper initialization (virtual Clear() called inside)
+  myLibImage = anImage;
+  return true;
+#else
+  return false;
+#endif
+}
+
+// =======================================================================
+// function : savePPM
+// purpose  :
+// =======================================================================
+bool Image_AlienPixMap::savePPM (const TCollection_AsciiString& theFileName) const
+{
+  if (IsEmpty())
+  {
+    return false;
+  }
+
+  // Open file
+  FILE* aFile = fopen (theFileName.ToCString(), "wb");
+  if (aFile == NULL)
+  {
+    return false;
+  }
+
+  // Write header
+  fprintf (aFile, "P6\n%d %d\n255\n", (int )SizeX(), (int )SizeY());
+  fprintf (aFile, "# Image stored by OpenCASCADE framework in linear RGB colorspace\n");
+
+  // Write pixel data
+  Quantity_Color aColor;
+  Quantity_Parameter aDummy;
+  Standard_Byte aByte;
+  for (Standard_Size aRow = 0; aRow < SizeY(); ++aRow)
+  {
+    for (Standard_Size aCol = 0; aCol < SizeY(); ++aCol)
+    {
+      // extremely SLOW but universal (implemented for all supported pixel formats)
+      aColor = PixelColor (aCol, aRow, aDummy);
+      aByte = Standard_Byte(aColor.Red() * 255.0);   fwrite (&aByte, 1, 1, aFile);
+      aByte = Standard_Byte(aColor.Green() * 255.0); fwrite (&aByte, 1, 1, aFile);
+      aByte = Standard_Byte(aColor.Blue() * 255.0);  fwrite (&aByte, 1, 1, aFile);
+    }
+  }
+
+  // Close file
+  fclose (aFile);
+  return true;
+}
+
+// =======================================================================
+// function : Save
+// purpose  :
+// =======================================================================
+bool Image_AlienPixMap::Save (const TCollection_AsciiString& theFileName)
+{
+#ifdef HAVE_FREEIMAGE
+  if (myLibImage == NULL)
+  {
+    return false;
+  }
+
+  FREE_IMAGE_FORMAT anImageFormat = FreeImage_GetFIFFromFilename (theFileName.ToCString());
+  if (anImageFormat == FIF_UNKNOWN)
+  {
+    std::cerr << "Image_PixMap, image format doesn't supported!\n";
+    return false;
+  }
+
+  if (IsTopDown())
+  {
+    FreeImage_FlipVertical (myLibImage);
+    SetTopDown (false);
+  }
+
+  // FreeImage doesn't provide flexible format convertion API
+  // so we should perform multiple convertions in some cases!
+  Standard_Boolean isCopied = Standard_False;
+  FIBITMAP* anImageToDump = myLibImage;
+  switch (anImageFormat)
+  {
+    case FIF_PNG:
+    case FIF_BMP:
+    {
+      if (Format() == Image_PixMap::ImgBGR32
+       || Format() == Image_PixMap::ImgRGB32)
+      {
+        // stupid FreeImage treats reserved byte as alpha if some bytes not set to 0xFF
+        Image_PixMapData<Image_ColorRGB32>& aData = Image_PixMap::EditData<Image_ColorRGB32>();
+        for (Standard_Size aRow = 0; aRow < SizeY(); ++aRow)
+        {
+          for (Standard_Size aCol = 0; aCol < SizeX(); ++aCol)
+          {
+            aData.ChangeValue (aRow, aCol).a_() = 0xFF;
+          }
+        }
+      }
+      else if (FreeImage_GetImageType (myLibImage) != FIT_BITMAP)
+      {
+        anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_BITMAP);
+      }
+      break;
+    }
+    case FIF_GIF:
+    {
+      FIBITMAP* aTmpBitmap = myLibImage;
+      if (FreeImage_GetImageType (myLibImage) != FIT_BITMAP)
+      {
+        aTmpBitmap = FreeImage_ConvertToType (myLibImage, FIT_BITMAP);
+        if (aTmpBitmap == NULL)
+        {
+          return false;
+        }
+      }
+
+      if (FreeImage_GetBPP (aTmpBitmap) != 24)
+      {
+        FIBITMAP* aTmpBitmap24 = FreeImage_ConvertTo24Bits (aTmpBitmap);
+        if (aTmpBitmap != myLibImage)
+        {
+          FreeImage_Unload (aTmpBitmap);
+        }
+        if (aTmpBitmap24 == NULL)
+        {
+          return false;
+        }
+        aTmpBitmap = aTmpBitmap24;
+      }
+
+      // need convertion to image with pallete (requires 24bit bitmap)
+      anImageToDump = FreeImage_ColorQuantize (aTmpBitmap, FIQ_NNQUANT);
+      if (aTmpBitmap != myLibImage)
+      {
+        FreeImage_Unload (aTmpBitmap);
+      }
+      break;
+    }
+    case FIF_EXR:
+    {
+      if (Format() == Image_PixMap::ImgGray)
+      {
+        anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_FLOAT);
+      }
+      else if (Format() == Image_PixMap::ImgRGBA
+            || Format() == Image_PixMap::ImgBGRA)
+      {
+        anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_RGBAF);
+      }
+      else
+      {
+        FREE_IMAGE_TYPE aImgTypeFI = FreeImage_GetImageType (myLibImage);
+        if (aImgTypeFI != FIT_RGBF
+         && aImgTypeFI != FIT_RGBAF
+         && aImgTypeFI != FIT_FLOAT)
+        {
+          anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_RGBF);
+        }
+      }
+      break;
+    }
+    default:
+    {
+      if (FreeImage_GetImageType (myLibImage) != FIT_BITMAP)
+      {
+        anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_BITMAP);
+        if (anImageToDump == NULL)
+        {
+          return false;
+        }
+      }
+
+      if (FreeImage_GetBPP (anImageToDump) != 24)
+      {
+        FIBITMAP* aTmpBitmap24 = FreeImage_ConvertTo24Bits (anImageToDump);
+        if (anImageToDump != myLibImage)
+        {
+          FreeImage_Unload (anImageToDump);
+        }
+        if (aTmpBitmap24 == NULL)
+        {
+          return false;
+        }
+        anImageToDump = aTmpBitmap24;
+      }
+      break;
+    }
+  }
+
+  if (anImageToDump == NULL)
+  {
+    return false;
+  }
+
+  bool isSaved = (FreeImage_Save (anImageFormat, anImageToDump, theFileName.ToCString()) != FALSE);
+  if (anImageToDump != myLibImage)
+  {
+    FreeImage_Unload (anImageToDump);
+  }
+  return isSaved;
+#else
+  const Standard_Integer aLen = theFileName.Length();
+  if ((aLen >= 4) && (theFileName.Value (aLen - 3) == '.')
+   && TCollection_AsciiString::ISSIMILAR (theFileName.SubString (aLen - 2, aLen), "ppm"))
+  {
+    return savePPM (theFileName);
+  }
+  std::cerr << "Image_PixMap, no image library available! Image saved in PPM format.\n";
+  return savePPM (theFileName);
+#endif
+}
+
+// =======================================================================
+// function : AdjustGamma
+// purpose  :
+// =======================================================================
+Standard_EXPORT bool Image_AlienPixMap::AdjustGamma (const Standard_Real theGammaCorr)
+{
+#ifdef HAVE_FREEIMAGE
+  return FreeImage_AdjustGamma (myLibImage, theGammaCorr) != FALSE;
+#else
+  return false;
+#endif
+}
diff --git a/src/Image/Image_Diff.cxx b/src/Image/Image_Diff.cxx
new file mode 100644
index 0000000..f9249ee
--- /dev/null
+++ b/src/Image/Image_Diff.cxx
@@ -0,0 +1,544 @@
+// Created on: 2012-07-10
+// Created by: VRO
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#include <Image_Diff.hxx>
+#include <Image_AlienPixMap.hxx>
+
+#include <TColStd_MapIteratorOfMapOfInteger.hxx>
+
+#include <cstdlib>
+
+IMPLEMENT_STANDARD_HANDLE (Image_Diff, Standard_Transient)
+IMPLEMENT_STANDARD_RTTIEXT(Image_Diff, Standard_Transient)
+
+//! Dot squared for difference of two colors
+inline Standard_Integer dotSquared (const Image_ColorRGB& theColor)
+{
+  // explicitly convert to integer
+  const Standard_Integer r = theColor.r();
+  const Standard_Integer g = theColor.g();
+  const Standard_Integer b = theColor.b();
+  return r * r + g * g + b * b;
+}
+
+//! @return true if pixel is black
+inline bool isBlack (const Image_ColorRGB& theColor)
+{
+  return theColor.r() == 0
+      && theColor.g() == 0
+      && theColor.b() == 0;
+}
+
+//! Converts a pixel position (row, column) to one integer value
+inline Standard_Size pixel2Int (const Standard_Size aRow,
+                                const Standard_Size aCol)
+{
+  return aCol + (aRow << 15);
+}
+
+//! Converts an integer value to pixel coordinates (row, column)
+inline void int2Pixel (const Standard_Size theValue,
+                       Standard_Size&      theRow,
+                       Standard_Size&      theCol)
+{
+  theRow = (theValue >> 15);
+  theCol = theValue - (theRow << 15);
+}
+
+namespace
+{
+
+  inline ptrdiff_t getAbs (const ptrdiff_t theValue)
+  {
+    return theValue >= 0 ? theValue : -theValue;
+  }
+
+  static const Standard_Size NEIGHBOR_PIXELS_NB = 8;
+  struct
+  {
+    Standard_Integer row_inc;
+    Standard_Integer col_inc;
+
+    inline Standard_Size pixel2Int (const Standard_Size theRowCenter,
+                                    const Standard_Size theColCenter) const
+    {
+      return ::pixel2Int (theRowCenter + Standard_Size(row_inc),
+                          theColCenter + Standard_Size(col_inc));
+    }
+
+    inline bool isBlack (const Image_PixMapData<Image_ColorRGB>& theData,
+                         const Standard_Size theRowCenter,
+                         const Standard_Size theColCenter) const
+    {
+      return ::isBlack (theData.Value (theRowCenter + Standard_Size(row_inc),
+                                       theColCenter + Standard_Size(col_inc)));
+    }
+
+    inline bool isValid (const Image_PixMapData<Image_ColorRGB>& theData,
+                         const Standard_Size theRowCenter,
+                         const Standard_Size theColCenter) const
+    {
+      const Standard_Size aRow = theRowCenter + Standard_Size(row_inc);
+      const Standard_Size aCol = theColCenter + Standard_Size(col_inc);
+      return aRow < theData.SizeX()  // this unsigned math checks Standard_Size(-1) at-once
+          && aCol < theData.SizeY();
+    }
+  }
+  static const NEIGHBOR_PIXELS[NEIGHBOR_PIXELS_NB] =
+  {
+    {-1, -1}, {-1,  0}, {-1,  1},
+    { 0, -1},           { 0,  1},
+    { 1, -1}, { 1,  0}, { 1,  1}
+  };
+
+  static bool isSupportedFormat (const Image_PixMap::ImgFormat theFormat)
+  {
+    return theFormat == Image_PixMap::ImgRGB
+        || theFormat == Image_PixMap::ImgBGR
+        || theFormat == Image_PixMap::ImgRGB32
+        || theFormat == Image_PixMap::ImgBGR32
+        || theFormat == Image_PixMap::ImgRGBA
+        || theFormat == Image_PixMap::ImgBGRA;
+  }
+};
+
+// =======================================================================
+// function : Image_Diff
+// purpose  :
+// =======================================================================
+Image_Diff::Image_Diff()
+: myColorTolerance (0.0),
+  myIsBorderFilterOn (Standard_False)
+{
+  //
+}
+
+// =======================================================================
+// function : ~Image_Diff
+// purpose  :
+// =======================================================================
+Image_Diff::~Image_Diff()
+{
+  releaseGroupsOfDiffPixels();
+}
+
+// =======================================================================
+// function : Init
+// purpose  :
+// =======================================================================
+Standard_Boolean Image_Diff::Init (const Handle(Image_PixMap)& theImageRef,
+                                   const Handle(Image_PixMap)& theImageNew,
+                                   const Standard_Boolean      theToBlackWhite)
+{
+  myImageRef.Nullify();
+  myImageNew.Nullify();
+  myDiffPixels.Clear();
+  releaseGroupsOfDiffPixels();
+  if (theImageRef.IsNull()   || theImageNew.IsNull()
+   || theImageRef->IsEmpty() || theImageNew->IsEmpty()
+   || theImageRef->SizeX()   != theImageNew->SizeX()
+   || theImageRef->SizeY()   != theImageNew->SizeY()
+   || theImageRef->Format()  != theImageNew->Format())
+  {
+    std::cerr << "Images has different format or dimensions\n";
+    return Standard_False;
+  }
+  else if (!isSupportedFormat (theImageRef->Format()))
+  {
+    std::cerr << "Images has unsupported pixel format\n";
+    return Standard_False;
+  }
+  else if (theImageRef->SizeX() >= 0xFFFF
+        || theImageRef->SizeY() >= 0xFFFF)
+  {
+    std::cerr << "Image too large\n";
+    return Standard_False;
+  }
+
+  myImageRef = theImageRef;
+  myImageNew = theImageNew;
+
+  if (theToBlackWhite)
+  {
+    // Convert the images to white/black
+    const Image_ColorRGB aWhite = {{255, 255, 255}};
+    Image_PixMapData<Image_ColorRGB>& aDataRef = myImageRef->EditData<Image_ColorRGB>();
+    Image_PixMapData<Image_ColorRGB>& aDataNew = myImageNew->EditData<Image_ColorRGB>();
+    for (Standard_Size aRow = 0; aRow < aDataRef.SizeY(); ++aRow)
+    {
+      for (Standard_Size aCol = 0; aCol < aDataRef.SizeY(); ++aCol)
+      {
+        Image_ColorRGB& aPixel1 = aDataRef.ChangeValue (aRow, aCol);
+        Image_ColorRGB& aPixel2 = aDataNew.ChangeValue (aRow, aCol);
+        if (!isBlack (aPixel1))
+        {
+          aPixel1 = aWhite;
+        }
+        if (!isBlack (aPixel2))
+        {
+          aPixel2 = aWhite;
+        }
+      }
+    }
+  }
+
+  return Standard_True;
+}
+
+
+// =======================================================================
+// function : Init
+// purpose  :
+// =======================================================================
+Standard_Boolean Image_Diff::Init (const TCollection_AsciiString& theImgPathRef,
+                                   const TCollection_AsciiString& theImgPathNew,
+                                   const Standard_Boolean         theToBlackWhite)
+{
+  Handle(Image_AlienPixMap) anImgRef = new Image_AlienPixMap();
+  Handle(Image_AlienPixMap) anImgNew = new Image_AlienPixMap();
+  if (!anImgRef->Load (theImgPathRef)
+   || !anImgNew->Load (theImgPathNew))
+  {
+    std::cerr << "Failed to load image(s) file(s)\n";
+    return Standard_False;
+  }
+  return Init (anImgRef, anImgNew, theToBlackWhite);
+}
+
+// =======================================================================
+// function : SetColorTolerance
+// purpose  :
+// =======================================================================
+void Image_Diff::SetColorTolerance (const Standard_Real theTolerance)
+{
+  myColorTolerance = theTolerance;
+}
+
+// =======================================================================
+// function : ColorTolerance
+// purpose  :
+// =======================================================================
+Standard_Real Image_Diff::ColorTolerance() const
+{
+  return myColorTolerance;
+}
+
+// =======================================================================
+// function : SetBorderFilterOn
+// purpose  :
+// =======================================================================
+void Image_Diff::SetBorderFilterOn (const Standard_Boolean theToIgnore)
+{
+  myIsBorderFilterOn = theToIgnore;
+}
+
+// =======================================================================
+// function : IsBorderFilterOn
+// purpose  :
+// =======================================================================
+Standard_Boolean Image_Diff::IsBorderFilterOn() const
+{
+  return myIsBorderFilterOn;
+}
+
+// =======================================================================
+// function : Compare
+// purpose  :
+// =======================================================================
+Standard_Integer Image_Diff::Compare()
+{
+  // Number of different pixels (by color)
+  Standard_Integer aNbDiffColors = 0;
+  myDiffPixels.Clear();
+
+  if (myImageRef.IsNull() || myImageNew.IsNull())
+  {
+    return -1;
+  }
+
+  // Tolerance of comparison operation for color
+  // Maximum difference between colors (white - black) = 100%
+  Image_ColorRGB aDiff = {{255, 255, 255}};
+  const Standard_Integer aMaxDiffColor  = dotSquared (aDiff);
+  const Standard_Integer aDiffThreshold = Standard_Integer(Standard_Real(aMaxDiffColor) * myColorTolerance);
+
+  // we don't care about RGB/BGR/RGBA/BGRA/RGB32/BGR32 differences
+  // because we just compute summ of r g b components
+  const Image_PixMapData<Image_ColorRGB>& aDataRef = myImageRef->ReadData<Image_ColorRGB>();
+  const Image_PixMapData<Image_ColorRGB>& aDataNew = myImageNew->ReadData<Image_ColorRGB>();
+
+  // compare colors of each pixel
+  for (Standard_Size aRow = 0; aRow < myImageRef->SizeY(); ++aRow)
+  {
+    for (Standard_Size aCol = 0; aCol < myImageRef->SizeX(); ++aCol)
+    {
+      aDiff = aDataNew.Value (aRow, aCol) - aDataRef.Value (aRow, aCol);
+      if (dotSquared (aDiff) > aDiffThreshold)
+      {
+        const Standard_Size aValue = pixel2Int (aRow, aCol);
+        myDiffPixels.Append (aValue);
+        ++aNbDiffColors;
+      }
+    }
+  }
+
+  // take into account a border effect
+  if (myIsBorderFilterOn && myDiffPixels.Length() > 0)
+  {
+    aNbDiffColors = ignoreBorderEffect();
+  }
+
+  return aNbDiffColors;
+}
+
+// =======================================================================
+// function : SaveDiffImage
+// purpose  :
+// =======================================================================
+Standard_Boolean Image_Diff::SaveDiffImage (Image_PixMap& theDiffImage) const
+{
+  if (myImageRef.IsNull() || myImageNew.IsNull())
+  {
+    return Standard_False;
+  }
+
+  if (theDiffImage.IsEmpty()
+   || theDiffImage.SizeX() != myImageRef->SizeX()
+   || theDiffImage.SizeY() != myImageRef->SizeY()
+   || !isSupportedFormat (theDiffImage.Format()))
+  {
+    if (!theDiffImage.InitTrash (Image_PixMap::ImgRGB, myImageRef->SizeX(), myImageRef->SizeY()))
+    {
+      return Standard_False;
+    }
+  }
+
+  Standard_Size aRow, aCol;
+  const Image_ColorRGB aWhite = {{255, 255, 255}};
+  Image_PixMapData<Image_ColorRGB>& aDataOut = theDiffImage.EditData<Image_ColorRGB>();
+
+  // initialize black image for dump
+  memset (theDiffImage.ChangeData(), 0, theDiffImage.SizeBytes());
+  if (myGroupsOfDiffPixels.IsEmpty())
+  {
+    if (myIsBorderFilterOn)
+    {
+      return Standard_True;
+    }
+
+    for (Standard_Integer aPixelId = 0; aPixelId < myDiffPixels.Length(); ++aPixelId)
+    {
+      const Standard_Size aValue = myDiffPixels.Value (aPixelId);
+      int2Pixel (aValue, aRow, aCol);
+      aDataOut.ChangeValue (aRow, aCol) = aWhite;
+    }
+
+    return Standard_True;
+  }
+
+  Standard_Integer aGroupId = 1;
+  for (ListOfMapOfInteger::Iterator aGrIter (myGroupsOfDiffPixels); aGrIter.More(); aGrIter.Next(), ++aGroupId)
+  {
+    if (myLinearGroups.Contains (aGroupId))
+    {
+      continue; // skip linear groups
+    }
+
+    const TColStd_MapOfInteger* aGroup = aGrIter.Value();
+    for (TColStd_MapIteratorOfMapOfInteger aPixelIter(*aGroup);
+         aPixelIter.More(); aPixelIter.Next())
+    {
+      int2Pixel (aPixelIter.Key(), aRow, aCol);
+      aDataOut.ChangeValue (aRow, aCol) = aWhite;
+    }
+  }
+
+  return Standard_True;
+}
+
+// =======================================================================
+// function : SaveDiffImage
+// purpose  :
+// =======================================================================
+Standard_Boolean Image_Diff::SaveDiffImage (const TCollection_AsciiString& theDiffPath) const
+{
+  if (myImageRef.IsNull() || myImageNew.IsNull() || theDiffPath.IsEmpty())
+  {
+    return Standard_False;
+  }
+
+  Image_AlienPixMap aDiff;
+  if (!aDiff.InitTrash (Image_PixMap::ImgRGB, myImageRef->SizeX(), myImageRef->SizeY())
+   || !SaveDiffImage (aDiff))
+  {
+    return Standard_False;
+  }
+
+  // save image
+  return aDiff.Save (theDiffPath);
+}
+
+// =======================================================================
+// function : ignoreBorderEffect
+// purpose  :
+// =======================================================================
+Standard_Integer Image_Diff::ignoreBorderEffect()
+{
+  if (myImageRef.IsNull() || myImageNew.IsNull())
+  {
+    return 0;
+  }
+
+  const Image_PixMapData<Image_ColorRGB>& aDataRef = myImageRef->ReadData<Image_ColorRGB>();
+
+  // allocate groups of different pixels
+  releaseGroupsOfDiffPixels();
+
+  // Find a different area (a set of close to each other pixels which colors differ in both images).
+  // It filters alone pixels with different color.
+  Standard_Size aRow1, aCol1, aRow2, aCol2;
+  Standard_Integer aLen1 = (myDiffPixels.Length() > 0) ? (myDiffPixels.Length() - 1) : 0;
+  for (Standard_Integer aPixelId1 = 0; aPixelId1 < aLen1; ++aPixelId1)
+  {
+    const Standard_Size aValue1 = myDiffPixels.Value (aPixelId1);
+    int2Pixel (aValue1, aRow1, aCol1);
+
+    // Check other pixels in the list looking for a neighbour of this one
+    for (Standard_Integer aPixelId2 = aPixelId1 + 1; aPixelId2 < myDiffPixels.Length(); ++aPixelId2)
+    {
+      const Standard_Size aValue2 = myDiffPixels.Value (aPixelId2);
+      int2Pixel (aValue2, aRow2, aCol2);
+      if (getAbs (ptrdiff_t (aCol1 - aCol2)) <= 1 &&
+          getAbs (ptrdiff_t (aRow1 - aRow2)) <= 1)
+      {
+        // A neighbour is found. Create a new group and add both pixels.
+        if (myGroupsOfDiffPixels.IsEmpty())
+        {
+          TColStd_MapOfInteger* aGroup = new TColStd_MapOfInteger();
+          aGroup->Add (aValue1);
+          aGroup->Add (aValue2);
+          myGroupsOfDiffPixels.Append (aGroup);
+        }
+        else
+        {
+          // Find a group the pixels belong to.
+          Standard_Boolean isFound = Standard_False;
+          for (ListOfMapOfInteger::Iterator aGrIter (myGroupsOfDiffPixels); aGrIter.More(); aGrIter.Next())
+          {
+            TColStd_MapOfInteger*& aGroup = aGrIter.ChangeValue();
+            if (aGroup->Contains (aValue1))
+            {
+              aGroup->Add (aValue2);
+              isFound = Standard_True;
+              break;
+            }
+          }
+
+          if (!isFound)
+          {
+            // Create a new group
+            TColStd_MapOfInteger* aGroup = new TColStd_MapOfInteger();
+            aGroup->Add (aValue1);
+            aGroup->Add (aValue2);
+            myGroupsOfDiffPixels.Append (aGroup);
+          }
+        }
+      }
+    }
+  }
+
+  // filter linear groups which represent border of a solid shape
+  Standard_Integer aGroupId = 1;
+  for (ListOfMapOfInteger::Iterator aGrIter (myGroupsOfDiffPixels); aGrIter.More(); aGrIter.Next(), ++aGroupId)
+  {
+    Standard_Integer aNeighboursNb = 0;
+    Standard_Boolean isLine = Standard_True;
+    const TColStd_MapOfInteger* aGroup = aGrIter.Value();
+    for (TColStd_MapIteratorOfMapOfInteger aPixelIter (*aGroup); aPixelIter.More(); aPixelIter.Next())
+    {
+      int2Pixel (aPixelIter.Key(), aRow1, aCol1);
+      aNeighboursNb = 0;
+
+      // pixels of a line have only 1 or 2 neighbour pixels inside the same group
+      // check all neighbour pixels on presence in the group
+      for (Standard_Size aNgbrIter = 0; aNgbrIter < NEIGHBOR_PIXELS_NB; ++aNgbrIter)
+      {
+        if (NEIGHBOR_PIXELS[aNgbrIter].isValid (aDataRef, aRow1, aCol1)
+         && aGroup->Contains (NEIGHBOR_PIXELS[aNgbrIter].pixel2Int (aRow1, aCol1)))
+        {
+          ++aNeighboursNb;
+        }
+      }
+
+      if (aNeighboursNb > 2)
+      {
+        isLine = Standard_False;
+        break;
+      }
+    } // for pixels inside group...
+
+    if (isLine)
+    {
+      // Test a pixel of the linear group on belonging to a solid shape.
+      // Consider neighbour pixels of the last pixel of the linear group in the 1st image.
+      // If the pixel has greater than 1 not black neighbour pixel, it is a border of a shape.
+      // Otherwise, it may be a topological edge, for example.
+      aNeighboursNb = 0;
+      for (Standard_Size aNgbrIter = 0; aNgbrIter < NEIGHBOR_PIXELS_NB; ++aNgbrIter)
+      {
+        if ( NEIGHBOR_PIXELS[aNgbrIter].isValid (aDataRef, aRow1, aCol1)
+         && !NEIGHBOR_PIXELS[aNgbrIter].isBlack (aDataRef, aRow1, aCol1))
+        {
+          ++aNeighboursNb;
+        }
+      }
+
+      if (aNeighboursNb > 1)
+      {
+        myLinearGroups.Add (aGroupId);
+      }
+    }
+  } // for groups...
+
+  // number of different groups of pixels (except linear groups)
+  Standard_Integer aNbDiffColors = 0;
+  aGroupId = 1;
+  for (ListOfMapOfInteger::Iterator aGrIter (myGroupsOfDiffPixels); aGrIter.More(); aGrIter.Next(), ++aGroupId)
+  {
+    if (!myLinearGroups.Contains (aGroupId))
+      ++aNbDiffColors;
+  }
+
+  return aNbDiffColors;
+}
+
+// =======================================================================
+// function : releaseGroupsOfDiffPixels
+// purpose  :
+// =======================================================================
+void Image_Diff::releaseGroupsOfDiffPixels()
+{
+  for (ListOfMapOfInteger::Iterator aGrIter (myGroupsOfDiffPixels); aGrIter.More(); aGrIter.Next())
+  {
+    TColStd_MapOfInteger*& aGroup = aGrIter.ChangeValue();
+    delete aGroup;
+  }
+  myGroupsOfDiffPixels.Clear();
+  myLinearGroups.Clear();
+}
diff --git a/src/Image/Image_PixMap.cdl b/src/Image/Image_PixMap.cdl
deleted file mode 100644
index 8bf6ffc..0000000
--- a/src/Image/Image_PixMap.cdl
+++ /dev/null
@@ -1,133 +0,0 @@
--- Created on: 2010-09-16
--- Created by: KGV
--- Copyright (c) 2010-2012 OPEN CASCADE SAS
---
--- The content of this file is subject to the Open CASCADE Technology Public
--- License Version 6.5 (the "License"). You may not use the content of this file
--- except in compliance with the License. Please obtain a copy of the License
--- at http://www.opencascade.org and read it completely before using this file.
---
--- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
--- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
---
--- The Original Code and all software distributed under the License is
--- distributed on an "AS IS" basis, without warranty of any kind, and the
--- Initial Developer hereby disclaims all such warranties, including without
--- limitation, any warranties of merchantability, fitness for a particular
--- purpose or non-infringement. Please see the License for the specific terms
--- and conditions governing the rights and limitations under the License.
-
-
-class PixMap from Image
-
-	---Version:
-
-	---Purpose: This class defines a system-independent bitmap
-
-	---Keywords: Bitmap, Pixmap
-
-inherits
-    PixMap         from Aspect
-
-uses
-    Handle         from Aspect,
-    TypeOfImage    from Image,
-    HPrivateImage  from Image,
-    CRawBufferData from Image,
-    Color          from Quantity
-
-raises
-    PixmapDefinitionError  from Aspect,
-    PixmapError            from Aspect
-
-is
-
-    Create ( theWidth, theHeight : Integer from Standard;
-             theType             : TypeOfImage from Image )
-    returns mutable PixMap from Image
-    raises PixmapDefinitionError from Aspect;
-    ---Level: Public
-    ---Purpose:
-    -- Allocate the bitmap with requested dimensions.
-    -- Allowed image types:
-    --  - Image_TOI_RGB (color image, 1 byte per component);
-    --  - Image_TOI_RGBA (color image with alpha channel);
-    --  - Image_TOI_RGBF (color image, 1 float per component);
-    --  - Image_TOI_RGBAF (color image with alpha channel);
-    --  - Image_TOI_FLOAT (grey image, 1 float per pixel).
-
-    Create ( theDataPtr          : PByte from Standard;
-             theWidth, theHeight : Integer from Standard;
-             thePitch            : Integer from Standard;
-             theBitsPerPixel     : Integer from Standard;
-             theIsTopDown        : Boolean from Standard )
-    returns mutable PixMap from Image
-    raises PixmapDefinitionError from Aspect;
-    ---Level: Public
-    ---Purpose:
-    -- Create a bitmap by copying an existing buffer.
-
-    ---------------------------------------------------
-    -- Category: Methods to modify the class definition
-    ---------------------------------------------------
-
-    Destroy ( me : mutable )
-    ---Level: Advanced
-    ---Purpose:
-    -- Destroies the Bitmap
-    ---C++: alias ~
-    ---Trigger: Raises if Bitmap is not defined properly
-    raises PixmapError from Aspect is virtual;
-
-    Dump ( me;
-           theFilename  : CString from Standard;
-           theGammaCorr : Real from Standard = 1.0 )
-    returns Boolean from Standard
-    ---Level: Advanced
-    ---Purpose:
-    -- Dumps the Bitmap to an image file with
-    -- an optional gamma correction value
-    -- and returns TRUE if the dump occurs normaly.
-    raises PixmapError from Aspect is virtual;
-
-    ----------------------------
-    -- Category: Inquire methods
-    ----------------------------
-
-    PixmapID ( me ) returns Handle from Aspect is virtual;
-    ---Level: Advanced
-    ---Purpose:
-    -- Returns NULL handle
-    ---Category: Inquire methods
-
-    ----------------------------
-    -- Category: Access methods
-    ----------------------------
-
-    AccessBuffer ( me            : in;
-                   theBufferInfo : in out CRawBufferData from Image )
-    is static;
-    ---Purpose:
-    -- Fill the structure for low-level access to the bitmap data.
-    -- It is up to you to interpret these bytes correctly!
-    -- Important notice: image stored upside-down in the memory,
-    --                   first image row is an last scanline in
-    --                   the memory buffer.
-    -- If image was created with type Image_TOI_FLOAT buffer
-    -- format will be set to TDepthComponent. You can override
-    -- this field with another one-channel buffer format because
-    -- it useless for bitmap definition.
-
-    PixelColor ( me         : in;
-                 theX, theY : in Integer from Standard )
-    returns Color from Quantity
-    is virtual;
-    ---Purpose:
-    -- Returns the pixel color. This function is relatively slow,
-    -- use AccessBuffer() instead for stream operations.
-    -- Note that this function convert input theY coordinate
-    -- to count off from top of an image (while in memory it stored
-    -- upside-down).
-fields
-    myImage : HPrivateImage from Image is protected;
-end PixMap;
diff --git a/src/Image/Image_PixMap.cxx b/src/Image/Image_PixMap.cxx
index 5e1ff23..d823764 100644
--- a/src/Image/Image_PixMap.cxx
+++ b/src/Image/Image_PixMap.cxx
@@ -1,6 +1,6 @@
-// Created on: 2010-09-16
-// Created by: KGV
-// Copyright (c) 2010-2012 OPEN CASCADE SAS
+// Created on: 2012-07-18
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
 //
 // The content of this file is subject to the Open CASCADE Technology Public
 // License Version 6.5 (the "License"). You may not use the content of this file
@@ -17,461 +17,356 @@
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
-#ifdef HAVE_CONFIG_H
-# include <oce-config.h>
-#endif
+#include <Image_PixMap.hxx>
 
-#ifdef HAVE_FREEIMAGE
-  #include <FreeImagePlus.h>
-  #include <Image_PixMap.ixx>
-  /* OCC22216 NOTE: linker dependency can be switched off by undefining macro */ 
-  
-  #ifdef __BORLANDC__
-  #pragma link "FreeImage.lib"
-  #pragma link "FreeImagePlus.lib"
-  #endif
+#ifdef _MSC_VER
+  //
+#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1)
+  #include <mm_malloc.h>
 #else
-  #include <Image_PixMap.ixx>
-  #include <fstream>
-
-  #include <stdio.h>
-
-  #if (defined(BYTE_ORDER)   && BYTE_ORDER==BIG_ENDIAN) || \
-      (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || \
-       defined(__BIG_ENDIAN__)
-    #define THE_BIGENDIAN
-  #endif
+  extern "C" int posix_memalign (void** thePtr, size_t theAlign, size_t theBytesCount);
+#endif
 
-  // dummy class which can only dump to PPM format
-  class fipImage
+template<typename TypePtr>
+inline TypePtr MemAllocAligned (const Standard_Size& theBytesCount,
+                                const Standard_Size& theAlign = 16)
+{
+#if defined(_MSC_VER)
+  return (TypePtr )_aligned_malloc (theBytesCount, theAlign);
+#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1)
+  return (TypePtr )     _mm_malloc (theBytesCount, theAlign);
+#else
+  void* aPtr;
+  if (posix_memalign (&aPtr, theAlign, theBytesCount))
   {
-  public:
-
-    typedef struct tagRGBQuad {
-    #ifndef THE_BIGENDIAN
-      Standard_Byte rgbBlue;
-      Standard_Byte rgbGreen;
-      Standard_Byte rgbRed;
-    #else
-      Standard_Byte rgbRed;
-      Standard_Byte rgbGreen;
-      Standard_Byte rgbBlue;
-    #endif
-      Standard_Byte rgbReserved;
-    } RGBQuad_t;
-
-  public:
-
-    fipImage()
-    : myDataPtr(NULL),
-      mySizeX(0),
-      mySizeY(0),
-      myBytesPerLine(0),
-      myBytesPerPixel(3)
-    {
-      //
-    }
-
-    fipImage (const Standard_Integer theSizeX, const Standard_Integer theSizeY,
-              const Standard_Integer theBytesPerLine = 0, const Standard_Integer theBytesPerPixel = 3)
-    : myDataPtr(NULL),
-      mySizeX (theSizeX),
-      mySizeY (theSizeY),
-      myBytesPerLine (theBytesPerLine),
-      myBytesPerPixel (theBytesPerPixel)
-    {
-      if (myBytesPerLine == 0)
-      {
-        myBytesPerLine = mySizeX * myBytesPerPixel;
-      }
-      myDataPtr = new Standard_Byte[myBytesPerLine * mySizeY];
-    }
-
-    ~fipImage()
-    {
-      delete[] myDataPtr;
-    }
-
-    Standard_Integer getHeight() const
-    {
-      return mySizeY;
-    }
-
-    Standard_Integer getWidth() const
-    {
-      return mySizeX;
-    }
-
-    Standard_Integer getBytesPerPixel() const
-    {
-      return myBytesPerPixel;
-    }
-
-    Standard_Integer getBytesPerLine() const
-    {
-      return myBytesPerLine;
-    }
-
-    Standard_Byte* getData() const
-    {
-      return myDataPtr;
-    }
-
-    Standard_Byte* getScanLine (const Standard_Integer theRow) const
-    {
-      return &myDataPtr[theRow * myBytesPerLine];
-    }
-
-    Quantity_Color getPixelColor (const Standard_Integer theCol,
-                                  const Standard_Integer theRow) const
-    {
-      RGBQuad_t* aPixel = (RGBQuad_t* )&getScanLine (theRow)[theCol * myBytesPerPixel];
-      return Quantity_Color (Standard_Real (aPixel->rgbRed)   / 255.0,
-                             Standard_Real (aPixel->rgbGreen) / 255.0,
-                             Standard_Real (aPixel->rgbBlue)  / 255.0,
-                             Quantity_TOC_RGB);
-    }
-
-    Standard_Boolean savePPM (const Standard_CString theFileName) const
-    {
-      // Open file
-      FILE* pFile = fopen (theFileName, "wb");
-      if (pFile == NULL)
-      {
-        return Standard_False;
-      }
-
-      // Write header
-      fprintf (pFile, "P6\n%d %d\n255\n", mySizeX, mySizeY);
-
-      // Write pixel data
-      Standard_Byte* aScanLine;
-      RGBQuad_t* aPixel;
-      // image stored upside-down
-      for (Standard_Integer aRow = mySizeY - 1; aRow >= 0; --aRow)
-      {
-        aScanLine = getScanLine (aRow);
-        for (Standard_Integer aCol = 0; aCol < mySizeX; ++aCol)
-        {
-          aPixel = (RGBQuad_t* )&aScanLine[aCol * myBytesPerPixel];
-          fwrite (&aPixel->rgbRed,   1, 1, pFile);
-          fwrite (&aPixel->rgbGreen, 1, 1, pFile);
-          fwrite (&aPixel->rgbBlue,  1, 1, pFile);
-        }
-      }
-
-      // Close file
-      fclose (pFile);
-      return Standard_True;
-    }
-
-    Standard_Integer getMaxRowAligmentBytes() const
-    {
-      Standard_Integer aDeltaBytes = myBytesPerLine - myBytesPerPixel * mySizeX;
-      for (Standard_Integer anAligment = 16; anAligment > 1; anAligment /= 2)
-      {
-        if (isRowAlignedTo (anAligment, aDeltaBytes))
-        {
-          return anAligment;
-        }
-      }
-      return 1;
-    }
-
-  private:
-
-    Standard_Boolean isRowAlignedTo (const Standard_Integer theAligmentBytes,
-                                     const Standard_Integer theDeltaBytes) const
-    {
-      return (theDeltaBytes < theAligmentBytes) &&
-             ((myBytesPerLine % theAligmentBytes) == 0);
-    }
+    aPtr = NULL;
+  }
+  return (TypePtr )aPtr;
+#endif
+}
 
-  private:
+inline void MemFreeAligned (void* thePtrAligned)
+{
+#if defined(_MSC_VER)
+  _aligned_free (thePtrAligned);
+#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1)
+  _mm_free (thePtrAligned);
+#else
+  free (thePtrAligned);
+#endif
+}
 
-    Standard_Byte* myDataPtr;
-    Standard_Integer mySizeX;
-    Standard_Integer mySizeY;
-    Standard_Integer myBytesPerLine;
-    Standard_Integer myBytesPerPixel;
+IMPLEMENT_STANDARD_HANDLE (Image_PixMap, Standard_Transient)
+IMPLEMENT_STANDARD_RTTIEXT(Image_PixMap, Standard_Transient)
 
-  };
-#endif
+// =======================================================================
+// function : Image_PixMap
+// purpose  :
+// =======================================================================
+Image_PixMap::Image_PixMap()
+: myImgFormat (Image_PixMap::ImgGray),
+  myIsOwnPointer (true)
+{
+  memset (&myData, 0, sizeof(myData));
+  myData.mySizeBPP   = 1;
+  myData.myTopToDown = 1;
+  setFormat (Image_PixMap::ImgGray);
+}
 
-#include <gp.hxx>
-#include <TCollection_AsciiString.hxx>
+// =======================================================================
+// function : ~Image_PixMap
+// purpose  :
+// =======================================================================
+Image_PixMap::~Image_PixMap()
+{
+  Clear();
+}
 
-//=======================================================================
-//function : Image_PixMap
-//purpose  :
-//=======================================================================
-Image_PixMap::Image_PixMap (const Standard_Integer theWidth,
-                            const Standard_Integer theHeight,
-                            const Image_TypeOfImage theType)
-:	Aspect_PixMap (theWidth, theHeight, 1),
-	myImage()
+Standard_Size Image_PixMap::SizePixelBytes (const Image_PixMap::ImgFormat thePixelFormat)
 {
-#ifdef HAVE_FREEIMAGE
-  FREE_IMAGE_TYPE aFIType = FIT_UNKNOWN;
-  int aBitsPerPixel = 0;
-  switch (theType)
+  switch (thePixelFormat)
   {
-    case Image_TOI_RGBA:
-      aFIType = FIT_BITMAP;
-      aBitsPerPixel = 32;
-      break;
-    case Image_TOI_RGBF:
-      aFIType = FIT_RGBF;
-      aBitsPerPixel = 96;
-      break;
-    case Image_TOI_RGBAF:
-      aFIType = FIT_RGBAF;
-      aBitsPerPixel = 128;
-      break;
-    case Image_TOI_FLOAT:
-      aFIType = FIT_FLOAT;
-      aBitsPerPixel = 32;
-      break;
-    case Image_TOI_RGB:
+    case ImgGrayF:
+      return sizeof(float);
+    case ImgRGBAF:
+    case ImgBGRAF:
+      return sizeof(float) * 4;
+    case ImgRGBF:
+    case ImgBGRF:
+      return sizeof(float) * 3;
+    case ImgRGBA:
+    case ImgBGRA:
+      return 4;
+    case ImgRGB32:
+    case ImgBGR32:
+      return 4;
+    case ImgRGB:
+    case ImgBGR:
+      return 3;
+    case ImgGray:
     default:
-      aFIType = FIT_BITMAP;
-      aBitsPerPixel = 24;
-      break;
-  }
-  myImage = new fipImage (aFIType, theWidth, theHeight, aBitsPerPixel);
-#else
-  Standard_Integer aBytesPerPixel = 0;
-  switch (theType)
-  {
-    case Image_TOI_RGBAF:
-      std::cerr << "Float formats not supported\n";
-    case Image_TOI_RGBA:
-      aBytesPerPixel = 4;
-      break;
-    case Image_TOI_RGBF:
-    case Image_TOI_FLOAT:
-      std::cerr << "Float formats not supported\n";
-    case Image_TOI_RGB:
-    default:
-      aBytesPerPixel = 3;
-      break;
+      return 1;
   }
-  myImage = new fipImage (theWidth, theHeight, 0, aBytesPerPixel);
-  //
-#endif
 }
 
-//=======================================================================
-//function : Image_PixMap
-//purpose  :
-//=======================================================================
-Image_PixMap::Image_PixMap (const Standard_PByte theDataPtr,
-                            const Standard_Integer theWidth, const Standard_Integer theHeight,
-                            const Standard_Integer thePitch, const Standard_Integer theBitsPerPixel,
-                            const Standard_Boolean theIsTopDown)
-:	Aspect_PixMap (theWidth, theHeight, 1),
-	myImage (new fipImage())
+// =======================================================================
+// function : setFormat
+// purpose  :
+// =======================================================================
+void Image_PixMap::setFormat (Image_PixMap::ImgFormat thePixelFormat)
 {
-#ifdef HAVE_FREEIMAGE
-  *myImage = FreeImage_ConvertFromRawBits (theDataPtr,
-                                           theWidth, theHeight,
-                                           thePitch, theBitsPerPixel,
-                                           0, 0, 0,
-                                           theIsTopDown);
-  if (theBitsPerPixel != 24)
-  {
-    myImage->convertTo24Bits();
-  }
-#else
-  myImage = new fipImage (theWidth, theHeight, thePitch, theBitsPerPixel / 8);
-  Standard_Integer aRowStart = !theIsTopDown ? 0 : (theHeight - 1);
-  Standard_Integer aRowDelta = !theIsTopDown ? 1 : -1;
-  for (Standard_Integer aRowFrom (aRowStart), aRowTo (0);
-       aRowFrom >= 0 && aRowFrom < theHeight;
-       aRowFrom += aRowDelta, ++aRowTo)
-  {
-    memcpy (myImage->getScanLine (aRowTo),
-            &theDataPtr[aRowFrom * thePitch],
-            myImage->getBytesPerLine());
-  }
-#endif
+  myImgFormat      = thePixelFormat;
+  myData.mySizeBPP = SizePixelBytes (myImgFormat);
 }
 
-//=======================================================================
-//function : Destroy
-//purpose  :
-//=======================================================================
-void Image_PixMap::Destroy()
+// =======================================================================
+// function : setTopDown
+// purpose  :
+// =======================================================================
+void Image_PixMap::setTopDown()
 {
-  myImage = Image_HPrivateImage();
+  myData.myTopRowPtr = ((myData.myTopToDown == 1 || myData.myDataPtr == NULL)
+                     ? myData.myDataPtr : (myData.myDataPtr + myData.mySizeRowBytes * (myData.mySizeY - 1)));
 }
 
-//=======================================================================
-//function : Dump
-//purpose  :
-//=======================================================================
-Standard_Boolean Image_PixMap::Dump (const Standard_CString theFilename,
-                                     const Standard_Real theGammaCorr) const
+// =======================================================================
+// function : InitWrapper
+// purpose  :
+// =======================================================================
+bool Image_PixMap::InitWrapper (Image_PixMap::ImgFormat thePixelFormat,
+                                Standard_Byte*          theDataPtr,
+                                const Standard_Size     theSizeX,
+                                const Standard_Size     theSizeY,
+                                const Standard_Size     theSizeRowBytes)
 {
-#ifdef HAVE_FREEIMAGE
-  FREE_IMAGE_FORMAT anImageFormat = FreeImage_GetFIFFromFilename (theFilename);
-  if (anImageFormat == FIF_UNKNOWN)
+  Clear (thePixelFormat);
+  if ((theSizeX == 0) || (theSizeY == 0) || (theDataPtr == NULL))
   {
-    std::cerr << "Image_PixMap, image format doesn't supported!\n";
-    return Standard_False;
+    return false;
   }
+  myData.mySizeX        = theSizeX;
+  myData.mySizeY        = theSizeY;
+  myData.mySizeRowBytes = (theSizeRowBytes != 0) ? theSizeRowBytes : (theSizeX * myData.mySizeBPP);
+  myData.myDataPtr      = theDataPtr;
+  myIsOwnPointer = false;
+  setTopDown();
+  return true;
+}
 
-  Standard_Boolean isCopied = Standard_False;
-  Image_HPrivateImage anImageToDump = myImage;
-  if (Abs (theGammaCorr - 1.0) > gp::Resolution())
+// =======================================================================
+// function : InitTrash
+// purpose  :
+// =======================================================================
+bool Image_PixMap::InitTrash (Image_PixMap::ImgFormat thePixelFormat,
+                              const Standard_Size     theSizeX,
+                              const Standard_Size     theSizeY,
+                              const Standard_Size     theSizeRowBytes)
+{
+  Clear (thePixelFormat);
+  if ((theSizeX == 0) || (theSizeY == 0))
   {
-    if (!isCopied)
-    {
-      isCopied = Standard_True;
-      anImageToDump = new fipImage (*myImage);
-    }
-    anImageToDump->adjustGamma (theGammaCorr);
+    return false;
+  }
+  myData.mySizeX        = theSizeX;
+  myData.mySizeY        = theSizeY;
+  myData.mySizeRowBytes = myData.mySizeX * myData.mySizeBPP;
+  if (theSizeRowBytes > myData.mySizeRowBytes)
+  {
+    // use argument only if it greater
+    myData.mySizeRowBytes = theSizeRowBytes;
   }
+  myData.myDataPtr = MemAllocAligned<Standard_Byte*> (SizeBytes());
+  myIsOwnPointer   = true;
+  setTopDown();
+  return myData.myDataPtr != NULL;
+}
 
-  switch (anImageFormat)
+// =======================================================================
+// function : InitZero
+// purpose  :
+// =======================================================================
+bool Image_PixMap::InitZero (Image_PixMap::ImgFormat thePixelFormat,
+                             const Standard_Size     theSizeX,
+                             const Standard_Size     theSizeY,
+                             const Standard_Size     theSizeRowBytes,
+                             const Standard_Byte     theValue)
+{
+  if (!InitTrash (thePixelFormat, theSizeX, theSizeY, theSizeRowBytes))
   {
-    case FIF_GIF:
-      if (!isCopied)
-      {
-        isCopied = Standard_True;
-        anImageToDump = new fipImage (*myImage);
-      }
-      // need convertion to image with pallete
-      anImageToDump->colorQuantize (FIQ_NNQUANT);
-      break;
-    case FIF_EXR:
-      if (myImage->getImageType() == FIT_BITMAP)
-      {
-        if (!isCopied)
-        {
-          isCopied = Standard_True;
-          anImageToDump = new fipImage (*myImage);
-        }
-        anImageToDump->convertToType (FIT_RGBF);
-      }
-      break;
-    default:
-      if (myImage->getImageType() != FIT_BITMAP)
-      {
-        if (!isCopied)
-        {
-          isCopied = Standard_True;
-          anImageToDump = new fipImage (*myImage);
-        }
-        anImageToDump->convertToType (FIT_BITMAP);
-      }
-      break;
+    return false;
   }
-  return anImageToDump->save (theFilename);
-#else
-  return myImage->savePPM (theFilename);
-#endif
+  memset (myData.myDataPtr, (int )theValue, SizeBytes());
+  return true;
 }
 
-Aspect_Handle Image_PixMap::PixmapID() const
+// =======================================================================
+// function : InitCopy
+// purpose  :
+// =======================================================================
+bool Image_PixMap::InitCopy (const Image_PixMap& theCopy)
 {
-  return Aspect_Handle();
+  if (&theCopy == this)
+  {
+    // self-copying disallowed
+    return false;
+  }
+  if (InitTrash (theCopy.myImgFormat, theCopy.myData.mySizeX, theCopy.myData.mySizeY, theCopy.myData.mySizeRowBytes))
+  {
+    memcpy (myData.myDataPtr, theCopy.myData.myDataPtr, theCopy.SizeBytes());
+    return true;
+  }
+  return false;
 }
 
-void Image_PixMap::AccessBuffer (Image_CRawBufferData& theBuffer) const
+// =======================================================================
+// function : Clear
+// purpose  :
+// =======================================================================
+void Image_PixMap::Clear (Image_PixMap::ImgFormat thePixelFormat)
 {
-  theBuffer.widthPx  = myImage->getWidth();
-  theBuffer.heightPx = myImage->getHeight();
-#ifdef HAVE_FREEIMAGE
-  theBuffer.rowAligmentBytes = 4; // 32 bits according to FreeImage documentation
-  switch (myImage->getImageType())
+  if (myIsOwnPointer && (myData.myDataPtr != NULL))
   {
-    case FIT_FLOAT:
-      theBuffer.format = TDepthComponent;
-      theBuffer.type = TFloat;
-      break;
-    case FIT_RGBF:
-      theBuffer.format = TRGB;
-      theBuffer.type = TFloat;
-      break;
-    case FIT_RGBAF:
-      theBuffer.format = TRGBA;
-      theBuffer.type = TFloat;
-      break;
-    case FIT_BITMAP:
-    default:
-    #if defined(FREEIMAGE_BIGENDIAN)
-      theBuffer.format = (myImage->getColorType() == FIC_RGBALPHA) ? TRGBA : TRGB;
-    #else
-      theBuffer.format = (myImage->getColorType() == FIC_RGBALPHA) ? TBGRA : TBGR;
-    #endif
-      theBuffer.type = TUByte;
-      break;
+    MemFreeAligned (myData.myDataPtr);
   }
-  theBuffer.dataPtr = myImage->accessPixels();
-#else
-  theBuffer.rowAligmentBytes = myImage->getMaxRowAligmentBytes();
-  theBuffer.format = (myImage->getBytesPerPixel() == 4) ? TBGRA : TBGR;
-  theBuffer.type = TUByte;
-  theBuffer.dataPtr = myImage->getData();
-#endif
+  myData.myDataPtr = myData.myTopRowPtr = NULL;
+  myIsOwnPointer = true;
+  myData.mySizeX = myData.mySizeY = myData.mySizeRowBytes = 0;
+  setFormat (thePixelFormat);
+  myData.myTopToDown = 1;
 }
 
+// =======================================================================
+// function : PixelColor
+// purpose  :
+// =======================================================================
 Quantity_Color Image_PixMap::PixelColor (const Standard_Integer theX,
-                                         const Standard_Integer theY) const
+                                         const Standard_Integer theY,
+                                         Quantity_Parameter&    theAlpha) const
 {
-  Standard_Integer aScanlineId = myImage->getHeight() - theY - 1;
-  if (theX < 0 || theX >= (Standard_Integer)myImage->getWidth() ||
-      theY < 0 || theY >= (Standard_Integer)myImage->getHeight())
+  if (IsEmpty() ||
+      theX < 0 || (Standard_Size )theX >= myData.mySizeX ||
+      theY < 0 || (Standard_Size )theY >= myData.mySizeY)
   {
+    theAlpha = 0.0; // transparent
     return Quantity_Color (0.0, 0.0, 0.0, Quantity_TOC_RGB);
   }
-#ifdef HAVE_FREEIMAGE
-  else if (myImage->getImageType() == FIT_BITMAP)
-  {
-    RGBQUAD aValue; memset (&aValue, 0, sizeof(aValue));
-    myImage->getPixelColor (theX, aScanlineId, &aValue);
-    return Quantity_Color (Standard_Real (aValue.rgbRed)   / 255.0,
-                           Standard_Real (aValue.rgbGreen) / 255.0,
-                           Standard_Real (aValue.rgbBlue)  / 255.0,
-                           Quantity_TOC_RGB);
-  }
-  else
+
+  switch (myImgFormat)
   {
-    switch (myImage->getImageType())
+    case ImgGrayF:
+    {
+      const Standard_ShortReal& aPixel = Value<Standard_ShortReal> (theY, theX);
+      theAlpha = 1.0; // opaque
+      return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel)),
+                             Quantity_Parameter (Standard_Real (aPixel)),
+                             Quantity_Parameter (Standard_Real (aPixel)),
+                             Quantity_TOC_RGB);
+      break;
+    }
+    case ImgRGBAF:
+    {
+      const Image_ColorRGBAF& aPixel = Value<Image_ColorRGBAF> (theY, theX);
+      theAlpha = aPixel.a();
+      return Quantity_Color (Quantity_Parameter (aPixel.r()),
+                             Quantity_Parameter (aPixel.g()),
+                             Quantity_Parameter (aPixel.b()),
+                             Quantity_TOC_RGB);
+    }
+    case ImgBGRAF:
+    {    
+      const Image_ColorBGRAF& aPixel = Value<Image_ColorBGRAF> (theY, theX);
+      theAlpha = aPixel.a();
+      return Quantity_Color (Quantity_Parameter (aPixel.r()),
+                             Quantity_Parameter (aPixel.g()),
+                             Quantity_Parameter (aPixel.b()),
+                             Quantity_TOC_RGB);
+    }
+    case ImgRGBF:
+    {
+      const Image_ColorRGBF& aPixel = Value<Image_ColorRGBF> (theY, theX);
+      theAlpha =  1.0; // opaque
+      return Quantity_Color (Quantity_Parameter (aPixel.r()),
+                             Quantity_Parameter (aPixel.g()),
+                             Quantity_Parameter (aPixel.b()),
+                             Quantity_TOC_RGB);
+    }
+    case ImgBGRF:
+    {
+      const Image_ColorBGRF& aPixel = Value<Image_ColorBGRF> (theY, theX);
+      theAlpha =  1.0; // opaque
+      return Quantity_Color (Quantity_Parameter (aPixel.r()),
+                             Quantity_Parameter (aPixel.g()),
+                             Quantity_Parameter (aPixel.b()),
+                             Quantity_TOC_RGB);
+    }
+    case ImgRGBA:
+    {
+      const Image_ColorRGBA& aPixel = Value<Image_ColorRGBA> (theY, theX);
+      theAlpha = Standard_Real (aPixel.a()) / 255.0;
+      return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0),
+                             Quantity_TOC_RGB);
+    }
+    case ImgBGRA:
+    {
+      const Image_ColorBGRA& aPixel = Value<Image_ColorBGRA> (theY, theX);
+      theAlpha = Standard_Real (aPixel.a()) / 255.0;
+      return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0),
+                             Quantity_TOC_RGB);
+    }
+    case ImgRGB32:
+    {
+      const Image_ColorRGB32& aPixel = Value<Image_ColorRGB32> (theY, theX);
+      theAlpha = 1.0; // opaque
+      return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0),
+                             Quantity_TOC_RGB);
+    }
+    case ImgBGR32:
+    {
+      const Image_ColorBGR32& aPixel = Value<Image_ColorBGR32> (theY, theX);
+      theAlpha = 1.0; // opaque
+      return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0),
+                             Quantity_TOC_RGB);
+    }
+    case ImgRGB:
     {
-      case FIT_FLOAT:
-      {
-        float* aScanLine = (float* )myImage->getScanLine (aScanlineId);
-        Quantity_Parameter aValue = Quantity_Parameter (aScanLine[theX]);
-        return Quantity_Color (aValue, aValue, aValue, Quantity_TOC_RGB);
-      }
-      case FIT_RGBF:
-      {
-        FIRGBF* aScanLine = (FIRGBF* )myImage->getScanLine (aScanlineId);
-        FIRGBF* aPixel = &aScanLine[theX];
-        return Quantity_Color (Quantity_Parameter (aPixel->red),
-                               Quantity_Parameter (aPixel->green),
-                               Quantity_Parameter (aPixel->blue),
-                               Quantity_TOC_RGB);
-      }
-      case FIT_RGBAF:
-      {
-        FIRGBAF* aScanLine = (FIRGBAF* )myImage->getScanLine (aScanlineId);
-        FIRGBAF* aPixel = &aScanLine[theX];
-        return Quantity_Color (Quantity_Parameter (aPixel->red),
-                               Quantity_Parameter (aPixel->green),
-                               Quantity_Parameter (aPixel->blue),
-                               Quantity_TOC_RGB);
-      }
-      default:
-      {
-        // not supported image type
-        return Quantity_Color (0.0, 0.0, 0.0, Quantity_TOC_RGB);
-      }
+      const Image_ColorRGB& aPixel = Value<Image_ColorRGB> (theY, theX);
+      theAlpha = 1.0; // opaque
+      return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0),
+                             Quantity_TOC_RGB);
+    }
+    case ImgBGR:
+    {
+      const Image_ColorBGR& aPixel = Value<Image_ColorBGR> (theY, theX);
+      theAlpha = 1.0; // opaque
+      return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel.r()) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel.g()) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel.b()) / 255.0),
+                             Quantity_TOC_RGB);
+    }
+    case ImgGray:
+    {
+      const Standard_Byte& aPixel = Value<Standard_Byte> (theY, theX);
+      theAlpha = 1.0; // opaque
+      return Quantity_Color (Quantity_Parameter (Standard_Real (aPixel) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel) / 255.0),
+                             Quantity_Parameter (Standard_Real (aPixel) / 255.0),
+                             Quantity_TOC_RGB);
+    }
+    default:
+    {
+      // not supported image type
+      theAlpha = 0.0; // transparent
+      return Quantity_Color (0.0, 0.0, 0.0, Quantity_TOC_RGB);
     }
   }
-#else
-  return myImage->getPixelColor (theX, aScanlineId);
-#endif
 }
diff --git a/src/IntAna/IntAna_Curve.cxx b/src/IntAna/IntAna_Curve.cxx
index a652b3b..75ce046 100644
--- a/src/IntAna/IntAna_Curve.cxx
+++ b/src/IntAna/IntAna_Curve.cxx
@@ -422,6 +422,7 @@
     break;
 
   default:
+    return Standard_False;
     break;
   }
   //
diff --git a/src/IntCurve/IntCurve_IntConicConic_1.cxx b/src/IntCurve/IntCurve_IntConicConic_1.cxx
index 574d7a0..c76e12b 100644
--- a/src/IntCurve/IntCurve_IntConicConic_1.cxx
+++ b/src/IntCurve/IntCurve_IntConicConic_1.cxx
@@ -240,24 +240,6 @@ void CircleCircleGeometricIntersection(const gp_Circ2d& C1
       }
     }
     //--------------------------------------------------------------
-    //--    1 seul segment donne par Inter C2 avec C1- ou C1+
-    else if(dO1O2 > AbsR1mR2-Tol) {
-      
-      Standard_Real dx=(R1mTolR1mTol+dO1O2dO1O2-R2R2)/(dO1O2+dO1O2);
-      Standard_Real dy=(R1mTolR1mTol-dx*dx);
-      dy=(dy>=0.0)? Sqrt(dy) : 0.0;
-      dAlpha1=ATan2(dy,dx);
-      
-      dx=(R1pTolR1pTol+dO1O2dO1O2-R2R2)/(dO1O2+dO1O2);
-      dy=(R1pTolR1pTol-dx*dx);
-      dy=(dy>=0.0)? Sqrt(dy) : 0.0;
-      Standard_Real dAlpha2=ATan2(dy,dx);
-      
-      if(dAlpha2>dAlpha1) dAlpha1 = dAlpha2;
-      C1_binf1=-dAlpha1;  C1_bsup1=dAlpha1;
-      nbsol=1;
-    }
-    //--------------------------------------------------------------
     else {
       if((dO1O2 > AbsR1mR2-TolTang) && (AbsR1mR2-TolTang)>0.0) { 
 	C1_binf1=0.0;  
@@ -436,7 +418,6 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
     Standard_Real dAlpha1;
     //---------------------------------------------------------------
     //-- Line coupe le cercle Circle+ (=C(x1,y1,R1+Tol))
-    //modified by NIZNHY-PKV Thu May 12 12:25:17 2011f
     b2Sol=Standard_False;
     if (R>dO1O2+TolTang) {
       Standard_Real aX2, aTol2;
@@ -449,7 +430,6 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
     }
     if(dO1O2 > RmTol && !b2Sol) { 
     //if(dO1O2 > RmTol) { 
-    //modified by NIZNHY-PKV Thu May 12 12:25:20 2011t
       Standard_Real dx=dO1O2;
       Standard_Real dy=0.0;     //(RpTol*RpTol-dx*dx); //Patch !!!
       dy=(dy>=0.0)? Sqrt(dy) : 0.0;
@@ -1023,26 +1003,33 @@ static inline void getDomainParametrs(const IntRes2d_Domain& theDomain,
 }
 
 
+//=======================================================================
+//function : computeIntPoint
+//purpose  : 
+//=======================================================================
 static Standard_Boolean computeIntPoint(const IntRes2d_Domain& theCurDomain,
-                                                         const IntRes2d_Domain& theDomainOther,
-                                                         const gp_Lin2d& theCurLin,
-                                                         const gp_Lin2d& theOtherLin,   
-                                                         Standard_Real theCosT1T2,
-                                                         Standard_Real theParCur, Standard_Real theParOther,
-                                                         Standard_Real& theResInf, Standard_Real& theResSup,
-                                                         Standard_Integer theNum,
-                                                         IntRes2d_TypeTrans theCurTrans,    
-                                                         IntRes2d_IntersectionPoint& theNewPoint)
+					const IntRes2d_Domain& theDomainOther,
+					const gp_Lin2d& theCurLin,
+					const gp_Lin2d& theOtherLin,   
+					Standard_Real theCosT1T2,
+					Standard_Real theParCur, Standard_Real theParOther,
+					Standard_Real& theResInf, Standard_Real& theResSup,
+					Standard_Integer theNum,
+					IntRes2d_TypeTrans theCurTrans,    
+					IntRes2d_IntersectionPoint& theNewPoint)
 {
   if(fabs(theResSup-theParCur) > fabs(theResInf-theParCur))
     theResSup = theResInf;
 
   Standard_Real aRes2 = theParOther + (theResSup - theParCur) * theCosT1T2;
 
-  Standard_Real aFirst2, aLast2, aTol1, aTol2;
-  getDomainParametrs(theDomainOther,aFirst2, aLast2, aTol1, aTol2);
-  if( aRes2  < aFirst2 - aTol1 || aRes2  > aLast2 + aTol2 ) 
-	  return Standard_False;
+  Standard_Real aFirst2, aLast2, aTol21, aTol22, aTol11, aTol12 ;
+  
+  getDomainParametrs(theDomainOther,aFirst2, aLast2, aTol21, aTol22);
+  
+  if( aRes2  < aFirst2 - aTol21 || aRes2  > aLast2 + aTol22 ) {
+    return Standard_False;
+  }
 	
   //------ compute parameters of intersection point --
   IntRes2d_Transition aT1,aT2;
@@ -1069,7 +1056,7 @@ static Standard_Boolean computeIntPoint(const IntRes2d_Domain& theCurDomain,
   Standard_Real aResU2 = theParOther;
 
   Standard_Real aFirst1, aLast1;
-  getDomainParametrs(theCurDomain,aFirst1, aLast1, aTol1, aTol2);
+  getDomainParametrs(theCurDomain,aFirst1, aLast1, aTol11, aTol12);
   
   Standard_Boolean isInside1 = (theParCur >= aFirst1 && theParCur <= aLast1);
   Standard_Boolean isInside2 = (theParOther >= aFirst2 && theParOther <= aLast2);
@@ -1093,6 +1080,13 @@ static Standard_Boolean computeIntPoint(const IntRes2d_Domain& theCurDomain,
     }
     else 
     {
+      //PKVf
+      // check that parameters are within range on both curves
+      if ( theParCur < aFirst1-aTol11 || theParCur > aLast1+aTol12 ||
+           theParOther < aFirst2-aTol21 || theParOther > aLast2+aTol22) {
+        return Standard_False;
+      }
+      //PKVt
       aResU1 = theResSup;
       aResU2= aRes2;
     }
diff --git a/src/IntPatch/IntPatch_WLine.cxx b/src/IntPatch/IntPatch_WLine.cxx
index 3c8c3ea..00e41ac 100644
--- a/src/IntPatch/IntPatch_WLine.cxx
+++ b/src/IntPatch/IntPatch_WLine.cxx
@@ -562,6 +562,31 @@ void IntPatch_WLine::ComputeVertexParameters(const Standard_Real RTol) {
 	  }
 	}
       }
+
+      //Remove duplicating points
+      if (Substitution)
+      {
+        Standard_Integer ind_point;
+        for(ind_point = 2; (ind_point <= nbponline && nbponline > 2); ind_point++) { 
+          Standard_Real d = (curv->Value(ind_point-1).Value()).SquareDistance((curv->Value(ind_point).Value()));
+          if(d < dmini) { 
+            curv->RemovePoint(ind_point);
+            nbponline--;
+            //----------------------------------------------
+            //-- On recadre les Vertex si besoin 
+            //-- 
+            for(j=1; j<=nbvtx; j++) { 
+              indicevertex = svtx.Value(j).ParameterOnLine();
+              if(indicevertex >= ind_point) {
+                svtx.ChangeValue(j).SetParameter(indicevertex-1.0);
+              }
+            }
+            //modified by NIZNHY-PKV Mon Feb 11 09:28:02 2002 f
+            ind_point--;
+            //modified by NIZNHY-PKV Mon Feb 11 09:28:04 2002 t
+          }
+        }
+      }
       
       //--static int deb6nov98=1;    Ne resout rien (a part partiellement BUC60409)
       //--if(deb6nov98) { 
diff --git a/src/IntPolyh/IntPolyh_Intersection.cxx b/src/IntPolyh/IntPolyh_Intersection.cxx
index c5be347..22f0517 100644
--- a/src/IntPolyh/IntPolyh_Intersection.cxx
+++ b/src/IntPolyh/IntPolyh_Intersection.cxx
@@ -352,13 +352,15 @@ Standard_Boolean IntPolyh_Intersection::PerformMaillage(IntPolyh_PMaillageAffina
     theMaillageS->SetEnlargeZone( myZone );
   }
 
+  /*
   // if too many intersections, consider surfaces parallel (eap)
   if(FinTTC > 200 &&
      (FinTTC >= theMaillageS->GetArrayOfTriangles(1).NbTriangles() ||
       FinTTC >= theMaillageS->GetArrayOfTriangles(2).NbTriangles()) ) {
     return Standard_False;
   }
-
+  */
+  
   return Standard_True;
 }
 
diff --git a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx
index 6b7cb17..b532378 100644
--- a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx
+++ b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx
@@ -2216,7 +2216,7 @@ void CalculPtsInterTriEdgeCoplanaires(const Standard_Integer TriSurfID,
     }
   
     if (NbPoints!=0) {
-      if (Abs(PEP1.U()-PEP1.U())<MyConfusionPrecision
+      if (Abs(PEP1.U()-PEP2.U())<MyConfusionPrecision
           &&(Abs(PEP1.V()-PEP2.V())<MyConfusionPrecision) ) NbPoints=1;
       
       SP1.SetXYZ(PEP1.X(),PEP1.Y(),PEP1.Z());
diff --git a/src/IntTools/IntTools.cdl b/src/IntTools/IntTools.cdl
index 51e0cb3..44cdf63 100644
--- a/src/IntTools/IntTools.cdl
+++ b/src/IntTools/IntTools.cdl
@@ -47,7 +47,8 @@ uses
     IntSurf, 
     BRepClass3d, 
     TColgp, 
-    MMgt
+    MMgt, 
+    Geom2dHatch
 
 is
     	
diff --git a/src/IntTools/IntTools_BeanBeanIntersector.cxx b/src/IntTools/IntTools_BeanBeanIntersector.cxx
index df643e1..57fbb6d 100644
--- a/src/IntTools/IntTools_BeanBeanIntersector.cxx
+++ b/src/IntTools/IntTools_BeanBeanIntersector.cxx
@@ -38,14 +38,27 @@
 #include <Geom_Line.hxx>
 #include <GeomAdaptor_HCurve.hxx>
 
-static void LocalPrepareArgs(BRepAdaptor_Curve& theCurve,
-			     const Standard_Real      theFirstParameter,
-			     const Standard_Real      theLastParameter,
-			     Standard_Real&           theDeflection,
-			     IntTools_CArray1OfReal&  theArgs);
+static 
+  void LocalPrepareArgs(BRepAdaptor_Curve& theCurve,
+			const Standard_Real      theFirstParameter,
+			const Standard_Real      theLastParameter,
+			Standard_Real&           theDeflection,
+			IntTools_CArray1OfReal&  theArgs);
+
+static 
+  Standard_Boolean SetEmptyResultRange(const Standard_Real      theParameter, 
+				       IntTools_MarkedRangeSet& theMarkedRange);
+static
+  Standard_Integer CheckCoincidence(const Standard_Real aT11, 
+				    const Standard_Real aT12,
+				    const Handle(Geom_Curve)& aC1,
+				    const Standard_Real aT21, 
+				    const Standard_Real aT22,
+				    const Handle(Geom_Curve)& aC2,
+				    const Standard_Real aCriteria,
+				    const Standard_Real aCurveResolution1,
+				    GeomAPI_ProjectPointOnCurve& aProjector);
 
-static Standard_Boolean SetEmptyResultRange(const Standard_Real      theParameter, 
-					    IntTools_MarkedRangeSet& theMarkedRange);
 
 // ==================================================================================
 // function: IntTools_BeanBeanIntersector
@@ -456,12 +469,30 @@ Standard_Boolean IntTools_BeanBeanIntersector::FastComputeIntersection()
 	  newparfound = Standard_False;
 	}
       }
-      
+      //
       if(!newparfound) {
 	break;
       }
     }// for(i = 0; i < 2; i++) {
   } // if(aCT1==GeomAbs_Circle)
+  //modified by NIZNHY-PKV Mon Oct 08 14:08:19 2012f
+  if (aCT1==GeomAbs_BSplineCurve || aCT1==GeomAbs_BezierCurve) {
+    Standard_Integer iFlag;
+    //
+    iFlag=CheckCoincidence(myFirstParameter1,
+			   myLastParameter1,
+			   myTrsfCurve1,
+			   myFirstParameter2,
+			   myLastParameter2,
+			   myTrsfCurve2,
+			   myCriteria,
+			   myCurveResolution1,
+			   myProjector);
+    if (!iFlag) {
+      aresult=!aresult;
+    }
+  }
+  //modified by NIZNHY-PKV Mon Oct 08 14:08:23 2012t
   return aresult;
 }
 // ==================================================================================
@@ -469,7 +500,7 @@ Standard_Boolean IntTools_BeanBeanIntersector::FastComputeIntersection()
 // purpose: 
 // ==================================================================================
 Standard_Real IntTools_BeanBeanIntersector::Distance(const Standard_Real theArg,
-						     Standard_Real&      theArgOnOtherBean) 
+						     Standard_Real& theArgOnOtherBean) 
 {
   Standard_Real aDistance;
   Standard_Integer aNbPoints;
@@ -478,11 +509,8 @@ Standard_Real IntTools_BeanBeanIntersector::Distance(const Standard_Real theArg,
   aDistance=RealLast();
   //
   aPoint=myCurve1.Value(theArg);
-  //modified by NIZNHY-PKV Thu Jul 01 12:20:52 2010f
   myProjector.Init(myTrsfCurve2, myFirstParameter2, myLastParameter2);
   myProjector.Perform(aPoint);
-  //myProjector.Init(aPoint, myTrsfCurve2, myFirstParameter2, myLastParameter2);
-  //modified by NIZNHY-PKV Thu Jul 01 12:21:05 2010t
   //
   aNbPoints=myProjector.NbPoints();
   if(aNbPoints > 0) {
@@ -1125,7 +1153,6 @@ static void LocalPrepareArgs(BRepAdaptor_Curve& theCurve,
     IntTools::PrepareArgs(theCurve, theLastParameter, theFirstParameter, aDiscretization, aRelativeDeflection, theArgs);
   }
 }
-
 // ---------------------------------------------------------------------------------
 // static function: SetEmptyResultRange
 // purpose:  
@@ -1149,4 +1176,222 @@ static Standard_Boolean SetEmptyResultRange(const Standard_Real      theParamete
   
   return add;
 }
-
+//modified by NIZNHY-PKV Fri Oct 12 09:34:10 2012f
+static
+ Standard_Integer DistPC(const Standard_Real aT1, 
+			const Handle(Geom_Curve)& aC1,
+			const Standard_Real aCriteria, 
+			GeomAPI_ProjectPointOnCurve& aProjector,
+			Standard_Real& aD, 
+			Standard_Real& aT2);
+ 
+
+static
+ Standard_Integer DistPC(const Standard_Real aT1, 
+			const Handle(Geom_Curve)& aC1,
+			const Standard_Real aCriteria,
+			GeomAPI_ProjectPointOnCurve& aProjector, 
+			Standard_Real& aD, 
+			Standard_Real& aT2,
+			Standard_Real& aDmax,
+			Standard_Real& aTmax);
+
+static
+  Standard_Integer FindMaxDistPC(const Standard_Real aT1A, 
+				 const Standard_Real aT1B,
+				 const Handle(Geom_Curve)& aC1,
+				 const Standard_Real aCriteria,
+				 const Standard_Real aEps1,
+				 GeomAPI_ProjectPointOnCurve& aProjector,
+				 Standard_Real& aDmax, 
+				 Standard_Real& aT1max);
+
+//=======================================================================
+//function : CheckCoincidence
+//purpose  : 
+//=======================================================================
+Standard_Integer CheckCoincidence(const Standard_Real aT11, 
+				  const Standard_Real aT12,
+				  const Handle(Geom_Curve)& aC1,
+				  const Standard_Real aT21, 
+				  const Standard_Real aT22,
+				  const Handle(Geom_Curve)& aC2,
+				  const Standard_Real aCriteria,
+				  const Standard_Real aEps1,
+				  GeomAPI_ProjectPointOnCurve& aProjector)
+{
+  Standard_Integer iErr, aNb1, i, aNbX;
+  Standard_Real dT1, aT1, aT2, aD, aDmax, aTmax;
+  Standard_Real aT1A, aT1B, aD1max,aT1max;
+  //
+  iErr=0; // the patches are coincided
+  //
+  //
+  aProjector.Init(aC2, aT21, aT22);
+  //
+  aDmax=-1.;
+  //
+  // 1. Express evaluation
+  //
+  aNb1=10; // Number of intervals on the curve #1
+  dT1=(aT12-aT11)/aNb1;
+  for (i=1; i<aNb1; ++i) {
+    aT1=aT11+i*dT1;
+    //
+    iErr=DistPC(aT1, aC1, aCriteria, aProjector, aD, aT2, aDmax, aTmax);
+    if (iErr) {
+      iErr=1;// a point from aC1 can not be projected on aC2
+      return iErr;
+    }
+    //
+    if (aDmax>aCriteria) {
+      iErr=2; // the distance is too big
+      return iErr;
+    }
+  }
+  //
+  // 2. Deep evaluation
+  aD1max=aDmax;
+  //
+  aNbX=aNb1-1;
+  for (i=1; i<aNbX; ++i) {
+    aT1A=aT11+i*dT1; 
+    aT1B=aT1A+dT1;
+    //
+    iErr=FindMaxDistPC(aT1A, aT1B, aC1, aCriteria, aEps1, aProjector, aD1max, aT1max);
+    if (iErr) {
+      iErr=1;
+      return iErr;
+    }
+  }
+  //
+  return iErr;
+}
+//
+//=======================================================================
+//function : FindMaxDistPC
+//purpose  : 
+//=======================================================================
+Standard_Integer FindMaxDistPC(const Standard_Real aT1A, 
+			       const Standard_Real aT1B,
+			       const Handle(Geom_Curve)& aC1,
+			       const Standard_Real aCriteria,
+			       const Standard_Real aEps1,
+			       GeomAPI_ProjectPointOnCurve& aProjector,
+			       Standard_Real& aDmax, 
+			       Standard_Real& aT1max) 
+{
+  Standard_Integer iErr, iCnt;
+  Standard_Real aGS, aXP, aA, aB, aXL, aYP, aYL, aT2P, aT2L, aX0;
+  //
+  iCnt=0;
+  iErr=0;
+  aDmax=0.;
+  //
+  aGS=0.6180339887498948482045868343656;// =0.5*(1.+sqrt(5.))-1.;
+  aA=aT1A;
+  aB=aT1B;
+  //
+  aXP=aA+(aB-aA)*aGS;
+  aXL=aB-(aB-aA)*aGS;
+  //
+  iErr=DistPC(aXP, aC1, aCriteria, aProjector, aYP, aT2P, aDmax, aT1max);
+  if(iErr){
+    return iErr;
+  }
+  //
+  iErr=DistPC(aXL, aC1, aCriteria, aProjector, aYL, aT2L, aDmax, aT1max);
+  if(iErr){
+    return iErr;
+  }
+  //
+  while(1) {
+    if (aYP>aYL) {
+      aA=aXL;
+      aXL=aXP;
+      aYL=aYP;
+      aXP=aA+(aB-aA)*aGS;
+      iErr=DistPC(aXP, aC1, aCriteria, aProjector, aYP, aT2P, aDmax, aT1max);
+      if(iErr){
+	return iErr;
+      }
+    }
+    else {
+      aB=aXP;
+      aXP=aXL;
+      aYP=aYL;
+      aXL=aB-(aB-aA)*aGS;
+      iErr=DistPC(aXL, aC1, aCriteria, aProjector, aYL, aT2L, aDmax, aT1max);
+      if(iErr){
+	return iErr;
+      }
+    }
+    //
+    if ((aB-aA)<aEps1) {
+      aX0=0.5*(aA+aB);
+      break;
+    }
+  }// while(1) {
+  //
+  return iErr;
+}
+//=======================================================================
+//function : DistPC
+//purpose  : 
+//=======================================================================
+Standard_Integer DistPC(const Standard_Real aT1, 
+			const Handle(Geom_Curve)& aC1,
+			const Standard_Real aCriteria,
+			GeomAPI_ProjectPointOnCurve& aProjector, 
+			Standard_Real& aD, 
+			Standard_Real& aT2,
+			Standard_Real& aDmax,
+			Standard_Real& aTmax)
+{
+  Standard_Integer iErr;
+  //
+  iErr=DistPC(aT1, aC1, aCriteria, aProjector, aD, aT2);
+  if (iErr) {
+    return iErr;
+  }
+  //
+  if (aD>aDmax) {
+    aDmax=aD;
+    aTmax=aT2;
+  }
+  //
+  return iErr;
+}
+//=======================================================================
+//function : DistPC
+//purpose  : 
+//=======================================================================
+Standard_Integer DistPC(const Standard_Real aT1, 
+			const Handle(Geom_Curve)& aC1,
+			const Standard_Real aCriteria, 
+			GeomAPI_ProjectPointOnCurve& aProjector,
+			Standard_Real& aD, 
+			Standard_Real& aT2) 
+{
+  Standard_Integer iErr, aNbP2;
+  gp_Pnt aP1;
+  //
+  iErr=0;
+  aC1->D0(aT1, aP1);
+  //
+  aProjector.Perform(aP1);
+  aNbP2=aProjector.NbPoints();
+  if (!aNbP2) {
+    iErr=1;// the point from aC1 can not be projected on aC2
+    return iErr;
+  }
+  //
+  aD=aProjector.LowerDistance();
+  aT2=aProjector.LowerDistanceParameter();
+  if (aD>aCriteria) {
+    iErr=2;// the distance is too big
+  }
+  //
+  return iErr;
+}
+//modified by NIZNHY-PKV Fri Oct 12 09:34:12 2012t
diff --git a/src/IntTools/IntTools_Context.cdl b/src/IntTools/IntTools_Context.cdl
index 7ce9d5e..3ee13db 100644
--- a/src/IntTools/IntTools_Context.cdl
+++ b/src/IntTools/IntTools_Context.cdl
@@ -47,7 +47,8 @@ uses
     IndexedDataMapOfTransientAddress from IntTools, 
     FClass2d from IntTools, 
     SurfaceRangeLocalizeData from IntTools,
-    Curve from IntTools 
+    Curve from IntTools, 
+    Hatcher from Geom2dHatch 
     
 --raises
 
@@ -93,7 +94,7 @@ is
 	--- Returns a reference to point projector
 	--- for given curve
 	---
-
+    
     SurfaceData(me: mutable; 
 		aF: Face from TopoDS)
 	returns SurfaceRangeLocalizeData from IntTools;
@@ -111,6 +112,18 @@ is
 	--- Returns a reference to solid classifier
 	--- for given solid
 	---
+    --modified by NIZNHY-PKV Mon Sep 24 07:52:54 2012f 
+    Hatcher(me: mutable;  
+    	aF: Face from TopoDS) 
+    	returns Hatcher from Geom2dHatch;
+    	---C++: return &  
+	---Purpose:
+	--- Returns a reference to 2D hatcher
+	--- for given face
+	--- 
+    --modified by NIZNHY-PKV Mon Sep 24 07:52:54 2012t 
+ 
+ 
 
     ---         API  Block
     ---
@@ -294,12 +307,13 @@ is
 	---
 
 fields 
-    myFClass2dMap :  IndexedDataMapOfShapeAddress     from TopTools; 
-    myProjPSMap   :  IndexedDataMapOfShapeAddress     from TopTools; 
-    myProjPCMap   :  IndexedDataMapOfShapeAddress     from TopTools;    
-    myProjPTMap   :  IndexedDataMapOfTransientAddress from IntTools;    
-    mySClassMap   :  IndexedDataMapOfShapeAddress     from TopTools;
-    myProjSDataMap:  IndexedDataMapOfShapeAddress     from TopTools;
+    myFClass2dMap :  IndexedDataMapOfShapeAddress     from TopTools is protected; 
+    myProjPSMap   :  IndexedDataMapOfShapeAddress     from TopTools is protected; 
+    myProjPCMap   :  IndexedDataMapOfShapeAddress     from TopTools is protected;    
+    myProjPTMap   :  IndexedDataMapOfTransientAddress from IntTools is protected;    
+    mySClassMap   :  IndexedDataMapOfShapeAddress     from TopTools is protected;
+    myProjSDataMap:  IndexedDataMapOfShapeAddress     from TopTools is protected;
+    myHatcherMap   :  IndexedDataMapOfShapeAddress     from TopTools is protected;
      
 end Context;
 
diff --git a/src/IntTools/IntTools_Context.cxx b/src/IntTools/IntTools_Context.cxx
index 7470e51..580a871 100644
--- a/src/IntTools/IntTools_Context.cxx
+++ b/src/IntTools/IntTools_Context.cxx
@@ -41,6 +41,14 @@
 #include <Extrema_LocateExtPC.hxx>
 
 #include <Geom2d_Curve.hxx>
+//
+#include <Geom2dHatch_Intersector.hxx>
+#include <BRepTools.hxx>
+#include <TopExp_Explorer.hxx>
+#include <Geom2d_TrimmedCurve.hxx>
+#include <Precision.hxx>
+#include <Geom2d_Curve.hxx>
+#include <Geom2d_TrimmedCurve.hxx>
 
 //=======================================================================
 //function : 
@@ -58,6 +66,18 @@ IntTools_Context::~IntTools_Context()
   Standard_Address anAdr;
   Standard_Integer i, aNb;
   //
+  //modified by NIZNHY-PKV Mon Sep 24 08:01:03 2012f
+  Geom2dHatch_Hatcher* pHatcher;
+  aNb=myHatcherMap.Extent();
+  for (i=1; i<=aNb; ++i) {
+    anAdr=myHatcherMap(i);
+    pHatcher=(Geom2dHatch_Hatcher*)anAdr;
+    delete pHatcher;
+  }
+  myHatcherMap.Clear();
+  //
+  //modified by NIZNHY-PKV Mon Sep 24 08:01:07 2012t
+  //
   IntTools_FClass2d* pFClass2d;
   aNb=myFClass2dMap.Extent();
   for (i=1; i<=aNb; ++i) {
@@ -114,11 +134,77 @@ IntTools_Context::~IntTools_Context()
   }
   myProjSDataMap.Clear();
 }
+//modified by NIZNHY-PKV Mon Sep 24 07:56:45 2012f
+//=======================================================================
+//function : Hatcher
+//purpose  : 
+//=======================================================================
+Geom2dHatch_Hatcher& IntTools_Context::Hatcher(const TopoDS_Face& aF)
+{
+  Standard_Address anAdr;
+  Geom2dHatch_Hatcher* pHatcher;
+  //
+  anAdr=myHatcherMap.FindFromKey1(aF);
+  if (!anAdr) {
+    Standard_Real aTolArcIntr, aTolTangfIntr, aTolHatch2D, aTolHatch3D;
+    Standard_Real aU1, aU2, aEpsT;
+    TopAbs_Orientation aOrE;
+    Handle(Geom_Surface) aS;
+    Handle(Geom2d_Curve) aC2D;
+    Handle(Geom2d_TrimmedCurve) aCT2D;
+    TopoDS_Face aFF;
+    TopExp_Explorer aExp;
+    //
+    aTolHatch2D=1.e-8;
+    aTolHatch3D=1.e-8;
+    aTolArcIntr=1.e-10;
+    aTolTangfIntr=1.e-10;
+    aEpsT=Precision::PConfusion();
+    //
+    Geom2dHatch_Intersector aIntr(aTolArcIntr, aTolTangfIntr);
+    pHatcher=new Geom2dHatch_Hatcher(aIntr,
+				     aTolHatch2D, aTolHatch3D,
+				     Standard_True, Standard_False);
+    
+    //
+    aFF=aF;
+    aFF.Orientation(TopAbs_FORWARD);
+    aS=BRep_Tool::Surface(aFF);
+
+    aExp.Init (aFF, TopAbs_EDGE);
+    for (; aExp.More() ; aExp.Next()) {
+      const TopoDS_Edge& aE=*((TopoDS_Edge*)&aExp.Current());
+      aOrE=aE.Orientation();
+      //
+      aC2D=BRep_Tool::CurveOnSurface (aE, aFF, aU1, aU2);
+      if (aC2D.IsNull() ) {
+	continue;
+      }
+      if (fabs(aU1-aU2) < aEpsT) {
+	continue;
+      }
+      //
+      aCT2D=new Geom2d_TrimmedCurve(aC2D, aU1, aU2);
+      pHatcher->AddElement(aCT2D, aOrE);
+    }// for (; aExp.More() ; aExp.Next()) {
+    //
+    anAdr=(Standard_Address)pHatcher;
+    myHatcherMap.Add(aFF, anAdr);
+  }// if (!anAdr) {
+  //
+  else {
+    Standard_Address *pAdr=(Standard_Address *)anAdr;
+    pHatcher=(Geom2dHatch_Hatcher*)*pAdr;
+  }
+
+  return *pHatcher;
+}
+//modified by NIZNHY-PKV Mon Sep 24 07:56:45 2012t
 //=======================================================================
 //function : FClass2d
 //purpose  : 
 //=======================================================================
-  IntTools_FClass2d& IntTools_Context::FClass2d(const TopoDS_Face& aF)
+IntTools_FClass2d& IntTools_Context::FClass2d(const TopoDS_Face& aF)
 {
   Standard_Address anAdr;
   IntTools_FClass2d* pFClass2d;
@@ -147,7 +233,7 @@ IntTools_Context::~IntTools_Context()
 //function : ProjPS
 //purpose  : 
 //=======================================================================
-  GeomAPI_ProjectPointOnSurf& IntTools_Context::ProjPS(const TopoDS_Face& aF)
+GeomAPI_ProjectPointOnSurf& IntTools_Context::ProjPS(const TopoDS_Face& aF)
 {
   Standard_Address anAdr;
   GeomAPI_ProjectPointOnSurf* pProjPS;
@@ -183,7 +269,7 @@ IntTools_Context::~IntTools_Context()
 //function : ProjPC
 //purpose  : 
 //=======================================================================
-  GeomAPI_ProjectPointOnCurve& IntTools_Context::ProjPC(const TopoDS_Edge& aE)
+GeomAPI_ProjectPointOnCurve& IntTools_Context::ProjPC(const TopoDS_Edge& aE)
 {
   Standard_Address anAdr;
   GeomAPI_ProjectPointOnCurve* pProjPC;
@@ -210,7 +296,7 @@ IntTools_Context::~IntTools_Context()
 //function : ProjPT
 //purpose  : 
 //=======================================================================
-  GeomAPI_ProjectPointOnCurve& IntTools_Context::ProjPT(const Handle(Geom_Curve)& aC3D)
+GeomAPI_ProjectPointOnCurve& IntTools_Context::ProjPT(const Handle(Geom_Curve)& aC3D)
 							
 {
   Standard_Address anAdr;
@@ -239,7 +325,7 @@ IntTools_Context::~IntTools_Context()
 //function : SurfaceData
 //purpose  : 
 //=======================================================================
-  IntTools_SurfaceRangeLocalizeData& IntTools_Context::SurfaceData(const TopoDS_Face& aF) 
+IntTools_SurfaceRangeLocalizeData& IntTools_Context::SurfaceData(const TopoDS_Face& aF) 
 {
   Standard_Address anAdr;
   IntTools_SurfaceRangeLocalizeData* pSData;
@@ -267,7 +353,7 @@ IntTools_Context::~IntTools_Context()
 //function : SolidClassifier
 //purpose  : 
 //=======================================================================
-  BRepClass3d_SolidClassifier& IntTools_Context::SolidClassifier(const TopoDS_Solid& aSolid)
+BRepClass3d_SolidClassifier& IntTools_Context::SolidClassifier(const TopoDS_Solid& aSolid)
 {
   Standard_Address anAdr;
   BRepClass3d_SolidClassifier* pSC;
@@ -290,9 +376,9 @@ IntTools_Context::~IntTools_Context()
 //function : ComputeVE
 //purpose  : 
 //=======================================================================
-  Standard_Integer IntTools_Context::ComputeVE(const TopoDS_Vertex& aV1, 
-					       const TopoDS_Edge&   aE2,
-					       Standard_Real& aT)
+Standard_Integer IntTools_Context::ComputeVE(const TopoDS_Vertex& aV1, 
+					     const TopoDS_Edge&   aE2,
+					     Standard_Real& aT)
 {
   Standard_Boolean bToUpdate;
   Standard_Integer iFlag;
@@ -306,11 +392,11 @@ IntTools_Context::~IntTools_Context()
 //function : ComputeVE
 //purpose  : 
 //=======================================================================
-  Standard_Integer IntTools_Context::ComputeVE(const TopoDS_Vertex& aV1, 
-					       const TopoDS_Edge&   aE2,
-					       Standard_Real& aT,
-					       Standard_Boolean& bToUpdateVertex, 
-					       Standard_Real& aDist)
+Standard_Integer IntTools_Context::ComputeVE(const TopoDS_Vertex& aV1, 
+					     const TopoDS_Edge&   aE2,
+					     Standard_Real& aT,
+					     Standard_Boolean& bToUpdateVertex, 
+					     Standard_Real& aDist)
 {
   bToUpdateVertex=Standard_False;
   aDist=0.;
@@ -319,12 +405,6 @@ IntTools_Context::~IntTools_Context()
     return -1;
   }
   //
-  //modified by NIZNHY-PKV Wed Jul 13 08:30:08 2011f
-  //if (!BRep_Tool::IsGeometric(aE2)) { 
-  //  return -2;
-  //}
-  //modified by NIZNHY-PKV Wed Jul 13 08:30:13 2011t
-  //
   Standard_Real aTolV1, aTolE2, aTolSum, aTolVx;
   Standard_Integer aNbProj;
   gp_Pnt aP;
@@ -360,10 +440,10 @@ IntTools_Context::~IntTools_Context()
 //function : ComputeVS
 //purpose  : 
 //=======================================================================
-  Standard_Integer IntTools_Context::ComputeVS(const TopoDS_Vertex& aV1, 
-					       const TopoDS_Face&   aF2,
-					       Standard_Real& U,
-					       Standard_Real& V)
+Standard_Integer IntTools_Context::ComputeVS(const TopoDS_Vertex& aV1, 
+					     const TopoDS_Face&   aF2,
+					     Standard_Real& U,
+					     Standard_Real& V)
 {
   Standard_Real aTolV1, aTolF2, aTolSum, aDist;
   gp_Pnt aP;
@@ -404,8 +484,8 @@ IntTools_Context::~IntTools_Context()
 //function : StatePointFace
 //purpose  : 
 //=======================================================================
-  TopAbs_State IntTools_Context::StatePointFace(const TopoDS_Face& aF,
-						const gp_Pnt2d& aP2d)
+TopAbs_State IntTools_Context::StatePointFace(const TopoDS_Face& aF,
+					      const gp_Pnt2d& aP2d)
 {
   TopAbs_State aState;
   IntTools_FClass2d& aClass2d=FClass2d(aF);
@@ -416,8 +496,8 @@ IntTools_Context::~IntTools_Context()
 //function : IsPointInFace
 //purpose  : 
 //=======================================================================
-  Standard_Boolean IntTools_Context::IsPointInFace(const TopoDS_Face& aF,
-						   const gp_Pnt2d& aP2d)
+Standard_Boolean IntTools_Context::IsPointInFace(const TopoDS_Face& aF,
+						 const gp_Pnt2d& aP2d)
 {
   TopAbs_State aState=StatePointFace(aF, aP2d);
   if (aState==TopAbs_OUT || aState==TopAbs_ON) {
@@ -429,8 +509,8 @@ IntTools_Context::~IntTools_Context()
 //function : IsPointInOnFace
 //purpose  : 
 //=======================================================================
-  Standard_Boolean IntTools_Context::IsPointInOnFace(const TopoDS_Face& aF,
-						     const gp_Pnt2d& aP2d)
+Standard_Boolean IntTools_Context::IsPointInOnFace(const TopoDS_Face& aF,
+						   const gp_Pnt2d& aP2d)
 { 
   TopAbs_State aState=StatePointFace(aF, aP2d);
   if (aState==TopAbs_OUT) {
@@ -442,9 +522,9 @@ IntTools_Context::~IntTools_Context()
 //function : IsValidPointForFace
 //purpose  : 
 //=======================================================================
-  Standard_Boolean IntTools_Context::IsValidPointForFace(const gp_Pnt& aP,
-							 const TopoDS_Face& aF,
-							 const Standard_Real aTol) 
+Standard_Boolean IntTools_Context::IsValidPointForFace(const gp_Pnt& aP,
+						       const TopoDS_Face& aF,
+						       const Standard_Real aTol) 
 {
   Standard_Boolean bFlag;
   Standard_Real Umin, U, V;
@@ -471,10 +551,10 @@ IntTools_Context::~IntTools_Context()
 //function : IsValidPointForFaces
 //purpose  : 
 //=======================================================================
-  Standard_Boolean IntTools_Context::IsValidPointForFaces (const gp_Pnt& aP,
-							   const TopoDS_Face& aF1,
-							   const TopoDS_Face& aF2,
-							   const Standard_Real aTol) 
+Standard_Boolean IntTools_Context::IsValidPointForFaces (const gp_Pnt& aP,
+							 const TopoDS_Face& aF1,
+							 const TopoDS_Face& aF2,
+							 const Standard_Real aTol) 
 {
   Standard_Boolean bFlag1, bFlag2;
 
@@ -489,11 +569,11 @@ IntTools_Context::~IntTools_Context()
 //function : IsValidBlockForFace
 //purpose  : 
 //=======================================================================
-  Standard_Boolean IntTools_Context::IsValidBlockForFace (const Standard_Real aT1,
-							  const Standard_Real aT2,
-							  const IntTools_Curve& aC, 
-							  const TopoDS_Face& aF,
-							  const Standard_Real aTol) 
+Standard_Boolean IntTools_Context::IsValidBlockForFace (const Standard_Real aT1,
+							const Standard_Real aT2,
+							const IntTools_Curve& aC, 
+							const TopoDS_Face& aF,
+							const Standard_Real aTol) 
 {
   Standard_Boolean bFlag;
   Standard_Real aTInterm;
@@ -512,12 +592,12 @@ IntTools_Context::~IntTools_Context()
 //function : IsValidBlockForFaces
 //purpose  : 
 //=======================================================================
-  Standard_Boolean IntTools_Context::IsValidBlockForFaces (const Standard_Real aT1,
-							   const Standard_Real aT2,
-							   const IntTools_Curve& aC, 
-							   const TopoDS_Face& aF1,
-							   const TopoDS_Face& aF2,
-							   const Standard_Real aTol) 
+Standard_Boolean IntTools_Context::IsValidBlockForFaces (const Standard_Real aT1,
+							 const Standard_Real aT2,
+							 const IntTools_Curve& aC, 
+							 const TopoDS_Face& aF1,
+							 const TopoDS_Face& aF2,
+							 const Standard_Real aTol) 
 {
   Standard_Boolean bFlag1, bFlag2;
   //
@@ -551,10 +631,10 @@ IntTools_Context::~IntTools_Context()
 //function : IsVertexOnLine
 //purpose  : 
 //=======================================================================
-  Standard_Boolean IntTools_Context::IsVertexOnLine (const TopoDS_Vertex& aV,
-						     const IntTools_Curve& aC, 
-						     const Standard_Real aTolC,
-						     Standard_Real& aT)
+Standard_Boolean IntTools_Context::IsVertexOnLine (const TopoDS_Vertex& aV,
+						   const IntTools_Curve& aC, 
+						   const Standard_Real aTolC,
+						   Standard_Real& aT)
 {
   Standard_Boolean bRet;
   Standard_Real aTolV;
@@ -568,11 +648,11 @@ IntTools_Context::~IntTools_Context()
 //function : IsVertexOnLine
 //purpose  : 
 //=======================================================================
-  Standard_Boolean IntTools_Context::IsVertexOnLine (const TopoDS_Vertex& aV,
-						     const Standard_Real aTolV,
-						     const IntTools_Curve& aC, 
-						     const Standard_Real aTolC,
-						     Standard_Real& aT)
+Standard_Boolean IntTools_Context::IsVertexOnLine (const TopoDS_Vertex& aV,
+						   const Standard_Real aTolV,
+						   const IntTools_Curve& aC, 
+						   const Standard_Real aTolC,
+						   Standard_Real& aT)
 {
   Standard_Real aFirst, aLast, aDist, aTolSum;
   Standard_Integer aNbProj;
@@ -693,9 +773,9 @@ IntTools_Context::~IntTools_Context()
 //function : ProjectPointOnEdge
 //purpose  : 
 //=======================================================================
-  Standard_Boolean IntTools_Context::ProjectPointOnEdge(const gp_Pnt& aP,
-							const TopoDS_Edge& anEdge,
-							Standard_Real& aT)
+Standard_Boolean IntTools_Context::ProjectPointOnEdge(const gp_Pnt& aP,
+						      const TopoDS_Edge& anEdge,
+						      Standard_Real& aT)
 {
   Standard_Integer aNbPoints;
 
diff --git a/src/IntTools/IntTools_FClass2d.cxx b/src/IntTools/IntTools_FClass2d.cxx
index 5cae56f..5bb617c 100644
--- a/src/IntTools/IntTools_FClass2d.cxx
+++ b/src/IntTools/IntTools_FClass2d.cxx
@@ -194,25 +194,24 @@ IntTools_FClass2d::IntTools_FClass2d()
       //
       //-- Verification of cases when forgotten to code degenereted
       if(!degenerated) {
-	Standard_Real aR2;
-	gp_Pnt P3da, P3db;
-	//
-	C3d.Initialize(edge,Face);
-	du=(plbid-pfbid)*0.1;
-	u=pfbid+du;
-	P3da=C3d.Value(u);
-	degenerated=Standard_True;
-	u+=du;
-	do { 
-	  P3db=C3d.Value(u);
-	  aR2=P3da.SquareDistance(P3db);
-	  if(aR2>0.) { 
-	    degenerated=Standard_False;
-	    break;
-	  }
-	  u+=du;
-	}
-	while(u<plbid);
+        // check that whole curve is located in vicinity of its middle point
+        // (within sphere of Precision::Confusion() diameter)
+        C3d.Initialize (edge, Face);
+        gp_Pnt P3da = C3d.Value (0.5 * (pfbid + plbid));
+        du = plbid - pfbid;
+        const int NBSTEPS = 10;
+        Standard_Real aPrec2 = 0.25 * Precision::Confusion() * Precision::Confusion();
+        degenerated = Standard_True;
+        for (Standard_Integer i=0; i <= NBSTEPS; i++)
+        {
+          Standard_Real u = pfbid + i * du / NBSTEPS;
+          gp_Pnt P3db = C3d.Value (u);
+          Standard_Real aR2 = P3da.SquareDistance (P3db);
+          if (aR2 > aPrec2) {
+            degenerated = Standard_False;
+            break;
+          }
+        }
       }//if(!degenerated)
       //-- ----------------------------------------
       Tole = BRep_Tool::Tolerance(edge);
diff --git a/src/IntTools/IntTools_FaceFace.cxx b/src/IntTools/IntTools_FaceFace.cxx
index f5799cf..dee8332 100644
--- a/src/IntTools/IntTools_FaceFace.cxx
+++ b/src/IntTools/IntTools_FaceFace.cxx
@@ -299,7 +299,6 @@ static
   Standard_Integer IndexType(const GeomAbs_SurfaceType aType);
 
 //
-//modified by NIZNHY-PKV Tue Jan 31 08:02:24 2012f
 static
   Standard_Real MaxSquareDistance (const Standard_Real aT,
 				   const Handle(Geom_Curve)& aC3D,
@@ -310,8 +309,25 @@ static
 				   const TopoDS_Face& aF1,
 				   const TopoDS_Face& aF2,
 				   const Handle(IntTools_Context)& aCtx);
-//modified by NIZNHY-PKV Tue Jan 31 08:02:28 2012t
+
+static
+  Standard_Boolean CheckPCurve(const Handle(Geom2d_Curve)& aPC, 
+                               const TopoDS_Face& aFace);
+
 //
+static
+  Standard_Real FindMaxSquareDistance (const Standard_Real aA,
+				       const Standard_Real aB,
+				       const Standard_Real aEps,
+				       const Handle(Geom_Curve)& aC3D,
+				       const Handle(Geom2d_Curve)& aC2D1,
+				       const Handle(Geom2d_Curve)& aC2D2,
+				       const Handle(GeomAdaptor_HSurface)& myHS1,
+				       const Handle(GeomAdaptor_HSurface)& myHS2,
+				       const TopoDS_Face& aF1,
+				       const TopoDS_Face& aF2,
+				       const Handle(IntTools_Context)& aCtx);
+
 //=======================================================================
 //function : 
 //purpose  : 
@@ -733,6 +749,10 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
   GeomAbs_SurfaceType aType1, aType2;
   //
   aNbLin=myIntersector.NbLines();
+  if (!aNbLin) {
+    return;
+  }
+  //
   aType1=myHS1->Surface().GetType();
   aType2=myHS2->Surface().GetType();
   //
@@ -763,13 +783,12 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
       }
     }
     //ZZ
-    
-    {// Check the distances
-      Standard_Integer i, j, aNbP;
-      Standard_Real aT, aT1, aT2, dT, aD2, aD2Max;
+    if (aNbLin) {// Check the distances
+      Standard_Integer i, aNbP, j ;
+      Standard_Real aT1, aT2, dT, aD2, aD2Max, aEps, aT11, aT12;
       //
       aD2Max=0.;
-      aNbP=11;
+      aNbP=10;
       aNbLin=mySeqOfCurve.Length();
       //
       for (i=1; i<=aNbLin; ++i) {
@@ -790,23 +809,21 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
 	aT1=aBC->FirstParameter();
 	aT2=aBC->LastParameter();
 	//
-	dT=(aT2-aT1)/(aNbP-1);
-	for (j=0; j<aNbP; ++j) {
-	  aT=aT1+j*dT;
-	  if (j==aNbP-1) {
-	    aT=aT2;
-	  }
-	  aD2=MaxSquareDistance(aT, aC3D, aC2D1, aC2D2,
-				myHS1, myHS2, myFace1, myFace2, myContext);
+	aEps=0.01*(aT2-aT1);
+	dT=(aT2-aT1)/aNbP;
+	for (j=1; j<aNbP; ++j) {
+	  aT11=aT1+j*dT;
+	  aT12=aT11+dT;
+	  aD2=FindMaxSquareDistance(aT11, aT12, aEps, aC3D, aC2D1, aC2D2,
+				    myHS1, myHS2, myFace1, myFace2, myContext);
 	  if (aD2>aD2Max) {
 	    aD2Max=aD2;
 	  }
-	}//for (j=0; j<aNbP; ++j) {
+	}
       }//for (i=1; i<=aNbLin; ++i) {
       //
       myTolReached3d=sqrt(aD2Max);
-    }
-  
+    }// if (aNbLin) 
   }// if (aType1==GeomAbs_Cylinder && aType2==GeomAbs_Cylinder) {
   //
   //904/G3 f
@@ -958,6 +975,7 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
 	  aD2max=aD2;
 	}
       }//for (j=0; j<aNbP; ++j) {
+     
     }//for (i=1; i<=aNbLin; ++i) {
     //
     aD2=myTolReached3d*myTolReached3d;
@@ -965,6 +983,65 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
       myTolReached3d=sqrt(aD2max);
     }
   }//if((aType1==GeomAbs_SurfaceOfRevolution ...
+  //modified by NIZNHY-PKV Thu Aug 30 13:31:10 2012f
+  else if ((aType1==GeomAbs_Plane && aType2==GeomAbs_Sphere) ||
+	   (aType2==GeomAbs_Plane && aType1==GeomAbs_Sphere)) {
+    Standard_Integer i, j, aNbP;
+    Standard_Real aT, aT1, aT2, dT, aD2max, aD2, aEps, aT11, aT12;
+    //
+    aNbLin=mySeqOfCurve.Length();
+    aD2max=0.;
+    aNbP=10;
+    //
+    for (i=1; i<=aNbLin; ++i) {
+      const IntTools_Curve& aIC=mySeqOfCurve(i);
+      const Handle(Geom_Curve)& aC3D=aIC.Curve();
+      const Handle(Geom2d_Curve)& aC2D1=aIC.FirstCurve2d();
+      const Handle(Geom2d_Curve)& aC2D2=aIC.SecondCurve2d();
+      //
+      const Handle(Geom2d_BSplineCurve)& aBC2D1=
+	Handle(Geom2d_BSplineCurve)::DownCast(aC2D1);
+      const Handle(Geom2d_BSplineCurve)& aBC2D2=
+	Handle(Geom2d_BSplineCurve)::DownCast(aC2D2);
+      //
+      if (aBC2D1.IsNull() && aBC2D2.IsNull()) {
+	return;
+      }
+      //
+      if (!aBC2D1.IsNull()) {
+	aT1=aBC2D1->FirstParameter();
+	aT2=aBC2D1->LastParameter();
+      }
+      else {
+	aT1=aBC2D2->FirstParameter();
+	aT2=aBC2D2->LastParameter();
+      }
+      //
+      aEps=0.01*(aT2-aT1);
+      dT=(aT2-aT1)/(aNbP-1);
+      for (j=0; j<aNbP; ++j) {
+	aT=aT1+j*dT;
+	aT11=aT1+j*dT;
+	aT12=aT11+dT;
+	if (j==aNbP-1) {
+	  aT12=aT2;
+	}
+	//
+	aD2=FindMaxSquareDistance(aT11, aT12, aEps, aC3D, aC2D1, aC2D2,
+				  myHS1, myHS2, myFace1, myFace2, myContext);
+	if (aD2>aD2max) {
+	  aD2max=aD2;
+	}
+      }//for (j=0; j<aNbP; ++j) {
+     
+    }//for (i=1; i<=aNbLin; ++i) {
+    //
+    aD2=myTolReached3d*myTolReached3d;
+    if (aD2max > aD2) {
+      myTolReached3d=sqrt(aD2max);
+    }
+  }//else if ((aType1==GeomAbs_Plane && aType2==GeomAbs_Sphere) ...
+  //modified by NIZNHY-PKV Thu Aug 30 13:31:12 2012t
 }
 //=======================================================================
 //function : MakeCurve
@@ -974,7 +1051,8 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
 				    const Handle(Adaptor3d_TopolTool)& dom1,
 				    const Handle(Adaptor3d_TopolTool)& dom2) 
 {
-  Standard_Boolean bDone, rejectSurface, reApprox, bAvoidLineConstructor;
+  Standard_Boolean bDone, rejectSurface, reApprox, bAvoidLineConstructor,
+                   bPCurvesOk;
   Standard_Boolean ok;
   Standard_Integer i, j, aNbParts;
   Standard_Real fprm, lprm;
@@ -988,6 +1066,8 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
   //
   rejectSurface = Standard_False;
   reApprox = Standard_False;
+  //
+  bPCurvesOk = Standard_True;
  
  reapprox:;
   
@@ -1676,13 +1756,9 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
 	else {
 	  Standard_Integer iDegMax, iDegMin, iNbIter;
 	  //
-	  //modified by NIZNHY-PKV Mon Jan 30 14:19:32 2012f
 	  ApproxParameters(myHS1, myHS2, iDegMin, iDegMax, iNbIter);
 	  theapp3d.SetParameters(myTolApprox, tol2d, iDegMin, iDegMax, iNbIter, Standard_True, aParType);
 	  //
-	  // ApproxParameters(myHS1, myHS2, iDegMin, iDegMax);
-	  // theapp3d.SetParameters(myTolApprox, tol2d, iDegMin, iDegMax, 0, Standard_True, aParType);
-	  //modified by NIZNHY-PKV Mon Jan 30 14:19:35 2012t
 	}
       }
       //
@@ -1938,7 +2014,8 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
 		    goto reapprox;
 		  }
 		}
-		// ###########################################
+                // ###########################################
+                bPCurvesOk = CheckPCurve(BS1, myFace2);
 		aCurve.SetSecondCurve2d(BS1);
 	      }
 	      else {
@@ -1963,7 +2040,8 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
 		    goto reapprox;
 		  }
 		}
-		// ###########################################
+                // ###########################################
+                bPCurvesOk = bPCurvesOk && CheckPCurve(BS2, myFace1);
 		aCurve.SetFirstCurve2d(BS2);
 	      }
 	      else { 
@@ -1972,7 +2050,35 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
 		aCurve.SetFirstCurve2d(H1);
 	      }
 	      //
-	      mySeqOfCurve.Append(aCurve);
+              //if points of the pcurves are out of the faces bounds
+              //create 3d and 2d curves without approximation
+              if (!bPCurvesOk) {
+                Handle(Geom2d_BSplineCurve) H1, H2;
+		bPCurvesOk = Standard_True;
+                // 	  
+                Handle(Geom_Curve) aBSp=MakeBSpline(WL,ifprm, ilprm);
+                
+                if(myApprox1) {
+                  H1 = MakeBSpline2d(WL, ifprm, ilprm, Standard_True);
+		  bPCurvesOk = CheckPCurve(H1, myFace1);
+                }
+                
+                if(myApprox2) {
+                  H2 = MakeBSpline2d(WL, ifprm, ilprm, Standard_False);
+		  bPCurvesOk = bPCurvesOk && CheckPCurve(H2, myFace2);
+                }
+                //
+		//if pcurves created without approximation are out of the 
+		//faces bounds, use approximated 3d and 2d curves
+		if (bPCurvesOk) {
+		  IntTools_Curve aIC(aBSp, H1, H2);
+		  mySeqOfCurve.Append(aIC);
+		} else {
+		  mySeqOfCurve.Append(aCurve);
+		}
+              } else {
+                mySeqOfCurve.Append(aCurve);
+              }
 	    }
 	    else { 
 	      const AppParCurves_MultiBSpCurve& mbspc = theapp3d.Value(j);
@@ -2570,7 +2676,7 @@ Handle(Geom2d_BSplineCurve) MakeBSpline2d(const Handle(IntPatch_WLine)& theWLine
 // The block is dedicated to determine whether WLine [ifprm, ilprm]
 // crosses the degenerated zone on each given surface or not.
 // If Yes -> We will not use info about surfaces during approximation
-// because inside degenerated zone of the surface the approx. alogo.
+// because inside degenerated zone of the surface the approx. algo.
 // uses wrong values of normal, etc., and resulting curve will have
 // oscillations that we would not like to have. 
 //                                               PKV Tue Feb 12 2002  
@@ -4497,11 +4603,9 @@ void ApproxParameters(const Handle(GeomAdaptor_HSurface)& aHS1,
       iDegMax=6;
     }
   }
-  //modified by NIZNHY-PKV Mon Jan 30 14:20:08 2012f
   if (aTS1==GeomAbs_Cylinder && aTS2==GeomAbs_Cylinder) {
-    iNbIter=1; //ZZ
+    iNbIter=1; 
   }
-  //modified by NIZNHY-PKV Mon Jan 30 14:20:10 2012t
 }
 //=======================================================================
 //function : Tolerances
@@ -4662,8 +4766,63 @@ void RefineVector(gp_Vec2d& aV2D)
     }
   }
   aV2D.SetCoord(aC[0], aC[1]);
-} 
-//modified by NIZNHY-PKV Tue Jan 31 07:38:19 2012f
+}
+//=======================================================================
+//function : FindMaxSquareDistance
+//purpose  : 
+//=======================================================================
+Standard_Real FindMaxSquareDistance (const Standard_Real aT1,
+				     const Standard_Real aT2,
+				     const Standard_Real aEps,
+				     const Handle(Geom_Curve)& aC3D,
+				     const Handle(Geom2d_Curve)& aC2D1,
+				     const Handle(Geom2d_Curve)& aC2D2,
+				     const Handle(GeomAdaptor_HSurface)& myHS1,
+				     const Handle(GeomAdaptor_HSurface)& myHS2,
+				     const TopoDS_Face& myFace1,
+				     const TopoDS_Face& myFace2,
+				     const Handle(IntTools_Context)& myContext)
+{
+  Standard_Real aA, aB, aCf, aX1, aX2, aF1, aF2, aX, aF;
+  //
+  aCf=1.6180339887498948482045868343656;// =0.5*(1.+sqrt(5.));
+  aA=aT1;
+  aB=aT2;
+  aX1=aB-(aB-aA)/aCf;  
+  aF1=MaxSquareDistance(aX1, 
+			aC3D, aC2D1, aC2D2, myHS1, myHS2, myFace1, myFace2, myContext);
+  aX2=aA+(aB-aA)/aCf;
+  aF2=MaxSquareDistance(aX2, 
+			aC3D, aC2D1, aC2D2, myHS1, myHS2, myFace1, myFace2, myContext);
+  //
+  while(1) {
+    //
+    if (fabs(aA-aB)<aEps) {
+      aX=0.5*(aA+aB);
+      aF=MaxSquareDistance(aX, 
+			aC3D, aC2D1, aC2D2, myHS1, myHS2, myFace1, myFace2, myContext);
+      break;
+    }
+    if (aF1<aF2){
+      aA=aX1;
+      aX1=aX2;
+      aF1=aF2;
+      aX2=aA+(aB-aA)/aCf;
+      aF2=MaxSquareDistance(aX2, 
+			    aC3D, aC2D1, aC2D2, myHS1, myHS2, myFace1, myFace2, myContext);
+      
+    }
+    else {
+      aB=aX2;
+      aX2=aX1;
+      aF2=aF1;
+      aX1=aB-(aB-aA)/aCf; 
+      aF1=MaxSquareDistance(aX1, 
+			    aC3D, aC2D1, aC2D2, myHS1, myHS2, myFace1, myFace2, myContext);
+    }
+  }
+  return aF;
+}
 //=======================================================================
 //function : MaxSquareDistance
 //purpose  : 
@@ -4722,4 +4881,58 @@ Standard_Real MaxSquareDistance (const Standard_Real aT,
   //
   return aD2Max;
 }
-//modified by NIZNHY-PKV Tue Jan 31 07:38:21 2012t
+
+//=======================================================================
+//function : CheckPCurve
+//purpose  : Checks if points of the pcurve are out of the face bounds.
+//=======================================================================
+  Standard_Boolean CheckPCurve(const Handle(Geom2d_Curve)& aPC, 
+                               const TopoDS_Face& aFace) 
+{
+  const Standard_Integer NPoints = 23;
+  Standard_Real umin,umax,vmin,vmax;
+
+  BRepTools::UVBounds(aFace, umin, umax, vmin, vmax);
+  Standard_Real tolU = Max ((umax-umin)*0.01, Precision::Confusion());
+  Standard_Real tolV = Max ((vmax-vmin)*0.01, Precision::Confusion());
+  Standard_Real fp = aPC->FirstParameter();
+  Standard_Real lp = aPC->LastParameter();
+  Standard_Real step = (lp-fp)/(NPoints+1);
+
+  // adjust domain for periodic surfaces
+  TopLoc_Location aLoc;
+  Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace, aLoc);
+  if (aSurf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
+    aSurf = (Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurf))->BasisSurface();
+
+  gp_Pnt2d pnt = aPC->Value((fp+lp)/2);
+  Standard_Real u,v;
+  pnt.Coord(u,v);
+
+  if (aSurf->IsUPeriodic()) {
+    Standard_Real aPer = aSurf->UPeriod();
+    Standard_Integer nshift = (Standard_Integer) ((u-umin)/aPer);
+    if (u < umin+aPer*nshift) nshift--;
+    umin += aPer*nshift;
+    umax += aPer*nshift;
+  }
+  if (aSurf->IsVPeriodic()) {
+    Standard_Real aPer = aSurf->VPeriod();
+    Standard_Integer nshift = (Standard_Integer) ((v-vmin)/aPer);
+    if (v < vmin+aPer*nshift) nshift--;
+    vmin += aPer*nshift;
+    vmax += aPer*nshift;
+  }
+
+  Standard_Integer i;
+  for (i=1; i <= NPoints; i++) {
+    Standard_Real p = fp + i * step;
+    pnt = aPC->Value(p);
+    pnt.Coord(u,v);
+    if (umin-u > tolU || u-umax > tolU ||
+        vmin-v > tolV || v-vmax > tolV)
+      return Standard_False;
+  }
+  return Standard_True;
+
+}
diff --git a/src/Interface/Interface_MSG.cxx b/src/Interface/Interface_MSG.cxx
index 0e2e725..ee4ac6b 100644
--- a/src/Interface/Interface_MSG.cxx
+++ b/src/Interface/Interface_MSG.cxx
@@ -43,7 +43,7 @@ static Standard_Boolean theraise  = Standard_False;
 
 static char blank[] =
 "                                                                            ";
-static Standard_Integer maxblank = strlen(blank);
+static Standard_Integer maxblank = (Standard_Integer) strlen(blank);
 
 
 Interface_MSG::Interface_MSG (const Standard_CString key)
@@ -59,7 +59,7 @@ Interface_MSG::Interface_MSG
 {
   char mess[300];
   sprintf (mess, Interface_MSG::Translated(thekey), i1);
-  theval = new char [strlen (mess)+1 ];
+  theval = new char[strlen (mess) + 1];
   strcpy (theval,mess);
 }
 
@@ -70,7 +70,7 @@ Interface_MSG::Interface_MSG
 {
   char mess[300];
   sprintf (mess, Interface_MSG::Translated(thekey), i1,i2);
-  theval = new char [strlen (mess)+1 ];
+  theval = new char[strlen (mess) + 1];
   strcpy (theval,mess);
 }
 
@@ -82,7 +82,7 @@ Interface_MSG::Interface_MSG
   char mess[300];
   sprintf (mess, Interface_MSG::Translated(thekey),
 	   (intervals < 0 ? r1 : Interface_MSG::Intervalled(r1,intervals)) );
-  theval = new char [strlen (mess)+1 ];
+  theval = new char[strlen (mess) + 1];
   strcpy (theval,mess);
 }
 
@@ -93,7 +93,7 @@ Interface_MSG::Interface_MSG
 {
   char mess[300];
   sprintf (mess, Interface_MSG::Translated(thekey), str);
-  theval = new char [strlen (mess)+1];
+  theval = new char[strlen (mess) + 1];
   strcpy (theval,mess);
 }
 
@@ -105,7 +105,7 @@ Interface_MSG::Interface_MSG
 {
   char mess[300];
   sprintf (mess, Interface_MSG::Translated(thekey), val, str);
-  theval = new char [strlen (mess)+1 ];
+  theval = new char[strlen (mess) + 1];
   strcpy (theval,mess);
 }
 
@@ -142,7 +142,7 @@ Standard_Integer  Interface_MSG::Read (Standard_IStream& S)
     if (buf[0] == '\0') continue;
     if (buf[0] == '@') {
       nb ++;
-      for (i = 1; i <= 200; i ++) {
+      for (i = 1; i <= 199; i ++) {
 	key[i-1] = buf[i];
 	if (buf[i] == '\0') break;
       }
@@ -444,7 +444,7 @@ Standard_CString  Interface_MSG::Blanks (const Standard_Integer val,
 Standard_CString  Interface_MSG::Blanks (const Standard_CString val,
                                          const Standard_Integer max)
 {
-  Standard_Integer lng = strlen(val);
+  Standard_Integer lng = (Standard_Integer) strlen(val);
   if (lng > maxblank || lng > max) return "";
   return &blank [maxblank - max + lng];
 }
@@ -464,7 +464,7 @@ void  Interface_MSG::Print (Standard_OStream& S, const Standard_CString val,
                             const Standard_Integer just)
 {
   if (max > maxblank)  {  Print(S,val,maxblank,just);  return;  }
-  Standard_Integer lng = strlen (val);
+  Standard_Integer lng = (Standard_Integer) strlen (val);
   if (lng > max)  {  S << val;  return;  }
   Standard_Integer m1 = (max-lng) /2;
   Standard_Integer m2 = max-lng - m1;
diff --git a/src/InterfaceGraphic/FILES b/src/InterfaceGraphic/FILES
index da7204e..93ca56a 100644
--- a/src/InterfaceGraphic/FILES
+++ b/src/InterfaceGraphic/FILES
@@ -11,7 +11,6 @@ InterfaceGraphic_wntio.hxx
 InterfaceGraphic_cPrintf.cxx
 InterfaceGraphic_Palette.c
 InterfaceGraphic_PrimitiveArray.hxx
-InterfaceGraphic_RawBufferData.hxx
 InterfaceGraphic_telem.hxx
 InterfaceGraphic_degeneration.hxx
 InterfaceGraphic_tgl_all.hxx
diff --git a/src/LDOM/LDOMBasicString.cxx b/src/LDOM/LDOMBasicString.cxx
index f423b69..8991092 100644
--- a/src/LDOM/LDOMBasicString.cxx
+++ b/src/LDOM/LDOMBasicString.cxx
@@ -37,7 +37,7 @@ LDOMBasicString::LDOMBasicString (const char * aValue)
     myVal.ptr = NULL;
   } else {
     myType = LDOM_AsciiFree;
-    Standard_Integer aLen = strlen (aValue) + 1;
+    Standard_Size aLen = strlen (aValue) + 1;
     myVal.ptr = new char [aLen];
     memcpy (myVal.ptr, aValue, aLen);
   }
@@ -56,7 +56,7 @@ LDOMBasicString::LDOMBasicString (const char                     * aValue,
     myVal.ptr = NULL;
   } else {
     myType = LDOM_AsciiDoc;
-    Standard_Integer aLen = strlen (aValue) + 1;
+    Standard_Integer aLen = (Standard_Integer) strlen (aValue) + 1;
     myVal.ptr = aDoc -> Allocate (aLen);
     memcpy (myVal.ptr, aValue, aLen);
   }
@@ -93,7 +93,7 @@ LDOMBasicString::LDOMBasicString (const LDOMBasicString& anOther)
   switch (myType) {
   case LDOM_AsciiFree:
     if (anOther.myVal.ptr) {
-      Standard_Integer aLen = strlen ((const char *)anOther.myVal.ptr) + 1;
+      Standard_Size aLen = strlen ((const char *)anOther.myVal.ptr) + 1;
       myVal.ptr = new char [aLen];
       memcpy (myVal.ptr, anOther.myVal.ptr, aLen);
       break;
@@ -149,7 +149,7 @@ LDOMBasicString& LDOMBasicString::operator = (const LDOMBasicString& anOther)
   switch (myType) {
   case LDOM_AsciiFree:
     if (anOther.myVal.ptr) {
-      Standard_Integer aLen = strlen ((const char *)anOther.myVal.ptr) + 1;
+      Standard_Size aLen = strlen ((const char *)anOther.myVal.ptr) + 1;
       myVal.ptr = new char [aLen];
       memcpy (myVal.ptr, anOther.myVal.ptr, aLen);
       break;
@@ -269,7 +269,7 @@ LDOMBasicString::operator TCollection_ExtendedString () const
 
     // convert Unicode to Extended String
     ptr += 2;
-    Standard_Integer aLength = (strlen(ptr) / 4), j = 0;
+    Standard_Size aLength = (strlen(ptr) / 4), j = 0;
     Standard_ExtCharacter * aResult = new Standard_ExtCharacter[aLength--];
     while (aLength--) {
       ptr += 4;
diff --git a/src/LDOM/LDOM_Element.cxx b/src/LDOM/LDOM_Element.cxx
index edc90c8..2682de3 100644
--- a/src/LDOM/LDOM_Element.cxx
+++ b/src/LDOM/LDOM_Element.cxx
@@ -79,12 +79,12 @@ LDOM_Attr LDOM_Element::getAttributeNode (const LDOMString& aName) const
     if (aNode && aNode -> getNodeType () != LDOM_Node::ATTRIBUTE_NODE)
       while (1) {
         const LDOM_BasicNode * aSibling = aNode -> GetSibling();
+        if (aSibling == NULL)
+          return LDOM_Attr ();
         if (aSibling -> getNodeType () == LDOM_Node::ATTRIBUTE_NODE) {
           (const LDOM_BasicNode *&) myLastChild = aSibling;
           break;
         }
-        if (aSibling == NULL)
-          return LDOM_Attr ();
         aNode = aSibling;
       }
   }
diff --git a/src/LDOM/LDOM_XmlReader.cxx b/src/LDOM/LDOM_XmlReader.cxx
index f274104..1311d32 100644
--- a/src/LDOM/LDOM_XmlReader.cxx
+++ b/src/LDOM/LDOM_XmlReader.cxx
@@ -138,7 +138,7 @@ LDOM_XmlReader::RecordType LDOM_XmlReader::ReadRecord
 
       // Read the full buffer and reset start and end buffer pointers
         myPtr    = &myBuffer[0];
-        std::streamsize aNBytes;
+        Standard_Size aNBytes;
         if (myFileDes != FILE_NONVALUE)
           aNBytes = read (myFileDes, &myBuffer[aBytesRest],
                           XML_BUFFER_SIZE - aBytesRest);
diff --git a/src/LDOM/LDOM_XmlWriter.cxx b/src/LDOM/LDOM_XmlWriter.cxx
index 86865ed..b7f074a 100644
--- a/src/LDOM/LDOM_XmlWriter.cxx
+++ b/src/LDOM/LDOM_XmlWriter.cxx
@@ -232,7 +232,7 @@ inline LDOM_XmlWriter& LDOM_XmlWriter::operator <<
     {
       const char * str = aString.GetString();
       if (str) {
-        const Standard_Integer aLen = strlen (str);
+        const Standard_Size aLen = strlen (str);
         if (aLen > 0) fwrite (str, aLen, 1, myFile);
       }
     }
@@ -259,7 +259,7 @@ inline LDOM_XmlWriter& LDOM_XmlWriter::operator <<
 //=======================================================================
 inline LDOM_XmlWriter& LDOM_XmlWriter::operator << (const LXMLCh * aString)
 {
-  unsigned int aLength = strlen (aString);
+  Standard_Size aLength = strlen (aString);
   if (aLength > 0) fwrite ((void *) aString, aLength, 1, myFile);
   return * this;
 }
@@ -288,7 +288,7 @@ void LDOM_XmlWriter::WriteAttribute (const LDOM_Node& theAtt)
   if (aValueStr.Type() == LDOMBasicString::LDOM_Integer) {
     Standard_Integer anIntValue;
     aValueStr.GetInteger (anIntValue);
-    aLength = 20 + strlen (aName);
+    aLength = (Standard_Integer) (20 + strlen (aName));
     if (aLength > myABufferLen) {
       if (myABuffer != NULL) delete [] myABuffer;
       myABuffer    = new char [aLength+1];
@@ -296,7 +296,7 @@ void LDOM_XmlWriter::WriteAttribute (const LDOM_Node& theAtt)
     }
     sprintf (myABuffer, "%c%s%c%c%d%c", chSpace, aName,
              chEqual, chDoubleQuote, anIntValue, chDoubleQuote);
-    aLength = strlen (myABuffer);
+    aLength = (Standard_Integer) strlen (myABuffer);
 
   //    String attribute value
   } else {
@@ -304,10 +304,10 @@ void LDOM_XmlWriter::WriteAttribute (const LDOM_Node& theAtt)
     char        * encStr;
     if (aValueStr.Type() == LDOMBasicString::LDOM_AsciiDocClear) {
       encStr  = (char *) aValue;
-      aLength = 4 + strlen (aValue) + strlen (aName);
+      aLength = (Standard_Integer) (4 + strlen (aValue) + strlen (aName));
     } else {
       encStr = LDOM_CharReference::Encode (aValue, aLength, Standard_True);
-      aLength += 4 + strlen (aName);
+      aLength += (Standard_Integer) (4 + strlen (aName));
     }
     if (aLength > myABufferLen) {
       if (myABuffer != NULL) delete [] myABuffer;
diff --git a/src/LocOpe/LocOpe_SplitDrafts.cxx b/src/LocOpe/LocOpe_SplitDrafts.cxx
index 84e1c74..b255317 100644
--- a/src/LocOpe/LocOpe_SplitDrafts.cxx
+++ b/src/LocOpe/LocOpe_SplitDrafts.cxx
@@ -1638,7 +1638,7 @@ static TopoDS_Edge  NewEdge(const TopoDS_Edge& edg,
 	}
       }
       
-      if (Dist2Min  <= Precision::Confusion() * Precision::Confusion()) {
+      if (Dist2Min  <= Precision::SquareConfusion()) {
 	prmf = thepmin;
 	myExtPC.Perform(pvl);
 	if (myExtPC.IsDone()) {
@@ -1656,7 +1656,7 @@ static TopoDS_Edge  NewEdge(const TopoDS_Edge& edg,
 	    }
 	  }
 	  
-	  if (Dist2Min  <= Precision::Confusion() * Precision::Confusion()) {
+      if (Dist2Min  <= Precision::SquareConfusion()) {
 	    prml = thepmin;
 	    break;
 	  }
diff --git a/src/LocOpe/LocOpe_SplitShape.cxx b/src/LocOpe/LocOpe_SplitShape.cxx
index 62aff2f..07f5257 100644
--- a/src/LocOpe/LocOpe_SplitShape.cxx
+++ b/src/LocOpe/LocOpe_SplitShape.cxx
@@ -25,12 +25,14 @@
 #include <TopTools_ListOfShape.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <TopTools_MapOfShape.hxx>
+#include <TopTools_MapOfOrientedShape.hxx>
 #include <TopTools_DataMapOfShapeListOfShape.hxx>
 #include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
 #include <TopTools_DataMapOfShapeInteger.hxx>
 #include <TopTools_DataMapOfShapeShape.hxx>
 #include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
 #include <TopTools_MapIteratorOfMapOfShape.hxx>
+#include <TopTools_MapIteratorOfMapOfOrientedShape.hxx>
 #include <TopoDS_Iterator.hxx>
 #include <TopExp_Explorer.hxx>
 #include <BRep_Builder.hxx>
@@ -671,28 +673,26 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W,
 
   BRepTools::Update(F);
 
-  //  TopExp::Vertices(W,Vfirst,Vlast);
-
   Standard_Real tolf, toll, tol1;
 
   TopoDS_Shape aLocalShape = W.Oriented(TopAbs_FORWARD);
   TopExp::Vertices(TopoDS::Wire(aLocalShape),Vfirst,Vlast);
-  //  TopExp::Vertices(TopoDS::Wire(W.Oriented(TopAbs_FORWARD)),Vfirst,Vlast);
 
   tolf = BRep_Tool::Tolerance(Vfirst);
   toll = BRep_Tool::Tolerance(Vlast);
   tol1 = Max(tolf, toll);
 
 
-  TopExp_Explorer exp,exp2;
+  TopExp_Explorer exp,exp2;  
 
   TopoDS_Wire wfirst,wlast;
   for (; itl.More(); itl.Next()) {
-    const TopoDS_Face& fac = TopoDS::Face(itl.Value());
+    TopoDS_Face fac = TopoDS::Face(itl.Value());
     if (!IsInside(fac,W)) {
       continue;
     }
-
+    
+    fac.Orientation(TopAbs_FORWARD);
     Standard_Boolean ffound = Standard_False;
     Standard_Boolean lfound = Standard_False;
     for (exp.Init(fac,TopAbs_WIRE); exp.More(); exp.Next()) {
@@ -736,11 +736,12 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W,
   if (wfirst.IsSame(wlast)) {
     // on cree 2 faces en remplacement de itl.Value()
     // Essai JAG
-
+    TopTools_ListOfShape WiresFirst;
     for (exp.Init(wfirst,TopAbs_EDGE); exp.More(); exp.Next()) {
       if (BRep_Tool::IsClosed(TopoDS::Edge(exp.Current()),FaceRef)) {
         myDblE.Add(exp.Current());
       }
+      WiresFirst.Append(exp.Current());      
     }
 
     TopAbs_Orientation orient;
@@ -750,17 +751,19 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W,
     B.MakeWire(newW2);
     newW2.Orientation(TopAbs_FORWARD);
 
-    Standard_Integer nbE = 0;
+    Standard_Integer nbE = 0;    
     for (exp.Init(W.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
          exp.More(); exp.Next()) {
       nbE++;
       const TopoDS_Edge& edg = TopoDS::Edge(exp.Current());
-      orient = edg.Orientation();
-      B.Add(newW1,edg);
-      B.Add(newW2,edg.Oriented(TopAbs::Reverse(orient)));
-    }
-
-    TopTools_MapOfShape MapE, PossE;
+      orient = edg.Orientation();      
+      WiresFirst.Append(edg);
+      WiresFirst.Append(edg.Oriented(TopAbs::Reverse(orient)));
+      myDblE.Add(edg);
+    }    
+
+    TopTools_MapOfShape PossE;
+    TopTools_MapOfOrientedShape MapE;
     TopTools_MapIteratorOfMapOfShape itm;
     TopoDS_Vertex vdeb,vfin;
     Standard_Integer nbPoss;
@@ -789,10 +792,7 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W,
 
     TopoDS_Shape aLocalFace = FaceRef.Oriented(wfirst.Orientation());
     C2d = BRep_Tool::CurveOnSurface(LastEdge, TopoDS::Face(aLocalFace), f, l);
-    //    C2d = BRep_Tool::CurveOnSurface
-    //      (LastEdge,
-    //       TopoDS::Face(FaceRef.Oriented(wfirst.Orientation())),
-    //       f,l);
+
     if (LastEdge.Orientation() == TopAbs_FORWARD) {
       pfirst = C2d->Value(f);
     }
@@ -818,17 +818,23 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W,
     }
     aLocalFace  = FaceRef.Oriented(wfirst.Orientation());
     C2d = BRep_Tool::CurveOnSurface(LastEdge, TopoDS::Face(aLocalFace), f, l);
-    //    C2d = BRep_Tool::CurveOnSurface
-    //      (LastEdge,
-    //       TopoDS::Face(FaceRef.Oriented(wfirst.Orientation())),
-    //       f,l);
+    Standard_Real dpar = (l - f)*0.01;
+ 
     if (LastEdge.Orientation() == TopAbs_FORWARD) {
       C2d->D1(l,plast,dlast);
-      //      plast = C2d->Value(l);
+      if (dlast.Magnitude() < gp::Resolution())
+      {
+        gp_Pnt2d PrevPnt = C2d->Value(l - dpar);
+        dlast.SetXY(plast.XY() - PrevPnt.XY());
+      }
     }
     else {
-      //      plast = C2d->Value(f);
       C2d->D1(f,plast,dlast);
+      if (dlast.Magnitude() < gp::Resolution())
+      {
+        gp_Pnt2d NextPnt = C2d->Value(f + dpar);
+        dlast.SetXY(NextPnt.XY() - plast.XY());
+      }
       dlast.Reverse();
     }
 
@@ -841,17 +847,14 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W,
     else {
       cond = !(Vfirst.IsSame(Vlast));
     }
-
-    while (cond) {
+        
+    while (cond) {      
       PossE.Clear();
       
-      // On enchaine par la fin
-      for (exp.Init(wfirst.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
-           exp.More(); exp.Next()) {
-        const TopoDS_Edge& edg = TopoDS::Edge(exp.Current());
-        if (MapE.Contains(edg) && !myDblE.Contains(edg)) {
-          continue;
-        }
+      // On enchaine par la fin      
+      TopTools_ListIteratorOfListOfShape lexp(WiresFirst);
+      for (; lexp.More(); lexp.Next()) {
+        const TopoDS_Edge& edg = TopoDS::Edge(lexp.Value());        
 
         orient = edg.Orientation();
         TopExp::Vertices(edg,vdeb,vfin);
@@ -863,22 +866,33 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W,
         }
       }
       nbPoss = PossE.Extent();
+      if (nbPoss == 0)
+      {
+        break;
+      }
+
       if (nbPoss == 1) {
         itm.Initialize(PossE);
         TopoDS_Shape aLocalFace  = FaceRef.Oriented(wfirst.Orientation());
         C2d = BRep_Tool::CurveOnSurface(TopoDS::Edge(itm.Key()),
                                         TopoDS::Face(aLocalFace), f, l);
-        //	C2d = BRep_Tool::CurveOnSurface
-        //	  (TopoDS::Edge(itm.Key()),
-        //	   TopoDS::Face(FaceRef.Oriented(wfirst.Orientation())),
-        //	   f,l);
+        Standard_Real dpar = (l - f)*0.01;
+
         if (itm.Key().Orientation() == TopAbs_FORWARD) {
-          //	  plast = C2d->Value(l);
           C2d->D1(l,plast,dlast);
+          if (dlast.Magnitude() < gp::Resolution())
+          {
+            gp_Pnt2d PrevPnt = C2d->Value(l - dpar);
+            dlast.SetXY(plast.XY() - PrevPnt.XY());
+          }
         }
         else {
-          //	  plast = C2d->Value(f);
           C2d->D1(f,plast,dlast);
+          if (dlast.Magnitude() < gp::Resolution())
+          {
+            gp_Pnt2d NextPnt = C2d->Value(f + dpar);
+            dlast.SetXY(NextPnt.XY() - plast.XY());
+          }
           dlast.Reverse();
         }
       }
@@ -888,24 +902,15 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W,
         
         ChoixUV(LastEdge, TopoDS::Face(aLocalFace), PossE,
                 itm, plast, dlast, toll);
-        //	ChoixUV(LastEdge,
-        //		TopoDS::Face(FaceRef.Oriented(wfirst.Orientation())),
-        //		PossE,
-        //		itm,
-        //		plast,
-        //		dlast, toll);
-
       }
 
       if (nbPoss >= 1) {
+        if (MapE.Contains(itm.Key())) 
+          break;
         B.Add(newW1,itm.Key());
-        if (MapE.Contains(itm.Key())) {
-          myDblE.Remove(itm.Key());
-        }
-        else {
-          MapE.Add(itm.Key());
-        }
+        MapE.Add(itm.Key());        
         LastEdge = TopoDS::Edge(itm.Key());
+        
         if (LastEdge.Orientation() == TopAbs_FORWARD) {
           Vlast = TopExp::LastVertex(LastEdge);
         }
@@ -920,46 +925,29 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W,
       //MODIFICATION PIERRE SMEYERS : si pas de possibilite, on sort avec erreur
       else{
         cout<<"erreur Spliter : pas de chainage du wire"<<endl;
-        Standard_ConstructionError::Raise();
+        Standard_ConstructionError::Raise();        
       }
       //fin MODIF.
       
       tol1 = Max(BAS.UResolution(tol1), BAS.VResolution(tol1));
       
-      if(IsPeriodic) {
-        cond = !(Vfirst.IsSame(Vlast) && SameUV(pfirst,plast,BAS));
-      }
-      else {
-        cond = !(Vfirst.IsSame(Vlast));
-      }
-      
     }
     
-    for (exp.Init(wfirst.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
-         exp.More(); exp.Next()) {
-      const TopoDS_Edge& edg = TopoDS::Edge(exp.Current());
+    TopTools_ListIteratorOfListOfShape lexp(WiresFirst);
+    for (; lexp.More(); lexp.Next()) {    
+      const TopoDS_Edge& edg = TopoDS::Edge(lexp.Value());
       if (!MapE.Contains(edg)) {
         B.Add(newW2,edg);
         MapE.Add(edg);
       }
-      else if (myDblE.Contains(edg)) {
-        for (itm.Initialize(MapE); itm.More(); itm.Next()) {
-          const TopoDS_Edge& edg2 = TopoDS::Edge(itm.Key());
-          if (edg.IsSame(edg2) && edg.Orientation() != edg2.Orientation()) {
-            B.Add(newW2,edg);
-            myDblE.Remove(edg);
-          }
-        }
-      }
-    }
-    
+    }        
+   
     TopoDS_Face newF1,newF2;
     aLocalFace = FaceRef.EmptyCopied();
     newF1 = TopoDS::Face(aLocalFace);
     newF1.Orientation(TopAbs_FORWARD);
     aLocalFace = FaceRef.EmptyCopied();
     newF2 = TopoDS::Face(aLocalFace);
-    //    newF2 = TopoDS::Face(FaceRef.EmptyCopied());
     newF2.Orientation(TopAbs_FORWARD);
     
     // modifs JAG 97.05.28
@@ -977,23 +965,17 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W,
       }
     }
     
-    B.Add(newF1,newW1.Oriented(orfila));
-    B.Add(newF2,newW2.Oriented(orfila));
-    //    Standard_Boolean exch = Standard_False;
-    BRepTopAdaptor_FClass2d classif(newF1,Precision::PConfusion());
-    if (classif.PerformInfinitePoint() == TopAbs_OUT) {
-      BRepTopAdaptor_FClass2d classi(newF2,Precision::PConfusion());
-      if (classi.PerformInfinitePoint() == TopAbs_IN) {
-        TopoDS_Face tempF = newF2;
-        newF2 = newF1;
-        newF1 = tempF;
-      }
-    }
+    newW1.Oriented(orfila);
+    newW2.Oriented(orfila);
+    
+    B.Add(newF1,newW1);
+    BRepTools::Write(newF1, "k:/queries/WrongBOP/NewF1.brep");
+    B.Add(newF2,newW2);
+    BRepTools::Write(newF2, "k:/queries/WrongBOP/NewF2.brep");
     
     for (exp.ReInit(); exp.More(); exp.Next()) {
       const TopoDS_Wire& wir = TopoDS::Wire(exp.Current());
       if (!wir.IsSame(wfirst)) {
-        //	if (IsInside(F,wir,newW1) || IsInside(F,newW1,wir)) {
         if (IsInside(newF1, wir)) {
           B.Add(newF1,wir);
         }
@@ -1399,13 +1381,11 @@ static void ChoixUV(const TopoDS_Edge& Last,
 {
 
   Standard_Real f,l;
-  //  gp_Pnt2d p2d,psav;
   gp_Pnt2d p2d;
   gp_Vec2d v2d;
   gp_Pnt aPCur, aPlst;
 
   BRepAdaptor_Surface surf(F,Standard_False); // no restriction
-  //  Standard_Real tol = Precision::PConfusion() //BRep_Tool::Tolerance(Last));
   surf.D0 (plst.X(), plst.Y(), aPlst);
 
   Standard_Real tol;
@@ -1415,6 +1395,7 @@ static void ChoixUV(const TopoDS_Edge& Last,
   gp_Dir2d ref2d(dlst);
 
   Handle(Geom2d_Curve) C2d;
+  Standard_Real dpar;
 
   Standard_Integer index = 0, imin=0;
   Standard_Real  angmax = -M_PI, dist, ang;
@@ -1423,14 +1404,25 @@ static void ChoixUV(const TopoDS_Edge& Last,
   for (It.Initialize(Poss); It.More(); It.Next()) {
     index++;
     C2d = BRep_Tool::CurveOnSurface(TopoDS::Edge(It.Key()),F,f,l);
+    dpar = (l - f)*0.01;
     if (It.Key().Orientation() == TopAbs_FORWARD) {
       //      p2d = C2d->Value(f);
       C2d->D1(f,p2d,v2d);
+      if (v2d.Magnitude() < gp::Resolution())
+      {
+        gp_Pnt2d NextPnt = C2d->Value(f + dpar);
+        v2d.SetXY(NextPnt.XY() - p2d.XY());
+      }
       vtx = TopExp::FirstVertex(TopoDS::Edge(It.Key()));
     }
     else {
       //      p2d = C2d->Value(l);
       C2d->D1(l,p2d,v2d);
+      if (v2d.Magnitude() < gp::Resolution())
+      {
+        gp_Pnt2d PrevPnt = C2d->Value(l - dpar);
+        v2d.SetXY(p2d.XY() - PrevPnt.XY());
+      }
       v2d.Reverse();
       vtx = TopExp::LastVertex(TopoDS::Edge(It.Key()));
     }
@@ -1461,13 +1453,24 @@ static void ChoixUV(const TopoDS_Edge& Last,
   for (index = 1, It.Initialize(Poss); It.More(); It.Next()) {
     if (index == imin) {
       C2d = BRep_Tool::CurveOnSurface(TopoDS::Edge(It.Key()),F,f,l);
+      dpar = (l - f)*0.01;
       if (It.Key().Orientation() == TopAbs_FORWARD) {
         //	plst = C2d->Value(l);
         C2d->D1(l,plst,dlst);
+        if (dlst.Magnitude() < gp::Resolution())
+        {
+          gp_Pnt2d PrevPnt = C2d->Value(l - dpar);
+          dlst.SetXY(plst.XY() - PrevPnt.XY());
+        }
       }
       else {
         //	plst = C2d->Value(f);
         C2d->D1(f,plst,dlst);
+        if (dlst.Magnitude() < gp::Resolution())
+        {
+          gp_Pnt2d NextPnt = C2d->Value(f + dpar);
+          dlst.SetXY(NextPnt.XY() - plst.XY());
+        }
         dlst.Reverse();
       }
       break;
diff --git a/src/LocOpe/LocOpe_WiresOnShape.cdl b/src/LocOpe/LocOpe_WiresOnShape.cdl
index 7dc9ba6..5171f20 100644
--- a/src/LocOpe/LocOpe_WiresOnShape.cdl
+++ b/src/LocOpe/LocOpe_WiresOnShape.cdl
@@ -48,6 +48,11 @@ is
     
     	is static;
 
+    SetCheckInterior(me: mutable; ToCheckInterior: Boolean from Standard)
+	---Purpose: Set the flag of check internal intersections
+	--          default value is True (to check)
+	---C++: inline      
+    	is static;
 
     Bind(me: mutable; W: Wire from TopoDS;
                       F: Face from TopoDS)
@@ -148,6 +153,7 @@ fields
     myShape : Shape                      from TopoDS;
     myMapEF : IndexedDataMapOfShapeShape from TopTools;
     myFacesWithSection : MapOfShape      from TopTools;
+    myCheckInterior : Boolean            from Standard;
     myMap   : DataMapOfShapeShape        from TopTools;
     myDone  : Boolean                    from Standard;
     myIndex : Integer                    from Standard;
diff --git a/src/LocOpe/LocOpe_WiresOnShape.cxx b/src/LocOpe/LocOpe_WiresOnShape.cxx
index 4849783..2072fed 100644
--- a/src/LocOpe/LocOpe_WiresOnShape.cxx
+++ b/src/LocOpe/LocOpe_WiresOnShape.cxx
@@ -90,7 +90,7 @@ static void FindInternalIntersections(const TopoDS_Edge&,
 //=======================================================================
 
 LocOpe_WiresOnShape::LocOpe_WiresOnShape(const TopoDS_Shape& S):
-   myShape(S),myDone(Standard_False)
+  myShape(S),myCheckInterior(Standard_True),myDone(Standard_False)
 {}
 
 
@@ -103,6 +103,7 @@ LocOpe_WiresOnShape::LocOpe_WiresOnShape(const TopoDS_Shape& S):
 void LocOpe_WiresOnShape::Init(const TopoDS_Shape& S)
 {
    myShape = S;
+   myCheckInterior = Standard_True;
    myDone = Standard_False;
    myMap.Clear();
    myMapEF.Clear();
@@ -240,7 +241,8 @@ void LocOpe_WiresOnShape::BindAll()
     if (aPCurve.IsNull())
       continue;
 
-    FindInternalIntersections(edg, fac, Splits, myMap, theMap);
+    if (myCheckInterior)
+      FindInternalIntersections(edg, fac, Splits, myMap, theMap);
   }
 
   for (Ind = 1; Ind <= Splits.Extent(); Ind++)
diff --git a/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.cxx b/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.cxx
index 112b187..f851dfe 100644
--- a/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.cxx
+++ b/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.cxx
@@ -62,10 +62,10 @@ void LocalAnalysis_SurfaceContinuity::SurfC1(  GeomLProp_SLProps& Surf1,
        &&(norm2v>myepsnul))
     { if (norm1u >= norm2u ) 
          myLambda1U= norm2u / norm1u;
-      else myLambda1U = norm2u / norm1u;
+      else myLambda1U = norm1u / norm2u;
       if (norm1v >= norm2v ) 
          myLambda1V= norm2v / norm1v;
-      else myLambda1V = norm2v / norm1v;
+      else myLambda1V = norm1v / norm2v;
       angu= V1u.Angle(V2u);
       if (angu>M_PI/2) myContC1U=M_PI-angu;
       else myContC1U=angu;
diff --git a/src/MNaming/MNaming_NamedShapeRetrievalDriver.cxx b/src/MNaming/MNaming_NamedShapeRetrievalDriver.cxx
index 91ad6cb..4cb3628 100644
--- a/src/MNaming/MNaming_NamedShapeRetrievalDriver.cxx
+++ b/src/MNaming/MNaming_NamedShapeRetrievalDriver.cxx
@@ -150,7 +150,8 @@ void MNaming_NamedShapeRetrievalDriver::Paste (
       Bld.Select(NewShape, OldShape); break;
     }
     case TNaming_REPLACE      :{
-      Bld.Replace(OldShape,NewShape); break;
+      //Bld.Replace(OldShape,NewShape); break;
+      Bld.Modify(OldShape,NewShape); break;// for compatibility only
     }  
       default :
 	Standard_DomainError::Raise("TNaming_Evolution; enum term unknown");
diff --git a/src/MNaming/MNaming_NamedShapeStorageDriver.cxx b/src/MNaming/MNaming_NamedShapeStorageDriver.cxx
index 7ee7dc3..84ee517 100644
--- a/src/MNaming/MNaming_NamedShapeStorageDriver.cxx
+++ b/src/MNaming/MNaming_NamedShapeStorageDriver.cxx
@@ -158,7 +158,7 @@ Standard_Integer EvolutionInt(const TNaming_Evolution i)
     case TNaming_MODIFY       : return 2;
     case TNaming_DELETE       : return 3;
     case TNaming_SELECTED     : return 4;
-    case TNaming_REPLACE      : return 5;
+      //case TNaming_REPLACE      : return 5;
   default:
     Standard_DomainError::Raise("TNaming_Evolution; enum term unknown");
   }
diff --git a/src/MNaming/MNaming_NamingRetrievalDriver.cxx b/src/MNaming/MNaming_NamingRetrievalDriver.cxx
index 87e342a..c554ce3 100644
--- a/src/MNaming/MNaming_NamingRetrievalDriver.cxx
+++ b/src/MNaming/MNaming_NamingRetrievalDriver.cxx
@@ -73,6 +73,9 @@ static  TNaming_NameType IntegerToNameType (const Standard_Integer I)
     case  6 : return TNaming_SUBSTRACTION;
     case  7 : return TNaming_CONSTSHAPE; 
     case  8 : return TNaming_FILTERBYNEIGHBOURGS;
+    case  9 : return TNaming_ORIENTATION;
+    case  10: return TNaming_WIREIN;
+    case  11: return TNaming_SHELLIN;
       default :
 	Standard_DomainError::Raise("TNaming_NameType; enum term unknown ");
     }
diff --git a/src/MNaming/MNaming_NamingStorageDriver.cxx b/src/MNaming/MNaming_NamingStorageDriver.cxx
index 11962f0..5836c08 100644
--- a/src/MNaming/MNaming_NamingStorageDriver.cxx
+++ b/src/MNaming/MNaming_NamingStorageDriver.cxx
@@ -78,6 +78,7 @@ static  Standard_Integer NameTypeToInteger (const TNaming_NameType I)
     case  TNaming_FILTERBYNEIGHBOURGS : return 8;
     case  TNaming_ORIENTATION         : return 9;
     case  TNaming_WIREIN              : return 10;
+    case  TNaming_SHELLIN             : return 11;
       default :
 	Standard_DomainError::Raise("TNaming_NameType; enum term unknown ");
     }
diff --git a/src/Materials/Materials.cxx b/src/Materials/Materials.cxx
index 2cb776d..64d4300 100644
--- a/src/Materials/Materials.cxx
+++ b/src/Materials/Materials.cxx
@@ -44,7 +44,7 @@ void  DictionaryOfDefinitions(Handle(Materials_MaterialDefinition)&);
 
 void Materials::MaterialFile(const Standard_CString afile)
 {
-  Standard_Integer length = strlen(afile);
+  Standard_Size length = strlen(afile);
   materialfile = new Standard_Character[length+1];
   strcpy(materialfile,afile);
   materialfile[length] = 0;
@@ -57,7 +57,7 @@ void Materials::MaterialFile(const Standard_CString afile)
 
 void Materials::MaterialsFile(const Standard_CString afile)
 {
-  Standard_Integer length = strlen(afile);
+  Standard_Size length = strlen(afile);
   materialsfile = new Standard_Character[length+1];
   strcpy(materialsfile,afile);
   materialsfile[length] = 0;
diff --git a/src/MeshTest/MeshTest_PluginCommands.cxx b/src/MeshTest/MeshTest_PluginCommands.cxx
index 52d98cc..acdb094 100644
--- a/src/MeshTest/MeshTest_PluginCommands.cxx
+++ b/src/MeshTest/MeshTest_PluginCommands.cxx
@@ -44,6 +44,12 @@
 #include <Poly_Polygon3D.hxx>
 #include <Poly_Polygon2D.hxx>
 #include <Standard.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TColStd_Array1OfInteger.hxx>
+#include <Poly_PolygonOnTriangulation.hxx>
+#include <TopoDS_Face.hxx>
+#include <BRepMesh_Edge.hxx>
+#include <NCollection_Map.hxx>
 
 #include <stdio.h>
 
@@ -332,6 +338,11 @@ static Standard_Integer triarea (Draw_Interpretor& di, int n, const char ** a)
 }
 
 //#######################################################################
+Standard_Boolean IsEqual(const BRepMesh_Edge& theFirst, const BRepMesh_Edge& theSecond) 
+{
+  return theFirst.IsEqual(theSecond);
+}
+
 static Standard_Integer tricheck (Draw_Interpretor& di, int n, const char ** a)
 {
   if (n < 2) return 1;
@@ -356,12 +367,15 @@ static Standard_Integer tricheck (Draw_Interpretor& di, int n, const char ** a)
       Standard_Integer iF = aCheck.GetFaceNumWithFL(k);
       nbFree += nbEdge;
       di << "free links of face " << iF << "\n";
-      const TopoDS_Face& aFace = TopoDS::Face(aMapF.FindKey(iF));
+
+      const TopoDS_Shape& aShape = aMapF.FindKey(iF);
+      const TopoDS_Face& aFace = TopoDS::Face(aShape);
       TopLoc_Location aLoc;
       Handle(Poly_Triangulation) aT = BRep_Tool::Triangulation(aFace, aLoc);
       const TColgp_Array1OfPnt& aPoints = aT->Nodes();
       const TColgp_Array1OfPnt2d& aPoints2d = aT->UVNodes();
       const gp_Trsf& trsf = aLoc.Transformation();
+
       TColgp_Array1OfPnt pnts(1,2);
       TColgp_Array1OfPnt2d pnts2d(1,2);
       for (i=1; i <= nbEdge; i++) {
@@ -422,11 +436,87 @@ static Standard_Integer tricheck (Draw_Interpretor& di, int n, const char ** a)
   }
 
   // output errors summary to DRAW
-  if ( nbFree > 0 || nbErr > 0 || nbAsync > 0 || nbFreeNodes > 0 )
+  if ( nbFree > 0 || nbErr > 0 || nbAsync > 0 || nbFreeNodes > 0)
     di << "Free_links " << nbFree
        << " Cross_face_errors " << nbErr
        << " Async_edges " << nbAsync 
        << " Free_nodes " << nbFreeNodes << "\n";
+
+
+  Standard_Integer aFaceId = 1;
+  TopExp_Explorer aFaceExp(shape, TopAbs_FACE);
+  for ( ; aFaceExp.More(); aFaceExp.Next(), ++aFaceId)
+  {
+    const TopoDS_Shape& aShape = aFaceExp.Current();
+    const TopoDS_Face& aFace = TopoDS::Face(aShape);
+
+    TopLoc_Location aLoc;
+    Handle(Poly_Triangulation) aT = BRep_Tool::Triangulation(aFace, aLoc);
+
+    // Iterate boundary edges
+    NCollection_Map<BRepMesh_Edge> aBoundaryEdgeMap;
+    TopExp_Explorer anExp(aShape, TopAbs_EDGE);
+    for ( ; anExp.More(); anExp.Next() )
+    {
+      TopLoc_Location anEdgeLoc;
+      const TopoDS_Edge& anEdge = TopoDS::Edge(anExp.Current());
+      Handle(Poly_PolygonOnTriangulation) aPoly = BRep_Tool::PolygonOnTriangulation(anEdge, aT, aLoc);
+      if (aPoly.IsNull())
+      {
+        continue;
+      }
+
+      const TColStd_Array1OfInteger& anIndices = aPoly->Nodes();
+      Standard_Integer aLower  = anIndices.Lower(); 
+      Standard_Integer anUpper = anIndices.Upper();
+
+      Standard_Integer aPrevNode = -1;
+      for (Standard_Integer i = aLower; i <= anUpper; ++i)
+      {
+        Standard_Integer aNodeIdx = anIndices.Value(i);
+        if (i != aLower)
+        {
+          BRepMesh_Edge aLink(aPrevNode, aNodeIdx, BRepMesh_Frontier);
+          aBoundaryEdgeMap.Add(aLink);
+        }
+        aPrevNode = aNodeIdx;
+      }
+    }
+
+    if (aBoundaryEdgeMap.Size() == 0)
+    {
+      break;
+    }
+
+    const Poly_Array1OfTriangle& aTris = aT->Triangles();
+    NCollection_Map<BRepMesh_Edge> aFreeEdgeMap;
+    Standard_Integer aTriNum = aTris.Length();
+    for ( Standard_Integer aTriIndx = 1; aTriIndx <= aTriNum; aTriIndx++ )
+    {
+      const Poly_Triangle& aTri = aTris(aTriIndx);
+      Standard_Integer aTriNodes[3] = { aTri.Value(1), aTri.Value(2), aTri.Value(3)};
+
+      for (Standard_Integer i = 1; i <= 3; ++i)
+      {
+        Standard_Integer aLastId  = aTriNodes[i % 3];
+        Standard_Integer aFirstId = aTriNodes[i - 1];
+
+        BRepMesh_Edge aLink(aFirstId, aLastId, BRepMesh_Free);
+        if (!aBoundaryEdgeMap.Contains(aLink))
+        {
+          if (!aFreeEdgeMap.Add(aLink))
+          {
+            aFreeEdgeMap.Remove(aLink);
+          }
+        }
+      }
+    }
+
+    if (aFreeEdgeMap.Size() != 0)
+    {
+      di << "Not connected mesh inside face " << aFaceId << "\n";
+    }
+  }
   return 0;
 }
 
diff --git a/src/MeshVS/MeshVS_DataSource.cxx b/src/MeshVS/MeshVS_DataSource.cxx
index 020cb79..6f6b583 100644
--- a/src/MeshVS/MeshVS_DataSource.cxx
+++ b/src/MeshVS/MeshVS_DataSource.cxx
@@ -206,10 +206,10 @@ Standard_Boolean MeshVS_DataSource::GetNormalsByElement(const Standard_Integer I
     } // switch ( Type )
   } // if ( !allNormals )
 
-  if ( res )
+  if ( res || allNormals )
     Normals = aNormals;
 
-  return res;
+  return ( res || allNormals );
 }
 
 //================================================================
diff --git a/src/MeshVS/MeshVS_TextPrsBuilder.cxx b/src/MeshVS/MeshVS_TextPrsBuilder.cxx
index b9cb71a..d614ab4 100644
--- a/src/MeshVS/MeshVS_TextPrsBuilder.cxx
+++ b/src/MeshVS/MeshVS_TextPrsBuilder.cxx
@@ -178,7 +178,7 @@ void MeshVS_TextPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Prs,
   TCollection_AsciiString  AFontString;
   Standard_Integer         ADispInt;
   // Bold font is used by default for better text readability
-  OSD_FontAspect           AFontAspectType  = OSD_FA_Bold;
+  Font_FontAspect           AFontAspectType  = Font_FA_Bold;
   Standard_Integer         AAspect; 
   
 
@@ -193,7 +193,7 @@ void MeshVS_TextPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Prs,
   if ( aDrawer->GetInteger ( MeshVS_DA_TextDisplayType, ADispInt ) )
     ADisplayType = (Aspect_TypeOfDisplayText) ADispInt;
   if ( aDrawer->GetInteger ( MeshVS_DA_TextFontAspect, AAspect ) )
-    AFontAspectType = (OSD_FontAspect)AAspect;         
+    AFontAspectType = (Font_FontAspect)AAspect;         
 
   Handle (Graphic3d_AspectText3d) aTextAspect = new Graphic3d_AspectText3d ( AColor, AFont, AExpansionFactor, ASpace,
     ATextStyle, ADisplayType );
diff --git a/src/MeshVS/MeshVS_Tool.cxx b/src/MeshVS/MeshVS_Tool.cxx
index ff1ca68..3b4b569 100644
--- a/src/MeshVS/MeshVS_Tool.cxx
+++ b/src/MeshVS/MeshVS_Tool.cxx
@@ -200,11 +200,11 @@ Handle( Graphic3d_AspectText3d ) MeshVS_Tool::CreateAspectText3d
   Aspect_TypeOfStyleText    aStyle        = Aspect_TOST_NORMAL;
   Aspect_TypeOfDisplayText  aDispText     = Aspect_TODT_NORMAL;
   TCollection_AsciiString   aFontString   = Graphic3d_NOF_ASCII_MONO;
-  OSD_FontAspect            aFontAspect   = OSD_FA_Regular;
+  Font_FontAspect           aFontAspect   = Font_FA_Regular;
   Standard_Integer          aStyleI       = (Standard_Integer)Aspect_TOST_NORMAL;
   Standard_Integer          aDispTextI    = (Standard_Integer)Aspect_TODT_NORMAL;
   // Bold font is used by default for better text readability
-  Standard_Integer          aFontAspectI  = (Standard_Integer)OSD_FA_Bold;
+  Standard_Integer          aFontAspectI  = (Standard_Integer)Font_FA_Bold;
 
   if ( !theDr->GetColor ( MeshVS_DA_TextColor, aTColor ) && !UseDefaults )
     return anAsp;
@@ -233,7 +233,7 @@ Handle( Graphic3d_AspectText3d ) MeshVS_Tool::CreateAspectText3d
   if ( !theDr->GetInteger ( MeshVS_DA_TextFontAspect, aFontAspectI ) && !UseDefaults )
     return anAsp;
   else 
-    aFontAspect = (OSD_FontAspect) aFontAspectI;
+    aFontAspect = (Font_FontAspect) aFontAspectI;
 
   anAsp = new Graphic3d_AspectText3d ( aTColor, aFont, anExpFactor, aSpace, aStyle, aDispText );
   anAsp->SetTextFontAspect( aFontAspect );
diff --git a/src/Message/Message_Msg.cxx b/src/Message/Message_Msg.cxx
index 5241398..363f80b 100644
--- a/src/Message/Message_Msg.cxx
+++ b/src/Message/Message_Msg.cxx
@@ -169,7 +169,7 @@ Message_Msg& Message_Msg::Arg (const Standard_CString theString)
     return *this;
 
   // print string according to format
-  char * sStringBuffer = new char [Max (strlen(theString)+1, 1024)];
+  char * sStringBuffer = new char [Max ((Standard_Integer)strlen(theString)+1, 1024)];
   sprintf (sStringBuffer, aFormat.ToCString(), theString);
   TCollection_ExtendedString aStr ( sStringBuffer );
   delete [] sStringBuffer;
diff --git a/src/NCollection/FILES b/src/NCollection/FILES
index 2a3509b..ea23893 100644
--- a/src/NCollection/FILES
+++ b/src/NCollection/FILES
@@ -80,3 +80,6 @@ NCollection_Haft.h
 NCollection_DefaultHasher.hxx
 NCollection_DefineAlloc.hxx
 
+NCollection_Vec2.hxx
+NCollection_Vec3.hxx
+NCollection_Vec4.hxx
diff --git a/src/NCollection/NCollection_BaseVector.cxx b/src/NCollection/NCollection_BaseVector.cxx
index 5deeb2a..783e86e 100644
--- a/src/NCollection/NCollection_BaseVector.cxx
+++ b/src/NCollection/NCollection_BaseVector.cxx
@@ -34,7 +34,7 @@ Standard_Integer NCollection_BaseVector::MemBlock::GetIndexV
                    (void * theItem, const size_t theItemSize) const
 {
   const ptrdiff_t anOffset = (char *) theItem - (char *) myData;
-  const Standard_Integer anIndex = anOffset / theItemSize;
+  const Standard_Integer anIndex = (Standard_Integer) (anOffset / theItemSize);
 #ifdef DEB
   if (anOffset < 0 || anOffset != Standard_Integer (anIndex * theItemSize)
       || anIndex > Standard_Integer (myLength))
diff --git a/src/NCollection/NCollection_SparseArrayBase.cxx b/src/NCollection/NCollection_SparseArrayBase.cxx
index 22df707..89594bb 100644
--- a/src/NCollection/NCollection_SparseArrayBase.cxx
+++ b/src/NCollection/NCollection_SparseArrayBase.cxx
@@ -202,12 +202,10 @@ void NCollection_SparseArrayBase::exchange (NCollection_SparseArrayBase& theOthe
 //purpose  : 
 //=======================================================================
 
-Standard_Address NCollection_SparseArrayBase::setValue (const Standard_Integer theIndex,
+Standard_Address NCollection_SparseArrayBase::setValue (const Standard_Size theIndex,
 							const Standard_Address theValue) 
 {
-  Standard_OutOfRange_Raise_if (theIndex<0,"NCollection_SparseArray::SetValue()")
-  Standard_Size anIndex = (Standard_Size)theIndex;
-  Standard_Size iBlock = anIndex / myBlockSize;
+  Standard_Size iBlock = theIndex / myBlockSize;
     
   // resize blocks array if necessary
   if ( iBlock >= myNbBlocks )
@@ -222,7 +220,7 @@ Standard_Address NCollection_SparseArrayBase::setValue (const Standard_Integer t
   Block aBlock (getBlock (anAddr));
 
   // mark item as defined 
-  Standard_Size anInd = anIndex % myBlockSize;
+  Standard_Size anInd = theIndex % myBlockSize;
   Standard_Address anItem = getItem (aBlock, anInd);
 
   // either create an item by copy constructor if it is new, or assign it
@@ -243,14 +241,13 @@ Standard_Address NCollection_SparseArrayBase::setValue (const Standard_Integer t
 //purpose  : 
 //=======================================================================
 
-Standard_Boolean NCollection_SparseArrayBase::HasValue (const Standard_Integer theIndex) const
+Standard_Boolean NCollection_SparseArrayBase::HasValue (const Standard_Size theIndex) const
 {
-  Standard_Size anIndex = (Standard_Size)theIndex;
-  Standard_Size iBlock = anIndex / myBlockSize;
-  if ( theIndex < 0 || iBlock >= myNbBlocks ||
+  Standard_Size iBlock = theIndex / myBlockSize;
+  if ( iBlock >= myNbBlocks ||
        ! myData[iBlock] )
     return Standard_False;
-  return getBlock(myData[iBlock]).IsSet(anIndex % myBlockSize) ? Standard_True : Standard_False;
+  return getBlock(myData[iBlock]).IsSet(theIndex % myBlockSize) ? Standard_True : Standard_False;
 }
 
 //=======================================================================
@@ -258,16 +255,15 @@ Standard_Boolean NCollection_SparseArrayBase::HasValue (const Standard_Integer t
 //purpose  : 
 //=======================================================================
 
-Standard_Boolean NCollection_SparseArrayBase::UnsetValue (const Standard_Integer theIndex)
+Standard_Boolean NCollection_SparseArrayBase::UnsetValue (const Standard_Size theIndex)
 {
   // check that the item is defined
-  Standard_Size anIndex = (Standard_Size)theIndex;
-  Standard_Size iBlock = anIndex / myBlockSize;
-  if ( theIndex < 0 || iBlock >= myNbBlocks || ! myData[iBlock] )
+  Standard_Size iBlock = theIndex / myBlockSize;
+  if ( iBlock >= myNbBlocks || ! myData[iBlock] )
     return Standard_False;
 
   Block aBlock (getBlock(myData[iBlock]));
-  Standard_Size anInd = anIndex % myBlockSize;
+  Standard_Size anInd = theIndex % myBlockSize;
   if ( ! aBlock.Unset(anInd) )
     return Standard_False;
 
diff --git a/src/NIS/NIS_Surface.cxx b/src/NIS/NIS_Surface.cxx
index c51e3ba..54513de 100644
--- a/src/NIS/NIS_Surface.cxx
+++ b/src/NIS/NIS_Surface.cxx
@@ -223,7 +223,7 @@ void NIS_Surface::Init (const TopoDS_Shape& theShape,
     myNEdges = 0;
 
     // The second loop: copy all nodes and triangles face-by-face
-    const Standard_Real eps2 = Precision::Confusion()*Precision::Confusion();
+    const Standard_Real eps2 = Precision::SquareConfusion();
     Standard_Integer nNodes (0), nTriangles (0);
     for (fexp.ReInit(); fexp.More(); fexp.Next())
     {
diff --git a/src/OS/FoundationClasses.tcl b/src/OS/FoundationClasses.tcl
index 7d30910..c418a4d 100644
--- a/src/OS/FoundationClasses.tcl
+++ b/src/OS/FoundationClasses.tcl
@@ -25,7 +25,7 @@ proc FoundationClasses:toolkits { } {
 ;# Autres UDs a prendre.
 ;#
 proc FoundationClasses:ressources { } {
-        return [list [list both r UnitsAPI {} ] [list both r OS {} ]] \
+        return [list [list both r OS {} ]] \
 }
 ;
 ;#
@@ -112,3 +112,7 @@ proc FoundationClasses:LinksoWith { } {
 proc FoundationClasses:Export { } {
     return [list source runtime wokadm api]
 }
+
+proc FoundationClasses:install { } {
+        return [list UnitsAPI]
+}
diff --git a/src/OS/Visualization.tcl b/src/OS/Visualization.tcl
index db96db5..a34ff23 100644
--- a/src/OS/Visualization.tcl
+++ b/src/OS/Visualization.tcl
@@ -35,7 +35,6 @@ proc Visualization:ressources { } {
     return [list \
 	   [list both r FontMFT {}] \
 	   [list both r Textures {}] \
-	   [list both n VoxelClient {}] \
 	    ]
 }
 ;#
diff --git a/src/OSD/FILES b/src/OSD/FILES
index 510ba51..3c20c77 100644
--- a/src/OSD/FILES
+++ b/src/OSD/FILES
@@ -16,7 +16,6 @@ OSD_signal.cxx
 OSD_signal_WNT.cxx
 OSD_ThreadFunction.hxx
 OSD_PThread.hxx      
-OSD_NListOfSystemFont.hxx
 OSD_Localizer.cxx
 OSD_PerfMeter.c
 OSD_PerfMeter.h
diff --git a/src/OSD/OSD.cdl b/src/OSD/OSD.cdl
index 930d527..85f08da 100644
--- a/src/OSD/OSD.cdl
+++ b/src/OSD/OSD.cdl
@@ -93,10 +93,6 @@ is
 
  enumeration KindFile is FILE, DIRECTORY, LINK, SOCKET, UNKNOWN;
    ---Purpose: Specifies the type of files.
-   
- --ABD Integration support of system fonts (using FTGL and FreeType)
- enumeration FontAspect is FA_Undefined, FA_Regular, FA_Bold, FA_Italic, FA_BoldItalic;
-   ---Purpose: Specifies aspect of system font.
 
  private enumeration WhoAmI is  WDirectory, WDirectoryIterator, 
              WEnvironment, WFile, WFileNode, WFileIterator, WMailBox, 
@@ -179,13 +175,7 @@ is
      imported ThreadFunction;
          class Thread;
              ---Purpose: A tool to manage threads
-         
-         --ABD Integration support of system fonts (using FTGL and FreeType)
-     imported NListOfSystemFont;
-     class SystemFont;
-     class FontMgr;
 
- 
     class Real2String;
              ---Purpose: Convertion of CString to Real and reciprocally   
 
diff --git a/src/OSD/OSD_FontMgr.cdl b/src/OSD/OSD_FontMgr.cdl
deleted file mode 100644
index 80af870..0000000
--- a/src/OSD/OSD_FontMgr.cdl
+++ /dev/null
@@ -1,52 +0,0 @@
--- Created on: 2008-01-20
--- Created by: Alexander A. BORODIN
--- Copyright (c) 2008-2012 OPEN CASCADE SAS
---
--- The content of this file is subject to the Open CASCADE Technology Public
--- License Version 6.5 (the "License"). You may not use the content of this file
--- except in compliance with the License. Please obtain a copy of the License
--- at http://www.opencascade.org and read it completely before using this file.
---
--- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
--- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
---
--- The Original Code and all software distributed under the License is
--- distributed on an "AS IS" basis, without warranty of any kind, and the
--- Initial Developer hereby disclaims all such warranties, including without
--- limitation, any warranties of merchantability, fitness for a particular
--- purpose or non-infringement. Please see the License for the specific terms
--- and conditions governing the rights and limitations under the License.
-
-
--- Updated:       
-
-
-class FontMgr from OSD inherits TShared from MMgt
-
- ---Purpose: Structure for store of Font System Information
-
-uses Path,
-     SystemFont,
-     NListOfSystemFont,
-     AsciiString from TCollection
-is
- GetInstance(myclass)
-    returns FontMgr;
-    ---Level: Public
-
- GetAvalableFonts(me)
-    returns NListOfSystemFont;
-
---- Private methods
-
- Create returns FontMgr is private;
-    ---Purpose: Creates empty font object
-    ---Level: Private
-
- InitFontDataBase(me:mutable) is private;
-
-fields
-
- MyListOfFonts:         NListOfSystemFont;
-
-end FontMgr;
\ No newline at end of file
diff --git a/src/OSD/OSD_FontMgr.cxx b/src/OSD/OSD_FontMgr.cxx
deleted file mode 100644
index f067d31..0000000
--- a/src/OSD/OSD_FontMgr.cxx
+++ /dev/null
@@ -1,441 +0,0 @@
-// Created on: 2008-01-20
-// Created by: Alexander A. BORODIN
-// Copyright (c) 2008-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-
-// Updated:
-
-#include <OSD_FontMgr.ixx>
-#ifdef WNT
-# include <windows.h>
-# include <stdlib.h>
-#endif //WNT
-
-#include <OSD_Environment.hxx>
-#include <NCollection_List.hxx>
-#include <TCollection_HAsciiString.hxx>  
-#include <Standard_Stream.hxx>
-
-
-#ifndef WNT
-#include <TCollection_AsciiString.hxx>
-
-#include <NCollection_DefineList.hxx>
-#include <NCollection_List.hxx>
-
-#include <OSD_Path.hxx>
-#include <OSD_FileIterator.hxx>
-#include <OSD_DirectoryIterator.hxx>
-#include <OSD_File.hxx>
-#include <OSD_FileNode.hxx>
-#include <OSD_OpenMode.hxx>
-#include <OSD_Protection.hxx>
-#include <OSD_NListOfSystemFont.hxx>
-
-const  Standard_Integer font_service_conf_size = 3;
-static Standard_Character font_service_conf[font_service_conf_size][64] = { {"/etc/X11/fs/config"},
-                                                                            {"/usr/X11R6/lib/X11/fs/config"},
-                                                                            {"/usr/X11/lib/X11/fs/config"}
-                                                                           };
-
-#ifdef X11_FONT_PATH
-# define stringify(s) #s
-# define tostring(s) stringify(s)
-# define X11_FONT_PATH_STR tostring(X11_FONT_PATH)
-#else
-# define X11_FONT_PATH_STR ""
-#endif
-
-DEFINE_LIST( StringList, NCollection_List, TCollection_HAsciiString );
-
-void find_path_with_font_dir( const TCollection_AsciiString& dir,StringList& dirs )
-{  
-  if( !dir.IsEmpty() )
-  {
-    TCollection_AsciiString PathName( dir );
-
-    Standard_Integer rem = PathName.Length();
-
-    if ( PathName.SearchFromEnd("/") == rem )
-      PathName.Remove( rem, 1 );
-
-    Standard_Boolean need_to_append = Standard_True;
-       
-    StringList::Iterator it( dirs );
-    for( ; it.More(); it.Next() )
-    {
-      if ( PathName.IsEqual(it.Value().ToCString()) ) {
-        need_to_append = Standard_False;
-        break;
-      }
-    }
-    if ( need_to_append )
-      dirs.Append( PathName );
-
-    OSD_DirectoryIterator osd_dir(PathName,"*");
-    while(osd_dir.More())
-    {
-      OSD_Path path_file;
-      osd_dir.Values().Path( path_file );
-      if( path_file.Name().Length() < 1 )
-      {
-        osd_dir.Next();
-        continue;
-      }
-      
-      TCollection_AsciiString full_path_name = PathName + "/" + path_file.Name();
-      rem = full_path_name.Length();
-      if ( full_path_name.SearchFromEnd("/") == rem )
-        full_path_name.Remove( rem, 1 );
-      find_path_with_font_dir( full_path_name, dirs );
-      osd_dir.Next();
-    }
-  }
-}
-
-#endif //WNT
-
-
-Handle(OSD_FontMgr) OSD_FontMgr::GetInstance() {
-
-  static Handle(OSD_FontMgr) _mgr;
-  if ( _mgr.IsNull() )
-    _mgr = new OSD_FontMgr();
-
-  return _mgr;
-
-}
-
-OSD_FontMgr::OSD_FontMgr() {
-
-  InitFontDataBase();
-
-}
-
-#ifndef WNT
-static void
-process_paths_with_font_dir(const Standard_Character* paths, StringList& dirs)
-{
-  TCollection_AsciiString fontpath(paths);
-
-  while (fontpath.Length() > 0)
-  {
-    TCollection_AsciiString next_fontpath("");
-    Standard_Integer position = fontpath.Search(";");
-    if (position >= 0)
-    {
-      next_fontpath = fontpath.Split(position);
-      fontpath.Trunc(fontpath.Length() - 1);
-    }
-#ifdef TRACE
-    cout << "Font Path: " << fontpath << endl;
-#endif
-    if ( fontpath.Value(1) == '/' ) {
-      find_path_with_font_dir( fontpath, dirs );
-    }
-    else
-    {
-      TCollection_AsciiString aFontPath( fontpath );
-      TCollection_AsciiString aCutFontPath;
-      Standard_Integer location = aFontPath.Location( "/",1,aFontPath.Length() );
-      if( location > 0 )
-        aCutFontPath.AssignCat( aFontPath.SubString(location, aFontPath.Length() ) );
-      find_path_with_font_dir( aCutFontPath, dirs );
-    }
-    fontpath = next_fontpath;
-  }
-}
-#endif
-
-void OSD_FontMgr::InitFontDataBase() {
-
-  MyListOfFonts.Clear();
-
-#ifdef WNT
-  //detect font directory
-
-  OSD_Environment env("windir");
-  TCollection_AsciiString windir_str = env.Value();
-  if ( windir_str.IsEmpty() )
-  {
-	  return;
-  }
-  Handle(TCollection_HAsciiString) HFontDir = new TCollection_HAsciiString( windir_str );
-  HFontDir->AssignCat( "\\Fonts\\" );
-  #ifdef TRACE
-    cout << "System font directory: " << HFontDir->ToCString() << "\n";
-  #endif
-
-  //read registry
-  HKEY fonts_hkey;
-  if( RegOpenKeyEx( HKEY_LOCAL_MACHINE,
-      TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"),
-      0,
-      KEY_READ,
-      &fonts_hkey )
-      != ERROR_SUCCESS ) 
-  {
-    return;
-  }           
-  Standard_Integer           id = 0;
-  Standard_Character         buf_name[100];
-  Standard_Byte buf_data[100];
-  DWORD size_name = 100,
-        size_data = 100;
-
-  while ( true )
-  {
-    //detect file name    
-    DWORD type;
-    size_name = 100,
-      size_data = 100;
-    OSD_FontAspect aspect;
-    if( RegEnumValue( fonts_hkey,
-                      id,
-                      buf_name,
-                      &size_name,
-                      NULL,
-                      &type,
-                      buf_data,
-                      &size_data) == ERROR_NO_MORE_ITEMS ) {
-        break;
-      }
-      Handle(TCollection_HAsciiString) fname = 
-        new TCollection_HAsciiString(buf_name);
-      fname->RightAdjust();
-      fname->LeftAdjust();
-      //remove construction like (TrueType....
-      Standard_Integer anIndexTT = fname->SearchFromEnd( new TCollection_HAsciiString( " (" ) );
-      Standard_Boolean aTruncate = Standard_False;
-      if ( anIndexTT > 1 )
-        fname->Trunc( anIndexTT );
-      Standard_Integer anIndex = 0;
-      fname->RightAdjust();
-      if ( ( anIndex = fname->SearchFromEnd( new TCollection_HAsciiString("Bold Italic") ) ) > 0 ) {
-        aTruncate = ( anIndex > 1 ) && ( fname->Value(anIndex - 1 ) == ' ' );
-        aspect = OSD_FA_BoldItalic;
-      } else if ( ( anIndex = fname->SearchFromEnd( new TCollection_HAsciiString("Bold") ) ) > 0 ) {
-        aTruncate = ( anIndex > 1 ) && ( fname->Value(anIndex - 1 ) == ' ' );
-        aspect = OSD_FA_Bold;
-      } else if ( ( anIndex = fname->SearchFromEnd( new TCollection_HAsciiString("Italic") ) ) > 0 ) {
-        aTruncate = ( anIndex > 1 ) && ( fname->Value(anIndex - 1 ) == ' ' );
-        aspect = OSD_FA_Italic;
-      } else {
-        aspect = OSD_FA_Regular;
-      }
-      if( aTruncate )
-        fname->Trunc( anIndex - 1 );
-      fname->RightAdjust();
-      Handle(TCollection_HAsciiString) file_path =
-      new TCollection_HAsciiString( (Standard_Character*)buf_data );
-      if ( strchr( (Standard_Character*)buf_data, '\\' ) == NULL ) {
-        file_path->Insert( 1, HFontDir );
-      }
-
-      if( ( ( file_path->Search(".ttf") > 0 ) || ( file_path->Search(".TTF") > 0 ) ||
-            ( file_path->Search(".otf") > 0 ) || ( file_path->Search(".OTF") > 0 ) ||
-            ( file_path->Search(".ttc") > 0 ) || ( file_path->Search(".TTC") > 0 ) ) ){
-        MyListOfFonts.Append( new OSD_SystemFont( fname, aspect, file_path ) );
-#ifdef TRACE
-        cout  << "Adding font...\n"
-              << "  font name: " << fname->ToCString() << "\n"
-              << "  font file: " << file_path->ToCString() << "\n"
-              << "  font aspect: ";
-        switch( aspect ) {
-        case OSD_FA_Bold:
-          cout << "OSD_FA_Bold\n";
-          break;
-        case OSD_FA_BoldItalic:
-          cout << "OSD_FA_BoldItalic\n";
-          break;
-        case OSD_FA_Italic:
-          cout << "OSD_FA_Italic\n";
-          break;
-        default:
-          cout << "OSD_FA_Regular\n";
-          break;
-        }
-#endif
-      }
-  id++; 
-  }
-  //close registry
-  RegCloseKey( fonts_hkey );
-#endif //WNT
-
-#ifndef WNT
-  StringList dirs;
-
-  Standard_Character* font_path_env = getenv("FONTPATH");
-  if (font_path_env != NULL)
-    process_paths_with_font_dir( font_path_env, dirs );
-  else
-    process_paths_with_font_dir( X11_FONT_PATH_STR, dirs );
-
-  OSD_OpenMode aMode =  OSD_ReadOnly;
-  OSD_Protection  aProtect( OSD_R, OSD_R, OSD_R, OSD_R );
-
-  for( Standard_Integer j = 0 ; j < font_service_conf_size; j++ )
-  {
-    TCollection_AsciiString fileOfFontServiceName( font_service_conf[j] );
-    OSD_File aFile( fileOfFontServiceName );
-
-    if( aFile.Exists() ) 
-      aFile.Open( aMode, aProtect );
-  
-    if( aFile.IsOpen() )//font service
-    {
-      Standard_Integer aNByte = 256;
-      Standard_Integer aNbyteRead;
-      TCollection_AsciiString aStr( aNByte );//read string with information
-      TCollection_AsciiString aStrCut( aNByte );//cut of string
-      TCollection_AsciiString endStr;//cutting string
-
-      Standard_Boolean read_dirs = Standard_False;
-      Standard_Integer location =- 1; //disposition of necessary literals
-      Standard_Integer begin =- 1; //first left entry in string
-      Standard_Integer end =- 1; //first right entry in string
-      while( !aFile.IsAtEnd() )
-      {
-        aFile.ReadLine( aStr, aNByte, aNbyteRead );//reading 1 lines(256 bytes) 
-        location = aStr.Location( "catalogue = ", 1, aStr.Length() );
-        if(location == 0)
-          location = aStr.Location( "catalogue=", 1, aStr.Length() );
-        if(location == 0)
-          location = aStr.Location( "catalogue= ", 1, aStr.Length() );
-        if(location == 0)
-          location = aStr.Location( "catalogue = ", 1, aStr.Length() );
-        if( location > 0 )  
-        {
-#ifdef TRACE
-          cout << " Font config find!!" << endl;
-#endif
-          read_dirs = Standard_True;
-        }
-  
-        if( read_dirs )
-        {  
-          begin = aStr.Location( "/", 1, aStr.Length() );//begin of path name
-          end = aStr.Location( ":", 1, aStr.Length() );//end of path name
-          if( end < 1 )
-            end = aStr.Location( ",", 1, aStr.Length() );//also end of path name
-          end -= 1;
-          if( begin > 0 && end > 0 )
-          {
-            if( ( end - begin ) > 0 )
-              endStr.AssignCat( aStr.SubString ( begin, end ) );//cutting necessary literals for string
-            dirs.Append( TCollection_HAsciiString ( endStr ) );
-            endStr.Clear();
-          }
-          else 
-            if( begin > 0 && end == -1 )
-            { 
-              //if end of string don't have "," or ":"
-              //it is possible last sentence in block of word
-              endStr.AssignCat( aStr.SubString( begin, aStr.Length() - 1 ) );
-              dirs.Append( TCollection_HAsciiString( endStr ) );   
-              endStr.Clear();
-            }
-        } 
- 
-      }
-      aFile.Close();
-    }
-  }
-
-  if( dirs.Size() > 0 )
-  {   
-    //if dirs list contains elements
-    OSD_OpenMode aModeRead =  OSD_ReadOnly;
-    OSD_Protection  aProtectRead( OSD_R, OSD_R , OSD_R , OSD_R );
-
-    TCollection_AsciiString fileFontsDir;
-    StringList::Iterator it( dirs ); 
-    for( ; it.More(); it.Next() ) 
-    {     
-      fileFontsDir.AssignCat( it.Value().ToCString() );   
-      fileFontsDir.AssignCat( "/fonts.dir" );//append file name in path way
-
-      OSD_File readFile( fileFontsDir );  
-      readFile.Open( aModeRead, aProtectRead );
-
-      Standard_Integer aNbyteRead, aNByte = 256;
-      if( readFile.IsOpen ( ) )
-      {
-        TCollection_AsciiString aLine( aNByte );
-        Standard_Integer countOfString = 0 ;
-        while( ! readFile.IsAtEnd() )//return true if EOF
-        {
-          if( countOfString > 1 )
-          {
-            readFile.ReadLine( aLine , aNByte , aNbyteRead );
-            if( ( ( aLine.Search(".pfa") > 0 ) || ( aLine.Search(".PFA") > 0 ) ||
-                  ( aLine.Search(".pfb") > 0 ) || ( aLine.Search(".PFB") > 0 ) ||
-                  ( aLine.Search(".ttf") > 0 ) || ( aLine.Search(".TTF") > 0 ) ||
-                  ( aLine.Search(".otf") > 0 ) || ( aLine.Search(".OTF") > 0 ) ||
-                  ( aLine.Search(".ttc") > 0 ) || ( aLine.Search(".TTC") > 0 ) )
-                  && ( aLine.Search( "iso8859-1\n" ) > 0 ) )    
-            { 
-
-              // In current implementation use fonts with ISO-8859-1 coding page.
-              // OCCT not give to manage coding page by means of programm interface. 
-              // TODO: make high level interface for 
-              // choosing necessary coding page.  
-              TCollection_AsciiString aXLFD;
-              Standard_Integer leftXLFD = aLine.SearchFromEnd(" ");
-              Standard_Integer rightXLFD = aLine.Length();
-              if( leftXLFD && rightXLFD )
-                aXLFD.AssignCat(aLine.SubString( leftXLFD + 1, rightXLFD ) );
-
-              TCollection_AsciiString aPath;
-              TCollection_AsciiString aTemp( it.Value().ToCString() );
-              if ( aTemp.SearchFromEnd("/") == aTemp.Length() )
-              {
-                //this branch intend to SUN
-                aPath.AssignCat( aTemp.ToCString() );
-                aPath.AssignCat( aLine.Token( " ", 1 ) );
-              }
-              else {
-                //this branch intend to Linux       
-                aPath.AssignCat( aTemp.ToCString( ) );
-                aPath.AssignCat( "/" );
-                aPath.AssignCat( aLine.Token( " ", 1 ) );
-              }
-              MyListOfFonts.Append( new OSD_SystemFont( new TCollection_HAsciiString( aXLFD ),
-                new TCollection_HAsciiString( aPath ) ) );
-            }
-            
-          }
-          else
-            readFile.ReadLine( aLine, aNByte, aNbyteRead ); 
-          countOfString++;
-        }
-        readFile.Close();
-      } 
-      fileFontsDir.Clear(); 
-    }
-  }
-#endif
-}
-
-OSD_NListOfSystemFont OSD_FontMgr::GetAvalableFonts() const
-{
-  return MyListOfFonts;
-}
-
-
diff --git a/src/OSD/OSD_Host.cxx b/src/OSD/OSD_Host.cxx
index ab44fd5..0e186ab 100644
--- a/src/OSD/OSD_Host.cxx
+++ b/src/OSD/OSD_Host.cxx
@@ -258,7 +258,7 @@ OSD_Host :: OSD_Host () {
   nSize                         = MAX_COMPUTERNAME_LENGTH + 1;
   osVerInfo.dwOSVersionInfoSize = sizeof ( OSVERSIONINFO );
 
-  ZeroMemory (  szHostName, sizeof ( hostName )  );
+  ZeroMemory (  szHostName, sizeof ( Standard_Character ) *  (MAX_COMPUTERNAME_LENGTH + 1) );
 
   if (  !GetVersionEx ( &osVerInfo )  ) {
 
@@ -277,7 +277,7 @@ OSD_Host :: OSD_Host () {
 
   if (  !Failed ()  ) {
   
-   memSize = ms.dwAvailPageFile;
+    memSize = (Standard_Integer) ms.dwAvailPageFile;
 
    if (   WSAStartup (  MAKEWORD( 1, 1 ), &wd  )   ) {
    
diff --git a/src/OSD/OSD_MAllocHook.cxx b/src/OSD/OSD_MAllocHook.cxx
index 5b81e6b..2de5ee8 100644
--- a/src/OSD/OSD_MAllocHook.cxx
+++ b/src/OSD/OSD_MAllocHook.cxx
@@ -464,6 +464,7 @@ OSD_MAllocHook::CollectBySize::~CollectBySize()
 //=======================================================================
 
 #define MAX_ALLOC_SIZE 2000000u
+const size_t OSD_MAllocHook::CollectBySize::myMaxAllocSize = MAX_ALLOC_SIZE;
 
 void OSD_MAllocHook::CollectBySize::Reset()
 {
diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
index 7d59b05..3c41568 100644
--- a/src/OSD/OSD_MemInfo.cxx
+++ b/src/OSD/OSD_MemInfo.cxx
@@ -32,6 +32,8 @@
 #elif (defined(__APPLE__))
   #include <mach/task.h>
   #include <mach/mach.h>
+#else
+  #include <unistd.h>
 #endif
 
 #include <string>
@@ -96,7 +98,7 @@ void OSD_MemInfo::Update()
     myCounters[MemSwapUsage]      = aProcMemCnts.PagefileUsage;
     myCounters[MemSwapUsagePeak]  = aProcMemCnts.PeakPagefileUsage;
   }
- 
+
 #elif (defined(__linux__) || defined(__linux))
   // use procfs on Linux
   char aBuff[4096];
diff --git a/src/OSD/OSD_Path.cxx b/src/OSD/OSD_Path.cxx
index 61f3dfa..a72f49f 100644
--- a/src/OSD/OSD_Path.cxx
+++ b/src/OSD/OSD_Path.cxx
@@ -1041,10 +1041,10 @@ OSD_Path ::  OSD_Path (
  static char __ext [ _MAX_EXT ];
 
  memset(__drive, 0,_MAX_DRIVE);
- memset(__dir, 0,_MAX_DRIVE);
- memset(__trek, 0,_MAX_DRIVE);
- memset(__fname, 0,_MAX_DRIVE);
- memset(__ext, 0,_MAX_DRIVE);
+ memset(__dir, 0,_MAX_DIR);
+ memset(__trek, 0,_MAX_DIR);
+ memset(__fname, 0,_MAX_FNAME);
+ memset(__ext, 0,_MAX_EXT);
  Standard_Character      chr;
 
  TEST_RAISE(  aSysType, TEXT( "OSD_Path" )  );
diff --git a/src/OSD/OSD_Real2String.cxx b/src/OSD/OSD_Real2String.cxx
index e1c85bc..0b9baba 100644
--- a/src/OSD/OSD_Real2String.cxx
+++ b/src/OSD/OSD_Real2String.cxx
@@ -100,10 +100,10 @@ Standard_Boolean OSD_Real2String::CStringToReal(const Standard_CString theString
 
 
   const char *str = theString;
+  char buff[1024];
   if (myReadDecimalPoint) {
       if (myReadDecimalPoint != myLocalDecimalPoint) {
-	  const char * p;
-          char buff[1024]; 
+	  const char * p; 
 	  // replace the decimal point by the local one
           if(myReadDecimalPoint != myLocalDecimalPoint && 
              ((p = strchr(theString,myReadDecimalPoint)) != NULL) && ((p-theString) < 1000) )
diff --git a/src/OSD/OSD_SystemFont.cdl b/src/OSD/OSD_SystemFont.cdl
deleted file mode 100644
index 704488f..0000000
--- a/src/OSD/OSD_SystemFont.cdl
+++ /dev/null
@@ -1,82 +0,0 @@
--- Created on: 2008-01-20
--- Created by: Alexander A. BORODIN
--- Copyright (c) 2008-2012 OPEN CASCADE SAS
---
--- The content of this file is subject to the Open CASCADE Technology Public
--- License Version 6.5 (the "License"). You may not use the content of this file
--- except in compliance with the License. Please obtain a copy of the License
--- at http://www.opencascade.org and read it completely before using this file.
---
--- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
--- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
---
--- The Original Code and all software distributed under the License is
--- distributed on an "AS IS" basis, without warranty of any kind, and the
--- Initial Developer hereby disclaims all such warranties, including without
--- limitation, any warranties of merchantability, fitness for a particular
--- purpose or non-infringement. Please see the License for the specific terms
--- and conditions governing the rights and limitations under the License.
-
-
--- Updated:       
-
-
-class SystemFont from OSD inherits TShared from MMgt
-
- ---Purpose: Structure for store of Font System Information
-
-uses FontAspect,
-     HAsciiString from TCollection
-     
-
-is
- Create returns SystemFont;
-    ---Purpose: Creates empty font object
-    ---Level: Public
-
- Create (
-         FontName : HAsciiString;
-         Aspect   : FontAspect;
-         FilePath : HAsciiString )  returns SystemFont;
-    ---Purpose: Creates Font object initialized with <FontName> as name
-    ---         <FontAspect>.... TODO
-    ---Level: Public
-
- Create (
-         XLFD     : HAsciiString;
-         FilePath : HAsciiString ) returns SystemFont;
-    ---Purpose: TODO
-    ---Level: Public
- 
- FontName (me)
-        returns HAsciiString;
-    --- Purpose: Returns font family name
-    ---Level: Public    
-        
- FontPath (me)
-        returns HAsciiString;
-    --- Purpose: Returns font file path
-    --- Level: Public
-
- FontAspect (me)
-        returns FontAspect from OSD;
-    --- Purpose: Returns font aspect
-    --- Level: Public
-    
- FontHeight (me)
-        returns Integer from Standard;
-    --- Purpose: Returns font height
-    --- If returned value is equal -1 it means that font is resizable
-    --- Level: Public
-
- IsValid( me )
-        returns Boolean;
-
- fields
-  MyFontName:           HAsciiString;  --Font family name
-  MyFontAspect:         FontAspect;    
-  MyFaceSize:           Integer;       --height of font
-  MyFilePath:           HAsciiString;  --absolute path to font file
-  MyVerification:       Boolean;       --indicator of font initialization errors. False if initialization is failed.
-
-end SystemFont;
diff --git a/src/OSD/OSD_SystemFont.cxx b/src/OSD/OSD_SystemFont.cxx
deleted file mode 100644
index ef5f7ed..0000000
--- a/src/OSD/OSD_SystemFont.cxx
+++ /dev/null
@@ -1,123 +0,0 @@
-// Created on: 2008-01-20
-// Created by: Alexander A. BORODIN
-// Copyright (c) 2008-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-
-// Updated:
-
-#include <OSD_SystemFont.ixx>
-#include <OSD_Path.hxx>
-#include <TCollection_HAsciiString.hxx>
-
-#include <stdio.h>
-
-OSD_SystemFont::OSD_SystemFont():
-MyFontName(),
-MyFontAspect(OSD_FA_Undefined),
-MyFaceSize(-1),
-MyVerification(Standard_False)
-{
-}
-
-OSD_SystemFont::OSD_SystemFont( const Handle(TCollection_HAsciiString)& FontName,
-                                const OSD_FontAspect FontAspect,
-                                const Handle(TCollection_HAsciiString)& FilePath ):
-MyFontName(FontName),
-MyFontAspect(FontAspect),
-MyFaceSize(-1),
-MyFilePath(FilePath),
-MyVerification(Standard_True)
-{
-
-}
-
-OSD_SystemFont::OSD_SystemFont( const Handle(TCollection_HAsciiString)& XLFD,
-                                const Handle(TCollection_HAsciiString)& FilePath) :
-MyFontAspect(OSD_FA_Undefined),
-MyFilePath(FilePath)
-{
-  MyVerification = Standard_True;
-  if ( XLFD.IsNull() )
-  {
-    MyVerification=Standard_False;
-    printf("NULL XLFD handler \n");
-  }
-  if ( XLFD->IsEmpty() )
-  {
-    MyVerification=Standard_False;
-    printf("EMPTY XLFD handler \n");
-  }
-
-  if(MyVerification)
-  {
-    MyFontName = XLFD->Token( "-", 2 );
-    TCollection_AsciiString str( XLFD->ToCString() );
-
-    if ( str.Search( "-0-0-0-0-" ) >=0 )
-      MyFaceSize = -1;
-    else
-      //TODO catch exeption
-      MyFaceSize = Standard_Integer (str.Token( "-", 7 ).RealValue());
-
-    //detect aspect
-    if ( str.Token("-", 3).IsEqual( "bold" ) )
-      MyFontAspect = OSD_FA_Bold;
-    else if ( str.Token("-", 3).IsEqual( "medium" ) ||
-      str.Token("-", 3).IsEqual( "normal" ) )
-      MyFontAspect = OSD_FA_Regular;
-
-    if ( MyFontAspect != OSD_FA_Undefined && 
-      ( str.Token("-",4 ).IsEqual( "i" ) || str.Token("-",4 ).IsEqual( "o" ) ) ) 
-    {
-      if ( MyFontAspect == OSD_FA_Bold )
-        MyFontAspect = OSD_FA_BoldItalic;
-      else
-        MyFontAspect = OSD_FA_Italic;
-    }
-  }
-}
-
-Standard_Boolean OSD_SystemFont::IsValid() const{
-  if ( !MyVerification)
-    return Standard_False;
-
-  if ( MyFontAspect == OSD_FA_Undefined )
-    return Standard_False;
-
-  if ( MyFontName->IsEmpty() || !MyFontName->IsAscii() )
-    return Standard_False;
-
-  OSD_Path path;  
-  return path.IsValid( MyFilePath->String() );
-}
-
-Handle(TCollection_HAsciiString) OSD_SystemFont::FontPath() const{
-  return MyFilePath;
-}
-
-Handle(TCollection_HAsciiString) OSD_SystemFont::FontName() const{
-  return MyFontName;
-}
-
-OSD_FontAspect OSD_SystemFont::FontAspect() const{
-  return MyFontAspect;
-}
-
-Standard_Integer OSD_SystemFont::FontHeight() const {
-  return MyFaceSize;
-}
diff --git a/src/OpenGl/FILES b/src/OpenGl/FILES
index 96ed44c..57cc492 100644
--- a/src/OpenGl/FILES
+++ b/src/OpenGl/FILES
@@ -67,7 +67,6 @@ OpenGl_Matrix.cxx
 OpenGl_CView.hxx
 OpenGl_NamedStatus.hxx
 OpenGl_TextParam.hxx
-OpenGl_Callback.hxx
 OpenGl_PrinterContext.hxx
 OpenGl_PrinterContext.cxx
 Handle_OpenGl_Display.hxx
@@ -93,12 +92,8 @@ OpenGl_ImageBox.cxx
 OpenGl_ImageBox.hxx
 OpenGl_Resource.hxx
 OpenGl_Resource.cxx
-OpenGl_ResourceVBO.hxx
-OpenGl_ResourceVBO.cxx
 OpenGl_ResourceTexture.hxx
 OpenGl_ResourceTexture.cxx
-OpenGl_ResourceCleaner.hxx
-OpenGl_ResourceCleaner.cxx
 OpenGl_telem_util.hxx
 OpenGl_telem_util.cxx
 OpenGl_transform_persistence.hxx
@@ -108,8 +103,11 @@ OpenGl_tgl_funcs.hxx
 Handle_OpenGl_Context.hxx
 OpenGl_Context.hxx
 OpenGl_Context.cxx
+OpenGl_ArbIns.hxx
+OpenGl_ArbTBO.hxx
 OpenGl_ArbVBO.hxx
 OpenGl_ExtFBO.hxx
+OpenGl_ExtGS.hxx
 glext.h
 OpenGl_GlCore11.hxx
 OpenGl_GlCore12.hxx
@@ -119,3 +117,10 @@ OpenGl_GlCore15.hxx
 OpenGl_GlCore20.hxx
 OpenGl_LayerList.cxx
 OpenGl_LayerList.hxx
+OpenGl_IndexBuffer.hxx
+OpenGl_IndexBuffer.cxx
+OpenGl_TextureBufferArb.hxx
+OpenGl_TextureBufferArb.cxx
+OpenGl_VertexBuffer.hxx
+OpenGl_VertexBuffer.cxx
+OpenGl_VertexBufferEditor.hxx
diff --git a/src/OpenGl/OpenGl_AVIWriter.cxx b/src/OpenGl/OpenGl_AVIWriter.cxx
index cc15d6a..d7cb090 100644
--- a/src/OpenGl/OpenGl_AVIWriter.cxx
+++ b/src/OpenGl/OpenGl_AVIWriter.cxx
@@ -17,15 +17,12 @@
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
-
 #include <OpenGl_AVIWriter.hxx>
 
-#ifdef WNT
-
-#ifdef _MSC_VER
-// The AVI writer requires Video For Windows library 
-#pragma comment(lib,"Vfw32.lib")
-#endif
+#if (defined(_WIN32) || defined(__WIN32__)) && defined(HAVE_VIDEOCAPTURE)
+  #ifdef _MSC_VER
+    #pragma comment (lib, "vfw32.lib")
+  #endif
 
 OpenGl_AVIWriter* OpenGl_AVIWriter::MyAVIWriterInstance = 0L;
 
@@ -485,4 +482,4 @@ Standard_Boolean OpenGl_AVIWriter_AllowWriting(void * hWin)
   return aResult;
 }
 
-#endif //WNT
+#endif
diff --git a/src/OpenGl/OpenGl_AspectFace.cxx b/src/OpenGl/OpenGl_AspectFace.cxx
index 565d1b7..0718df6 100644
--- a/src/OpenGl/OpenGl_AspectFace.cxx
+++ b/src/OpenGl/OpenGl_AspectFace.cxx
@@ -224,9 +224,12 @@ void OpenGl_AspectFace::SetContext (const CALL_DEF_CONTEXTFILLAREA &AContext)
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_AspectFace::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
+void OpenGl_AspectFace::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
 {
-  AWorkspace->SetAspectFace(this);
+  theWorkspace->SetAspectFace (this);
 }
 
-/*----------------------------------------------------------------------*/
+void OpenGl_AspectFace::Release (const Handle(OpenGl_Context)& theContext)
+{
+  //
+}
diff --git a/src/OpenGl/OpenGl_AspectLine.cxx b/src/OpenGl/OpenGl_AspectLine.cxx
index 6cdf13c..6d20572 100644
--- a/src/OpenGl/OpenGl_AspectLine.cxx
+++ b/src/OpenGl/OpenGl_AspectLine.cxx
@@ -52,9 +52,12 @@ void OpenGl_AspectLine::SetContext (const CALL_DEF_CONTEXTLINE &AContext)
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_AspectLine::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
+void OpenGl_AspectLine::Render (const Handle(OpenGl_Workspace) &theWorkspace) const
 {
-  AWorkspace->SetAspectLine(this);
+  theWorkspace->SetAspectLine (this);
 }
 
-/*----------------------------------------------------------------------*/
+void OpenGl_AspectLine::Release (const Handle(OpenGl_Context)& theContext)
+{
+  //
+}
diff --git a/src/OpenGl/OpenGl_AspectMarker.cxx b/src/OpenGl/OpenGl_AspectMarker.cxx
index a857b18..a02b397 100644
--- a/src/OpenGl/OpenGl_AspectMarker.cxx
+++ b/src/OpenGl/OpenGl_AspectMarker.cxx
@@ -44,9 +44,12 @@ void OpenGl_AspectMarker::SetContext (const CALL_DEF_CONTEXTMARKER &AContext)
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_AspectMarker::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
+void OpenGl_AspectMarker::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
 {
-  AWorkspace->SetAspectMarker(this);
+  theWorkspace->SetAspectMarker(this);
 }
 
-/*----------------------------------------------------------------------*/
+void OpenGl_AspectMarker::Release (const Handle(OpenGl_Context)& theContext)
+{
+  //
+}
diff --git a/src/OpenGl/OpenGl_AspectText.cxx b/src/OpenGl/OpenGl_AspectText.cxx
index 3929d29..7a5a021 100644
--- a/src/OpenGl/OpenGl_AspectText.cxx
+++ b/src/OpenGl/OpenGl_AspectText.cxx
@@ -27,7 +27,7 @@ static const TEL_COLOUR myDefaultColor = {{ 1.0F, 1.0F, 1.0F, 1.0F }};
 OpenGl_AspectText::OpenGl_AspectText ()
  : myZoomable(0),
    myAngle(0.0F),
-   myFontAspect(OSD_FA_Regular),
+   myFontAspect(Font_FA_Regular),
    myFont(NULL),
    //mySpace(0.3F),
    //myExpan(1.0F),
@@ -53,7 +53,7 @@ void OpenGl_AspectText::SetContext (const CALL_DEF_CONTEXTTEXT &AContext)
 {
   myZoomable = (int) AContext.TextZoomable;
   myAngle = (float) AContext.TextAngle;
-  myFontAspect = (OSD_FontAspect) AContext.TextFontAspect;
+  myFontAspect = (Font_FontAspect) AContext.TextFontAspect;
   //mySpace = (float) AContext.Space;
   //myExpan = (float) AContext.Expan;
   myColor.rgb[0] = (float) AContext.Color.r;
@@ -72,9 +72,14 @@ void OpenGl_AspectText::SetContext (const CALL_DEF_CONTEXTTEXT &AContext)
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_AspectText::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
+void OpenGl_AspectText::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
 {
-  AWorkspace->SetAspectText(this);
+  theWorkspace->SetAspectText (this);
+}
+
+void OpenGl_AspectText::Release (const Handle(OpenGl_Context)& theContext)
+{
+  //
 }
 
 /*----------------------------------------------------------------------*/
diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx
index eb99984..74747aa 100644
--- a/src/OpenGl/OpenGl_Context.cxx
+++ b/src/OpenGl/OpenGl_Context.cxx
@@ -25,7 +25,10 @@
 #include <OpenGl_Context.hxx>
 
 #include <OpenGl_ArbVBO.hxx>
+#include <OpenGl_ArbTBO.hxx>
+#include <OpenGl_ArbIns.hxx>
 #include <OpenGl_ExtFBO.hxx>
+#include <OpenGl_ExtGS.hxx>
 #include <OpenGl_GlCore20.hxx>
 
 #include <Standard_ProgramError.hxx>
@@ -56,6 +59,11 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Context, Standard_Transient)
 //! Make record shorter to retrieve function pointer using variable with same name
 #define FindProcShort(theStruct, theFunc) FindProc(#theFunc, theStruct->theFunc)
 
+namespace
+{
+  static const Handle(OpenGl_Resource) NULL_GL_RESOURCE;
+};
+
 // =======================================================================
 // function : OpenGl_Context
 // purpose  :
@@ -67,9 +75,14 @@ OpenGl_Context::OpenGl_Context()
   core15 (NULL),
   core20 (NULL),
   arbVBO (NULL),
+  arbTBO (NULL),
+  arbIns (NULL),
   extFBO (NULL),
+  extGS  (NULL),
   atiMem (Standard_False),
   nvxMem (Standard_False),
+  mySharedResources (new OpenGl_ResourcesMap()),
+  myReleaseQueue (new OpenGl_ResourcesQueue()),
   myGlLibHandle (NULL),
   myGlCore20 (NULL),
   myGlVerMajor (0),
@@ -97,9 +110,62 @@ OpenGl_Context::OpenGl_Context()
 // =======================================================================
 OpenGl_Context::~OpenGl_Context()
 {
+  // release clean up queue
+  ReleaseDelayed();
+
+  // release shared resources if any
+  if (((const Handle(Standard_Transient)& )mySharedResources)->GetRefCount() <= 1)
+  {
+    for (NCollection_DataMap<TCollection_AsciiString, Handle(OpenGl_Resource)>::Iterator anIter (*mySharedResources);
+         anIter.More(); anIter.Next())
+    {
+      anIter.Value()->Release (this);
+    }
+  }
+  mySharedResources.Nullify();
+
   delete myGlCore20;
   delete arbVBO;
   delete extFBO;
+  delete extGS;
+}
+
+// =======================================================================
+// function : Share
+// purpose  :
+// =======================================================================
+void OpenGl_Context::Share (const Handle(OpenGl_Context)& theShareCtx)
+{
+  if (!theShareCtx.IsNull())
+  {
+    mySharedResources = theShareCtx->mySharedResources;
+    myReleaseQueue    = theShareCtx->myReleaseQueue;
+  }
+}
+
+// =======================================================================
+// function : IsCurrent
+// purpose  :
+// =======================================================================
+Standard_Boolean OpenGl_Context::IsCurrent() const
+{
+#if (defined(_WIN32) || defined(__WIN32__))
+  if (myWindowDC == NULL || myGContext == NULL)
+  {
+    return Standard_False;
+  }
+  return (( (HDC )myWindowDC == wglGetCurrentDC())
+      && ((HGLRC )myGContext == wglGetCurrentContext()));
+#else
+  if (myDisplay == NULL || myWindow == 0 || myGContext == 0)
+  {
+    return Standard_False;
+  }
+
+  return (   ((Display* )myDisplay  == glXGetCurrentDisplay())
+       &&  ((GLXContext )myGContext == glXGetCurrentContext())
+       && ((GLXDrawable )myWindow   == glXGetCurrentDrawable()));
+#endif
 }
 
 // =======================================================================
@@ -109,17 +175,44 @@ OpenGl_Context::~OpenGl_Context()
 Standard_Boolean OpenGl_Context::MakeCurrent()
 {
 #if (defined(_WIN32) || defined(__WIN32__))
-  if (myWindowDC == NULL || myGContext == NULL ||
-      !wglMakeCurrent ((HDC )myWindowDC, (HGLRC )myGContext))
+  if (myWindowDC == NULL || myGContext == NULL)
   {
-    //GLenum anErrCode = glGetError();
-    //const GLubyte* anErrorString = gluErrorString (anErrCode);
-    //std::cerr << "wglMakeCurrent() failed: " << anErrCode << " " << anErrorString << "\n";
+    Standard_ProgramError_Raise_if (myIsInitialized, "OpenGl_Context::Init() should be called before!");
+    return Standard_False;
+  }
+
+  // technically it should be safe to activate already bound GL context
+  // however some drivers (Intel etc.) may FAIL doing this for unknown reason
+  if (IsCurrent())
+  {
+    return Standard_True;
+  }
+  else if (wglMakeCurrent ((HDC )myWindowDC, (HGLRC )myGContext) != TRUE)
+  {
+    // notice that glGetError() couldn't be used here!
+    wchar_t* aMsgBuff = NULL;
+    DWORD anErrorCode = GetLastError();
+    FormatMessageW (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+                    NULL, anErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (wchar_t* )&aMsgBuff, 0, NULL);
+    if (aMsgBuff != NULL)
+    {
+      std::wcerr << L"OpenGL interface: wglMakeCurrent() failed. " << aMsgBuff << L" (" << int(anErrorCode) << L")\n";
+      LocalFree (aMsgBuff);
+    }
+    else
+    {
+      std::wcerr << L"OpenGL interface: wglMakeCurrent() failed with #" << int(anErrorCode) << L" error code\n";
+    }
     return Standard_False;
   }
 #else
-  if (myDisplay == NULL || myWindow == 0 || myGContext == 0 ||
-      !glXMakeCurrent ((Display* )myDisplay, (GLXDrawable )myWindow, (GLXContext )myGContext))
+  if (myDisplay == NULL || myWindow == 0 || myGContext == 0)
+  {
+    Standard_ProgramError_Raise_if (myIsInitialized, "OpenGl_Context::Init() should be called before!");
+    return Standard_False;
+  }
+
+  if (!glXMakeCurrent ((Display* )myDisplay, (GLXDrawable )myWindow, (GLXContext )myGContext))
   {
     // if there is no current context it might be impossible to use glGetError() correctly
     //std::cerr << "glXMakeCurrent() failed!\n";
@@ -130,6 +223,26 @@ Standard_Boolean OpenGl_Context::MakeCurrent()
 }
 
 // =======================================================================
+// function : SwapBuffers
+// purpose  :
+// =======================================================================
+void OpenGl_Context::SwapBuffers()
+{
+#if (defined(_WIN32) || defined(__WIN32__))
+  if ((HDC )myWindowDC != NULL)
+  {
+    ::SwapBuffers ((HDC )myWindowDC);
+    glFlush();
+  }
+#else
+  if ((Display* )myDisplay != NULL)
+  {
+    glXSwapBuffers ((Display* )myDisplay, (GLXDrawable )myWindow);
+  }
+#endif
+}
+
+// =======================================================================
 // function : findProc
 // purpose  :
 // =======================================================================
@@ -251,7 +364,7 @@ Standard_Boolean OpenGl_Context::Init (const Aspect_Drawable         theWindow,
 #else
   myDisplay  = theDisplay;
 #endif
-  if (myGContext == NULL)
+  if (myGContext == NULL || !MakeCurrent())
   {
     return Standard_False;
   }
@@ -374,6 +487,31 @@ void OpenGl_Context::init()
     }
   }
 
+  // initialize TBO extension (ARB)
+  if (CheckExtension ("GL_ARB_texture_buffer_object"))
+  {
+    arbTBO = new OpenGl_ArbTBO();
+    memset (arbTBO, 0, sizeof(OpenGl_ArbTBO)); // nullify whole structure
+    if (!FindProcShort (arbTBO, glTexBufferARB))
+    {
+      delete arbTBO;
+      arbTBO = NULL;
+    }
+  }
+
+  // initialize hardware instancing extension (ARB)
+  if (CheckExtension ("GL_ARB_draw_instanced"))
+  {
+    arbIns = new OpenGl_ArbIns();
+    memset (arbIns, 0, sizeof(OpenGl_ArbIns)); // nullify whole structure
+    if (!FindProcShort (arbIns, glDrawArraysInstancedARB)
+     || !FindProcShort (arbIns, glDrawElementsInstancedARB))
+    {
+      delete arbIns;
+      arbIns = NULL;
+    }
+  }
+
   // initialize FBO extension (EXT)
   if (CheckExtension ("GL_EXT_framebuffer_object"))
   {
@@ -395,6 +533,18 @@ void OpenGl_Context::init()
     }
   }
 
+  // initialize GS extension (EXT)
+  if (CheckExtension ("GL_EXT_geometry_shader4"))
+  {
+    extGS = new OpenGl_ExtGS();
+    memset (extGS, 0, sizeof(OpenGl_ExtGS)); // nullify whole structure
+    if (!FindProcShort (extGS, glProgramParameteriEXT))
+    {
+      delete extGS;
+      extGS = NULL;
+    }
+  }
+
   myGlCore20 = new OpenGl_GlCore20();
   memset (myGlCore20, 0, sizeof(OpenGl_GlCore20)); // nullify whole structure
 
@@ -725,3 +875,70 @@ TCollection_AsciiString OpenGl_Context::MemoryInfo() const
   }
   return anInfo;
 }
+
+
+// =======================================================================
+// function : GetResource
+// purpose  :
+// =======================================================================
+const Handle(OpenGl_Resource)& OpenGl_Context::GetResource (const TCollection_AsciiString& theKey) const
+{
+  return mySharedResources->IsBound (theKey) ? mySharedResources->Find (theKey) : NULL_GL_RESOURCE;
+}
+
+// =======================================================================
+// function : ShareResource
+// purpose  :
+// =======================================================================
+Standard_Boolean OpenGl_Context::ShareResource (const TCollection_AsciiString& theKey,
+                                                const Handle(OpenGl_Resource)& theResource)
+{
+  if (theKey.IsEmpty() || theResource.IsNull())
+  {
+    return Standard_False;
+  }
+  return mySharedResources->Bind (theKey, theResource);
+}
+
+// =======================================================================
+// function : ReleaseResource
+// purpose  :
+// =======================================================================
+void OpenGl_Context::ReleaseResource (const TCollection_AsciiString& theKey)
+{
+  if (!mySharedResources->IsBound (theKey))
+  {
+    return;
+  }
+  const Handle(OpenGl_Resource)& aRes = mySharedResources->Find (theKey);
+  if (aRes->GetRefCount() > 1)
+  {
+    return;
+  }
+
+  aRes->Release (this);
+  mySharedResources->UnBind (theKey);
+}
+
+// =======================================================================
+// function : DelayedRelease
+// purpose  :
+// =======================================================================
+void OpenGl_Context::DelayedRelease (Handle(OpenGl_Resource)& theResource)
+{
+  myReleaseQueue->Push (theResource);
+  theResource.Nullify();
+}
+
+// =======================================================================
+// function : ReleaseDelayed
+// purpose  :
+// =======================================================================
+void OpenGl_Context::ReleaseDelayed()
+{
+  while (!myReleaseQueue->IsEmpty())
+  {
+    myReleaseQueue->Front()->Release (this);
+    myReleaseQueue->Pop();
+  }
+}
diff --git a/src/OpenGl/OpenGl_Display_1.cxx b/src/OpenGl/OpenGl_Display_1.cxx
index 00bb4f2..1a4bfd2 100644
--- a/src/OpenGl/OpenGl_Display_1.cxx
+++ b/src/OpenGl/OpenGl_Display_1.cxx
@@ -45,7 +45,7 @@ struct FontMapNode
 {
   const char *    EnumName;
   const char *    FontName;
-  OSD_FontAspect  FontAspect;
+  Font_FontAspect FontAspect;
 };
 
 static const FontMapNode myFontMap[] =
@@ -53,30 +53,30 @@ static const FontMapNode myFontMap[] =
 
 #ifdef WNT
 
-  { "Courier"                  , "Courier New"    , OSD_FA_Regular },
-  { "Times-Roman"              , "Times New Roman", OSD_FA_Regular  },
-  { "Times-Bold"               , "Times New Roman", OSD_FA_Bold },
-  { "Times-Italic"             , "Times New Roman", OSD_FA_Italic  },
-  { "Times-BoldItalic"         , "Times New Roman", OSD_FA_BoldItalic  },
-  { "ZapfChancery-MediumItalic", "Script"         , OSD_FA_Regular  },
-  { "Symbol"                   , "Symbol"         , OSD_FA_Regular  },
-  { "ZapfDingbats"             , "WingDings"      , OSD_FA_Regular  },
-  { "Rock"                     , "Arial"          , OSD_FA_Regular  },
-  { "Iris"                     , "Lucida Console" , OSD_FA_Regular  }
+  { "Courier"                  , "Courier New"    , Font_FA_Regular },
+  { "Times-Roman"              , "Times New Roman", Font_FA_Regular  },
+  { "Times-Bold"               , "Times New Roman", Font_FA_Bold },
+  { "Times-Italic"             , "Times New Roman", Font_FA_Italic  },
+  { "Times-BoldItalic"         , "Times New Roman", Font_FA_BoldItalic  },
+  { "ZapfChancery-MediumItalic", "Script"         , Font_FA_Regular  },
+  { "Symbol"                   , "Symbol"         , Font_FA_Regular  },
+  { "ZapfDingbats"             , "WingDings"      , Font_FA_Regular  },
+  { "Rock"                     , "Arial"          , Font_FA_Regular  },
+  { "Iris"                     , "Lucida Console" , Font_FA_Regular  }
 
 #else   //X11
 
-  { "Courier"                  , "Courier"      , OSD_FA_Regular },
-  { "Times-Roman"              , "Times"        , OSD_FA_Regular  },
-  { "Times-Bold"               , "Times"        , OSD_FA_Bold },
-  { "Times-Italic"             , "Times"        , OSD_FA_Italic  },
-  { "Times-BoldItalic"         , "Times"        , OSD_FA_BoldItalic  },
-  { "Arial"                    , "Helvetica"    , OSD_FA_Regular  }, 
-  { "ZapfChancery-MediumItalic", "-adobe-itc zapf chancery-medium-i-normal--*-*-*-*-*-*-iso8859-1"              , OSD_FA_Regular  },
-  { "Symbol"                   , "-adobe-symbol-medium-r-normal--*-*-*-*-*-*-adobe-fontspecific"                , OSD_FA_Regular  },
-  { "ZapfDingbats"             , "-adobe-itc zapf dingbats-medium-r-normal--*-*-*-*-*-*-adobe-fontspecific"     , OSD_FA_Regular  },
-  { "Rock"                     , "-sgi-rock-medium-r-normal--*-*-*-*-p-*-iso8859-1"                             , OSD_FA_Regular  },
-  { "Iris"                     , "--iris-medium-r-normal--*-*-*-*-m-*-iso8859-1"                                , OSD_FA_Regular  }
+  { "Courier"                  , "Courier"      , Font_FA_Regular },
+  { "Times-Roman"              , "Times"        , Font_FA_Regular  },
+  { "Times-Bold"               , "Times"        , Font_FA_Bold },
+  { "Times-Italic"             , "Times"        , Font_FA_Italic  },
+  { "Times-BoldItalic"         , "Times"        , Font_FA_BoldItalic  },
+  { "Arial"                    , "Helvetica"    , Font_FA_Regular  }, 
+  { "ZapfChancery-MediumItalic", "-adobe-itc zapf chancery-medium-i-normal--*-*-*-*-*-*-iso8859-1"              , Font_FA_Regular  },
+  { "Symbol"                   , "-adobe-symbol-medium-r-normal--*-*-*-*-*-*-adobe-fontspecific"                , Font_FA_Regular  },
+  { "ZapfDingbats"             , "-adobe-itc zapf dingbats-medium-r-normal--*-*-*-*-*-*-adobe-fontspecific"     , Font_FA_Regular  },
+  { "Rock"                     , "-sgi-rock-medium-r-normal--*-*-*-*-p-*-iso8859-1"                             , Font_FA_Regular  },
+  { "Iris"                     , "--iris-medium-r-normal--*-*-*-*-m-*-iso8859-1"                                , Font_FA_Regular  }
 #endif
 
 };
@@ -154,7 +154,7 @@ static void getGL2PSFontName (const char *src_font, char *ps_font)
 
 /*-----------------------------------------------------------------------------*/
 
-int OpenGl_Display::FindFont (const char* AFontName, const OSD_FontAspect AFontAspect,
+int OpenGl_Display::FindFont (const char* AFontName, const Font_FontAspect AFontAspect,
                              const int ABestSize, const float AXScale, const float AYScale)
 {   
   if (!AFontName)
@@ -194,7 +194,7 @@ int OpenGl_Display::FindFont (const char* AFontName, const OSD_FontAspect AFontA
   // The last resort: trying to use ANY font available in the system
   if ( myFont == -1 )
   {
-    myFont = mgr->request_font( family_name, OSD_FA_Undefined, -1 );
+    myFont = mgr->request_font( family_name, Font_FA_Undefined, -1 );
   }
 
   if ( myFont != -1 )
@@ -259,7 +259,7 @@ class MultilineTextRenderer
       myNewStr        (0),
       myStrPtr        (&theStr[0])
   {
-    const Standard_Integer  aStrLen       = wcslen(theStr); // Length of the original string
+    const Standard_Integer  aStrLen       = (Standard_Integer) wcslen(theStr); // Length of the original string
     Standard_Integer        aNextCRChar   = 0;  // Character after '\r' (Carriage Return)        '\x00\x0D'
     Standard_Integer        aHTNum        = 0;  // Number of       '\t' (Horizontal Tabulation)  '\x00\x09'
     Standard_Integer        aDumpNum      = 0;  // Number of '\a', '\b', '\v' and '\f'
diff --git a/src/OpenGl/OpenGl_FontMgr.cxx b/src/OpenGl/OpenGl_FontMgr.cxx
index c1673ce..d4824de 100644
--- a/src/OpenGl/OpenGl_FontMgr.cxx
+++ b/src/OpenGl/OpenGl_FontMgr.cxx
@@ -16,10 +16,11 @@
 // and conditions governing the rights and limitations under the License.
 
 #include <OpenGl_FontMgr.hxx>
+#include <OpenGl_GlCore11.hxx>
 
 #include <Standard_Stream.hxx>
 
-#include <FTGL/FTGLTextureFont.h>
+#include <ft2build.h>
 
 #include <GL/gl.h>
 
@@ -77,26 +78,34 @@ OpenGl_FontMgr* OpenGl_FontMgr::instance()
 
 void OpenGl_FontMgr::_initializeFontDB()
 {
-  Handle(OSD_FontMgr) fntMgr = OSD_FontMgr::GetInstance();
-  FT_Library library;
-  // FIXME: FT_Done_FreeType( library ) should be called on exit
-  int error = FT_Init_FreeType( &library );
-  if ( !fntMgr.IsNull() && !error) {
+  Handle(Font_FontMgr) fntMgr = Font_FontMgr::GetInstance();
+  if ( !fntMgr.IsNull() ) {
 
-    OSD_NListOfSystemFont fontList = fntMgr->GetAvalableFonts();
+    Font_NListOfSystemFont fontList = fntMgr->GetAvalableFonts();
     if ( fontList.Size() != 0 ) {
 
-      OSD_NListOfSystemFont::Iterator it(fontList);
+      // The library used as a tool for checking font aspect since Font_FontMgr
+      // fails to get aspect for the fonts that have name dependant
+      // on system locale.
+      FT_Library aFtLibrary;
+      FT_Error aLibError = FT_Init_FreeType(&aFtLibrary);
+      
+      Font_NListOfSystemFont::Iterator it(fontList);
       for ( ; it.More(); it.Next() ) {
         OGLFont_SysInfo* info = new OGLFont_SysInfo();
-        if ( it.Value()->FontAspect() == OSD_FA_Regular ) {
+        if ( it.Value()->FontAspect() == Font_FA_Regular ) {
+          
+          Handle(TCollection_HAsciiString) aFontPath = it.Value()->FontPath();
+            
           //this workaround for fonts with names dependent on system locale.
           //for example: "Times New Roman Fett Kursive" or "Times New Roman Gras Italiqui"
-          FT_Face ftFace;
-          error = FT_New_Face(library,
-              it.Value()->FontPath()->ToCString(), 0, &ftFace);
-          if ( !error ) {
-            if ( ftFace->style_flags == 0 ) {
+          FT_Face aFontFace;
+          FT_Error aFaceError = FT_New_Face(aFtLibrary,
+                                            aFontPath->ToCString(), 0,
+                                            &aFontFace);
+              
+          if ( aFaceError == FT_Err_Ok ) {
+            if ( aFontFace->style_flags == 0 ) {
               info->SysFont = it.Value();
             }
             else {
@@ -104,25 +113,26 @@ void OpenGl_FontMgr::_initializeFontDB()
 #ifdef TRACE
               cout << "TKOpenGl::initializeFontDB() detected new font!\n"
                 << "\tFont Previous Name: " << it.Value()->FontName()->ToCString() << endl
-                << "\tFont New Name: " << ftFace->family_name << endl
-                << "\tFont Aspect: " << ftFace->style_flags << endl;
+                << "\tFont New Name: " << aFontFace->family_name << endl
+                << "\tFont Aspect: " << aFontFace->style_flags << endl;
 #endif
-              OSD_FontAspect aspect = OSD_FA_Regular;
-              if ( ftFace->style_flags == (FT_STYLE_FLAG_ITALIC | FT_STYLE_FLAG_BOLD) )
-                aspect = OSD_FA_BoldItalic;
-              else if ( ftFace->style_flags == FT_STYLE_FLAG_ITALIC )
-                aspect = OSD_FA_Italic;
-              else if ( ftFace->style_flags == FT_STYLE_FLAG_BOLD )
-                aspect = OSD_FA_Bold;
+              Font_FontAspect aspect = Font_FA_Regular;
+              if ( aFontFace->style_flags == (FT_STYLE_FLAG_ITALIC | FT_STYLE_FLAG_BOLD) )
+                aspect = Font_FA_BoldItalic;
+              else if ( aFontFace->style_flags == FT_STYLE_FLAG_ITALIC )
+                aspect = Font_FA_Italic;
+              else if ( aFontFace->style_flags == FT_STYLE_FLAG_BOLD )
+                aspect = Font_FA_Bold;
 
 #ifdef TRACE
-              cout << "\tOSD_FontAspect: " << aspect << endl;
+              cout << "\tFont_FontAspect: " << aspect << endl;
 #endif
               Handle(TCollection_HAsciiString) aFontName =
-                new TCollection_HAsciiString( ftFace->family_name );
-              info->SysFont = new OSD_SystemFont( aFontName, aspect, it.Value()->FontPath() );
+                new TCollection_HAsciiString( aFontFace->family_name );
+              info->SysFont = new Font_SystemFont( aFontName, aspect, aFontPath );
             }
-            FT_Done_Face(ftFace);
+            
+            FT_Done_Face(aFontFace);
           }
           else
             continue;
@@ -132,6 +142,12 @@ void OpenGl_FontMgr::_initializeFontDB()
         _FontDB.Append(info);
 
       }
+      
+      // finalize library instance
+      if ( aLibError == FT_Err_Ok )
+      {
+        FT_Done_FreeType(aFtLibrary);
+      }
     }
   }
 
@@ -155,10 +171,10 @@ bool OpenGl_FontMgr::requestFontList( Graphic3d_NListOfHAsciiString& lst)
 }
 
 // Empty fontName means that ANY family name can be used.
-// fontAspect == OSD_FA_Undefined means ANY font aspect is acceptable.
+// fontAspect == Font_FA_Undefined means ANY font aspect is acceptable.
 // fontheight == -1 means ANY font height is acceptable.
 int OpenGl_FontMgr::request_font( const Handle(TCollection_HAsciiString)& fontName,
-                                 const OSD_FontAspect                    fontAspect,
+                                 const Font_FontAspect                   fontAspect,
                                  const Standard_Integer                  fontHeight )
 {
   Standard_Integer aFontHeight = fontHeight;
@@ -197,7 +213,7 @@ int OpenGl_FontMgr::request_font( const Handle(TCollection_HAsciiString)& fontNa
 #endif
 
       //check for font aspect
-      if (fontAspect != OSD_FA_Undefined && DBit.Value()->SysFont->FontAspect() != fontAspect) {
+      if (fontAspect != Font_FA_Undefined && DBit.Value()->SysFont->FontAspect() != fontAspect) {
 #ifdef TRACE
         cout << "\tAspect of candidate font: " << DBit.Value()->SysFont->FontAspect() << endl;
         cout << "\tAspects are not equal! Continue seaching...\n";
@@ -303,20 +319,20 @@ int OpenGl_FontMgr::request_font( const Handle(TCollection_HAsciiString)& fontNa
 
       switch( fontAspect ) 
       {
-      case OSD_FA_Bold:
-        cout << "OSD_FA_Bold\n";
+      case Font_FA_Bold:
+        cout << "Font_FA_Bold\n";
         break;
-      case OSD_FA_BoldItalic:
-        cout << "OSD_FA_BoldItalic\n";
+      case Font_FA_BoldItalic:
+        cout << "Font_FA_BoldItalic\n";
         break;
-      case OSD_FA_Italic:
-        cout << "OSD_FA_Italic\n";
+      case Font_FA_Italic:
+        cout << "Font_FA_Italic\n";
         break;
-      case OSD_FA_Regular:
-        cout << "OSD_FA_Regular\n";
+      case Font_FA_Regular:
+        cout << "Font_FA_Regular\n";
         break;
       default:
-        cout << "OSD_FA_Undefined\n";
+        cout << "Font_FA_Undefined\n";
         break;
       }
       cout  << "  font height: "<<aFontHeight<<"\n";
diff --git a/src/OpenGl/OpenGl_GraduatedTrihedron.cxx b/src/OpenGl/OpenGl_GraduatedTrihedron.cxx
index 6802ac9..41c52bd 100644
--- a/src/OpenGl/OpenGl_GraduatedTrihedron.cxx
+++ b/src/OpenGl/OpenGl_GraduatedTrihedron.cxx
@@ -135,7 +135,7 @@ static char getFarestCorner(float d000, float d100, float d010, float d001,
     return 8; /* d111 */
 }
 
-static void drawText(const Handle(OpenGl_Workspace) &AWorkspace, const wchar_t* text, const char* font, OSD_FontAspect style, int size, float x, float y, float z)
+static void drawText(const Handle(OpenGl_Workspace) &AWorkspace, const wchar_t* text, const char* font, Font_FontAspect style, int size, float x, float y, float z)
 {
   AWorkspace->FindFont(font, style, size);
   AWorkspace->RenderText(text, 0, x, y, z);
diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx
index 94fed43..c5d486f 100644
--- a/src/OpenGl/OpenGl_GraphicDriver.cxx
+++ b/src/OpenGl/OpenGl_GraphicDriver.cxx
@@ -29,11 +29,10 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_GraphicDriver,Graphic3d_GraphicDriver)
 
 namespace
 {
-  // Global maps - shared by whole TKOpenGl module. To be removed.
-  static NCollection_DataMap<Standard_Integer, Handle(OpenGl_View)>      TheMapOfView (1, NCollection_BaseAllocator::CommonBaseAllocator());
-  static NCollection_DataMap<Standard_Integer, Handle(OpenGl_Workspace)> TheMapOfWS   (1, NCollection_BaseAllocator::CommonBaseAllocator());
-  static NCollection_DataMap<Standard_Integer, OpenGl_Structure*>        TheMapOfStructure (1, NCollection_BaseAllocator::CommonBaseAllocator());
+  // Global switch - shared by whole TKOpenGl module. To be removed.
   static Standard_Boolean TheToUseVbo = Standard_True;
+
+  static const Handle(OpenGl_Context) TheNullGlCtx;
 };
 
 // Pour eviter de "mangler" MetaGraphicDriverFactory, le nom de la
@@ -42,16 +41,16 @@ namespace
 // classe OSD_SharedLibrary dans la methode SetGraphicDriver de la
 // classe Graphic3d_GraphicDevice
 extern "C" {
-#ifdef _MSC_VER /* disable MS VC++ warning on C-style function returning C++ object */
+#if defined(_MSC_VER) // disable MS VC++ warning on C-style function returning C++ object
   #pragma warning(push)
   #pragma warning(disable:4190)
 #endif
-  Standard_EXPORT Handle(Graphic3d_GraphicDriver) MetaGraphicDriverFactory (const Standard_CString AShrName)
+  Standard_EXPORT Handle(Graphic3d_GraphicDriver) MetaGraphicDriverFactory (const Standard_CString theShrName)
   {
-    Handle(OpenGl_GraphicDriver) aOpenDriver = new OpenGl_GraphicDriver (AShrName);
-    return aOpenDriver;
+    Handle(OpenGl_GraphicDriver) aDriver = new OpenGl_GraphicDriver (theShrName);
+    return aDriver;
   }
-#ifdef _MSC_VER
+#if defined(_MSC_VER)
   #pragma warning(pop)
 #endif
 }
@@ -61,45 +60,31 @@ extern "C" {
 // purpose  :
 // =======================================================================
 OpenGl_GraphicDriver::OpenGl_GraphicDriver (const Standard_CString theShrName)
-: Graphic3d_GraphicDriver (theShrName)
+: Graphic3d_GraphicDriver (theShrName),
+  myMapOfView      (1, NCollection_BaseAllocator::CommonBaseAllocator()),
+  myMapOfWS        (1, NCollection_BaseAllocator::CommonBaseAllocator()),
+  myMapOfStructure (1, NCollection_BaseAllocator::CommonBaseAllocator()),
+  myUserDrawCallback (NULL)
 {
   //
 }
 
 // =======================================================================
-// function : DefaultTextHeight
-// purpose  :
-// =======================================================================
-Standard_ShortReal OpenGl_GraphicDriver::DefaultTextHeight() const
-{
-  return 16.;
-}
-
-// =======================================================================
-// function : GetMapOfViews
-// purpose  :
-// =======================================================================
-NCollection_DataMap<Standard_Integer, Handle(OpenGl_View)>& OpenGl_GraphicDriver::GetMapOfViews()
-{
-  return TheMapOfView;
-}
-
-// =======================================================================
-// function : GetMapOfWorkspaces
+// function : UserDrawCallback
 // purpose  :
 // =======================================================================
-NCollection_DataMap<Standard_Integer, Handle(OpenGl_Workspace)>& OpenGl_GraphicDriver::GetMapOfWorkspaces()
+OpenGl_GraphicDriver::OpenGl_UserDrawCallback_t& OpenGl_GraphicDriver::UserDrawCallback()
 {
-  return TheMapOfWS;
+  return myUserDrawCallback;
 }
 
 // =======================================================================
-// function : GetMapOfStructures
+// function : DefaultTextHeight
 // purpose  :
 // =======================================================================
-NCollection_DataMap<Standard_Integer, OpenGl_Structure*>& OpenGl_GraphicDriver::GetMapOfStructures()
+Standard_ShortReal OpenGl_GraphicDriver::DefaultTextHeight() const
 {
-  return TheMapOfStructure;
+  return 16.;
 }
 
 // =======================================================================
@@ -108,7 +93,7 @@ NCollection_DataMap<Standard_Integer, OpenGl_Structure*>& OpenGl_GraphicDriver::
 // =======================================================================
 void OpenGl_GraphicDriver::InvalidateAllWorkspaces()
 {
-  for (NCollection_DataMap<Standard_Integer, Handle(OpenGl_Workspace)>::Iterator anIt (OpenGl_GraphicDriver::GetMapOfWorkspaces());
+  for (NCollection_DataMap<Standard_Integer, Handle(OpenGl_Workspace)>::Iterator anIt (myMapOfWS);
        anIt.More(); anIt.Next())
   {
     anIt.ChangeValue()->EraseAnimation();
@@ -134,6 +119,21 @@ void OpenGl_GraphicDriver::EnableVBO (const Standard_Boolean theToTurnOn)
 }
 
 // =======================================================================
+// function : GetSharedContext
+// purpose  :
+// =======================================================================
+const Handle(OpenGl_Context)& OpenGl_GraphicDriver::GetSharedContext() const
+{
+  if (myMapOfWS.IsEmpty())
+  {
+    return TheNullGlCtx;
+  }
+
+  NCollection_DataMap<Standard_Integer, Handle(OpenGl_Workspace)>::Iterator anIter (myMapOfWS);
+  return anIter.Value()->GetGlContext();
+}
+
+// =======================================================================
 // function : MemoryInfo
 // purpose  :
 // =======================================================================
diff --git a/src/OpenGl/OpenGl_GraphicDriver_3.cxx b/src/OpenGl/OpenGl_GraphicDriver_3.cxx
index 72e0715..04fdd15 100644
--- a/src/OpenGl/OpenGl_GraphicDriver_3.cxx
+++ b/src/OpenGl/OpenGl_GraphicDriver_3.cxx
@@ -30,7 +30,7 @@ void OpenGl_GraphicDriver::ClearGroup (const Graphic3d_CGroup& theCGroup)
   if (theCGroup.ptrGroup == NULL)
     return;
 
-  ((OpenGl_Group* )theCGroup.ptrGroup)->Clear();
+  ((OpenGl_Group* )theCGroup.ptrGroup)->Release (GetSharedContext());
   InvalidateAllWorkspaces();
 }
 
@@ -107,7 +107,7 @@ void OpenGl_GraphicDriver::RemoveGroup (const Graphic3d_CGroup& theCGroup)
   if (aStructure == NULL)
     return;
 
-  aStructure->RemoveGroup ((const OpenGl_Group* )theCGroup.ptrGroup);
+  aStructure->RemoveGroup (GetSharedContext(), (const OpenGl_Group* )theCGroup.ptrGroup);
   InvalidateAllWorkspaces();
 }
 
diff --git a/src/OpenGl/OpenGl_GraphicDriver_4.cxx b/src/OpenGl/OpenGl_GraphicDriver_4.cxx
index 9734c2a..1b849af 100644
--- a/src/OpenGl/OpenGl_GraphicDriver_4.cxx
+++ b/src/OpenGl/OpenGl_GraphicDriver_4.cxx
@@ -30,7 +30,7 @@ void OpenGl_GraphicDriver::ClearStructure (const Graphic3d_CStructure& theCStruc
   if (aStructure == NULL)
     return;
 
-  aStructure->Clear();
+  aStructure->Clear (GetSharedContext());
   InvalidateAllWorkspaces();
 }
 
@@ -100,12 +100,12 @@ void OpenGl_GraphicDriver::EraseStructure (const Graphic3d_CView&      theCView,
 
 void OpenGl_GraphicDriver::RemoveStructure (const Graphic3d_CStructure& theCStructure)
 {
-  if (!GetMapOfStructures().IsBound (theCStructure.Id))
+  if (!myMapOfStructure.IsBound (theCStructure.Id))
     return;
 
-  OpenGl_Structure* aStructure = OpenGl_GraphicDriver::GetMapOfStructures().Find (theCStructure.Id);
-  OpenGl_GraphicDriver::GetMapOfStructures().UnBind (theCStructure.Id);
-  delete aStructure;
+  OpenGl_Structure* aStructure = myMapOfStructure.Find (theCStructure.Id);
+  myMapOfStructure.UnBind (theCStructure.Id);
+  OpenGl_Element::Destroy (GetSharedContext(), aStructure);
   InvalidateAllWorkspaces();
 }
 
@@ -124,7 +124,7 @@ void OpenGl_GraphicDriver::Structure (Graphic3d_CStructure& theCStructure)
   aStructure->SetNamedStatus (aStatus);
 
   theCStructure.ptrStructure = aStructure;
-  OpenGl_GraphicDriver::GetMapOfStructures().Bind (theCStructure.Id, aStructure);
+  myMapOfStructure.Bind (theCStructure.Id, aStructure);
   InvalidateAllWorkspaces();
 }
 
@@ -136,11 +136,10 @@ void OpenGl_GraphicDriver::Structure (Graphic3d_CStructure& theCStructure)
 void OpenGl_GraphicDriver::ChangeZLayer (const Graphic3d_CStructure& theCStructure,
                                          const Standard_Integer theLayer)
 {
-  if (!GetMapOfStructures().IsBound (theCStructure.Id))
+  if (!myMapOfStructure.IsBound (theCStructure.Id))
     return;
 
-  OpenGl_Structure* aStructure =
-    OpenGl_GraphicDriver::GetMapOfStructures().Find (theCStructure.Id);
+  OpenGl_Structure* aStructure = myMapOfStructure.Find (theCStructure.Id);
 
   aStructure->SetZLayer (theLayer);
 }
@@ -156,11 +155,10 @@ void OpenGl_GraphicDriver::ChangeZLayer (const Graphic3d_CStructure& theCStructu
 {
   const OpenGl_CView *aCView = (const OpenGl_CView *)theCView.ptrView;
 
-  if (!GetMapOfStructures().IsBound (theCStructure.Id) || !aCView)
+  if (!myMapOfStructure.IsBound (theCStructure.Id) || !aCView)
     return;
 
-  OpenGl_Structure* aStructure =
-    OpenGl_GraphicDriver::GetMapOfStructures().Find (theCStructure.Id);
+  OpenGl_Structure* aStructure = myMapOfStructure.Find (theCStructure.Id);
 
   aCView->View->ChangeZLayer (aStructure, theNewLayerId);
 }
@@ -172,11 +170,10 @@ void OpenGl_GraphicDriver::ChangeZLayer (const Graphic3d_CStructure& theCStructu
 
 Standard_Integer OpenGl_GraphicDriver::GetZLayer (const Graphic3d_CStructure& theCStructure) const
 {
-  if (!GetMapOfStructures().IsBound (theCStructure.Id))
+  if (!myMapOfStructure.IsBound (theCStructure.Id))
     return -1;
 
-  OpenGl_Structure* aStructure = 
-    OpenGl_GraphicDriver::GetMapOfStructures().Find (theCStructure.Id);
+  OpenGl_Structure* aStructure = myMapOfStructure.Find (theCStructure.Id);
 
   return aStructure->GetZLayer();
 }
@@ -188,9 +185,7 @@ Standard_Integer OpenGl_GraphicDriver::GetZLayer (const Graphic3d_CStructure& th
 
 void OpenGl_GraphicDriver::UnsetZLayer (const Standard_Integer theLayerId)
 {
-  NCollection_DataMap<Standard_Integer, OpenGl_Structure*>::Iterator
-    aStructIt (GetMapOfStructures ());
-  
+  NCollection_DataMap<Standard_Integer, OpenGl_Structure*>::Iterator aStructIt (myMapOfStructure);
   for( ; aStructIt.More (); aStructIt.Next ())
   {
     OpenGl_Structure* aStruct = aStructIt.ChangeValue ();
diff --git a/src/OpenGl/OpenGl_GraphicDriver_7.cxx b/src/OpenGl/OpenGl_GraphicDriver_7.cxx
index 1b4d667..d545154 100644
--- a/src/OpenGl/OpenGl_GraphicDriver_7.cxx
+++ b/src/OpenGl/OpenGl_GraphicDriver_7.cxx
@@ -68,28 +68,33 @@ void OpenGl_GraphicDriver::Blink (const Graphic3d_CStructure &, const Standard_B
   // Do nothing
 }
 
-void OpenGl_GraphicDriver::BoundaryBox (const Graphic3d_CStructure& ACStructure, const Standard_Boolean Create)
+void OpenGl_GraphicDriver::BoundaryBox (const Graphic3d_CStructure& theCStructure,
+                                        const Standard_Boolean      toCreate)
 {
-  OpenGl_Structure *astructure = (OpenGl_Structure *)ACStructure.ptrStructure;
-  if (!astructure)
+  OpenGl_Structure* aStructure = (OpenGl_Structure* )theCStructure.ptrStructure;
+  if (aStructure == NULL)
     return;
 
-  if ( Create )
-    astructure->SetHighlightBox(ACStructure.BoundBox);
+  if (toCreate)
+    aStructure->SetHighlightBox (GetSharedContext(), theCStructure.BoundBox);
   else
-    astructure->ClearHighlightBox();
+    aStructure->ClearHighlightBox (GetSharedContext());
 }
 
-void OpenGl_GraphicDriver::HighlightColor (const Graphic3d_CStructure& ACStructure, const Standard_ShortReal R, const Standard_ShortReal G, const Standard_ShortReal B, const Standard_Boolean Create)
+void OpenGl_GraphicDriver::HighlightColor (const Graphic3d_CStructure& theCStructure,
+                                           const Standard_ShortReal R,
+                                           const Standard_ShortReal G,
+                                           const Standard_ShortReal B,
+                                           const Standard_Boolean   toCreate)
 {
-  OpenGl_Structure *astructure = (OpenGl_Structure *)ACStructure.ptrStructure;
-  if (!astructure)
+  OpenGl_Structure* aStructure = (OpenGl_Structure* )theCStructure.ptrStructure;
+  if (aStructure == NULL)
     return;
 
-  if ( Create )
-    astructure->SetHighlightColor(R,G,B);
+  if (toCreate)
+    aStructure->SetHighlightColor (GetSharedContext(), R, G, B);
   else
-    astructure->ClearHighlightColor();
+    aStructure->ClearHighlightColor (GetSharedContext());
 }
 
 void OpenGl_GraphicDriver::NameSetStructure (const Graphic3d_CStructure& ACStructure)
@@ -279,72 +284,88 @@ void OpenGl_GraphicDriver::FBOChangeViewport (const Graphic3d_CView& ,
   aFrameBuffer->ChangeViewport (theWidth, theHeight);
 }
 
-// OpenGL 1.2 stuff
-#ifndef GL_BGR
-  #define GL_BGR  0x80E0
-#endif
-#ifndef GL_BGRA
-  #define GL_BGRA 0x80E1
-#endif
-
-static inline GLenum TFormatToGLEnum (const TRawBufferDataFormat theTFormat)
-{
-  switch (theTFormat)
-  {
-    case TRGB:   return GL_RGB;
-    case TBGR:   return GL_BGR;
-    case TRGBA:  return GL_RGBA;
-    case TBGRA:  return GL_BGRA;
-    case TDepthComponent: return GL_DEPTH_COMPONENT;
-    case TRed:   return GL_RED;
-    case TGreen: return GL_GREEN;
-    case TBlue:  return GL_BLUE;
-    case TAlpha: return GL_ALPHA;
-    default:     return 0;
-  }
-}
-
-static inline GLenum TTypeToGLEnum (const TRawBufferDataType theTType)
+inline bool getDataFormat (const Image_PixMap& theData,
+                           GLenum&             thePixelFormat,
+                           GLenum&             theDataType)
 {
-  switch (theTType)
+  thePixelFormat = GL_RGB;
+  theDataType    = GL_UNSIGNED_BYTE;
+  switch (theData.Format())
   {
-    case TUByte: return GL_UNSIGNED_BYTE;
-    case TFloat: return GL_FLOAT;
-    default:     return 0;
+    case Image_PixMap::ImgGray:
+      thePixelFormat = GL_DEPTH_COMPONENT;
+      theDataType    = GL_UNSIGNED_BYTE;
+      return true;
+    case Image_PixMap::ImgRGB:
+      thePixelFormat = GL_RGB;
+      theDataType    = GL_UNSIGNED_BYTE;
+      return true;
+    case Image_PixMap::ImgBGR:
+      thePixelFormat = GL_BGR;
+      theDataType    = GL_UNSIGNED_BYTE;
+      return true;
+    case Image_PixMap::ImgRGBA:
+    case Image_PixMap::ImgRGB32:
+      thePixelFormat = GL_RGBA;
+      theDataType    = GL_UNSIGNED_BYTE;
+      return true;
+    case Image_PixMap::ImgBGRA:
+    case Image_PixMap::ImgBGR32:
+      thePixelFormat = GL_BGRA;
+      theDataType    = GL_UNSIGNED_BYTE;
+      return true;
+    case Image_PixMap::ImgGrayF:
+      thePixelFormat = GL_DEPTH_COMPONENT;
+      theDataType    = GL_FLOAT;
+      return true;
+    case Image_PixMap::ImgRGBF:
+      thePixelFormat = GL_RGB;
+      theDataType    = GL_FLOAT;
+      return true;
+    case Image_PixMap::ImgBGRF:
+      thePixelFormat = GL_BGR;
+      theDataType    = GL_FLOAT;
+      return true;
+    case Image_PixMap::ImgRGBAF:
+      thePixelFormat = GL_RGBA;
+      theDataType    = GL_FLOAT;
+      return true;
+    case Image_PixMap::ImgBGRAF:
+      thePixelFormat = GL_BGRA;
+      theDataType    = GL_FLOAT;
+      return true;
+    default:
+      return false;
   }
 }
 
-Standard_Boolean OpenGl_GraphicDriver::BufferDump (const Graphic3d_CView& ACView, Image_CRawBufferData& theBuffer)
+Standard_Boolean OpenGl_GraphicDriver::BufferDump (const Graphic3d_CView&      theCView,
+                                                   Image_PixMap&               theImage,
+                                                   const Graphic3d_BufferType& theBufferType)
 {
-  const OpenGl_CView *aCView = (const OpenGl_CView *)ACView.ptrView;
-  if (aCView)
-    return aCView->WS->BufferDump((OpenGl_FrameBuffer *)ACView.ptrFBO,theBuffer);
+  const OpenGl_CView* aCView = (const OpenGl_CView* )theCView.ptrView;
+  return (aCView != NULL) && aCView->WS->BufferDump ((OpenGl_FrameBuffer* )theCView.ptrFBO, theImage, theBufferType);
   return Standard_False;
 }
 
-Standard_Boolean OpenGl_Workspace::BufferDump (OpenGl_FrameBuffer *theFBOPtr, Image_CRawBufferData& theBuffer)
+Standard_Boolean OpenGl_Workspace::BufferDump (OpenGl_FrameBuffer*         theFBOPtr,
+                                               Image_PixMap&               theImage,
+                                               const Graphic3d_BufferType& theBufferType)
 {
-  GLenum aFormat = TFormatToGLEnum (theBuffer.format);
-  GLenum aType = TTypeToGLEnum (theBuffer.type);
-
-  // safe checks
-  if (aFormat == 0 || aType == 0 ||
-      theBuffer.widthPx == 0 || theBuffer.heightPx == 0 ||
-      theBuffer.dataPtr == NULL)
+  GLenum aFormat, aType;
+  if (theImage.IsEmpty()
+   || !getDataFormat (theImage, aFormat, aType)
+   || ((theBufferType == Graphic3d_BT_Depth) && (aFormat != GL_DEPTH_COMPONENT))
+   || !Activate())
   {
     return Standard_False;
   }
 
-  // activate OpenGL context
-  if (!Activate())
-    return Standard_False;
-
   // bind FBO if used
-  OpenGl_FrameBuffer* aFrameBuffer = theFBOPtr;
   GLint aReadBufferPrev = GL_BACK;
-  if (aFrameBuffer != NULL && aFrameBuffer->IsValid())
+  if (theFBOPtr != NULL && theFBOPtr->IsValid())
   {
-    aFrameBuffer->BindBuffer (GetGlContext());
+    theFBOPtr->BindBuffer (GetGlContext());
   }
   else
   {
@@ -356,19 +377,30 @@ Standard_Boolean OpenGl_Workspace::BufferDump (OpenGl_FrameBuffer *theFBOPtr, Im
 
   GLint anAlignBack = 1;
   glGetIntegerv (GL_PACK_ALIGNMENT, &anAlignBack);
-  if (theBuffer.rowAligmentBytes == 0)
+  GLint anExtraBytes = (GLint )theImage.RowExtraBytes();
+  GLint anAligment   = Min (GLint(theImage.MaxRowAligmentBytes()), 8); // limit to 8 bytes for OpenGL
+  glPixelStorei (GL_PACK_ALIGNMENT, anAligment);
+
+  if (anExtraBytes >= anAligment)
   {
-    theBuffer.rowAligmentBytes = 1;
+    // copy row by row
+    for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow)
+    {
+      glReadPixels (0, GLint(aRow), GLsizei (theImage.SizeX()), 1, aFormat, aType, theImage.ChangeRow (aRow));
+    }
+  }
+  else
+  {
+    // read pixels
+    glReadPixels (0, 0, GLsizei (theImage.SizeX()), GLsizei (theImage.SizeY()), aFormat, aType, theImage.ChangeData());
+    theImage.SetTopDown (false); // image bottom-up in OpenGL
   }
-  glPixelStorei (GL_PACK_ALIGNMENT, theBuffer.rowAligmentBytes);
 
-  // read pixels
-  glReadPixels (0, 0, theBuffer.widthPx, theBuffer.heightPx, aFormat, aType, (GLvoid* )theBuffer.dataPtr);
   glPixelStorei (GL_PACK_ALIGNMENT, anAlignBack);
 
-  if (aFrameBuffer != NULL && aFrameBuffer->IsValid())
+  if (theFBOPtr != NULL && theFBOPtr->IsValid())
   {
-    aFrameBuffer->UnbindBuffer (GetGlContext());
+    theFBOPtr->UnbindBuffer (GetGlContext());
   }
   else
   {
@@ -377,17 +409,30 @@ Standard_Boolean OpenGl_Workspace::BufferDump (OpenGl_FrameBuffer *theFBOPtr, Im
   return Standard_True;
 }
 
-void OpenGl_GraphicDriver::RemoveView (const Graphic3d_CView& ACView)
+void OpenGl_GraphicDriver::RemoveView (const Graphic3d_CView& theCView)
 {
-  if (GetMapOfViews().IsBound (ACView.ViewId))
-    GetMapOfViews().UnBind (ACView.ViewId);
+  Handle(OpenGl_Context) aShareCtx = GetSharedContext();
+  if (myMapOfView.IsBound (theCView.ViewId))
+    myMapOfView.UnBind (theCView.ViewId);
+
+  if (myMapOfWS.IsBound (theCView.WsId))
+    myMapOfWS.UnBind (theCView.WsId);
 
-  if (GetMapOfWorkspaces().IsBound (ACView.WsId))
-    GetMapOfWorkspaces().UnBind (ACView.WsId);
+  if (myMapOfWS.IsEmpty() && !myMapOfStructure.IsEmpty())
+  {
+    // The last view removed but some objects still present.
+    // Release GL resources now without object destruction.
+    for (NCollection_DataMap<Standard_Integer, OpenGl_Structure*>::Iterator aStructIt (myMapOfStructure);
+         aStructIt.More (); aStructIt.Next())
+    {
+      OpenGl_Structure* aStruct = aStructIt.ChangeValue();
+      aStruct->ReleaseGlResources (aShareCtx);
+    }
+  }
 
-  OpenGl_CView *aCView = (OpenGl_CView *)ACView.ptrView;
+  OpenGl_CView *aCView = (OpenGl_CView *)theCView.ptrView;
   delete aCView;
-  ((Graphic3d_CView *)&ACView)->ptrView = NULL;
+  ((Graphic3d_CView *)&theCView)->ptrView = NULL;
 }
 
 void OpenGl_GraphicDriver::SetLight (const Graphic3d_CView& ACView)
@@ -442,33 +487,34 @@ void OpenGl_GraphicDriver::Update (const Graphic3d_CView& ACView, const Aspect_C
     aCView->WS->Update(ACView,ACUnderLayer,ACOverLayer);
 }
 
-Standard_Boolean OpenGl_GraphicDriver::View (Graphic3d_CView& ACView)
+Standard_Boolean OpenGl_GraphicDriver::View (Graphic3d_CView& theCView)
 {
   if (openglDisplay.IsNull())
     return Standard_False;
 
-  if (GetMapOfViews().IsBound (ACView.ViewId))
-    GetMapOfViews().UnBind (ACView.ViewId);
+  if (myMapOfView.IsBound (theCView.ViewId))
+    myMapOfView.UnBind (theCView.ViewId);
 
-  if (GetMapOfWorkspaces().IsBound (ACView.WsId))
-    GetMapOfWorkspaces().UnBind (ACView.WsId);
+  if (myMapOfWS.IsBound (theCView.WsId))
+    myMapOfWS.UnBind (theCView.WsId);
 
-  Handle(OpenGl_Workspace) aWS = Handle(OpenGl_Workspace)::DownCast(openglDisplay->GetWindow( ACView.DefWindow.XWindow ));
-  if ( aWS.IsNull() )
+  Handle(OpenGl_Workspace) aWS = Handle(OpenGl_Workspace)::DownCast(openglDisplay->GetWindow (theCView.DefWindow.XWindow));
+  if (aWS.IsNull())
   {
-    aWS = new OpenGl_Workspace( openglDisplay, ACView.DefWindow, ACView.GContext );
-    openglDisplay->SetWindow( ACView.DefWindow.XWindow, aWS );
+    Handle(OpenGl_Context) aShareCtx = GetSharedContext();
+    aWS = new OpenGl_Workspace (openglDisplay, theCView.DefWindow, theCView.GContext, aShareCtx);
+    openglDisplay->SetWindow (theCView.DefWindow.XWindow, aWS);
   }
 
-  GetMapOfWorkspaces().Bind (ACView.WsId, aWS);
+  myMapOfWS.Bind (theCView.WsId, aWS);
 
-  Handle(OpenGl_View) aView = new OpenGl_View( ACView.Context );
-  GetMapOfViews().Bind (ACView.ViewId, aView);
+  Handle(OpenGl_View) aView = new OpenGl_View (theCView.Context);
+  myMapOfView.Bind (theCView.ViewId, aView);
 
-  OpenGl_CView *aCView = new OpenGl_CView;
+  OpenGl_CView* aCView = new OpenGl_CView();
   aCView->View = aView;
   aCView->WS = aWS;
-  ACView.ptrView = aCView;
+  theCView.ptrView = aCView;
 
   return Standard_True;
 }
diff --git a/src/OpenGl/OpenGl_GraphicDriver_713.cxx b/src/OpenGl/OpenGl_GraphicDriver_713.cxx
index 13c0384..b31fb20 100644
--- a/src/OpenGl/OpenGl_GraphicDriver_713.cxx
+++ b/src/OpenGl/OpenGl_GraphicDriver_713.cxx
@@ -20,7 +20,6 @@
 
 #include <OpenGl_GraphicDriver.hxx>
 
-#include <OpenGl_Callback.hxx>
 #include <OpenGl_Group.hxx>
 #include <OpenGl_PrimitiveArray.hxx>
 
@@ -87,30 +86,25 @@ void OpenGl_GraphicDriver::PrimitiveArray( const Graphic3d_CGroup& ACGroup,
 //           Graphic3d_Group only.
 //=======================================================================
 
-void OpenGl_GraphicDriver::RemovePrimitiveArray (const Graphic3d_CGroup&         ACGroup,
-                                                const Graphic3d_PrimitiveArray& thePArray)
+void OpenGl_GraphicDriver::RemovePrimitiveArray (const Graphic3d_CGroup&         theCGroup,
+                                                 const Graphic3d_PrimitiveArray& thePArray)
 {
-  if ( ACGroup.ptrGroup && thePArray )
+  if (theCGroup.ptrGroup && thePArray)
   {
-    ((OpenGl_Group *)ACGroup.ptrGroup)->RemovePrimitiveArray( (CALL_DEF_PARRAY *) thePArray );
+    ((OpenGl_Group* )theCGroup.ptrGroup)->RemovePrimitiveArray (GetSharedContext(), thePArray);
   }
 }
 
-static OpenGl_UserDrawCallback MyUserDrawCallback = NULL;
-
-OpenGl_UserDrawCallback& UserDrawCallback ()
+void OpenGl_GraphicDriver::UserDraw (const Graphic3d_CGroup&    theCGroup,
+                                     const Graphic3d_CUserDraw& theUserDraw)
 {
-  return MyUserDrawCallback;
-}
-
-void OpenGl_GraphicDriver::UserDraw ( const Graphic3d_CGroup& ACGroup,
-                                     const Graphic3d_CUserDraw& AUserDraw )
-{
-  if (ACGroup.ptrGroup && MyUserDrawCallback)
+  if (theCGroup.ptrGroup != NULL
+   && myUserDrawCallback != NULL)
   {
-    OpenGl_Element *auserdraw = (*MyUserDrawCallback)(&AUserDraw);
-
-    if (auserdraw != 0)
-      ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelUserdraw, auserdraw );
+    OpenGl_Element* aUserDraw = myUserDrawCallback(&theUserDraw);
+    if (aUserDraw != NULL)
+    {
+      ((OpenGl_Group* )theCGroup.ptrGroup)->AddElement (TelUserdraw, aUserDraw);
+    }
   }
 }
diff --git a/src/OpenGl/OpenGl_GraphicDriver_9.cxx b/src/OpenGl/OpenGl_GraphicDriver_9.cxx
index 7f2ac5c..b6e4e20 100644
--- a/src/OpenGl/OpenGl_GraphicDriver_9.cxx
+++ b/src/OpenGl/OpenGl_GraphicDriver_9.cxx
@@ -230,7 +230,7 @@ Standard_Integer OpenGl_GraphicDriver::CreateTexture (const Graphic3d_TypeOfText
 
 void OpenGl_GraphicDriver::DestroyTexture (const Standard_Integer theTexId) const
 {
-  FreeTexture (theTexId);
+  FreeTexture (GetSharedContext(), theTexId);
 }
 
 void OpenGl_GraphicDriver::ModifyTexture (const Standard_Integer        theTexId,
diff --git a/src/OpenGl/OpenGl_GraphicDriver_Export.cxx b/src/OpenGl/OpenGl_GraphicDriver_Export.cxx
index 05adb5b..7fa2ec3 100644
--- a/src/OpenGl/OpenGl_GraphicDriver_Export.cxx
+++ b/src/OpenGl/OpenGl_GraphicDriver_Export.cxx
@@ -20,6 +20,8 @@
 /************************************************************************/
 
 #include <OpenGl_GraphicDriver.hxx>
+#include <OpenGl_Context.hxx>
+#include <OpenGl_CView.hxx>
 #include <OSD_Localizer.hxx>
 
 #ifdef HAVE_CONFIG_H
@@ -49,6 +51,14 @@ Standard_Boolean OpenGl_GraphicDriver::Export (const Standard_CString theFileNam
                                                const Standard_Address /*theProgressObject*/)
 {
 #ifdef HAVE_GL2PS
+  // gl2psBeginPage() will call OpenGL functions
+  // so we should activate correct GL context before redraw scene call
+  const OpenGl_CView* aCView = (const OpenGl_CView* )theView.ptrView;
+  if (aCView == NULL || !aCView->WS->GetGlContext()->MakeCurrent())
+  {
+    return Standard_False;
+  }
+
   Standard_Integer aFormat = -1;
   Standard_Integer aSortType = Graphic3d_ST_BSP_Tree;
   switch (theFormat)
diff --git a/src/OpenGl/OpenGl_GraphicDriver_Layer.cxx b/src/OpenGl/OpenGl_GraphicDriver_Layer.cxx
index f251bfa..d734c5f 100644
--- a/src/OpenGl/OpenGl_GraphicDriver_Layer.cxx
+++ b/src/OpenGl/OpenGl_GraphicDriver_Layer.cxx
@@ -22,7 +22,7 @@
 
 #include <OpenGl_GraphicDriver.hxx>
 
-#include <OSD_FontAspect.hxx>
+#include <Font_FontAspect.hxx>
 
 #include <OpenGl_Display.hxx>
 #include <OpenGl_AspectText.hxx>
@@ -64,7 +64,7 @@ static const CALL_DEF_CONTEXTTEXT myDefaultContextText =
   { 1.F, 1.F, 1.F }, //ColorSubTitle
   0, //TextZoomable
   0.F, //TextAngle
-  (int)OSD_FA_Regular //TextFontAspect
+  (int)Font_FA_Regular //TextFontAspect
 };
 
 static Standard_Boolean TheLayerIsOpen = Standard_False;
@@ -127,9 +127,6 @@ void OpenGl_GraphicDriver::BeginLayer (const Aspect_CLayer2d& ACLayer)
   InitLayerProp(ptrLayer->listIndex);
   if (!TheLayerProp.ListId) return;
 
-  glEnable(GL_TEXTURE_2D);
-  //GLboolean stat = glIsEnabled( GL_TEXTURE_2D );
-
   glNewList (TheLayerProp.ListId, GL_COMPILE);
   TheLayerIsOpen = Standard_True;
 }
diff --git a/src/OpenGl/OpenGl_Group.cxx b/src/OpenGl/OpenGl_Group.cxx
index a69dc98..51a5919 100644
--- a/src/OpenGl/OpenGl_Group.cxx
+++ b/src/OpenGl/OpenGl_Group.cxx
@@ -36,7 +36,7 @@ OpenGl_Group::OpenGl_Group ()
 
 OpenGl_Group::~OpenGl_Group()
 {
-  Clear();
+  Release (Handle(OpenGl_Context)());
 }
 
 /*----------------------------------------------------------------------*/
@@ -130,63 +130,25 @@ void OpenGl_Group::AddElement (const TelType AType, OpenGl_Element *AElem )
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_Group::Clear ()
-{
-  if (myAspectLine)
-  {
-    // Delete line context
-    delete myAspectLine;
-    myAspectLine = NULL;
-  }
-  if (myAspectFace)
-  {
-    // Delete face context
-    delete myAspectFace;
-    myAspectFace = NULL;
-  }
-  if (myAspectMarker)
-  {
-    // Delete marker context
-    delete myAspectMarker;
-    myAspectMarker = NULL;
-  }
-  if (myAspectText)
-  {
-    // Delete text context
-    delete myAspectText;
-    myAspectText = NULL;
-  }
-  // Delete elements
-  while (myFirst)
-  {
-    OpenGl_ElementNode *next = myFirst->next;
-    delete myFirst->elem;
-    delete myFirst;
-    myFirst = next;
-  }
-  myLast = NULL;
-}
-
-/*----------------------------------------------------------------------*/
-
-void OpenGl_Group::RemovePrimitiveArray (CALL_DEF_PARRAY *APArray)
+void OpenGl_Group::RemovePrimitiveArray (const Handle(OpenGl_Context)& theGlCtx,
+                                         CALL_DEF_PARRAY*              thePArray)
 {
   OpenGl_ElementNode *prevnode = NULL, *node = myFirst;
-  while (node)
+  while (node != NULL)
   {
     if (node->type == TelParray)
     {
-      CALL_DEF_PARRAY *aCurPArray = ((const OpenGl_PrimitiveArray *)node->elem)->PArray();
+      CALL_DEF_PARRAY* aCurPArray = ((const OpenGl_PrimitiveArray* )node->elem)->PArray();
 
       // validate for correct pointer
-      if (aCurPArray->num_bounds  == APArray->num_bounds  && 
-          aCurPArray->num_edges   == APArray->num_edges   &&
-          aCurPArray->num_vertexs == APArray->num_vertexs &&
-          aCurPArray->type        == APArray->type)
+      if (aCurPArray->num_bounds  == thePArray->num_bounds  && 
+          aCurPArray->num_edges   == thePArray->num_edges   &&
+          aCurPArray->num_vertexs == thePArray->num_vertexs &&
+          aCurPArray->type        == thePArray->type)
       {
-        (prevnode? prevnode->next : myFirst) = node->next;
+        (prevnode ? prevnode->next : myFirst) = node->next;
         if (!myFirst) myLast = NULL;
-        delete node->elem;
+        OpenGl_Element::Destroy (theGlCtx, node->elem);
         delete node;
         break;
       }
@@ -294,4 +256,20 @@ void OpenGl_Group::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
   AWorkspace->SetAspectText(aspect_text);
 }
 
-/*----------------------------------------------------------------------*/
+void OpenGl_Group::Release (const Handle(OpenGl_Context)& theGlCtx)
+{
+  // Delete elements
+  while (myFirst != NULL)
+  {
+    OpenGl_ElementNode* aNext = myFirst->next;
+    OpenGl_Element::Destroy (theGlCtx, myFirst->elem);
+    delete myFirst;
+    myFirst = aNext;
+  }
+  myLast = NULL;
+
+  OpenGl_Element::Destroy (theGlCtx, myAspectLine);
+  OpenGl_Element::Destroy (theGlCtx, myAspectFace);
+  OpenGl_Element::Destroy (theGlCtx, myAspectMarker);
+  OpenGl_Element::Destroy (theGlCtx, myAspectText);
+}
diff --git a/src/OpenGl/OpenGl_IndexBuffer.cxx b/src/OpenGl/OpenGl_IndexBuffer.cxx
new file mode 100644
index 0000000..a2816aa
--- /dev/null
+++ b/src/OpenGl/OpenGl_IndexBuffer.cxx
@@ -0,0 +1,41 @@
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#include <OpenGl_IndexBuffer.hxx>
+
+#include <OpenGl_Context.hxx>
+#include <Standard_Assert.hxx>
+
+IMPLEMENT_STANDARD_HANDLE (OpenGl_IndexBuffer, OpenGl_VertexBuffer)
+IMPLEMENT_STANDARD_RTTIEXT(OpenGl_IndexBuffer, OpenGl_VertexBuffer)
+
+// =======================================================================
+// function : OpenGl_IndexBuffer
+// purpose  :
+// =======================================================================
+OpenGl_IndexBuffer::OpenGl_IndexBuffer()
+: OpenGl_VertexBuffer() {}
+
+// =======================================================================
+// function : GetTarget
+// purpose  :
+// =======================================================================
+GLenum OpenGl_IndexBuffer::GetTarget() const
+{
+  return GL_ELEMENT_ARRAY_BUFFER;
+}
diff --git a/src/OpenGl/OpenGl_Marker.cxx b/src/OpenGl/OpenGl_Marker.cxx
index 741d235..2462265 100644
--- a/src/OpenGl/OpenGl_Marker.cxx
+++ b/src/OpenGl/OpenGl_Marker.cxx
@@ -29,6 +29,11 @@
 
 /*----------------------------------------------------------------------*/
 
+void OpenGl_Marker::Release (const Handle(OpenGl_Context)& theContext)
+{
+  //
+}
+
 void OpenGl_Marker::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
 {
   const OpenGl_AspectMarker *aspect_marker = AWorkspace->AspectMarker( Standard_True );
@@ -47,7 +52,6 @@ void OpenGl_Marker::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
     }
     case Aspect_TOM_POINT :
     {
-      glPointSize( aspect_marker->Scale() );
       glBegin( GL_POINTS );
       glVertex3fv( myPoint.xyz );
       glEnd();
diff --git a/src/OpenGl/OpenGl_MarkerSet.cxx b/src/OpenGl/OpenGl_MarkerSet.cxx
index b09bffe..09231f5 100644
--- a/src/OpenGl/OpenGl_MarkerSet.cxx
+++ b/src/OpenGl/OpenGl_MarkerSet.cxx
@@ -70,7 +70,6 @@ void OpenGl_MarkerSet::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
     }
     case Aspect_TOM_POINT :
     {
-      glPointSize( aspect_marker->Scale() );
       glBegin( GL_POINTS );
       for( i = 0, ptr = myPoints; i < myNbPoints; i++, ptr++ )
         glVertex3fv( ptr->xyz );
@@ -140,4 +139,7 @@ void OpenGl_MarkerSet::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
   }
 }
 
-/*----------------------------------------------------------------------*/
+void OpenGl_MarkerSet::Release (const Handle(OpenGl_Context)& theContext)
+{
+  //
+}
diff --git a/src/OpenGl/OpenGl_Polygon.cxx b/src/OpenGl/OpenGl_Polygon.cxx
index b017163..70e2fdd 100644
--- a/src/OpenGl/OpenGl_Polygon.cxx
+++ b/src/OpenGl/OpenGl_Polygon.cxx
@@ -624,4 +624,7 @@ void OpenGl_Polygon::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
   glPopAttrib(); /* skt: GL_ENABLE_BIT*/
 }
 
-/*----------------------------------------------------------------------*/
+void OpenGl_Polygon::Release (const Handle(OpenGl_Context)& theContext)
+{
+  //
+}
diff --git a/src/OpenGl/OpenGl_Polyline.cxx b/src/OpenGl/OpenGl_Polyline.cxx
index ef27a8b..05dd82a 100644
--- a/src/OpenGl/OpenGl_Polyline.cxx
+++ b/src/OpenGl/OpenGl_Polyline.cxx
@@ -42,6 +42,11 @@ OpenGl_Polyline::~OpenGl_Polyline()
   delete[] myVertices;
 }
 
+void OpenGl_Polyline::Release (const Handle(OpenGl_Context)& theContext)
+{
+  //
+}
+
 /*----------------------------------------------------------------------*/
 
 void OpenGl_Polyline::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
diff --git a/src/OpenGl/OpenGl_PrimitiveArray.cxx b/src/OpenGl/OpenGl_PrimitiveArray.cxx
index 1461326..b29d51e 100644
--- a/src/OpenGl/OpenGl_PrimitiveArray.cxx
+++ b/src/OpenGl/OpenGl_PrimitiveArray.cxx
@@ -17,28 +17,18 @@
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
-
-#include <OpenGl_ArbVBO.hxx>
+#include <OpenGl_IndexBuffer.hxx>
 #include <OpenGl_Context.hxx>
 
 #include <OpenGl_PrimitiveArray.hxx>
 
 #include <OpenGl_AspectFace.hxx>
 #include <OpenGl_GraphicDriver.hxx>
-#include <OpenGl_ResourceCleaner.hxx>
-#include <OpenGl_ResourceVBO.hxx>
 #include <OpenGl_Structure.hxx>
 #include <OpenGl_TextureBox.hxx>
 
 #include <InterfaceGraphic_PrimitiveArray.hxx>
 
-enum
-{
-  VBO_NOT_INITIALIZED = -1,
-  VBO_ERROR           =  0,
-  VBO_OK              =  1
-};
-
 namespace
 {
   static unsigned long vRand = 1L;
@@ -51,219 +41,98 @@ namespace
 // =======================================================================
 void OpenGl_PrimitiveArray::clearMemoryOwn() const
 {
-  if (myPArray->bufferVBO[VBOEdges] != 0)
-  {
-    Standard::Free ((Standard_Address& )myPArray->edges);
-    myPArray->edges = NULL;
-  }
-  if (myPArray->bufferVBO[VBOVertices] != 0)
-  {
-    Standard::Free ((Standard_Address& )myPArray->vertices);
-    myPArray->vertices = NULL;
-  }
-  if (myPArray->bufferVBO[VBOVcolours] != 0)
-  {
-    Standard::Free ((Standard_Address& )myPArray->vcolours);
-    myPArray->vcolours = NULL;
-  }
-  if (myPArray->bufferVBO[VBOVnormals] != 0)
-  {
-    Standard::Free ((Standard_Address& )myPArray->vnormals);
-    myPArray->vnormals = NULL;
-  }
-  if (myPArray->bufferVBO[VBOVtexels] != 0)
-  {
-    Standard::Free ((Standard_Address& )myPArray->vtexels);
-    myPArray->vtexels = NULL;
-  }
-  if (myPArray->edge_vis != NULL) /// ????
-  {
-    Standard::Free ((Standard_Address& )myPArray->edge_vis);
-    myPArray->edge_vis = NULL;
-  }
+  Standard::Free ((Standard_Address& )myPArray->edges);
+  Standard::Free ((Standard_Address& )myPArray->vertices);
+  Standard::Free ((Standard_Address& )myPArray->vcolours);
+  Standard::Free ((Standard_Address& )myPArray->vnormals);
+  Standard::Free ((Standard_Address& )myPArray->vtexels);
+  Standard::Free ((Standard_Address& )myPArray->edge_vis); /// ???
+
+  myPArray->edges    = NULL;
+  myPArray->vertices = NULL;
+  myPArray->vcolours = NULL;
+  myPArray->vnormals = NULL;
+  myPArray->vtexels  = NULL;
+  myPArray->edge_vis = NULL;
 }
 
 // =======================================================================
 // function : clearMemoryGL
 // purpose  :
 // =======================================================================
-void OpenGl_PrimitiveArray::clearMemoryGL (const Handle(OpenGl_Context)& theGlContext) const
+void OpenGl_PrimitiveArray::clearMemoryGL (const Handle(OpenGl_Context)& theGlCtx) const
 {
-  if (myPArray->bufferVBO[VBOEdges] != 0)
-  {
-    theGlContext->arbVBO->glDeleteBuffersARB (1, &myPArray->bufferVBO[VBOEdges]);
-  }
-  if (myPArray->bufferVBO[VBOVertices] != 0)
-  {
-    theGlContext->arbVBO->glDeleteBuffersARB (1, &myPArray->bufferVBO[VBOVertices]);
-  }
-  if (myPArray->bufferVBO[VBOVcolours] != 0)
-  {
-    theGlContext->arbVBO->glDeleteBuffersARB (1, &myPArray->bufferVBO[VBOVcolours]);
-  }
-  if (myPArray->bufferVBO[VBOVnormals] != 0)
+  for (Standard_Integer anIter = 0; anIter < VBOMaxType; ++anIter)
   {
-    theGlContext->arbVBO->glDeleteBuffersARB (1, &myPArray->bufferVBO[VBOVnormals]);
-  } 
-  if (myPArray->bufferVBO[VBOVtexels] != 0)
-  {
-    theGlContext->arbVBO->glDeleteBuffersARB (1, &myPArray->bufferVBO[VBOVtexels]);
+    if (!myVbos[anIter].IsNull())
+    {
+      myVbos[anIter]->Release (theGlCtx.operator->());
+      myVbos[anIter].Nullify();
+    }
   }
-  theGlContext->arbVBO->glBindBufferARB (GL_ARRAY_BUFFER_ARB, 0);
-  theGlContext->arbVBO->glBindBufferARB (GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
 }
 
 // =======================================================================
-// function : checkSizeForGraphicMemory
+// function : BuildVBO
 // purpose  :
 // =======================================================================
-Standard_Boolean OpenGl_PrimitiveArray::checkSizeForGraphicMemory (const Handle(OpenGl_Context)& theGlContext) const
+Standard_Boolean OpenGl_PrimitiveArray::BuildVBO (const Handle(OpenGl_Workspace)& theWorkspace) const
 {
-  if (glGetError() == GL_OUT_OF_MEMORY)
+  const Handle(OpenGl_Context)& aGlCtx = theWorkspace->GetGlContext();
+  if (myPArray->vertices == NULL)
   {
-    myPArray->flagBufferVBO = VBO_ERROR;
-    clearMemoryGL (theGlContext);
+    // vertices should be always defined - others are optional
+    return Standard_False;
   }
-  else
+  myVbos[VBOVertices] = new OpenGl_VertexBuffer();
+  if (!myVbos[VBOVertices]->Init (aGlCtx, 3, myPArray->num_vertexs, &myPArray->vertices[0].xyz[0]))
   {
-    myPArray->flagBufferVBO = VBO_OK;
+    clearMemoryGL (aGlCtx);
+    return Standard_False;
   }
-  return myPArray->flagBufferVBO == VBO_OK;
-}
 
-// =======================================================================
-// function : BuildVBO
-// purpose  :
-// =======================================================================
-Standard_Boolean OpenGl_PrimitiveArray::BuildVBO (const Handle(OpenGl_Workspace)& theWorkspace) const
-{
-  int size_reqd = 0;
-  const Handle(OpenGl_Context)& aGlContext = theWorkspace->GetGlContext();
   if (myPArray->edges != NULL)
   {
-    size_reqd = myPArray->num_edges * sizeof(Tint);
-    aGlContext->arbVBO->glGenBuffersARB (1, &myPArray->bufferVBO[VBOEdges]);   
-    aGlContext->arbVBO->glBindBufferARB (GL_ELEMENT_ARRAY_BUFFER_ARB, myPArray->bufferVBO[VBOEdges]);
-    aGlContext->arbVBO->glBufferDataARB (GL_ELEMENT_ARRAY_BUFFER_ARB, size_reqd, myPArray->edges, GL_STATIC_DRAW_ARB);
-    if (!checkSizeForGraphicMemory (aGlContext))
-      return Standard_False;
-  }
-
-  if (myPArray->vertices != NULL)
-  {
-    size_reqd = myPArray->num_vertexs * sizeof(TEL_POINT);
-    aGlContext->arbVBO->glGenBuffersARB (1, &myPArray->bufferVBO[VBOVertices]);
-    aGlContext->arbVBO->glBindBufferARB (GL_ARRAY_BUFFER_ARB, myPArray->bufferVBO[VBOVertices]);
-    aGlContext->arbVBO->glBufferDataARB (GL_ARRAY_BUFFER_ARB, size_reqd, myPArray->vertices, GL_STATIC_DRAW_ARB);
-    if (!checkSizeForGraphicMemory (aGlContext))
+    myVbos[VBOEdges] = new OpenGl_IndexBuffer();
+    if (!myVbos[VBOEdges]->Init (aGlCtx, 1, myPArray->num_edges, (GLuint* )myPArray->edges))
+    {
+      clearMemoryGL (aGlCtx);
       return Standard_False;
+    }
   }
-
   if (myPArray->vcolours != NULL)
   {
-    size_reqd = myPArray->num_vertexs * sizeof(Tint);
-    aGlContext->arbVBO->glGenBuffersARB (1, &myPArray->bufferVBO[VBOVcolours]);
-    aGlContext->arbVBO->glBindBufferARB (GL_ARRAY_BUFFER_ARB, myPArray->bufferVBO[VBOVcolours]); 
-    aGlContext->arbVBO->glBufferDataARB (GL_ARRAY_BUFFER_ARB, size_reqd, myPArray->vcolours, GL_STATIC_DRAW_ARB);
-    if (!checkSizeForGraphicMemory (aGlContext))
+    myVbos[VBOVcolours] = new OpenGl_VertexBuffer();
+    if (!myVbos[VBOVcolours]->Init (aGlCtx, 4, myPArray->num_vertexs, (GLubyte* )myPArray->vcolours))
+    {
+      clearMemoryGL (aGlCtx);
       return Standard_False;
+    }
   }
-
   if (myPArray->vnormals != NULL)
   {
-    size_reqd = myPArray->num_vertexs * sizeof(TEL_POINT);
-    aGlContext->arbVBO->glGenBuffersARB (1, &myPArray->bufferVBO[VBOVnormals]);
-    aGlContext->arbVBO->glBindBufferARB (GL_ARRAY_BUFFER_ARB, myPArray->bufferVBO[VBOVnormals]);
-    aGlContext->arbVBO->glBufferDataARB (GL_ARRAY_BUFFER_ARB, size_reqd, myPArray->vnormals, GL_STATIC_DRAW_ARB);
-    if (!checkSizeForGraphicMemory (aGlContext))
+    myVbos[VBOVnormals] = new OpenGl_VertexBuffer();
+    if (!myVbos[VBOVnormals]->Init (aGlCtx, 3, myPArray->num_vertexs, &myPArray->vnormals[0].xyz[0]))
+    {
+      clearMemoryGL (aGlCtx);
       return Standard_False;
+    }
   }
-
   if (myPArray->vtexels)
   {
-    size_reqd = myPArray->num_vertexs * sizeof(TEL_TEXTURE_COORD);
-    aGlContext->arbVBO->glGenBuffersARB (1, &myPArray->bufferVBO[VBOVtexels]);
-    aGlContext->arbVBO->glBindBufferARB (GL_ARRAY_BUFFER_ARB, myPArray->bufferVBO[VBOVtexels]);
-    aGlContext->arbVBO->glBufferDataARB (GL_ARRAY_BUFFER_ARB, size_reqd, myPArray->vtexels, GL_STATIC_DRAW_ARB);
-    if (!checkSizeForGraphicMemory (aGlContext))
+    myVbos[VBOVtexels] = new OpenGl_VertexBuffer();
+    if (!myVbos[VBOVtexels]->Init (aGlCtx, 2, myPArray->num_vertexs, &myPArray->vtexels[0].xy[0]))
+    {
+      clearMemoryGL (aGlCtx);
       return Standard_False;
+    }
   }
 
-  if (myPArray->flagBufferVBO == VBO_OK)
-    clearMemoryOwn();
-
-  // specify context for VBO resource
-  myPArray->contextId = (Standard_Address )theWorkspace->GetGContext();
+  clearMemoryOwn();
   return Standard_True;
 }
 
 // =======================================================================
-// function : DrawArrays
-// purpose  : Auxiliary method to split Feedback/Normal rendering modes
-// =======================================================================
-inline void DrawArrays (const Handle(OpenGl_Workspace)& theWorkspace,
-                        const CALL_DEF_PARRAY* thePArray,
-                        const Standard_Boolean theIsFeedback,
-                        GLenum  theMode,
-                        GLint   theFirst,
-                        GLsizei theCount)
-{
-  if (!theIsFeedback)
-  {
-    glDrawArrays (theMode, theFirst, theCount);
-    return;
-  }
-
-  glBegin (theMode);
-  for (int anIter = theFirst; anIter < (theFirst + theCount); ++anIter)
-  {
-    if (thePArray->vnormals != NULL)
-      glNormal3fv (thePArray->vnormals[anIter].xyz);
-    if (thePArray->vtexels  != NULL && (theWorkspace->NamedStatus & OPENGL_NS_FORBIDSETTEX) == 0)
-      glTexCoord3fv (thePArray->vtexels[anIter].xy);
-    if (thePArray->vertices != NULL)
-      glVertex3fv (thePArray->vertices[anIter].xyz);
-    if (thePArray->vcolours != NULL)
-      glColor4ubv((GLubyte* )thePArray->vcolours[anIter]);
-  }
-  glEnd();
-}
-
-// =======================================================================
-// function : DrawElements
-// purpose  : Auxiliary method to split Feedback/Normal rendering modes
-// =======================================================================
-inline void DrawElements (const Handle(OpenGl_Workspace)& theWorkspace,
-                          const CALL_DEF_PARRAY* thePArray,
-                          const Standard_Boolean theIsFeedback,
-                          GLenum  theMode,
-                          GLsizei theCount,
-                          GLenum* theIndices)
-{
-  if (!theIsFeedback)
-  {
-    glDrawElements (theMode, theCount, GL_UNSIGNED_INT, theIndices);
-    return;
-  }
-
-  GLenum anIndex;
-  glBegin (theMode);
-  for (GLsizei anIter = 0; anIter < theCount; ++anIter)
-  {
-    anIndex = theIndices[anIter];
-    if (thePArray->vnormals != NULL)
-      glNormal3fv (thePArray->vnormals[anIndex].xyz);
-    if (thePArray->vtexels != NULL && (theWorkspace->NamedStatus & OPENGL_NS_FORBIDSETTEX) == 0)
-      glTexCoord3fv (thePArray->vtexels[anIndex].xy);
-    if (thePArray->vertices != NULL)
-      glVertex3fv (thePArray->vertices[anIndex].xyz);
-    if (thePArray->vcolours != NULL)
-      glColor4ubv ((GLubyte* )thePArray->vcolours[anIndex]);
-  }
-  glEnd();
-}
-
-// =======================================================================
 // function : DrawArray
 // purpose  :
 // =======================================================================
@@ -348,9 +217,7 @@ void OpenGl_PrimitiveArray::DrawArray (Tint theLightingModel,
     else
       glEnable (GL_LIGHTING);
 
-    if (myPArray->num_vertexs > 0
-     && myPArray->flagBufferVBO != VBO_OK
-     && !aGlContext->IsFeedback())
+    if (!toDrawVbo())
     {
       if (myPArray->vertices != NULL)
       {
@@ -376,62 +243,51 @@ void OpenGl_PrimitiveArray::DrawArray (Tint theLightingModel,
         glEnable (GL_COLOR_MATERIAL);
       }
     }
-    else if (myPArray->num_vertexs > 0
-          && myPArray->flagBufferVBO == VBO_OK)
+    else
     {
       // Bindings concrete pointer in accordance with VBO buffer
-      if (myPArray->bufferVBO[VBOVertices] != 0)
-      {
-        aGlContext->arbVBO->glBindBufferARB (GL_ARRAY_BUFFER_ARB, myPArray->bufferVBO[VBOVertices]);
-        glVertexPointer (3, GL_FLOAT, 0, NULL); // array of vertices 
-        glEnableClientState (GL_VERTEX_ARRAY);
-      }
-      if (myPArray->bufferVBO[VBOVnormals] != 0)
+      myVbos[VBOVertices]->BindFixed (aGlContext, GL_VERTEX_ARRAY);
+      if (!myVbos[VBOVnormals].IsNull())
       {
-        aGlContext->arbVBO->glBindBufferARB (GL_ARRAY_BUFFER_ARB, myPArray->bufferVBO[VBOVnormals]);
-        glNormalPointer (GL_FLOAT, 0, NULL); // array of normals  
-        glEnableClientState (GL_NORMAL_ARRAY);
+        myVbos[VBOVnormals]->BindFixed (aGlContext, GL_NORMAL_ARRAY);
       }
-      if (myPArray->bufferVBO[VBOVtexels] != 0 && (theWorkspace->NamedStatus & OPENGL_NS_FORBIDSETTEX) == 0)
+      if (!myVbos[VBOVtexels].IsNull() && (theWorkspace->NamedStatus & OPENGL_NS_FORBIDSETTEX) == 0)
       {
-        aGlContext->arbVBO->glBindBufferARB (GL_ARRAY_BUFFER_ARB, myPArray->bufferVBO[VBOVtexels]);
-        glTexCoordPointer (2, GL_FLOAT, 0, NULL); // array of texture coordinates
-        glEnableClientState (GL_TEXTURE_COORD_ARRAY);
+        myVbos[VBOVtexels]->BindFixed (aGlContext, GL_TEXTURE_COORD_ARRAY);
       }
-      if (myPArray->bufferVBO[VBOVcolours] != 0)
+      if (!myVbos[VBOVcolours].IsNull())
       {
-        aGlContext->arbVBO->glBindBufferARB (GL_ARRAY_BUFFER_ARB, myPArray->bufferVBO[VBOVcolours]);
-        glColorPointer (4, GL_UNSIGNED_BYTE, 0, NULL); // array of colors 
-        glEnableClientState (GL_COLOR_ARRAY);
-        glColorMaterial (GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE);
+        myVbos[VBOVcolours]->BindFixed (aGlContext, GL_COLOR_ARRAY);
+        glColorMaterial (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
         glEnable (GL_COLOR_MATERIAL);
       }
     }
 
-    // OCC22236 NOTE: draw for all situations:
-    // 1) draw elements from myPArray->bufferVBO[VBOEdges] indicies array
-    // 2) draw elements from vertice array, when bounds defines count of primitive's verts.
-    // 3) draw primitive by vertexes if no edges and bounds array is specified
-    if (myPArray->flagBufferVBO == VBO_OK)
+    /// OCC22236 NOTE: draw for all situations:
+    /// 1) draw elements from myPArray->bufferVBO[VBOEdges] indicies array
+    /// 2) draw elements from vertice array, when bounds defines count of primitive's verts.
+    /// 3) draw primitive by vertexes if no edges and bounds array is specified
+    if (toDrawVbo())
     {
-      if (myPArray->num_edges > 0 && myPArray->bufferVBO[VBOEdges] != 0)
+      if (!myVbos[VBOEdges].IsNull())
       {
-        aGlContext->arbVBO->glBindBufferARB (GL_ELEMENT_ARRAY_BUFFER_ARB, myPArray->bufferVBO[VBOEdges]); // for edge indices
+        myVbos[VBOEdges]->Bind (aGlContext);
         if (myPArray->num_bounds > 0)
         {
           // draw primitives by vertex count with the indicies
           Tint* anOffset = NULL;
           for (i = 0; i < myPArray->num_bounds; ++i)
           {
-            glDrawElements (myDrawMode, myPArray->bounds[i], GL_UNSIGNED_INT, anOffset);
+            glDrawElements (myDrawMode, myPArray->bounds[i], myVbos[VBOEdges]->GetDataType(), anOffset);
             anOffset += myPArray->bounds[i]; 
           }
         }
         else
         {
           // draw one (or sequential) primitive by the indicies
-          glDrawElements (myDrawMode, myPArray->num_edges, GL_UNSIGNED_INT, NULL);
+          glDrawElements (myDrawMode, myPArray->num_edges, myVbos[VBOEdges]->GetDataType(), NULL);
         }
+        myVbos[VBOEdges]->Unbind (aGlContext);
       }
       else if (myPArray->num_bounds > 0)
       {
@@ -443,12 +299,25 @@ void OpenGl_PrimitiveArray::DrawArray (Tint theLightingModel,
       }
       else
       {
-        glDrawArrays (myDrawMode, 0, myPArray->num_vertexs);
+        glDrawArrays (myDrawMode, 0, myVbos[VBOVertices]->GetElemsNb());
       }
 
       // bind with 0
-      aGlContext->arbVBO->glBindBufferARB (GL_ARRAY_BUFFER_ARB, 0); 
-      aGlContext->arbVBO->glBindBufferARB (GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
+      myVbos[VBOVertices]->UnbindFixed (aGlContext, GL_VERTEX_ARRAY);
+      if (!myVbos[VBOVnormals].IsNull())
+      {
+        myVbos[VBOVnormals]->UnbindFixed (aGlContext, GL_NORMAL_ARRAY);
+      }
+      if (!myVbos[VBOVtexels].IsNull() && (theWorkspace->NamedStatus & OPENGL_NS_FORBIDSETTEX) == 0)
+      {
+        myVbos[VBOVtexels]->UnbindFixed (aGlContext, GL_TEXTURE_COORD_ARRAY);
+      }
+      if (!myVbos[VBOVcolours].IsNull())
+      {
+        myVbos[VBOVcolours]->UnbindFixed (aGlContext, GL_COLOR_ARRAY);
+        glDisable (GL_COLOR_MATERIAL);
+        theWorkspace->NamedStatus |= OPENGL_NS_RESMAT; // Reset material
+      }
     } 
     else
     {
@@ -459,8 +328,7 @@ void OpenGl_PrimitiveArray::DrawArray (Tint theLightingModel,
           for (i = n = 0; i < myPArray->num_bounds; ++i)
           {
             if (pfc != NULL) glColor3fv (pfc[i].rgb);
-            DrawElements (theWorkspace, myPArray, aGlContext->IsFeedback(), myDrawMode,
-                          myPArray->bounds[i], (GLenum* )&myPArray->edges[n]);
+            glDrawElements (myDrawMode, myPArray->bounds[i], GL_UNSIGNED_INT, (GLenum* )&myPArray->edges[n]);
             n += myPArray->bounds[i];
           }
         }
@@ -472,38 +340,34 @@ void OpenGl_PrimitiveArray::DrawArray (Tint theLightingModel,
             {
               glColor3fv (pfc[i].rgb);
             }
-            DrawArrays (theWorkspace, myPArray, aGlContext->IsFeedback(), myDrawMode,
-                        n, myPArray->bounds[i]);
+            glDrawArrays (myDrawMode, n, myPArray->bounds[i]);
             n += myPArray->bounds[i];
           }
         }
       }
       else if (myPArray->num_edges > 0)
       {
-        DrawElements (theWorkspace, myPArray, aGlContext->IsFeedback(), myDrawMode,
-                      myPArray->num_edges, (GLenum* )myPArray->edges);
+        glDrawElements (myDrawMode, myPArray->num_edges, GL_UNSIGNED_INT, (GLenum* )myPArray->edges);
       }
       else
       {
-        DrawArrays (theWorkspace, myPArray, aGlContext->IsFeedback(), myDrawMode,
-                    0, myPArray->num_vertexs);
+        glDrawArrays (myDrawMode, 0, myPArray->num_vertexs);
       }
-    }
 
-    if (myPArray->bufferVBO[VBOVcolours] != 0 || pvc != NULL)
-    {
-      glDisable (GL_COLOR_MATERIAL);
-      theWorkspace->NamedStatus |= OPENGL_NS_RESMAT; // Reset material
-    }
+      if (pvc != NULL)
+      {
+        glDisable (GL_COLOR_MATERIAL);
+        theWorkspace->NamedStatus |= OPENGL_NS_RESMAT; // Reset material
+      }
 
-    if (myPArray->bufferVBO[VBOVertices] != 0 || myPArray->vertices != NULL)
       glDisableClientState (GL_VERTEX_ARRAY);
-    if (myPArray->bufferVBO[VBOVcolours] != 0 || myPArray->vcolours != NULL)
-      glDisableClientState (GL_COLOR_ARRAY);
-    if (myPArray->bufferVBO[VBOVnormals] != 0 || myPArray->vnormals != NULL)
-      glDisableClientState (GL_NORMAL_ARRAY);
-    if ((myPArray->bufferVBO[VBOVtexels] != 0 && (theWorkspace->NamedStatus & OPENGL_NS_FORBIDSETTEX) == 0) || myPArray->vtexels != NULL)
-      glDisableClientState (GL_TEXTURE_COORD_ARRAY);
+      if (myPArray->vcolours != NULL)
+        glDisableClientState (GL_COLOR_ARRAY);
+      if (myPArray->vnormals != NULL)
+        glDisableClientState (GL_NORMAL_ARRAY);
+      if (myPArray->vtexels != NULL)
+        glDisableClientState (GL_TEXTURE_COORD_ARRAY);
+    }
 
     if (theWorkspace->DegenerateModel)
     {
@@ -535,15 +399,15 @@ void OpenGl_PrimitiveArray::DrawArray (Tint theLightingModel,
         break;
       // DegenerateModel(as Lines, Points, BBoxs) are used only without VBO
       case 2: // XXX_TDM_WIREFRAME
-        if (myPArray->VBOEnabled == 0)
+        if (!toDrawVbo())
           DrawDegeneratesAsLines ((theEdgeFlag ? theEdgeColour : theInteriorColour), theWorkspace);
         break;
       case 3: // XXX_TDM_MARKER
-        if (myPArray->VBOEnabled == 0)
+        if (!toDrawVbo())
           DrawDegeneratesAsPoints ((theEdgeFlag ? theEdgeColour : theInteriorColour), theWorkspace->SkipRatio);
         break;
       case 4: // XXX_TDM_BBOX
-        if (myPArray->VBOEnabled == 0)
+        if (!toDrawVbo())
           DrawDegeneratesAsBBoxs (theEdgeFlag ? theEdgeColour : theInteriorColour);
         break;
     }
@@ -575,18 +439,17 @@ void OpenGl_PrimitiveArray::DrawEdges (const TEL_COLOUR*               theEdgeCo
 
   Tint i, j, n;
 
-  // OCC22236 NOTE: draw edges for all situations:
-  // 1) draw elements with GL_LINE style as edges from myPArray->bufferVBO[VBOEdges] indicies array
-  // 2) draw elements from vertice array, when bounds defines count of primitive's verts.
-  // 3) draw primitive's edges by vertexes if no edges and bounds array is specified
-  if (myPArray->flagBufferVBO == VBO_OK)
+  /// OCC22236 NOTE: draw edges for all situations:
+  /// 1) draw elements with GL_LINE style as edges from myPArray->bufferVBO[VBOEdges] indicies array
+  /// 2) draw elements from vertice array, when bounds defines count of primitive's verts.
+  /// 3) draw primitive's edges by vertexes if no edges and bounds array is specified
+  if (toDrawVbo())
   { 
-    aGlContext->arbVBO->glBindBufferARB (GL_ARRAY_BUFFER_ARB, myPArray->bufferVBO[VBOVertices]);
-    glEnableClientState (GL_VERTEX_ARRAY);
+    myVbos[VBOVertices]->BindFixed (aGlContext, GL_VERTEX_ARRAY);
     glColor3fv (theEdgeColour->rgb);
-    if (myPArray->num_edges > 0 && myPArray->bufferVBO[VBOEdges])
+    if (!myVbos[VBOEdges].IsNull())
     {
-      aGlContext->arbVBO->glBindBufferARB (GL_ELEMENT_ARRAY_BUFFER_ARB, myPArray->bufferVBO[VBOEdges]);
+      myVbos[VBOEdges]->Bind (aGlContext);
 
       // draw primitives by vertex count with the indicies
       if (myPArray->num_bounds > 0)
@@ -594,15 +457,16 @@ void OpenGl_PrimitiveArray::DrawEdges (const TEL_COLOUR*               theEdgeCo
         Tint* offset = 0;
         for (i = 0, offset = 0; i < myPArray->num_bounds; ++i)
         {
-          glDrawElements (myDrawMode, myPArray->bounds[i], GL_UNSIGNED_INT, offset);
+          glDrawElements (myDrawMode, myPArray->bounds[i], myVbos[VBOEdges]->GetDataType(), offset);
           offset += myPArray->bounds[i];
         }
       }
       // draw one (or sequential) primitive by the indicies
       else
       {
-        glDrawElements (myDrawMode, myPArray->num_edges, GL_UNSIGNED_INT, NULL);
+        glDrawElements (myDrawMode, myVbos[VBOEdges]->GetElemsNb(), myVbos[VBOEdges]->GetDataType(), NULL);
       }
+      myVbos[VBOEdges]->Unbind (aGlContext);
     }
     else if (myPArray->num_bounds > 0)
     {
@@ -618,9 +482,7 @@ void OpenGl_PrimitiveArray::DrawEdges (const TEL_COLOUR*               theEdgeCo
     }
 
     // unbind buffers
-    glDisableClientState (GL_VERTEX_ARRAY);
-    aGlContext->arbVBO->glBindBufferARB (GL_ARRAY_BUFFER_ARB, 0);
-    aGlContext->arbVBO->glBindBufferARB (GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
+    myVbos[VBOVertices]->UnbindFixed (aGlContext, GL_VERTEX_ARRAY);
   }
   else
   {
@@ -646,8 +508,7 @@ void OpenGl_PrimitiveArray::DrawEdges (const TEL_COLOUR*               theEdgeCo
           }
           else
           {
-            DrawElements (theWorkspace, myPArray, aGlContext->IsFeedback(), myDrawMode,
-                          myPArray->bounds[i], (GLenum* )&myPArray->edges[n]);
+            glDrawElements (myDrawMode, myPArray->bounds[i], GL_UNSIGNED_INT, (GLenum* )&myPArray->edges[n]);
           }
           n += myPArray->bounds[i];
         }
@@ -656,8 +517,7 @@ void OpenGl_PrimitiveArray::DrawEdges (const TEL_COLOUR*               theEdgeCo
       {
         for (i = n = 0 ; i < myPArray->num_bounds; ++i)
         {
-          DrawArrays (theWorkspace, myPArray, aGlContext->IsFeedback(), myDrawMode,
-                      n, myPArray->bounds[i]);
+          glDrawArrays (myDrawMode, n, myPArray->bounds[i]);
           n += myPArray->bounds[i];
         }
       }
@@ -676,14 +536,12 @@ void OpenGl_PrimitiveArray::DrawEdges (const TEL_COLOUR*               theEdgeCo
       }
       else
       {
-        DrawElements (theWorkspace, myPArray, aGlContext->IsFeedback(), myDrawMode,
-                      myPArray->num_edges, (GLenum* )myPArray->edges);
+        glDrawElements (myDrawMode, myPArray->num_edges, GL_UNSIGNED_INT, (GLenum* )myPArray->edges);
       }
     }
     else
     {
-      DrawArrays (theWorkspace, myPArray, aGlContext->IsFeedback(), myDrawMode,
-                  0, myPArray->num_vertexs);
+      glDrawArrays (myDrawMode, 0, myPArray->num_vertexs);
     }
   }
 
@@ -1514,7 +1372,6 @@ void OpenGl_PrimitiveArray::DrawDegeneratesAsLines (const TEL_COLOUR*
   else
   {
     int i,n;
-    Standard_Boolean isFeedback = theWorkspace->GetGlContext()->IsFeedback();
     glPushAttrib (GL_POLYGON_BIT);
     glPolygonMode (GL_FRONT_AND_BACK, GL_LINE);
 
@@ -1542,8 +1399,7 @@ void OpenGl_PrimitiveArray::DrawDegeneratesAsLines (const TEL_COLOUR*
       {
         for (i = n = 0; i < myPArray->num_bounds; ++i)
         {
-          DrawElements (theWorkspace, myPArray, isFeedback, myDrawMode,
-                        myPArray->bounds[i], (GLenum* )&myPArray->edges[n]);
+          glDrawElements (myDrawMode, myPArray->bounds[i], GL_UNSIGNED_INT, (GLenum* )&myPArray->edges[n]);
           n += myPArray->bounds[i];
         }
       }
@@ -1551,21 +1407,18 @@ void OpenGl_PrimitiveArray::DrawDegeneratesAsLines (const TEL_COLOUR*
       {
         for (i = n = 0; i < myPArray->num_bounds; ++i)
         {
-          DrawArrays (theWorkspace, myPArray, isFeedback, myDrawMode,
-                      n, myPArray->bounds[i]);
+          glDrawArrays (myDrawMode, n, myPArray->bounds[i]);
           n += myPArray->bounds[i];
         }
       }
     }
     else if (myPArray->num_edges > 0)
     {
-      DrawElements (theWorkspace, myPArray, isFeedback, myDrawMode,
-                    myPArray->num_edges, (GLenum* )myPArray->edges);
+      glDrawElements (myDrawMode, myPArray->num_edges, GL_UNSIGNED_INT, (GLenum* )myPArray->edges);
     }
     else
     {
-      DrawArrays (theWorkspace, myPArray, isFeedback, myDrawMode,
-                  0, myPArray->num_vertexs);
+      glDrawArrays (myDrawMode, 0, myPArray->num_vertexs);
     }
 
     if (!vertex_array_mode) glDisableClientState (GL_VERTEX_ARRAY);
@@ -1644,7 +1497,8 @@ void OpenGl_PrimitiveArray::DrawDegeneratesAsBBoxs (const TEL_COLOUR* theEdgeCol
 // =======================================================================
 OpenGl_PrimitiveArray::OpenGl_PrimitiveArray (CALL_DEF_PARRAY* thePArray)
 : myPArray (thePArray),
-  myDrawMode (GL_NONE)
+  myDrawMode (DRAW_MODE_NONE),
+  myIsVboInit (Standard_False)
 {
   switch (myPArray->type)
   {
@@ -1682,29 +1536,27 @@ OpenGl_PrimitiveArray::OpenGl_PrimitiveArray (CALL_DEF_PARRAY* thePArray)
 // function : ~OpenGl_PrimitiveArray
 // purpose  :
 // =======================================================================
-OpenGl_PrimitiveArray::~OpenGl_PrimitiveArray ()
+OpenGl_PrimitiveArray::~OpenGl_PrimitiveArray()
 {
-  if (myPArray == NULL)
-    return;
+  //
+}
 
-  if (myPArray->VBOEnabled == VBO_OK)
+// =======================================================================
+// function : Release
+// purpose  :
+// =======================================================================
+void OpenGl_PrimitiveArray::Release (const Handle(OpenGl_Context)& theContext)
+{
+  for (Standard_Integer anIter = 0; anIter < VBOMaxType; ++anIter)
   {
-    OpenGl_ResourceCleaner* aResCleaner = OpenGl_ResourceCleaner::GetInstance();
-    if (myPArray->bufferVBO[VBOEdges] != 0)
-      aResCleaner->AddResource ((GLCONTEXT )myPArray->contextId,
-                                new OpenGl_ResourceVBO (myPArray->bufferVBO[VBOEdges]));
-    if (myPArray->bufferVBO[VBOVertices] != 0)
-      aResCleaner->AddResource ((GLCONTEXT )myPArray->contextId,
-                                new OpenGl_ResourceVBO (myPArray->bufferVBO[VBOVertices]));
-    if (myPArray->bufferVBO[VBOVcolours] != 0)
-      aResCleaner->AddResource ((GLCONTEXT )myPArray->contextId,
-                                new OpenGl_ResourceVBO (myPArray->bufferVBO[VBOVcolours]));
-    if (myPArray->bufferVBO[VBOVnormals] != 0)
-      aResCleaner->AddResource ((GLCONTEXT )myPArray->contextId,
-                                new OpenGl_ResourceVBO (myPArray->bufferVBO[VBOVnormals]));
-    if (myPArray->bufferVBO[VBOVtexels] != 0)
-      aResCleaner->AddResource ((GLCONTEXT )myPArray->contextId,
-                                new OpenGl_ResourceVBO (myPArray->bufferVBO[VBOVtexels]));
+    if (!myVbos[anIter].IsNull())
+    {
+      if (!theContext.IsNull())
+      {
+        theContext->DelayedRelease (myVbos[anIter]);
+      }
+      myVbos[anIter].Nullify();
+    }
   }
 }
 
@@ -1714,15 +1566,14 @@ OpenGl_PrimitiveArray::~OpenGl_PrimitiveArray ()
 // =======================================================================
 void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
 {
-  if (myPArray == NULL || myDrawMode == GL_NONE)
+  if (myPArray == NULL || myDrawMode == DRAW_MODE_NONE || myPArray->num_vertexs <= 0)
     return;
 
   // create VBOs on first render call
-  if (myPArray->VBOEnabled == -1) // special value for uninitialized state
+  if (!myIsVboInit && OpenGl_GraphicDriver::ToUseVBO() && theWorkspace->GetGlContext()->core15 != NULL)
   {
-    myPArray->VBOEnabled = OpenGl_GraphicDriver::ToUseVBO() && (theWorkspace->GetGlContext()->arbVBO != NULL);
-    if (myPArray->VBOEnabled != 0)
-      BuildVBO (theWorkspace);
+    BuildVBO (theWorkspace);
+    myIsVboInit = Standard_True;
   }
 
   switch (myPArray->type)
@@ -1766,13 +1617,14 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace
       break;
   }
 
-  const OpenGl_AspectFace* anAspectFace = theWorkspace->AspectFace (Standard_True);
-  const OpenGl_AspectLine* anAspectLine = theWorkspace->AspectLine (Standard_True);
+  const OpenGl_AspectFace*   anAspectFace   = theWorkspace->AspectFace   (Standard_True);
+  const OpenGl_AspectLine*   anAspectLine   = theWorkspace->AspectLine   (Standard_True);
+  const OpenGl_AspectMarker* anAspectMarker = theWorkspace->AspectMarker (myPArray->type == TelPointsArrayType);
 
   Tint aFrontLightingModel = anAspectFace->Context().IntFront.color_mask;
   const TEL_COLOUR* anInteriorColor = &anAspectFace->Context().IntFront.matcol;
   const TEL_COLOUR* anEdgeColor = &anAspectFace->AspectEdge()->Color();
-  const TEL_COLOUR* aLineColor = &anAspectLine->Color();
+  const TEL_COLOUR* aLineColor = (myPArray->type == TelPointsArrayType) ? &anAspectMarker->Color() : &anAspectLine->Color();
 
   // Use highlight colors
   if (theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT)
diff --git a/src/OpenGl/OpenGl_Resource.cxx b/src/OpenGl/OpenGl_Resource.cxx
index 030a123..5092167 100644
--- a/src/OpenGl/OpenGl_Resource.cxx
+++ b/src/OpenGl/OpenGl_Resource.cxx
@@ -19,5 +19,8 @@
 
 #include <OpenGl_Resource.hxx>
 
-IMPLEMENT_STANDARD_HANDLE (OpenGl_Resource, MMgt_TShared)
-IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Resource, MMgt_TShared)
+IMPLEMENT_STANDARD_HANDLE (OpenGl_Resource, Standard_Transient)
+IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Resource, Standard_Transient)
+
+OpenGl_Resource::OpenGl_Resource() {}
+OpenGl_Resource::~OpenGl_Resource() {}
diff --git a/src/OpenGl/OpenGl_ResourceCleaner.cxx b/src/OpenGl/OpenGl_ResourceCleaner.cxx
deleted file mode 100644
index bcfec36..0000000
--- a/src/OpenGl/OpenGl_ResourceCleaner.cxx
+++ /dev/null
@@ -1,226 +0,0 @@
-// Created on: 2011-03-18
-// Created by: Anton POLETAEV
-// Copyright (c) 2011-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-
-#include <OpenGl_ResourceCleaner.hxx>
-#include <OpenGl_ResourceVBO.hxx>
-
-//=======================================================================
-//function : OpenGl_ResourceCleaner
-//purpose  : Constructor
-//=======================================================================
-
-OpenGl_ResourceCleaner::OpenGl_ResourceCleaner() 
-{
-  mySharedContexts.Clear();
-  mySharedQueue.Clear();
-  myInstanceQueue.Clear();
-}
-
-//=======================================================================
-//function : AppendContext
-//purpose  : Append given OpenGl context to the OpenGl_ResourceCleaner
-//           control list
-//=======================================================================
-
-void OpenGl_ResourceCleaner::AppendContext(GLCONTEXT theContext, Standard_Boolean isShared)
-{  
-  
-  // appending shared context
-  if (isShared) 
-  {
-    mySharedContexts.Add(theContext);
-  }
-  else
-  {
-    // if context is already in the list
-    if (myInstanceQueue.IsBound(theContext)) 
-    {
-      QueueOfResources *aQueue = &myInstanceQueue.ChangeFind(theContext);
-      aQueue->Clear();
-    }
-    else 
-    {
-      // context is not in the list - create empty queue for it and add queue to the list
-      QueueOfResources aQueue;
-      aQueue.Clear();
-      myInstanceQueue.Bind(theContext, aQueue);
-    }
-  }
-
-}
-
-//=======================================================================
-//function : AddResource
-//purpose  : Tell the OpenGl_ResourceCleaner to clean up the OpenGl 
-//           memory resource
-//=======================================================================
-
-Standard_Boolean OpenGl_ResourceCleaner::AddResource(GLCONTEXT theContext, const Handle(OpenGl_Resource)& theResource) 
-{
-  // if context found in the shared list
-  if (mySharedContexts.Contains(theContext)) 
-  {
-    mySharedQueue.Push(theResource);
-    return Standard_True;
-  }
-  // if not, then it might be found in the non-shared list
-  else if (myInstanceQueue.IsBound(theContext)) 
-  {
-    QueueOfResources * aQueue = &myInstanceQueue.ChangeFind(theContext);
-    aQueue->Push(theResource);
-    return Standard_True;
-  }
-  
-  // context is not under OpenGl_ResourceCleaner control, do not tell to clean the resource
-  return Standard_False;
-}
-
-//=======================================================================
-//function : Clear
-//purpose  : Cancel clean procedure for all the resources added to the 
-//           OpenGl_ResourceCleaner 
-//=======================================================================
-
-void OpenGl_ResourceCleaner::Clear() 
-{
-  mySharedQueue.Clear();
-  DataMapOfContextsResources::Iterator anIter(myInstanceQueue);
-
-  // remove the resources from the list
-  for (anIter.Reset(); anIter.More(); anIter.Next()) 
-  {
-    QueueOfResources * aQueue = &anIter.ChangeValue();
-    aQueue->Clear();
-  }
-
-}
-
-//=======================================================================
-//function : Clear
-//purpose  : Cancel clean procedure for all the resources of the specific
-//           OpenGl context which were added to the OpenGl_ResourceCleaner
-//=======================================================================
-
-Standard_Boolean OpenGl_ResourceCleaner::Clear(GLCONTEXT theContext) 
-{
-  // check if the context in the the control list
-  if (myInstanceQueue.IsBound(theContext)) 
-  {
-    QueueOfResources * aQueue = &myInstanceQueue.ChangeFind(theContext);
-    aQueue->Clear();
-    return Standard_True;
-  }
-
-  return Standard_False;
-}
-
-//=======================================================================
-//function : ClearShared
-//purpose  : Cancel clean procedure for all of the shared resources
-//=======================================================================
-
-void OpenGl_ResourceCleaner::ClearShared()
-{
-  mySharedQueue.Clear();
-}
-
-//=======================================================================
-//function : Cleanup
-//purpose  : Clear the unused resources for active OpenGl context
-//=======================================================================
-
-void OpenGl_ResourceCleaner::Cleanup (const Handle(OpenGl_Context)& theGlContext)
-{
-  GLCONTEXT aContext = GET_GL_CONTEXT();
-  if (aContext == NULL)
-    return;
-
-  // if the context is found in shared list
-  if (mySharedContexts.Contains (aContext)) 
-  {
-    while (mySharedQueue.Size() > 0) 
-    {
-      mySharedQueue.Front()->Clean (theGlContext); // delete resource memory
-      mySharedQueue.Pop();
-    }
-  }
-  // if the context is found in non-shared list
-  else if (myInstanceQueue.IsBound (aContext)) 
-  {
-    QueueOfResources* aQueue = &myInstanceQueue.ChangeFind (aContext);
-    while (aQueue->Size() > 0) 
-    {
-      aQueue->Front()->Clean (theGlContext); // delete resource memory
-      aQueue->Pop();
-    }
-  }
-}
-
-//=======================================================================
-//function : RemoveContext
-//purpose  : Remove the OpenGl context from the OpenGl_ResourceCleaner list
-//=======================================================================
-
-void OpenGl_ResourceCleaner::RemoveContext(GLCONTEXT theContext)
-{
-  // if context can be found in shared list try to remove it
-  // if it wasn't in there, try to remove it from non-shared list
-  if (!mySharedContexts.Remove(theContext))
-    myInstanceQueue.UnBind(theContext);  
-
-  // if no contexts in shared list, then there is no need to clean
-  // the resources on redraw
-  if (mySharedContexts.Size() == 0)
-    mySharedQueue.Clear();
-
-}
-
-//=======================================================================
-//function : GetSharedContext
-//purpose  : Get any of shared contexts from the OpenGl_ResourceCleaner list
-//=======================================================================
-
-GLCONTEXT OpenGl_ResourceCleaner::GetSharedContext() const
-{
-  if(mySharedContexts.Size() > 0) 
-  {
-    MapOfContexts::Iterator anIter(mySharedContexts);
-    anIter.Reset();
-    return anIter.Value();
-  }
-
-  return 0;
-}
-
-//=======================================================================
-//function : GetInstance
-//purpose  : Get the global instance of OpenGl_ResourceCleaner
-//=======================================================================
-
-OpenGl_ResourceCleaner* OpenGl_ResourceCleaner::GetInstance()
-{
-  // the static instance entity
-  static OpenGl_ResourceCleaner* anInstance = NULL;
-
-  if (anInstance == NULL)
-    anInstance = new OpenGl_ResourceCleaner;
-
-  return anInstance;
-}
diff --git a/src/OpenGl/OpenGl_ResourceTexture.cxx b/src/OpenGl/OpenGl_ResourceTexture.cxx
index c48056e..fd3eb8d 100644
--- a/src/OpenGl/OpenGl_ResourceTexture.cxx
+++ b/src/OpenGl/OpenGl_ResourceTexture.cxx
@@ -19,16 +19,40 @@
 
 
 #include <OpenGl_GlCore11.hxx>
+#include <OpenGl_Context.hxx>
 #include <OpenGl_ResourceTexture.hxx>
 
 IMPLEMENT_STANDARD_HANDLE (OpenGl_ResourceTexture, OpenGl_Resource)
 IMPLEMENT_STANDARD_RTTIEXT(OpenGl_ResourceTexture, OpenGl_Resource)
 
 //=======================================================================
-//function : Clean
+//function : OpenGl_ResourceTexture
+//purpose  :
+//=======================================================================
+OpenGl_ResourceTexture::OpenGl_ResourceTexture (const GLuint theId)
+: myTextureId (theId)
+{
+  //
+}
+
+//=======================================================================
+//function : ~OpenGl_ResourceTexture
+//purpose  :
+//=======================================================================
+OpenGl_ResourceTexture::~OpenGl_ResourceTexture()
+{
+  Release (NULL);
+}
+
+//=======================================================================
+//function : Release
 //purpose  : free OpenGl memory allocated for texture resource
 //=======================================================================
-void OpenGl_ResourceTexture::Clean (const Handle(OpenGl_Context)& theGlContext)
+void OpenGl_ResourceTexture::Release (const OpenGl_Context* theGlCtx)
 {
-  glDeleteTextures (1, &myId);
+  if (myTextureId != 0 && theGlCtx != NULL)
+  {
+    glDeleteTextures (1, &myTextureId);
+    myTextureId = 0;
+  }
 }
diff --git a/src/OpenGl/OpenGl_ResourceVBO.cxx b/src/OpenGl/OpenGl_ResourceVBO.cxx
deleted file mode 100644
index f252562..0000000
--- a/src/OpenGl/OpenGl_ResourceVBO.cxx
+++ /dev/null
@@ -1,40 +0,0 @@
-// Created on: 2011-03-18
-// Created by: Anton POLETAEV
-// Copyright (c) 2011-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-
-#include <OpenGl_ResourceVBO.hxx>
-#include <OpenGl_Context.hxx>
-#include <OpenGl_ArbVBO.hxx>
-
-IMPLEMENT_STANDARD_HANDLE (OpenGl_ResourceVBO, OpenGl_Resource)
-IMPLEMENT_STANDARD_RTTIEXT(OpenGl_ResourceVBO, OpenGl_Resource)
-
-//=======================================================================
-//function : Clean
-//purpose  : free OpenGl memory allocated for vbo resource
-//=======================================================================
-void OpenGl_ResourceVBO::Clean (const Handle(OpenGl_Context)& theGlContext)
-{
-  if (theGlContext->arbVBO == NULL)
-  {
-    std::cerr << "OpenGl_ResourceVBO::Clean(), active GL context doesn't support VBO!\n";
-    return;
-  }
-  theGlContext->arbVBO->glDeleteBuffersARB (1 , &myId);
-}
diff --git a/src/OpenGl/OpenGl_Structure.cxx b/src/OpenGl/OpenGl_Structure.cxx
index 94b1657..20d5afd 100644
--- a/src/OpenGl/OpenGl_Structure.cxx
+++ b/src/OpenGl/OpenGl_Structure.cxx
@@ -59,46 +59,12 @@ OpenGl_Structure::OpenGl_Structure ()
 
 /*----------------------------------------------------------------------*/
 
-OpenGl_Structure::~OpenGl_Structure ()
+OpenGl_Structure::~OpenGl_Structure()
 {
-  if (myTransformation)
-  {
-    delete myTransformation;
-    myTransformation = NULL;
-  }
-  if (myTransPers)
-  {
-    delete myTransPers;
-    myTransPers = NULL;
-  }
-  if (myDegenerateModel)
-  {
-    delete myDegenerateModel;
-    myDegenerateModel = NULL;
-  }
-  if (myAspectLine)
-  {
-    delete myAspectLine;
-    myAspectLine = NULL;
-  }
-  if (myAspectFace)
-  {
-    delete myAspectFace;
-    myAspectFace = NULL;
-  }
-  if (myAspectMarker)
-  {
-    delete myAspectMarker;
-    myAspectMarker = NULL;
-  }
-  if (myAspectText)
-  {
-    delete myAspectText;
-    myAspectText = NULL;
-  }
-  ClearHighlightColor();
-  // Delete groups
-  Clear();
+  Release (Handle(OpenGl_Context)());
+  delete myTransformation;  myTransformation  = NULL;
+  delete myTransPers;       myTransPers       = NULL;
+  delete myDegenerateModel; myDegenerateModel = NULL;
 }
 
 /*----------------------------------------------------------------------*/
@@ -106,7 +72,7 @@ OpenGl_Structure::~OpenGl_Structure ()
 void OpenGl_Structure::SetTransformation(const float *AMatrix)
 {
   if (!myTransformation)
-    myTransformation = new OpenGl_Matrix;
+    myTransformation = new OpenGl_Matrix();
 
   matcpy( myTransformation->mat, AMatrix );
 }
@@ -140,7 +106,7 @@ void OpenGl_Structure::SetDegenerateModel (const Standard_Integer AMode, const f
 void OpenGl_Structure::SetAspectLine (const CALL_DEF_CONTEXTLINE &AContext)
 {
   if (!myAspectLine)
-    myAspectLine = new OpenGl_AspectLine;
+    myAspectLine = new OpenGl_AspectLine();
   myAspectLine->SetContext( AContext );
 }
 
@@ -149,7 +115,7 @@ void OpenGl_Structure::SetAspectLine (const CALL_DEF_CONTEXTLINE &AContext)
 void OpenGl_Structure::SetAspectFace (const CALL_DEF_CONTEXTFILLAREA &AContext)
 {
   if (!myAspectFace)
-    myAspectFace = new OpenGl_AspectFace;
+    myAspectFace = new OpenGl_AspectFace();
   myAspectFace->SetContext( AContext );
 }
 
@@ -158,7 +124,7 @@ void OpenGl_Structure::SetAspectFace (const CALL_DEF_CONTEXTFILLAREA &AContext)
 void OpenGl_Structure::SetAspectMarker (const CALL_DEF_CONTEXTMARKER &AContext)
 {
   if (!myAspectMarker)
-    myAspectMarker = new OpenGl_AspectMarker;
+    myAspectMarker = new OpenGl_AspectMarker();
   myAspectMarker->SetContext( AContext );
 }
 
@@ -167,73 +133,82 @@ void OpenGl_Structure::SetAspectMarker (const CALL_DEF_CONTEXTMARKER &AContext)
 void OpenGl_Structure::SetAspectText (const CALL_DEF_CONTEXTTEXT &AContext)
 {
   if (!myAspectText)
-    myAspectText = new OpenGl_AspectText;
+    myAspectText = new OpenGl_AspectText();
   myAspectText->SetContext( AContext );
 }
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_Structure::SetHighlightBox (const CALL_DEF_BOUNDBOX &ABoundBox)
+void OpenGl_Structure::SetHighlightBox (const Handle(OpenGl_Context)& theGlCtx,
+                                        const CALL_DEF_BOUNDBOX&      theBoundBox)
 {
-  if (!myHighlightBox)
-    myHighlightBox = new OpenGl_Group;
+  if (myHighlightBox != NULL)
+  {
+    myHighlightBox->Release (theGlCtx);
+  }
   else
-    myHighlightBox->Clear();
+  {
+    myHighlightBox = new OpenGl_Group();
+  }
 
-  CALL_DEF_CONTEXTLINE context_line;
-  context_line.Color = ABoundBox.Color;
-  context_line.LineType = Aspect_TOL_SOLID;
-  context_line.Width = 1.0f;
-  myHighlightBox->SetAspectLine( context_line );
+  CALL_DEF_CONTEXTLINE aContextLine;
+  aContextLine.Color    = theBoundBox.Color;
+  aContextLine.LineType = Aspect_TOL_SOLID;
+  aContextLine.Width    = 1.0f;
+  myHighlightBox->SetAspectLine (aContextLine);
 
 #define CALL_MAX_BOUNDBOXSIZE 16
 
-  Graphic3d_Array1OfVertex points(1,CALL_MAX_BOUNDBOXSIZE);
-  const float Xm = ABoundBox.Pmin.x;
-  const float Ym = ABoundBox.Pmin.y;
-  const float Zm = ABoundBox.Pmin.z;
-  const float XM = ABoundBox.Pmax.x;
-  const float YM = ABoundBox.Pmax.y;
-  const float ZM = ABoundBox.Pmax.z;
-  points( 1).SetCoord(Xm,Ym,Zm);
-  points( 2).SetCoord(Xm,Ym,ZM);
-  points( 3).SetCoord(Xm,YM,ZM);
-  points( 4).SetCoord(Xm,YM,Zm);
-  points( 5).SetCoord(Xm,Ym,Zm);
-  points( 6).SetCoord(XM,Ym,Zm);
-  points( 7).SetCoord(XM,Ym,ZM);
-  points( 8).SetCoord(XM,YM,ZM);
-  points( 9).SetCoord(XM,YM,Zm);
-  points(10).SetCoord(XM,Ym,Zm);
-  points(11).SetCoord(XM,YM,Zm);
-  points(12).SetCoord(Xm,YM,Zm);
-  points(13).SetCoord(Xm,YM,ZM);
-  points(14).SetCoord(XM,YM,ZM);
-  points(15).SetCoord(XM,Ym,ZM);
-  points(16).SetCoord(Xm,Ym,ZM);
-
-  OpenGl_Polyline *apolyline = new OpenGl_Polyline(points);
-  myHighlightBox->AddElement( TelPolyline, apolyline );
+  Graphic3d_Array1OfVertex aPoints (1, CALL_MAX_BOUNDBOXSIZE);
+  const float Xm = theBoundBox.Pmin.x;
+  const float Ym = theBoundBox.Pmin.y;
+  const float Zm = theBoundBox.Pmin.z;
+  const float XM = theBoundBox.Pmax.x;
+  const float YM = theBoundBox.Pmax.y;
+  const float ZM = theBoundBox.Pmax.z;
+  aPoints( 1).SetCoord (Xm, Ym, Zm);
+  aPoints( 2).SetCoord (Xm, Ym, ZM);
+  aPoints( 3).SetCoord (Xm, YM, ZM);
+  aPoints( 4).SetCoord (Xm, YM, Zm);
+  aPoints( 5).SetCoord (Xm, Ym, Zm);
+  aPoints( 6).SetCoord (XM, Ym, Zm);
+  aPoints( 7).SetCoord (XM, Ym, ZM);
+  aPoints( 8).SetCoord (XM, YM, ZM);
+  aPoints( 9).SetCoord (XM, YM, Zm);
+  aPoints(10).SetCoord (XM, Ym, Zm);
+  aPoints(11).SetCoord (XM, YM, Zm);
+  aPoints(12).SetCoord (Xm, YM, Zm);
+  aPoints(13).SetCoord (Xm, YM, ZM);
+  aPoints(14).SetCoord (XM, YM, ZM);
+  aPoints(15).SetCoord (XM, Ym, ZM);
+  aPoints(16).SetCoord (Xm, Ym, ZM);
+
+  OpenGl_Polyline* aPolyline = new OpenGl_Polyline (aPoints);
+  myHighlightBox->AddElement (TelPolyline, aPolyline);
 }
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_Structure::ClearHighlightBox ()
+void OpenGl_Structure::ClearHighlightBox (const Handle(OpenGl_Context)& theGlCtx)
 {
-  if (myHighlightBox)
+  if (myHighlightBox != NULL)
   {
-    delete myHighlightBox;
-    myHighlightBox = NULL;
+    OpenGl_Element::Destroy (theGlCtx, myHighlightBox);
   }
 }
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_Structure::SetHighlightColor (const Standard_ShortReal R, const Standard_ShortReal G, const Standard_ShortReal B)
+void OpenGl_Structure::SetHighlightColor (const Handle(OpenGl_Context)& theGlCtx,
+                                          const Standard_ShortReal R,
+                                          const Standard_ShortReal G,
+                                          const Standard_ShortReal B)
 {
-  ClearHighlightBox();
-  if (!myHighlightColor)
-    myHighlightColor = new TEL_COLOUR;
+  ClearHighlightBox (theGlCtx);
+  if (myHighlightColor == NULL)
+  {
+    myHighlightColor = new TEL_COLOUR();
+  }
 
   myHighlightColor->rgb[0] = R;
   myHighlightColor->rgb[1] = G;
@@ -243,14 +218,11 @@ void OpenGl_Structure::SetHighlightColor (const Standard_ShortReal R, const Stan
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_Structure::ClearHighlightColor ()
+void OpenGl_Structure::ClearHighlightColor (const Handle(OpenGl_Context)& theGlCtx)
 {
-  ClearHighlightBox();
-  if (myHighlightColor)
-  {
-    delete myHighlightColor;
-    myHighlightColor = NULL;
-  }
+  ClearHighlightBox(theGlCtx);
+  delete myHighlightColor;
+  myHighlightColor = NULL;
 }
 
 /*----------------------------------------------------------------------*/
@@ -290,33 +262,31 @@ OpenGl_Group * OpenGl_Structure::AddGroup ()
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_Structure::RemoveGroup (const OpenGl_Group *AGroup)
+void OpenGl_Structure::RemoveGroup (const Handle(OpenGl_Context)& theGlCtx,
+                                    const OpenGl_Group*           theGroup)
 {
-  OpenGl_ListOfGroup::Iterator itg(myGroups);
-  while (itg.More())
+  for (OpenGl_ListOfGroup::Iterator anIter (myGroups); anIter.More(); anIter.Next())
   {
     // Check for the given group
-    if (itg.Value() == AGroup)
+    if (anIter.Value() == theGroup)
     {
       // Delete object
-      delete AGroup;
-      myGroups.Remove(itg);
+      OpenGl_Element::Destroy (theGlCtx, const_cast<OpenGl_Group*& > (anIter.ChangeValue()));
+      myGroups.Remove (anIter);
       return;
     }
-    itg.Next();
   }
 }
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_Structure::Clear ()
+void OpenGl_Structure::Clear (const Handle(OpenGl_Context)& theGlCtx)
 {
-  OpenGl_ListOfGroup::Iterator itg(myGroups);
-  while (itg.More())
+  // Release groups
+  for (OpenGl_ListOfGroup::Iterator anIter (myGroups); anIter.More(); anIter.Next())
   {
     // Delete objects
-    delete itg.Value();
-    itg.Next();
+    OpenGl_Element::Destroy (theGlCtx, const_cast<OpenGl_Group*& > (anIter.ChangeValue()));
   }
   myGroups.Clear();
 }
@@ -462,6 +432,57 @@ void OpenGl_Structure::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
   AWorkspace->NamedStatus = named_status;
 }
 
+// =======================================================================
+// function : Release
+// purpose  :
+// =======================================================================
+void OpenGl_Structure::Release (const Handle(OpenGl_Context)& theGlCtx)
+{
+  // Release groups
+  Clear (theGlCtx);
+  OpenGl_Element::Destroy (theGlCtx, myAspectLine);
+  OpenGl_Element::Destroy (theGlCtx, myAspectFace);
+  OpenGl_Element::Destroy (theGlCtx, myAspectMarker);
+  OpenGl_Element::Destroy (theGlCtx, myAspectText);
+  ClearHighlightColor (theGlCtx);
+}
+
+// =======================================================================
+// function : ReleaseGlResources
+// purpose  :
+// =======================================================================
+void OpenGl_Structure::ReleaseGlResources (const Handle(OpenGl_Context)& theGlCtx)
+{
+  for (OpenGl_ListOfGroup::Iterator anIter (myGroups); anIter.More(); anIter.Next())
+  {
+    OpenGl_Group* aGroup = const_cast<OpenGl_Group*& > (anIter.ChangeValue());
+    if (aGroup != NULL)
+    {
+      aGroup->Release (theGlCtx);
+    }
+  }
+  if (myAspectLine != NULL)
+  {
+    myAspectLine->Release (theGlCtx);
+  }
+  if (myAspectFace != NULL)
+  {
+    myAspectFace->Release (theGlCtx);
+  }
+  if (myAspectMarker != NULL)
+  {
+    myAspectMarker->Release (theGlCtx);
+  }
+  if (myAspectText != NULL)
+  {
+    myAspectText->Release (theGlCtx);
+  }
+  if (myHighlightBox != NULL)
+  {
+    myHighlightBox->Release (theGlCtx);
+  }
+}
+
 //=======================================================================
 //function : SetZLayer
 //purpose  : 
diff --git a/src/OpenGl/OpenGl_Text.cxx b/src/OpenGl/OpenGl_Text.cxx
index 4b20abe..38cd1f2 100644
--- a/src/OpenGl/OpenGl_Text.cxx
+++ b/src/OpenGl/OpenGl_Text.cxx
@@ -214,4 +214,7 @@ void OpenGl_Text::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
   }
 }
 
-/*----------------------------------------------------------------------*/
+void OpenGl_Text::Release (const Handle(OpenGl_Context)& theContext)
+{
+  //
+}
diff --git a/src/OpenGl/OpenGl_TextureBox.cxx b/src/OpenGl/OpenGl_TextureBox.cxx
index 263be9a..3988023 100644
--- a/src/OpenGl/OpenGl_TextureBox.cxx
+++ b/src/OpenGl/OpenGl_TextureBox.cxx
@@ -74,8 +74,8 @@
 #include <OpenGl_Display.hxx>
 #include <OpenGl_TextureBox.hxx>
 #include <OpenGl_ImageBox.hxx>
-#include <OpenGl_ResourceCleaner.hxx>
 #include <OpenGl_ResourceTexture.hxx>
+#include <OpenGl_Context.hxx>
 
 #include <GL/glu.h> // gluBuild2DMipmaps()
 
@@ -105,7 +105,6 @@ struct contextData
   GLuint number;
   GLDRAWABLE drawable;
   GLCONTEXT context;
-  char use_bind_texture;
 };
 
 struct texDraw
@@ -388,7 +387,6 @@ static void MyGenTextureEXT (TextureID ID)
 
   aContextData.context = GET_GL_CONTEXT();
   aContextData.drawable = GET_GLDEV_CONTEXT();
-  aContextData.use_bind_texture = (char )GL_TRUE;
   glGenTextures (1, &aContextData.number);
   textab(ID).contextdata.Append(aContextData);
   glBindTexture (texdata(data).type, aContextData.number);
@@ -667,61 +665,31 @@ void SetCurrentTexture(TextureID ID)
 
 /*----------------------------------------------------------------------*/
 
-void FreeTexture(TextureID ID)
+void FreeTexture (const Handle(OpenGl_Context)& theContext,
+                  TextureID                     ID)
 {
-  TextureDataID data;
-  bool notResource = false; // if there old-style texture deletion
-
-  GLCONTEXT cur_context = 0;
-  GLDRAWABLE cur_drawable;
-  int i;
-
-  if (!IsTextureValid(ID)) return;
+  if (!IsTextureValid (ID))
+  {
+    return;
+  }
 
-  data = textab(ID).data;
+  TextureDataID data = textab(ID).data;
   texdata(data).share_count--;
   if (texdata(data).share_count == 0)
-  {      
-    // liberation des datas de la textures
-   delete [] texdata(data).image;
+  {
+    // release texture data
+    delete [] texdata(data).image;
 
     // liberation de la texture dans tous les contextes
-    cur_drawable = GET_GLDEV_CONTEXT();
-    for (i = 0; i < textab(ID).contextdata.Length(); ++i)
+    for (int i = 0; i < textab(ID).contextdata.Length(); ++i)
     {
-      cur_context = 0;
-      bool isResource = false; 
-
-      if (textab(ID).contextdata(i).use_bind_texture)
-      {
-        if( !OpenGl_ResourceCleaner::GetInstance()->AddResource(textab(ID).contextdata(i).context, 
-            new OpenGl_ResourceTexture(textab(ID).contextdata(i).number)) )
-        {
-          GL_MAKE_CURRENT((openglDisplay.IsNull() ? (Display* )NULL : (Display* )openglDisplay->GetDisplay()),
-            textab(ID).contextdata(i).drawable,
-            textab(ID).contextdata(i).context);
-
-          // This check has been added to avoid exception, 
-          // which is raised when trying to delete textures when no rendering context is available
-          cur_context = GET_GL_CONTEXT();
-          if (cur_context)
-            glDeleteTextures (1, &textab(ID).contextdata(i).number);
-          notResource = true;
-        }
-        else
-        {
-          isResource = true;
-        }
+      Handle(OpenGl_ResourceTexture) aResource = new OpenGl_ResourceTexture (textab(ID).contextdata(i).number);
+      
+      if (!theContext.IsNull()) {
+        theContext->DelayedRelease (aResource);
       }
-
-      if( !isResource && cur_context )
-        glFinish();
     }
 
-    if( notResource )
-      GL_MAKE_CURRENT((openglDisplay.IsNull() ? (Display* )NULL : (Display* )openglDisplay->GetDisplay()),
-                      cur_drawable, cur_context);
-
     texdata(data).status = TEXDATA_NONE;
 
     textab(ID).contextdata.Clear();
@@ -962,33 +930,3 @@ void TransferTexture_To_Data(TextureID ID, TextureData *TransfDt)
   memcpy(TransfDt->plane1,  textab(ID).Plane1, sizeof(SizeType));
   memcpy(TransfDt->plane2,  textab(ID).Plane2, sizeof(SizeType));                
 }
-
-/*----------------------------------------------------------------------*/
-/* Transfere de donnee de la structure TransferData aux donnees internes */
-void TransferData_To_Texture(TextureData *TransfDt, TextureID *newID)
-{                            
-  TextureID ID;
-
-  /* Affectations */
-  FreeTexture(*newID);     
-  ID = GetTexture2DMipMap(TransfDt->path);  
-
-  if(IsTextureValid(ID))
-  {
-    /* Affectation de l id courant */
-    *newID = ID;
-
-    /* Donnees concernant les caracteristiques de la texture */ 
-    strcpy(texdata(textab(ID).data).imageFileName, TransfDt->path);       
-    textab(ID).Gen    = TransfDt->gen;
-    textab(ID).Wrap   = TransfDt->wrap;
-    textab(ID).Light  = TransfDt->render;
-    textab(ID).scalex = TransfDt->scalex;
-    textab(ID).scaley = TransfDt->scaley; 
-    textab(ID).transx = TransfDt->transx;
-    textab(ID).transy = TransfDt->transy;
-    textab(ID).angle  = TransfDt->angle;
-    memcpy(textab(ID).Plane1,  TransfDt->plane1, sizeof(SizeType));
-    memcpy(textab(ID).Plane2,  TransfDt->plane2, sizeof(SizeType)); 
-  }               
-}
diff --git a/src/OpenGl/OpenGl_TextureBufferArb.cxx b/src/OpenGl/OpenGl_TextureBufferArb.cxx
new file mode 100644
index 0000000..405b6fd
--- /dev/null
+++ b/src/OpenGl/OpenGl_TextureBufferArb.cxx
@@ -0,0 +1,151 @@
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#include <OpenGl_TextureBufferArb.hxx>
+
+#include <OpenGl_Context.hxx>
+#include <Standard_Assert.hxx>
+
+IMPLEMENT_STANDARD_HANDLE (OpenGl_TextureBufferArb, OpenGl_VertexBuffer)
+IMPLEMENT_STANDARD_RTTIEXT(OpenGl_TextureBufferArb, OpenGl_VertexBuffer)
+
+// =======================================================================
+// function : OpenGl_TextureBufferArb
+// purpose  :
+// =======================================================================
+OpenGl_TextureBufferArb::OpenGl_TextureBufferArb()
+: OpenGl_VertexBuffer(),
+  myTextureId (NO_TEXTURE),
+  myTexFormat (GL_RGBA32F)
+{
+  //
+}
+
+// =======================================================================
+// function : ~OpenGl_TextureBufferArb
+// purpose  :
+// =======================================================================
+OpenGl_TextureBufferArb::~OpenGl_TextureBufferArb()
+{
+  Release (NULL);
+}
+
+// =======================================================================
+// function : GetTarget
+// purpose  :
+// =======================================================================
+GLenum OpenGl_TextureBufferArb::GetTarget() const
+{
+  return GL_TEXTURE_BUFFER_ARB; // GL_TEXTURE_BUFFER for OpenGL 3.1+
+}
+
+// =======================================================================
+// function : Release
+// purpose  :
+// =======================================================================
+void OpenGl_TextureBufferArb::Release (const OpenGl_Context* theGlCtx)
+{
+  if (myTextureId != NO_TEXTURE)
+  {
+    // application can not handle this case by exception - this is bug in code
+    Standard_ASSERT_RETURN (theGlCtx != NULL,
+      "OpenGl_TextureBufferExt destroyed without GL context! Possible GPU memory leakage...",);
+
+    glDeleteTextures (1, &myTextureId);
+    myTextureId = NO_TEXTURE;
+  }
+  OpenGl_VertexBuffer::Release (theGlCtx);
+}
+
+// =======================================================================
+// function : Create
+// purpose  :
+// =======================================================================
+bool OpenGl_TextureBufferArb::Create (const Handle(OpenGl_Context)& theGlCtx)
+{
+  if (!OpenGl_VertexBuffer::Create (theGlCtx))
+  {
+    return false;
+  }
+
+  if (myTextureId == NO_TEXTURE)
+  {
+    glGenTextures (1, &myTextureId);
+  }
+  return myTextureId != NO_TEXTURE;
+}
+
+// =======================================================================
+// function : Init
+// purpose  :
+// =======================================================================
+bool OpenGl_TextureBufferArb::Init (const Handle(OpenGl_Context)& theGlCtx,
+                                    const GLuint   theComponentsNb,
+                                    const GLsizei  theElemsNb,
+                                    const GLfloat* theData)
+{
+  if (theComponentsNb != 1
+   && theComponentsNb != 2
+   && theComponentsNb != 4)
+  {
+    // unsupported format
+    return false;
+  }
+  else if (!Create (theGlCtx)
+        || !OpenGl_VertexBuffer::Init (theGlCtx, theComponentsNb, theElemsNb, theData))
+  {
+    return false;
+  }
+
+  switch (theComponentsNb)
+  {
+    case 1: myTexFormat = GL_R32F;    break;
+    case 2: myTexFormat = GL_RG32F;   break;
+    //case 3: myTexFormat = GL_RGB32F;  break; // GL_ARB_texture_buffer_object_rgb32
+    case 4: myTexFormat = GL_RGBA32F; break;
+  }
+
+  Bind (theGlCtx);
+  BindTexture (theGlCtx);
+  theGlCtx->arbTBO->glTexBufferARB (GetTarget(), myTexFormat, myBufferId);
+  UnbindTexture (theGlCtx);
+  Unbind (theGlCtx);
+  return true;
+}
+
+// =======================================================================
+// function : BindTexture
+// purpose  :
+// =======================================================================
+void OpenGl_TextureBufferArb::BindTexture (const Handle(OpenGl_Context)& theGlCtx,
+                                           const GLenum theTextureUnit) const
+{
+  theGlCtx->core20->glActiveTexture (theTextureUnit);
+  glBindTexture (GetTarget(), myTextureId);
+}
+
+// =======================================================================
+// function : UnbindTexture
+// purpose  :
+// =======================================================================
+void OpenGl_TextureBufferArb::UnbindTexture (const Handle(OpenGl_Context)& theGlCtx,
+                                             const GLenum theTextureUnit) const
+{
+  theGlCtx->core20->glActiveTexture (theTextureUnit);
+  glBindTexture (GetTarget(), NO_TEXTURE);
+}
diff --git a/src/OpenGl/OpenGl_Trihedron.cxx b/src/OpenGl/OpenGl_Trihedron.cxx
index 4fe764f..f6f019f 100644
--- a/src/OpenGl/OpenGl_Trihedron.cxx
+++ b/src/OpenGl/OpenGl_Trihedron.cxx
@@ -63,7 +63,7 @@ static const CALL_DEF_CONTEXTTEXT myDefaultContextText =
   { 1.F, 1.F, 1.F }, //ColorSubTitle
   0, //TextZoomable
   0.F, //TextAngle
-  OSD_FA_Regular //TextFontAspect
+  Font_FA_Regular //TextFontAspect
 };
 
 /*----------------------------------------------------------------------*/
diff --git a/src/OpenGl/OpenGl_VertexBuffer.cxx b/src/OpenGl/OpenGl_VertexBuffer.cxx
new file mode 100644
index 0000000..436e67d
--- /dev/null
+++ b/src/OpenGl/OpenGl_VertexBuffer.cxx
@@ -0,0 +1,290 @@
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#include <OpenGl_VertexBuffer.hxx>
+
+#include <OpenGl_Context.hxx>
+#include <Standard_Assert.hxx>
+
+IMPLEMENT_STANDARD_HANDLE (OpenGl_VertexBuffer, OpenGl_Resource)
+IMPLEMENT_STANDARD_RTTIEXT(OpenGl_VertexBuffer, OpenGl_Resource)
+
+// =======================================================================
+// function : OpenGl_VertexBuffer
+// purpose  :
+// =======================================================================
+OpenGl_VertexBuffer::OpenGl_VertexBuffer()
+: OpenGl_Resource(),
+  myBufferId (NO_BUFFER),
+  myComponentsNb (4),
+  myElemsNb (0),
+  myDataType (GL_FLOAT)
+{
+  //
+}
+
+// =======================================================================
+// function : ~OpenGl_VertexBuffer
+// purpose  :
+// =======================================================================
+OpenGl_VertexBuffer::~OpenGl_VertexBuffer()
+{
+  Release (NULL);
+}
+
+// =======================================================================
+// function : GetTarget
+// purpose  :
+// =======================================================================
+GLenum OpenGl_VertexBuffer::GetTarget() const
+{
+  return GL_ARRAY_BUFFER;
+}
+
+// =======================================================================
+// function : Create
+// purpose  :
+// =======================================================================
+bool OpenGl_VertexBuffer::Create (const Handle(OpenGl_Context)& theGlCtx)
+{
+  if (myBufferId == NO_BUFFER)
+  {
+    theGlCtx->core15->glGenBuffers (1, &myBufferId);
+  }
+  return myBufferId != NO_BUFFER;
+}
+
+// =======================================================================
+// function : Release
+// purpose  :
+// =======================================================================
+void OpenGl_VertexBuffer::Release (const OpenGl_Context* theGlCtx)
+{
+  if (myBufferId == NO_BUFFER)
+  {
+    return;
+  }
+
+  // application can not handle this case by exception - this is bug in code
+  Standard_ASSERT_RETURN (theGlCtx != NULL,
+    "OpenGl_VertexBuffer destroyed without GL context! Possible GPU memory leakage...",);
+
+  theGlCtx->core15->glDeleteBuffers (1, &myBufferId);
+  myBufferId = NO_BUFFER;
+}
+
+// =======================================================================
+// function : Bind
+// purpose  :
+// =======================================================================
+void OpenGl_VertexBuffer::Bind (const Handle(OpenGl_Context)& theGlCtx) const
+{
+  theGlCtx->core15->glBindBuffer (GetTarget(), myBufferId);
+}
+
+// =======================================================================
+// function : Unbind
+// purpose  :
+// =======================================================================
+void OpenGl_VertexBuffer::Unbind (const Handle(OpenGl_Context)& theGlCtx) const
+{
+  theGlCtx->core15->glBindBuffer (GetTarget(), NO_BUFFER);
+}
+
+// =======================================================================
+// function : Init
+// purpose  :
+// =======================================================================
+bool OpenGl_VertexBuffer::Init (const Handle(OpenGl_Context)& theGlCtx,
+                                const GLuint   theComponentsNb,
+                                const GLsizei  theElemsNb,
+                                const GLfloat* theData)
+{
+  if (!Create (theGlCtx))
+  {
+    return false;
+  }
+
+  Bind (theGlCtx);
+  myDataType     = GL_FLOAT;
+  myComponentsNb = theComponentsNb;
+  myElemsNb      = theElemsNb;
+  theGlCtx->core15->glBufferData (GetTarget(), GLsizeiptr(myElemsNb) * GLsizeiptr(myComponentsNb) * sizeof(GLfloat), theData, GL_STATIC_DRAW);
+  bool isDone = (glGetError() == GL_NO_ERROR); // GL_OUT_OF_MEMORY
+  Unbind (theGlCtx);
+  return isDone;
+}
+
+// =======================================================================
+// function : SubData
+// purpose  :
+// =======================================================================
+bool OpenGl_VertexBuffer::SubData (const Handle(OpenGl_Context)& theGlCtx,
+                                   const GLsizei  theElemFrom,
+                                   const GLsizei  theElemsNb,
+                                   const GLfloat* theData)
+{
+  if (!IsValid() || myDataType != GL_FLOAT ||
+      theElemFrom < 0 || ((theElemFrom + theElemsNb) > myElemsNb))
+  {
+    return false;
+  }
+
+  Bind (theGlCtx);
+  theGlCtx->core15->glBufferSubData (GetTarget(),
+                                     GLintptr(theElemFrom)  * GLintptr(myComponentsNb)   * sizeof(GLfloat), // offset in bytes
+                                     GLsizeiptr(theElemsNb) * GLsizeiptr(myComponentsNb) * sizeof(GLfloat), // size   in bytes
+                                     theData);
+  bool isDone = (glGetError() == GL_NO_ERROR); // some dummy error
+  Unbind (theGlCtx);
+  return isDone;
+}
+
+// =======================================================================
+// function : Init
+// purpose  :
+// =======================================================================
+bool OpenGl_VertexBuffer::Init (const Handle(OpenGl_Context)& theGlCtx,
+                                const GLuint  theComponentsNb,
+                                const GLsizei theElemsNb,
+                                const GLuint* theData)
+{
+  if (!Create (theGlCtx))
+  {
+    return false;
+  }
+
+  Bind (theGlCtx);
+  myDataType     = GL_UNSIGNED_INT;  
+  myComponentsNb = theComponentsNb;
+  myElemsNb      = theElemsNb;
+  theGlCtx->core15->glBufferData (GetTarget(), GLsizeiptr(myElemsNb) * GLsizeiptr(myComponentsNb) * sizeof(GLuint), theData, GL_STATIC_DRAW);
+  bool isDone = (glGetError() == GL_NO_ERROR); // GL_OUT_OF_MEMORY
+  Unbind (theGlCtx);
+  return isDone;
+}
+
+// =======================================================================
+// function : Init
+// purpose  :
+// =======================================================================
+bool OpenGl_VertexBuffer::Init (const Handle(OpenGl_Context)& theGlCtx,
+                                const GLuint   theComponentsNb,
+                                const GLsizei  theElemsNb,
+                                const GLubyte* theData)
+{
+  if (!Create (theGlCtx))
+  {
+    return false;
+  }
+
+  Bind (theGlCtx);
+  myDataType     = GL_UNSIGNED_BYTE;
+  myComponentsNb = theComponentsNb;
+  myElemsNb      = theElemsNb;
+  theGlCtx->core15->glBufferData (GetTarget(), GLsizeiptr(myElemsNb) * GLsizeiptr(myComponentsNb) * sizeof(GLubyte), theData, GL_STATIC_DRAW);
+  bool isDone = (glGetError() == GL_NO_ERROR); // GL_OUT_OF_MEMORY
+  Unbind (theGlCtx);
+  return isDone;
+}
+
+// =======================================================================
+// function : BindVertexAttrib
+// purpose  :
+// =======================================================================
+void OpenGl_VertexBuffer::BindVertexAttrib (const Handle(OpenGl_Context)& theGlCtx,
+                                            const GLuint                  theAttribLoc) const
+{
+  if (!IsValid() || theAttribLoc == GLuint (-1))
+  {
+    return;
+  }
+  Bind (theGlCtx);
+  theGlCtx->core20->glEnableVertexAttribArray (theAttribLoc);
+  theGlCtx->core20->glVertexAttribPointer (theAttribLoc, GLint (myComponentsNb), myDataType, GL_FALSE, 0, NULL);
+}
+
+// =======================================================================
+// function : UnbindVertexAttrib
+// purpose  :
+// =======================================================================
+void OpenGl_VertexBuffer::UnbindVertexAttrib (const Handle(OpenGl_Context)& theGlCtx,
+                                              const GLuint                  theAttribLoc) const
+{
+  if (!IsValid() || theAttribLoc == GLuint (-1))
+  {
+    return;
+  }
+  theGlCtx->core20->glDisableVertexAttribArray (theAttribLoc);
+  Unbind (theGlCtx);
+}
+
+// =======================================================================
+// function : BindFixed
+// purpose  :
+// =======================================================================
+void OpenGl_VertexBuffer::BindFixed (const Handle(OpenGl_Context)& theGlCtx,
+                                     const GLenum                  theMode) const
+{
+  if (!IsValid())
+  {
+    return;
+  }
+
+  Bind (theGlCtx);
+  glEnableClientState (theMode);
+  switch (theMode)
+  {
+    case GL_VERTEX_ARRAY:
+    {
+      glVertexPointer (static_cast<GLint> (myComponentsNb), myDataType, 0, NULL);
+      break;
+    }
+    case GL_NORMAL_ARRAY:
+    {
+      glNormalPointer (myDataType, 0, NULL);
+      break;
+    }
+    case GL_TEXTURE_COORD_ARRAY:
+    {
+      glTexCoordPointer (static_cast<GLint> (myComponentsNb), myDataType, 0, NULL);
+      break;
+    }
+    case GL_COLOR_ARRAY:
+    {
+      glColorPointer (static_cast<GLint> (myComponentsNb), myDataType, 0, NULL);
+      break;
+    }
+    default: break;
+  }
+}
+
+// =======================================================================
+// function : UnbindFixed
+// purpose  :
+// =======================================================================
+void OpenGl_VertexBuffer::UnbindFixed (const Handle(OpenGl_Context)& theGlCtx,
+                                       const GLenum                  theMode) const
+{
+  if (!IsValid())
+  {
+    return;
+  }
+  Unbind (theGlCtx);
+  glDisableClientState (theMode);
+}
diff --git a/src/OpenGl/OpenGl_View_2.cxx b/src/OpenGl/OpenGl_View_2.cxx
index 8fbb725..3b25764 100644
--- a/src/OpenGl/OpenGl_View_2.cxx
+++ b/src/OpenGl/OpenGl_View_2.cxx
@@ -960,8 +960,6 @@ D = -[Px,Py,Pz] dot |Nx|
 
 */
 
-  glPushAttrib( GL_FOG_BIT | GL_LIGHTING_BIT | GL_ENABLE_BIT );
-
   // Apply Fog
   if ( myFog.IsOn )
   {
@@ -1185,8 +1183,11 @@ D = -[Px,Py,Pz] dot |Nx|
     }
   }
 
-  /* restore previous graphics context; before update lights */
-  //TsmPopAttri();
+  // Resetting GL parameters according to the default aspects
+  // in order to synchronize GL state with the graphic driver state
+  // before drawing auxiliary stuff (trihedrons, overlayer)
+  // and invoking optional callbacks
+  AWorkspace->ResetAppliedAspect();
 
   // Disable current clipping planes
   for ( planeid = GL_CLIP_PLANE0; planeid < lastid; planeid++ )
@@ -1198,14 +1199,6 @@ D = -[Px,Py,Pz] dot |Nx|
   if (!myGraduatedTrihedron.IsNull())
     myGraduatedTrihedron->Render(AWorkspace);
 
-  // The applied aspects should be reset to make it possible to
-  // update gl state and bring it into line with currently set
-  // aspects by reapplying them. Reset should be done, because
-  // the glPopAttrib() will return original gl state while the
-  // internal TKOpenGl state stills unchanged.
-  AWorkspace->ResetAppliedAspect();
-  glPopAttrib(); // GL_FOG_BIT | GL_LIGHTING_BIT | GL_ENABLE_BIT
-
   // Restore face culling
   if ( myBackfacing )
   {
@@ -1300,13 +1293,6 @@ void OpenGl_View::RedrawLayer2d (const Handle(OpenGl_Workspace) &AWorkspace, con
   GLsizei dispWidth  = (GLsizei )ACLayer.viewport[0];
   GLsizei dispHeight = (GLsizei )ACLayer.viewport[1];
 
-  const GLboolean isl = glIsEnabled(GL_LIGHTING); /*OCC6247*/
-  if (isl)
-    glDisable(GL_LIGHTING); /*OCC6247*/
-
-  /*
-  * On positionne la projection
-  */
   glMatrixMode( GL_MODELVIEW );
   glPushMatrix ();
   glLoadIdentity ();
@@ -1332,7 +1318,7 @@ void OpenGl_View::RedrawLayer2d (const Handle(OpenGl_Workspace) &AWorkspace, con
     ratio = ACView.DefWindow.dx/ACView.DefWindow.dy;
 
   float delta;
-  if (ratio >= 1.0) { /* fenetre horizontale */
+  if (ratio >= 1.0) {
     delta = (float )((top - bottom)/2.0);
     switch (attach) {
       case 0: /* Aspect_TOC_BOTTOM_LEFT */
@@ -1349,7 +1335,7 @@ void OpenGl_View::RedrawLayer2d (const Handle(OpenGl_Workspace) &AWorkspace, con
         break;
     }
   }
-  else { /* fenetre verticale */
+  else {
     delta = (float )((right - left)/2.0);
     switch (attach) {
       case 0: /* Aspect_TOC_BOTTOM_LEFT */
@@ -1396,13 +1382,16 @@ void OpenGl_View::RedrawLayer2d (const Handle(OpenGl_Workspace) &AWorkspace, con
 
   glOrtho (left, right, bottom, top, -1.0, 1.0);
 
-  /*
-  * On trace la display-list associee au layer.
-  */
   glPushAttrib (
     GL_LIGHTING_BIT | GL_LINE_BIT | GL_POLYGON_BIT |
     GL_DEPTH_BUFFER_BIT | GL_CURRENT_BIT | GL_TEXTURE_BIT );
+
   glDisable (GL_DEPTH_TEST);
+  glDisable (GL_TEXTURE_1D);
+  glDisable (GL_TEXTURE_2D);
+  glDisable (GL_LIGHTING);
+
+  // TODO: Obsolete code, the display list is always empty now, to be removed
   glCallList (ACLayer.ptrLayer->listIndex);
 
   //calling dynamic render of LayerItems
@@ -1415,25 +1404,16 @@ void OpenGl_View::RedrawLayer2d (const Handle(OpenGl_Workspace) &AWorkspace, con
 
   glPopAttrib ();
 
-  /*
-  * On retire la projection
-  */
   glMatrixMode (GL_PROJECTION);
   glPopMatrix ();
 
   glMatrixMode( GL_MODELVIEW );
   glPopMatrix ();
 
-  /*
-  * Restauration du Viewport en cas de modification
-  */
   if (!ACLayer.sizeDependent)
     glViewport (0, 0, (GLsizei) ACView.DefWindow.dx, (GLsizei) ACView.DefWindow.dy);
 
   glFlush ();
-
-  if (isl)
-    glEnable(GL_LIGHTING); /*OCC6247*/
 }
 
 /*----------------------------------------------------------------------*/
diff --git a/src/OpenGl/OpenGl_Window.cxx b/src/OpenGl/OpenGl_Window.cxx
index 26f464d..5d9f365 100644
--- a/src/OpenGl/OpenGl_Window.cxx
+++ b/src/OpenGl/OpenGl_Window.cxx
@@ -24,8 +24,6 @@
 
 #include <OpenGl_Context.hxx>
 #include <OpenGl_Display.hxx>
-#include <OpenGl_ResourceCleaner.hxx>
-#include <OpenGl_ResourceTexture.hxx>
 
 #include <Aspect_GraphicDeviceDefinitionError.hxx>
 #include <TCollection_AsciiString.hxx>
@@ -39,56 +37,90 @@ namespace
 {
   static const TEL_COLOUR THE_DEFAULT_BG_COLOR = { { 0.F, 0.F, 0.F, 1.F } };
 
-  static GLCONTEXT ThePreviousCtx = 0; // to share GL resources
-#if (!defined(_WIN32) && !defined(__WIN32__))
-  static GLXContext TheDeadGlxCtx; // Context to be destroyed
-  static Display*   TheDeadGlxDpy; // Display associated with TheDeadGlxCtx
-#endif
-  
 #if (defined(_WIN32) || defined(__WIN32__))
-  static int find_pixel_format (HDC hDC, PIXELFORMATDESCRIPTOR* pfd, const Standard_Boolean dbuff)
+  static int find_pixel_format (HDC                    theDevCtx,
+                                PIXELFORMATDESCRIPTOR& thePixelFrmt,
+                                const Standard_Boolean theIsDoubleBuff)
   {
-    PIXELFORMATDESCRIPTOR pfd0;
-    memset (&pfd0, 0, sizeof (PIXELFORMATDESCRIPTOR));
-    pfd0.nSize           = sizeof (PIXELFORMATDESCRIPTOR);
-    pfd0.nVersion        = 1;
-    pfd0.dwFlags         = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | (dbuff ? PFD_DOUBLEBUFFER : PFD_SUPPORT_GDI);
-    pfd0.iPixelType      = PFD_TYPE_RGBA;
-    pfd0.iLayerType      = PFD_MAIN_PLANE;
-
-    int       iPixelFormat = 0;
-    int       iGood = 0;
-    const BYTE cBits[] = { 32, 24 };
-    const BYTE dBits[] = { 32, 24, 16 };
-
-    int i, j;
-    for (i = 0; i < sizeof(dBits) / sizeof(BYTE); i++)
+    PIXELFORMATDESCRIPTOR aPixelFrmtTmp;
+    memset (&aPixelFrmtTmp, 0, sizeof (PIXELFORMATDESCRIPTOR));
+    aPixelFrmtTmp.nSize      = sizeof (PIXELFORMATDESCRIPTOR);
+    aPixelFrmtTmp.nVersion   = 1;
+    aPixelFrmtTmp.dwFlags    = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | (theIsDoubleBuff ? PFD_DOUBLEBUFFER : PFD_SUPPORT_GDI);
+    aPixelFrmtTmp.iPixelType = PFD_TYPE_RGBA;
+    aPixelFrmtTmp.iLayerType = PFD_MAIN_PLANE;
+
+    const int BUFF_BITS_STENCIL[] = {  8,  1     };
+    const BYTE BUFF_BITS_COLOR[]  = { 32, 24     };
+    const BYTE BUFF_BITS_DEPTH[]  = { 32, 24, 16 };
+
+    int aGoodBits[] = { 0, 0, 0 };
+    int aPixelFrmtIdLast = 0;
+    int aPixelFrmtIdGood = 0;
+    Standard_Size aStencilIter = 0, aColorIter = 0, aDepthIter = 0;
+    for (aStencilIter = 0; aStencilIter < sizeof(BUFF_BITS_STENCIL) / sizeof(int); ++aStencilIter)
     {
-      pfd0.cDepthBits = dBits[i];
-      iGood = 0;
-      for (j = 0; j < sizeof(cBits) / sizeof(BYTE); j++)
+      aPixelFrmtTmp.cStencilBits = BUFF_BITS_STENCIL[aStencilIter];
+      for (aDepthIter = 0; aDepthIter < sizeof(BUFF_BITS_DEPTH) / sizeof(BYTE); ++aDepthIter)
       {
-        pfd0.cColorBits = cBits[j];
-        iPixelFormat = ChoosePixelFormat (hDC, &pfd0);
-        if (iPixelFormat)
+        aPixelFrmtTmp.cDepthBits = BUFF_BITS_DEPTH[aDepthIter];
+        aPixelFrmtIdGood = 0;
+        for (aColorIter = 0; aColorIter < sizeof(BUFF_BITS_COLOR) / sizeof(BYTE); ++aColorIter)
         {
-          pfd->cDepthBits = 0;
-          pfd->cColorBits = 0;
-          DescribePixelFormat (hDC, iPixelFormat, sizeof (PIXELFORMATDESCRIPTOR), pfd);
-          if (pfd->cColorBits >= cBits[j] && pfd->cDepthBits >= dBits[i])
+          aPixelFrmtTmp.cColorBits = BUFF_BITS_COLOR[aColorIter];
+          aPixelFrmtIdLast = ChoosePixelFormat (theDevCtx, &aPixelFrmtTmp);
+          if (aPixelFrmtIdLast == 0)
+          {
+            continue;
+          }
+
+          thePixelFrmt.cDepthBits   = 0;
+          thePixelFrmt.cColorBits   = 0;
+          thePixelFrmt.cStencilBits = 0;
+          DescribePixelFormat (theDevCtx, aPixelFrmtIdLast, sizeof(PIXELFORMATDESCRIPTOR), &thePixelFrmt);
+          if (thePixelFrmt.cColorBits   >= BUFF_BITS_COLOR[aColorIter]
+           && thePixelFrmt.cDepthBits   >= BUFF_BITS_DEPTH[aDepthIter]
+           && thePixelFrmt.cStencilBits >= BUFF_BITS_STENCIL[aStencilIter])
+          {
             break;
-          if (iGood == 0)
-            iGood = iPixelFormat;
+          }
+          if (thePixelFrmt.cColorBits > aGoodBits[0])
+          {
+            aGoodBits[0] = thePixelFrmt.cColorBits;
+            aGoodBits[1] = thePixelFrmt.cDepthBits;
+            aGoodBits[2] = thePixelFrmt.cStencilBits;
+            aPixelFrmtIdGood = aPixelFrmtIdLast;
+          }
+          else if (thePixelFrmt.cColorBits == aGoodBits[0])
+          {
+            if (thePixelFrmt.cDepthBits > aGoodBits[1])
+            {
+              aGoodBits[1] = thePixelFrmt.cDepthBits;
+              aGoodBits[2] = thePixelFrmt.cStencilBits;
+              aPixelFrmtIdGood = aPixelFrmtIdLast;
+            }
+            else if (thePixelFrmt.cDepthBits == aGoodBits[1])
+            {
+              if(thePixelFrmt.cStencilBits > aGoodBits[2])
+              {
+                aGoodBits[2] = thePixelFrmt.cStencilBits;
+                aPixelFrmtIdGood = aPixelFrmtIdLast;
+              }
+            }
+          }
+        }
+        if (aColorIter < sizeof(BUFF_BITS_COLOR) / sizeof(int))
+        {
+          break;
         }
       }
-      if (j < sizeof(cBits) / sizeof(BYTE))
+      if (aDepthIter < sizeof(BUFF_BITS_DEPTH) / sizeof(int))
+      {
         break;
+      }
     }
 
-    if (iPixelFormat == 0)
-      iPixelFormat = iGood;
-
-    return iPixelFormat;
+    return (aPixelFrmtIdLast == 0) ? aPixelFrmtIdGood : aPixelFrmtIdLast;
   }
 #else
   static Bool WaitForNotify (Display* theDisp, XEvent* theEv, char* theArg)
@@ -105,14 +137,12 @@ namespace
 // =======================================================================
 OpenGl_Window::OpenGl_Window (const Handle(OpenGl_Display)& theDisplay,
                               const CALL_DEF_WINDOW&        theCWindow,
-                              Aspect_RenderingContext       theGContext)
+                              Aspect_RenderingContext       theGContext,
+                              const Handle(OpenGl_Context)& theShareCtx)
 : myDisplay (theDisplay),
-  myWindow (0),
-  myGContext ((GLCONTEXT )theGContext),
   myGlContext (new OpenGl_Context()),
   myOwnGContext (theGContext == 0),
 #if (defined(_WIN32) || defined(__WIN32__))
-  myWindowDC (0),
   mySysPalInUse (FALSE),
 #endif
   myWidth ((Standard_Integer )theCWindow.dx),
@@ -125,11 +155,80 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_Display)& theDisplay,
   myBgColor.rgb[1] = theCWindow.Background.g;
   myBgColor.rgb[2] = theCWindow.Background.b;
 
-  WINDOW aParent = (WINDOW )theCWindow.XWindow;
-  
-#if (!defined(_WIN32) && !defined(__WIN32__))
+#if (defined(_WIN32) || defined(__WIN32__))
+  HWND  aWindow   = (HWND )theCWindow.XWindow;
+  HDC   aWindowDC = GetDC (aWindow);
+  HGLRC aGContext = (HGLRC )theGContext;
+
+  PIXELFORMATDESCRIPTOR aPixelFrmt;
+  const int aPixelFrmtId = find_pixel_format (aWindowDC, aPixelFrmt, myDisplay->DBuffer());
+  if (aPixelFrmtId == 0)
+  {
+    ReleaseDC (aWindow, aWindowDC);
+
+    TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: ChoosePixelFormat failed. Error code: ");
+    aMsg += (int )GetLastError();
+    Aspect_GraphicDeviceDefinitionError::Raise (aMsg.ToCString());
+    return;
+  }
+
+  if (aPixelFrmt.dwFlags & PFD_NEED_PALETTE)
+  {
+    WINDOW_DATA* aWndData = (WINDOW_DATA* )GetWindowLongPtr (aWindow, GWLP_USERDATA);
+
+    mySysPalInUse = (aPixelFrmt.dwFlags & PFD_NEED_SYSTEM_PALETTE) ? TRUE : FALSE;
+    InterfaceGraphic_RealizePalette (aWindowDC, aWndData->hPal, FALSE, mySysPalInUse);
+  }
+
+  if (myDither)
+  {
+    myDither = (aPixelFrmt.cColorBits <= 8);
+  }
+
+  if (myBackDither)
+  {
+    myBackDither = (aPixelFrmt.cColorBits <= 8);
+  }
+
+  if (!SetPixelFormat (aWindowDC, aPixelFrmtId, &aPixelFrmt))
+  {
+    ReleaseDC (aWindow, aWindowDC);
+
+    TCollection_AsciiString aMsg("OpenGl_Window::CreateWindow: SetPixelFormat failed. Error code: ");
+    aMsg += (int )GetLastError();
+    Aspect_GraphicDeviceDefinitionError::Raise (aMsg.ToCString());
+    return;
+  }
+
+  if (aGContext == NULL)
+  {
+    aGContext = wglCreateContext (aWindowDC);
+    if (aGContext == NULL)
+    {
+      ReleaseDC (aWindow, aWindowDC);
+
+      TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: wglCreateContext failed. Error code: ");
+      aMsg += (int )GetLastError();
+      Aspect_GraphicDeviceDefinitionError::Raise (aMsg.ToCString());
+      return;
+    }
+  }
+
+  // all GL context within one OpenGl_GraphicDriver should be shared!
+  if (!theShareCtx.IsNull() && wglShareLists ((HGLRC )theShareCtx->myGContext, aGContext) != TRUE)
+  {
+    TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: wglShareLists failed. Error code: ");
+    aMsg += (int )GetLastError();
+    Aspect_GraphicDeviceDefinitionError::Raise (aMsg.ToCString());
+    return;
+  }
 
+  myGlContext->Init ((Aspect_Handle )aWindow, (Aspect_Handle )aWindowDC, (Aspect_RenderingContext )aGContext);
+#else
+  WINDOW aParent = (WINDOW )theCWindow.XWindow;
+  WINDOW aWindow = 0;
   DISPLAY* aDisp = (DISPLAY* )myDisplay->GetDisplay();
+  GLXContext aGContext = (GLXContext )theGContext;
 
   XWindowAttributes wattr;
   XGetWindowAttributes (aDisp, aParent, &wattr);
@@ -145,8 +244,6 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_Display)& theDisplay,
     aVis = XGetVisualInfo (aDisp, aVisInfoMask, &aVisInfo, &aNbItems);
   }
 
-  WINDOW win;
-
   if (!myOwnGContext)
   {
     if (aVis != NULL)
@@ -155,17 +252,15 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_Display)& theDisplay,
       return;
     }
 
-    win = aParent;
+    aWindow = aParent;
   }
   else
   {
-    GLCONTEXT ctx;
-
-  #if defined(__linux) || defined(Linux)
+  #if defined(__linux) || defined(Linux) || defined(__APPLE__)
     if (aVis != NULL)
     {
       // check Visual for OpenGl context's parameters compability
-      int isGl = 0, isDoubleBuffer = 0, isRGBA = 0, aDepthSize = 0;
+      int isGl = 0, isDoubleBuffer = 0, isRGBA = 0, aDepthSize = 0, aStencilSize = 0;
 
       if (glXGetConfig (aDisp, aVis, GLX_USE_GL, &isGl) != 0)
         isGl = 0;
@@ -179,6 +274,9 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_Display)& theDisplay,
       if (glXGetConfig (aDisp, aVis, GLX_DEPTH_SIZE, &aDepthSize) != 0)
         aDepthSize = 0;
 
+      if (glXGetConfig (aDisp, aVis, GLX_STENCIL_SIZE, &aStencilSize) != 0)
+        aStencilSize = 0;
+
       if (!isGl || !aDepthSize || !isRGBA  || (isDoubleBuffer ? 1 : 0) != (myDisplay->DBuffer()? 1 : 0))
       {
         XFree (aVis);
@@ -190,12 +288,15 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_Display)& theDisplay,
     if (aVis == NULL)
     {
       int anIter = 0;
-      int anAttribs[11];
+      int anAttribs[13];
       anAttribs[anIter++] = GLX_RGBA;
 
       anAttribs[anIter++] = GLX_DEPTH_SIZE;
       anAttribs[anIter++] = 1;
 
+      anAttribs[anIter++] = GLX_STENCIL_SIZE;
+      anAttribs[anIter++] = 1;
+
       anAttribs[anIter++] = GLX_RED_SIZE;
       anAttribs[anIter++] = (wattr.depth <= 8) ? 0 : 1;
 
@@ -218,36 +319,22 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_Display)& theDisplay,
       }
     }
 
-    if (TheDeadGlxCtx)
-    {
-      // recover display lists from TheDeadGlxCtx, then destroy it
-      ctx = glXCreateContext (aDisp, aVis, TheDeadGlxCtx, GL_TRUE);
-
-      OpenGl_ResourceCleaner::GetInstance()->RemoveContext (TheDeadGlxCtx);
-      glXDestroyContext (TheDeadGlxDpy, TheDeadGlxCtx);
-
-      TheDeadGlxCtx = 0;
-    }
-    else if (ThePreviousCtx == 0)
+    if (!theShareCtx.IsNull())
     {
-      ctx = glXCreateContext (aDisp, aVis, NULL, GL_TRUE);
+      // ctx est une copie du previous
+      aGContext = glXCreateContext (aDisp, aVis, (GLXContext )theShareCtx->myGContext, GL_TRUE);
     }
     else
     {
-      // ctx est une copie du previous
-      ctx = glXCreateContext (aDisp, aVis, ThePreviousCtx, GL_TRUE);
+      aGContext = glXCreateContext (aDisp, aVis, NULL, GL_TRUE);
     }
 
-    if (!ctx)
+    if (!aGContext)
     {
       Aspect_GraphicDeviceDefinitionError::Raise ("OpenGl_Window::CreateWindow: glXCreateContext failed.");
       return;
     }
 
-    OpenGl_ResourceCleaner::GetInstance()->AppendContext (ctx, true);
-
-    ThePreviousCtx = ctx;
-
     Colormap cmap = XCreateColormap (aDisp, aParent, aVis->visual, AllocNone);
 
     XColor color;
@@ -265,25 +352,23 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_Display)& theDisplay,
 
     if (aVis->visualid == wattr.visual->visualid)
     {
-      win = aParent;
+      aWindow = aParent;
     }
     else
     {
       unsigned long mask = CWBackPixel | CWColormap | CWBorderPixel | CWEventMask;
-      win = XCreateWindow (aDisp, aParent, 0, 0, myWidth, myHeight, 0/*bw*/, aVis->depth, InputOutput, aVis->visual, mask, &cwa);
+      aWindow = XCreateWindow (aDisp, aParent, 0, 0, myWidth, myHeight, 0/*bw*/, aVis->depth, InputOutput, aVis->visual, mask, &cwa);
     }
 
-    XSetWindowBackground (aDisp, win, cwa.background_pixel);
-    XClearWindow (aDisp, win);
+    XSetWindowBackground (aDisp, aWindow, cwa.background_pixel);
+    XClearWindow (aDisp, aWindow);
 
-    if (win != aParent)
+    if (aWindow != aParent)
     {
       XEvent anEvent;
-      XMapWindow (aDisp, win);
-      XIfEvent (aDisp, &anEvent, WaitForNotify, (char* )win);
+      XMapWindow (aDisp, aWindow);
+      XIfEvent (aDisp, &anEvent, WaitForNotify, (char* )aWindow);
     }
-
-    myGContext = ctx;
   }
 
   /*
@@ -299,111 +384,22 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_Display)& theDisplay,
   * (Carte Impact avec GLX_RED_SIZE a 5 par exemple)
   */
 
-  int value;
-  glXGetConfig (aDisp, aVis, GLX_RED_SIZE, &value);
+  int aValue;
+  glXGetConfig (aDisp, aVis, GLX_RED_SIZE, &aValue);
 
   if (myDither)
-    myDither = (value < 8);
+    myDither = (aValue < 8);
 
   if (myBackDither)
     myBackDither = (aVis->depth <= 8);
 
   XFree ((char* )aVis);
 
-  myWindow = win;
-
-#else
-
-  myWindowDC = GetDC (aParent);
-
-  PIXELFORMATDESCRIPTOR pfd;
-  int iPixelFormat = find_pixel_format (myWindowDC, &pfd, myDisplay->DBuffer());
-  if (iPixelFormat == 0)
-  {
-    ReleaseDC (aParent, myWindowDC);
-    myWindowDC = 0;
-
-    TCollection_AsciiString msg ("OpenGl_Window::CreateWindow: ChoosePixelFormat failed. Error code: ");
-    msg += (int )GetLastError();
-    Aspect_GraphicDeviceDefinitionError::Raise (msg.ToCString());
-    return;
-  }
-
-  if (pfd.dwFlags & PFD_NEED_PALETTE)
-  {
-    WINDOW_DATA* wd = (WINDOW_DATA* )GetWindowLongPtr (aParent, GWLP_USERDATA);
-
-    mySysPalInUse = (pfd.dwFlags & PFD_NEED_SYSTEM_PALETTE) ? TRUE : FALSE;
-    InterfaceGraphic_RealizePalette (myWindowDC, wd->hPal, FALSE, mySysPalInUse);
-  }
-
-  if (myDither)
-    myDither = (pfd.cColorBits <= 8);
-
-  if (myBackDither)
-    myBackDither = (pfd.cColorBits <= 8);
-
-  if (!SetPixelFormat (myWindowDC, iPixelFormat, &pfd))
-  {
-    ReleaseDC (aParent, myWindowDC);
-    myWindowDC = NULL;
-
-    TCollection_AsciiString msg("OpenGl_Window::CreateWindow: SetPixelFormat failed. Error code: ");
-    msg += (int)GetLastError();
-    Aspect_GraphicDeviceDefinitionError::Raise (msg.ToCString());
-    return;
-  }
-
-  if (!myOwnGContext)
-  {
-    ThePreviousCtx = myGContext;
-  }
-  else
-  {
-    myGContext = wglCreateContext (myWindowDC);
-    if (myGContext == NULL)
-    {
-      ReleaseDC (aParent, myWindowDC);
-      myWindowDC = NULL;
-
-      TCollection_AsciiString msg ("OpenGl_Window::CreateWindow: wglCreateContext failed. Error code: ");
-      msg += (int )GetLastError();
-      Aspect_GraphicDeviceDefinitionError::Raise (msg.ToCString());
-      return;
-    }
-
-    Standard_Boolean isShared = Standard_True;
-    if (ThePreviousCtx == NULL)
-    {
-      ThePreviousCtx = myGContext;
-    }
-    else
-    {
-      // if we already have some shared context
-      GLCONTEXT shareCtx = OpenGl_ResourceCleaner::GetInstance()->GetSharedContext();
-      if (shareCtx != NULL)
-      {
-        // try to share context with one from resource cleaner list
-        isShared = (Standard_Boolean )wglShareLists (shareCtx, myGContext);
-      }
-      else
-      {
-        isShared = (Standard_Boolean )wglShareLists (ThePreviousCtx, myGContext);
-        // add shared ThePreviousCtx to a control list if it's not there
-        if (isShared)
-          OpenGl_ResourceCleaner::GetInstance()->AppendContext (ThePreviousCtx, isShared);
-      }
-    }
-
-    // add the context to OpenGl_ResourceCleaner control list
-    OpenGl_ResourceCleaner::GetInstance()->AppendContext (myGContext, isShared);
-  }
-
-  myWindow = aParent;
+  myGlContext->Init ((Aspect_Drawable )aWindow, (Aspect_Display )myDisplay->GetDisplay(), (Aspect_RenderingContext )aGContext);
 #endif
+  myGlContext->Share (theShareCtx);
 
   Init();
-  myGlContext->Init();
 }
 
 // =======================================================================
@@ -412,49 +408,31 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_Display)& theDisplay,
 // =======================================================================
 OpenGl_Window::~OpenGl_Window()
 {
-  DISPLAY* aDisp = (DISPLAY* )myDisplay->GetDisplay();
-  if (aDisp == NULL || !myOwnGContext)
-    return;
-
 #if (defined(_WIN32) || defined(__WIN32__))
-  OpenGl_ResourceCleaner::GetInstance()->RemoveContext (myGContext);
-
-  if (wglGetCurrentContext() != NULL)
-    wglDeleteContext (myGContext);
-  ReleaseDC (myWindow, myWindowDC);
+  HWND  aWindow   = (HWND  )myGlContext->myWindow;
+  HDC   aWindowDC = (HDC   )myGlContext->myWindowDC;
+  HGLRC aGContext = (HGLRC )myGlContext->myGContext;
+  myGlContext.Nullify();
 
-  if (myDisplay->myMapOfWindows.Size() == 0)
-    ThePreviousCtx = 0;
-#else
-  // FSXXX sync necessary if non-direct rendering
-  glXWaitGL();
-
-  if (ThePreviousCtx == myGContext)
+  if (myOwnGContext)
   {
-    ThePreviousCtx = NULL;
-    if (myDisplay->myMapOfWindows.Size() > 0)
+    if (wglGetCurrentContext() != NULL)
     {
-      NCollection_DataMap<Standard_Integer, Handle(OpenGl_Window)>::Iterator it (myDisplay->myMapOfWindows);
-      ThePreviousCtx = it.Value()->myGContext;
-    }
-
-    // if this is the last remaining context, do not destroy it yet, to avoid
-    // losing any shared display lists (fonts...)
-    if (ThePreviousCtx)
-    {
-      OpenGl_ResourceCleaner::GetInstance()->RemoveContext(myGContext);
-      glXDestroyContext(aDisp, myGContext);
-    }
-    else
-    {
-      TheDeadGlxCtx = myGContext;
-      TheDeadGlxDpy = aDisp;
+      wglDeleteContext (aGContext);
     }
+    ReleaseDC (aWindow, aWindowDC);
   }
-  else
+#else
+  GLXDrawable aWindow   = (GLXDrawable )myGlContext->myWindow;
+  Display*    aDisplay  = (Display*    )myGlContext->myDisplay;
+  GLXContext  aGContext = (GLXContext  )myGlContext->myGContext;
+  myGlContext.Nullify();
+
+  if (aDisplay != NULL && myOwnGContext)
   {
-    OpenGl_ResourceCleaner::GetInstance()->RemoveContext (myGContext);
-    glXDestroyContext (aDisp, myGContext);
+    // FSXXX sync necessary if non-direct rendering
+    glXWaitGL();
+    glXDestroyContext (aDisplay, aGContext);
   }
 #endif
 }
@@ -465,28 +443,7 @@ OpenGl_Window::~OpenGl_Window()
 // =======================================================================
 Standard_Boolean OpenGl_Window::Activate()
 {
-  DISPLAY* aDisp = (DISPLAY* )myDisplay->GetDisplay();
-  if (aDisp == NULL)
-    return Standard_False;
-
-#if (defined(_WIN32) || defined(__WIN32__))
-  if (!wglMakeCurrent (myWindowDC, myGContext))
-  {
-    //GLenum errorcode = glGetError();
-    //const GLubyte *errorstring = gluErrorString(errorcode);
-    //printf("wglMakeCurrent failed: %d %s\n", errorcode, errorstring);
-    return Standard_False;
-  }
-#else
-  if (!glXMakeCurrent (aDisp, myWindow, myGContext))
-  {
-    // if there is no current context it might be impossible to use glGetError correctly
-    //printf("glXMakeCurrent failed!\n");
-    return Standard_False;
-  }
-#endif
-
-  return Standard_True;
+  return myGlContext->MakeCurrent();
 }
 
 // =======================================================================
@@ -507,7 +464,7 @@ void OpenGl_Window::Resize (const CALL_DEF_WINDOW& theCWindow)
   myHeight = (Standard_Integer )theCWindow.dy;
 
 #if (!defined(_WIN32) && !defined(__WIN32__))
-  XResizeWindow (aDisp, myWindow, (unsigned int )myWidth, (unsigned int )myHeight);
+  XResizeWindow (aDisp, myGlContext->myWindow, (unsigned int )myWidth, (unsigned int )myHeight);
   XSync (aDisp, False);
 #endif
 
@@ -561,7 +518,7 @@ void OpenGl_Window::Init()
 
 #if (defined(_WIN32) || defined(__WIN32__))
   RECT cr;
-  GetClientRect (myWindow, &cr);
+  GetClientRect ((HWND )myGlContext->myWindow, &cr);
   myWidth  = cr.right - cr.left;
   myHeight = cr.bottom - cr.top;
 #else
@@ -571,7 +528,7 @@ void OpenGl_Window::Init()
   unsigned int aNewWidth  = 0;
   unsigned int aNewHeight = 0;
   DISPLAY* aDisp = (DISPLAY* )myDisplay->GetDisplay();
-  XGetGeometry (aDisp, myWindow, &aRootWin, &aDummy, &aDummy, &aNewWidth, &aNewHeight, &aDummyU, &aDummyU);
+  XGetGeometry (aDisp, myGlContext->myWindow, &aRootWin, &aDummy, &aDummy, &aNewWidth, &aNewHeight, &aDummyU, &aDummyU);
   myWidth  = aNewWidth;
   myHeight = aNewHeight;
 #endif
@@ -701,3 +658,12 @@ void OpenGl_Window::MakeFrontAndBackBufCurrent() const
 {
   glDrawBuffer (GL_FRONT_AND_BACK);
 }
+
+// =======================================================================
+// function : GetGContext
+// purpose  :
+// =======================================================================
+GLCONTEXT OpenGl_Window::GetGContext() const
+{
+  return (GLCONTEXT )myGlContext->myGContext;
+}
diff --git a/src/OpenGl/OpenGl_Workspace.cxx b/src/OpenGl/OpenGl_Workspace.cxx
index a52fd0f..f44549e 100644
--- a/src/OpenGl/OpenGl_Workspace.cxx
+++ b/src/OpenGl/OpenGl_Workspace.cxx
@@ -63,8 +63,9 @@ namespace
 // =======================================================================
 OpenGl_Workspace::OpenGl_Workspace (const Handle(OpenGl_Display)& theDisplay,
                                     const CALL_DEF_WINDOW&        theCWindow,
-                                    Aspect_RenderingContext       theGContext)
-: OpenGl_Window (theDisplay, theCWindow, theGContext),
+                                    Aspect_RenderingContext       theGContext,
+                                    const Handle(OpenGl_Context)& theShareCtx)
+: OpenGl_Window (theDisplay, theCWindow, theGContext, theShareCtx),
   myTransientList (0),
   myIsTransientOpen (Standard_False),
   myRetainMode (Standard_False),
@@ -127,24 +128,14 @@ Standard_Boolean OpenGl_Workspace::Activate()
   if (!OpenGl_Window::Activate())
     return Standard_False;
 
-  NamedStatus             = IsTextureEnabled() ? OPENGL_NS_TEXTURE : 0;
   DegenerateModel         = 0;
   SkipRatio               = 0.0f;
-  HighlightColor          = &myDefaultHighlightColor;
-  AspectLine_set          = &myDefaultAspectLine;
-  AspectLine_applied      = NULL;
-  AspectFace_set          = &myDefaultAspectFace;
-  AspectFace_applied      = NULL;
-  AspectMarker_set        = &myDefaultAspectMarker;
-  AspectMarker_applied    = NULL;
-  AspectText_set          = &myDefaultAspectText;
-  AspectText_applied      = NULL;
-  TextParam_set           = &myDefaultTextParam;
-  TextParam_applied       = NULL;
   ViewMatrix_applied      = &myDefaultMatrix;
   StructureMatrix_applied = &myDefaultMatrix;
-  PolygonOffset_applied   = NULL;
-	return Standard_True;
+
+  ResetAppliedAspect();
+
+  return Standard_True;
 }
 
 // =======================================================================
@@ -159,3 +150,29 @@ void OpenGl_Workspace::UseTransparency (const Standard_Boolean theFlag)
     EraseAnimation();
   }
 }
+
+//=======================================================================
+//function : ResetAppliedAspect
+//purpose  : Sets default values of GL parameters in accordance with default aspects
+//=======================================================================
+void OpenGl_Workspace::ResetAppliedAspect()
+{
+  NamedStatus           = IsTextureEnabled() ? OPENGL_NS_TEXTURE : 0;
+  HighlightColor        = &myDefaultHighlightColor;
+  AspectLine_set        = &myDefaultAspectLine;
+  AspectLine_applied    = NULL;
+  AspectFace_set        = &myDefaultAspectFace;
+  AspectFace_applied    = NULL;
+  AspectMarker_set      = &myDefaultAspectMarker;
+  AspectMarker_applied  = NULL;
+  AspectText_set        = &myDefaultAspectText;
+  AspectText_applied    = NULL;
+  TextParam_set         = &myDefaultTextParam;
+  TextParam_applied     = NULL;
+  PolygonOffset_applied = NULL;
+
+  AspectLine(Standard_True);
+  AspectFace(Standard_True);
+  AspectMarker(Standard_True);
+  AspectText(Standard_True);
+}
diff --git a/src/OpenGl/OpenGl_Workspace_2.cxx b/src/OpenGl/OpenGl_Workspace_2.cxx
index dfc3b44..bff24b7 100644
--- a/src/OpenGl/OpenGl_Workspace_2.cxx
+++ b/src/OpenGl/OpenGl_Workspace_2.cxx
@@ -534,9 +534,9 @@ Standard_Boolean OpenGl_Workspace::Print
 
   // setup printing context and viewport
   GLint aViewPortBack[4]; 
-  GLint anAlignBack     = 1;
+  GLint anAlignBack = 1;
 
-  OpenGl_PrinterContext aPrinterContext (myGContext);
+  OpenGl_PrinterContext aPrinterContext (GetGContext());
   aPrinterContext.SetLayerViewport ((GLsizei)aFrameWidth,
                                     (GLsizei)aFrameHeight);
   glGetIntegerv (GL_VIEWPORT, aViewPortBack);
@@ -814,7 +814,7 @@ void OpenGl_Workspace::Redraw1 (const Graphic3d_CView& ACView,
       glDisable(GL_DEPTH_TEST);
 
     glClearDepth(1.0);
-	toClear |= GL_DEPTH_BUFFER_BIT;
+    toClear |= GL_DEPTH_BUFFER_BIT;
   }
   else
   {
@@ -825,7 +825,7 @@ void OpenGl_Workspace::Redraw1 (const Graphic3d_CView& ACView,
   {
     // Set background to white
     glClearColor (1.F, 1.F, 1.F, 1.F);
-	toClear |= GL_DEPTH_BUFFER_BIT;
+    toClear |= GL_DEPTH_BUFFER_BIT;
   }
   else
   {
@@ -839,12 +839,7 @@ void OpenGl_Workspace::Redraw1 (const Graphic3d_CView& ACView,
   // Swap the buffers
   if ( aswap )
   {
-#ifndef WNT
-    glXSwapBuffers ((Display*)myDisplay->GetDisplay (), myWindow );
-#else
-    SwapBuffers ( wglGetCurrentDC () );
-    glFlush();
-#endif  /* WNT */
+    GetGlContext()->SwapBuffers();
     myBackBufferRestored = Standard_False;
   }
   else
@@ -960,20 +955,20 @@ void OpenGl_Workspace::CopyBuffers (Tint vid, int FrontToBack, Tfloat xm, Tfloat
 /*----------------------------------------------------------------------*/
 
 //call_subr_displayCB
-void OpenGl_Workspace::DisplayCallback (const Graphic3d_CView& ACView, int reason)
+void OpenGl_Workspace::DisplayCallback (const Graphic3d_CView& theCView,
+                                        int theReason)
 {
-  if( ACView.GDisplayCB )
+  if (theCView.GDisplayCB == NULL)
   {
-    Aspect_GraphicCallbackStruct callData;
-    callData.reason = reason;
-    callData.display = (DISPLAY*)myDisplay->GetDisplay();
-    callData.window = (WINDOW)myWindow;
-    callData.wsID = ACView.WsId;
-    callData.viewID = ACView.ViewId;
-    callData.gcontext = myGContext;
-
-    /* int status = */ (*ACView.GDisplayCB)( ACView.DefWindow.XWindow, ACView.GClientData, &callData );
+    return;
   }
+
+  Aspect_GraphicCallbackStruct aCallData;
+  aCallData.reason    = theReason;
+  aCallData.glContext = GetGlContext();
+  aCallData.wsID      = theCView.WsId;
+  aCallData.viewID    = theCView.ViewId;
+  theCView.GDisplayCB (theCView.DefWindow.XWindow, theCView.GClientData, &aCallData);
 }
 
 /*----------------------------------------------------------------------*/
diff --git a/src/OpenGl/OpenGl_Workspace_4.cxx b/src/OpenGl/OpenGl_Workspace_4.cxx
index 3b4f0c6..15534d3 100644
--- a/src/OpenGl/OpenGl_Workspace_4.cxx
+++ b/src/OpenGl/OpenGl_Workspace_4.cxx
@@ -17,15 +17,13 @@
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
-
 #include <OpenGl_GlCore11.hxx>
 
-#if (defined(_WIN32) || defined(__WIN32__))
+#if (defined(_WIN32) || defined(__WIN32__)) && defined(HAVE_VIDEOCAPTURE)
   #include <OpenGl_AVIWriter.hxx>
 #endif
 
 #include <OpenGl_FrameBuffer.hxx>
-#include <OpenGl_ResourceCleaner.hxx>
 #include <InterfaceGraphic_Graphic3d.hxx>
 #include <InterfaceGraphic_Visual3d.hxx>
 
@@ -41,7 +39,7 @@ void OpenGl_Workspace::Redraw (const Graphic3d_CView& theCView,
 
   // release pending GL resources
   Handle(OpenGl_Context) aGlCtx = GetGlContext();
-  OpenGl_ResourceCleaner::GetInstance()->Cleanup (aGlCtx);
+  aGlCtx->ReleaseDelayed();
 
   // cache render mode state
   GLint aRendMode = GL_RENDER;
@@ -69,7 +67,7 @@ void OpenGl_Workspace::Redraw (const Graphic3d_CView& theCView,
     glViewport (aViewPortBack[0], aViewPortBack[1], aViewPortBack[2], aViewPortBack[3]);
   }
 
-#if (defined(_WIN32) || defined(__WIN32__))
+#if (defined(_WIN32) || defined(__WIN32__)) && defined(HAVE_VIDEOCAPTURE)
   if (OpenGl_AVIWriter_AllowWriting (theCView.DefWindow.XWindow))
   {
     GLint params[4];
diff --git a/src/OpenGl/OpenGl_Workspace_5.cxx b/src/OpenGl/OpenGl_Workspace_5.cxx
index a15a1f4..f9b247c 100644
--- a/src/OpenGl/OpenGl_Workspace_5.cxx
+++ b/src/OpenGl/OpenGl_Workspace_5.cxx
@@ -593,10 +593,17 @@ const OpenGl_AspectFace * OpenGl_Workspace::AspectFace(const Standard_Boolean Wi
 
 /*----------------------------------------------------------------------*/
 
-const OpenGl_AspectMarker * OpenGl_Workspace::AspectMarker(const Standard_Boolean WithApply)
+const OpenGl_AspectMarker* OpenGl_Workspace::AspectMarker (const Standard_Boolean theToApply)
 {
-  if ( WithApply && (AspectMarker_set != AspectMarker_applied) )
+  if (theToApply && (AspectMarker_set != AspectMarker_applied))
   {
+    if (!AspectMarker_applied || (AspectMarker_set->Scale() != AspectMarker_applied->Scale()))
+    {
+      glPointSize (AspectMarker_set->Scale());
+    #ifdef HAVE_GL2PS
+      gl2psPointSize (AspectMarker_set->Scale());
+    #endif
+    }
     AspectMarker_applied = AspectMarker_set;
   }
   return AspectMarker_set;
@@ -635,19 +642,3 @@ const OpenGl_AspectText * OpenGl_Workspace::AspectText(const Standard_Boolean Wi
   }
   return AspectText_set;
 }
-
-/*----------------------------------------------------------------------*/
-
-//=======================================================================
-//function : ResetAppliedAspect
-//purpose  : 
-//=======================================================================
-
-void OpenGl_Workspace::ResetAppliedAspect()
-{
-  AspectLine_applied   = NULL;
-  AspectFace_applied   = NULL;
-  AspectMarker_applied = NULL;
-  AspectText_applied   = NULL;
-  TextParam_applied    = NULL;
-}
diff --git a/src/PCollection/PCollection_HAsciiString.cxx b/src/PCollection/PCollection_HAsciiString.cxx
index 2f494f9..12bc7bb 100644
--- a/src/PCollection/PCollection_HAsciiString.cxx
+++ b/src/PCollection/PCollection_HAsciiString.cxx
@@ -69,7 +69,7 @@ static int realstr(Standard_Real V, Standard_CString F)
 // Create : from a CString
 //-----------------------------------------------------------------------
 PCollection_HAsciiString::PCollection_HAsciiString(const Standard_CString S)
-                                               : Data(strlen(S))
+                                               : Data((Standard_Integer) strlen(S))
 {
    for( Standard_Integer i = 0 ; i < Data.Length() ; i++) 
                             Data.SetValue(i, S[i]) ;
diff --git a/src/PCollection/PCollection_HExtendedString.cxx b/src/PCollection/PCollection_HExtendedString.cxx
index 57b8922..e00cfa0 100644
--- a/src/PCollection/PCollection_HExtendedString.cxx
+++ b/src/PCollection/PCollection_HExtendedString.cxx
@@ -72,7 +72,7 @@ PCollection_HExtendedString::PCollection_HExtendedString
 // Create : from a CString
 //-----------------------------------------------------------------------
 PCollection_HExtendedString::PCollection_HExtendedString(const Standard_CString S)
-                                               : Data(strlen(S))
+                                               : Data((Standard_Integer) strlen(S))
 {
    for( Standard_Integer i = 0 ; i < Data.Length() ; i++)  {
          Standard_ExtCharacter val = ToExtCharacter(S[i]);
diff --git a/src/Poly/Poly.cxx b/src/Poly/Poly.cxx
index 050d116..b1e1179 100644
--- a/src/Poly/Poly.cxx
+++ b/src/Poly/Poly.cxx
@@ -459,7 +459,7 @@ void  Poly::ComputeNormals(const Handle(Poly_Triangulation)& Tri)
   Standard_Real                 aCoord[3];
   Standard_Integer              iNode[3] = {0, 0, 0};
   Standard_Integer              iN, iTri;
-  const Standard_Real eps2 = Precision::Confusion()*Precision::Confusion();
+  const Standard_Real eps2 = Precision::SquareConfusion();
 
   for (iTri = 1; iTri <= arrTri.Length(); iTri++) {
     // Get the nodes of the current triangle
diff --git a/src/Precision/Precision.cdl b/src/Precision/Precision.cdl
index 14c76d9..47c21ff 100644
--- a/src/Precision/Precision.cdl
+++ b/src/Precision/Precision.cdl
@@ -164,6 +164,11 @@ is
     	--   becomes easily measurable, but only within a restricted
     	-- space which contains some small objects of the complete scene.
 	
+    SquareConfusion returns Real from Standard;
+	---Purpose:
+    	-- Returns square of Confusion.
+    	-- Created for speed and convenience.
+
     Intersection returns Real from Standard;
 	---Purpose:Returns the precision value in real space, frequently
     	-- used by intersection algorithms to decide that a solution is reached.
diff --git a/src/ProjLib/ProjLib_ProjectedCurve.cxx b/src/ProjLib/ProjLib_ProjectedCurve.cxx
index 38d170f..f0baf27 100644
--- a/src/ProjLib/ProjLib_ProjectedCurve.cxx
+++ b/src/ProjLib/ProjLib_ProjectedCurve.cxx
@@ -61,6 +61,10 @@
 #include <TColStd_HArray1OfBoolean.hxx>
 #include <BSplCLib.hxx>
 #include <GeomAbs_IsoType.hxx>
+#include <Geom2d_Line.hxx>
+#include <Geom2d_TrimmedCurve.hxx>
+#include <ElCLib.hxx>
+#include <GeomLib.hxx>
 
 //=======================================================================
 //function : IsoIsDeg
@@ -362,7 +366,9 @@ static Handle(Geom2d_BSplineCurve) Interpolate(const Handle(TColgp_HArray1OfPnt2
 static void TrimC3d(Handle(Adaptor3d_HCurve)& myCurve,
 		    Standard_Boolean* IsTrimmed,
 		    const Standard_Real dt,
-		    const gp_Pnt& Pole)
+		    const gp_Pnt& Pole,
+                    Standard_Integer* SingularCase,
+                    const Standard_Integer NumberOfSingularCase)
 {
   Standard_Real f = myCurve->FirstParameter();
   Standard_Real l = myCurve->LastParameter();
@@ -373,6 +379,7 @@ static void TrimC3d(Handle(Adaptor3d_HCurve)& myCurve,
     IsTrimmed[0] = Standard_True;
     f = f+dt;
     myCurve = myCurve->Trim(f, l, Precision::Confusion());
+    SingularCase[0] = NumberOfSingularCase;
   }
   
   P = myCurve->Value(l);
@@ -380,6 +387,7 @@ static void TrimC3d(Handle(Adaptor3d_HCurve)& myCurve,
     IsTrimmed[1] = Standard_True;
     l = l-dt;
     myCurve = myCurve->Trim(f, l, Precision::Confusion());
+    SingularCase[1] = NumberOfSingularCase;
   }
 }
 
@@ -394,8 +402,75 @@ static void ExtendC2d(Handle(Geom2d_BSplineCurve)& aRes,
 		      const Standard_Real u1,
 		      const Standard_Real u2,
 		      const Standard_Real v1,
-		      const Standard_Real v2)
+		      const Standard_Real v2,
+                      const Standard_Integer FirstOrLast,
+                      const Standard_Integer NumberOfSingularCase)
 {
+  Standard_Real theParam = (FirstOrLast == 0)? aRes->FirstParameter()
+    : aRes->LastParameter();
+
+  gp_Pnt2d                              aPBnd;
+  gp_Vec2d                              aVBnd;
+  gp_Dir2d                              aDBnd;
+  Handle(Geom2d_TrimmedCurve)           aSegment;
+  Geom2dConvert_CompCurveToBSplineCurve aCompCurve(aRes, Convert_RationalC1);
+  Standard_Real                         aTol = Precision::Confusion();
+
+  aRes->D1(theParam, aPBnd, aVBnd);
+  aDBnd.SetXY(aVBnd.XY());
+  gp_Lin2d aLin(aPBnd, aDBnd); //line in direction of derivative
+
+  gp_Pnt2d thePole;
+  gp_Dir2d theBoundDir;
+  switch (NumberOfSingularCase)
+  {
+  case 1:
+    {
+      thePole.SetCoord(u1, v1);
+      theBoundDir.SetCoord(0., 1.);
+      break;
+    }
+  case 2:
+    {
+      thePole.SetCoord(u2, v1);
+      theBoundDir.SetCoord(0., 1.);
+      break;
+    }
+  case 3:
+    {
+      thePole.SetCoord(u1, v1);
+      theBoundDir.SetCoord(1., 0.);
+      break;
+    }
+  case 4:
+    {
+      thePole.SetCoord(u1, v2);
+      theBoundDir.SetCoord(1., 0.);
+      break;
+    }
+  }
+  gp_Lin2d BoundLin(thePole, theBoundDir); //one of the bounds of rectangle
+
+  Standard_Real U1x = BoundLin.Direction().X();
+  Standard_Real U1y = BoundLin.Direction().Y();
+  Standard_Real U2x = aLin.Direction().X();
+  Standard_Real U2y = aLin.Direction().Y();
+  Standard_Real Uo21x = aLin.Location().X() - BoundLin.Location().X();
+  Standard_Real Uo21y = aLin.Location().Y() - BoundLin.Location().Y();
+  
+  Standard_Real D = U1y*U2x-U1x*U2y;
+  
+  Standard_Real ParOnLin = (Uo21y * U1x - Uo21x * U1y)/D; //parameter of intersection point
+  
+  Handle(Geom2d_Line) aSegLine = new Geom2d_Line(aLin);
+  aSegment = (FirstOrLast == 0)?
+    new Geom2d_TrimmedCurve(aSegLine, ParOnLin, 0.) :
+    new Geom2d_TrimmedCurve(aSegLine, 0., ParOnLin);
+
+  aCompCurve.Add(aSegment, aTol);
+  aRes = aCompCurve.BSplineCurve();
+  
+  /*  
   gp_Pnt2d P0;
   gp_Vec2d V01, V02;
   aRes->D2(t, P0, V01, V02);
@@ -439,7 +514,7 @@ static void ExtendC2d(Handle(Geom2d_BSplineCurve)& aRes,
   aConcat.Add(aC, Precision::PConfusion());
   
   aRes = aConcat.BSplineCurve();
-  
+  */
 }  
 
 //=======================================================================
@@ -551,6 +626,8 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C)
 {
   myTolerance = Max(myTolerance,Precision::PApproximation());
   myCurve = C;
+  Standard_Real FirstPar = C->FirstParameter();
+  Standard_Real LastPar  = C->LastParameter();
   GeomAbs_SurfaceType SType = mySurface->GetType();    
   GeomAbs_CurveType   CType = myCurve->GetType();
 
@@ -606,6 +683,7 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C)
       {
 	
 	Standard_Boolean IsTrimmed[2] = {Standard_False, Standard_False};
+        Standard_Integer SingularCase[2];
 	Standard_Real f, l, dt;
 	const Standard_Real eps = 0.01;
 	f = myCurve->FirstParameter();
@@ -619,28 +697,28 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C)
 	V1 = S.FirstVParameter();
 	V2 = S.LastVParameter();
 
-	if(IsoIsDeg(S, U1, GeomAbs_IsoU, 0., 1.e-9) ) {
+	if(IsoIsDeg(S, U1, GeomAbs_IsoU, 0., myTolerance) ) {
 	  //Surface has pole at U = Umin
 	  gp_Pnt Pole = mySurface->Value(U1, V1);
-	  TrimC3d(myCurve, IsTrimmed, dt, Pole);
+	  TrimC3d(myCurve, IsTrimmed, dt, Pole, SingularCase, 1);
 	}
 
-	if(IsoIsDeg(S, U2, GeomAbs_IsoU, 0., 1.e-9) ) {
+	if(IsoIsDeg(S, U2, GeomAbs_IsoU, 0., myTolerance) ) {
 	  //Surface has pole at U = Umax
 	  gp_Pnt Pole = mySurface->Value(U2, V1);
-	  TrimC3d(myCurve, IsTrimmed, dt, Pole);
+	  TrimC3d(myCurve, IsTrimmed, dt, Pole, SingularCase, 2);
 	}
 	  
-	if(IsoIsDeg(S, V1, GeomAbs_IsoV, 0., 1.e-9) ) {
+	if(IsoIsDeg(S, V1, GeomAbs_IsoV, 0., myTolerance) ) {
 	  //Surface has pole at V = Vmin
 	  gp_Pnt Pole = mySurface->Value(U1, V1);
-	  TrimC3d(myCurve, IsTrimmed, dt, Pole);
+	  TrimC3d(myCurve, IsTrimmed, dt, Pole, SingularCase, 3);
 	}
 
-	if(IsoIsDeg(S, V2, GeomAbs_IsoV, 0., 1.e-9) ) {
+	if(IsoIsDeg(S, V2, GeomAbs_IsoV, 0., myTolerance) ) {
 	  //Surface has pole at V = Vmax
 	  gp_Pnt Pole = mySurface->Value(U1, V2);
-	  TrimC3d(myCurve, IsTrimmed, dt, Pole);
+	  TrimC3d(myCurve, IsTrimmed, dt, Pole, SingularCase, 4);
 	}
 
 	ProjLib_ComputeApproxOnPolarSurface polar(myCurve, 
@@ -653,15 +731,20 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C)
 	  if(IsTrimmed[0]) {
 	    //Add segment before start of curve
 	    f = myCurve->FirstParameter();
-	    ExtendC2d(aRes, f, -dt, U1, U2, V1, V2);
+	    ExtendC2d(aRes, f, -dt, U1, U2, V1, V2, 0, SingularCase[0]);
 	  }
 	  if(IsTrimmed[1]) {
 	    //Add segment after end of curve
 	    l = myCurve->LastParameter();
-	    ExtendC2d(aRes, l, dt, U1, U2, V1, V2);
+	    ExtendC2d(aRes, l, dt, U1, U2, V1, V2, 1, SingularCase[1]);
 	  }
-	}
-	  
+          Handle(Geom2d_Curve) NewCurve2d;
+          GeomLib::SameRange(Precision::PConfusion(), aRes,
+                             aRes->FirstParameter(), aRes->LastParameter(),
+                             FirstPar, LastPar,
+                             NewCurve2d);
+          aRes = Handle(Geom2d_BSplineCurve)::DownCast(NewCurve2d);
+        }
 	myResult.SetBSpline(aRes);
 	myResult.Done();
 	myResult.SetType(GeomAbs_BSplineCurve);
@@ -671,7 +754,8 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C)
     default:
       {
 	Standard_Boolean IsTrimmed[2] = {Standard_False, Standard_False};
-	Standard_Real f = 0, l = 0, dt = 0;
+        Standard_Real Vsingular[2]; //for surfaces of revolution
+	Standard_Real f, l, dt;
 	const Standard_Real eps = 0.01;
 	
 	if(mySurface->GetType() == GeomAbs_SurfaceOfRevolution) {
@@ -691,6 +775,8 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C)
 	    IsTrimmed[0] = Standard_True;
 	    f = f+dt;
 	    myCurve = myCurve->Trim(f, l, Precision::Confusion());
+            Vsingular[0] = ElCLib::Parameter(L, P);
+            //SingularCase[0] = 3;
 	  }
 
 	  P = myCurve->Value(l);
@@ -698,6 +784,8 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C)
 	    IsTrimmed[1] = Standard_True;
 	    l = l-dt;
 	    myCurve = myCurve->Trim(f, l, Precision::Confusion());
+            Vsingular[1] = ElCLib::Parameter(L, P);
+            //SingularCase[1] = 3;
 	  }
 	}
 
@@ -742,12 +830,18 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C)
 	  
 	  if(IsTrimmed[0]) {
 	    //Add segment before start of curve
-	    ExtendC2d(aRes, f, -dt, u1, u2, v1, v2);
+	    ExtendC2d(aRes, f, -dt, u1, u2, Vsingular[0], v2, 0, 3);
 	  }
 	  if(IsTrimmed[1]) {
 	    //Add segment after end of curve
-	    ExtendC2d(aRes, l, dt, u1, u2, v1, v2);
+	    ExtendC2d(aRes, l, dt, u1, u2, Vsingular[1], v2, 1, 3);
 	  }
+          Handle(Geom2d_Curve) NewCurve2d;
+          GeomLib::SameRange(Precision::PConfusion(), aRes,
+                             aRes->FirstParameter(), aRes->LastParameter(),
+                             FirstPar, LastPar,
+                             NewCurve2d);
+          aRes = Handle(Geom2d_BSplineCurve)::DownCast(NewCurve2d);
 	}
 	  
 	myResult.SetBSpline(aRes);
diff --git a/src/Prs2d/Prs2d_Diameter.cxx b/src/Prs2d/Prs2d_Diameter.cxx
index a1c2c7c..b40519b 100644
--- a/src/Prs2d/Prs2d_Diameter.cxx
+++ b/src/Prs2d/Prs2d_Diameter.cxx
@@ -94,9 +94,9 @@ Prs2d_Diameter::Prs2d_Diameter( const Handle(Graphic2d_GraphicObject)& aGO,
    myAppX2 = Standard_ShortReal(X1);
    myAppY2 = Standard_ShortReal(Y1);
    if (myX1>=myX2) 
-     myAppX2=Standard_ShortReal(myAppX2+(theDist+theRad)/APPENDIXLEN);
+     myAppX2=Standard_ShortReal( myAppX2+(theDist+theRad)/APPENDIXLEN );
    else 
-     myAppX2=Standard_ShortReal(myAppX2-(theDist+theRad)/APPENDIXLEN);
+     myAppX2=Standard_ShortReal( myAppX2-(theDist+theRad)/APPENDIXLEN );
    
    if ( myAppX2 < myMinX ) myMinX = myAppX2;
    if ( myAppY2 < myMinY ) myMinY = myAppY2;
diff --git a/src/Prs2d/Prs2d_ToleranceFrame.cxx b/src/Prs2d/Prs2d_ToleranceFrame.cxx
index d867faa..15b383a 100644
--- a/src/Prs2d/Prs2d_ToleranceFrame.cxx
+++ b/src/Prs2d/Prs2d_ToleranceFrame.cxx
@@ -192,7 +192,7 @@ void Prs2d_ToleranceFrame::Draw( const Handle(Graphic2d_Drawer)& aDrawer ) {
     
     //------------additional text's cells
 
-    if ( myTolTxt.Length() || myTxt1.Length() || myTxt1.Length() ) {
+    if ( myTolTxt.Length() || myTxt1.Length() || myTxt2.Length() ) {
       gp_Pnt2d PntP( myX, myY );
       gp_Vec2d theV1( gp_Pnt2d( myX, myY - myHeight/2 ), PntP );
       theV1.Rotate( myAngle );
diff --git a/src/Prs3d/Prs3d_Drawer.cdl b/src/Prs3d/Prs3d_Drawer.cdl
index 16331a1..6699d1b 100644
--- a/src/Prs3d/Prs3d_Drawer.cdl
+++ b/src/Prs3d/Prs3d_Drawer.cdl
@@ -502,6 +502,27 @@ is
     is virtual;
     	---Purpose: Sets the parameter anAspect for display attributes of sections.
     
+    SetFaceBoundaryDraw (me           : mutable;
+                         theIsEnabled : Boolean from Standard)
+    is virtual;
+        ---Purpose: Enables or disables face boundary drawing for shading presentations.
+        -- theIsEnabled is a boolean flag indicating whether the face boundaries should be
+        -- drawn or not.
+
+    IsFaceBoundaryDraw (me) returns Boolean from Standard
+    is virtual;
+        ---Purpose: Checks whether the face boundary drawing is enabled or not.
+
+    SetFaceBoundaryAspect (me        : mutable;
+                           theAspect : LineAspect from Prs3d)
+    is virtual;
+        ---Purpose: Sets line aspect for face boundaries.
+        -- theAspect is the line aspect that determines the look of the face boundaries.
+
+    FaceBoundaryAspect (me : mutable) returns mutable LineAspect from Prs3d
+    is virtual;
+        ---Purpose: Returns line aspect of face boundaries.
+
 fields
             myUIsoAspect: IsoAspect from Prs3d is protected;
             myVIsoAspect: IsoAspect from Prs3d is protected;
@@ -541,4 +562,6 @@ fields
 	    myAngleAspect: AngleAspect from Prs3d is protected;
 	    myRadiusAspect: RadiusAspect from Prs3d is protected;
             mySectionAspect: LineAspect from Prs3d is protected;
+        myFaceBoundaryDraw    : Boolean from Standard is protected;
+        myFaceBoundaryAspect  : LineAspect from Prs3d is protected;
 end Drawer;
diff --git a/src/Prs3d/Prs3d_Drawer.cxx b/src/Prs3d/Prs3d_Drawer.cxx
index 6bde505..3c5a637 100644
--- a/src/Prs3d/Prs3d_Drawer.cxx
+++ b/src/Prs3d/Prs3d_Drawer.cxx
@@ -36,7 +36,8 @@ Prs3d_Drawer::Prs3d_Drawer(): myNbPoints(30),myIsoOnPlane(Standard_False),
  myDeviationAngle(12*M_PI/180),
  myHLRAngle(20*M_PI/180),
  myLineDrawArrow(Standard_False),
- myDrawHiddenLine(Standard_False)
+ myDrawHiddenLine(Standard_False),
+ myFaceBoundaryDraw(Standard_False)
 {
 } 
 
@@ -438,3 +439,45 @@ Handle (Prs3d_LineAspect) Prs3d_Drawer::SectionAspect ()  {
 void Prs3d_Drawer::SetSectionAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
  mySectionAspect = anAspect;
 }
+
+// =======================================================================
+// function : SetFaceBoundaryDraw
+// purpose  :
+// =======================================================================
+void Prs3d_Drawer::SetFaceBoundaryDraw (const Standard_Boolean theIsEnabled)
+{
+  myFaceBoundaryDraw = theIsEnabled;
+}
+
+// =======================================================================
+// function : IsFaceBoundaryDraw
+// purpose  :
+// =======================================================================
+Standard_Boolean Prs3d_Drawer::IsFaceBoundaryDraw () const
+{
+  return myFaceBoundaryDraw;
+}
+
+// =======================================================================
+// function : SetFaceBoundaryAspect
+// purpose  :
+// =======================================================================
+void Prs3d_Drawer::SetFaceBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect)
+{
+  myFaceBoundaryAspect = theAspect;
+}
+
+// =======================================================================
+// function : FaceBoundaryAspect
+// purpose  :
+// =======================================================================
+Handle_Prs3d_LineAspect Prs3d_Drawer::FaceBoundaryAspect ()
+{
+  if (myFaceBoundaryAspect.IsNull ())
+  {
+    myFaceBoundaryAspect = 
+      new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0);
+  }
+
+  return myFaceBoundaryAspect;
+}
diff --git a/src/Prs3d/Prs3d_ShadingAspect.cxx b/src/Prs3d/Prs3d_ShadingAspect.cxx
index b2d8abe..3701f8e 100644
--- a/src/Prs3d/Prs3d_ShadingAspect.cxx
+++ b/src/Prs3d/Prs3d_ShadingAspect.cxx
@@ -220,8 +220,10 @@ Standard_Real aValue(0.);
     case Aspect_TOFM_BOTH_SIDE:
     case Aspect_TOFM_FRONT_SIDE:
 	aValue = myAspect->FrontMaterial().Transparency();
+	break;
     case Aspect_TOFM_BACK_SIDE:
 	aValue = myAspect->BackMaterial().Transparency();
+	break;
   }
   return aValue;
 }
diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx
index 9ec717b..3691904 100644
--- a/src/QABugs/QABugs_11.cxx
+++ b/src/QABugs/QABugs_11.cxx
@@ -90,6 +90,8 @@
 #include <IGESData_IGESModel.hxx>
 #include <IGESData_IGESEntity.hxx>
 #include <V3d_View.hxx>
+#include <BRepFeat_SplitShape.hxx>
+#include <BRepAlgoAPI_Section.hxx>
 
 #include <tcl.h>
 
@@ -724,7 +726,7 @@ static Standard_Integer OCC297 (Draw_Interpretor& di,Standard_Integer /*argc*/,
 static Standard_Integer OCC305 (Draw_Interpretor& di,Standard_Integer argc, const char ** argv )
 
 {
-  if (argc =! 2)
+  if (argc != 2)
   {
     di <<"Usage : " << argv[0] << " file"<<"\n";
     return 1;
@@ -1895,7 +1897,7 @@ static Standard_Integer OCC909 (Draw_Interpretor& di, Standard_Integer argc, con
 //=======================================================================
 static Standard_Integer OCC921 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
 {
-  if (argc =! 2)
+  if (argc != 2)
   {
     di <<"Usage : " << argv[0] << " face"<<"\n";
     return 1;
@@ -1918,7 +1920,7 @@ static Standard_Integer OCC921 (Draw_Interpretor& di, Standard_Integer argc, con
 //=======================================================================
 static Standard_Integer OCC902(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
 {
-  if (argc =! 2)
+  if (argc != 2)
   {
     di <<"Usage : " << argv[0] << " expression"<<"\n";
     return 1;
@@ -2211,8 +2213,8 @@ static Standard_Integer OCC1487 (Draw_Interpretor& di, Standard_Integer argc, co
     }
   } else {
     //BRepPrimAPI_MakeCylinder o_mc2 (gp_Ax2 (gp_Pnt(978.34936, -50.0, 127.5),gp_Dir(sin(M_PI/3), 0.0, 0.5)), 5, 150);
-    gp_Dir myDir_mc2(-sin(M_PI/3), 0.0, 0.5);
-    gp_Pnt myPnt_mc2(21.65064, -50.0, 127.5);
+    gp_Dir myDir_mc2(sin(M_PI/3), 0.0, 0.5);
+    gp_Pnt myPnt_mc2(978.34936, -50.0, 127.5);
     gp_Ax2 myAx2_mc2(myPnt_mc2, myDir_mc2);
     BRepPrimAPI_MakeCylinder o_mc2 (myAx2_mc2, 5, 150);
 
@@ -5280,6 +5282,54 @@ Standard_Integer OCC22736 (Draw_Interpretor& di, Standard_Integer argc, const ch
   return 0;
 }
 
+Standard_Integer OCC23429(Draw_Interpretor& di,
+                          Standard_Integer narg, const char** a)
+{
+  if (narg < 4) return 1;
+  
+  TopoDS_Shape aShape = DBRep::Get(a[2]);
+  if (aShape.IsNull()) return 1;
+  
+  BRepFeat_SplitShape Spls(aShape);
+  Spls.SetCheckInterior(Standard_False);
+
+  TopoDS_Shape aTool = DBRep::Get(a[3]);
+
+  BRepAlgoAPI_Section Builder(aShape, aTool, Standard_False);
+  Builder.ComputePCurveOn1(Standard_True);
+  if (narg == 5)
+    Builder.Approximation(Standard_True); 
+  Builder.Build();
+  TopoDS_Shape aSection = Builder.Shape();
+
+  TopExp_Explorer ExpSec(aSection, TopAbs_EDGE);
+  for (; ExpSec.More(); ExpSec.Next())
+  {
+    TopoDS_Edge anEdge = TopoDS::Edge(ExpSec.Current());
+    Handle(Geom2d_Curve) thePCurve;
+    Handle(Geom_Surface) theSurface;
+    TopLoc_Location theLoc;
+    Standard_Real fpar, lpar;
+    BRep_Tool::CurveOnSurface(anEdge, thePCurve, theSurface, theLoc, fpar, lpar);
+    TopoDS_Face aFace;
+    TopExp_Explorer ExpShape(aShape, TopAbs_FACE);
+    for (; ExpShape.More(); ExpShape.Next())
+    {
+      aFace = TopoDS::Face(ExpShape.Current());
+      TopLoc_Location aLoc;
+      Handle(Geom_Surface) aSurface = BRep_Tool::Surface(aFace, aLoc);
+      if (aSurface == theSurface && aLoc == theLoc)
+        break;
+    }
+    Spls.Add(anEdge, aFace);
+  }
+
+  TopoDS_Shape Result = Spls.Shape();
+  DBRep::Set(a[1], Result);
+
+  return 0;
+}
+
 #include <BOPTColStd_CArray1OfInteger.hxx>
 //=======================================================================
 //function : DumpArray
@@ -5310,7 +5360,7 @@ Standard_Integer bcarray (Draw_Interpretor& di, Standard_Integer argc, const cha
     return 1;
   }
 
-  Standard_Integer i, aNb, aBL;
+  Standard_Integer i, aBL;
   BOPTColStd_CArray1OfInteger aC;
   //
   aBL=100000;
@@ -5330,6 +5380,82 @@ Standard_Integer bcarray (Draw_Interpretor& di, Standard_Integer argc, const cha
   return 0;
 }
 
+#include <ExprIntrp_GenExp.hxx>
+Standard_Integer CR23403 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
+{
+	
+  if (argc != 2) {
+    di << "Usage : " << argv[0] << " string\n";
+    return 1;
+  }
+
+  Standard_CString aString = argv[1];
+  Handle(ExprIntrp_GenExp) myExpr = ExprIntrp_GenExp::Create();
+  try {
+    OCC_CATCH_SIGNALS
+    myExpr->Process( aString );
+  }
+  catch(Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    di << "Exception : " << aFail->GetMessageString() << "\n";
+  }
+
+  return 0;
+}
+
+#include <Quantity_NameOfColor.hxx>
+#include <TopAbs_ShapeEnum.hxx>
+Standard_Integer CR23234 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
+{
+  // Check the command arguments
+  if (argc != 2)
+  {
+    di <<"Error: "<<argv[0]<<" - invalid number of arguments"<< "\n";
+    di << "Usage : " << argv[0] << " mode(0/1)\n";
+    return 1; //TCL_ERROR
+  }
+
+  const Standard_Integer aMode = atoi(argv[1]);
+
+  //===================================================================
+
+  Handle(AIS_InteractiveContext) aisContext = ViewerTest::GetAISContext();
+  if (aisContext.IsNull())
+  {
+    di <<"Error: call 'vinit' first"<< "\n";
+    return 1; //TCL_ERROR
+  }
+
+  if (aisContext->HasOpenedContext())
+  {
+    aisContext->CloseAllContexts();
+    aisContext->RemoveAll(false);
+    aisContext->EraseSelected(false, false);
+  }
+  aisContext->EraseAll(false,false);
+  Handle(Geom_Axis2Placement) trihedronAxis = new Geom_Axis2Placement(gp::XOY());
+  Handle(AIS_Trihedron) trihedron = new AIS_Trihedron(trihedronAxis);
+  if (aMode)
+    trihedron->UnsetSelectionMode(); // this line causes an exception on OpenLocalContext
+  trihedron->SetSize(20);
+  trihedron->SetColor(Quantity_NOC_GRAY30);
+  trihedron->SetArrowColor(Quantity_NOC_GRAY30);
+  trihedron->SetTextColor(Quantity_NOC_DARKSLATEBLUE);
+
+  //trihedron->SetColor(Quantity_NameOfColor::Quantity_NOC_GRAY30);
+  //trihedron->SetArrowColor(Quantity_NameOfColor::Quantity_NOC_GRAY30);
+  //trihedron->SetTextColor(Quantity_NameOfColor::Quantity_NOC_DARKSLATEBLUE);
+
+
+  aisContext->Display(trihedron, true);
+  aisContext->OpenLocalContext();
+  //aisContext->ActivateStandardMode(TopAbs_ShapeEnum::TopAbs_EDGE);
+  aisContext->ActivateStandardMode(TopAbs_EDGE);
+  aisContext->SetSensitivity(8);
+
+  return 0; //TCL_OK
+}
+
 void QABugs::Commands_11(Draw_Interpretor& theCommands) {
   const char *group = "QABugs";
 
@@ -5439,5 +5565,8 @@ void QABugs::Commands_11(Draw_Interpretor& theCommands) {
   theCommands.Add("bcarray", "bcarray", __FILE__, bcarray, group);
   theCommands.Add("OCC22762", "OCC22762 x1 y1 z1 x2 y2 z3", __FILE__, OCC22762, group);
   theCommands.Add("OCC22558", "OCC22558 x_vec y_vec z_vec x_dir y_dir z_dit x_pnt y_pnt z_pnt", __FILE__, OCC22558, group);
+  theCommands.Add("CR23403", "CR23403 string", __FILE__, CR23403, group);
+  theCommands.Add("OCC23429", "OCC23429 res shape tool [appr]", __FILE__, OCC23429, group);
+  theCommands.Add("CR23234", "CR23234 mode(0/1)", __FILE__, CR23234, group);
   return;
 }
diff --git a/src/QABugs/QABugs_13.cxx b/src/QABugs/QABugs_13.cxx
index 06d4e3e..b6e24cb 100644
--- a/src/QABugs/QABugs_13.cxx
+++ b/src/QABugs/QABugs_13.cxx
@@ -927,9 +927,9 @@ static Standard_Integer OCC817 (Draw_Interpretor& di, Standard_Integer argc, con
   di<<"Info: Bounds\n  ("<<Xmin<<","<<Ymin<<","<<Zmin<<")\n  ("<<Xmax<<","<<Ymax<<","<<Zmax<<")"<<"\n";
 
   // grid the bounding box
-  Standard_Integer NumXsubvolumes = (Xmax - Xmin) / mesh_delt; if (NumXsubvolumes <= 0) NumXsubvolumes = 1;
-  Standard_Integer NumYsubvolumes = (Ymax - Ymin) / mesh_delt; if (NumYsubvolumes <= 0) NumYsubvolumes = 1;
-  Standard_Integer NumZsubvolumes = (Zmax - Zmin) / mesh_delt; if (NumZsubvolumes <= 0) NumZsubvolumes = 1;
+  Standard_Integer NumXsubvolumes = (Standard_Integer)((Xmax - Xmin) / mesh_delt); if (NumXsubvolumes <= 0) NumXsubvolumes = 1;
+  Standard_Integer NumYsubvolumes = (Standard_Integer)((Ymax - Ymin) / mesh_delt); if (NumYsubvolumes <= 0) NumYsubvolumes = 1;
+  Standard_Integer NumZsubvolumes = (Standard_Integer)((Zmax - Zmin) / mesh_delt); if (NumZsubvolumes <= 0) NumZsubvolumes = 1;
   const Standard_Real StepX = (Xmax - Xmin) / NumXsubvolumes;
   const Standard_Real StepY = (Ymax - Ymin) / NumYsubvolumes;
   const Standard_Real StepZ = (Zmax - Zmin) / NumZsubvolumes;
diff --git a/src/QABugs/QABugs_17.cxx b/src/QABugs/QABugs_17.cxx
index e1648e0..13f7e4a 100644
--- a/src/QABugs/QABugs_17.cxx
+++ b/src/QABugs/QABugs_17.cxx
@@ -32,6 +32,7 @@
 #include <DrawTrSurf.hxx>
 #include <AIS_InteractiveContext.hxx>
 #include <ViewerTest.hxx>
+#include <ViewerTest_EventManager.hxx>
 #include <AIS_Shape.hxx>
 #include <TopoDS_Shape.hxx>
 
@@ -570,26 +571,32 @@ static Standard_Integer OCC280 (Draw_Interpretor& di, Standard_Integer argc, con
     HLR = 1;
   }
 
-  Handle(V3d_View) aView = ViewerTest::CurrentView();
-
+  Handle(V3d_View) anOldView = ViewerTest::CurrentView();
   Handle(V3d_Viewer) aViewer = ViewerTest::GetViewerFromContext();
-  if(atoi(argv[2])) {
-    aViewer->SetDefaultSurfaceDetail(V3d_TEX_ALL);
+  if (atoi (argv[2]))
+  {
+    aViewer->SetDefaultSurfaceDetail (V3d_TEX_ALL);
   }
-  aViewer->SetDefaultTypeOfView(V3d_PERSPECTIVE);
+  aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE);
 
-  Handle(Aspect_Window) asp = aView->Window();
-  aViewer->SetViewOff(aView);
-  aView->Remove();
+  Handle(Aspect_Window) asp = anOldView->Window();
+  aViewer->SetViewOff (anOldView);
 
   Handle(V3d_View) aNewView = aViewer->CreateView();
-  ViewerTest::CurrentView(aNewView);
+  ViewerTest::CurrentView (aNewView);
 
-  aNewView->SetWindow(asp);
+  aNewView->SetWindow (asp);
   if (!asp->IsMapped()) asp->Map();
 
+  anOldView->Remove();
+  anOldView.Nullify();
+
   aNewView->Update();
 
+  // replace view in event manager
+  ViewerTest::UnsetEventManager();
+  ViewerTest::SetEventManager (new ViewerTest_EventManager (aNewView, ViewerTest::GetAISContext()));
+
   if (HLR == 1) {
     di << "HLR" << "\n";
     aNewView->SetDegenerateModeOff();
@@ -2001,7 +2008,7 @@ static Standard_Integer OCC1642 (Draw_Interpretor& di, Standard_Integer argc, co
   DBRep::Set(argv[4],face);
 
   advWA->SetFace(face);
-  float precision_to_ana = 0.0001;
+  Standard_Real precision_to_ana = 0.0001;
   advWA->SetPrecision(precision_to_ana);
 
   TopTools_IndexedMapOfShape M;
diff --git a/src/QABugs/QABugs_3.cxx b/src/QABugs/QABugs_3.cxx
index bfd47b2..b9b96f7 100644
--- a/src/QABugs/QABugs_3.cxx
+++ b/src/QABugs/QABugs_3.cxx
@@ -135,31 +135,24 @@ static int BUC60614(Draw_Interpretor& di, Standard_Integer argc, const char ** a
 #endif
 
 static int BUC60609(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
-//  char file1[100];
   gp_Pnt2d uvSurf;
-  double U,V;
   TopAbs_State state;
   
-  if(argc < 2){
-    printf("Usage: %s  draw_format_face\n [name] [interactive (0|1)]",argv[0]);
+  if (argc == 3) {
+    // BUC60609 shape name
+  } else if ( argc == 5 ) {
+    // BUC60609 shape name U V
+  } else {
+    di << "Usage : "<< argv[0] << " shape name [U V]" << "\n";
     return(-1);
   }
   
-  // MKV 30.03.05
-#if ((TCL_MAJOR_VERSION > 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4))) && !defined(USE_NON_CONST)
-  const Standard_Character *DD = Tcl_GetVar(di.Interp(),"Draw_DataDir",TCL_GLOBAL_ONLY);
-#else
-  Standard_Character *DD = Tcl_GetVar(di.Interp(),"Draw_DataDir",TCL_GLOBAL_ONLY);
-#endif
-  
-  Standard_Character  *file1 = new Standard_Character [strlen(DD)+strlen(argv[1])+2];
-  sprintf(file1,"%s/%s",DD,argv[1]);
+  TCollection_AsciiString  aFilePath(argv[1]); 
   
   filebuf fic;
   istream in(&fic);
-  if (!fic.open(file1,ios::in)) {
-    di << "Cannot open file for reading : " << file1 << "\n";
-    delete file1;
+  if (!fic.open(aFilePath.ToCString(),ios::in)) {
+    di << "Cannot open file for reading : " << aFilePath << "\n";
     return(-1);
   }
 
@@ -173,8 +166,7 @@ static int BUC60609(Draw_Interpretor& di, Standard_Integer argc, const char ** a
       S.Read(in);
       S.Read(theShape,in);
     }else{
-      di << "Wrong entity type in " << file1 << "\n";
-      delete file1;
+      di << "Wrong entity type in " << aFilePath << "\n";
       return(-1);
     }
   }
@@ -185,12 +177,6 @@ static int BUC60609(Draw_Interpretor& di, Standard_Integer argc, const char ** a
     DBRep::Set(argv[2],face);
   }
 
-  Standard_Boolean inter=Standard_False ;
-  
-  if(argc > 3){
-    inter= (atof(argv[3]) == 0) ? Standard_False : Standard_True ;
-  }
-
   Standard_Real faceUMin,faceUMax,faceVMin,faceVMax;
   
   BRepTools::UVBounds (face, faceUMin,faceUMax,faceVMin,faceVMax);
@@ -215,63 +201,36 @@ static int BUC60609(Draw_Interpretor& di, Standard_Integer argc, const char ** a
   // Hence IT WOULD BE USEFUL IF TopOpeBRep_PointClassifier COULD
   // COPE WITH PERIODIC SURFACES, i.e. U,V +-Period giving same result.
   // *************************************************
-  if(inter && (argc != 6)) {
-//    while(cin){
-      di << "Input U:   " << "\n";
-//      cin >> U;
-//      if(!cin) {
-	delete file1;
-	return(0);
-//      }
-      di << "Input V:   " << "\n";
-//      cin >> V;
-//      if(!cin) {
-	delete file1;
-	return(0);
-//      }
-      
-      uvSurf = gp_Pnt2d(U, V);
-      
-      //gp_Pnt2d uvSurf(0.14,5.1);  // outside!!!
-      //gp_Pnt2d uvSurf2(1.28,5.1); // inside
-    
-      state = PClass.Classify(face,uvSurf,Precision::PConfusion());
-      if(state == TopAbs_IN || state == TopAbs_ON){
-	di << "U=" << U << " V=" << V << "  classified INSIDE" << "\n";
-      }else{
-	di << "U=" << U << " V=" << V << "  classified OUTSIDE" << "\n";
-      }
-//    }
-  } else {
-    if(argc != 6) {
-      uvSurf = gp_Pnt2d(0.14,5.1);
-      state = PClass.Classify(face,uvSurf,Precision::PConfusion());
-      if(state == TopAbs_IN || state == TopAbs_ON){
-	di << "U=" << 0.14 << " V=" << 5.1 << "  classified INSIDE" << "\n";
-      }else{
-	di << "U=" << 0.14 << " V=" << 5.1 << "  classified OUTSIDE" << "\n";
-      }
 
-      uvSurf = gp_Pnt2d(1.28,5.1);
-      state = PClass.Classify(face,uvSurf,Precision::PConfusion());
-      if(state == TopAbs_IN || state == TopAbs_ON){
-	di << "U=" << 1.28 << " V=" << 5.1 << "  classified INSIDE" << "\n";
-      }else{
-	di << "U=" << 1.28 << " V=" << 5.1 << "  classified OUTSIDE" << "\n";
-      }
-    } else {
-      uvSurf = gp_Pnt2d(atof(argv[4]),atof(argv[5]));
-      state = PClass.Classify(face,uvSurf,Precision::PConfusion());
-      if(state == TopAbs_IN || state == TopAbs_ON){
-	di << "U=" << atof(argv[4]) << " V=" << atof(argv[5]) << "  classified INSIDE" << "\n";
-      }else{
-	di << "U=" << atof(argv[4]) << " V=" << atof(argv[5]) << "  classified OUTSIDE" << "\n";
-      }
+  if (argc == 3) {
+    uvSurf = gp_Pnt2d(0.14,5.1);
+    state = PClass.Classify(face,uvSurf,Precision::PConfusion());
+    if(state == TopAbs_IN || state == TopAbs_ON){
+      di << "U=" << 0.14 << " V=" << 5.1 << "  classified INSIDE" << "\n";
+    }else{
+      di << "U=" << 0.14 << " V=" << 5.1 << "  classified OUTSIDE" << "\n";
+    }
+
+    uvSurf = gp_Pnt2d(1.28,5.1);
+    state = PClass.Classify(face,uvSurf,Precision::PConfusion());
+    if(state == TopAbs_IN || state == TopAbs_ON){
+      di << "U=" << 1.28 << " V=" << 5.1 << "  classified INSIDE" << "\n";
+    }else{
+      di << "U=" << 1.28 << " V=" << 5.1 << "  classified OUTSIDE" << "\n";
+    }
+  } else {
+    uvSurf = gp_Pnt2d(atof(argv[3]),atof(argv[4]));
+    state = PClass.Classify(face,uvSurf,Precision::PConfusion());
+    if(state == TopAbs_IN || state == TopAbs_ON){
+      di << "U=" << atof(argv[3]) << " V=" << atof(argv[4]) << "  classified INSIDE" << "\n";
+    }else{
+      di << "U=" << atof(argv[3]) << " V=" << atof(argv[4]) << "  classified OUTSIDE" << "\n";
     }
   }
   return 0;
 }
 
+
 #if ! defined(WNT)
 void stringerror(int state)
 {
@@ -422,7 +381,7 @@ static int BUC60585(Draw_Interpretor& di, Standard_Integer argc, const char ** a
   istream in(&fic);
   if (!fic.open(filename,ios::in)) {
     di << "Cannot open file for reading : " << filename << "\n";
-    delete filename;
+    delete [] filename;
     return -1;
   }
   
@@ -470,7 +429,7 @@ static int BUC60585(Draw_Interpretor& di, Standard_Integer argc, const char ** a
       Sec.Build();
       if(!Sec.IsDone()){
 	di << "Error performing intersection: not done." << "\n";
-	delete filename;
+	delete [] filename;
 	return -1;
       }
       res = Sec.Shape();
@@ -480,7 +439,7 @@ static int BUC60585(Draw_Interpretor& di, Standard_Integer argc, const char ** a
       Sec.Build();
       if(!Sec.IsDone()){
 	di << "Error performing intersection: not done." << "\n";
-	delete filename;
+	delete [] filename;
 	return -1;
       }
       res = Sec.Shape();
@@ -489,7 +448,7 @@ static int BUC60585(Draw_Interpretor& di, Standard_Integer argc, const char ** a
   }catch(Standard_Failure){
     Handle(Standard_Failure) error = Standard_Failure::Caught();
     di << "Error performing intersection: not done." << "\n";
-    delete filename;
+    delete [] filename;
     return -1;
   }
   
@@ -506,7 +465,7 @@ static int BUC60585(Draw_Interpretor& di, Standard_Integer argc, const char ** a
   
   di << "Done" << "\n";
 
-  delete filename;
+  delete [] filename;
   
   return 0;
 }
@@ -592,8 +551,8 @@ static int BUC60547(Draw_Interpretor& di, Standard_Integer argc, const char ** a
 
   BRepTools::Write(Com,FileName); 
 
-  delete Ch;
-  delete FileName;
+  delete [] Ch;
+  delete [] FileName;
   
   return 0;
 }
@@ -625,7 +584,7 @@ static Standard_Integer BUC60632(Draw_Interpretor& di, Standard_Integer /*n*/, c
   TCollection_ExtendedString Ext1("Dim1"); 
   Handle(AIS_LengthDimension) Dim1 = new AIS_LengthDimension(V1,V2,Plane1,atof(a[2]),Ext1); 
   
-  myAIScontext->SetDisplayMode(Dim1, atof(a[1]));
+  myAIScontext->SetDisplayMode(Dim1, atoi(a[1]));
   myAIScontext->Display(Dim1);
   return 0;
 }
@@ -1237,11 +1196,13 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
   Ex.Init(FP, TopAbs_VERTEX); 
   TopoDS_Vertex v1 = TopoDS::Vertex(Ex.Current()); 
   fillet.AddFillet(v1, 20); 
-  printf("\nError is %d ", fillet.Status()); 
+  di << "\n" << "Error is " << fillet.Status() << "\n";
+//  printf("\nError is %d ", fillet.Status()); 
   Ex.Next(); 
   TopoDS_Vertex V2 = TopoDS::Vertex(Ex.Current()); 
   fillet.AddFillet(V2, 20); 
-  printf("\nError is %d ", fillet.Status());
+  di << "\n" << "Error is " << fillet.Status() << "\n";
+//  printf("\nError is %d ", fillet.Status());
   fillet.Build(); 
   FP1 = fillet.Shape(); 
   ais2 = new AIS_Shape( FP1 ); 
@@ -2259,7 +2220,7 @@ void QABugs::Commands_3(Draw_Interpretor& theCommands) {
   theCommands.Add("BUC60623","BUC60623 result Shape1 Shape2",__FILE__,BUC60623,group);
   theCommands.Add("BUC60569","BUC60569 shape",__FILE__,BUC60569,group);
   theCommands.Add("BUC60614","BUC60614 shape",__FILE__,BUC60614,group);
-  theCommands.Add("BUC60609","BUC60609 shape [name] [interactive (0|1)]",__FILE__,BUC60609,group);
+  theCommands.Add("BUC60609","BUC60609 shape name [U V]",__FILE__,BUC60609,group);
 #if ! defined(WNT)
   theCommands.Add("UKI61075","UKI61075",__FILE__,UKI61075,group);
 #endif
diff --git a/src/QABugs/QABugs_7.cxx b/src/QABugs/QABugs_7.cxx
index c76ffd5..5321f3a 100644
--- a/src/QABugs/QABugs_7.cxx
+++ b/src/QABugs/QABugs_7.cxx
@@ -277,7 +277,7 @@ static Standard_Integer OCC862 (Draw_Interpretor& di, Standard_Integer argc, con
   for (i = 0; i < Glob_NbKnots; i++)
     aMults.SetValue(i+1,Glob_Mults[i]);
   // Create B-Spline curve
-  const Standard_Real aDegree = 14;
+  const Standard_Integer aDegree = 14;
   Handle(Geom_BSplineCurve) C1 = new Geom_BSplineCurve(aPoles,aKnots,aMults,aDegree);
 
   // Create trimmed line
diff --git a/src/QADNaming/QADNaming_BuilderCommands.cxx b/src/QADNaming/QADNaming_BuilderCommands.cxx
index 0b2d395..75c3977 100644
--- a/src/QADNaming/QADNaming_BuilderCommands.cxx
+++ b/src/QADNaming/QADNaming_BuilderCommands.cxx
@@ -63,7 +63,8 @@ static Standard_Integer BuildNamedShape (Draw_Interpretor& di,
 	aBuilder.Delete(aShape1);
 	break;
       case 'R':
-	aBuilder.Replace(aShape1,aShape2);
+//	aBuilder.Replace(aShape1,aShape2);
+	aBuilder.Modify(aShape1,aShape2);
 	break;
       case 'S':
 	aBuilder.Select(aShape1,aShape2);
diff --git a/src/QADNaming/QADNaming_IteratorsCommands.cxx b/src/QADNaming/QADNaming_IteratorsCommands.cxx
index 4416333..77e1aa3 100644
--- a/src/QADNaming/QADNaming_IteratorsCommands.cxx
+++ b/src/QADNaming/QADNaming_IteratorsCommands.cxx
@@ -50,8 +50,8 @@ static const char* EvolutionString(TNaming_Evolution theEvolution) {
     return "DELETE";
   case TNaming_SELECTED :
     return "SELECTED";
-  case TNaming_REPLACE :
-    return "REPLACE";
+//  case TNaming_REPLACE :
+//    return "REPLACE";
   }
   return "UNKNOWN_Evolution";
 }
@@ -117,15 +117,20 @@ static Standard_Integer GetOldShapes (Draw_Interpretor& di,
   return 0;
 }
 
-static int GetAllNew(const TopoDS_Shape& theShape, const TDF_Label& theAccess, const char* theName, Standard_Integer theIndex) {
+static int GetAllNew(const TopoDS_Shape& theShape, const TDF_Label& theAccess, 
+                     const TCollection_AsciiString& theName, Standard_Integer theIndex)
+{
   TNaming_NewShapeIterator anIter(theShape,theAccess);
-  char aName[200];
-  for(;anIter.More();anIter.Next()) {
-    if (!anIter.Shape().IsNull()) {
+  TCollection_AsciiString aName;
+  for(;anIter.More();anIter.Next())
+  {
+    if (!anIter.Shape().IsNull())
+    {
       theIndex++;
-      if (theName != NULL) {
-	sprintf(aName,"%s_%d",theName,theIndex);
-	DBRep::Set(aName,anIter.Shape());
+      if (!theName.IsEmpty())
+      {
+        aName = theName + "_" + theIndex;
+        DBRep::Set(aName.ToCString(),anIter.Shape());
       }
       theIndex = GetAllNew(anIter.Shape(),theAccess,theName,theIndex);
     }
@@ -138,7 +143,7 @@ static Standard_Integer GetAllNewShapes (Draw_Interpretor& di,
 					 const char** arg) {
   Standard_Integer aResult = 0;
   if (nb==3 || nb==4) {
-    const char* aName = (nb==4) ? arg[3] : NULL;
+    TCollection_AsciiString aName ((nb==4) ? arg[3] : "");
 
     if (arg[2][0]=='0') { // label
       TDF_Label aLabel;
@@ -152,13 +157,13 @@ static Standard_Integer GetAllNewShapes (Draw_Interpretor& di,
       TNaming_Iterator anIter(aNS);
       for(a=1;anIter.More();anIter.Next(),a++) {
 	if (!anIter.NewShape().IsNull()) {
-	  char* aSubName;
-	  if (aName!=NULL) {
-	    aSubName = new char[200];
-	    sprintf(aSubName,"%s_%d",aName,a);
-	  } else aSubName = NULL;
-	  aResult+=GetAllNew(anIter.NewShape(),aLabel,aSubName,0);
-	  if (aSubName != NULL) delete(aSubName);
+      TCollection_AsciiString aSubName;
+      if (!aName.IsEmpty())
+      {
+        aSubName += aName + "_";
+        aSubName += a;
+      }
+      aResult+=GetAllNew(anIter.NewShape(),aLabel,aSubName,0);
 	}
       }
     } else { // shape
@@ -178,17 +183,22 @@ static Standard_Integer GetAllNewShapes (Draw_Interpretor& di,
   return 0;
 }
 
-static int GetAllOld(const TopoDS_Shape& theShape, const TDF_Label& theAccess, const char* theName, Standard_Integer theIndex) {
-  char aName[200];
+static int GetAllOld(const TopoDS_Shape& theShape, const TDF_Label& theAccess, 
+                     const TCollection_AsciiString& theName, Standard_Integer theIndex)
+{
+  TCollection_AsciiString aName;
   Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(theShape,theAccess);
   if (aNS.IsNull()) return theIndex;
   TNaming_Iterator anIter(aNS);
-  for(;anIter.More();anIter.Next()) {
-    if (!anIter.OldShape().IsNull() && !anIter.NewShape().IsNull()) if (anIter.NewShape().IsSame(theShape)) {
+  for(;anIter.More();anIter.Next())
+  {
+    if (!anIter.OldShape().IsNull() && !anIter.NewShape().IsNull()) if (anIter.NewShape().IsSame(theShape))
+    {
       theIndex++;
-      if (theName!=NULL) {
-	sprintf(aName,"%s_%d",theName,theIndex);
-	DBRep::Set(aName,anIter.OldShape());
+      if (!theName.IsEmpty())
+      {
+        aName = theName + "_" + theIndex;
+        DBRep::Set(aName.ToCString(),anIter.OldShape());
       }
       theIndex = GetAllOld(anIter.OldShape(),theAccess,theName,theIndex);
     }
@@ -201,7 +211,7 @@ static Standard_Integer GetAllOldShapes (Draw_Interpretor& di,
 					 const char** arg) {
   Standard_Integer aResult = 0;
   if (nb==3 || nb==4) {
-    const char* aName = (nb==4) ? arg[3] : NULL;
+    TCollection_AsciiString aName((nb==4) ? arg[3] : "");
 
     if (arg[2][0]=='0') { // label
       TDF_Label aLabel;
@@ -215,12 +225,13 @@ static Standard_Integer GetAllOldShapes (Draw_Interpretor& di,
       TNaming_Iterator anIter(aNS);
       for(a=1;anIter.More();anIter.Next(),a++) {
 	if (!anIter.NewShape().IsNull()) {
-	  char* aSubName;
-	  if (aName!=NULL) {
-	    aSubName = new char[200];
-	    sprintf(aSubName,"%s_%d",aName,a);
-	  } else aSubName = NULL;
-	  aResult+=GetAllOld(anIter.NewShape(),aLabel,aSubName,0);
+      TCollection_AsciiString aSubName;
+      if (!aName.IsEmpty())
+      {
+        aSubName += aName + "_";
+        aSubName += a;
+	  }
+      aResult+=GetAllOld(anIter.NewShape(),aLabel,aSubName,0);
 	}
       }
     } else { // shape
diff --git a/src/QADraw/QADraw.cxx b/src/QADraw/QADraw.cxx
index 6f63abf..a9279bc 100644
--- a/src/QADraw/QADraw.cxx
+++ b/src/QADraw/QADraw.cxx
@@ -25,7 +25,7 @@
 #include <QADraw.hxx>
 #include <QADraw_DataMapOfAsciiStringOfAddress.hxx>
 #include <Draw_Interpretor.hxx>
-#include <Image_PixMap.hxx>
+#include <Image_AlienPixMap.hxx>
 #include <V3d_View.hxx>
 #include <ViewerTest.hxx>
 #include <ViewerTest_EventManager.hxx>
@@ -426,19 +426,18 @@ static Standard_Integer QAvzfit(Draw_Interpretor& di, Standard_Integer /*argc*/,
   return 0;
 }
 
-Handle(TColStd_HSequenceOfReal) GetColorOfPixel (const Handle(Aspect_PixMap) theImage,
+Handle(TColStd_HSequenceOfReal) GetColorOfPixel (const Image_PixMap&    theImage,
                                                  const Standard_Integer theCoordinateX,
                                                  const Standard_Integer theCoordinateY,
                                                  const Standard_Integer theRadius)
 {
   Handle(TColStd_HSequenceOfReal) aSeq = new TColStd_HSequenceOfReal();
-  if (theImage.IsNull()) {
+  if (theImage.IsEmpty()) {
     std::cerr << "The image is null.\n";
     return aSeq;
   }
-  Standard_Integer aWidth = 0;
-  Standard_Integer anHeight = 0;
-  theImage->Size (aWidth, anHeight);
+  Standard_Integer aWidth   = (Standard_Integer )theImage.SizeX();
+  Standard_Integer anHeight = (Standard_Integer )theImage.SizeY();
 
   Quantity_Color aColorTmp;
   for (Standard_Integer anXIter = theCoordinateX - theRadius;
@@ -456,7 +455,7 @@ Handle(TColStd_HSequenceOfReal) GetColorOfPixel (const Handle(Aspect_PixMap) the
         continue;
       }
       // Image_PixMap stores image upside-down in memory!
-      aColorTmp = theImage->PixelColor (anXIter, anYIter);
+      aColorTmp = theImage.PixelColor (anXIter, anYIter);
       aSeq->Append (aColorTmp.Red());
       aSeq->Append (aColorTmp.Green());
       aSeq->Append (aColorTmp.Blue());
@@ -482,12 +481,12 @@ static Standard_Integer QAAISGetPixelColor (Draw_Interpretor& di, Standard_Integ
   Standard_Integer QAAISXWindowSize_X = 0;
   Standard_Integer QAAISXWindowSize_Y = 0;
   QAAISWindow->Size(QAAISXWindowSize_X, QAAISXWindowSize_Y);
-  Standard_ShortReal QAAISCoordinateX = atoi (argv [1]);
-  Standard_ShortReal QAAISCoordinateY = atoi (argv [2]);
+  Standard_Integer QAAISCoordinateX = atoi (argv [1]);
+  Standard_Integer QAAISCoordinateY = atoi (argv [2]);
 
-  Standard_ShortReal QAAISColorRED_V = 0;
-  Standard_ShortReal QAAISColorGRN_V = 0;
-  Standard_ShortReal QAAISColorBLU_V = 0;
+  Standard_Real QAAISColorRED_V = 0;
+  Standard_Real QAAISColorGRN_V = 0;
+  Standard_Real QAAISColorBLU_V = 0;
 
   if ( argc == 6 ) {
     QAAISColorRED_V = atof (argv [3]);
@@ -504,18 +503,18 @@ static Standard_Integer QAAISGetPixelColor (Draw_Interpretor& di, Standard_Integ
     aRadius=0;
   }
 
-  Handle(TColStd_HSequenceOfReal) aSeq = GetColorOfPixel (QAAISView->ToPixMap (QAAISXWindowSize_X, QAAISXWindowSize_Y, Image_TOI_RGB),
-                                                          QAAISCoordinateX, QAAISCoordinateY,
-                                                          aRadius);
+  Image_PixMap anImage;
+  QAAISView->ToPixMap (anImage, QAAISXWindowSize_X, QAAISXWindowSize_Y);
+  Handle(TColStd_HSequenceOfReal) aSeq = GetColorOfPixel (anImage, QAAISCoordinateX, QAAISCoordinateY, aRadius);
   cout << "Length = " << aSeq->Length() << endl;
 
   Standard_Boolean IsNotEqual = Standard_True;
   Standard_Integer i;
   for(i=1; i<=aSeq->Length();i+=3) {
     // mkv 29.04.03
-    Standard_ShortReal QAAISColorRED_R = (((Standard_ShortReal) ((Standard_Integer) (aSeq->Value(i+0) * 1000000))) / 1000000.);
-    Standard_ShortReal QAAISColorGRN_R = (((Standard_ShortReal) ((Standard_Integer) (aSeq->Value(i+1) * 1000000))) / 1000000.);
-    Standard_ShortReal QAAISColorBLU_R = (((Standard_ShortReal) ((Standard_Integer) (aSeq->Value(i+2) * 1000000))) / 1000000.);
+    Standard_Real QAAISColorRED_R = (Floor(aSeq->Value(i+0) * 1000000.)) / 1000000.;
+    Standard_Real QAAISColorGRN_R = (Floor(aSeq->Value(i+1) * 1000000.)) / 1000000.;
+    Standard_Real QAAISColorBLU_R = (Floor(aSeq->Value(i+2) * 1000000.)) / 1000000.;
     // mkv 29.04.03
 
     if ( argc == 3 ) {
@@ -696,6 +695,7 @@ static Standard_Integer QAAISGetViewCharac (Draw_Interpretor& di, Standard_Integ
   di << "Proj on X : " << QAAISViewProjX << "; on Y: " << QAAISViewProjY << "; on Z: " << QAAISViewProjZ << "\n";
   di << "Up on X : " << QAAISViewUpX << "; on Y: " << QAAISViewUpY << "; on Z: " << QAAISViewUpZ << "\n";
   di << "At on X : " << QAAISViewAtX << "; on Y: " << QAAISViewAtY << "; on Z: " << QAAISViewAtZ << "\n";
+  return 0;
 }
 
 static Standard_Integer QAAISSetViewCharac (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
@@ -737,7 +737,7 @@ static Standard_Integer QAAISGetColorCoord (Draw_Interpretor& di, Standard_Integ
     di << "Usage : " << argv[0] << " [3d|2d]" << "\n";
     return 1;
   }
-  Handle (Aspect_Window) QAAISWindow;
+  Handle(Xw_Window) QAAISWindow;
 
   Standard_Boolean is3d = 1;
 
@@ -748,7 +748,7 @@ static Standard_Integer QAAISGetColorCoord (Draw_Interpretor& di, Standard_Integ
       di << "You must initialize AISViewer before this command." << "\n";
       return 1;
     }
-    QAAISWindow = QAAIS_MainView -> V3d_View::Window ();
+    QAAISWindow = Handle(Xw_Window)::DownCast (QAAIS_MainView->V3d_View::Window());
     is3d = 1;
   }
 
@@ -758,7 +758,7 @@ static Standard_Integer QAAISGetColorCoord (Draw_Interpretor& di, Standard_Integ
       di << "You must initialize AIS 2D Viewer before this command." << "\n";
       return 1;
     }
-    QAAISWindow = V->Driver()->Window();
+    QAAISWindow = Handle(Xw_Window)::DownCast (V->Driver()->Window());
     is3d = 0;
   }
 
@@ -795,19 +795,20 @@ static Standard_Integer QAAISGetColorCoord (Draw_Interpretor& di, Standard_Integ
   const char **argvvv = (const char **) bufff;
   while ( is3d ? ViewerMainLoop (argccc, argvvv) : ViewerMainLoop2d (argccc, argvvv)) {
     Handle(TColStd_HSequenceOfReal) aSeq;
+    Image_PixMap anImage;
     if(is3d)
     {
       ViewerTest::GetMousePosition (QAAIS_MousePoint_X, QAAIS_MousePoint_Y);
       Handle (V3d_View) QAAIS_MainView = ViewerTest::CurrentView();
-      aSeq = GetColorOfPixel (QAAIS_MainView->ToPixMap (QAAIS_WindowSize_X, QAAIS_WindowSize_Y, Image_TOI_RGB),
-                              QAAIS_MousePoint_X, QAAIS_MousePoint_Y, 0);
+      QAAIS_MainView->ToPixMap (anImage, QAAIS_WindowSize_X, QAAIS_WindowSize_Y);
     }
     else
     {
       Viewer2dTest::GetMousePosition (QAAIS_MousePoint_X, QAAIS_MousePoint_Y);
-      aSeq = GetColorOfPixel (QAAISWindow->ToPixMap(),
-                              QAAIS_MousePoint_X, QAAIS_MousePoint_Y, 0);
+      QAAISWindow->ToPixMap (anImage);
     }
+    aSeq = GetColorOfPixel (anImage, QAAIS_MousePoint_X, QAAIS_MousePoint_Y, 0);
+
     QAAIS_ColorRED = aSeq->Value(1);
     QAAIS_ColorGRN = aSeq->Value(2);
     QAAIS_ColorBLU = aSeq->Value(3);
@@ -869,8 +870,13 @@ static int QAAISGetPixelColor2d (Draw_Interpretor& di, Standard_Integer argc, co
     di << "You must initialize AIS 2D Viewer before this command." << "\n";
     return 1;
   }
+
   // Get Color
-  Handle(Aspect_Window) QAAISWindow = V->Driver()->Window();
+  #if (defined(_WIN32) || defined(__WIN32__))
+    Handle(WNT_Window) QAAISWindow = Handle(WNT_Window)::DownCast (V->Driver()->Window());
+  #else
+    Handle(Xw_Window)  QAAISWindow = Handle(Xw_Window )::DownCast (V->Driver()->Window());
+  #endif
 
   Standard_ShortReal aCoordinateX = atoi(argv[1]);
   Standard_ShortReal aCoordinateY = atoi(argv[2]);
@@ -895,9 +901,9 @@ static int QAAISGetPixelColor2d (Draw_Interpretor& di, Standard_Integer argc, co
     aRadius=0;
   }
 
-  Handle(TColStd_HSequenceOfReal) aSeq = GetColorOfPixel (QAAISWindow->ToPixMap(),
-                                                          aCoordinateX, aCoordinateY,
-                                                          aRadius);
+  Image_PixMap anImage;
+  QAAISWindow->ToPixMap (anImage);
+  Handle(TColStd_HSequenceOfReal) aSeq = GetColorOfPixel (anImage, aCoordinateX, aCoordinateY, aRadius);
 
   Standard_Boolean IsNotEqual = Standard_True;
   Standard_Integer i;
@@ -1041,7 +1047,7 @@ static int V2dPan (Draw_Interpretor& di, int argc, const char ** argv)
     di << "use 'v2dinit' command before " << argv[0] << "\n";
     return -1;
   }
-  Viewer2dTest::CurrentView()->Pan(atof(argv[1]), atof(argv[2]));
+  Viewer2dTest::CurrentView()->Pan(atoi(argv[1]), atoi(argv[2]));
   return 0;
 }
 
@@ -1242,6 +1248,7 @@ static int QA2dGetIndexes (Draw_Interpretor& di, int /*argc*/, const char ** arg
   di << "Available font  indexes are " << aFontMin << " - " << aFontMax << "\n";
   aWindowDriver->ColorBoundIndexs(aColorMin, aColorMax);
   di << "Available color indexes are " << aColorMin << " - " << aColorMax << "\n";
+  return 0;
 }
 
 #if ! defined(WNT)
@@ -2286,7 +2293,8 @@ void QADraw::CommonCommands(Draw_Interpretor& theCommands)
   theCommands.Add("QAwzoom","QAwzoom view-id X1 Y1 X2 Y2; zoom on a window",__FILE__,QAwzoom,group);
   theCommands.Add("QAGetCoordinatesWzoom","QAGetCoordinatesWzoom ; Get coordinates for zoom on a window",__FILE__,QAGetCoordinatesWzoom,group);
 
-  theCommands.Add("rename","rename name1 toname1 name2 toname2 ...",__FILE__,QArename,group);
+// adding commands "rename" leads to the fact that QA commands doesn't work properly OCC23410, use function "renamevar"
+// theCommands.Add("rename","rename name1 toname1 name2 toname2 ...",__FILE__,QArename,group);
 
   theCommands.Add ("QANbSelected", "QANbSelected", __FILE__, QANbSelected, group);
 //#if defined(V2D)
diff --git a/src/QANewBRepNaming/QANewBRepNaming.cxx b/src/QANewBRepNaming/QANewBRepNaming.cxx
index 30190b4..715eac0 100644
--- a/src/QANewBRepNaming/QANewBRepNaming.cxx
+++ b/src/QANewBRepNaming/QANewBRepNaming.cxx
@@ -88,11 +88,11 @@ void QANewBRepNaming::LoadNamedShape (TNaming_Builder& theBuilder,
       theBuilder.Modify(theOS, theNS);
       break;
     }
-  case TNaming_REPLACE :
-    {
-      theBuilder.Replace(theOS, theNS);
-      break;
-    }
+//  case TNaming_REPLACE :
+//    {
+//      theBuilder.Replace(theOS, theNS);
+//      break;
+//    }
   case TNaming_DELETE :
     {
       theBuilder.Delete (theOS);
diff --git a/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx b/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx
index c768639..3e707d5 100644
--- a/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx
+++ b/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx
@@ -1103,7 +1103,7 @@ static void SortEdges5 (const TopTools_Array1OfShape& theArS, const TColgp_Array
   else {aDP = aDP3; aCP = theArP.Value(i4);} //i4, i5 - group of 2 edges at the bottom
   if(!IsDirectionPositive(theAx, aDP, aCP)) {//first must be positive direction
     Standard_Integer aN;
-    if(aTop = 2) {
+    if(aTop == 2) {
     // change i1 <=> i2
       aN = i2; i2 = i1;
       i1 = aN;
@@ -1126,7 +1126,7 @@ static void SortEdges5 (const TopTools_Array1OfShape& theArS, const TColgp_Array
 
   if(!IsDirectionPositive(theAx, aDP, aCP)) {//first must be positive direction
     Standard_Integer aN;
-    if(aTop = 2) {
+    if(aTop == 2) {
     // change i3 <=> i5
       aN = i5; i5 = i3;
       i3 = aN;
@@ -1565,6 +1565,7 @@ Standard_Boolean QANewBRepNaming_BooleanOperationFeat::IsWRCase2(const BRepAlgoA
       }
     }
   }
+  return Standard_False;
 }
 
 //=======================================================================
diff --git a/src/QANewDBRepNaming/QANewDBRepNaming.cxx b/src/QANewDBRepNaming/QANewDBRepNaming.cxx
index 6e62f20..64c16f4 100644
--- a/src/QANewDBRepNaming/QANewDBRepNaming.cxx
+++ b/src/QANewDBRepNaming/QANewDBRepNaming.cxx
@@ -150,9 +150,8 @@ static Standard_Integer QANewDBRepNaming_CheckNaming(Draw_Interpretor& di,Standa
   TopExp::MapShapes(aSelectedShape, allSubShapes);
 //  cout<<"SELECTION ..."<<endl;
 //  cout << "i = " << allSubShapes.Extent() << endl;
-  Standard_Integer count = 0, j, i;
+  Standard_Integer count = 0, i;
   char aDrawName[80] = "Select";
-  char aDrawNumber[10];
 
   for (i = 1; i <= allSubShapes.Extent(); i++) {
     const TDF_Label& aSubLabel = L.FindChild(i);
@@ -231,8 +230,7 @@ static Standard_Integer QANewDBRepNaming_CheckNaming(Draw_Interpretor& di,Standa
   TDF_LabelMap scope;
   TDF_ChildIterator itr(L.Root(), Standard_True);
   i = 1;
-  char aNotSolved[1000];
-  aNotSolved[0]=0;
+  TCollection_AsciiString aNotSolved;
   for (itr.Initialize(L, Standard_False); itr.More(); itr.Next(), i++) {
     Handle(TNaming_NamedShape) aNS;
     if (!itr.Value().FindAttribute(TNaming_NamedShape::GetID(), aNS)) {
@@ -245,7 +243,8 @@ static Standard_Integer QANewDBRepNaming_CheckNaming(Draw_Interpretor& di,Standa
     TNaming_Selector SLSolving(itr.Value());
     if (!SLSolving.Solve(scope)) {
       isFailured = Standard_True;
-      sprintf(aNotSolved,"%s %d",aNotSolved,i);
+      aNotSolved += " ";
+      aNotSolved += i;
       continue;
     }
     const Handle(TNaming_NamedShape)& aResultOfSolving = SLSolving.NamedShape();
@@ -253,8 +252,8 @@ static Standard_Integer QANewDBRepNaming_CheckNaming(Draw_Interpretor& di,Standa
 //       cout<<"Failure of Solving: it didn't produced a shape!"<<endl;
 //       return 1;
       isFailured = Standard_True;
-      sprintf(aNotSolved,"%s %d",aNotSolved,i);
-//	break;
+      aNotSolved += " ";
+      aNotSolved += i;
       continue;
     }      
     TopoDS_Shape aRes;
@@ -309,10 +308,10 @@ static Standard_Integer QANewDBRepNaming_CheckNaming(Draw_Interpretor& di,Standa
 	}
       }
       if (!aCoord1.IsEqual(aCoord2,Precision::Confusion()) || aRes.ShapeType() != allTranslatedSubShapes(i).ShapeType()) {
-	sprintf(aNotSolved,"%s %d",aNotSolved,i);
-	isFailured = Standard_True;
-	//    break;
-	continue;
+	    aNotSolved += " ";
+        aNotSolved += i;
+	    isFailured = Standard_True;
+	    continue;
       }
     }    
 //    cout<<endl;
diff --git a/src/QANewDBRepNaming/QANewDBRepNaming_FeatureCommands.cxx b/src/QANewDBRepNaming/QANewDBRepNaming_FeatureCommands.cxx
index 001547b..f4f00ca 100644
--- a/src/QANewDBRepNaming/QANewDBRepNaming_FeatureCommands.cxx
+++ b/src/QANewDBRepNaming/QANewDBRepNaming_FeatureCommands.cxx
@@ -101,7 +101,7 @@ static Standard_Integer QANewDBRepNaming_NameBooleanOperationFeat (Draw_Interpre
 							      Standard_Integer nb, 
 							      const char ** arg)
 {
-  if (nb != 6 || nb != 7) {
+  if (nb != 6 && nb != 7) {
     di <<  "QANewDBRepNaming_NameBooleanOperationFeat : Error"  << "\n";
     return 1;
   }
diff --git a/src/QANewModTopOpe/QANewModTopOpe.cxx b/src/QANewModTopOpe/QANewModTopOpe.cxx
index 7304b80..60ebf4c 100644
--- a/src/QANewModTopOpe/QANewModTopOpe.cxx
+++ b/src/QANewModTopOpe/QANewModTopOpe.cxx
@@ -577,18 +577,15 @@ Standard_Boolean QANewModTopOpe::IsConnected(const TopoDS_Shape& TheS)
   Standard_Integer nbs = aSMap.Extent();
   if(nbs <= 1) return aRes;
 
-  //  math_Matrix aMat(1, nbs, 1, nbs, 0.0);
-  int *aMat = new int[nbs*nbs];
+  math_Matrix aMat(1, nbs, 1, nbs, 0);
   Standard_Integer aMax=nbs*nbs;
-  for(Standard_Integer kk=0;kk<aMax;kk++) aMat[kk]=0;
 
   TopTools_MapIteratorOfMapOfShape anMIter(aSMap);
   Standard_Integer n = 1;
   Standard_Integer connect;
   const TopoDS_Shape& aFirstShape = anMIter.Key();
 
-  //  aMat(n,n) = 1.;
-  aMat[0] = 1;
+  aMat(n,n) = 1;
 
   anExp.Init(aFirstShape, TopAbs_VERTEX);
   for(; anExp.More(); anExp.Next()) {
@@ -599,22 +596,21 @@ Standard_Boolean QANewModTopOpe::IsConnected(const TopoDS_Shape& TheS)
 
   for(; anMIter.More(); anMIter.Next()) {
     ++n;
-    aMat[(n-1)*nbs+n-1] = 1;
-    // aMat(n,n) = 1.;
+    aMat(n,n) = 1;
 
     const TopoDS_Shape& aShape = anMIter.Key();
 
     anExp.Init(aShape, TopAbs_VERTEX);
     for(; anExp.More(); anExp.Next()) {
-      if(aMap.IsBound(anExp.Current())) {
-	connect = aMap(anExp.Current());
-	//aMat(n, connect) = 1.;
-	//aMat(connect, n) = 1.;
-	aMat[(n-1)*nbs+connect-1] = 1;
-	aMat[(connect-1)*nbs+n-1] = 1;
+      if(aMap.IsBound(anExp.Current()))
+      {
+        connect = aMap(anExp.Current());
+        aMat(n, connect) = 1;
+        aMat(connect, n) = 1;
       }
-      else {
-	aMap.Bind(anExp.Current(), n);
+      else
+      {
+        aMap.Bind(anExp.Current(), n);
       }
     }
   }
@@ -623,45 +619,37 @@ Standard_Boolean QANewModTopOpe::IsConnected(const TopoDS_Shape& TheS)
   Standard_Integer k,i,ncount=0;
   Standard_Real p; 
   Standard_Boolean aNotChanged;
-  // math_Vector aRow(1, nbs), aCol(1, nbs);
-
-  //	aRow = aMat.Row(1);
 
-  for(k = 1; k <= nbs; k++) {
+  for (k = 1; k <= nbs; k++)
+  {
     aRes = Standard_True;
     aNotChanged = Standard_True;
-    for(n = 1; n <= nbs; n++) {
-      //      if(aMat(1, n) < 1.) {
-      if(aMat[n-1] == 0) {
-	//	aRow = aMat.Row(1);
-	//aCol = aMat.Col(n);
-	p=0.;
-	for(i=1;i<=nbs;i++) {
-	  //ncount++;
-	  //	  if(aMat(1,i) > 0. && aMat(i,n)> 0.) {
-	  if(aMat[i-1] == 1 && aMat[(i-1)*nbs+n-1] == 1) {
-	    p=1.;
-	    break;
-	  }
-	  //	  p+=aMat(1,i)*aMat(i,n);
-	}
-	//p = aRow*aCol;
-	if(p > 0.0) {
-	  //	  aMat(1, n) = 1.0;
-	  //	  aMat(n, 1) = 1.0;
-	  aMat[n-1] = 1;
-	  aMat[(n-1)*nbs+1-1] = 1;
-	  aNotChanged = Standard_False;
-	}
-	aRes = Standard_False;
+    for (n = 1; n <= nbs; n++)
+    {
+      if (aMat(1, n) == 0)
+      {
+        p = 0;
+        for (i = 1; i <= nbs; i++)
+        {
+          if (aMat(1, i) == 1 && aMat(i, n) == 1)
+          {
+            p = 1;
+            break;
+          }
+        }
+        if (p > 0)
+        {
+          aMat(1, n) = 1;
+          aMat(n, 1) = 1;
+          aNotChanged = Standard_False;
+        }
+        aRes = Standard_False;
       }
     }
     if(aNotChanged) break;
     if(aRes) break;
   }
-  delete aMat;
 
-  //  cout << "QANewModTopOpe::IsConnected END: aRes="<<aRes   << ";ncount="<<ncount<<endl;
   cout << "QANewModTopOpe::IsConnected END: aRes="<<aRes <<endl;
   return aRes;
 
diff --git a/src/QAViewer2dTest/FILES b/src/QAViewer2dTest/FILES
new file mode 100644
index 0000000..ff83f41
--- /dev/null
+++ b/src/QAViewer2dTest/FILES
@@ -0,0 +1,5 @@
+QAViewer2dTest_CMPLRS.edl
+QAViewer2dTest_GeneralCommands.cxx
+QAViewer2dTest_ViewerCommands.cxx
+QAViewer2dTest_DisplayCommands.cxx
+QAViewer2dTest_ObjectCommands.cxx
diff --git a/src/QAViewer2dTest/QAViewer2dTest.cdl b/src/QAViewer2dTest/QAViewer2dTest.cdl
new file mode 100644
index 0000000..f37c851
--- /dev/null
+++ b/src/QAViewer2dTest/QAViewer2dTest.cdl
@@ -0,0 +1,45 @@
+-- Copyright (c) 1999-2012 OPEN CASCADE SAS
+--
+-- The content of this file is subject to the Open CASCADE Technology Public
+-- License Version 6.5 (the "License"). You may not use the content of this file
+-- except in compliance with the License. Please obtain a copy of the License
+-- at http://www.opencascade.org and read it completely before using this file.
+--
+-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+--
+-- The Original Code and all software distributed under the License is
+-- distributed on an "AS IS" basis, without warranty of any kind, and the
+-- Initial Developer hereby disclaims all such warranties, including without
+-- limitation, any warranties of merchantability, fitness for a particular
+-- purpose or non-infringement. Please see the License for the specific terms
+-- and conditions governing the rights and limitations under the License.
+
+
+package QAViewer2dTest
+
+	---Purpose: 
+
+uses
+    Draw,
+    TCollection, 
+    TColStd, 
+    TopAbs,
+    TopTools,
+    TopoDS,
+    V2d,
+    AIS,
+    Graphic2d
+
+is 
+
+    ---Category: Draw Commands
+
+    Commands (theCommands : in out Interpretor from Draw);
+    MyCommands (theCommands : in out Interpretor from Draw);   --  My  Own  Com-s
+    GeneralCommands (theCommands :in out Interpretor from Draw);
+    ViewerCommands  (theCommands :in out Interpretor from Draw);
+    DisplayCommands (theCommands : in out Interpretor from Draw);
+    ObjectCommands  (theCommands :in out Interpretor from Draw);
+    
+end;
diff --git a/src/QAViewer2dTest/QAViewer2dTest.cxx b/src/QAViewer2dTest/QAViewer2dTest.cxx
new file mode 100644
index 0000000..151e7d1
--- /dev/null
+++ b/src/QAViewer2dTest/QAViewer2dTest.cxx
@@ -0,0 +1,595 @@
+// Copyright (c) 1999-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#if defined(WOKC40)
+
+#include <QAViewer2dTest.hxx>
+#include <QAViewer2dTest_EventManager.hxx>
+#include <QAViewer2dTest_DoubleMapOfInteractiveAndName.hxx>
+#include <QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx>
+
+#include <Draw_Interpretor.hxx>
+
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopTools_HArray1OfShape.hxx>
+
+#include <TColStd_ListOfTransient.hxx>
+#include <TColStd_MapOfInteger.hxx>
+#include <TColStd_HArray1OfTransient.hxx>
+
+#include <TCollection_AsciiString.hxx>
+
+#include <AIS2D_ProjShape.hxx>
+#include <AIS2D_InteractiveObject.hxx>
+#include <AIS2D_InteractiveContext.hxx>
+
+extern int ViewerMainLoop2d (Standard_Integer argc, char** argv);
+
+TopoDS_Shape GetShapeFromName2d (char* name);
+
+static TColStd_ListOfTransient theEventMgrs2d;
+
+//==============================================================================
+//  VIEWER OBJECT MANAGEMENT GLOBAL VARIABLES
+//==============================================================================
+QAViewer2dTest_DoubleMapOfInteractiveAndName& GetMapOfAIS2D()
+{
+  static QAViewer2dTest_DoubleMapOfInteractiveAndName TheMap;
+  return TheMap;
+}
+
+static void VwrTst_InitEventMgr2d (const Handle(AIS2D_InteractiveContext)& Ctx)
+{
+  theEventMgrs2d.Clear();
+  theEventMgrs2d.Prepend(new QAViewer2dTest_EventManager(Ctx));
+}
+
+static Handle(V2d_View)& a2DView()
+{
+  static Handle(V2d_View) Viou;
+  return Viou;
+}
+
+Handle(AIS2D_InteractiveContext)& TheAIS2DContext()
+{ 
+  static Handle(AIS2D_InteractiveContext) aContext;
+  return aContext;
+}
+
+Handle(V2d_View) QAViewer2dTest::CurrentView()
+{
+  return a2DView();
+}
+
+void QAViewer2dTest::CurrentView (const Handle(V2d_View)& V)
+{
+  a2DView() = V;
+}
+
+Handle(AIS2D_InteractiveContext) QAViewer2dTest::GetAIS2DContext()
+{
+  return TheAIS2DContext();
+}
+
+Handle(V2d_Viewer) QAViewer2dTest::GetViewerFromContext()
+{
+  return TheAIS2DContext()->CurrentViewer();
+}
+
+Handle(V2d_Viewer) QAViewer2dTest::GetCollectorFromContext()
+{
+  return TheAIS2DContext()->CurrentViewer();
+}
+
+void QAViewer2dTest::SetAIS2DContext (const Handle(AIS2D_InteractiveContext)& aCtx)
+{
+  TheAIS2DContext() = aCtx;
+  QAViewer2dTest::ResetEventManager();
+}
+
+void QAViewer2dTest::SetEventManager (const Handle(QAViewer2dTest_EventManager)& EM)
+{
+  theEventMgrs2d.Prepend(EM);
+}
+
+void QAViewer2dTest::UnsetEventManager()
+{
+  theEventMgrs2d.RemoveFirst();
+}
+
+void QAViewer2dTest::ResetEventManager()
+{
+  VwrTst_InitEventMgr2d(QAViewer2dTest::GetAIS2DContext());
+}
+
+//==============================================================================
+//function : CurrentEventManager
+//purpose  : 
+//==============================================================================
+Handle(QAViewer2dTest_EventManager) QAViewer2dTest::CurrentEventManager()
+{
+  Handle(QAViewer2dTest_EventManager) EM;
+  if(theEventMgrs2d.IsEmpty()) return EM;
+  Handle(Standard_Transient) Tr =  theEventMgrs2d.First();
+  EM = *((Handle(QAViewer2dTest_EventManager)*)&Tr);
+  return EM;
+}
+
+//==============================================================================
+//function : Clear
+//purpose  : Remove all the object from the viewer
+//==============================================================================
+void QAViewer2dTest::Clear()
+{
+  if (!QAViewer2dTest::CurrentView().IsNull())
+  {
+    TheAIS2DContext()->CloseLocalContext();
+    QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+    while (it.More())
+    {
+      cout << "Remove " << it.Key2() << endl;
+//      TheAIS2DContext()->Remove(it.Key1(), Standard_False);
+      TheAIS2DContext()->Erase(it.Key1(), Standard_False, Standard_False);
+      it.Next();
+    }
+    TheAIS2DContext()->UpdateCurrentViewer();
+    GetMapOfAIS2D().Clear();
+  }
+}
+
+//==============================================================================
+//function : StandardModeActivation
+//purpose  : Activate a selection mode, vertex, edge, wire ..., in a local
+//           Context
+//==============================================================================
+void QAViewer2dTest::StandardModeActivation (const Standard_Integer mode)
+{
+  Handle(AIS2D_InteractiveContext) aContext = QAViewer2dTest::GetAIS2DContext();
+  aContext->SetPickMode(Graphic2d_PM_INTERSECT);
+
+  char *cmode = "?????????";
+
+  switch ((AIS2D_TypeOfDetection)mode)
+  {
+    case AIS2D_TOD_OBJECT:    cmode = "OBJECT"; break;
+    case AIS2D_TOD_PRIMITIVE: cmode = "PRIMITIVE"; break;
+    case AIS2D_TOD_ELEMENT:   cmode = "ELEMENT"; break;
+    case AIS2D_TOD_VERTEX:    cmode = "VERTEX"; break;
+    case AIS2D_TOD_NONE:      cmode = "NONE"; break;
+  }
+
+  // Activate
+  QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+  while (it.More())
+  {
+    Handle(AIS2D_InteractiveObject) ashape = it.Key1();
+    ashape->SetContext(aContext);
+//      ashape->SetSelectionMode(mode);
+    ashape->SetHighlightMode((AIS2D_TypeOfDetection)mode);
+    it.Next();
+  }
+//	aContext->ActivateStandardMode(AIS2D_ProjShape::SelectionType(mode));
+  cout << "Mode " << cmode << " ON" << endl;
+}
+
+//=======================================================================
+//function : PickObjects
+//purpose  : 
+//=======================================================================
+Standard_Boolean QAViewer2dTest::PickObjects (Handle(TColStd_HArray1OfTransient)& arr,
+                                            const AIS_KindOfInteractive TheType,
+                                             const Standard_Integer /*TheSignature*/,
+                                             const Standard_Integer MaxPick)
+{
+  Handle(AIS2D_InteractiveObject) IO;
+  Standard_Integer curindex = (TheType == AIS_KOI_None) ? 0 : TheAIS2DContext()->OpenLocalContext();
+  
+  // step 1: prepare the data
+  if (curindex != 0)
+  {
+//    Handle(AIS2D_SignatureFilter) F1 = new AIS2D_SignatureFilter(TheType,TheSignature);
+//    TheAIS2DContext()->AddFilter(F1);
+  }
+  
+  // step 2 : wait for the selection...
+//  Standard_Boolean IsGood (Standard_False);
+//  Standard_Integer NbPick(0);
+  Standard_Boolean NbPickGood (0), NbToReach (arr->Length());
+  Standard_Integer NbPickFail(0);
+  Standard_Integer argccc = 5;
+  char *bufff[] = { "A", "B", "C","D", "E" };
+  char **argvvv = (char **) bufff;
+  
+  while (NbPickGood < NbToReach && NbPickFail <= MaxPick)
+  {
+    while (ViewerMainLoop2d(argccc,argvvv)) {}
+/*    Standard_Integer NbStored = TheAIS2DContext()->NbSelected();
+    if((unsigned int ) NbStored != NbPickGood)
+      NbPickGood= NbStored;
+    else
+      NbPickFail++;
+    cout<<"NbPicked =  "<<NbPickGood<<" |  Nb Pick Fail :"<<NbPickFail<<endl;*/
+  }
+  
+  // step3 get result.
+  
+  if ((unsigned int ) NbPickFail >= NbToReach) return Standard_False;
+
+  /*
+  Standard_Integer i(0);
+  for(TheAIS2DContext()->InitSelected();
+      TheAIS2DContext()->MoreSelected();
+      TheAIS2DContext()->NextSelected()){
+    i++;
+    Handle(AIS2D_InteractiveObject) IO = TheAIS2DContext()->SelectedInteractive();
+    arr->SetValue(i,IO);
+  }*/
+
+  if (curindex > 0) TheAIS2DContext()->CloseLocalContext(curindex);
+  return Standard_True;
+}
+
+//=======================================================================
+//function : PickObject
+//purpose  : 
+//=======================================================================
+/*Handle(AIS2D_InteractiveObject) QAViewer2dTest::PickObject
+       (const AIS2D_KindOfInteractive TheType,
+        const Standard_Integer TheSignature,
+        const Standard_Integer MaxPick)
+{
+  Handle(AIS2D_InteractiveObject) IO;
+  Standard_Integer curindex = (TheType == AIS2D_KOI_None) ? 0 : TheAIS2DContext()->OpenLocalContext();
+  
+  // step 1: prepare the data
+  
+  if(curindex !=0){
+    Handle(AIS2D_SignatureFilter) F1 = new AIS2D_SignatureFilter(TheType,TheSignature);
+    TheAIS2DContext()->AddFilter(F1);
+  }
+
+  // step 2 : wait for the selection...
+  Standard_Boolean IsGood (Standard_False);
+  Standard_Integer NbPick(0);
+  Standard_Integer argccc = 5;
+  char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" };
+  char **argvvv = bufff;
+  
+  
+  while(!IsGood && NbPick<= MaxPick){
+    while(ViewerMainLoop2d(argccc,argvvv)){}
+    IsGood = (TheAIS2DContext()->NbSelected()>0) ;
+    NbPick++;
+    cout<<"Nb Pick :"<<NbPick<<endl;
+  }
+  
+  
+  // step3 get result.
+  if(IsGood){
+    TheAIS2DContext()->InitSelected();
+    IO = TheAIS2DContext()->SelectedInteractive();
+  }
+  
+  if(curindex!=0)
+    TheAIS2DContext()->CloseLocalContext(curindex);
+  return IO;
+}*/
+
+//=======================================================================
+//function : PickShape
+//purpose  : First Activate the rightmode + Put Filters to be able to
+//           pick objets that are of type <TheType>...
+//=======================================================================
+TopoDS_Shape QAViewer2dTest::PickShape (const TopAbs_ShapeEnum /*TheType*/,
+                                      const Standard_Integer MaxPick)
+{
+  // step 1: prepare the data
+  Standard_Integer curindex = TheAIS2DContext()->OpenLocalContext();
+  TopoDS_Shape result;
+  
+/*  if(TheType==TopAbs_SHAPE)
+  {
+    Handle(AIS2D_TypeFilter) F1 = new AIS2D_TypeFilter(AIS2D_KOI_Shape);
+    TheAIS2DContext()->AddFilter(F1);
+  }
+  else
+  {
+    Handle(StdSelect_ShapeTypeFilter) TF = new StdSelect_ShapeTypeFilter(TheType);
+    TheAIS2DContext()->AddFilter(TF);
+    TheAIS2DContext()->ActivateStandardMode(TheType);
+  }*/
+
+  // step 2 : wait for the selection...
+  Standard_Boolean NoShape (Standard_True);
+  Standard_Integer NbPick (0);
+  Standard_Integer argccc = 5;
+  char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" };
+  char **argvvv = (char **) bufff;
+
+  while (NoShape && NbPick <= MaxPick)
+  {
+    while (ViewerMainLoop2d(argccc,argvvv)) {}
+//    NoShape = (TheAIS2DContext()->NbSelected() == 0);
+    NbPick++;
+    cout << "Nb Pick :" << NbPick << endl;
+  }
+  
+  // step3 get result.
+  if (!NoShape)
+  {
+/*    TheAIS2DContext()->InitSelected();
+    if (TheAIS2DContext()->HasSelectedShape())
+      result = TheAIS2DContext()->SelectedShape();
+    else
+    {
+      Handle(AIS2D_InteractiveObject) IO = TheAIS2DContext()->SelectedInteractive();
+      result = (*((Handle(AIS2D_ProjShape)*) &IO))->Shape();
+    }*/
+  }
+
+  if (curindex > 0) TheAIS2DContext()->CloseLocalContext(curindex);
+  return result;
+}
+
+//=======================================================================
+//function : PickShapes
+//purpose  : 
+//=======================================================================
+Standard_Boolean QAViewer2dTest::PickShapes (const TopAbs_ShapeEnum /*TheType*/,
+                                           Handle(TopTools_HArray1OfShape)& thearr,
+                                           const Standard_Integer /*MaxPick*/)
+{
+  Standard_Integer Taille = thearr->Length();
+  if (Taille > 1)
+    cout << " WARNING : Pick with Shift+ MB1 for Selection of more than 1 object" << endl;
+  
+  // step 1: prepare the data
+  Standard_Integer curindex = TheAIS2DContext()->OpenLocalContext();
+/*  if (TheType == TopAbs_SHAPE)
+  {
+    Handle(AIS2D_TypeFilter) F1 = new AIS2D_TypeFilter(AIS2D_KOI_Shape);
+    TheAIS2DContext()->AddFilter(F1);
+  }
+  else
+  {
+    Handle(StdSelect_ShapeTypeFilter) TF = new StdSelect_ShapeTypeFilter(TheType);
+    TheAIS2DContext()->AddFilter(TF);
+    TheAIS2DContext()->ActivateStandardMode(TheType);
+  }*/
+
+  // step 2 : wait for the selection...
+  Standard_Boolean NbToReach (thearr->Length());
+  Standard_Integer NbPickFail (0);
+  /*
+  Standard_Boolean NbPickGood (0) ;
+  Standard_Integer argccc = 5;
+  char *bufff[] = { "A", "B", "C","D", "E" };
+  char **argvvv = bufff;
+  
+  while (NbPickGood < NbToReach && NbPickFail <= MaxPick)
+  {
+    while (ViewerMainLoop2d(argccc,argvvv)) {}
+    Standard_Integer NbStored = TheAIS2DContext()->NbSelected();
+    if ((unsigned int ) NbStored != NbPickGood)
+      NbPickGood = NbStored;
+    else
+      NbPickFail++;
+    cout<<"NbPicked =  "<<NbPickGood<<" |  Nb Pick Fail :"<<NbPickFail<<endl;
+  }*/
+  
+  // step3 get result.
+  if ((unsigned int) NbPickFail >= NbToReach) return Standard_False;
+
+  /*
+  Standard_Integer i(0);
+  for (TheAIS2DContext()->InitSelected();
+       TheAIS2DContext()->MoreSelected();
+       TheAIS2DContext()->NextSelected())
+  {
+    i++;
+    if(TheAIS2DContext()->HasSelectedShape())
+      thearr->SetValue(i,TheAIS2DContext()->SelectedShape());
+    else
+    {
+      Handle(AIS2D_InteractiveObject) IO = TheAIS2DContext()->SelectedInteractive();
+      thearr->SetValue(i,(*((Handle(AIS2D_ProjShape)*) &IO))->Shape());
+    }
+  }*/
+  
+  TheAIS2DContext()->CloseLocalContext(curindex);
+  return Standard_True;
+}
+
+//=====================================================================
+//========================= for testing Draft and Rib =================
+//=====================================================================
+#include <BRepOffsetAPI_MakeThickSolid.hxx>
+#include <DBRep.hxx>
+#include <TopoDS_Face.hxx>
+#include <gp_Pln.hxx>
+#include <BRepOffsetAPI_DraftAngle.hxx>
+#include <Precision.hxx>
+#include <OSD_Environment.hxx>
+#include <DrawTrSurf.hxx>
+#if defined(BRepAlgoAPI_def01)
+#include <BRepAlgoAPI.hxx>
+#else
+#include <BRepAlgo.hxx>
+#endif
+
+//=======================================================================
+//function : IsValid2d
+//purpose  : 
+//=======================================================================
+static Standard_Boolean IsValid2d (const TopTools_ListOfShape& theArgs,
+                                   const TopoDS_Shape& theResult,
+                                   const Standard_Boolean closedSolid,
+                                   const Standard_Boolean GeomCtrl)
+{
+  OSD_Environment check ("DONT_SWITCH_IS_VALID") ;
+  TCollection_AsciiString checkValid = check.Value();
+  Standard_Boolean ToCheck = Standard_True;
+  if (!checkValid.IsEmpty()) {
+#ifdef DEB
+    cout <<"DONT_SWITCH_IS_VALID positionnee a :"<<checkValid.ToCString()<<endl;
+#endif
+    if ( checkValid=="true" || checkValid=="TRUE" ) {
+      ToCheck= Standard_False;
+    } 
+  } else {
+#ifdef DEB
+    cout <<"DONT_SWITCH_IS_VALID non positionne"<<endl;
+#endif
+  }
+  Standard_Boolean IsValid = Standard_True;
+  ////////////if (ToCheck) 
+    ////////////IsValid = BRepAlgo::IsValid(theArgs,theResult,closedSolid,GeomCtrl) ;
+  if (ToCheck) {
+#if defined(BRepAlgoAPI_def01)
+    cout <<"BRepAlgoAPI::IsValid()"<<endl;
+    IsValid = BRepAlgoAPI::IsValid(theArgs,theResult,closedSolid,GeomCtrl) ;
+#else
+    cout <<"BRepAlgo::IsValid()"<<endl;
+    IsValid = BRepAlgo::IsValid(theArgs,theResult,closedSolid,GeomCtrl) ;
+#endif
+  }
+  return IsValid;
+  
+}
+
+//===============================================================================
+// TDraft : test draft, uses AIS2D Viewer
+// Solid Face Plane Angle  Reverse
+//=============================================================================== 
+static Standard_Integer TDraft2d (Draw_Interpretor& di, Standard_Integer argc, char** argv)
+{ 
+  if (argc < 5) return 1;
+// argv[1] - TopoDS_Shape Solid
+// argv[2] - TopoDS_Shape Face
+// argv[3] - TopoDS_Shape Plane
+// argv[4] - Standard_Real Angle
+// argv[5] - Standard_Integer Reverse
+
+//  sprintf(prefix, argv[1]);
+  Standard_Real anAngle = 0;
+  Standard_Boolean Rev = Standard_False;
+  Standard_Integer rev = 0;
+  TopoDS_Shape Solid  = GetShapeFromName2d(argv[1]);
+  TopoDS_Shape face   = GetShapeFromName2d(argv[2]);
+  TopoDS_Face Face    = TopoDS::Face(face);
+  TopoDS_Shape Plane  = GetShapeFromName2d(argv[3]);
+  if (Plane.IsNull ()) {
+    di << "TEST : Plane is NULL" << "\n";
+    return 1;
+  }
+  anAngle = atof(argv[4]);
+  anAngle = 2*M_PI * anAngle / 360.0;
+  gp_Pln aPln;
+  Handle(Geom_Surface) aSurf;
+//  AIS2D_KindOfSurface aSurfType;
+//  Standard_Real Offset;
+  gp_Dir aDir;
+  if(argc > 4) { // == 5
+    rev = atoi(argv[5]);
+    Rev = (rev)? Standard_True : Standard_False;
+  } 
+    
+  TopoDS_Face face2 = TopoDS::Face(Plane);
+//  if (!AIS2D::GetPlaneFromFace(face2, aPln, aSurf, aSurfType, Offset))
+//  {
+//    cout << "TEST : Can't find plane" << endl;
+//    return 1;
+//  }
+
+  aDir = aPln.Axis().Direction();
+  if (!aPln.Direct()) 
+    aDir.Reverse();
+  if (Plane.Orientation() == TopAbs_REVERSED) 
+    aDir.Reverse();
+  di << "TEST : gp::Resolution() = " << gp::Resolution() << "\n";
+
+  BRepOffsetAPI_DraftAngle Draft (Solid);
+
+  if(Abs(anAngle)< Precision::Angular()) {
+    di << "TEST : NULL angle" << "\n";
+    return 1;}
+
+  if(Rev) anAngle = - anAngle;
+  Draft.Add (Face, aDir, anAngle, aPln);
+  Draft.Build ();
+  if (!Draft.IsDone())  {
+    di << "TEST : Draft Not DONE " << "\n";
+    return 1;
+  }
+  TopTools_ListOfShape Larg;
+  Larg.Append(Solid);
+  if (!IsValid2d(Larg,Draft.Shape(),Standard_True,Standard_False))
+  {
+    di << "TEST : DesignAlgo returns Not valid" << "\n";
+    return 1;
+  }
+
+  Handle(AIS2D_InteractiveContext) Ctx = QAViewer2dTest::GetAIS2DContext();
+  Handle(AIS2D_ProjShape) ais = new AIS2D_ProjShape();
+  ais->Add(Draft.Shape());
+
+  if (!ais.IsNull())
+  {
+//    ais->SetColor(DEFAULT_COLOR);
+//    ais->SetMaterial(DEFAULT_MATERIAL);
+    // Display the AIS2D_ProjShape without redraw
+    Ctx->Display(ais, Standard_False);
+
+    char *Name = "draft1";
+    Standard_Boolean IsBound = GetMapOfAIS2D().IsBound2(Name);
+    if (IsBound)
+    {
+      Handle(AIS2D_InteractiveObject) an_object = GetMapOfAIS2D().Find2(Name);
+//      Ctx->Remove(an_object, Standard_True);
+      GetMapOfAIS2D().UnBind2(Name);
+    }
+    GetMapOfAIS2D().Bind(ais, Name);
+  }
+  Ctx->Display(ais, Standard_True);
+  return 0;
+}
+
+//============================================================================
+//  MyCommands
+//============================================================================
+void QAViewer2dTest::MyCommands (Draw_Interpretor& theCommands)
+{
+  DrawTrSurf::BasicCommands(theCommands);
+  char* group = "2D AIS Viewer - Check Features Operations commands";
+
+  theCommands.Add("Draft2d",
+                  "Draft2d Solid Face Plane Angle Reverse",
+		  __FILE__, TDraft2d, group); //Draft_Modification
+}
+
+//============================================================================
+// All 2D AIS Viewer Commands
+//============================================================================
+void QAViewer2dTest::Commands (Draw_Interpretor& theCommands)
+{
+  QAViewer2dTest::GeneralCommands(theCommands);
+  QAViewer2dTest::ViewerCommands (theCommands);
+  QAViewer2dTest::DisplayCommands(theCommands);
+  QAViewer2dTest::ObjectCommands (theCommands);
+}
+#endif
diff --git a/src/QAViewer2dTest/QAViewer2dTest_CMPLRS.edl b/src/QAViewer2dTest/QAViewer2dTest_CMPLRS.edl
new file mode 100644
index 0000000..93ad0e6
--- /dev/null
+++ b/src/QAViewer2dTest/QAViewer2dTest_CMPLRS.edl
@@ -0,0 +1,25 @@
+-- Copyright (c) 1999-2012 OPEN CASCADE SAS
+--
+-- The content of this file is subject to the Open CASCADE Technology Public
+-- License Version 6.5 (the "License"). You may not use the content of this file
+-- except in compliance with the License. Please obtain a copy of the License
+-- at http://www.opencascade.org and read it completely before using this file.
+--
+-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+--
+-- The Original Code and all software distributed under the License is
+-- distributed on an "AS IS" basis, without warranty of any kind, and the
+-- Initial Developer hereby disclaims all such warranties, including without
+-- limitation, any warranties of merchantability, fitness for a particular
+-- purpose or non-infringement. Please see the License for the specific terms
+-- and conditions governing the rights and limitations under the License.
+
+ at ifnotdefined ( %QAViewer2dTest_CMPLRS ) then
+ at set %QAViewer2dTest_CMPLRS = "";
+
+  @uses "CSF.edl" ;
+
+  @string %CMPLRS_CXX_Options = " -I"%CSF_TCL_INCLUDE  %CMPLRS_CXX_Options ;
+
+ at endif;
diff --git a/src/QAViewer2dTest/QAViewer2dTest_DisplayCommands.cxx b/src/QAViewer2dTest/QAViewer2dTest_DisplayCommands.cxx
new file mode 100644
index 0000000..63ad38d
--- /dev/null
+++ b/src/QAViewer2dTest/QAViewer2dTest_DisplayCommands.cxx
@@ -0,0 +1,1519 @@
+// Created on: 2002-01-22
+// Created by: Julia DOROVSKIKH
+// Copyright (c) 2002-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#if defined(WOKC40)
+
+#include <QAViewer2dTest.hxx>
+
+#include <QAViewer2dTest_EventManager.hxx>
+#include <QAViewer2dTest_DoubleMapOfInteractiveAndName.hxx>
+#include <QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx>
+
+#include <Draw_Interpretor.hxx>
+
+#include <HLRAlgo_Projector.hxx>
+
+#include <V2d_Viewer.hxx>
+#include <V2d_View.hxx>
+
+#include <Prs2d_AspectRoot.hxx>
+#include <Prs2d_AspectLine.hxx>
+
+#include <gp_Ax3.hxx>
+
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Vertex.hxx>
+
+#include <BRep_Tool.hxx>
+
+#include <TCollection_AsciiString.hxx>
+
+#include <gp_Ax2.hxx>
+
+#include <AIS2D_ProjShape.hxx>
+#include <AIS2D_InteractiveContext.hxx>
+
+#include <Quantity_NameOfColor.hxx>
+#include <Quantity_Color.hxx>
+
+#include <Graphic2d_Line.hxx>
+#include <Graphic2d_Marker.hxx>
+#include <Graphic2d_View.hxx>
+
+#include <Graphic3d_NameOfMaterial.hxx>
+
+#define OCC190 // jfa 04/03/2002 // for vertices load
+#define OCC154 // jfa 06/03/2002 // for correct erasing
+
+#define DEFAULT_COLOR    Quantity_NOC_GOLDENROD
+#define DEFAULT_MATERIAL Graphic3d_NOM_BRASS
+
+QAViewer2dTest_DoubleMapOfInteractiveAndName& GetMapOfAIS2D();
+Handle(AIS2D_InteractiveContext)& TheAIS2DContext();
+TopoDS_Shape GetShapeFromName2d (char* name);
+
+//==============================================================================
+//function : GetAIS2DShapeFromName
+//purpose  : Compute an AIS2D_ProjShape from a draw variable or a file name
+//==============================================================================
+Handle(AIS2D_InteractiveObject) GetAIS2DShapeFromName
+       (char* name, gp_Ax2 anAx2 = gp::XOY())
+{
+  Handle(AIS2D_InteractiveObject) retsh;
+
+  if (GetMapOfAIS2D().IsBound2(name))
+  {
+    Handle(AIS2D_InteractiveObject) IO = GetMapOfAIS2D().Find2(name);
+//    if(IO->Type() == AIS2D_KOI_Shape)
+//      if (IO->Signature() == 0){
+//	retsh = *((Handle(AIS2D_ProjShape)*)&IO);
+//      }
+//    else
+    cout << "an Object which is not an AIS2D_ProjShape already has this name!!!" << endl;
+    return retsh;
+  }
+
+  TopoDS_Shape S = GetShapeFromName2d(name);
+  if (!S.IsNull())
+  {
+#ifdef OCC190
+    if (S.ShapeType() == TopAbs_VERTEX)
+    {
+      TopoDS_Vertex aVert = TopoDS::Vertex(S);
+      gp_Pnt aPnt = BRep_Tool::Pnt(aVert);
+
+      gp_Trsf aTrsf;
+      gp_Ax3 aToSystem (anAx2);
+      aTrsf.SetTransformation(aToSystem);
+      aPnt.Transform(aTrsf);
+
+      Handle(V2d_View) V = QAViewer2dTest::CurrentView();
+      retsh = new AIS2D_InteractiveObject();
+      retsh->SetView(V->View());
+
+#define VERTEXMARKER 2
+#define DEFAULTMARKERSIZE 3.0
+
+      Handle(Graphic2d_Marker) vertex = new Graphic2d_Marker
+        (retsh, VERTEXMARKER, aPnt.X(), aPnt.Y(), DEFAULTMARKERSIZE, DEFAULTMARKERSIZE, 0.0);
+    }
+    else
+#endif
+    {
+      HLRAlgo_Projector aProjector (anAx2);
+      Handle(AIS2D_ProjShape) retprsh = new AIS2D_ProjShape(aProjector);
+      retprsh->Add(S);
+      retsh = retprsh;
+    }
+  }
+  return retsh; 
+}
+
+//=======================================================================
+//function : GetColorFromName2d
+//purpose  : get the Quantity_NameOfColor from a string
+//=======================================================================
+static Quantity_NameOfColor GetColorFromName2d (char *name) 
+{ 
+  Quantity_NameOfColor ret = DEFAULT_COLOR;
+  
+  Standard_Boolean Found = Standard_False;
+  Standard_CString colstring;
+  for (Standard_Integer i = 0; i <= 514 && !Found; i++)
+  {
+    colstring = Quantity_Color::StringName(Quantity_NameOfColor(i));
+    if (!strcasecmp(name,colstring))
+    {
+      ret = (Quantity_NameOfColor)i;
+      Found = Standard_True;
+    }
+  }
+
+  return ret;
+}
+#if 0
+//=======================================================================
+//function : GetMaterialFromName2d
+//purpose  : get the Graphic3d_NameOfMaterial from a string
+//=======================================================================
+static Graphic3d_NameOfMaterial GetMaterialFromName2d (char *name) 
+{ 
+  Graphic3d_NameOfMaterial mat = DEFAULT_MATERIAL;
+  
+  if      ( !strcasecmp(name,"BRASS" ) ) 	 mat = Graphic3d_NOM_BRASS;
+  else if ( !strcasecmp(name,"BRONZE" ) )        mat = Graphic3d_NOM_BRONZE;
+  else if ( !strcasecmp(name,"COPPER" ) ) 	 mat = Graphic3d_NOM_COPPER;
+  else if ( !strcasecmp(name,"GOLD" ) ) 	 mat = Graphic3d_NOM_GOLD;
+  else if ( !strcasecmp(name,"PEWTER" ) ) 	 mat = Graphic3d_NOM_PEWTER;
+  else if ( !strcasecmp(name,"SILVER" ) ) 	 mat = Graphic3d_NOM_SILVER;
+  else if ( !strcasecmp(name,"STEEL" ) ) 	 mat = Graphic3d_NOM_STEEL;
+  else if ( !strcasecmp(name,"METALIZED" ) ) 	 mat = Graphic3d_NOM_METALIZED;
+  else if ( !strcasecmp(name,"STONE" ) ) 	 mat = Graphic3d_NOM_STONE;
+  else if ( !strcasecmp(name,"CHROME" ) )	 mat = Graphic3d_NOM_CHROME;
+  else if ( !strcasecmp(name,"ALUMINIUM" ) )     mat = Graphic3d_NOM_ALUMINIUM;
+  else if ( !strcasecmp(name,"STONE" ) )	 mat = Graphic3d_NOM_STONE;
+  else if ( !strcasecmp(name,"NEON_PHC" ) )	 mat = Graphic3d_NOM_NEON_PHC;
+  else if ( !strcasecmp(name,"NEON_GNC" ) )	 mat = Graphic3d_NOM_NEON_GNC;
+  else if ( !strcasecmp(name,"PLASTER" ) )	 mat = Graphic3d_NOM_PLASTER;
+  else if ( !strcasecmp(name,"SHINY_PLASTIC" ) ) mat = Graphic3d_NOM_SHINY_PLASTIC;
+  else if ( !strcasecmp(name,"SATIN" ) )	 mat = Graphic3d_NOM_SATIN;
+  else if ( !strcasecmp(name,"PLASTIC" ) )	 mat = Graphic3d_NOM_PLASTIC;
+  else if ( !strcasecmp(name,"OBSIDIAN" ) )	 mat = Graphic3d_NOM_OBSIDIAN;
+  else if ( !strcasecmp(name,"JADE" ) )	         mat = Graphic3d_NOM_JADE;
+
+#ifdef DEB
+  cout << " materiau" << name <<" "<<Standard_Integer(mat) << endl;
+#endif
+  return mat;
+}
+#endif
+
+//==============================================================================
+//function : Select2d
+//purpose  : pick / select an object from the last MoveTo() on a
+//            ButtonPress event
+//==============================================================================
+Handle(AIS2D_InteractiveObject) Select2d (Standard_Integer /*argc*/,
+                                          char** /*argv*/,
+                                          Standard_Boolean shift,
+                                          Standard_Boolean /*pick*/)
+{
+  Handle(AIS2D_InteractiveObject) ret;
+  Handle (QAViewer2dTest_EventManager) EM = QAViewer2dTest::CurrentEventManager();
+  if (shift) EM->ShiftSelect();
+  else       EM->Select();
+
+  const Handle(AIS2D_InteractiveContext) aContext = EM->Context();
+  
+  if (!aContext->HasOpenedContext())
+  {
+//    aContext->InitCurrent();
+/*    while ( aContext->MoreCurrent() ) {
+      Handle(AIS2D_InteractiveObject) aisPickedShape = 
+	Handle(AIS2D_InteractiveObject)::DownCast(aContext->Current()); 
+      
+      const char *name = (GetMapOfAIS2D().IsBound1(aisPickedShape))? 
+	GetMapOfAIS2D().Find1(aisPickedShape).ToCString() : 
+	  "????";
+      Handle(AIS2D_ProjShape) TheRealSh = Handle(AIS2D_ProjShape)::DownCast(aisPickedShape);
+      if(!TheRealSh.IsNull()){
+	cout << "Current is " << name 
+	  << " (" << GetTypeNameFromShape2d(TheRealSh->Shape())
+	    << ")" << endl;
+      }
+      ret = aisPickedShape;
+      if(!TheRealSh.IsNull()){
+	if ( pick && argc > 4 ) {
+	  DBRep::Set(argv[4], TheRealSh->Shape());
+	}
+      }
+      aContext->NextCurrent();
+    }*/
+  }
+  else
+  {
+    // A LocalContext is opened, the use xxxxSelected() 
+    // to select an object and its SubShape
+/*    aContext->InitSelected();
+    while ( aContext->MoreSelected() ) {
+      if ( !aContext->HasSelectedShape() ) {
+      }
+      else {      
+        TopoDS_Shape PickedShape = aContext->SelectedShape();
+	if ( pick && argc > 5 ) {
+	  DBRep::Set(argv[5], PickedShape);
+	}
+      }
+      
+      if ( aContext->Interactive().IsNull() ) {
+        cout << "??? (No InteractiveObject selected)" << endl;
+      }
+      else {
+        Handle(AIS2D_InteractiveObject) aisPicked = 
+          Handle(AIS2D_InteractiveObject)::DownCast(aContext->Interactive());
+        ret = aisPicked;
+	Handle(AIS2D_ProjShape) aisPickedShape = Handle(AIS2D_ProjShape)::DownCast(aisPicked);
+	
+	// Get back its name
+	const char *name = ( GetMapOfAIS2D().IsBound1(aisPicked) )? 
+	  GetMapOfAIS2D().Find1(aisPicked).ToCString() : 
+	    "????";
+	
+	if(!aisPickedShape.IsNull()){
+	  if ( pick && argc > 4 ) {
+	    // Create a draw variable to store the wohole shape 
+	    // for vpick command
+	    DBRep::Set(argv[4], aisPickedShape->Shape());
+	  }
+	  
+	  cout << name << " (" << GetTypeNameFromShape2d(aisPickedShape->Shape()) 
+	    << ")" << endl  ;
+	}
+      }
+      // Goto the next selected object
+      aContext->NextSelected();
+    }*/
+  }
+  return ret;
+}
+
+//==============================================================================
+//function : Displays,Erase...
+//purpose  : 
+//Draw arg : 
+//==============================================================================
+static int VwrTst_DispErase2d (const Handle(AIS2D_InteractiveObject)& IO,
+                               const Standard_Integer Mode,
+                               const Standard_Integer TypeOfOperation,
+                               const Standard_Boolean Upd)
+{
+  Handle(AIS2D_InteractiveContext) Ctx = QAViewer2dTest::GetAIS2DContext();
+  
+  switch (TypeOfOperation)
+  {
+  case 1:
+    Ctx->Display(IO,Mode,Upd);
+    break;
+  case 2:
+    Ctx->Erase(IO,Mode,Upd);
+    break;
+  case 3:
+//    if(IO.IsNull())
+//      Ctx->SetDisplayMode((AIS2D_DisplayMode)Mode,Upd);
+//    else
+//      Ctx->SetDisplayMode(IO,Mode,Upd);
+    break;
+  case 4:
+//    if(IO.IsNull())
+//      Ctx->SetDisplayMode(0,Upd);
+//    else
+//      Ctx->UnsetDisplayMode(IO,Upd);
+    break;
+  }
+
+  return 0;
+}
+
+#if 0
+//=======================================================================
+//function :V2dDispMode
+//purpose  : 
+//=======================================================================
+static int V2dDispMode (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  TCollection_AsciiString name;
+  if (argc > 3) return 1;
+
+  // display others presentations
+  Standard_Integer TypeOfOperation = (strcasecmp(argv[0],"v2ddispmode") == 0)? 1:
+    (strcasecmp(argv[0],"v2derasemode") == 0) ? 2 :
+      (strcasecmp(argv[0],"v2dsetdispmode") == 0) ? 3 :
+	(strcasecmp(argv[0],"v2dunsetdispmode") == 0) ? 4 : -1;
+  
+  Handle(AIS2D_InteractiveContext) Ctx = QAViewer2dTest::GetAIS2DContext();
+  
+  //unset displaymode.. comportement particulier...
+  if (TypeOfOperation == 4)
+  {
+    if (argc == 1)
+    {
+/*      if(Ctx->NbCurrents()==0 ||
+	 Ctx->NbSelected()==0){
+	Handle(AIS2D_InteractiveObject) IO;
+	VwrTst_DispErase2d(IO,-1,4,Standard_False);
+      }
+      else if(!Ctx->HasOpenedContext()){
+      	for(Ctx->InitCurrent();Ctx->MoreCurrent();Ctx->NextCurrent())
+	  VwrTst_DispErase2d(Ctx->Current(),-1,4,Standard_False);
+      }
+      else{
+	for(Ctx->InitSelected();Ctx->MoreSelected();Ctx->NextSelected())
+	  VwrTst_DispErase2d(Ctx->Interactive(),-1,4,Standard_False);}*/
+      Ctx->UpdateCurrentViewer();
+    }
+    else
+    {
+      Handle(AIS2D_InteractiveObject) IO;
+      name = argv[1];
+      if (GetMapOfAIS2D().IsBound2(name))
+      {
+	IO = GetMapOfAIS2D().Find2(name);
+	VwrTst_DispErase2d(IO,-1,4,Standard_True);
+      }
+    }
+  }
+  else if (argc == 2)
+  {
+//    Standard_Integer Dmode = atoi(argv[1]);
+//    if(Ctx->NbCurrents()==0 && TypeOfOperation==3){
+//      Handle(AIS2D_InteractiveObject) IO;
+//      VwrTst_DispErase2d(IO,Dmode,TypeOfOperation,Standard_True);
+//    }
+    if (!Ctx->HasOpenedContext())
+    {
+      // set/unset display mode sur le Contexte...
+//      for(Ctx->InitCurrent();Ctx->MoreCurrent();Ctx->NextCurrent()){
+//	VwrTst_DispErase2d(Ctx->Current(),Dmode,TypeOfOperation,Standard_False);
+//      }
+      Ctx->UpdateCurrentViewer();
+    }
+    else
+    {
+//      for(Ctx->InitSelected();Ctx->MoreSelected();Ctx->NextSelected())
+//	Ctx->Display(Ctx->Interactive(),Dmode);
+    }
+  }
+  else
+  {
+    Handle(AIS2D_InteractiveObject) IO;
+    name = argv[1];
+    if (GetMapOfAIS2D().IsBound2(name))
+      IO = GetMapOfAIS2D().Find2(name);
+    VwrTst_DispErase2d(IO,atoi(argv[2]),TypeOfOperation,Standard_True);
+  }
+
+  return 0;
+}
+#endif
+
+//==============================================================================
+//function : V2dSetBGColor
+//purpose  : v2dsetbgcolor colorname : change background color
+//==============================================================================
+static int V2dSetBGColor (Draw_Interpretor& di, Standard_Integer argc, char** argv)
+{
+  if (argc != 2)
+  {
+    di << "Usage : v2dsetbgcolor colorname" << "\n";
+    return 1;
+  }
+  Handle(V2d_View) V = QAViewer2dTest::CurrentView(); 
+  if (V.IsNull()) return 1;
+
+  V->SetBackground(GetColorFromName2d(argv[1]));
+  V->Viewer()->Update();
+  return 0;
+}
+
+//==============================================================================
+//function : V2dColor
+//purpose  : change the color of a selected or named or displayed shape 
+//Draw arg : v2dsetcolor [name] color 
+//==============================================================================
+static int V2dSetUnsetColor (Handle(AIS2D_InteractiveObject) theShape,
+                             Standard_Boolean HaveToSet,
+                             Quantity_NameOfColor theColor = Quantity_NOC_WHITE)
+{
+  theShape->SetContext(TheAIS2DContext());
+
+  Handle(Graphic2d_Primitive) aPrim;
+  Handle(Prs2d_AspectRoot)    anAspect;
+  Standard_Integer i = 1, n = theShape->Length();
+  for (; i <= n; i++)
+  {
+    aPrim = theShape->Primitive(i);
+    if (theShape->HasAspect(aPrim))
+    {
+      anAspect = theShape->GetAspect(aPrim);
+      if (anAspect->GetAspectName() == Prs2d_AN_LINE) break;
+      else anAspect = NULL;
+    }
+  }
+
+  if (HaveToSet)
+  {
+    if (anAspect.IsNull())
+    {
+      theShape->SetAspect
+        (new Prs2d_AspectLine(theColor, Aspect_TOL_SOLID, Aspect_WOL_THIN,
+                              theColor, Graphic2d_TOPF_FILLED));
+    }
+    else
+    {
+      Handle(Prs2d_AspectLine) anAspectLine = Handle(Prs2d_AspectLine)::DownCast(anAspect);
+      anAspectLine->SetTypeOfFill(Graphic2d_TOPF_FILLED);
+      anAspectLine->SetColor(theColor);
+      anAspectLine->SetInterColor(theColor);
+      theShape->SetAspect(anAspect);
+    }
+  }
+  else // unset color
+  {
+    Handle(Prs2d_AspectLine) anAspectLine;
+    if ( !anAspect.IsNull() )
+      anAspectLine = Handle(Prs2d_AspectLine)::DownCast(anAspect);
+    else
+      anAspectLine = new Prs2d_AspectLine();
+
+    anAspectLine->SetTypeOfFill(Graphic2d_TOPF_EMPTY);
+    if (theShape->IsKind(STANDARD_TYPE(AIS2D_ProjShape)))
+      {
+        anAspectLine->SetColor(Quantity_NOC_YELLOW);
+        anAspectLine->SetInterColor(Quantity_NOC_YELLOW);
+      }
+    else
+      {
+        anAspectLine->SetColor(Quantity_NOC_WHITE);
+        anAspectLine->SetInterColor(Quantity_NOC_WHITE);
+      }
+    theShape->SetAspect( anAspectLine );
+  }
+
+  return 0;
+}
+
+static int V2dColor (Draw_Interpretor& di, Standard_Integer argc, char** argv)
+{
+  Standard_Boolean ThereIsArgument = Standard_False;
+  Standard_Boolean HaveToSet = Standard_False;
+
+  if (strcasecmp(argv[0],"v2dsetcolor") == 0) HaveToSet = Standard_True;
+
+  Quantity_NameOfColor aColor = Quantity_NOC_BLACK;
+  if (HaveToSet)
+  {
+    if (argc < 2 || argc > 3)
+    {
+      di << "Usage: v2dsetcolor [name] color" << "\n";
+      return 1;
+    }
+    if (argc == 3)
+    {
+      ThereIsArgument = Standard_True;
+      aColor = GetColorFromName2d(argv[2]);
+    }
+    else
+    {
+      aColor = GetColorFromName2d(argv[1]);
+    }
+  }
+  else
+  {
+    if (argc > 2)
+    {
+      di << "Usage: v2dunsetcolor [name]" << "\n";
+      return 1;
+    }
+    if (argc == 2) ThereIsArgument = Standard_True;
+  }
+  
+  if (QAViewer2dTest::CurrentView().IsNull()) return -1;
+  TheAIS2DContext()->CloseLocalContext();
+
+  if (ThereIsArgument)
+  {
+    TCollection_AsciiString name = argv[1];
+
+    if (GetMapOfAIS2D().IsBound2(name))
+    {
+      Handle(AIS2D_InteractiveObject) aShape = GetMapOfAIS2D().Find2(name);
+      V2dSetUnsetColor(aShape, HaveToSet, aColor);
+    }
+  }
+  else
+  {
+    Standard_Boolean hasCurrent = Standard_False;
+    QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+    for (; it.More() && !hasCurrent; it.Next())
+    {
+      if (TheAIS2DContext()->IsCurrent(it.Key1())) hasCurrent = Standard_True;
+    }
+    for (it.Reset(); it.More(); it.Next())
+    {
+      Handle(AIS2D_InteractiveObject) aShape = it.Key1();
+      if ((hasCurrent && TheAIS2DContext()->IsCurrent(aShape)) || !hasCurrent)
+      {
+        V2dSetUnsetColor(aShape, HaveToSet, aColor);
+      }
+    }
+//    TheAIS2DContext()->UpdateCurrentViewer();
+  }
+  return 0;
+}
+
+#if 0
+//==============================================================================
+//function : V2dTransparency
+//purpose  : change the transparency of a selected or named or displayed shape 
+//Draw arg : v2dsettransp [name] TransparencyCoeficient 
+//==============================================================================
+static int V2dTransparency (Draw_Interpretor& di, Standard_Integer argc, char** argv)
+{ 
+  Standard_Boolean ThereIsArgument;
+  Standard_Boolean HaveToSet;
+
+  if (strcasecmp(argv[0], "v2dsettransp") == 0)
+    HaveToSet = Standard_True;
+  else 
+    HaveToSet = Standard_False;
+  
+  if (HaveToSet)
+  {
+    if (argc < 2 || argc > 3)
+    {
+      di << "Usage: v2dsettransp [name] color" << "\n";
+      return 1;
+    }
+    if (argc == 2) ThereIsArgument = Standard_False;
+    else ThereIsArgument = Standard_True;
+  }
+  else
+  {
+    if (argc > 2)
+    {
+      di << "Usage: v2dunsettransp [name]" << "\n";
+      return 1;
+    }
+    if (argc == 2) ThereIsArgument = Standard_True;
+    else ThereIsArgument = Standard_False;
+  }
+  
+  if (QAViewer2dTest::CurrentView().IsNull()) return -1;
+  TheAIS2DContext()->CloseLocalContext();
+
+  if (ThereIsArgument)
+  {
+    TCollection_AsciiString name = argv[1];
+    if (GetMapOfAIS2D().IsBound2(name))
+    {
+      Handle(AIS2D_InteractiveObject) ashape = GetMapOfAIS2D().Find2(name);
+//      if(HaveToSet)
+//	TheAIS2DContext()->SetTransparency(ashape,atof(argv[2]) );
+//      else 
+//	TheAIS2DContext()->UnsetTransparency(ashape);
+    }
+  }
+  else
+  {
+//    if (TheAIS2DContext()->NbCurrents() > 0)
+    {
+/*      for (TheAIS2DContext()->InitCurrent(); TheAIS2DContext()->MoreCurrent();
+           TheAIS2DContext()->NextCurrent())
+      {
+	Handle(AIS2D_InteractiveObject) ashape = TheAIS2DContext()->Current();
+	if (HaveToSet)
+        {
+	  TheAIS2DContext()->SetTransparency(ashape, atof(argv[1]), Standard_False);
+	}
+	else 
+	  TheAIS2DContext()->UnsetTransparency(ashape, Standard_False);
+      }*/
+
+      TheAIS2DContext()->UpdateCurrentViewer();
+    }
+//    else // shape not defined (neither current, nor named)
+    {
+      QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+      while (it.More())
+      {
+        Handle(AIS2D_InteractiveObject) ashape = it.Key1();
+//	if(HaveToSet)
+//	  TheAIS2DContext()->SetTransparency(ashape,atof(argv[1]),Standard_False);
+//	else 
+//	  TheAIS2DContext()->UnsetTransparency(ashape,Standard_False);
+        it.Next();
+      }
+      TheAIS2DContext()->UpdateCurrentViewer();
+    }
+  }
+  return 0;
+}
+#endif
+
+#if 0
+//==============================================================================
+//function : V2dMaterial
+//purpose  : change the Material of a selected or named or displayed shape 
+//Draw arg : v2dmaterial  [Name] Material 
+//==============================================================================
+static int V2dMaterial (Draw_Interpretor& di, Standard_Integer argc, char** argv)
+{ 
+  Standard_Boolean ThereIsName;
+  Standard_Boolean HaveToSet;
+
+  if (strcasecmp(argv[0], "v2dsetmaterial") == 0) HaveToSet = Standard_True;
+  else HaveToSet = Standard_False;
+
+  if (HaveToSet)
+  {
+    if (argc < 2 || argc > 3)
+    {
+      di << "Usage: v2dsetmaterial [name] material" << "\n";
+      return 1;
+    }
+    if (argc == 2) ThereIsName = Standard_False;
+    else ThereIsName = Standard_True;
+  }
+  else
+  {
+    if (argc > 2)
+    {
+      di << "Usage: v2dunsetmaterial [name]" << "\n";
+      return 1;
+    }
+    if (argc == 2) ThereIsName = Standard_True;
+    else ThereIsName = Standard_False;
+  }
+
+  if (QAViewer2dTest::CurrentView().IsNull()) return -1;
+  TheAIS2DContext()->CloseLocalContext();
+
+  if (ThereIsName)
+  {
+    TCollection_AsciiString name = argv[1];
+    if (GetMapOfAIS2D().IsBound2(name))
+    {
+      Handle(AIS2D_InteractiveObject) ashape = GetMapOfAIS2D().Find2(name);
+      if (HaveToSet)
+      {
+//	TheAIS2DContext()->SetMaterial (ashape,GetMaterialFromName2d (argv[2]) );
+      }
+      else
+      {
+//	TheAIS2DContext()->UnsetMaterial(ashape);
+      }
+    }
+  }
+  else
+  {
+//    if (TheAIS2DContext()->NbCurrents() > 0)
+    {
+/*      for (TheAIS2DContext()->InitCurrent(); TheAIS2DContext()->MoreCurrent();
+           TheAIS2DContext()->NextCurrent())
+      {
+	Handle(AIS2D_InteractiveObject) ashape = TheAIS2DContext()->Current();
+	if (HaveToSet)
+        {
+	  TheAIS2DContext()->SetMaterial(ashape, GetMaterialFromName2d(argv[1]), Standard_False);
+	}
+	else
+	  TheAIS2DContext()->UnsetMaterial(ashape, Standard_False);
+      }*/
+      TheAIS2DContext()->UpdateCurrentViewer();
+    }
+//    else // shape not defined (neither current, nor named)
+    {
+      QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+      while (it.More())
+      {
+	Handle(AIS2D_InteractiveObject) ashape = it.Key1();
+	
+//	if (HaveToSet)
+//	  TheAIS2DContext()->SetMaterial(ashape,GetMaterialFromName2d(argv[1]),Standard_False);
+//	else TheAIS2DContext()->UnsetMaterial(ashape,Standard_False);
+	it.Next();
+      }
+      TheAIS2DContext()->UpdateCurrentViewer();
+    }
+  }
+  return 0;
+}
+#endif
+
+//==============================================================================
+//function : V2dWidth
+//purpose  : change the width of the edges of a selected or named or displayed shape 
+//Draw arg : v2dsetwidth [Name] WidthEnum(THIN MEDIUM THICK VERYTHICK)
+//==============================================================================
+static int V2dSetUnsetWidth (Handle(AIS2D_InteractiveObject) theShape,
+                             Standard_Boolean HaveToSet,
+                             Aspect_WidthOfLine theWOL = Aspect_WOL_THIN)
+{
+  theShape->SetContext(TheAIS2DContext());
+
+  Handle(Graphic2d_Primitive) aPrim;
+  Handle(Prs2d_AspectRoot)    anAspect;
+  Standard_Integer i = 1, n = theShape->Length();
+  for (; i <= n; i++)
+  {
+    aPrim = theShape->Primitive(i);
+    if (theShape->HasAspect(aPrim))
+    {
+      anAspect = theShape->GetAspect(aPrim);
+      if (anAspect->GetAspectName() == Prs2d_AN_LINE) break;
+      else anAspect = NULL;
+    }
+  }
+
+  if (HaveToSet)
+  {
+    if (anAspect.IsNull())
+    {
+      Quantity_NameOfColor aColor;
+      if (theShape->IsKind(STANDARD_TYPE(AIS2D_ProjShape)))
+      {
+        aColor = Quantity_NOC_YELLOW;
+      }
+      else
+      {
+        aColor = Quantity_NOC_WHITE;
+      }
+      anAspect = new Prs2d_AspectLine(aColor, Aspect_TOL_SOLID, theWOL,
+                                      aColor, Graphic2d_TOPF_EMPTY);
+    }
+    else
+    {
+      Handle(Prs2d_AspectLine) anAspectLine = Handle(Prs2d_AspectLine)::DownCast(anAspect);
+      anAspectLine->SetWidth(theWOL);
+    }
+
+    theShape->SetAspect(anAspect);
+  }
+  else // unset width
+  {
+    if (!anAspect.IsNull())
+    {
+      Handle(Prs2d_AspectLine) anAspectLine = Handle(Prs2d_AspectLine)::DownCast(anAspect);
+      anAspectLine->SetWidth(Aspect_WOL_THIN);
+//          anAspectLine->SetWidthIndex(0);
+      theShape->SetAspect(anAspect);
+    }
+  }
+
+  return 0;
+}
+
+static int V2dWidth (Draw_Interpretor& di, Standard_Integer argc, char** argv)
+{
+  Standard_Boolean ThereIsArgument = Standard_False;
+  Standard_Boolean HaveToSet = Standard_False;
+
+  if (strcasecmp(argv[0], "v2dsetwidth") == 0) HaveToSet = Standard_True;
+
+  char* aStr;
+  if (HaveToSet)
+  {
+    if (argc < 2 || argc > 3)
+    {
+      di << "Usage: v2dsetwidth [name] width" << "\n";
+      return 1;
+    }
+    if (argc == 3)
+    {
+      ThereIsArgument = Standard_True;
+      aStr = argv[2];
+    }
+    else
+    {
+      aStr = argv[1];
+    }
+  }
+  else
+  {
+    if ( argc > 2 )
+    {
+      di << "Usage: v2dunsetwidth [name]" << "\n";
+      return 1;
+    }
+    if (argc == 2) ThereIsArgument = Standard_True;
+  }
+
+  if (QAViewer2dTest::CurrentView().IsNull()) return -1;
+  TheAIS2DContext()->CloseLocalContext();
+
+  Aspect_WidthOfLine aWOL = Aspect_WOL_THIN;
+  if (HaveToSet)
+  {
+    if      (strcmp(aStr, "THIN"     ) == 0) aWOL = Aspect_WOL_THIN;
+    else if (strcmp(aStr, "MEDIUM"   ) == 0) aWOL = Aspect_WOL_MEDIUM;
+    else if (strcmp(aStr, "THICK"    ) == 0) aWOL = Aspect_WOL_THICK;
+    else if (strcmp(aStr, "VERYTHICK") == 0) aWOL = Aspect_WOL_VERYTHICK;
+    else aWOL = Aspect_WOL_USERDEFINED;
+  }
+
+  if (ThereIsArgument)
+  {
+    TCollection_AsciiString name = argv[1];
+
+    if (GetMapOfAIS2D().IsBound2(name))
+    {
+      Handle(AIS2D_InteractiveObject) aShape = GetMapOfAIS2D().Find2(name);
+      V2dSetUnsetWidth(aShape, HaveToSet, aWOL);
+    }
+  }
+  else
+  {
+    Standard_Boolean hasCurrent = Standard_False;
+    QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+    for (; it.More() && !hasCurrent; it.Next())
+    {
+      if (TheAIS2DContext()->IsCurrent(it.Key1())) hasCurrent = Standard_True;
+    }
+    for (it.Reset(); it.More(); it.Next())
+    {
+      Handle(AIS2D_InteractiveObject) aShape = it.Key1();
+      if ((hasCurrent && TheAIS2DContext()->IsCurrent(aShape)) || !hasCurrent)
+      {
+        V2dSetUnsetWidth(aShape, HaveToSet, aWOL);
+      }
+    }
+//    TheAIS2DContext()->UpdateCurrentViewer();
+  }
+  return 0;
+}
+
+//==============================================================================
+//function : V2dDisplay
+//purpose  : Display an object from its name
+//Draw arg : v2ddisplay name [projection (Origin(x y z) Normal(dx dy dz) DX(dx dy dz)]
+//==============================================================================
+static int V2dDisplay (Draw_Interpretor& di, Standard_Integer argc, char** argv)
+{
+  // Verification des arguments
+  if (argc != 2 && argc != 11)
+  {
+    di << "Usage: v2ddisplay name [x y z dx dy dz dx1 dy1 dz1]" << "\n";
+    return 1;
+  }
+  
+  if (QAViewer2dTest::CurrentView().IsNull())
+  { 
+    di << "2D AIS Viewer Initialization ..." << "\n";
+    QAViewer2dTest::ViewerInit(); 
+    di << "Done" << "\n";
+  }
+  
+  TCollection_AsciiString name;
+  TheAIS2DContext()->CloseLocalContext();
+  
+  name = argv[1];
+  gp_Ax2 anAx2 = gp::XOY();
+  if (argc == 11)
+  {
+    Standard_Real x = atof(argv[2]);
+    Standard_Real y = atof(argv[3]);
+    Standard_Real z = atof(argv[4]);
+
+    Standard_Real dx = atof(argv[5]);
+    Standard_Real dy = atof(argv[6]);
+    Standard_Real dz = atof(argv[7]);
+
+    Standard_Real dx1 = atof(argv[8]);
+    Standard_Real dy1 = atof(argv[9]);
+    Standard_Real dz1 = atof(argv[10]);
+
+    gp_Pnt anOrigin (x, y, z);
+    gp_Dir aNormal  (dx, dy, dz);
+    gp_Dir aDX      (dx1, dy1, dz1);
+    anAx2 = gp_Ax2(anOrigin, aNormal, aDX);
+  }
+
+  Standard_Boolean IsBound = GetMapOfAIS2D().IsBound2(name);
+  Standard_Boolean IsDatum = Standard_False;
+  Handle(AIS2D_InteractiveObject) aShape;
+  if (IsBound)
+  {
+    aShape = GetMapOfAIS2D().Find2(name);
+//    if (aShape->Type() == AIS2D_KOI_Datum)
+    {
+      IsDatum = Standard_True;
+      TheAIS2DContext()->Display(aShape, Standard_False);
+#ifdef OCC154
+      TheAIS2DContext()->HighlightCurrent();
+#endif
+    }
+    if (!IsDatum)
+    {	  
+      di << "Display " << name << "\n";
+      // Get the Shape from a name
+      TopoDS_Shape NewShape = GetShapeFromName2d(name.ToCString());
+
+      // Update the Shape in the AIS2D_ProjShape				
+      Handle(AIS2D_ProjShape) TheRealSh = Handle(AIS2D_ProjShape)::DownCast(aShape);
+//    if(!TheRealSh.IsNull())	TheRealSh->Set(NewShape);
+      TheAIS2DContext()->Redisplay(aShape, Standard_False);
+      TheAIS2DContext()->Display(aShape, Standard_False);
+    }
+    aShape.Nullify();
+  }
+  else // Create the AIS2D_ProjShape from a name
+  {
+    aShape = GetAIS2DShapeFromName(name.ToCString(), anAx2);
+    if (!aShape.IsNull())
+    {
+      GetMapOfAIS2D().Bind(aShape, name);
+      TheAIS2DContext()->Display(aShape, Standard_False);
+    }
+  }
+
+  // Update the screen and redraw the view
+  TheAIS2DContext()->UpdateCurrentViewer();
+  return 0; 
+}
+
+//==============================================================================
+//function : V2dDonly
+//purpose  : Display only a selected or named  object
+//           if there is no selected or named object s, the whole viewer is erased
+//Draw arg : vdonly [name1] ... [name n]
+//==============================================================================
+static int V2dDonly (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  if (QAViewer2dTest::CurrentView().IsNull()) return 1;
+  
+  Standard_Boolean ThereIsArgument = argc > 1;
+  
+  if (TheAIS2DContext()->HasOpenedContext()) TheAIS2DContext()->CloseLocalContext();
+
+  if (ThereIsArgument)
+  {
+    TheAIS2DContext()->EraseAll(Standard_True, Standard_False);            
+
+    for (int i = 1; i < argc; i++)
+    {
+      TCollection_AsciiString name = argv[i];
+      Standard_Boolean IsBound = GetMapOfAIS2D().IsBound2(name);
+      if (IsBound)
+      {
+	Handle(AIS2D_InteractiveObject) aShape = GetMapOfAIS2D().Find2(name);
+	TheAIS2DContext()->Display(aShape, Standard_False);
+      }
+    }
+    TheAIS2DContext()->CurrentViewer()->Update();
+  }
+  else
+  {
+    Standard_Boolean ThereIsCurrent = Standard_True/*= TheAIS2DContext()->NbCurrents() > 0*/;
+    if (ThereIsCurrent)
+    {
+      QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+      while (it.More())
+      {
+        Handle(AIS2D_InteractiveObject) aShape = it.Key1();
+        if (!TheAIS2DContext()->IsCurrent(aShape))
+          TheAIS2DContext()->Erase(aShape, Standard_False);        
+        it.Next();
+      }
+      TheAIS2DContext()->CurrentViewer()->Update();
+    }
+  }
+
+  return 0; 
+}
+
+//==============================================================================
+//function : V2dErase
+//purpose  : Erase some selected or named objects.
+//           If there is no selected or named objects, does nothing
+//Draw arg : v2derase [name1] ... [name n]
+//==============================================================================
+static int V2dErase (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  if (QAViewer2dTest::CurrentView().IsNull()) return 1;
+  
+  if (TheAIS2DContext()->HasOpenedContext()) TheAIS2DContext()->CloseLocalContext();
+
+  if (argc > 1) // has arguments
+  {
+    for (int i = 1; i < argc; i++)
+    {
+      TCollection_AsciiString name = argv[i];
+      Standard_Boolean IsBound = GetMapOfAIS2D().IsBound2(name);
+      if (IsBound)
+      {
+	Handle(AIS2D_InteractiveObject) aShape = GetMapOfAIS2D().Find2(name);
+	TheAIS2DContext()->Erase(aShape, Standard_False);  
+      }
+    }
+//    TheAIS2DContext()->UpdateCurrentViewer();
+    TheAIS2DContext()->CurrentViewer()->Update();
+  }
+  else
+  {
+    QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+    while (it.More())
+    {
+      Handle(AIS2D_InteractiveObject) aShape = it.Key1();
+      if (TheAIS2DContext()->IsCurrent(aShape))
+        TheAIS2DContext()->Erase(aShape, Standard_False);        
+      it.Next();
+    }
+//    TheAIS2DContext()->UpdateCurrentViewer();
+    TheAIS2DContext()->CurrentViewer()->Update();
+  }
+
+  return 0; 
+}
+
+//==============================================================================
+//function : V2dEraseAll
+//purpose  : Erase all the objects displayed in the viewer
+//Draw arg : v2deraseall
+//==============================================================================
+static int V2dEraseAll (Draw_Interpretor& di, Standard_Integer argc, char** )
+{
+  if (argc > 1)
+  {
+    di << "Usage: v2deraseall" << "\n";
+    return 1;
+  }
+
+  if (QAViewer2dTest::CurrentView().IsNull())
+  {
+    di << " Error: v2dinit hasn't been called." << "\n";
+    return 1;
+  }
+
+  TheAIS2DContext()->CloseAllContext(Standard_False);
+
+  // EraseAll(Standard_True, Standard_True);            
+  TheAIS2DContext()->EraseAll();
+  return 0;
+}
+
+//==============================================================================
+//function : V2dDisplayAll
+//purpose  : Display all the objects of the Map
+//Draw arg : v2ddisplayall
+//==============================================================================
+static int V2dDisplayAll (Draw_Interpretor& di, Standard_Integer argc, char** argv)
+{
+  if (QAViewer2dTest::CurrentView().IsNull()) return 1;
+
+  if (argc > 1)
+  {
+    di << argv[0] << " Syntaxe error" << "\n";
+    return 1;
+  }
+  TheAIS2DContext()->CloseLocalContext();
+  QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+//  while (it.More())
+//  {
+//    Handle(AIS2D_InteractiveObject) aShape = it.Key1();
+//    TheAIS2DContext()->Erase(aShape,Standard_False);        
+//    it.Next();
+//  }
+//  it.Reset();
+  while (it.More())
+  {
+    Handle(AIS2D_InteractiveObject) aShape = it.Key1();
+    TheAIS2DContext()->Display(aShape, Standard_False);        
+    it.Next();
+  }
+#ifdef OCC154
+  TheAIS2DContext()->HighlightCurrent();
+#endif
+  TheAIS2DContext()->UpdateCurrentViewer();
+//  TheAIS2DContext()->DisplayAll();
+  return 0; 
+}
+
+//==============================================================================
+//function : VTexture
+//purpose  : 
+//Draw arg : 
+//==============================================================================
+/*
+Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, Standard_Character** argv )
+{
+  Standard_Integer command = (strcasecmp(argv[0],"vtexture")==0)? 1:
+    (strcasecmp(argv[0],"vtexscale")==0) ? 2 :
+      (strcasecmp(argv[0],"vtexorigin")==0) ? 3 :
+	(strcasecmp(argv[0],"vtexrepeat")==0) ? 4 :
+	  (strcasecmp(argv[0],"vtexdefault")==0) ? 5 : -1;
+  
+  Handle(AIS2D_InteractiveContext) myAIS2DContext = QAViewer2dTest::GetAIS2DContext();
+  if(myAIS2DContext.IsNull()) 
+    { 
+      cerr << "use 'vinit' command before " << argv[0] << endl;
+      return 0;
+    }
+  
+  Handle(AIS2D_InteractiveObject) TheAisIO;
+  Handle(AIS2D_TexturedShape) myShape;
+  Standard_Integer myPreviousMode = 0;
+
+  if (!argv[1])
+    {
+      cout << argv[0] <<" syntax error - Type 'help vtex'"<<endl;
+      return 0;
+    }
+  
+  TCollection_AsciiString name = argv[1];
+  QAViewer2dTest::CurrentView()->SetSurfaceDetail(V2d_TEX_ALL);
+  
+  if (GetMapOfAIS2D().IsBound2(name)) 
+    TheAisIO = GetMapOfAIS2D().Find2(name);
+  else
+    {
+      cout <<"shape "<<name<<" doesn\'t exist"<<endl;
+      return 0;
+    }
+  
+  if (TheAisIO->IsKind(STANDARD_TYPE(AIS2D_TexturedShape)) && !TheAisIO.IsNull())
+    {
+      myShape = Handle(AIS2D_TexturedShape)::DownCast(TheAisIO);
+      myPreviousMode = myShape->DisplayMode() ;
+    }
+  else
+    {
+      myAIS2DContext->Erase(TheAisIO,Standard_False);
+      myShape = new AIS2D_TexturedShape (DBRep::Get(argv[1]));
+      GetMapOfAIS2D().UnBind1(TheAisIO);
+      GetMapOfAIS2D().UnBind2(name);
+      GetMapOfAIS2D().Bind(myShape, name);  
+    }
+  switch (command)
+    {
+    case 1: // vtexture : we only map a texture on the shape
+      if(argc<=1)
+	{ 
+	  cerr << argv[0] <<" syntax error - Type 'help vtex'" << endl;
+	  return 0;
+	}
+      if (argv[2])
+	{
+	  if(strcasecmp(argv[2],"?")==0)
+	    { 
+	      TCollection_AsciiString monPath = GetEnvir2d();
+	      
+	      cout<<"\n Files in current directory : \n"<<endl;
+	      TCollection_AsciiString Cmnd ("glob -nocomplain *");
+	      di.Eval(Cmnd.ToCString());
+	      
+	      Cmnd = TCollection_AsciiString("glob -nocomplain ") ;
+	      Cmnd += monPath ;
+	      Cmnd += "/" ;
+	      Cmnd += "* " ;
+	      cout<<"Files in "<<monPath<<" : \n"<<endl;
+	      di.Eval(Cmnd.ToCString());
+	      
+	      return 0;
+	    }
+	  else
+	    myShape->SetTextureFileName(argv[2]);
+	}
+      else
+	{
+	  cout <<"Texture mapping disabled \n \
+                  To enable it, use 'vtexture NameOfShape NameOfTexture' \n"<<endl;
+
+	  myAIS2DContext->SetDisplayMode(myShape,1,Standard_False);
+	  if (myPreviousMode == 3 )
+	    myAIS2DContext->RecomputePrsOnly(myShape);
+	  myAIS2DContext->Display(myShape, Standard_True);
+	  return 0;
+	}
+      break;
+      
+    case 2: // vtexscale : we change the scaling factor of the texture
+      
+      if(argc<2) 
+	{ 
+	  cerr << argv[0] <<" syntax error - Type 'help vtex'" << endl;
+	  return 0;
+	}
+      
+      myShape->SetTextureScale (( argv[2] ? Standard_True    : Standard_False ),
+				( argv[2] ? atof(argv[2])    : 1.0 ),
+				( argv[2] ? atof(argv[argc-1]) : 1.0 ) );
+      break;
+      
+    case 3: // vtexorigin : we change the origin of the texture on the shape
+      if(argc<2) 
+	{ 
+	  cerr << argv[0] <<" syntax error - Type 'help vtex'" << endl;
+	  return 0;
+	}
+      myShape->SetTextureOrigin (( argv[2] ? Standard_True    : Standard_False ),
+				 ( argv[2] ? atof(argv[2])    : 0.0 ),
+				 ( argv[2] ? atof(argv[argc-1]) : 0.0 ));
+      break;
+      
+    case 4: // vtexrepeat : we change the number of occurences of the texture on the shape
+      if(argc<2)
+	{ 
+	  cerr << argv[0] <<" syntax error - Type 'help vtex'" << endl;
+	  return 0;
+	}
+      if (argv[2])
+	{
+	  cout <<"Texture repeat enabled"<<endl;
+	  myShape->SetTextureRepeat(Standard_True, atof(argv[2]), atof(argv[argc-1]) );
+	}
+      else
+	{
+	  cout <<"Texture repeat disabled"<<endl;
+	  myShape->SetTextureRepeat(Standard_False);
+	}
+      break;
+      
+    case 5: // vtexdefault : default texture mapping
+      // ScaleU = ScaleV = 100.0
+      // URepeat = VRepeat = 1.0
+      // Uorigin = VOrigin = 0.0
+      
+      if(argc<2)
+	{ 
+	  cerr << argv[0] <<" syntax error - Type 'help vtex'" << endl;
+	  return 0;
+	}
+      myShape->SetTextureRepeat(Standard_False);
+      myShape->SetTextureOrigin(Standard_False);
+      myShape->SetTextureScale (Standard_False);
+      break;
+    }
+
+  if ((myShape->DisplayMode() == 3) || (myPreviousMode == 3 ))
+    myAIS2DContext->RecomputePrsOnly(myShape);
+  else 
+    {
+      myAIS2DContext->SetDisplayMode(myShape,3,Standard_False);
+      myAIS2DContext->Display(myShape, Standard_True);
+      myAIS2DContext->Update(myShape,Standard_True);
+    } 
+  return 1;
+}
+*/
+
+#if 0
+//==============================================================================
+//function : V2dShading
+//purpose  : Sharpen or roughten the quality of the shading
+//Draw arg : vshading ShapeName 0.1->0.00001  1 deg-> 30 deg
+//==============================================================================
+static int V2dShading (Draw_Interpretor& ,Standard_Integer argc, char** argv)
+{
+  Standard_Boolean HaveToSet;
+//  Standard_Real    myDevAngle;
+  Standard_Real    myDevCoef;
+  Handle(AIS2D_InteractiveObject) TheAisIO;
+  
+  // Verifications
+  if (!strcasecmp(argv[0],"vsetshading")) HaveToSet = Standard_True;
+  else HaveToSet = Standard_False;
+  TheAIS2DContext()->CloseLocalContext();
+
+  if (argc < 3)
+  {
+    myDevCoef = 0.0008;
+  }
+  else
+  {
+    myDevCoef = atof(argv[2]);
+  }
+
+  TCollection_AsciiString name = argv[1];
+  if (GetMapOfAIS2D().IsBound2(name)) TheAisIO = GetMapOfAIS2D().Find2(name);
+  else
+  { 
+    TheAisIO = GetAIS2DShapeFromName(name.ToCString());
+  }
+  
+  if (HaveToSet)
+  {
+//    TheAIS2DContext()->SetDeviationCoefficient(TheAisIO,myDevCoef,Standard_True);
+  }
+  else
+  {
+//    TheAIS2DContext()->SetDeviationCoefficient(TheAisIO,0.0008,Standard_True);
+  }
+  
+  TheAIS2DContext()->Redisplay(TheAisIO);
+  return 0;
+}
+#endif
+
+//=======================================================================
+//function : VEraseType
+//purpose  : 
+//=======================================================================
+/*static int VEraseType (Draw_Interpretor& , Standard_Integer argc, char** argv) 
+{
+  if (argc!=2) return 1;
+
+  AIS2D_KindOfInteractive TheType;
+  Standard_Integer TheSign(-1);
+  GetTypeAndSignfromString2d(argv[1],TheType,TheSign);
+  
+  AIS2D_ListOfInteractive LIO;
+
+  // en attendant l'amelioration ais pour les dimensions...
+  //
+  Standard_Integer dimension_status(-1);
+  if(TheType==AIS2D_KOI_Relation){
+    dimension_status = TheSign ==1 ? 1 : 0;
+    TheSign=-1;
+  }
+  
+  TheAIS2DContext()->DisplayedObjects(TheType,TheSign,LIO);
+  Handle(AIS2D_InteractiveObject) curio;
+  for(AIS2D_ListIteratorOfListOfInteractive it(LIO);it.More();it.Next()){
+    curio  = it.Value();
+    
+    if(dimension_status == -1)
+      TheAIS2DContext()->Erase(curio,Standard_False);
+    else {
+      AIS2D_KindOfDimension KOD = (*((Handle(AIS2D_Relation)*)&curio))->KindOfDimension();
+      if ((dimension_status==0 && KOD == AIS2D_KOD_NONE)||
+	  (dimension_status==1 && KOD != AIS2D_KOD_NONE))
+	TheAIS2DContext()->Erase(curio,Standard_False);
+    }
+  }
+  TheAIS2DContext()->UpdateCurrentViewer();
+  return 0;
+}*/
+
+//=======================================================================
+//function : V2dDisplayType
+//purpose  : 
+//=======================================================================
+/*static int V2dDisplayType (Draw_Interpretor& , Standard_Integer argc, char** argv) 
+{
+  if (argc!=2) return 1;
+
+  AIS2D_KindOfInteractive TheType;
+  Standard_Integer TheSign(-1);
+  GetTypeAndSignfromString2d(argv[1],TheType,TheSign);
+
+  // en attendant l'amelioration ais pour les dimensions...
+  //
+  Standard_Integer dimension_status(-1);
+  if(TheType==AIS2D_KOI_Relation){
+    dimension_status = TheSign ==1 ? 1 : 0;
+    TheSign=-1;
+  }
+  
+  AIS2D_ListOfInteractive LIO;
+  TheAIS2DContext()->ObjectsInside(LIO,TheType,TheSign);
+  Handle(AIS2D_InteractiveObject) curio;
+  for(AIS2D_ListIteratorOfListOfInteractive it(LIO);it.More();it.Next()){
+    curio  = it.Value();
+    if(dimension_status == -1)
+      TheAIS2DContext()->Display(curio,Standard_False);
+    else {
+      AIS2D_KindOfDimension KOD = (*((Handle(AIS2D_Relation)*)&curio))->KindOfDimension();
+      if ((dimension_status==0 && KOD == AIS2D_KOD_NONE)||
+	  (dimension_status==1 && KOD != AIS2D_KOD_NONE))
+	TheAIS2DContext()->Display(curio,Standard_False);
+    }
+
+  }
+  
+  TheAIS2DContext()->UpdateCurrentViewer();
+  return 0;
+}*/
+
+//==============================================================================
+//function : QAViewer2dTest::Commands
+//purpose  : Add all the viewer command in the Draw_Interpretor
+//==============================================================================
+void QAViewer2dTest::DisplayCommands (Draw_Interpretor& theCommands)
+{
+  char *group = "2D AIS Viewer - Display Commands";
+
+  theCommands.Add("v2ddisplay",
+		  "v2ddisplay name [projection(Origin(x y z) Normal(dx dy dz) DX(dx dy dz)]",
+		  __FILE__, V2dDisplay, group);
+
+  theCommands.Add("v2derase",
+		  "v2derase [name1] ...  [name n]",
+		  __FILE__, V2dErase, group);
+
+  theCommands.Add("v2ddonly",
+		  "v2ddonly [name1] ...  [name n]",
+		  __FILE__, V2dDonly, group);
+
+  theCommands.Add("v2ddisplayall",
+		  "v2ddisplayall",
+		  __FILE__, V2dDisplayAll, group);
+
+  theCommands.Add("v2deraseall",
+		  "v2deraseall",
+		  __FILE__, V2dEraseAll, group);
+
+//  theCommands.Add("v2derasetype",
+//		  "v2derasetype <Type> : erase all the displayed objects of one given kind (see vtypes)",
+//		  __FILE__, V2dEraseType, group);
+
+//  theCommands.Add("v2ddisplaytype",
+//		  "v2ddisplaytype <Type> <Signature> : display all the objects of one given kind (see vtypes) which are stored the AIS2DContext",
+//		  __FILE__, V2dDisplayType, group);
+  
+/*
+  theCommands.Add("v2ddisplaymode",
+		  "v2ddispmode [name] mode(1,2,..) : no name -> on selected objects",
+		  __FILE__, V2dDispMode, group);
+
+  theCommands.Add("v2derasemode",
+		  "v2derasemode [name] mode(1,2,..) : no name -> on selected objects",
+		  __FILE__, V2dDispMode, group);
+
+  theCommands.Add("v2dsetdispmode",
+		  "v2dsetdispmode [name] mode(1,2,..) : no name -> on selected objects",
+		  __FILE__, V2dDispMode, group);
+
+  theCommands.Add("v2dunsetdispmode",
+		  "v2dunsetdispmode [name] mode(1,2,..) : no name -> on selected objects",
+		  __FILE__, V2dDispMode, group);
+*/
+  theCommands.Add("v2dsetcolor",
+		  "v2dsetcolor [name of shape] ColorName",
+		  __FILE__, V2dColor, group);
+
+  theCommands.Add("v2dunsetcolor",
+		  "v2dunsetcolor [name of shape]",
+		  __FILE__, V2dColor, group);
+
+  theCommands.Add("v2dsetbgcolor",
+		  "v2dsetbgcolor colorname       : Change background color",
+		  __FILE__, V2dSetBGColor, group);
+
+ /*
+ theCommands.Add("v2dsettransparency",
+		  "v2dsettransparency [name of shape] TransparencyCoef(0 -> 1)",
+		  __FILE__, V2dTransparency, group);
+
+  theCommands.Add("v2dunsettransparency",
+		  "v2dunsettransparency [name of shape]",
+		  __FILE__, V2dTransparency, group);
+
+  theCommands.Add("v2dsetmaterial",
+		  "v2dsetmaterial [name of shape] MaterialName",
+		  __FILE__, V2dMaterial, group);
+
+  theCommands.Add("v2dunsetmaterial",
+		  "v2dunsetmaterial [name of shape]",
+		  __FILE__, V2dMaterial, group);
+*/
+  theCommands.Add("v2dsetwidth",
+		  "v2dsetwidth [name_of_shape] width(THIN, MEDIUM, THICK, VERYTHICK)",
+		  __FILE__, V2dWidth, group);
+
+  theCommands.Add("v2dunsetwidth",
+		  "v2dunsetwidth [name of shape]",
+		  __FILE__, V2dWidth, group);
+/*
+  theCommands.Add("v2dsetshading",
+		  "v2dsetshading name Quality(default=0.0008)",
+		  __FILE__, V2dShading, group);
+
+  theCommands.Add("v2dunsetshading",
+		  "v2dunsetshading name",
+		  __FILE__, V2dShading, group);
+*/
+/*  theCommands.Add("v2dtexture",
+		  "'v2dtexture NameOfShape TextureFile' \n \
+                  or 'vtexture NameOfShape' if you want to disable texture mapping \n \
+                  or 'vtexture NameOfShape ?' to list available textures\n \
+                  or 'vtexture NameOfShape IdOfTexture' (0<=IdOfTexture<=20)' to use predefined textures\n",
+		  __FILE__, VTexture, group);*/
+}
+#endif
diff --git a/src/QAViewer2dTest/QAViewer2dTest_GeneralCommands.cxx b/src/QAViewer2dTest/QAViewer2dTest_GeneralCommands.cxx
new file mode 100644
index 0000000..9d349b2
--- /dev/null
+++ b/src/QAViewer2dTest/QAViewer2dTest_GeneralCommands.cxx
@@ -0,0 +1,1323 @@
+// Created on: 2002-01-22
+// Created by: Julia DOROVSKIKH
+// Copyright (c) 2002-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#if defined(WOKC40)
+
+#include <QAViewer2dTest.hxx>
+
+#include <QAViewer2dTest_DoubleMapOfInteractiveAndName.hxx>
+#include <QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx>
+
+#include <Draw_Interpretor.hxx>
+#include <DBRep.hxx>
+
+#include <V2d_Viewer.hxx>
+
+#include <TopoDS_Shape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_HArray1OfShape.hxx>
+
+#include <BRepTools.hxx>
+#include <BRep_Builder.hxx>
+#include <BRepOffsetAPI_MakeThickSolid.hxx>
+
+#include <TColStd_ListIteratorOfListOfInteger.hxx>
+
+#include <OSD_Directory.hxx>
+#include <OSD_File.hxx>
+#include <OSD_Path.hxx>
+#include <OSD_Timer.hxx>
+
+#include <gp_Trsf.hxx>
+#include <gp_Ax1.hxx>
+
+#include <AIS2D_ProjShape.hxx>
+#include <AIS2D_InteractiveContext.hxx>
+
+QAViewer2dTest_DoubleMapOfInteractiveAndName& GetMapOfAIS2D();
+Handle(AIS2D_InteractiveContext)& TheAIS2DContext();
+
+//=======================================================================
+//function : GetTypeNames2d
+//purpose  : 
+//=======================================================================
+static char** GetTypeNames2d ()
+{
+  static char* names[14] = {"Point","Axis","Trihedron","PlaneTrihedron", "Line","Circle","Plane",
+			  "Shape","ConnectedShape","MultiConn.Shape",
+			  "ConnectedInter.","MultiConn.",
+			  "Constraint","Dimension"};
+  static char** ThePointer = names;
+  return ThePointer;
+}
+
+//=======================================================================
+//function : GetTypeAndSignfromString2d
+//purpose  : 
+//=======================================================================
+/*void GetTypeAndSignfromString2d (char* name, AIS_KindOfInteractive& TheType,
+                                 Standard_Integer& TheSign)
+{
+  char ** thefullnames = GetTypeNames2d();
+  Standard_Integer index(-1);
+
+  for (Standard_Integer i = 0; i <= 13 && index == -1; i++)
+    if (!strcasecmp(name, thefullnames[i]))
+      index = i;
+  
+  if (index == -1)
+  {
+    TheType = AIS_KOI_None;
+    TheSign = -1;
+    return;
+  }
+  
+  if (index <= 6)
+  {
+    TheType = AIS_KOI_Datum;
+    TheSign = index+1;
+  }
+  else if (index <= 9)
+  {
+    TheType = AIS_KOI_Shape;
+    TheSign = index-7;
+  }
+  else if (index <= 11)
+  {
+    TheType = AIS_KOI_Object;
+    TheSign = index-10;
+  }
+  else
+  {
+    TheType = AIS_KOI_Relation;
+    TheSign = index-12;
+  }
+}*/
+
+//=======================================================================
+//function : Get Context and active view..
+//purpose  : 
+//=======================================================================
+void GetCtxAndView2d (Handle(AIS2D_InteractiveContext)& Ctx,
+                      Handle(V2d_View)& Viou)
+{
+  Ctx = QAViewer2dTest::GetAIS2DContext();
+  const Handle(V2d_Viewer)& Vwr = Ctx->CurrentViewer();
+  Vwr->InitActiveViews();
+  if (Vwr->MoreActiveViews())
+    Viou = Vwr->ActiveView();
+}
+
+//==============================================================================
+//function : GetShapeFromName2d
+//purpose  : Compute an Shape from a draw variable or a file name
+//==============================================================================
+TopoDS_Shape GetShapeFromName2d (char* name)
+{
+  TopoDS_Shape S = DBRep::Get(name);
+
+  if (S.IsNull())
+  {
+    BRep_Builder aBuilder;
+    BRepTools::Read( S, name, aBuilder);
+  }
+
+  return S; 
+}
+/*
+//==============================================================================
+//function : V2dDispAreas
+//purpose  : Redraw the view
+//Draw arg : No args
+//==============================================================================
+static int V2dDispAreas (Draw_Interpretor& ,Standard_Integer , char** )
+{
+  Handle(AIS2D_InteractiveContext) Ctx;
+  Handle(V2d_View) Viou;
+  GetCtxAndView2d(Ctx,Viou);
+//  Ctx->DisplayActiveAreas(Viou);
+  return 0;
+}
+
+//==============================================================================
+//function : V2dClearAreas
+//purpose  : Redraw the view
+//Draw arg : No args
+//==============================================================================
+static int V2dClearAreas (Draw_Interpretor& ,Standard_Integer , char** )
+{
+  Handle(AIS2D_InteractiveContext) Ctx;
+  Handle(V2d_View) Viou;
+  GetCtxAndView2d(Ctx,Viou);
+//  Ctx->ClearActiveAreas(Viou);
+  return 0;
+}
+
+//==============================================================================
+//function : V2dDispSensi
+//purpose  : 
+//Draw arg : No args
+//==============================================================================
+static int V2dDispSensi (Draw_Interpretor& ,Standard_Integer , char** )
+{
+  Handle(AIS2D_InteractiveContext) Ctx;
+  Handle(V2d_View) Viou;
+  GetCtxAndView2d(Ctx,Viou);
+//  Ctx->DisplayActiveSensitive(Viou);
+  return 0;
+
+}
+
+//==============================================================================
+//function : V2dClearSensi
+//purpose  : 
+//Draw arg : No args
+//==============================================================================
+static int V2dClearSensi (Draw_Interpretor& ,Standard_Integer , char** )
+{
+  Handle(AIS2D_InteractiveContext) Ctx;
+  Handle(V2d_View) Viou;
+  GetCtxAndView2d(Ctx,Viou);
+//  Ctx->ClearActiveSensitive(Viou);
+  return 0;
+}
+*/
+//==============================================================================
+//function : V2dDebug
+//purpose  : To list the displayed object with their attributes
+//Draw arg : No args
+//==============================================================================
+static int V2dDebug (Draw_Interpretor& di, Standard_Integer , char** )
+{
+  if (!QAViewer2dTest::CurrentView().IsNull())
+  {
+    di << "List of object in the viewer :" << "\n";
+
+    QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+  
+    while (it.More())
+    {
+      di << "\t" << it.Key2() << "\n";
+      it.Next();
+    }
+  }
+
+  return 0;
+}
+
+//=======================================================================
+//function :V2dSubInt
+//purpose  : 
+//=======================================================================
+/*static int V2dSubInt (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  if (argc == 1) return 1;
+  Standard_Integer On = atoi(argv[1]);
+  const Handle(AIS2D_InteractiveContext)& Ctx = QAViewer2dTest::GetAIS2DContext();
+  
+  if (argc == 2)
+  {
+    if (!Ctx->HasOpenedContext())
+    {
+      cout << "sub intensite ";
+      if (On == 1) cout << "On";
+      else cout << "Off";
+//      cout<<"pour "<<Ctx->NbCurrents()<<"  objets"<<endl;
+      for (Ctx->InitCurrent();Ctx->MoreCurrent();Ctx->NextCurrent())
+      {
+	if(On==1){
+	  Ctx->SubIntensityOn(Ctx->Current(),Standard_False);}
+	else{
+	  cout <<"passage dans off"<<endl;
+	  Ctx->SubIntensityOff(Ctx->Current(),Standard_False);
+	}
+      }
+    }
+    else
+    {
+      for(Ctx->InitSelected();Ctx->MoreSelected();Ctx->NextSelected()){
+	if(On==1){
+	  Ctx->SubIntensityOn(Ctx->Interactive(),Standard_False);}
+	else{
+	  Ctx->SubIntensityOff(Ctx->Interactive(),Standard_False);}
+      }
+    }
+    Ctx->UpdateCurrentViewer();
+  }
+  else
+  {
+    Handle(AIS2D_InteractiveObject) IO;
+    TCollection_AsciiString name = argv[2];
+    if (GetMapOfAIS2D().IsBound2(name))
+    {
+      IO = GetMapOfAIS2D().Find2(name);
+      if (On == 1) Ctx->SubIntensityOn(IO);
+      else         Ctx->SubIntensityOff(IO);
+    }
+    else return 1;
+  }
+  return 0;
+}*/
+
+//=======================================================================
+//function : v2doffsetvlad
+//purpose  : check BUG PRO16483
+//=======================================================================
+Standard_Integer v2doffsetvlad (Draw_Interpretor& , Standard_Integer , char** a)
+{
+  TopTools_ListOfShape ClosingFaces;
+
+  TopoDS_Shape S = GetShapeFromName2d(a[1]);
+  ClosingFaces.Append(GetShapeFromName2d(a[2]));
+  Standard_Real offset = -Abs(atof(a[3]));
+
+  TopoDS_Shape Result = BRepOffsetAPI_MakeThickSolid (S, ClosingFaces, offset, 1.e-05, 
+                                                      BRepOffset_Skin, Standard_True,
+                                                      Standard_False, GeomAbs_Arc);
+
+  Handle(AIS2D_InteractiveContext) Ctx = QAViewer2dTest::GetAIS2DContext();
+  Handle(AIS2D_ProjShape) ais = new AIS2D_ProjShape();
+  ais->Add(Result);
+  Ctx->Display(ais);
+
+//  DBRep::Set("vlad", ais->Shape());
+
+  return 0;
+}
+
+//=======================================================================
+//function : v2doffsetvlad2
+//purpose  : check BUG PRO16483
+//=======================================================================
+Standard_Integer v2doffsetvlad2 (Draw_Interpretor& , Standard_Integer , char** a)
+{
+  TopTools_ListOfShape ClosingFaces;
+
+  TopoDS_Shape S = GetShapeFromName2d(a[1]);
+  ClosingFaces.Append(GetShapeFromName2d(a[2]));
+  ClosingFaces.Append(GetShapeFromName2d(a[3]));
+  Standard_Real offset = -Abs(atof(a[4]));
+
+  TopoDS_Shape Result = BRepOffsetAPI_MakeThickSolid (S, ClosingFaces, offset, 1.e-05, 
+                                                      BRepOffset_Skin, Standard_True,
+                                                      Standard_False, GeomAbs_Arc);
+
+  Handle(AIS2D_InteractiveContext) Ctx = QAViewer2dTest::GetAIS2DContext();
+  Handle(AIS2D_ProjShape) ais = new AIS2D_ProjShape();
+  ais->Add(Result);
+  Ctx->Display(ais);
+
+//  DBRep::Set("vlad", ais->Shape());
+
+  return 0;
+}
+
+//=======================================================================
+//function : v2doffsetvlad3
+//purpose  : check BUG PRO16483
+//=======================================================================
+Standard_Integer v2doffsetvlad3 (Draw_Interpretor& , Standard_Integer , char** a)
+{
+  TopTools_ListOfShape ClosingFaces;
+
+  TopoDS_Shape S = GetShapeFromName2d(a[1]);
+  ClosingFaces.Append(GetShapeFromName2d(a[2]));
+  ClosingFaces.Append(GetShapeFromName2d(a[3]));
+  ClosingFaces.Append(GetShapeFromName2d(a[4]));
+  Standard_Real offset = -Abs(atof(a[5]));
+
+  TopoDS_Shape Result = BRepOffsetAPI_MakeThickSolid (S, ClosingFaces, offset, 1.e-05, 
+                                                      BRepOffset_Skin, Standard_True,
+                                                      Standard_False, GeomAbs_Arc);
+
+  Handle(AIS2D_InteractiveContext) Ctx = QAViewer2dTest::GetAIS2DContext();
+  Handle(AIS2D_ProjShape) ais = new AIS2D_ProjShape();
+  ais->Add(Result);
+  Ctx->Display(ais);
+
+//  DBRep::Set("vlad", ais->Shape());
+
+  return 0;
+}
+
+//=======================================================================
+//function : v2dvlad
+//purpose  : 
+//=======================================================================
+Standard_Integer v2dvlad (Draw_Interpretor& , Standard_Integer , char** a)
+{
+  ifstream s(a[1]);
+  BRep_Builder builder;
+  TopoDS_Shape shape;
+  BRepTools::Read(shape, s, builder);
+  DBRep::Set(a[1], shape);
+  Handle(AIS2D_InteractiveContext) Ctx = QAViewer2dTest::GetAIS2DContext();
+  Handle(AIS2D_ProjShape) ais = new AIS2D_ProjShape();
+  ais->Add(shape);
+  Ctx->Display(ais);
+
+  return 0;
+}
+
+//==============================================================================
+//function : GetTypeNameFromShape2d
+//purpose  : get the shape type as a string from a shape
+//==============================================================================
+static char *GetTypeNameFromShape2d (const TopoDS_Shape& aShape)
+{
+  char *ret = "????";
+
+  if (aShape.IsNull()) ret = "Null Shape";
+
+  switch (aShape.ShapeType())
+  {
+  case TopAbs_COMPOUND  : ret = "COMPOUND" ; break;
+  case TopAbs_COMPSOLID : ret = "COMPSOLID" ; break;
+  case TopAbs_SOLID     : ret = "SOLID" ; break;
+  case TopAbs_SHELL     : ret = "SHELL" ; break;
+  case TopAbs_FACE      : ret = "FACE" ; break;
+  case TopAbs_WIRE      : ret = "WIRE" ; break;
+  case TopAbs_EDGE      : ret = "EDGE" ; break;
+  case TopAbs_VERTEX    : ret = "VERTEX" ; break;
+  case TopAbs_SHAPE     : ret = "SHAPE" ; break;
+  }
+  return ret;
+}
+
+//==============================================================================
+//function : GetEnvir2d
+//purpose  : 
+//==============================================================================
+/*static TCollection_AsciiString GetEnvir2d ()
+{
+  static Standard_Boolean IsDefined = Standard_False ;
+  static TCollection_AsciiString VarName;
+  if (!IsDefined)
+  {
+    char *envir, *casroot ;
+    envir = getenv("CSF_MDTVTexturesDirectory") ;
+    
+    Standard_Boolean HasDefinition = Standard_False ;
+    if (!envir)
+    { 
+      casroot = getenv("CASROOT");
+      if (casroot)
+      {
+	VarName = TCollection_AsciiString  (casroot);
+	VarName += "/src/Textures";
+	HasDefinition = Standard_True;
+      }
+    }
+    else
+    {
+      VarName = TCollection_AsciiString(envir);
+      HasDefinition = Standard_True;
+    }
+
+    if (HasDefinition)
+    {
+      OSD_Path aPath (VarName);
+      OSD_Directory aDir (aPath);
+      if (aDir.Exists())
+      {
+	TCollection_AsciiString aTexture = VarName + "/2d_MatraDatavision.rgb";
+	OSD_File TextureFile (aTexture);
+	if (!TextureFile.Exists())
+        {
+	  cout << " CSF_MDTVTexturesDirectory or CASROOT not correctly setted " << endl;
+	  cout << " not all files are found in : "<<VarName.ToCString() << endl;
+	  Standard_Failure::Raise("CSF_MDTVTexturesDirectory or CASROOT not correctly setted ");
+	}
+      }
+      else
+      {
+	cout << " CSF_MDTVTexturesDirectory or CASROOT not correctly setted " << endl;
+	cout << " Directory : "<< VarName.ToCString() << " not exist " << endl;
+	Standard_Failure::Raise("CSF_MDTVTexturesDirectory or CASROOT not correctly setted ");
+      }      
+      return VarName ;
+    }
+    else
+    {
+      cout << " CSF_MDTVTexturesDirectory and CASROOT not setted " << endl;
+      cout << " one of these variable are mandatory to use this fonctionnality" << endl;
+      Standard_Failure::Raise("CSF_MDTVTexturesDirectory and CASROOT not setted ");
+    }   
+    IsDefined = Standard_True ; 
+  }
+
+  return VarName ;
+}*/
+
+//==============================================================================
+//function : V2dPerf
+//purpose  : Test the annimation of an object along a 
+//           predefined traectory
+//Draw arg : vperf ShapeName 1/0(Transfo/Location) 1/0(Primitives sensibles ON/OFF) 
+//==============================================================================
+/*static int V2dPerf (Draw_Interpretor& , Standard_Integer , char** argv)
+{
+  OSD_Timer myTimer;
+  TheAIS2DContext()->CloseLocalContext();
+  
+  Standard_Real Step = 4*M_PI/180;
+  Standard_Real Angle = 0;
+  
+  Handle(AIS2D_InteractiveObject) aIO;
+  aIO = GetMapOfAIS2D().Find2(argv[1]);
+  Handle(AIS2D_ProjShape) aShape = Handle(AIS2D_ProjShape)::DownCast(aIO);
+  
+  myTimer.Start();
+  
+  if (atoi(argv[3]) == 1)
+  {
+    cout << " Primitives sensibles OFF" << endl;
+//    TheAIS2DContext()->Deactivate(aIO);
+  }
+  else
+  {
+    cout << " Primitives sensibles ON" << endl;
+  }
+  // Movement par transformation 
+  if (atoi(argv[2]) == 1)
+  { 
+    cout << " Calcul par Transformation" << endl;
+    for (Standard_Real myAngle = 0; Angle < 10*2*M_PI; myAngle++)
+    {
+      Angle = Step*myAngle;
+      gp_Trsf myTransfo;
+      myTransfo.SetRotation(gp_Ax1(gp_Pnt(0,0,0), gp_Dir(0,0,1)), Angle);
+//      TheAIS2DContext()->SetLocation(aShape,myTransfo);
+      TheAIS2DContext()->UpdateCurrentViewer();
+    }
+  }
+  else
+  {
+    cout << " Calcul par Locations" << endl;
+    gp_Trsf myAngleTrsf;
+    myAngleTrsf.SetRotation(gp_Ax1(gp_Pnt(0,0,0), gp_Dir(0,0,1)), Step);
+    TopLoc_Location myDeltaAngle (myAngleTrsf);
+    TopLoc_Location myTrueLoc;
+    
+    for (Standard_Real myAngle = 0; Angle < 10*2*M_PI; myAngle++)
+    {
+      Angle = Step*myAngle;
+      myTrueLoc = myTrueLoc*myDeltaAngle;
+//      TheAIS2DContext()->SetLocation(aShape, myTrueLoc);
+      TheAIS2DContext()->UpdateCurrentViewer();
+    }
+  }
+  if (atoi(argv[3]) == 1)
+  {
+    // On reactive la selection des primitives sensibles 
+//    TheAIS2DContext()->Activate(aIO,0);
+  }
+//  QAViewer2dTest::CurrentView()->Redraw();
+  myTimer.Stop();
+  cout << " Temps ecoule " << endl;
+  myTimer.Show();
+  return 0;
+}*/
+
+//==================================================================================
+// Function : V2dAnimation
+//==================================================================================
+/*static int V2dAnimation (Draw_Interpretor& , Standard_Integer , char** )
+{ 
+  Standard_Real thread = 4;
+  Standard_Real angleA = 0;
+  Standard_Real angleB;
+  Standard_Real X;
+  gp_Ax1 Ax1 (gp_Pnt(0,0,0), gp_Vec(0,0,1));
+  
+  BRep_Builder B;
+  TopoDS_Shape CrankArm;
+  TopoDS_Shape CylinderHead;
+  TopoDS_Shape Propeller;
+  TopoDS_Shape EngineBlock;
+  
+  BRepTools::Read(CrankArm,"/dp_26/Indus/ege/assemblage/CrankArm.rle",B);
+  BRepTools::Read(CylinderHead,"/dp_26/Indus/ege/assemblage/CylinderHead.rle",B);
+  BRepTools::Read(Propeller,"/dp_26/Indus/ege/assemblage/Propeller.rle",B);
+  BRepTools::Read(EngineBlock,"/dp_26/Indus/ege/assemblage/EngineBlock.rle",B);
+  
+  if (CrankArm.IsNull() || CylinderHead.IsNull() || Propeller.IsNull() || EngineBlock.IsNull())
+  {
+    cout << " Syntaxe error:loading failure." << endl;
+  }
+
+  OSD_Timer myTimer;
+  myTimer.Start();
+  
+  Handle(AIS2D_ProjShape) myAisCylinderHead = new AIS2D_ProjShape();
+  Handle(AIS2D_ProjShape) myAisEngineBlock  = new AIS2D_ProjShape();
+  Handle(AIS2D_ProjShape) myAisCrankArm     = new AIS2D_ProjShape();
+  Handle(AIS2D_ProjShape) myAisPropeller    = new AIS2D_ProjShape();
+
+  myAisCylinderHead->Add(CylinderHead);
+  myAisCylinderHead->Add(EngineBlock);
+  myAisCylinderHead->Add(CrankArm);
+  myAisCylinderHead->Add(Propeller);
+  
+  GetMapOfAIS2D().Bind(myAisCylinderHead,"a");
+  GetMapOfAIS2D().Bind(myAisEngineBlock,"b");
+  GetMapOfAIS2D().Bind(myAisCrankArm,"c");
+  GetMapOfAIS2D().Bind(myAisPropeller,"d");
+  
+//  TheAIS2DContext()->SetColor(myAisCylinderHead, Quantity_NOC_INDIANRED);
+//  TheAIS2DContext()->SetColor(myAisEngineBlock , Quantity_NOC_RED);
+//  TheAIS2DContext()->SetColor(myAisPropeller   , Quantity_NOC_GREEN);
+ 
+  TheAIS2DContext()->Display(myAisCylinderHead,Standard_False);
+  TheAIS2DContext()->Display(myAisEngineBlock,Standard_False );
+  TheAIS2DContext()->Display(myAisCrankArm,Standard_False    );
+  TheAIS2DContext()->Display(myAisPropeller,Standard_False);
+  
+//  TheAIS2DContext()->Deactivate(myAisCylinderHead);
+//  TheAIS2DContext()->Deactivate(myAisEngineBlock );
+//  TheAIS2DContext()->Deactivate(myAisCrankArm    );
+//  TheAIS2DContext()->Deactivate(myAisPropeller   );
+  
+  // Boucle de mouvement
+  for (Standard_Real myAngle = 0; angleA < 2*M_PI*10.175; myAngle++)
+  {
+    angleA = thread*myAngle*M_PI/180;
+    X = Sin(angleA)*3/8;
+    angleB = atan(X / Sqrt(-X * X + 1));
+//    Standard_Real decal(25*0.6);
+    
+    //Build a transformation on the display
+    gp_Trsf aPropellerTrsf;
+    aPropellerTrsf.SetRotation(Ax1,angleA);
+//    TheAIS2DContext()->SetLocation(myAisPropeller,aPropellerTrsf);
+    
+//    gp_Ax3 base(gp_Pnt(3*decal*(1-Cos(angleA)),-3*decal*Sin(angleA),0),gp_Vec(0,0,1),gp_Vec(1,0,0));
+//    gp_Trsf aCrankArmTrsf;
+//    aCrankArmTrsf.SetTransformation(   base.Rotated(gp_Ax1(gp_Pnt(3*decal,0,0),gp_Dir(0,0,1)),angleB));
+//    TheAIS2DContext()->SetLocation(myAisCrankArm,aCrankArmTrsf);
+    
+    TheAIS2DContext()->UpdateCurrentViewer();
+  }
+  
+  TopoDS_Shape myNewCrankArm;  //=myAisCrankArm ->Shape().Located(myAisCrankArm ->Location());
+  TopoDS_Shape myNewPropeller; //=myAisPropeller->Shape().Located(myAisPropeller->Location());
+  
+//  myAisCrankArm ->ResetLocation();
+//  myAisPropeller->ResetLocation();
+ 
+//  myAisCrankArm ->Set(myNewCrankArm );
+//  myAisPropeller->Set(myNewPropeller);
+  
+//  TheAIS2DContext()->Activate(myAisCylinderHead,0);
+//  TheAIS2DContext()->Activate(myAisEngineBlock,0 );
+//  TheAIS2DContext()->Activate(myAisCrankArm ,0   );
+//  TheAIS2DContext()->Activate(myAisPropeller ,0  );
+  
+  myTimer.Stop();
+  myTimer.Show();
+  myTimer.Start();
+  
+  TheAIS2DContext()->Redisplay(myAisCrankArm ,Standard_False);
+  TheAIS2DContext()->Redisplay(myAisPropeller,Standard_False);
+  
+  TheAIS2DContext()->UpdateCurrentViewer();
+//  QAViewer2dTest::CurrentView()->Redraw();
+  
+  myTimer.Stop();
+  myTimer.Show();
+  
+  return 0;
+}*/
+
+//==============================================================================
+//function : HaveMode2d
+//use      : V2dActivatedModes
+//==============================================================================
+/*Standard_Boolean HaveMode2d (const Handle(AIS2D_InteractiveObject)& TheAisIO, const Standard_Integer mode)
+{
+//  TColStd_ListOfInteger List;
+//  TheAIS2DContext()->ActivatedModes (TheAisIO,List);
+//  TColStd_ListIteratorOfListOfInteger it;
+  Standard_Boolean Found=Standard_False;
+//  for (it.Initialize(List); it.More()&&!Found; it.Next() ){
+//    if (it.Value()==mode ) Found=Standard_True;
+//  }
+  return Found; 
+}*/
+
+//==============================================================================
+//function : V2dActivatedMode
+//purpose  : permet d'attribuer a chacune des shapes un mode d'activation
+//           (edges,vertex...)qui lui est propre et le mode de selection standard.
+//           La fonction s'applique aux shapes selectionnees(current ou selected dans le viewer)
+//             Dans le cas ou on veut psser la shape en argument, la fonction n'autorise
+//           qu'un nom et qu'un mode.
+//Draw arg : vsetam  [ShapeName] mode(0,1,2,3,4,5,6,7)
+//==============================================================================
+//#include <AIS2D_ListIteratorOfListOfInteractive.hxx>
+/*
+static int V2dActivatedMode (Draw_Interpretor& ,Standard_Integer argc,char** argv)
+{
+  Standard_Boolean HaveToSet;
+  Standard_Boolean ThereIsName = Standard_False ;
+  
+  if (!QAViewer2dTest::CurrentView().IsNull())
+  {
+    if (!strcasecmp(argv[0],"vsetam")) HaveToSet = Standard_True;
+    else HaveToSet = Standard_False;
+    
+    // verification des arguments 
+    if (HaveToSet) {
+      if (argc<2||argc>3) { cout<<" Syntaxe error"<<endl;return 1;}
+      if (argc==3) ThereIsName=Standard_True;
+      else ThereIsName=Standard_False;
+    }
+    else {
+      // vunsetam
+      if (argc>1) {cout<<" Syntaxe error"<<endl;return 1;}
+      else {
+	cout<<" R.A.Z de tous les modes de selecion"<<endl;
+	cout<<" Fermeture du Context local"<<endl;
+	TheAIS2DContext()->CloseLocalContext();
+      }
+      
+    }
+    
+    
+    // IL n'y a aps de nom de shape passe en argument
+    if (HaveToSet && !ThereIsName){
+      Standard_Integer aMode=atoi(argv [1]);
+      
+      char *cmode="???";
+      
+      switch (aMode) {
+      case 0: cmode = "Shape"; break;
+      case 1: cmode = "Vertex"; break;
+      case 2: cmode = "Edge"; break;
+      case 3: cmode = "Wire"; break;
+      case 4: cmode = "Face"; break;
+      case 5: cmode = "Shell"; break;
+      case 6: cmode = "Solid"; break;
+      case 7: cmode = "Compound"; break;
+      }
+      
+      if( !TheAIS2DContext()->HasOpenedContext() ) {
+	// il n'y a pas de Context local d'ouvert 
+	// on en ouvre un et on charge toutes les shapes displayees
+	// on load tous les objets displayees et on Activate les objets de la liste
+	AIS2D_ListOfInteractive ListOfIO;
+	// on sauve dans une AIS2DListOfInteractive tous les objets currents
+	if (TheAIS2DContext()->NbCurrents()>0 ){
+	  TheAIS2DContext()->UnhilightCurrents(Standard_False);
+	  
+	  for (TheAIS2DContext()->InitCurrent(); TheAIS2DContext()->MoreCurrent(); TheAIS2DContext()->NextCurrent() ){
+	    ListOfIO.Append(TheAIS2DContext()->Current() );
+	    
+	  }
+	}
+	
+	TheAIS2DContext()->OpenLocalContext(Standard_False);
+	QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+	while(it.More()){
+	  Handle(AIS2D_InteractiveObject) aIO=it.Key1();
+	  TheAIS2DContext()->Load(aIO,0,Standard_False);
+	  it.Next();
+	}
+	// traitement des objets qui etaient currents dans le Contexte global
+	if (!ListOfIO.IsEmpty() ) {
+	  // il y avait des objets currents
+	  AIS2D_ListIteratorOfListOfInteractive iter;
+	  for (iter.Initialize(ListOfIO); iter.More() ; iter.Next() ) {
+	    Handle(AIS2D_InteractiveObject) aIO=iter.Value();
+	    TheAIS2DContext()->Activate(aIO,aMode);
+	    cout<<" Mode: "<<cmode<<" ON pour "<<GetMapOfAIS2D().Find1(aIO)  <<endl;
+	  }
+	}
+	else {
+	  // On applique le mode a tous les objets displayes
+	  QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+	  while(it.More()){
+	    Handle(AIS2D_InteractiveObject) aIO=it.Key1();
+	    cout<<" Mode: "<<cmode<<" ON pour "<<it.Key2() <<endl;
+	    TheAIS2DContext()->Activate(aIO,aMode);
+	    it.Next();
+	  }
+	}
+	
+      }
+      
+      else {
+	// un Context local est deja ouvert
+	// Traitement des objets du Context local
+	if (TheAIS2DContext()->NbSelected()>0 ){
+	  TheAIS2DContext()->UnhilightSelected(Standard_False);
+	  // il y a des objets selected,on les parcourt
+	  for (TheAIS2DContext()->InitSelected(); TheAIS2DContext()->MoreSelected(); TheAIS2DContext()->NextSelected() ){
+	    Handle(AIS2D_InteractiveObject) aIO=TheAIS2DContext()->Interactive();
+	    
+	    
+	    if (HaveMode2d(aIO,aMode) ) {
+	      cout<<" Mode: "<<cmode<<" OFF pour "<<GetMapOfAIS2D().Find1(aIO) <<endl;
+	      TheAIS2DContext()->Deactivate(aIO,aMode);
+	    }
+	    else{
+	      cout<<" Mode: "<<cmode<<" ON pour "<<GetMapOfAIS2D().Find1(aIO) <<endl;
+	      TheAIS2DContext()->Activate(aIO,aMode);
+	    }
+	    
+	  }
+	}
+	else{
+	  // il n'y a pas d'objets selected
+	  // tous les objets diplayes sont traites
+	  QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+	  while(it.More()){
+	    Handle(AIS2D_InteractiveObject) aIO=it.Key1();
+	    if (HaveMode2d(aIO,aMode) ) {
+	    cout<<" Mode: "<<cmode<<" OFF pour "<<GetMapOfAIS2D().Find1(aIO) <<endl;
+	    TheAIS2DContext()->Deactivate(aIO,aMode);
+	  }
+	    else{
+	    cout<<" Mode: "<<cmode<<" ON pour"<<GetMapOfAIS2D().Find1(aIO) <<endl;
+	    TheAIS2DContext()->Activate(aIO,aMode);
+	  }
+	    it.Next();
+	}
+	  
+	} 
+      }
+    }
+    else if (HaveToSet && ThereIsName){
+      Standard_Integer aMode=atoi(argv [2]);
+      Handle(AIS2D_InteractiveObject) aIO=GetMapOfAIS2D().Find2(argv[1]);
+	
+      char *cmode="???";
+      
+      switch (aMode) {
+      case 0: cmode = "Shape"; break;
+      case 1: cmode = "Vertex"; break;
+      case 2: cmode = "Edge"; break;
+      case 3: cmode = "Wire"; break;
+      case 4: cmode = "Face"; break;
+      case 5: cmode = "Shell"; break;
+      case 6: cmode = "Solid"; break;
+      case 7: cmode = "Compound"; break;
+      }
+      
+      if( !TheAIS2DContext()->HasOpenedContext() ) {
+	TheAIS2DContext()->OpenLocalContext(Standard_False);
+	// On charge tous les objets de la map
+	QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+	while(it.More()){
+	  Handle(AIS2D_InteractiveObject) aShape=it.Key1();
+	  TheAIS2DContext()->Load(aShape,0,Standard_False);
+	  it.Next();
+	}
+	TheAIS2DContext()->Activate(aIO,aMode);
+	cout<<" Mode: "<<cmode<<" ON pour "<<argv[1]<<endl;
+      }
+      
+      else {
+	// un Context local est deja ouvert
+	if (HaveMode2d(aIO,aMode) ) {
+	  cout<<" Mode: "<<cmode<<" OFF pour "<<argv[1]<<endl;
+	  TheAIS2DContext()->Deactivate(aIO,aMode);
+	}
+	else{
+	  cout<<" Mode: "<<cmode<<" ON pour "<<argv[1]<<endl;
+	  TheAIS2DContext()->Activate(aIO,aMode);
+	}
+      }
+      
+    }
+  }
+  return 0;
+  
+}
+*/
+
+//==============================================================================
+//function : v2dtoto
+//==============================================================================
+#include <tcl.h>
+/*static int V2dToto (Draw_Interpretor& , Standard_Integer argc, char** )
+{
+  cout << " Fonction toto" << endl;
+  Tcl_Interp *interp;
+  int code;
+  if (argc > 1)
+  {
+    cout << " Syntaxe error" << endl;
+    return 0;
+  }
+  interp = Tcl_CreateInterp();
+  code = Tcl_EvalFile(interp,"/adv_12/DESIGN/k4dev/ege/work/test.tcl");
+  //code= Tcl_Eval(interp,riri)
+  cout << *interp->result << endl;
+  return 0;
+}*/
+
+//==============================================================================
+// function : WhoAmI
+// user : vState
+//==============================================================================
+/*void WhoAmI (const Handle(AIS2D_InteractiveObject )& theShape ) {
+  
+  // AIS2D_Datum
+  if (theShape->Type()==AIS2D_KOI_Datum) {
+    if      (theShape->Signature()==3 ) { cout<<"  AIS2D_Trihedron"; }
+    else if (theShape->Signature()==2 ) { cout<<"  AIS2D_Axis"; } 
+    else if (theShape->Signature()==6 ) { cout<<"  AIS2D_Circle"; }
+    else if (theShape->Signature()==5 ) { cout<<"  AIS2D_Line"; }
+    else if (theShape->Signature()==7 ) { cout<<"  AIS2D_Plane"; }
+    else if (theShape->Signature()==1 ) { cout<<"  AIS2D_Point"; }
+    else if (theShape->Signature()==4 ) { cout<<"  AIS2D_PlaneTrihedron"; }
+  }
+  // AIS2D_ProjShape
+  else if (theShape->Type()==AIS2D_KOI_Shape && theShape->Signature()==0 ) { cout<<"  AIS2D_ProjShape"; }
+  // AIS2D_Dimentions et AIS2D_Relations
+  else if (theShape->Type()==AIS2D_KOI_Relation) {
+    Handle(AIS2D_Relation) TheShape= ((*(Handle(AIS2D_Relation)*)&theShape));
+    
+    if      (TheShape->KindOfDimension()==AIS2D_KOD_PLANEANGLE)      {cout<<"  AIS2D_AngleDimension";}
+    else if (TheShape->KindOfDimension()==AIS2D_KOD_LENGTH )         {cout<<"  AIS2D_Chamf2/3dDimension/AIS2D_LengthDimension ";  }
+    else if (TheShape->KindOfDimension()==AIS2D_KOD_DIAMETER  )      {cout<<"  AIS2D_DiameterDimension ";}
+    else if (TheShape->KindOfDimension()==AIS2D_KOD_ELLIPSERADIUS  ) {cout<<"  AIS2D_EllipseRadiusDimension ";}
+    //else if (TheShape->KindOfDimension()==AIS2D_KOD_FILLETRADIUS  )  {cout<<" AIS2D_FilletRadiusDimension "<<endl;}
+    else if (TheShape->KindOfDimension()==AIS2D_KOD_OFFSET  )        {cout<<"  AIS2D_OffsetDimension ";}
+    else if (TheShape->KindOfDimension()==AIS2D_KOD_RADIUS  )        {cout<<"  AIS2D_RadiusDimension ";}
+    // AIS2D no repertorie.
+    else {cout<<"  Type Unknown.";}
+  }
+}*/
+
+//==============================================================================
+//function : V2dState
+//purpose  : 
+//Draw arg : v2dstate [nameA] ... [nameN]
+//==============================================================================
+/*static int V2dState (Draw_Interpretor& , Standard_Integer argc, char** argv) 
+{
+  Standard_Boolean ThereIsCurrent = Standard_False;
+  Standard_Boolean ThereIsArguments = Standard_False;
+  TheAIS2DContext()->CloseAllContext();
+  if (argc >= 2 )
+  {
+    ThereIsArguments = Standard_True;
+  }
+//  if (TheAIS2DContext()->NbCurrents()>0 ) {
+//    ThereIsCurrent=Standard_True;
+//  }
+
+  if (ThereIsArguments)
+  {
+    for (int cpt = 1; cpt < argc; cpt++)
+    {
+      // Verification que lq piece est bien bindee.
+      if (GetMapOfAIS2D().IsBound2(argv[cpt]))
+      {
+	Handle(AIS2D_InteractiveObject) theShape = GetMapOfAIS2D().Find2(argv[cpt]);
+	cout << argv[cpt];
+//        WhoAmI(theShape);
+	if (TheAIS2DContext()->IsDisplayed(theShape))
+        {
+	  cout << "    Displayed" << endl;
+	}
+	else
+        {
+	  cout << "    Not Displayed" << endl;
+	}
+      }
+      else
+      {
+	cout << "vstate error: Shape " << cpt << " doesn't exist;" << endl;
+        return 1;
+      }
+    }
+  }
+  else if (ThereIsCurrent)
+  {
+    for (TheAIS2DContext() -> InitCurrent() ; TheAIS2DContext() -> MoreCurrent() ; TheAIS2DContext() ->NextCurrent() )
+    {
+      Handle(AIS2D_InteractiveObject) theShape=TheAIS2DContext()->Current();
+      cout<<GetMapOfAIS2D().Find1(theShape);WhoAmI(theShape );
+      if (TheAIS2DContext()->IsDisplayed(theShape) ) {
+	cout<<"    Displayed"<<endl;
+      }
+      else {
+	cout<<"    Not Displayed"<<endl;
+      }
+    }
+  }
+  else
+  {
+    QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+    while (it.More())
+    {
+      Handle(AIS2D_InteractiveObject) theShape = it.Key1();
+      cout << it.Key2();
+//      WhoAmI(theShape);
+      if (TheAIS2DContext()->IsDisplayed(theShape))
+      {
+	cout << "    Displayed" << endl;
+      }
+      else
+      {
+	cout << "    Not Displayed" << endl;
+      }
+      it.Next();
+    }
+  }
+  
+  return 0;
+}*/
+
+//=======================================================================
+//function : V2dPickShape
+//purpose  : 
+//=======================================================================
+/*static int V2dPickShape (Draw_Interpretor& , Standard_Integer argc, char** argv) 
+{
+  TopoDS_Shape PickSh;
+  TopAbs_ShapeEnum theType = TopAbs_COMPOUND;
+
+  if (argc == 1) theType = TopAbs_SHAPE;
+  else
+  {
+    if (!strcasecmp(argv[1],"V" )) theType = TopAbs_VERTEX;
+    else if (!strcasecmp(argv[1],"E" )) theType = TopAbs_EDGE;
+    else if (!strcasecmp(argv[1],"W" )) theType = TopAbs_WIRE;
+    else if (!strcasecmp(argv[1],"F" )) theType = TopAbs_FACE;
+    else if (!strcasecmp(argv[1],"SHAPE" )) theType = TopAbs_SHAPE;
+    else if (!strcasecmp(argv[1],"SHELL" )) theType = TopAbs_SHELL;
+    else if (!strcasecmp(argv[1],"SOLID" )) theType = TopAbs_SOLID;
+  }
+  
+  static Standard_Integer nbOfSub[8] = {0,0,0,0,0,0,0,0};
+  static TCollection_AsciiString nameType[8] = {"COMPS","SOL","SHE","F","W","E","V","SHAP"};
+
+  TCollection_AsciiString name;
+
+  Standard_Integer NbToPick = argc>2 ? argc-2 : 1;
+  if (NbToPick == 1)
+  {
+    PickSh = QAViewer2dTest::PickShape(theType);
+    
+    if (PickSh.IsNull()) return 1;
+    if (argc > 2)
+    {
+      name += argv[2];
+    }
+    else
+    {
+      if (!PickSh.IsNull())
+      {
+	nbOfSub[Standard_Integer(theType)]++;
+	name += "Picked_";
+	name += nameType[Standard_Integer(theType)];
+	TCollection_AsciiString indxstring(nbOfSub[Standard_Integer(theType)]);
+	name +="_";
+	name+=indxstring;
+      }
+    }
+    // si on avait une petite methode pour voir si la shape 
+    // est deja dans la Double map, ca eviterait de creer....
+    DBRep::Set(name.ToCString(),PickSh);
+    
+    Handle(AIS2D_ProjShape) newsh = new AIS2D_ProjShape();
+    newsh->Add(PickSh);
+    GetMapOfAIS2D().Bind(newsh, name);
+    TheAIS2DContext()->Display(newsh);
+    cout << "Nom de la shape pickee : " << name << endl;
+  }
+
+  // Plusieurs objets a picker, vite vite vite....
+  //
+  else
+  {
+    Standard_Boolean autonaming = !strcasecmp(argv[2],".");
+    Handle(TopTools_HArray1OfShape) arr = new TopTools_HArray1OfShape(1,NbToPick);
+    if (QAViewer2dTest::PickShapes(theType,arr))
+    {
+      for (Standard_Integer i = 1; i <= NbToPick; i++)
+      {
+	PickSh = arr->Value(i);
+	if (!PickSh.IsNull())
+        {
+	  if (autonaming)
+          {
+	    nbOfSub[Standard_Integer(theType)]++;
+	    name.Clear();
+	    name += "Picked_";
+	    name += nameType[Standard_Integer(theType)];
+	    TCollection_AsciiString indxstring (nbOfSub[Standard_Integer(theType)]);
+	    name +="_";
+	    name+=indxstring;
+	  }
+	}
+	else
+	  name = argv[1+i];
+
+	DBRep::Set(name.ToCString(),PickSh);
+	Handle(AIS2D_ProjShape) newsh = new AIS2D_ProjShape();
+        newsh->Add(PickSh);
+	GetMapOfAIS2D().Bind(newsh, name);
+	cout << "display of picke shape #" << i << " - nom : " << name << endl;
+	TheAIS2DContext()->Display(newsh);
+      }
+    }
+  }
+
+  return 0;  
+}*/
+
+//=======================================================================
+//function : V2dIOTypes
+//purpose  : list of known objects
+//=======================================================================
+/*static int V2dIOTypes (Draw_Interpretor& , Standard_Integer , char** ) 
+{
+  //                             1234567890         12345678901234567         123456789
+  TCollection_AsciiString Colum [3] = {"Standard Types","Type Of Object","Signature"};
+  TCollection_AsciiString BlankLine(64, '_');
+  Standard_Integer i;
+
+  cout << "/n" << BlankLine << endl;
+
+  for (i = 0; i <= 2; i++) Colum[i].Center(20,' ');
+  for (i = 0; i <= 2; i++) cout << "|" << Colum[i];
+  cout << "|" << endl;
+  
+  cout << BlankLine << endl;
+
+  //  TCollection_AsciiString thetypes[5]={"Datum","Shape","Object","Relation","None"};
+  char ** names = GetTypeNames2d();
+
+  TCollection_AsciiString curstring;
+  TCollection_AsciiString curcolum[3];
+  
+  // les objets de type Datum..
+  curcolum[1] += "Datum";
+  for (i = 0; i <= 6; i++)
+  {
+    curcolum[0].Clear();
+    curcolum[0] += names[i];
+    
+    curcolum[2].Clear();
+    curcolum[2]+=TCollection_AsciiString(i+1);
+    
+    for (Standard_Integer j = 0; j <= 2; j++)
+    {
+      curcolum[j].Center(20,' ');
+      cout << "|" << curcolum[j];
+    }
+    cout << "|" << endl;
+  }
+  cout << BlankLine << endl;
+  
+  // les objets de type shape
+  curcolum[1].Clear();
+  curcolum[1] += "Shape";
+  curcolum[1].Center(20,' ');
+
+  for (i = 0; i <= 2; i++)
+  {
+    curcolum[0].Clear();
+    curcolum[0] += names[7+i];
+    curcolum[2].Clear();
+    curcolum[2] += TCollection_AsciiString(i);
+
+    for (Standard_Integer j = 0; j <= 2; j++)
+    {
+      curcolum[j].Center(20,' ');
+      cout << "|" << curcolum[j];
+    }
+    cout << "|" << endl;
+  }
+  cout << BlankLine << endl;
+  // les IO de type objet...
+  curcolum[1].Clear();
+  curcolum[1] += "Object";
+  curcolum[1].Center(20,' ');
+  for (i = 0;i <= 1; i++)
+  {
+    curcolum[0].Clear();
+    curcolum[0] += names[10+i];
+    curcolum[2].Clear();
+    curcolum[2] += TCollection_AsciiString(i);
+    
+    for (Standard_Integer j = 0; j <= 2; j++)
+    {
+      curcolum[j].Center(20,' ');
+      cout << "|" << curcolum[j];
+    }
+    cout << "|" << endl;
+  }
+  cout << BlankLine << endl;
+
+  // les contraintes et dimensions.
+  // pour l'instant on separe juste contraintes et dimensions...
+  // plus tard, on detaillera toutes les sortes...
+  curcolum[1].Clear();
+  curcolum[1] += "Relation";
+  curcolum[1].Center(20,' ');
+  for (i = 0; i <= 1; i++)
+  {
+    curcolum[0].Clear();
+    curcolum[0] += names[12+i];
+    curcolum[2].Clear();
+    curcolum[2] += TCollection_AsciiString(i);
+    
+    for (Standard_Integer j = 0; j <= 2; j++)
+    {
+      curcolum[j].Center(20,' ');
+      cout << "|" << curcolum[j];
+    }
+    cout << "|" << endl;
+  }
+  cout << BlankLine << endl;
+
+  return 0;  
+}*/
+
+//=======================================================================
+//function : v2dr
+//purpose  : reading of the shape
+//=======================================================================
+/*static Standard_Integer v2dr (Draw_Interpretor& , Standard_Integer , char** a)
+{
+  ifstream s (a[1]);
+  BRep_Builder builder;
+  TopoDS_Shape shape;
+  BRepTools::Read(shape, s, builder);
+  DBRep::Set(a[1], shape);
+  Handle(AIS2D_InteractiveContext) Ctx = QAViewer2dTest::GetAIS2DContext();
+  Handle(AIS2D_ProjShape) ais = new AIS2D_ProjShape();
+  ais->Add(shape);
+  Ctx->Display(ais);
+  return 0;
+}*/
+
+//==============================================================================
+//function : QAViewer2dTest::GeneralCommands
+//purpose  : Add all the general commands in the Draw_Interpretor
+//==============================================================================
+void QAViewer2dTest::GeneralCommands (Draw_Interpretor& theCommands)
+{
+  char *group = "2D AIS Viewer";
+
+  theCommands.Add("v2ddir",
+		  "v2ddir - list interactive objects",
+		  __FILE__, V2dDebug, group);
+
+/*  theCommands.Add("v2dsub",
+                  "v2dsub 0/1(off/on) [obj]     : Subintensity(on/off) of selected objects",
+		  __FILE__, V2dSubInt, group);
+
+  theCommands.Add("v2dardis",
+		  "v2dardis                      : Display active areas",
+		  __FILE__, V2dDispAreas, group);
+
+  theCommands.Add("v2darera",
+		  "v2darera                      : Erase active areas",
+		  __FILE__, V2dClearAreas, group);
+
+  theCommands.Add("v2dsensdis",
+		  "v2dsensdis                    : display active entities",
+		  __FILE__, V2dDispSensi, group);
+
+  theCommands.Add("v2dsensera",
+		  "v2dsensera                    : erase  active entities",
+		  __FILE__, V2dClearSensi, group);
+
+  theCommands.Add("v2dperf",
+		  "v2dperf ShapeName 1/0(Transfo/Location) 1/0(Primitives sensibles ON/OFF)",
+		  __FILE__, V2dPerf, group);
+
+  theCommands.Add("v2danimation",
+                  "v2danimation",
+		  __FILE__, V2dAnimation, group);
+*/
+/*theCommands.Add("v2dtexscale",
+		  "'v2dtexscale  NameOfShape ScaleU ScaleV' \n \
+                   or 'vtexscale NameOfShape ScaleUV' \n \
+                   or 'vtexscale NameOfShape' to disable scaling\n",
+		  __FILE__,VTexture,group);
+
+  theCommands.Add("v2dtexorigin",
+		  "'v2dtexorigin NameOfShape UOrigin VOrigin' \n \
+                   or 'vtexorigin NameOfShape UVOrigin' \n \
+                   or 'vtexorigin NameOfShape' to disable origin positioning\n",
+		  __FILE__,VTexture,group);
+
+  theCommands.Add("v2dtexrepeat",
+		  "'v2dtexrepeat  NameOfShape URepeat VRepeat' \n \
+                   or 'vtexrepeat NameOfShape UVRepeat \n \
+                   or 'vtexrepeat NameOfShape' to disable texture repeat \n ",
+		  VTexture,group);
+
+  theCommands.Add("v2dtexdefault",
+		  "'v2dtexdefault NameOfShape' to set texture mapping default parameters \n",
+		  VTexture,group);*/
+
+//  theCommands.Add("v2dsetam",
+//		  "v2dsetActivatedModes: vsetam mode(1->7)",
+//		  __FILE__,VActivatedMode,group);
+
+//  theCommands.Add("v2dunsetam",
+//		  "v2dunsetActivatedModes:   vunsetam",
+//		  __FILE__,VActivatedMode,group);
+
+/*  theCommands.Add("v2dtoto",
+                  "v2dtoto",
+		  __FILE__, V2dToto, group);
+
+  theCommands.Add("v2dstate",
+                  "vstate [Name1] ... [NameN]    : No arg, select currents; no currrent select all",
+		  __FILE__,V2dState,group);
+
+  theCommands.Add("v2dpickshapes",
+		  "v2dpickshape subtype(VERTEX,EDGE,WIRE,FACE,SHELL,SOLID) [name1 or .] [name2 or .] [name n or .]",
+		  __FILE__, V2dPickShape, group);
+
+  theCommands.Add("v2dtypes",
+		  "v2dtypes                      : list of known types and signatures in AIS2D - To be Used in vpickobject command for selection with filters",
+		  V2dIOTypes,group);
+
+  theCommands.Add("v2dr",
+                  "v2dr                          : reading of the shape",
+		  __FILE__, v2dr, group);
+
+  theCommands.Add("v2doffsetvlad",
+		  "v2doffsetvlad shape offsettedface offsetvalue",
+		  __FILE__, v2doffsetvlad, group);
+
+  theCommands.Add("v2doffsetvlad2",
+		  "v2doffsetvlad2 shape offsettedface1 offsettedface2 offsetvalue",
+		  __FILE__, v2doffsetvlad2, group);
+
+  theCommands.Add("v2doffsetvlad3",
+		  "v2doffsetvlad3 shape offsettedface1 offsettedface2 offsettedface3 offsetvalue",
+		  __FILE__, v2doffsetvlad3, group);
+
+  theCommands.Add("v2dvlad",
+		  "v2dvlad shape",
+		  __FILE__, v2dvlad, group);*/
+}
+#endif
diff --git a/src/QAViewer2dTest/QAViewer2dTest_ObjectCommands.cxx b/src/QAViewer2dTest/QAViewer2dTest_ObjectCommands.cxx
new file mode 100644
index 0000000..47d0594
--- /dev/null
+++ b/src/QAViewer2dTest/QAViewer2dTest_ObjectCommands.cxx
@@ -0,0 +1,1609 @@
+// Copyright (c) 1999-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#if defined(WOKC40)
+
+//===============================================
+//    AIS2D Objects Creation : Datums (axis,trihedrons,lines,planes)
+//===============================================
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <QAViewer2dTest.hxx>
+
+#include <string.h>
+
+#include <Quantity_NameOfColor.hxx>
+
+#include <Draw_Interpretor.hxx>
+#include <Draw.hxx>
+#include <Draw_Appli.hxx>
+#include <DBRep.hxx>
+
+#include <TCollection_AsciiString.hxx>
+#include <TCollection_ExtendedString.hxx>
+#include <TColStd_MapOfInteger.hxx>
+
+#include <V2d_Viewer.hxx>
+#include <V2d_View.hxx>
+#include <V2d.hxx>
+
+#include <QAViewer2dTest_DoubleMapOfInteractiveAndName.hxx>
+#include <QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx>
+#include <QAViewer2dTest_EventManager.hxx>
+
+#include <BRepTools.hxx>
+#include <BRep_Tool.hxx>
+#include <BRep_Builder.hxx>
+#include <BRepAdaptor_Curve.hxx>
+#include <BRepAdaptor_Surface.hxx>
+
+#include <TopoDS.hxx>
+#include <TopoDS_Solid.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Edge.hxx>
+
+#include <TopAbs.hxx>
+#include <TopAbs_ShapeEnum.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+
+#include <Draw_Window.hxx>
+
+#include <AIS2D_ProjShape.hxx>
+#include <AIS2D_InteractiveContext.hxx>
+
+#include <Graphic2d_InfiniteLine.hxx>
+#include <Graphic2d_Circle.hxx>
+
+#include <Geom2d_Line.hxx>
+#include <Geom2d_CartesianPoint.hxx>
+
+#include <Geom_Line.hxx>
+#include <Geom_Plane.hxx>
+#include <Geom_Axis2Placement.hxx>
+#include <Geom_Axis1Placement.hxx>
+#include <Geom_CartesianPoint.hxx>
+
+#include <gp_Pln.hxx>
+#include <gp_Circ.hxx>
+
+#include <GC_MakePlane.hxx>
+
+extern QAViewer2dTest_DoubleMapOfInteractiveAndName& GetMapOfAIS2D();
+Standard_IMPORT int ViewerMainLoop2d (Standard_Integer argc, char** argv);
+extern Handle(AIS2D_InteractiveContext)& TheAIS2DContext();
+
+//==============================================================================
+//function : SelectShape2d
+//purpose  : 
+//==============================================================================
+TopoDS_Shape SelectShape2d (int theSelType) 
+{
+  TopoDS_Shape ShapeA;
+
+//  if (theSelType != 5)
+//    TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(theSelType));
+
+  switch (theSelType)
+  {
+  case 1:
+    cout << " Select a vertex ..." << endl;
+    break;
+  case 2:
+    cout << " Select an edge ..." << endl;
+    break;
+  case 4:
+    cout << " Select a face ..." << endl;
+    break;
+  case 5: // user defined text
+    break;
+  default:
+    cout << " Incorrect selection mode" << endl;
+    break;
+  }
+ 
+  Standard_Integer argcc = 5;
+  char *buff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" };
+  char **argvv = (char **) buff;
+  while (ViewerMainLoop2d(argcc, argvv)) {}
+
+/*  for (TheAIS2DContext()->InitSelected();
+       TheAIS2DContext()->MoreSelected();
+       TheAIS2DContext()->NextSelected())
+  {
+    ShapeA = TheAIS2DContext()->SelectedShape();
+  }*/
+
+//  if (theSelType != 5)
+//    TheAIS2DContext()->DeactivateStandardMode(AIS2D_ProjShape::SelectionType(theSelType));
+
+  return ShapeA;
+}
+#if 0
+//==============================================================================
+//function : V2dTrihedron2D
+//purpose  : Create a plane with a 2D  trihedron from a faceselection
+//Draw arg : v2dtri2d  name  
+//==============================================================================
+static int V2dTrihedron2D (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  if (argc != 2)
+  {
+    cout << argv[0] << " wrong arguments number" << endl;
+    return 1;
+  }
+  
+  // Declarations
+  Standard_Integer myCurrentIndex;
+
+  // Fermeture des contextes 
+  TheAIS2DContext()->CloseAllContext();
+
+  // Ouverture d'un contexte local et recuperation de son index.
+  TheAIS2DContext()->OpenLocalContext();
+  myCurrentIndex = TheAIS2DContext()->IndexOfCurrentLocal();
+
+  TopoDS_Shape ShapeB = SelectShape2d(4); // Face
+  TopoDS_Face FaceB = TopoDS::Face(ShapeB);
+  
+  // Construction du Plane
+  // recuperation des edges des faces.
+  TopExp_Explorer FaceExpB (FaceB, TopAbs_EDGE);
+  
+  TopoDS_Edge EdgeB = TopoDS::Edge(FaceExpB.Current());
+
+  // declarations 
+  gp_Pnt A,B,C;
+  
+  // si il y a plusieurs edges
+  if (FaceExpB.More())
+  {
+    FaceExpB.Next();
+    TopoDS_Edge EdgeC = TopoDS::Edge(FaceExpB.Current());
+    BRepAdaptor_Curve theCurveB (EdgeB);
+    BRepAdaptor_Curve theCurveC (EdgeC);
+    A = theCurveC.Value(0.1);
+    B = theCurveC.Value(0.9);
+    C = theCurveB.Value(0.5);
+  }
+  else
+  {
+    // FaceB a 1 unique edge courbe
+    BRepAdaptor_Curve theCurveB (EdgeB);
+    A = theCurveB.Value(0.1);
+    B = theCurveB.Value(0.9);
+    C = theCurveB.Value(0.5);
+  }
+  // Construction du Geom_Plane
+  GC_MakePlane MkPlane (A,B,C);
+  Handle(Geom_Plane) theGeomPlane = MkPlane.Value();
+  
+  // Construction de l'AIS2D_PlaneTrihedron
+//  Handle(AIS2D_PlaneTrihedron) theAIS2DPlaneTri = new AIS2D_PlaneTrihedron(theGeomPlane);
+
+  // Fermeture du contexte local.
+  TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+  
+  // on le display & bind
+//  TheAIS2DContext()->Display(theAIS2DPlaneTri);
+//  GetMapOfAIS2D().Bind(theAIS2DPlaneTri, argv[1]);
+  
+  return 0; 
+}
+#endif
+
+//==============================================================================
+//function : V2dTrihedron
+//purpose  : Create a trihedron. If no arguments are set, the default
+//           trihedron (Oxyz) is created.
+//Draw arg : vtrihedron  name  [Xo] [Yo] [Zo] [Zu] [Zv] [Zw] [Xu] [Xv] [Xw]
+//==============================================================================
+/*static int V2dTrihedron (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  // Verification des arguments
+  if (argc < 2 || argc > 11)
+  {
+    cout << argv[0] << " Syntaxe error" << endl;
+    return 1;
+  }
+
+  TCollection_AsciiString name = argv[1];
+
+  if (argc > 5 && argc != 11)
+  {
+    cout << argv[0] << " Syntaxe error" << endl;
+    return 1;
+  }
+
+  Standard_Real coord[9] = {0.,0.,0.,0.,0.,1.,1.,0.,0.};
+  if (argc > 2)
+  {
+    Standard_Integer i;
+    for (i = 0; i <= 2; i++)
+      coord[i] = atof(argv[2+i]);
+    
+    if (argc > 5)
+    {
+      for (i = 0; i <= 2; i++)
+      {
+	coord[3+i] = atof(argv[6+i]);
+	coord[6+i] = atof(argv[8+i]);
+      }
+    }
+  }
+  gp_Pnt ThePoint   (coord[0],coord[1],coord[2]);
+  gp_Dir TheZVector (coord[3],coord[4],coord[5]);
+  gp_Dir TheXVector (coord[6],coord[7],coord[8]);
+
+  if (!TheZVector.IsNormal(TheXVector,M_PI/180))
+  {
+    cout << argv[0] << " VectorX is not normal to VectorZ" << endl;
+    return 1;
+  }
+
+  Handle(Geom_Axis2Placement) OrigineAndAxii = new Geom_Axis2Placement(ThePoint,TheZVector,TheXVector);
+
+  // Creation du triedre
+  Handle(AIS2D_Trihedron) aShape = new AIS2D_Trihedron(OrigineAndAxii);
+  GetMapOfAIS2D().Bind(aShape,name);
+  TheAIS2DContext()->Display(aShape);
+
+  return 0; 
+}*/
+#if 0
+//==============================================================================
+//function : V2dSize
+//purpose  : Change the size of a named or selected trihedron
+//           if no name : it affects the trihedrons witch are selected otherwise nothing is donne
+//           if no value, the value is set at 100 by default
+//Draw arg : v2dsize [name] [size]
+//==============================================================================
+static int V2dSize (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  Standard_Boolean ThereIsName;
+  Standard_Real    value;
+  //  Quantity_NameOfColor col = Quantity_NOC_BLACK;
+  
+  if (argc > 3)
+  {
+    cout << argv[0] << " Syntaxe error" << endl;
+    return 1;
+  }
+  
+  if (argc == 1)
+  {
+    ThereIsName = Standard_False;
+    value = 100;
+  }
+  else if (argc == 2)
+  {
+    ThereIsName = Standard_False;
+    value = atof(argv[1]);
+  }
+  else
+  {
+    ThereIsName = Standard_True;
+    value = atof(argv[2]);
+  }
+
+  if (TheAIS2DContext()->HasOpenedContext()) TheAIS2DContext()->CloseLocalContext();
+  
+  if (!ThereIsName)
+  {
+//    if (TheAIS2DContext()->NbCurrents() <= 0) return -1;
+    QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+
+    while (it.More())
+    {
+      Handle(AIS2D_InteractiveObject) aShape = it.Key1();
+      
+      if (TheAIS2DContext()->IsCurrent(aShape))
+      {
+/*	if (aShape->Type() == AIS2D_KOI_Datum && aShape->Signature() == 3)
+        {
+	  if (aShape->HasColor())
+          {
+	    hascol = Standard_True;
+	    col = aShape->Color();
+          }
+	  else hascol = Standard_False;
+	  
+	  Handle(AIS2D_Trihedron) aTrihedron = *(Handle(AIS2D_Trihedron)*) &aShape;
+	  
+	  aTrihedron->SetSize(value);
+	  
+	  if (hascol) aTrihedron->SetColor(col);
+	  else        aTrihedron->UnsetColor();
+
+	  // The trihedron hasn't be errased from the map
+	  // so you just have to redisplay it
+	  TheAIS2DContext()->Redisplay(aTrihedron, Standard_False);
+	}*/
+      }
+      it.Next();
+    }
+    TheAIS2DContext()->UpdateCurrentViewer();
+  }
+  else
+  {
+    TCollection_AsciiString name = argv[1];
+    
+    if (GetMapOfAIS2D().IsBound2(name))
+    {
+      Handle(AIS2D_InteractiveObject) aShape = GetMapOfAIS2D().Find2(name);
+      
+/*      if (aShape->Type() == AIS2D_KOI_Datum && aShape->Signature() == 3)
+      {
+	if (aShape->HasColor())
+        {
+	  hascol = Standard_True;
+	  col = aShape->Color();
+        }
+	else hascol = Standard_False;
+	
+	// On downcast aShape de AIS2D_InteractiveObject a AIS2D_Trihedron
+	// pour lui appliquer la methode SetSize()
+	Handle(AIS2D_Trihedron) aTrihedron = *(Handle(AIS2D_Trihedron)*) &aShape;
+	
+	aTrihedron->SetSize(value);
+	
+	if (hascol) aTrihedron->SetColor(col);
+	else        aTrihedron->UnsetColor();
+	
+	// The trihedron hasn't be errased from the map
+	// so you just have to redisplay it
+	TheAIS2DContext()->Redisplay(aTrihedron, Standard_False);
+      
+	TheAIS2DContext()->UpdateCurrentViewer();
+      }*/
+    }
+  }
+  return 0; 
+}
+#endif
+
+//==============================================================================
+//function : V2dPlaneTrihedron
+//purpose  : Create a plane from a trihedron selection. If no arguments are set, the default
+//Draw arg : v2dplanetri  name  
+//==============================================================================
+/*static int V2dPlaneTrihedron (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  if (argc != 2)
+  {
+    cout << argv[0] << " error" << endl;
+    return 1;
+  }
+  
+  Standard_Integer myCurrentIndex;
+  TheAIS2DContext()->CloseAllContexts();
+  TheAIS2DContext()->OpenLocalContext(Standard_False);
+  myCurrentIndex = TheAIS2DContext()->IndexOfCurrentLocal();
+  
+  QAViewer2dTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName it (GetMapOfAIS2D());
+  while (it.More())
+  {
+    Handle(AIS2D_InteractiveObject) ShapeA = it.Key1();
+    if (ShapeA->Type() == AIS2D_KOI_Datum && ShapeA->Signature() == 3)
+    {
+      Handle(AIS2D_Trihedron) TrihedronA = ((*(Handle(AIS2D_Trihedron)*)&ShapeA));
+      TheAIS2DContext()->Load(TrihedronA,0,Standard_False);
+      TheAIS2DContext()->Activate(TrihedronA,3);
+    }
+    it.Next();
+  }
+  
+  cout<<" Select a plane."<<endl;
+  Standard_Integer argccc = 5;
+  char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" };
+  char **argvvv = bufff;
+  while (ViewerMainLoop2d(argccc, argvvv)) {}
+  
+  Handle(AIS2D_InteractiveObject) theIOB;
+  for (TheAIS2DContext()->InitSelected();
+       TheAIS2DContext()->MoreSelected(); TheAIS2DContext()->NextSelected())
+  {
+    theIOB = TheAIS2DContext()->Interactive();
+  }
+  Handle(AIS2D_Plane) PlaneB = ((*(Handle(AIS2D_Plane)*)&theIOB));
+
+  TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+
+  // Construction de l'AIS2D_Plane
+  //gp_Pnt A,B,C;
+  //Handle(Geom_Plane) theGeomPlane;
+  //PlaneB->PlaneAttributes(theGeomPlane,A,B,C);
+  //Handle(AIS2D_PlaneTrihedron) theAIS2DPlaneTri= new AIS2D_PlaneTrihedron(theGeomPlane );
+
+  // on le display & bind
+  TheAIS2DContext()->Display(PlaneB);
+  GetMapOfAIS2D().Bind(PlaneB, argv[1]);
+  
+  return 0; 
+}*/
+
+//==============================================================================
+// Fonction        First click      2de click
+// 
+// v2daxis           vertex           vertex
+//                   edge             None
+// v2daxispara       edge             vertex
+// v2daxisortho      edge             Vertex
+// v2daxisinter      Face             Face
+//==============================================================================
+
+//==============================================================================
+//function : V2dAxisBuilder
+//purpose  : 
+//Draw arg : v2daxis AxisName Xa Ya Xb Yb
+//==============================================================================
+static int V2dAxisBuilder (Draw_Interpretor& , Standard_Integer argc, char** argv) 
+{
+  Standard_Boolean HasArg;
+  TCollection_AsciiString name;
+  Standard_Integer MyCurrentIndex;
+  
+  if (argc < 2 || argc > 6)
+  {
+    cout << " Syntaxe error" << endl;
+    return 1;
+  }
+  if (argc == 6) HasArg = Standard_True;
+  else HasArg = Standard_False;
+  
+  name = argv[1];
+  TheAIS2DContext()->CloseAllContext();
+  
+  Handle(V2d_View) V = QAViewer2dTest::CurrentView();
+
+  if (HasArg)
+  {
+    Standard_Real coord [4];
+    for (Standard_Integer i = 0; i <= 3; i++)
+    {
+      coord[i] = atof(argv[2+i]);
+    }
+//    gp_Pnt2d p1 (coord[0],coord[1]);
+//    gp_Pnt2d p2 (coord[2],coord[3]);
+    
+    Handle(Graphic2d_GraphicObject) obj =
+      new Graphic2d_GraphicObject(V->View());
+
+    Handle(Graphic2d_InfiniteLine) line = new Graphic2d_InfiniteLine
+      (obj, coord[0], coord[1], coord[2] - coord[0], coord[3] - coord[1]);
+
+    obj->Display();
+    V->Viewer()->Update();
+//    gp_Vec2d myVect (p1, p2);
+//    Handle(Geom2d_Line) myLine = new Geom2d_Line(p1, myVect);
+//    Handle(AIS2D_Axis) TheAxis = new AIS2D_Axis(myLine);
+//    GetMapOfAIS2D().Bind(TheAxis,name);
+//    TheAIS2DContext()->Display(TheAxis);
+  }
+  else
+  {
+    // fonction vaxis
+    // Purpose: Teste le constructeur AIS2D_Axis::AIS2D_Axis (x:Axis1Placement from Geom)
+    if (!strcasecmp(argv[0], "v2daxis"))
+    {
+      TheAIS2DContext()->OpenLocalContext();
+      MyCurrentIndex = TheAIS2DContext()->IndexOfCurrentLocal();
+      
+      // Active le mode edge et le mode vertex
+//      TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(1));
+//      TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(2));
+      cout << " Select an edge or a vertex." << endl;
+      
+      TopoDS_Shape ShapeA = SelectShape2d(5);
+      
+      if (ShapeA.ShapeType() == TopAbs_VERTEX)
+      {
+//	TheAIS2DContext()->DeactivateStandardMode(AIS2D_ProjShape::SelectionType(2));
+	cout << " Select a different vertex." << endl;
+	
+	TopoDS_Shape ShapeB;
+	do
+        {
+          ShapeB = SelectShape2d(5);
+        } while (ShapeB.IsSame(ShapeA));
+	
+	TheAIS2DContext()->CloseLocalContext(MyCurrentIndex);
+	
+	// Construction de l'axe 
+	gp_Pnt A = BRep_Tool::Pnt(TopoDS::Vertex(ShapeA));
+	gp_Pnt B = BRep_Tool::Pnt(TopoDS::Vertex(ShapeB));
+	gp_Vec aV (A,B);
+	gp_Dir D (aV);
+	Handle(Geom_Axis1Placement) OrigineAndVect = new Geom_Axis1Placement(A,D);
+//	Handle(AIS2D_Axis) TheAxis = new AIS2D_Axis(OrigineAndVect);
+//	GetMapOfAIS2D().Bind(TheAxis,name);
+//	TheAIS2DContext()->Display(TheAxis);
+      } 
+      else
+      {
+	// Un unique edge (ShapeA) a ete picke
+	// Fermeture du context local
+	TheAIS2DContext()->CloseLocalContext(MyCurrentIndex);
+	// Constuction de l'axe 
+	TopoDS_Edge    ed = TopoDS::Edge(ShapeA);
+	TopoDS_Vertex  Va,Vb;
+	TopExp::Vertices(ed,Va,Vb );
+	gp_Pnt A = BRep_Tool::Pnt(Va);
+	gp_Pnt B = BRep_Tool::Pnt(Vb);
+	gp_Vec aV (A,B);
+	gp_Dir D (aV);
+	Handle(Geom_Axis1Placement) OrigineAndVect = new Geom_Axis1Placement(A,D);
+//	Handle(AIS2D_Axis) TheAxis = new AIS2D_Axis(OrigineAndVect);
+//	GetMapOfAIS2D().Bind(TheAxis,name);
+//	TheAIS2DContext()->Display(TheAxis);
+      }
+    }
+
+    // Fonction axispara
+    // Purpose: Teste le constructeur AIS2D_Axis::AIS2D_Axis(x: Axis2Placement from Geom, y: TypeOfAxis from AIS2D)
+    else if (!strcasecmp(argv[0], "v2daxispara"))
+    {
+      TheAIS2DContext()->OpenLocalContext();
+      MyCurrentIndex = TheAIS2DContext()->IndexOfCurrentLocal();
+      
+      TopoDS_Shape ShapeA = SelectShape2d(2); // Edge
+      TopoDS_Shape ShapeB = SelectShape2d(1); // Vertex
+
+      // Fermeture du context local
+      TheAIS2DContext()->CloseLocalContext(MyCurrentIndex);
+      
+      // Construction de l'axe
+      TopoDS_Edge ed = TopoDS::Edge(ShapeA);
+      gp_Pnt B = BRep_Tool::Pnt(TopoDS::Vertex(ShapeB));
+      TopoDS_Vertex Va,Vc;
+      TopExp::Vertices(ed,Va,Vc);
+      gp_Pnt A = BRep_Tool::Pnt(Va);
+      gp_Pnt C = BRep_Tool::Pnt(Vc);
+      gp_Vec aV (A,C);
+      gp_Dir D (aV);
+      Handle(Geom_Axis1Placement) OrigineAndVect = new Geom_Axis1Placement(B,D);
+//      Handle(AIS2D_Axis) TheAxis = new AIS2D_Axis(OrigineAndVect);
+//      GetMapOfAIS2D().Bind(TheAxis,name);
+//      TheAIS2DContext()->Display(TheAxis);
+    }
+    else // Fonction axisortho
+    {
+      TheAIS2DContext()->OpenLocalContext();
+      MyCurrentIndex = TheAIS2DContext()->IndexOfCurrentLocal();
+      
+      TopoDS_Shape ShapeA = SelectShape2d(2); // Edge
+      TopoDS_Shape ShapeB = SelectShape2d(1); // Vertex
+
+      // Fermeture du context local
+      TheAIS2DContext()->CloseLocalContext(MyCurrentIndex);
+      
+      // Construction de l'axe
+      TopoDS_Edge ed = TopoDS::Edge(ShapeA);
+      gp_Pnt B = BRep_Tool::Pnt(TopoDS::Vertex(ShapeB));
+      TopoDS_Vertex Va,Vc;
+      TopExp::Vertices(ed,Va,Vc);
+      gp_Pnt A = BRep_Tool::Pnt(Va);
+      gp_Pnt C = BRep_Tool::Pnt(Vc);
+      gp_Pnt E (A.Y()+A.Z()-C.Y()-C.Z(), C.X()-A.X(), C.X()-A.X());
+      // W = AE est un vecteur orthogonal a AC
+      gp_Vec aV (A,E);
+      gp_Dir D (aV);
+      Handle(Geom_Axis1Placement) OrigineAndVect = new Geom_Axis1Placement(B,D);
+//      Handle(AIS2D_Axis) TheAxis = new AIS2D_Axis(OrigineAndVect);
+//      GetMapOfAIS2D().Bind(TheAxis,name);
+//      TheAIS2DContext()->Display(TheAxis);
+    }
+  }
+
+  return 0;
+}
+
+//==============================================================================
+// Fonction        First click      Result
+// 
+// vpoint          vertex           AIS2D_Point=Vertex
+//                 edge             AIS2D_Point=Middle of the edge
+//==============================================================================
+
+#if 0
+//==============================================================================
+//function : V2dPointBuilder
+//purpose  : Build an AIS2D_Point from coordinates or with a selected vertex or edge
+//Draw arg : v2dpoint PoinName [Xa] [Ya]
+//==============================================================================
+static int V2dPointBuilder (Draw_Interpretor& , Standard_Integer argc, char** argv) 
+{
+  // Declarations
+  Standard_Boolean HasArg;
+  TCollection_AsciiString name;
+  Standard_Integer myCurrentIndex;
+  
+  // Verification
+  if (argc < 2 || argc > 4 )
+  {
+    cout << " Syntaxe error" << endl;
+    return 1;
+  }
+  if (argc == 4) HasArg = Standard_True;
+  else HasArg = Standard_False;
+  
+  name = argv[1];
+  // Fermeture des contextes
+  TheAIS2DContext()->CloseAllContext();
+  
+  // Il y a des arguments: teste l'unique constructeur AIS2D_Pnt::AIS2D_Pnt(Point from Geom)
+  if (HasArg)
+  {
+    Standard_Real thecoord[3];
+    for (Standard_Integer i = 0; i <= 2; i++) thecoord[i] = atof(argv[2+i]);
+    Handle(Geom2d_CartesianPoint) myGeomPoint = new Geom2d_CartesianPoint(thecoord[0],thecoord[1]);
+//    Handle(AIS2D_Point) myAIS2DPoint = new AIS2D_Point(myGeomPoint);
+//    GetMapOfAIS2D().Bind(myAIS2DPoint, name);
+//    TheAIS2DContext()->Display(myAIS2DPoint);
+  }
+  else // Il n'a pas d'arguments
+  {
+    TheAIS2DContext()->OpenLocalContext();
+    myCurrentIndex = TheAIS2DContext()->IndexOfCurrentLocal();
+    
+//    TheAIS2DContext()->ActivateStandardMode (AIS2D_ProjShape::SelectionType(1));
+//    TheAIS2DContext()->ActivateStandardMode (AIS2D_ProjShape::SelectionType(2));
+    cout << " Select a vertex or an edge (build the middle)" << endl;
+    TopoDS_Shape ShapeA = SelectShape2d(5);
+
+    if (ShapeA.ShapeType() == TopAbs_VERTEX)
+    {
+      TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+      
+      // Construction du point
+      gp_Pnt A = BRep_Tool::Pnt(TopoDS::Vertex(ShapeA));
+      Handle(Geom_CartesianPoint) myGeomPoint = new Geom_CartesianPoint(A);
+//      Handle(AIS2D_Point) myAIS2DPoint = new AIS2D_Point(myGeomPoint);
+//      GetMapOfAIS2D().Bind(myAIS2DPoint,name);
+//      TheAIS2DContext()->Display(myAIS2DPoint);
+    }
+    else
+    {
+      // Un Edge a ete selectionne
+      // Fermeture du context local
+      TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+      
+      // Construction du point milieu de l'edge
+      TopoDS_Edge myEdge = TopoDS::Edge(ShapeA);
+      TopoDS_Vertex myVertexA,myVertexB;
+      TopExp::Vertices (myEdge, myVertexA, myVertexB);
+      gp_Pnt A = BRep_Tool::Pnt(myVertexA);
+      gp_Pnt B = BRep_Tool::Pnt(myVertexB);
+
+      Handle(Geom_CartesianPoint) myGeomPointM =
+        new Geom_CartesianPoint((A.X()+B.X())/2, (A.Y()+B.Y())/2, (A.Z()+B.Z())/2);
+//      Handle(AIS2D_Point) myAIS2DPointM = new AIS2D_Point(myGeomPointM);
+//      GetMapOfAIS2D().Bind(myAIS2DPointM, name);
+//      TheAIS2DContext()->Display(myAIS2DPointM);
+    }
+  }
+
+  return 0;
+}
+#endif
+
+//==============================================================================
+// Fonction        1st click   2de click  3de click   
+// v2dplane          Vertex      Vertex     Vertex
+//                   Vertex      Edge
+//                   Edge        Vertex
+//                   Face
+// v2dplanepara      Face        Vertex
+//                   Vertex      Face
+// v2dplaneortho     Face        Edge
+//                   Edge        Face
+//==============================================================================
+
+//==============================================================================
+//function : V2dPlaneBuilder
+//purpose  : Build an AIS2D_Plane from selected entities or Named AIs components
+//Draw arg : v2dplane PlaneName [AxisName]  [PointName]
+//                              [PointName] [PointName] [PointName]
+//                              [PlaneName] [PointName]
+//==============================================================================
+/*#include <BRepExtrema_ExtPC.hxx>
+#include <BRepExtrema_ExtPF.hxx>
+#include <BRepAdaptor_Surface.hxx>
+#include <gp_Pln.hxx>
+#include <GC_MakePlane.hxx>
+static int V2dPlaneBuilder (Draw_Interpretor& , Standard_Integer argc, char** argv) 
+{
+  Standard_Boolean HasArg;
+  TCollection_AsciiString name;
+  Standard_Integer myCurrentIndex;
+  
+  if (argc < 2 || argc > 5)
+  {
+    cout << " Syntaxe error" << endl;
+    return 1;
+  }
+
+  if (argc == 5 || argc == 4) HasArg = Standard_True;
+  else HasArg = Standard_False;
+  
+  name = argv[1];
+  TheAIS2DContext()->CloseAllContexts();
+  
+  if (HasArg)
+  {
+    if (!GetMapOfAIS2D().IsBound2(argv[2]))
+    {
+      cout << "v2dplane: error 1st name doesn't exist in the GetMapOfAIS2D()." << endl;
+      return 1;
+    }
+    Handle(AIS2D_InteractiveObject) theShapeA = GetMapOfAIS2D().Find2(argv[2]);
+    
+    if (theShapeA->Type() == AIS2D_KOI_Datum && theShapeA->Signature() == 1)
+    {
+      if (argc < 5 || !GetMapOfAIS2D().IsBound2(argv[3]))
+      {
+        cout << "v2dplane: error 2de name doesn't exist in the GetMapOfAIS2D()." << endl;
+        return 1;
+      }
+      Handle(AIS2D_InteractiveObject) theShapeB = GetMapOfAIS2D().Find2(argv[3]);
+      if (!(theShapeB->Type() == AIS2D_KOI_Datum && theShapeB->Signature() == 1))
+      {
+        cout << "v2dplane: error 2de object is expected to be an AIS2D_Point. " << endl;
+        return 1;
+      }
+      if (!GetMapOfAIS2D().IsBound2(argv[4]))
+      {
+        cout << "v2dplane: error 3de name doesn't exist in the GetMapOfAIS2D()." << endl;
+        return 1;
+      }
+      Handle(AIS2D_InteractiveObject) theShapeC = GetMapOfAIS2D().Find2(argv[4]);
+      if (!(theShapeC->Type() == AIS2D_KOI_Datum && theShapeC->Signature() == 1))
+      {
+        cout << "v2dplane: error 3de object is expected to be an AIS2D_Point. " << endl;
+        return 1;
+      }
+
+      Handle(AIS2D_Point) theAIS2DPointA = *(Handle(AIS2D_Point)*)& theShapeA;
+      Handle(AIS2D_Point) theAIS2DPointB = *(Handle(AIS2D_Point)*)& theShapeB;
+      Handle(AIS2D_Point) theAIS2DPointC = *(Handle(AIS2D_Point)*)& theShapeC;
+      
+      Handle(Geom_Point) myGeomPointA = theAIS2DPointA->Component();
+      Handle(Geom_CartesianPoint) myCartPointA = *((Handle(Geom_CartesianPoint)*)& myGeomPointA);
+
+      Handle(Geom_Point) myGeomPointB = theAIS2DPointB->Component();
+      Handle(Geom_CartesianPoint) myCartPointB= *((Handle(Geom_CartesianPoint)*)& theAIS2DPointB);
+
+      Handle(Geom_Point) myGeomPointBC = theAIS2DPointC->Component();
+      Handle(Geom_CartesianPoint) myCartPointC = *((Handle(Geom_CartesianPoint)*)& theAIS2DPointC);
+
+      if (myCartPointB->X() == myCartPointA->X() &&
+          myCartPointB->Y() == myCartPointA->Y() && myCartPointB->Z() == myCartPointA->Z())
+      {
+	// B=A
+	cout << "v2dplane error: same points" << endl;
+        return 1;
+      }
+      if (myCartPointC->X() == myCartPointA->X() &&
+          myCartPointC->Y() == myCartPointA->Y() && myCartPointC->Z() == myCartPointA->Z())
+      {
+	// C=A
+	cout << "v2dplane error: same points" << endl;
+        return 1;
+      }
+      if (myCartPointC->X() == myCartPointB->X() &&
+          myCartPointC->Y() == myCartPointB->Y() && myCartPointC->Z() == myCartPointB->Z())
+      {
+	// C=B
+	cout << "v2dplane error: same points" << endl;
+        return 1;
+      }
+      
+      gp_Pnt A = myCartPointA->Pnt();
+      gp_Pnt B = myCartPointB->Pnt();
+      gp_Pnt C = myCartPointC->Pnt();
+      
+      // Construction de l'AIS2D_Plane
+      GC_MakePlane MkPlane (A,B,C);
+      Handle(Geom_Plane) myGeomPlane = MkPlane.Value();
+      Handle(AIS2D_Plane) myAIS2DPlane = new AIS2D_Plane(myGeomPlane);
+      GetMapOfAIS2D().Bind(myAIS2DPlane, name);
+      TheAIS2DContext()->Display(myAIS2DPlane);
+    }
+
+    else if (theShapeA->Type() == AIS2D_KOI_Datum && theShapeA->Signature() == 2)
+    {
+      if (argc != 4 || !GetMapOfAIS2D().IsBound2(argv[3]))
+      {
+        cout << "v2dplane: error 2de name doesn't exist in the GetMapOfAIS2D()." << endl;
+        return 1;
+      }
+      Handle(AIS2D_InteractiveObject) theShapeB = GetMapOfAIS2D().Find2(argv[3]);
+      if (!(theShapeB->Type() == AIS2D_KOI_Datum && theShapeB->Signature() == 1))
+      {
+        cout << "v2dplane: error 2de object is expected to be an AIS2D_Point." << endl;
+        return 1;
+      }
+
+      Handle(AIS2D_Axis) theAIS2DAxisA = *(Handle(AIS2D_Axis)*)& theShapeA;
+      Handle(AIS2D_Point) theAIS2DPointB = *(Handle(AIS2D_Point)*)& theShapeB;
+      
+      Handle(Geom_Line) myGeomLineA = theAIS2DAxisA->Component();
+      Handle(Geom_Point) myGeomPointB = theAIS2DPointB->Component();
+      
+      gp_Ax1 myAxis = myGeomLineA->Position();
+      Handle(Geom_CartesianPoint) myCartPointB = *(Handle(Geom_CartesianPoint)*)& myGeomPointB;
+      
+      gp_Dir D = myAxis.Direction();
+      gp_Pnt B = myCartPointB->Pnt();
+      
+      // Construction de l'AIS2D_Plane
+      Handle(Geom_Plane) myGeomPlane = new Geom_Plane(B,D);
+      Handle(AIS2D_Plane)  myAIS2DPlane = new AIS2D_Plane(myGeomPlane,B);
+      GetMapOfAIS2D().Bind(myAIS2DPlane, name);
+      TheAIS2DContext()->Display(myAIS2DPlane);
+    }
+    else if (theShapeA->Type() == AIS2D_KOI_Datum && theShapeA->Signature() == 7)
+    {
+      if (argc != 4 || !GetMapOfAIS2D().IsBound2(argv[3]))
+      {
+        cout << "vplane: error 2de name doesn't exist in the GetMapOfAIS2D()." << endl;
+        return 1;
+      }
+      Handle(AIS2D_InteractiveObject) theShapeB = GetMapOfAIS2D().Find2(argv[3]);
+      if (!(theShapeB->Type() == AIS2D_KOI_Datum && theShapeB->Signature() == 1))
+      {
+        cout << "vplane: error 2de object is expected to be an AIS2D_Point." << endl;
+        return 1;
+      }
+      
+      Handle(AIS2D_Plane) theAIS2DPlaneA = *(Handle(AIS2D_Plane)*)& theShapeA;
+      Handle(AIS2D_Point) theAIS2DPointB = *(Handle(AIS2D_Point)*)& theShapeB;
+      
+      Handle(Geom_Plane) theNewGeomPlane = theAIS2DPlaneA->Component();
+      Handle(Geom_Point) myGeomPointB = theAIS2DPointB->Component();
+      
+      Handle(Geom_CartesianPoint) myCartPointB = *(Handle(Geom_CartesianPoint)*)& myGeomPointB;
+      gp_Pnt B = myCartPointB->Pnt();
+      
+      // Construction de l'AIS2D_Plane
+      Handle(AIS2D_Plane) myAIS2DPlane = new AIS2D_Plane(theNewGeomPlane,B);
+      GetMapOfAIS2D().Bind(myAIS2DPlane, name);
+      TheAIS2DContext()->Display(myAIS2DPlane);
+    }
+    else
+    {
+      cout << "v2dplane: error 1st object is not an AIS2D." << endl;
+      return 1;
+    }
+  }
+  else
+  {
+    if (!strcasecmp(argv[0] ,"v2dplane"))
+    {
+      TheAIS2DContext()->OpenLocalContext();
+      myCurrentIndex = TheAIS2DContext()->IndexOfCurrentLocal();
+      
+      TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(1));
+      TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(2));
+      cout << "Select a vertex, a face or an edge." << endl;
+      ShapeA = SelectShape2d(5); // User-defined mode
+      TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(4));
+
+      if (ShapeA.ShapeType() == TopAbs_VERTEX)
+      {
+	TheAIS2DContext()->DeactivateStandardMode(AIS2D_ProjShape::SelectionType(4));
+	cout << " Select an edge or a different vertex." << endl;
+        TopoDS_Shape ShapeB = SelectShape2d(5);
+
+	if (ShapeB.ShapeType() == TopAbs_VERTEX)
+        {
+	  if (ShapeB.IsSame(ShapeA))
+          {
+            cout << " v2dplane: error, same points selected" << endl;
+            return 1;
+          }
+	  TheAIS2DContext()->DeactivateStandardMode(AIS2D_ProjShape::SelectionType(2));
+	  cout<<" Select a different vertex."<<endl;
+          TopoDS_Shape ShapeC = SelectShape2d(5);
+
+	  if (ShapeC.IsSame(ShapeA) || ShapeC.IsSame(ShapeB))
+          {
+            cout << " v2dplane: error, same points selected" << endl;
+            return 1;
+          }
+	  
+	  TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+	  
+	  // Construction du plane 
+	  gp_Pnt A = BRep_Tool::Pnt(TopoDS::Vertex(ShapeA));
+	  gp_Pnt B = BRep_Tool::Pnt(TopoDS::Vertex(ShapeB));
+	  gp_Pnt C = BRep_Tool::Pnt(TopoDS::Vertex(ShapeC));
+	  GC_MakePlane MkPlane (A,B,C);
+	  Handle(Geom_Plane) theGeomPlane = MkPlane.Value();
+	  Handle(AIS2D_Plane) myAIS2DPlane = new AIS2D_Plane(theGeomPlane);
+	  GetMapOfAIS2D().Bind(myAIS2DPlane, name);
+	  TheAIS2DContext()->Display(myAIS2DPlane);
+	}
+	else // ShapeB est un edge
+        {
+	  TopoDS_Edge EdgeB = TopoDS::Edge(ShapeB);
+	  TopoDS_Vertex VertA = TopoDS::Vertex(ShapeA);
+	  
+	  BRepExtrema_ExtPC OrthoProj (VertA, EdgeB);
+	  if (OrthoProj.Value(1) < 0.001)
+          {
+	    cout << " v2dplane: error point is on the edge." << endl;
+            return 1;
+	  }
+	  else
+          {
+	    TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+	    // Construction du plane 
+	    gp_Pnt A = BRep_Tool::Pnt(VertA);
+	    TopoDS_Vertex VBa, VBb;
+	    TopExp::Vertices(EdgeB, VBa, VBb);
+	    gp_Pnt Ba = BRep_Tool::Pnt(VBa);
+	    gp_Pnt Bb = BRep_Tool::Pnt(VBb);
+	    GC_MakePlane MkPlane (A,Ba,Bb);
+	    Handle(Geom_Plane) theGeomPlane = MkPlane.Value();
+	    Handle(AIS2D_Plane) myAIS2DPlane = new AIS2D_Plane(theGeomPlane);
+	    GetMapOfAIS2D().Bind(myAIS2DPlane, name);
+	    TheAIS2DContext()->Display(myAIS2DPlane);
+	  }
+	}
+      }
+      else if (ShapeA.ShapeType() == TopAbs_EDGE)
+      {
+	TheAIS2DContext()->DeactivateStandardMode(AIS2D_ProjShape::SelectionType(4));
+	TheAIS2DContext()->DeactivateStandardMode(AIS2D_ProjShape::SelectionType(2));
+	cout << " Select a vertex that don't belong to the edge." << endl;
+        TopoDS_Shape ShapeB = SelectShape2d(5);
+
+	TopoDS_Edge EdgeA = TopoDS::Edge(ShapeA);
+	TopoDS_Vertex VertB = TopoDS::Vertex(ShapeB);
+	  
+	BRepExtrema_ExtPC OrthoProj (VertB,EdgeA);
+	if (OrthoProj.Value(1) < 0.001)
+        {
+	  cout << " v2dplane: error point is on the edge." << endl;
+          return 1;
+	}
+	else
+        {
+	  TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+	  // Construction du plane 
+	  gp_Pnt B = BRep_Tool::Pnt(VertB);
+	  TopoDS_Vertex VAa, VAb;
+	  TopExp::Vertices(EdgeA, VAa, VAb);
+	  gp_Pnt Aa = BRep_Tool::Pnt(VAa);
+	  gp_Pnt Ab = BRep_Tool::Pnt(VAb);
+	  GC_MakePlane MkPlane (B,Aa,Ab);
+	  Handle(Geom_Plane) theGeomPlane = MkPlane.Value();
+	  Handle(AIS2D_Plane) myAIS2DPlane = new AIS2D_Plane(theGeomPlane);
+	  GetMapOfAIS2D().Bind(myAIS2DPlane, name);
+	  TheAIS2DContext()->Display(myAIS2DPlane);
+	}
+      }
+      else // ShapeA est une Face
+      {
+	TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+	// Construction du plane 
+	TopoDS_Face myFace = TopoDS::Face(ShapeA);
+	BRepAdaptor_Surface mySurface (myFace, Standard_False);
+	if (mySurface.GetType() == GeomAbs_Plane)
+        {
+	  gp_Pln myPlane = mySurface.Plane();
+	  Handle(Geom_Plane) theGeomPlane = new Geom_Plane(myPlane);
+	  Handle(AIS2D_Plane) myAIS2DPlane = new AIS2D_Plane(theGeomPlane);
+	  GetMapOfAIS2D().Bind(myAIS2DPlane, name);
+	  TheAIS2DContext()->Display(myAIS2DPlane);
+	}
+	else
+        {
+	  cout << " v2dplane: error" << endl;
+          return 1;
+	}
+      }
+    }
+    else if (!strcasecmp(argv[0], "v2dplanepara"))
+    {
+      TheAIS2DContext()->OpenLocalContext();
+      myCurrentIndex = TheAIS2DContext()->IndexOfCurrentLocal();
+      
+      TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(1));
+      TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(4));
+      cout << " Select a vertex or a face." << endl;
+      TopoDS_Shape ShapeA = SelectShape2d(5);
+
+      if (ShapeA.ShapeType() == TopAbs_VERTEX)
+      {
+	TheAIS2DContext()->DeactivateStandardMode(AIS2D_ProjShape::SelectionType(1));
+	cout<<" Select a face."<<endl;
+        TopoDS_Shape ShapeB = SelectShape2d(5);
+	
+	TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+	
+	// Construction du plane 
+	gp_Pnt A = BRep_Tool::Pnt(TopoDS::Vertex(ShapeA));
+	
+	TopoDS_Face myFace = TopoDS::Face(ShapeB);
+	BRepAdaptor_Surface mySurface (myFace, Standard_False);
+	if (mySurface.GetType() == GeomAbs_Plane)
+        {
+	  gp_Pln myPlane = mySurface.Plane();
+	  myPlane.SetLocation(A);
+	  Handle(Geom_Plane) theGeomPlane = new Geom_Plane(myPlane);
+	  Handle(AIS2D_Plane) myAIS2DPlane = new AIS2D_Plane(theGeomPlane, A);
+	  GetMapOfAIS2D().Bind(myAIS2DPlane, name);
+	  TheAIS2DContext()->Display(myAIS2DPlane);
+	}
+	else
+        {
+	  cout << " vplane: error" << endl;
+          return 1;
+	}
+      }
+      else
+      {
+	TheAIS2DContext()->DeactivateStandardMode(AIS2D_ProjShape::SelectionType(4));
+	cout<<" Select a vertex."<<endl;
+        TopoDS_Shape ShapeB = SelectShape2d(5);
+
+	TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+
+	// Construction du plane 
+	gp_Pnt B = BRep_Tool::Pnt(TopoDS::Vertex(ShapeB ) );
+
+	TopoDS_Face myFace = TopoDS::Face(ShapeA);
+	BRepAdaptor_Surface mySurface (myFace, Standard_False);
+	if (mySurface.GetType() == GeomAbs_Plane)
+        {
+	  gp_Pln myPlane = mySurface.Plane();
+	  myPlane.SetLocation(B);
+	  Handle(Geom_Plane) theGeomPlane = new Geom_Plane(myPlane);
+	  Handle(AIS2D_Plane) myAIS2DPlane = new AIS2D_Plane(theGeomPlane, B);
+	  GetMapOfAIS2D().Bind(myAIS2DPlane, name);
+	  TheAIS2DContext()->Display(myAIS2DPlane);
+	}
+	else
+        {
+	  cout << " v2dplane: error" << endl;
+          return 1;
+	}
+      }
+    }
+    else // Fonction v2dplaneortho
+    {
+      TheAIS2DContext()->OpenLocalContext();
+      myCurrentIndex = TheAIS2DContext()->IndexOfCurrentLocal();
+      
+      TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(2));
+      TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(4));
+      cout << " Select a face and an edge coplanar." << endl;
+      TopoDS_Shape ShapeA = SelectShape2d(5);
+      
+      if (ShapeA.ShapeType() == TopAbs_EDGE)
+      {
+	// ShapeA est un edge, on desactive le mode edge...
+	TheAIS2DContext()->DeactivateStandardMode(AIS2D_ProjShape::SelectionType(2));
+	cout<<" Select a face."<<endl;
+        TopoDS_Shape ShapeB = SelectShape2d(5);
+	
+	TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+	
+	// Construction du plane 
+	TopoDS_Edge EdgeA = TopoDS::Edge(ShapeA);
+	TopoDS_Vertex VAa, VAb;
+
+	TopExp::Vertices(EdgeA, VAa, VAb);
+	gp_Pnt Aa = BRep_Tool::Pnt(VAa);
+	gp_Pnt Ab = BRep_Tool::Pnt(VAb);
+	gp_Vec ab (Aa,Ab);
+	
+	gp_Dir Dab (ab);
+	// Creation de mon axe de rotation 
+	gp_Ax1 myRotAxis (Aa,Dab); 
+	
+	TopoDS_Face myFace = TopoDS::Face(ShapeB);
+	BRepExtrema_ExtPF myHauteurA (VAa, myFace);
+	BRepExtrema_ExtPF myHauteurB (VAb, myFace);
+	if (fabs(myHauteurA.Value(1) - myHauteurB.Value(1) ) > 0.1)
+        {
+	   cout << " v2dplaneOrtho error: l'edge n'est pas parallele a la face." << endl;
+           return 1;
+	}
+	BRepAdaptor_Surface mySurface (myFace, Standard_False);
+	if (mySurface.GetType() == GeomAbs_Plane)
+        {
+	  gp_Pln myPlane = mySurface.Plane();
+	  myPlane.Rotate(myRotAxis, M_PI/2);
+	  
+	  Handle(Geom_Plane) theGeomPlane = new Geom_Plane(myPlane);
+	  gp_Pnt theMiddle ((Aa.X()+Ab.X())/2, (Aa.Y()+Ab.Y())/2, (Aa.Z()+Ab.Z())/2);
+	  Handle(AIS2D_Plane) myAIS2DPlane = new AIS2D_Plane(theGeomPlane, theMiddle);
+	  GetMapOfAIS2D().Bind(myAIS2DPlane, name);
+	  TheAIS2DContext()->Display(myAIS2DPlane);
+	  
+	}
+	else
+        {
+	  cout << " v2dplaneOrtho: error" << endl;
+          return 1;
+	}
+      }
+      else
+      {
+	TheAIS2DContext()->DeactivateStandardMode(AIS2D_ProjShape::SelectionType(4));
+	cout << " Select an edge." << endl;
+        TopoDS_Shape ShapeB = SelectShape2d(5);
+	
+	// Fermeture du context local
+	TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+	
+	// Construction du plane 
+	TopoDS_Edge EdgeB = TopoDS::Edge(ShapeB);
+	TopoDS_Vertex VBa, VBb;
+	TopExp::Vertices(EdgeB, VBa, VBb);
+	gp_Pnt Ba = BRep_Tool::Pnt(VBa);
+	gp_Pnt Bb = BRep_Tool::Pnt(VBb);
+	gp_Vec ab  (Ba,Bb);
+	gp_Dir Dab (ab);
+	// Creation de mon axe de rotation 
+	gp_Ax1 myRotAxis (Ba,Dab); 
+	
+	TopoDS_Face myFace = TopoDS::Face(ShapeA);
+	BRepExtrema_ExtPF myHauteurA (VBa, myFace);
+	BRepExtrema_ExtPF myHauteurB (VBb, myFace);
+
+	if (fabs(myHauteurA.Value(1) - myHauteurB.Value(1) ) > 0.1)
+        {
+          cout << " v2dplaneOrtho error: l'edge n'est pas parallele a la face." << endl;
+          return 1;
+	}
+	BRepAdaptor_Surface mySurface (myFace, Standard_False);
+	if (mySurface.GetType() == GeomAbs_Plane)
+        {
+	  gp_Pln myPlane = mySurface.Plane();
+	  myPlane.Rotate(myRotAxis, M_PI/2);
+	  Handle(Geom_Plane) theGeomPlane = new Geom_Plane(myPlane);
+	  gp_Pnt theMiddle ((Ba.X()+Bb.X())/2, (Ba.Y()+Bb.Y())/2, (Ba.Z()+Bb.Z())/2);
+	  Handle(AIS2D_Plane) myAIS2DPlane = new AIS2D_Plane(theGeomPlane, theMiddle);
+	  GetMapOfAIS2D().Bind(myAIS2DPlane, name);
+	  TheAIS2DContext()->Display(myAIS2DPlane);
+	}
+	else
+        {
+	  cout << " v2dplaneOrtho: error" << endl;
+          return 1;
+	}
+      }
+    }
+  }
+
+  return 0;
+}*/
+
+//==============================================================================
+// Fonction  vline
+// ---------------  Uniquement par parametre. Pas de selection dans le viewer.
+//==============================================================================
+
+//==============================================================================
+//function : V2dLineBuilder
+//purpose  : Build a Graphic2d_Line
+//Draw arg : v2dline LineName [AIS2D_PointName] [AIS2D_PointName]
+//                            [Xa] [Ya] [Za]   [Xb] [Yb] [Zb]
+//==============================================================================
+/*static int V2dLineBuilder(Draw_Interpretor& , Standard_Integer argc, char** argv) 
+{
+  Standard_Integer myCurrentIndex;
+  if (argc != 4 && argc != 8 && argc != 2)
+  {
+    cout << "vline error: number of arguments not correct " << endl;
+    return 1;
+  }
+  TheAIS2DContext()->CloseAllContext();
+  
+  // On recupere les parametres
+  Handle(AIS2D_InteractiveObject) theShapeA;
+  Handle(AIS2D_InteractiveObject) theShapeB;
+  
+  // Parametres: AIS2D_Point AIS2D_Point
+  if (argc == 4)
+  {
+    theShapeA = GetMapOfAIS2D().Find2(argv[2] );
+    if (theShapeA->Type() == AIS2D_KOI_Datum && theShapeA->Signature() == 1)
+    {
+      theShapeB = GetMapOfAIS2D().Find2(argv[3]);
+      if (!(theShapeB->Type() == AIS2D_KOI_Datum && theShapeB->Signature() == 1))
+      {
+	cout << "v2dline error: wrong type of 2de argument." << endl;
+        return 1;
+      }
+    }
+    else
+    {
+      cout << "v2dline error: wrong type of 1st argument." << endl;
+      return 1;
+    }
+ 
+    Handle(AIS2D_Point) theAIS2DPointA = *(Handle(AIS2D_Point)*)& theShapeA;
+    Handle(AIS2D_Point) theAIS2DPointB = *(Handle(AIS2D_Point)*)& theShapeB;
+    
+    Handle(Geom_Point) myGeomPointBA = theAIS2DPointA->Component();
+    Handle(Geom_CartesianPoint) myCartPointA = *((Handle(Geom_CartesianPoint)*)& myGeomPointBA);
+
+    Handle(Geom_Point) myGeomPointB = theAIS2DPointB->Component();
+    Handle(Geom_CartesianPoint) myCartPointB = *((Handle(Geom_CartesianPoint)*)& myGeomPointB);
+    
+    if (myCartPointB->X() == myCartPointA->X() &&
+        myCartPointB->Y() == myCartPointA->Y() && myCartPointB->Z() == myCartPointA->Z())
+    {
+      // B=A
+      cout << "v2dline error: same points" << endl;
+      return 1;
+    }
+    Handle(AIS2D_Line) theAIS2DLine = new AIS2D_Line(myCartPointA, myCartPointB);
+    GetMapOfAIS2D().Bind(theAIS2DLine, argv[1]);
+    TheAIS2DContext()->Display(theAIS2DLine);
+  }
+  else if (argc == 8) // Parametres 6 Reals
+  {
+    Standard_Real coord[6];
+    for (Standard_Integer i = 0; i <= 2; i++)
+    {
+      coord[i] = atof(argv[2+i]);
+      coord[i+3] = atof(argv[5+i]);
+    }
+    
+    Handle(Geom_CartesianPoint) myCartPointA = new Geom_CartesianPoint(coord[0],coord[1],coord[2]);
+    Handle(Geom_CartesianPoint) myCartPointB = new Geom_CartesianPoint(coord[3],coord[4],coord[5]);
+    
+    Handle(AIS2D_Line) theAIS2DLine = new AIS2D_Line(myCartPointA, myCartPointB);
+    GetMapOfAIS2D().Bind(theAIS2DLine, argv[1]);
+    TheAIS2DContext()->Display(theAIS2DLine);
+  }
+  else
+  {
+    TheAIS2DContext()->OpenLocalContext();
+    myCurrentIndex = TheAIS2DContext()->IndexOfCurrentLocal();
+    
+    // Active le mode Vertex.
+    TopoDS_Shape ShapeA = SelectShape2d(1);
+    
+    if (ShapeA.ShapeType() == TopAbs_VERTEX)
+    {
+//      TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(1));
+      cout << " Select a different vertex." << endl;
+      
+      TopoDS_Shape ShapeB;
+      do
+      {
+        ShapeB = SelectShape2d(5);
+      } while (ShapeB.IsSame(ShapeA));
+      
+      TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+	
+      // Construction de la line
+      gp_Pnt A = BRep_Tool::Pnt(TopoDS::Vertex(ShapeA));
+      gp_Pnt B = BRep_Tool::Pnt(TopoDS::Vertex(ShapeB));
+      
+      Handle(Geom_CartesianPoint) myCartPointA = new Geom_CartesianPoint(A);
+      Handle(Geom_CartesianPoint) myCartPointB = new Geom_CartesianPoint(B);
+      
+      Handle(AIS2D_Line) theAIS2DLine = new AIS2D_Line(myCartPointA, myCartPointB);
+      GetMapOfAIS2D().Bind(theAIS2DLine, argv[1]);
+      TheAIS2DContext()->Display(theAIS2DLine);
+    }
+    else
+    {
+      cout << "v2dline error." << endl;
+    }
+  }
+  
+  return 0;
+}*/
+
+//==============================================================================
+//function : V2dCircleBuilder
+//purpose  : Build an Graphic2d_Circle 
+//Draw arg : v2dcircle CircleName X Y Radius [Color_index]
+//==============================================================================
+static int V2dCircleBuilder (Draw_Interpretor& , Standard_Integer argc, char** argv) 
+{
+  Standard_Integer myCurrentIndex;
+  // verification of the arguments
+  if (argc < 2)
+  {
+    cout << "Usage: v2dcircle CircleName X Y Radius [Color_index]" << endl;
+    return 1;
+  }
+  TheAIS2DContext()->CloseAllContext();
+  Handle(V2d_View) V = QAViewer2dTest::CurrentView();
+  
+  TCollection_AsciiString name = argv[1];
+
+  if (argc >= 5)
+  {
+//    Handle(AIS2D_InteractiveObject) theShapeA;
+//    Handle(AIS2D_InteractiveObject) theShapeB;
+//    theShapeA=GetMapOfAIS2D().Find2(argv[2]);
+//    theShapeB=GetMapOfAIS2D().Find2(argv[3]);
+    
+    // Arguments: AIS2D_Point AIS2D_Point AIS2D_Point
+    // ========================================
+/*    if (theShapeA->Type() == AIS2D_KOI_Datum && theShapeA->Signature() == 1)
+    {
+      if (theShapeB->Type() != AIS2D_KOI_Datum || theShapeB->Signature() != 1)
+      {
+	cout<<"vcircle error: 2de argument is unexpected to be a point."<<endl;return 1; 
+      }
+      Handle(AIS2D_InteractiveObject) theShapeC=GetMapOfAIS2D().Find2(argv[4]);
+      if (theShapeC->Type()!=AIS2D_KOI_Datum || theShapeC->Signature()!=1 ) {
+	cout<<"vcircle error: 3de argument is unexpected to be a point."<<endl;return 1; 
+      }
+      // tag
+      Handle(AIS2D_Point) theAIS2DPointA = *(Handle(AIS2D_Point)*)& theShapeA;
+      Handle(AIS2D_Point) theAIS2DPointB = *(Handle(AIS2D_Point)*)& theShapeB;
+      Handle(AIS2D_Point) theAIS2DPointC = *(Handle(AIS2D_Point)*)& theShapeC;
+      
+      Handle(Geom_Point) myGeomPointA = theAIS2DPointA->Component();
+      Handle(Geom_CartesianPoint) myCartPointA = *((Handle(Geom_CartesianPoint)*)& myGeomPointA);
+
+      Handle(Geom_Point ) myGeomPointB =  theAIS2DPointB->Component();
+      Handle(Geom_CartesianPoint ) myCartPointB= *((Handle(Geom_CartesianPoint)*)&  theAIS2DPointB);
+
+      Handle(Geom_Point ) myGeomPointBC=  theAIS2DPointC->Component();
+      Handle(Geom_CartesianPoint ) myCartPointC= *((Handle(Geom_CartesianPoint)*)&  theAIS2DPointC);
+    
+      // Test A=B
+      if (myCartPointA->X()==myCartPointB->X() && myCartPointA->Y()==myCartPointB->Y() && myCartPointA->Z()==myCartPointB->Z()  ) {
+	cout<<"vcircle error: Same points."<<endl;return 1; 
+      }
+      // Test A=C
+      if (myCartPointA->X()==myCartPointC->X() && myCartPointA->Y()==myCartPointC->Y() && myCartPointA->Z()==myCartPointC->Z()  ) {
+	cout<<"vcircle error: Same points."<<endl;return 1; 
+      }
+      // Test B=C
+      if (myCartPointB->X()==myCartPointC->X() && myCartPointB->Y()==myCartPointC->Y() && myCartPointB->Z()==myCartPointC->Z()  ) {
+	cout<<"vcircle error: Same points."<<endl;return 1; 
+      }
+      // Construction du cercle
+      GC_MakeCircle Cir=GC_MakeCircle (myCartPointA->Pnt(),myCartPointB->Pnt(),myCartPointC->Pnt() );
+      Handle (Geom_Circle) theGeomCircle=Cir.Value();
+      Handle(AIS2D_Circle) theAIS2DCircle=new AIS2D_Circle(theGeomCircle );
+      GetMapOfAIS2D().Bind(theAIS2DCircle,argv[1] );
+      TheAIS2DContext()->Display(theAIS2DCircle );
+    
+    }
+    // Arguments: ASI_Plane AIS2D_Point Real
+    // ===================================
+    else if (theShapeA->Type()==AIS2D_KOI_Datum && theShapeA->Signature()==7 ) {
+      if (theShapeB->Type()!=AIS2D_KOI_Datum || theShapeB->Signature()!=1 ) {
+	cout<<"vcircle error: 2de element is a unexpected to be a point."<<endl;return 1; 
+      }
+      // On verifie que le rayon est bien >=0
+      if (atof(argv[4])<=0 ) {cout<<"vcircle error: the radius must be >=0."<<endl;return 1;  }
+      
+      // On recupere la normale au Plane.
+      Handle(AIS2D_Plane) theAIS2DPlane= *(Handle(AIS2D_Plane)*)& theShapeA;
+      Handle(AIS2D_Point) theAIS2DPointB= *(Handle(AIS2D_Point)*)& theShapeB;
+      
+
+//      Handle(Geom_Plane ) myGeomPlane= *(Handle(Geom_Plane)*)& (theAIS2DPlane->Component() );
+      Handle(Geom_Plane ) myGeomPlane= theAIS2DPlane->Component();
+       Handle(Geom_Point ) myGeomPointB =  theAIS2DPointB->Component();
+      Handle(Geom_CartesianPoint ) myCartPointB= *((Handle(Geom_CartesianPoint)*)&  theAIS2DPointB);
+//      Handle(Geom_CartesianPoint ) myCartPointB= *(Handle(Geom_CartesianPoint)*)& (theAIS2DPointB->Component() );
+      
+      //Handle(Geom_Axis2Placement) OrigineAndAxii=myGeomPlane->Axis();
+      gp_Pln mygpPlane = myGeomPlane->Pln();
+      gp_Ax1 thegpAxe = mygpPlane.Axis();
+      gp_Dir theDir = thegpAxe.Direction();
+      gp_Pnt theCenter=myCartPointB->Pnt();
+      Standard_Real TheR = atof(argv[4]);
+      GC_MakeCircle Cir=GC_MakeCircle (theCenter, theDir ,TheR);
+      Handle (Geom_Circle) theGeomCircle=Cir.Value();
+      Handle(AIS2D_Circle) theAIS2DCircle=new AIS2D_Circle(theGeomCircle );
+      GetMapOfAIS2D().Bind(theAIS2DCircle,argv[1] );
+      TheAIS2DContext()->Display(theAIS2DCircle );
+    }
+    else // Error
+    {
+      cout << "v2dcircle error: !st argument is a unexpected type." << endl;
+      return 1;
+    }
+*/    
+    //Draw arg : v2dcircle CircleName X Y Radius [Color_index]
+    if (GetMapOfAIS2D().IsBound2(name))
+    {
+      cout << "There is already an object with name " << name << endl;
+      return -1;
+    }
+    Handle(AIS2D_InteractiveObject) aisobj = new AIS2D_InteractiveObject();
+    aisobj->SetView(V->View());
+//    Handle(Graphic2d_GraphicObject) obj =
+//      new Graphic2d_GraphicObject(V->View());
+
+    Handle(Graphic2d_Circle) circle = new Graphic2d_Circle
+      (aisobj, atof(argv[2]), atof(argv[3]), atof(argv[4]));
+
+    if (argc > 5)
+    {
+      circle->SetTypeOfPolygonFilling(Graphic2d_TOPF_FILLED);
+      circle->SetInteriorColorIndex(atoi(argv[5]));
+    }
+
+//    obj->Display();
+      GetMapOfAIS2D().Bind(aisobj, name);
+//      TheAIS2DContext()->Display(aisobj, Standard_False);
+    aisobj->Display();
+    
+    V->Viewer()->Update();
+  }
+  else
+  {
+    TheAIS2DContext()->OpenLocalContext();
+    myCurrentIndex = TheAIS2DContext()->IndexOfCurrentLocal();
+    
+    // Active le mode Vertex et face.
+//    TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(1));
+//    TheAIS2DContext()->ActivateStandardMode(AIS2D_ProjShape::SelectionType(4));
+    cout << " Select a vertex or a face." << endl;
+    TopoDS_Shape ShapeA = SelectShape2d(5);
+    
+    if (ShapeA.ShapeType() == TopAbs_VERTEX)
+    {
+//      TheAIS2DContext()->DeactivateStandardMode(AIS2D_ProjShape::SelectionType(4));
+      cout << " Select a different vertex." << endl;
+      
+      TopoDS_Shape ShapeB;
+      do
+      {
+        ShapeB = SelectShape2d(5);
+      } while (ShapeB.IsSame(ShapeA));
+      
+      // Selection de ShapeC
+      cout << " Select the last vertex." << endl;
+      TopoDS_Shape ShapeC;
+      do
+      {
+        ShapeC = SelectShape2d(5);
+      } while (ShapeC.IsSame(ShapeA) || ShapeC.IsSame(ShapeB));
+      
+      TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+	
+      // Construction du cercle 
+/*
+      gp_Pnt A = BRep_Tool::Pnt(TopoDS::Vertex(ShapeA));
+      gp_Pnt B = BRep_Tool::Pnt(TopoDS::Vertex(ShapeB));
+      gp_Pnt C = BRep_Tool::Pnt(TopoDS::Vertex(ShapeC));
+
+      GC_MakeCircle Cir = GC_MakeCircle(A,B,C);
+      Handle(Geom_Circle)  theGeomCircle  = Cir.Value();
+      Handle(AIS2D_Circle) theAIS2DCircle = new AIS2D_Circle(theGeomCircle);
+      GetMapOfAIS2D().Bind(theAIS2DCircle,argv[1]);
+      TheAIS2DContext()->Display(theAIS2DCircle);*/
+    }
+    // ShapeA est une face.
+    else
+    {
+      cout << " Select a vertex (in your face)." << endl;
+//      TheAIS2DContext()->DeactivateStandardMode(AIS2D_ProjShape::SelectionType(4));
+      TopoDS_Shape ShapeB = SelectShape2d(5);
+
+      Standard_Integer theRad;
+      do
+      {
+	cout << " Enter the value of the radius:" << endl;
+	cin >> theRad;
+      } while (theRad <= 0);
+
+      TheAIS2DContext()->CloseLocalContext(myCurrentIndex);
+
+      // Construction du cercle.
+
+      // On recupere la normale au Plane. tag
+/*      TopoDS_Face myFace = TopoDS::Face(ShapeA);
+      BRepAdaptor_Surface mySurface (myFace, Standard_False);
+      gp_Pln myPlane = mySurface.Plane();
+      Handle(Geom_Plane) theGeomPlane = new Geom_Plane (myPlane );
+      gp_Pln mygpPlane = theGeomPlane->Pln();
+      gp_Ax1 thegpAxe = mygpPlane.Axis();
+      gp_Dir theDir = thegpAxe.Direction();
+      
+      // On recupere le centre.
+      gp_Pnt theCenter = BRep_Tool::Pnt(TopoDS::Vertex(ShapeB));
+      
+      // On construit l'AIS2D_Circle
+      GC_MakeCircle Cir = GC_MakeCircle(theCenter, theDir ,theRad);
+      Handle(Geom_Circle)  theGeomCircle  = Cir.Value();
+      Handle(AIS2D_Circle) theAIS2DCircle = new AIS2D_Circle(theGeomCircle);
+      GetMapOfAIS2D().Bind(theAIS2DCircle,argv[1] ;
+      TheAIS2DContext()->Display(theAIS2DCircle);*/
+    }
+  }
+  
+  return 0;
+}
+
+//=======================================================================
+//function : ObjectCommands
+//purpose  : 
+//=======================================================================
+void QAViewer2dTest::ObjectCommands (Draw_Interpretor& theCommands)
+{
+  char *group = "2D AIS Viewer - Primitives Creation";
+
+//  theCommands.Add("v2dtrihedron",
+//		  "v2dtrihedron name [Xo] [Yo] [Zo] [Zu] [Zv] [Zw] [Xu] [Xv] [Xw]",
+//		  __FILE__,V2dTrihedron,group);
+
+/*  theCommands.Add("v2dtri2d", 
+		  "v2dtri2d Name (Selection in the viewer only)",
+		  __FILE__, V2dTrihedron2D, group);
+
+//  theCommands.Add("v2dplanetri",  
+//		  "v2dplanetri Name (Selection in the viewer only)",
+//		  __FILE__, V2dPlaneTrihedron, group);
+
+  theCommands.Add("v2dsize",
+		  "v2dsize [name(Default=Current)] [size(Default=100)] ",
+		  __FILE__, V2dSize, group);
+*/
+  theCommands.Add("v2daxis",
+		  "v2daxis nom [Xa] [Ya] [Xb] [Yb]",
+		  __FILE__, V2dAxisBuilder, group);
+  
+/*  theCommands.Add("v2daxispara", 
+		  "v2daxispara nom ",
+		  __FILE__, V2dAxisBuilder, group);
+  
+  theCommands.Add("v2daxisortho",
+		  "v2daxisotho nom ",
+		  __FILE__, V2dAxisBuilder, group);
+  
+  theCommands.Add("v2dpoint",
+		  "v2dpoint PointName [Xa] [Ya]",
+		  __FILE__, V2dPointBuilder, group);
+*/
+/*  theCommands.Add("v2dplane",
+		  "v2dplane  PlaneName [AxisName/PlaneName/PointName] [PointName/PointName/PointName] [Nothing/Nothing/PointName] ",
+		  __FILE__,V2dPlaneBuilder,group);
+  
+  theCommands.Add("v2dplanepara",
+		  "v2dplanepara  PlaneName  ",
+		  __FILE__,V2dPlaneBuilder,group);
+
+  theCommands.Add("v2dplaneortho",
+		  "v2dplaneortho  PlaneName  ",
+		  __FILE__,V2dPlaneBuilder,group);
+*/
+//  theCommands.Add("v2dline", 
+//		  "v2dline LineName [Xa/PointName] [Ya/PointName] [Xb] [Yb]",
+//		  __FILE__,V2dLineBuilder,group);
+  
+  theCommands.Add("v2dcircle",
+		  "v2dcircle CircleName X Y Radius [color_index]",
+		  __FILE__, V2dCircleBuilder, group);
+}
+#endif
diff --git a/src/QAViewer2dTest/QAViewer2dTest_ViewerCommands.cxx b/src/QAViewer2dTest/QAViewer2dTest_ViewerCommands.cxx
new file mode 100644
index 0000000..df6c233
--- /dev/null
+++ b/src/QAViewer2dTest/QAViewer2dTest_ViewerCommands.cxx
@@ -0,0 +1,1512 @@
+// Copyright (c) 1999-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#if defined(WOKC40)
+
+#define OCC198 // jfa 06/03/2002 // to prevent exception on bad font index
+#define OCC199 // jfa 06/03/2002 // to prevent exception on bad color index
+
+#include <QAViewer2dTest.hxx>
+
+#include <QAViewer2dTest_EventManager.hxx>
+#include <QAViewer2dTest_DataMapOfText.hxx>
+
+#include <AIS2D_InteractiveContext.hxx>
+
+#include <Draw_Interpretor.hxx>
+#include <Draw.hxx>
+
+#ifndef WNT
+
+#include <tk.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <Graphic3d_GraphicDevice.hxx>
+#include <Xw_Window.hxx>
+#include <Xw_Driver.hxx>
+
+#else
+
+#include <Graphic3d_WNTGraphicDevice.hxx>
+#include <WNT_WClass.hxx>
+#include <WNT_Window.hxx>
+#include <WNT_WDriver.hxx>
+                                                             
+#include <stdio.h>
+
+#endif
+
+#include <V2d_Viewer.hxx>
+#include <V2d_View.hxx>
+
+#include <Graphic2d_Text.hxx>
+
+#include <PS_Driver.hxx>
+
+//==============================================================================
+//  VIEWER GLOBALs
+//==============================================================================
+Standard_EXPORT int ViewerMainLoop2d (Standard_Integer , char** argv);
+
+#ifdef WNT
+static Handle(Graphic3d_WNTGraphicDevice)& GetG2dDevice()
+{
+  static Handle(Graphic3d_WNTGraphicDevice) GD;
+  return GD;
+}
+
+static Handle(WNT_Window)& VT_GetWindow2d()
+{
+  static Handle(WNT_Window) WNTWin;
+  return WNTWin;
+}
+
+#else
+static Handle(Graphic3d_GraphicDevice)& GetG2dDevice()
+{
+  static Handle(Graphic3d_GraphicDevice) GD;
+  return GD;
+}
+
+static Handle(Xw_Window)& VT_GetWindow2d()
+{
+  static Handle(Xw_Window) XWWin;
+  return XWWin;
+}
+
+static Display* display2d;
+
+static void VProcessEvents2d (ClientData, int);
+#endif
+
+#define ZCLIPWIDTH 1.
+
+static QAViewer2dTest_DataMapOfText myMapOfText;
+
+static void OSWindowSetup2d();
+
+//==============================================================================
+//  EVENT GLOBAL VARIABLES
+//==============================================================================
+static int Start_Rot = 0;
+static int ZClipIsOn = 0;
+static int X_Motion = 0, Y_Motion = 0; // Current cursor position
+static int X_ButtonPress = 0, Y_ButtonPress = 0; // Last ButtonPress position
+//==============================================================================
+
+#ifdef WNT
+static LRESULT WINAPI Viewer2dWindowProc (HWND hwnd, UINT uMsg, 
+                                          WPARAM wParam, LPARAM lParam);
+#endif
+
+//==============================================================================
+//function : ViewerInit
+//purpose  : Create the window viewer and initialize all the global variable
+//==============================================================================
+void QAViewer2dTest::ViewerInit()
+{
+  static int first = 1;
+
+  if (first)
+  {
+    Handle(Aspect_WindowDriver) aWindowDriver;
+
+#ifdef WNT
+    // Create the Graphic device
+    if (GetG2dDevice().IsNull())
+      GetG2dDevice() = new Graphic3d_WNTGraphicDevice();
+
+    // Create window
+    if (VT_GetWindow2d().IsNull())
+    {
+      Handle(WNT_GraphicDevice) g_Device = new WNT_GraphicDevice();
+
+      Handle(WNT_WClass) WC = new WNT_WClass
+        ("GW3D_Class", Viewer2dWindowProc, CS_VREDRAW | CS_HREDRAW,
+         0, 0, LoadCursor(NULL, IDC_ARROW));
+      VT_GetWindow2d() = new WNT_Window
+	(g_Device,"Test2d", WC, WS_OVERLAPPEDWINDOW,0.,0.20,0.40,0.40,Quantity_NOC_BLACK);
+      VT_GetWindow2d()->Map();
+    }
+
+    // Create window driver
+    aWindowDriver = new WNT_WDriver(VT_GetWindow2d());
+#else
+    // Create the Graphic device
+    if (GetG2dDevice().IsNull())
+      GetG2dDevice() = new Graphic3d_GraphicDevice(getenv("DISPLAY"),Xw_TOM_READONLY);
+
+    // Create window
+    if (VT_GetWindow2d().IsNull())
+    {
+      VT_GetWindow2d() = new Xw_Window(GetG2dDevice(), "Test2d",
+                                       0.,0.60,0.40,0.40,
+                                       Xw_WQ_3DQUALITY, Quantity_NOC_BLACK);
+    }
+
+    // Create window driver
+    aWindowDriver = new Xw_Driver(VT_GetWindow2d());
+#endif
+
+    Handle(V2d_Viewer) a3DViewer,a3DCollector;
+    // Create Viewer and View
+    a3DViewer = new V2d_Viewer(GetG2dDevice(),Standard_ExtString("Visu3D"));
+    a3DCollector = new V2d_Viewer(GetG2dDevice(),Standard_ExtString("Collector"));
+//    a3DViewer->SetDefaultBackgroundColor(Quantity_NOC_BLACK);
+//    a3DCollector->SetDefaultBackgroundColor(Quantity_NOC_STEELBLUE);
+
+    if (QAViewer2dTest::CurrentView().IsNull())
+    {
+//      VT_GetWindow2d()->SetBackground(Quantity_NOC_MATRAGRAY);
+      Handle(V2d_View) V = new V2d_View(aWindowDriver, a3DViewer);
+      QAViewer2dTest::CurrentView(V);
+    }
+    Handle(V2d_View) a3DViewCol = new V2d_View(aWindowDriver, a3DCollector);
+    
+    // AIS2D setup
+    if (QAViewer2dTest::GetAIS2DContext().IsNull())
+    {
+      Handle(AIS2D_InteractiveContext) C = new AIS2D_InteractiveContext(a3DViewer,a3DCollector);
+      QAViewer2dTest::SetAIS2DContext(C);
+    }
+    
+    // Setup for X11 or NT
+    OSWindowSetup2d();
+    
+    // Viewer and View creation
+  
+//    a3DViewer->SetDefaultBackgroundColor(Quantity_NOC_BLACK);
+    
+    Handle(V2d_View) V = QAViewer2dTest::CurrentView();
+    
+//    V->SetDegenerateModeOn();
+//    V->SetWindow(VT_GetWindow2d());
+    
+//    V->SetZClippingDepth(0.5);
+//    V->SetZClippingWidth(ZCLIPWIDTH/2.);
+    
+//    a3DViewer->SetDefaultLights();
+//    a3DViewer->SetLightOn();
+    
+#ifndef WNT
+#if TCL_MAJOR_VERSION < 8 && !defined(DECOSF1)
+    Tk_CreateFileHandler((void*)ConnectionNumber(display2d), 
+			 TK_READABLE, VProcessEvents2d, (ClientData) VT_GetWindow2d()->XWindow());
+#else
+    Tk_CreateFileHandler(ConnectionNumber(display2d), 
+			 TK_READABLE, VProcessEvents2d, (ClientData) VT_GetWindow2d()->XWindow());
+#endif
+#endif
+
+    first = 0;
+  }
+}
+
+//==============================================================================
+//function : V2dinit
+//purpose  : Create the window viewer and initialize all the global variable
+//		Use Tk_CreateFileHandler on UNIX to cath the X11 Viewer event
+//==============================================================================
+static int V2dInit (Draw_Interpretor& , Standard_Integer , char** )
+{
+  QAViewer2dTest::ViewerInit();
+  return 0;
+}
+
+//==============================================================================
+//function : ProcessKeyPress2d
+//purpose  : Handle KeyPress event from a CString
+//==============================================================================
+static void ProcessKeyPress2d (char *buf_ret)
+{
+  // Letters
+  if (!strcasecmp(buf_ret, "R"))
+  {
+    // Reset
+    QAViewer2dTest::CurrentView()->Reset();
+  }
+  else if (!strcasecmp(buf_ret, "F"))
+  {
+    // FitAll
+    QAViewer2dTest::CurrentView()->Fitall();
+  }
+  else if (!strcasecmp(buf_ret, "H"))
+  {
+    // HLR
+    cout << "HLR" << endl;
+//    QAViewer2dTest::CurrentView()->SetDegenerateModeOff();
+  }
+  else if (!strcasecmp(buf_ret, "S"))
+  {
+    // SHADING
+    cout << "passage en mode 1 (shading pour les shapes)" << endl;
+//    QAViewer2dTest::CurrentView()->SetDegenerateModeOn();
+    Handle(AIS2D_InteractiveContext) Ctx = QAViewer2dTest::GetAIS2DContext();
+//    if (Ctx->NbCurrents() == 0 || Ctx->NbSelected() == 0)
+//      Ctx->SetDisplayMode(AIS2D_Shaded);
+//    else
+    {
+      if (Ctx->HasOpenedContext())
+      {
+//	for(Ctx->InitSelected();Ctx->MoreSelected();Ctx->NextSelected())
+//	  Ctx->SetDisplayMode(Ctx->Interactive(), 1, Standard_False);
+      }
+      else
+      {
+//	for(Ctx->InitCurrent();Ctx->MoreCurrent();Ctx->NextCurrent())
+//	  Ctx->SetDisplayMode(Ctx->Current(), 1, Standard_False);
+      }
+      Ctx->UpdateCurrentViewer();
+    }
+  }
+  else if (!strcasecmp(buf_ret, "U"))
+  {
+    // Unset display mode
+    cout << "passage au mode par defaut" << endl;
+//    QAViewer2dTest::CurrentView()->SetDegenerateModeOn();
+    Handle(AIS2D_InteractiveContext) Ctx = QAViewer2dTest::GetAIS2DContext();
+//    if (Ctx->NbCurrents() == 0 || Ctx->NbSelected() == 0)
+//      Ctx->SetDisplayMode(AIS2D_WireFrame);
+//    else
+    {
+      if(Ctx->HasOpenedContext())
+      {
+//	for (Ctx->InitSelected(); Ctx->MoreSelected(); Ctx->NextSelected())
+//	  Ctx->UnsetDisplayMode(Ctx->Interactive(), Standard_False);
+      }
+      else
+      {
+//	for (Ctx->InitCurrent(); Ctx->MoreCurrent(); Ctx->NextCurrent())
+//	  Ctx->UnsetDisplayMode(Ctx->Current(), Standard_False);
+      }
+      Ctx->UpdateCurrentViewer();
+    }
+  }
+  else if (!strcasecmp(buf_ret, "W"))
+  {
+    // WIREFRAME
+    cout << "passage en mode 0 (filaire pour les shapes)" << endl;
+//    QAViewer2dTest::CurrentView()->SetDegenerateModeOn();
+    Handle(AIS2D_InteractiveContext) Ctx = QAViewer2dTest::GetAIS2DContext();
+//    if (Ctx->NbCurrents() == 0 || Ctx->NbSelected() == 0)
+//      Ctx->SetDisplayMode(AIS2D_WireFrame);
+//    else
+    {
+      if (Ctx->HasOpenedContext())
+      {
+//	for (Ctx->InitSelected(); Ctx->MoreSelected(); Ctx->NextSelected())
+//	  Ctx->SetDisplayMode(Ctx->Interactive(), 0, Standard_False);
+      }
+      else
+      {
+//	for (Ctx->InitCurrent(); Ctx->MoreCurrent(); Ctx->NextCurrent())
+//	  Ctx->SetDisplayMode(Ctx->Current(), 0, Standard_False);
+      }
+      Ctx->UpdateCurrentViewer();
+    }
+  }
+  else if (!strcasecmp(buf_ret, "D"))
+  {
+    // Delete selected
+    cout << "Delete selected object - not yet implemented" << endl;
+    QAViewer2dTest::CurrentView()->Reset();
+  }
+  else if (!strcasecmp(buf_ret, "Z"))
+  {
+    // ZCLIP
+    if (ZClipIsOn)
+    {
+      cout << "ZClipping OFF" << endl;
+      ZClipIsOn = 0;
+      
+//      QAViewer2dTest::CurrentView()->SetZClippingType(V2d_OFF);
+//      QAViewer2dTest::CurrentView()->Redraw();
+    }
+    else
+    {
+      cout << "ZClipping ON" << endl;
+      ZClipIsOn = 1;
+
+//      QAViewer2dTest::CurrentView()->SetZClippingType(V2d_FRONT);
+//      QAViewer2dTest::CurrentView()->Redraw();
+    }
+  }
+  else if (!strcasecmp(buf_ret, ","))
+  {
+//    QAViewer2dTest::GetAIS2DContext()->HilightNextDetected(QAViewer2dTest::CurrentView());
+  }
+  else if (!strcasecmp(buf_ret, "."))
+  {
+//    QAViewer2dTest::GetAIS2DContext()->HilightPreviousDetected(QAViewer2dTest::CurrentView());
+  }
+  else // Number
+  {
+    Standard_Integer Num = atoi(buf_ret);
+    if (Num >= 0 && Num <= 7)
+      QAViewer2dTest::StandardModeActivation(Num);
+  }
+}
+
+//==============================================================================
+//function : ProcessExpose2d
+//purpose  : Redraw the View on an Expose Event
+//==============================================================================
+static void ProcessExpose2d()
+{
+  QAViewer2dTest::CurrentView()->Viewer()->Update();
+//  QAViewer2dTest::CurrentView()->Redraw();
+}
+
+//==============================================================================
+//function : ProcessConfigure2d
+//purpose  : Resize the View on an Configure Event
+//==============================================================================
+static void ProcessConfigure2d()
+{
+  Handle(V2d_View) V = QAViewer2dTest::CurrentView();
+  V->MustBeResized(V2d_TOWRE_ENLARGE_OBJECTS);
+  V->Update();
+//  V->Redraw();
+  V->Viewer()->Update();
+}
+
+//==============================================================================
+//function : V2dPickGrid
+//purpose  : v2dpickgrid : get coordinates of a grid point near to MB1 click
+//==============================================================================
+static int V2dHitGrid (int argc, Standard_Integer anX, Standard_Integer anY,
+                       char* xxname = 0, char* yyname = 0)
+{
+  if (argc != 1 && argc != 3 && argc != 5)
+  {
+    cout << "Usage : V2dHitGrid [mouse_X mouse_Y [grid_X grid_Y]]" << endl;
+    return 1;
+  }
+
+  Handle(V2d_View) V = QAViewer2dTest::CurrentView();
+  if (V.IsNull()) return 1;
+
+  if (V->Viewer()->IsActive()) // about the grid
+  {
+//    if (argc == 1)
+//    {
+//      cout << "Mouse cursor position: X = " << anX << " Y = " << anY << endl;
+//    }
+
+    Quantity_Length xx, yy;
+    V->Hit(anX, anY, xx, yy);
+
+    Standard_Integer xw, yw;
+    V->Convert(xx, yy, xw, yw);
+    printf("Window coords of Grid Point: X = %d Y = %d\n", xw, yw);
+
+    if (argc < 5)
+    {
+      printf("Grid Point: X = %.6g Y = %.6g\n", xx, yy);
+    }
+    else
+    {
+      char szbuf[32];
+      sprintf(szbuf, "%.6g", xx);
+      Draw::Set(xxname, szbuf);
+      sprintf(szbuf, "%.6g", yy);
+      Draw::Set(yyname, szbuf);
+    }
+  }
+  return 0;
+}
+
+int V2dPickGrid (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  if (argc != 1 && argc != 3 && argc != 5)
+  {
+    cout << "Usage : v2dpickgrid (MB1 in the viewer)" << endl;
+    cout << "Usage : v2dgetgrid  mouse_X mouse_Y [grid_X grid_Y]" << endl;
+    return 1;
+  }
+
+  if (argc > 1)
+  {
+    if (argc > 3)
+    {
+      char *xxname, *yyname;
+      xxname = argv[3];
+      yyname = argv[4];
+      V2dHitGrid(argc, atoi(argv[1]), atoi(argv[2]), xxname, yyname);
+    }
+    else
+    {
+      V2dHitGrid(argc, atoi(argv[1]), atoi(argv[2]));
+    }
+  }
+  else
+  {
+    while (ViewerMainLoop2d (argc, argv)) {}
+  }
+
+  return 0;
+}
+
+//==============================================================================
+//function : ProcessButton1Press2d
+//purpose  : Picking
+//==============================================================================
+static Standard_Boolean ProcessButton1Press2d
+  (Standard_Integer , char** argv, Standard_Boolean pick, Standard_Boolean shift)
+{
+  if (pick)
+  {
+    cout << "Window X = " << X_ButtonPress << " Window Y = " << Y_ButtonPress << endl;
+    if (strlen(argv[0]) > 7) // v2dpickgrid
+    {
+      V2dHitGrid(1, X_ButtonPress, Y_ButtonPress);
+    }
+    else
+    {
+      Handle(V2d_View) V = QAViewer2dTest::CurrentView();
+      if (V.IsNull()) return 1;
+      Quantity_Length xx, yy;
+      V->Convert(X_ButtonPress, Y_ButtonPress, xx, yy);
+      printf("Coord system X = %.6g Y = %.6g\n", xx, yy);
+    }
+  }
+
+  Handle(QAViewer2dTest_EventManager) EM = QAViewer2dTest::CurrentEventManager();
+  if (shift) EM->ShiftSelect();
+  else       EM->Select();
+
+  pick = 0;
+  return pick;
+}
+
+//==============================================================================
+//function : ProcessButton3Press2d
+//purpose  : Start Rotation
+//==============================================================================
+static void ProcessButton3Press2d()
+{
+  // Start rotation
+  Start_Rot = 1;
+//  QAViewer2dTest::CurrentView()->SetDegenerateModeOn();
+//  QAViewer2dTest::CurrentView()->StartRotation(X_ButtonPress, Y_ButtonPress);
+}
+
+//==============================================================================
+//function : ProcessButtonRelease2d
+//purpose  : End Rotation
+//==============================================================================
+static void ProcessButtonRelease2d()
+{
+  // End rotation
+  Start_Rot = 0;
+//  QAViewer2dTest::CurrentView()->SetDegenerateModeOff();
+}
+
+//==============================================================================
+//function : ProcessZClipMotion2d
+//purpose  : Zoom
+//==============================================================================
+void ProcessZClipMotion2d()
+{
+  Handle(V2d_View) a3DView = QAViewer2dTest::CurrentView();
+  if (Abs(X_Motion - X_ButtonPress) > 2)
+  {
+    static Standard_Real CurZPos = 0.;
+//    Quantity_Length VDX, VDY;
+
+//    a3DView->Size(VDX,VDY);
+
+#ifdef DEB
+//    Standard_Real VDZ = 
+#endif
+//      a3DView->ZSize();
+
+    Quantity_Length dx = a3DView->Convert(X_Motion - X_ButtonPress);
+
+    // Front = Depth + width/2.
+    Standard_Real D = 0.5;
+//    Standard_Real W = 0.1;
+
+    CurZPos += (dx);
+
+    D += CurZPos;
+
+//	a3DView->SetZClippingType(V2d_OFF);
+//	a3DView->SetZClippingDepth(D);
+//	a3DView->SetZClippingWidth(W);
+//	a3DView->SetZClippingType(V2d_FRONT);
+
+//	a3DView->Redraw();
+
+    X_ButtonPress = X_Motion;
+    Y_ButtonPress = Y_Motion;
+  }
+}
+
+//==============================================================================
+//function : ProcessControlButton1Motion2d
+//purpose  : Zoom on Ctrl+MB1
+//==============================================================================
+static void ProcessControlButton1Motion2d()
+{
+  QAViewer2dTest::CurrentView()->Zoom(X_ButtonPress, Y_ButtonPress, X_Motion, Y_Motion);
+
+  X_ButtonPress = X_Motion;
+  Y_ButtonPress = Y_Motion;
+}
+
+//==============================================================================
+//function : ProcessControlButton2Motion2d
+//purpose  : Pan on Ctrl+MB2
+//==============================================================================
+static void ProcessControlButton2Motion2d()
+{
+  QAViewer2dTest::CurrentView()->Pan(X_Motion - X_ButtonPress, Y_ButtonPress - Y_Motion);
+
+  X_ButtonPress = X_Motion;
+  Y_ButtonPress = Y_Motion;
+}
+
+//==============================================================================
+//function : ProcessControlButton3Motion2d
+//purpose  : Rotation on Ctrl+MB3
+//==============================================================================
+static void ProcessControlButton3Motion2d()
+{
+//  if (Start_Rot) QAViewer2dTest::CurrentView()->Rotation(X_Motion, Y_Motion);
+}
+
+//==============================================================================
+//function : ProcessMotion2d
+//purpose  : pre-hilights detected objects at mouse position
+//==============================================================================
+static void ProcessMotion2d()
+{
+  Handle(QAViewer2dTest_EventManager) EM = QAViewer2dTest::CurrentEventManager();
+  Handle(V2d_View) V = QAViewer2dTest::CurrentView();
+  EM->MoveTo(X_Motion, Y_Motion, V);
+}
+
+//==============================================================================
+//function : ProcessGridMotion2d
+//purpose  : pre-hilights grid point near mouse position
+//==============================================================================
+static void ProcessGridMotion2d()
+{
+  Handle(V2d_View) V = QAViewer2dTest::CurrentView();
+
+  static Standard_Boolean LastIsGridActiveStatus = Standard_True;
+  if (V->Viewer()->IsActive()) // about the grid
+  {
+    V->ShowHit(X_Motion, Y_Motion);
+    LastIsGridActiveStatus = Standard_True;
+  }
+  if (!V->Viewer()->IsActive() && LastIsGridActiveStatus) // about the grid
+  {
+    V->EraseHit();
+    LastIsGridActiveStatus = Standard_False;
+  }
+}
+
+//==============================================================================
+//function : GetMousePosition
+//purpose  : 
+//==============================================================================
+void QAViewer2dTest::GetMousePosition (Standard_Integer& Xpix, Standard_Integer& Ypix)
+{
+  Xpix = X_Motion;
+  Ypix = Y_Motion;
+}
+
+//==============================================================================
+//function : V2dHelp
+//purpose  : Dsiplay help on viewer Keyboead and mouse commands
+//Draw arg : No args
+//==============================================================================
+/*static int V2dHelp (Draw_Interpretor& , Standard_Integer , char** )
+{
+  cout << "Q : Quit the application" << endl;
+  cout << "=========================" << endl;
+  cout << "F : FitAll" << endl;
+  cout << "R : ResetView" << endl;
+  cout << "=========================" << endl;
+  cout << "Selection mode " << endl;
+  cout << "0 : OBJECT" << endl;
+  cout << "1 : PRIMITIVE" << endl;
+  cout << "2 : ELEMENT" << endl;
+  cout << "3 : VERTEX" << endl;
+  cout << "4 : NONE" << endl;
+  cout << "==========================" << endl;
+  cout << "D : Remove Selected Object" << endl;
+  cout << "==========================" << endl;
+
+  return 0;
+}*/
+
+#ifdef WNT 
+
+static LRESULT WINAPI Viewer2dWindowProc (HWND hwnd, UINT Msg, 
+                                          WPARAM wParam, LPARAM lParam )
+{ 
+  static Standard_Boolean Ppick = 0;
+  static Standard_Integer Pargc = 0;
+  static char**           Pargv = NULL;
+  
+  static int Up = 1;
+
+  if (!QAViewer2dTest::CurrentView().IsNull())
+  {
+    PAINTSTRUCT ps; 
+    
+    switch (Msg)
+    {
+    case WM_PAINT:
+      BeginPaint(hwnd, &ps); 
+      EndPaint(hwnd, &ps); 
+      ProcessExpose2d(); 
+      break;
+      
+    case WM_SIZE: 
+      ProcessConfigure2d();
+      break;
+      
+    case WM_KEYDOWN:
+      char c[2];
+      c[0] = (char) wParam;
+      c[1] = '\0';
+      ProcessKeyPress2d(c);
+      break;
+      
+    case WM_LBUTTONUP:
+    case WM_MBUTTONUP:
+    case WM_RBUTTONUP:
+      Up = 1;
+      ProcessButtonRelease2d();
+      break;
+      
+    case WM_LBUTTONDOWN:
+    case WM_MBUTTONDOWN:
+    case WM_RBUTTONDOWN:
+      {
+	WPARAM fwKeys = wParam; 
+
+	Up = 0;
+	
+	X_ButtonPress = LOWORD(lParam);
+	Y_ButtonPress = HIWORD(lParam);
+	
+	if (Msg == WM_LBUTTONDOWN && !(fwKeys & MK_CONTROL))
+        {
+          Ppick = ProcessButton1Press2d(Pargc, Pargv, Ppick, (fwKeys & MK_SHIFT));
+	}
+	else if (Msg == WM_RBUTTONDOWN)
+        {
+	  // Start rotation
+	  ProcessButton3Press2d();
+	}
+      }
+      break;
+      
+    case WM_MOUSEMOVE:
+      { 
+	WPARAM fwKeys = wParam; 
+	X_Motion = LOWORD(lParam);
+	Y_Motion = HIWORD(lParam);
+	
+	if (Up && fwKeys & (MK_LBUTTON|MK_MBUTTON|MK_RBUTTON))
+        {
+	  Up = 0;
+	  X_ButtonPress = LOWORD(lParam);
+	  Y_ButtonPress = HIWORD(lParam);
+	  
+	  if (fwKeys & MK_RBUTTON)
+          {
+	    // Start rotation
+	    ProcessButton3Press2d();
+	  }
+	}
+	
+	if (fwKeys & MK_CONTROL)
+        {
+	  if (fwKeys & MK_LBUTTON)
+          {
+	    ProcessControlButton1Motion2d();
+	  }
+	  else if (fwKeys & MK_MBUTTON || ((fwKeys&MK_LBUTTON) && (fwKeys&MK_RBUTTON)))
+          {
+	    ProcessControlButton2Motion2d();
+	  }
+	  else if (fwKeys & MK_RBUTTON)
+          {
+	    ProcessControlButton3Motion2d();
+	  }
+	}
+	else if (fwKeys & MK_SHIFT)
+        {
+	  if (fwKeys & MK_MBUTTON || ((fwKeys&MK_LBUTTON) && (fwKeys&MK_RBUTTON)))
+          {
+	    ProcessZClipMotion2d();
+	  }
+	}
+	else
+        {
+	  ProcessMotion2d();
+	}
+      }
+      break;
+      
+    default:
+      return(DefWindowProc(hwnd, Msg, wParam, lParam));
+    }
+    return 0L;
+  }
+
+  return DefWindowProc(hwnd, Msg, wParam, lParam);
+}
+
+//==============================================================================
+//function : ViewerMainLoop2d
+//purpose  : Get a Event on the view and dispatch it
+//==============================================================================
+static int ViewerMainLoop2d (Standard_Integer argc, char** argv)
+{ 
+  cout << "No yet implemented on WNT" << endl; 
+  static Standard_Boolean Ppick = 0;
+  static Standard_Integer Pargc = 0;
+  static char**           Pargv = NULL;
+
+  Ppick = (argc > 0)? -1 : 0;
+  Pargc = argc;
+  Pargv = argv;
+ 
+  if (Ppick)
+  {
+    MSG msg;
+    msg.wParam = 1;
+
+    cout << "Start picking" << endl;
+
+    while (Ppick == -1)
+    { 
+      // Wait for a ProcessButton1Press2d() to toggle pick to 1 or 0
+      if (GetMessage(&msg, NULL, 0, 0))
+      {
+        TranslateMessage(&msg);
+        DispatchMessage(&msg);
+      }
+    }
+
+    cout << "Picking done" << endl;
+  }
+
+  return Ppick;
+}
+
+#else
+
+//==============================================================================
+//function : ViewerMainLoop2d
+//purpose  : Get a Event on the view and dispatch it
+//==============================================================================
+int ViewerMainLoop2d (Standard_Integer argc, char** argv)
+{
+  Standard_Boolean pick = argc > 0;
+
+  // X11 Event loop
+  static XEvent report;
+  
+  XNextEvent(display2d, &report);
+
+  switch (report.type)
+  {
+  case Expose:
+    ProcessExpose2d();
+    break;
+  case ConfigureNotify:
+    ProcessConfigure2d();
+    break;
+  case KeyPress: 
+    {
+      KeySym ks_ret;
+      char buf_ret[11];
+      int ret_len;
+      XComposeStatus status_in_out;
+      
+      ret_len = XLookupString((XKeyEvent *)&report, (char *) buf_ret,
+                              10, &ks_ret, &status_in_out);
+      
+      buf_ret[ret_len] = '\0';
+      if (ret_len) ProcessKeyPress2d(buf_ret);
+    }
+    break;
+  case ButtonPress:
+    { 
+      X_ButtonPress = report.xbutton.x;
+      Y_ButtonPress = report.xbutton.y;
+      
+      if (report.xbutton.button == Button1 &&
+          !(report.xbutton.state & ControlMask))
+      {
+        pick = ProcessButton1Press2d(argc, argv, pick, 
+                                     (report.xbutton.state & ShiftMask));
+      }
+      else if (report.xbutton.button == Button3)
+      {
+        // Start rotation
+        ProcessButton3Press2d();
+      }	
+    }
+    break;
+  case ButtonRelease:
+    ProcessButtonRelease2d();
+    break;
+  case MotionNotify:
+    {
+      X_Motion = report.xmotion.x;
+      Y_Motion = report.xmotion.y;
+      
+      // remove all the ButtonMotionMask
+      while (XCheckMaskEvent(display2d, ButtonMotionMask, &report)) {}
+      
+      if (ZClipIsOn && report.xmotion.state & ShiftMask)
+      {
+        if (Abs(X_Motion - X_ButtonPress) > 2)
+        {
+          Quantity_Length VDX = 0.0, VDY = 0.0;
+          
+//	      QAViewer2dTest::CurrentView()->Size(VDX,VDY);
+          Standard_Real VDZ =0 ;
+//	      VDZ = QAViewer2dTest::CurrentView()->ZSize();
+          
+          printf("%f,%f,%f\n", VDX, VDY, VDZ);
+          
+          Quantity_Length dx = 0 ;
+          dx = QAViewer2dTest::CurrentView()->Convert(X_Motion - X_ButtonPress);
+          
+          cout << dx << endl;
+          
+          dx = dx / VDX * VDZ;
+          
+          cout << dx << endl;
+	      
+          // Front = Depth + width/2.
+          //QAViewer2dTest::CurrentView()->SetZClippingDepth(dx);
+          //QAViewer2dTest::CurrentView()->SetZClippingWidth(0.);
+	      
+//	      QAViewer2dTest::CurrentView()->Redraw();
+        }
+      }
+      
+      if (report.xmotion.state & ControlMask)
+      {
+        if (report.xmotion.state & Button1Mask)
+        {
+          ProcessControlButton1Motion2d();
+        }
+        else if (report.xmotion.state & Button2Mask)
+        {
+          ProcessControlButton2Motion2d();
+        }
+        else if (report.xmotion.state & Button3Mask)
+        {
+          ProcessControlButton3Motion2d();
+        }
+      }
+      else
+      {
+        if (pick && strlen(argv[0]) > 7) // v2dpickgrid
+          ProcessGridMotion2d();
+        else
+          ProcessMotion2d();
+      }
+    }
+    break;
+  }
+
+  return pick;
+}
+
+//==============================================================================
+//function : VProcessEvents2d
+//purpose  : call by Tk_CreateFileHandler() to be able to manage the 
+//	     event in the Viewer window
+//==============================================================================
+static void VProcessEvents2d (ClientData, int)
+{
+  // test for X Event
+  while (XPending(display2d))
+  {
+    ViewerMainLoop2d(0, NULL);
+  }
+}
+#endif
+
+//==============================================================================
+//function : OSWindowSetup2d
+//purpose  : Setup for the X11 window to be able to cath the event
+//==============================================================================
+static void OSWindowSetup2d()
+{
+#ifndef WNT
+  // X11
+  Window  window = VT_GetWindow2d()->XWindow();
+
+  Standard_Address theDisplay = GetG2dDevice()->XDisplay();
+  display2d = (Display * ) theDisplay; 
+ 
+  XSynchronize(display2d, 1);
+
+  VT_GetWindow2d()->Map();
+
+  // X11 : For keyboard on SUN
+  XWMHints wmhints;
+  wmhints.flags = InputHint;
+  wmhints.input = 1;
+
+  XSetWMHints( display2d, window, &wmhints);
+
+  XSelectInput(display2d, window,
+               ExposureMask | StructureNotifyMask | KeyPressMask | ButtonPressMask |
+               PointerMotionMask |
+               Button1MotionMask | Button2MotionMask | Button3MotionMask);
+
+  XSynchronize(display2d, 0);
+
+#else
+  // WNT
+#endif
+
+}
+
+//==============================================================================
+//function : InitQAViewer2dTest
+//purpose  : initialisation de toutes les variables static de  QAViewer2dTest (dp)
+//==============================================================================
+void QAViewer2dTest_InitQAViewer2dTest (const Handle(AIS2D_InteractiveContext)& context)
+{  
+  Handle(V2d_Viewer) viewer = context->CurrentViewer(); 
+  QAViewer2dTest::SetAIS2DContext(context);
+  viewer->InitActiveViews();
+  Handle(V2d_View) view = viewer->ActiveView();
+  if (viewer->MoreActiveViews()) QAViewer2dTest::CurrentView(view);
+  QAViewer2dTest::ResetEventManager(); 
+  Handle(Aspect_GraphicDevice) device = viewer->Device();  
+  Handle(Aspect_WindowDriver) aWDr = view->Driver();
+  Handle(Aspect_Window) window = aWDr->Window();
+#ifndef WNT
+  // X11
+  VT_GetWindow2d() = Handle(Xw_Window)::DownCast(window);  
+  GetG2dDevice() = Handle(Graphic3d_GraphicDevice)::DownCast(device);
+  OSWindowSetup2d(); 
+  static int first = 1;
+  if (first)
+  {
+#if TCL_MAJOR_VERSION  < 8  && !defined(DECOSF1)
+    Tk_CreateFileHandler((void*)ConnectionNumber(display2d), 
+			     TK_READABLE, VProcessEvents2d, (ClientData) 0);
+#else
+    Tk_CreateFileHandler(ConnectionNumber(display2d), 
+			     TK_READABLE, VProcessEvents2d, (ClientData) 0);
+#endif
+    first = 0;	
+  }
+#endif
+}
+
+//==============================================================================
+//function : V2dFit
+//purpose  : Fitall, no DRAW arguments
+//Draw arg : No args
+//==============================================================================
+static int V2dFit (Draw_Interpretor& , Standard_Integer , char** )
+{
+  Handle(V2d_View) V = QAViewer2dTest::CurrentView(); 
+  if (!V.IsNull()) V->Fitall();
+  return 0;
+}
+
+//==============================================================================
+//function : V2dRepaint
+//purpose  : refresh viewer
+//Draw arg : No args
+//==============================================================================
+static int V2dRepaint (Draw_Interpretor& , Standard_Integer , char** )
+{ 
+  Handle(V2d_View) V = QAViewer2dTest::CurrentView(); 
+  if (!V.IsNull())
+//    V->Redraw();
+    V->Viewer()->Update();
+  return 0; 
+}
+
+//==============================================================================
+//function : V2dClear
+//purpose  : Remove all the object from the viewer
+//Draw arg : No args
+//==============================================================================
+static int V2dClear (Draw_Interpretor& , Standard_Integer , char** )
+{
+  Handle(V2d_View) V = QAViewer2dTest::CurrentView(); 
+  if (V.IsNull()) return 1;
+
+  QAViewer2dTest::Clear();
+  V->Viewer()->Update();
+  return 0;
+}
+
+//==============================================================================
+//function : V2dPick
+//purpose  : v2dpick - print mouse coords and color
+//==============================================================================
+static int V2dPick (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  if (argc != 1)
+  {
+    cout << "Usage: v2dpick (MB1 in the viewer)" << endl;
+    return 1;
+  }
+  if (QAViewer2dTest::CurrentView().IsNull()) return 1;
+
+  while (ViewerMainLoop2d (argc, argv)) {}
+  
+  return 0;
+}
+
+//==============================================================================
+//function : V2dSetBG
+//purpose  : v2dsetbg imagefile [filltype] : load image as background
+//==============================================================================
+static int V2dSetBG (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  if (argc < 2 || argc > 3)
+  {
+    cout << "Usage : v2dsetbg imagefile [filltype]" << endl;
+    return 1;
+  }
+  if (QAViewer2dTest::CurrentView().IsNull()) return 1;
+
+  Aspect_FillMethod aFillType = Aspect_FM_CENTERED;
+  if (argc == 3)
+  {
+    char* szType = argv[2];
+    if      (strcmp(szType, "NONE"    ) == 0) aFillType = Aspect_FM_NONE;
+    else if (strcmp(szType, "CENTERED") == 0) aFillType = Aspect_FM_CENTERED;
+    else if (strcmp(szType, "TILED"   ) == 0) aFillType = Aspect_FM_TILED;
+    else if (strcmp(szType, "STRETCH" ) == 0) aFillType = Aspect_FM_STRETCH;
+    else
+    {
+      cout << "Wrong fill type : " << szType << endl;
+      cout << "Must be one of CENTERED, TILED, STRETCH, NONE" << endl;
+      return -1;
+    }
+  }
+
+  QAViewer2dTest::CurrentView()->SetBackground(argv[1], aFillType);
+  QAViewer2dTest::CurrentView()->Viewer()->Update();
+  
+  return 0;
+}
+
+//==============================================================================
+//function : V2dGrid
+//purpose  : v2dgrid [type [Origin(X Y) XStep/RadiusStep YStep/DivisionNb RotationAngle] [drawmode]] : load grid
+//         : v2drmgrid : unload grid
+//==============================================================================
+static int V2dGrid (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  if (QAViewer2dTest::CurrentView().IsNull()) return 1;
+  Handle(V2d_Viewer) aViewer = QAViewer2dTest::CurrentView()->Viewer();
+
+  char* szName = argv[0];
+  if (strcmp(szName, "v2drmgrid") == 0)
+  {
+    if (argc > 1)
+    {
+      cout << "Usage : v2drmgrid" << endl;
+      return 1;
+    }
+
+    aViewer->DeactivateGrid();
+    return 0;
+  }
+
+  // v2dgrid. Args nb may be 1,2,3,7,8
+  if (argc < 1 || argc > 8 || (argc < 7 && argc > 3))
+  {
+    cout << "Usage : v2dgrid [type [Origin(X Y) XStep/RadiusStep YStep/DivisionNb RotationAngle] [drawmode]]" << endl;
+    return 1;
+  }
+
+  Aspect_GridType     aGridT = Aspect_GT_Rectangular;
+  Aspect_GridDrawMode aDrawM = Aspect_GDM_Lines;
+
+  if (argc > 1)
+  {
+    char* szType = argv[1];
+    if      (strcmp(szType, "Rect") == 0) aGridT = Aspect_GT_Rectangular;
+    else if (strcmp(szType, "Circ") == 0) aGridT = Aspect_GT_Circular;
+    else
+    {
+      cout << "Wrong grid type : " << szType << endl;
+      cout << "Must be Rect or Circ" << endl;
+      return -1;
+    }
+
+    if (argc == 3 || argc == 8)
+    {
+      char* szMode = (argc == 3) ? argv[2] : argv[7];
+      if      (strcmp(szMode, "Lines" ) == 0) aDrawM = Aspect_GDM_Lines;
+      else if (strcmp(szMode, "Points") == 0) aDrawM = Aspect_GDM_Points;
+      else if (strcmp(szMode, "None"  ) == 0) aDrawM = Aspect_GDM_None;
+      else
+      {
+        cout << "Wrong grid draw mode : " << szMode << endl;
+        cout << "Must be Lines or Points, or None" << endl;
+        return -1;
+      }
+    }
+  }
+
+  aViewer->ActivateGrid(aGridT, aDrawM);
+
+  if (argc > 3)
+  {
+    Quantity_Length aXOrigin = atof(argv[2]);
+    Quantity_Length aYOrigin = atof(argv[3]);
+    Quantity_PlaneAngle aRotationAngle = atof(argv[6]);
+
+    if (aGridT == Aspect_GT_Rectangular)
+    {
+      Quantity_Length aXStep = atof(argv[4]);
+      Quantity_Length aYStep = atof(argv[5]);
+      aViewer->SetRectangularGridValues
+        (aXOrigin, aYOrigin, aXStep, aYStep, aRotationAngle);
+    }
+    else
+    {
+      Quantity_Length aRadiusStep = atof(argv[4]);
+      Standard_Integer aDivisionNumber = atoi(argv[5]);
+      aViewer->SetCircularGridValues
+        (aXOrigin, aYOrigin, aRadiusStep, aDivisionNumber, aRotationAngle);
+    }
+  }
+
+  return 0;
+}
+
+//==============================================================================
+//function : V2dPSOut
+//purpose  : v2dpsout imagefile [Scale TypeOfColorSpace] [Width Height XCenter YCenter] : PostScript Output
+//==============================================================================
+static int V2dPSOut (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  if (argc < 2 || argc > 8)
+  {
+    cout << "Usage : v2dpsout imagefile [Scale TypeOfColorSpace] [Width Height XCenter YCenter]" << endl;
+    return 1;
+  }
+
+  Handle(V2d_View) V = QAViewer2dTest::CurrentView();
+  if (V.IsNull()) return 1;
+
+  Quantity_Factor aScale = 1.0;
+  Aspect_TypeOfColorSpace aColorType = Aspect_TOCS_RGB;
+
+  Quantity_Length aWidth = 100.0, aHeight = 100.0;
+
+  Quantity_Length aXCenter, aYCenter;
+  V->Center(aXCenter, aYCenter);
+
+  if (argc > 2)
+  {
+    aScale = atof(argv[2]);
+
+    if (argc > 3)
+    {
+      char* szType = argv[3];
+      if      (strcmp(szType, "RGB")           == 0) aColorType = Aspect_TOCS_RGB;
+      else if (strcmp(szType, "BlackAndWhite") == 0) aColorType = Aspect_TOCS_BlackAndWhite;
+      else if (strcmp(szType, "GreyScale")     == 0) aColorType = Aspect_TOCS_GreyScale;
+      else
+      {
+        cout << "Wrong color space type : " << szType << endl;
+        cout << "Must be one of RGB, BlackAndWhite, GreyScale" << endl;
+        return -1;
+      }
+
+      if (argc == 8)
+      {
+        aWidth  = atof(argv[4]);
+        aHeight = atof(argv[5]);
+        aXCenter = atof(argv[6]);
+        aYCenter = atof(argv[7]);
+      }
+      else // take current window size
+      {
+#ifndef WNT
+        Handle(Aspect_Window) anAspWindow = V->Driver()->Window();
+        Handle(Xw_Window) anXWindow = Handle(Xw_Window)::DownCast(anAspWindow);
+        anXWindow->Size(aWidth, aHeight);
+#endif
+      }
+    }
+  }
+
+  QAViewer2dTest::CurrentView()->PostScriptOutput
+    (argv[1], aWidth, aHeight, aXCenter, aYCenter, aScale, aColorType);
+  
+  return 0;
+}
+
+//==============================================================================
+//function : V2dPlot
+//purpose  : v2dplot format imagefile [Scale TypeOfColorSpace] [Width Height XCenter YCenter]
+//==============================================================================
+/*static int V2dPlot (Draw_Interpretor& , Standard_Integer argc, char** argv)
+{
+  if (argc < 3 || argc > 9)
+  {
+    cout << "Args: format imagefile [Scale TypeOfColorSpace] [Width Height XCenter YCenter]" << endl;
+    return 1;
+  }
+  if (QAViewer2dTest::CurrentView().IsNull()) return 1;
+
+  Quantity_Factor aScale = 1.0;
+  Aspect_TypeOfColorSpace aColorType = Aspect_TOCS_RGB;
+
+  Quantity_Length aWidth = 100.0, aHeight = 100.0;
+
+  Quantity_Length aXCenter, aYCenter;
+  QAViewer2dTest::CurrentView()->Center(aXCenter, aYCenter);
+
+  if (argc > 3)
+  {
+    aScale = atof(argv[3]);
+
+    if (argc > 4)
+    {
+      char* szType = argv[4];
+      if      (strcmp(szType, "RGB")           == 0) aColorType = Aspect_TOCS_RGB;
+      else if (strcmp(szType, "BlackAndWhite") == 0) aColorType = Aspect_TOCS_BlackAndWhite;
+      else if (strcmp(szType, "GreyScale")     == 0) aColorType = Aspect_TOCS_GreyScale;
+      else
+      {
+        cout << "Wrong color space type : " << szType << endl;
+        cout << "Must be one of RGB, BlackAndWhite, GreyScale" << endl;
+        return -1;
+      }
+
+      if (argc == 9)
+      {
+        aWidth  = atof(argv[5]);
+        aHeight = atof(argv[6]);
+        aXCenter = atof(argv[7]);
+        aYCenter = atof(argv[8]);
+      }
+    }
+  }
+
+  char* szFormat = argv[1];
+  if      (strcmp(szFormat, "PS") == 0)
+  {
+    Handle(PS_Driver) aPSDriver = new PS_Driver(argv[2], aWidth, aHeight, aColorType);
+    QAViewer2dTest::CurrentView()->Plot(aPSDriver, aXCenter, aYCenter, aScale);
+  }
+  else if (strcmp(szFormat, "") == 0)
+  {
+    Handle(PS_Driver) aPSDriver = new PS_Driver(argv[2], aWidth, aHeight, aColorType);
+    QAViewer2dTest::CurrentView()->Plot(aPSDriver, aXCenter, aYCenter, aScale);
+  }
+  else if (strcmp(szFormat, "") == 0)
+  {
+  }
+  else
+  {
+  }
+
+  return 0;
+}*/
+
+//=======================================================================
+//function : V2dTextColor
+//purpose  : v2dsettextcolor text_name color_index
+//=======================================================================
+static int V2dTextColor (Draw_Interpretor& , int argc, char** argv)
+{
+  if (argc != 3)
+  {
+    cerr << "Usage : v2dsettextcolor text_name color_index" << endl;
+    return -1;
+  }
+
+  //////////////////TCollection_AsciiString aName (argv[1]);
+  TCollection_ExtendedString ExtendedString (argv[1]);
+  Standard_ExtString aName = ExtendedString.ToExtString();
+
+  if (!myMapOfText.IsBound(aName))
+  {
+    cout << "No such text object: " << aName << endl;
+    return -1;
+  }
+
+  int aColInd = atoi(argv[2]);
+
+#ifdef OCC199
+  // check color index
+  Standard_Integer aColMin, aColMax;
+  QAViewer2dTest::CurrentView()->Driver()->ColorBoundIndexs(aColMin, aColMax);
+  if (aColInd < aColMin || aColMax < aColInd)
+  {
+    cout << "Color index must be between " << aColMin << " and " << aColMax << endl;
+    return -1;
+  }
+#endif
+
+  myMapOfText(aName)->SetColorIndex(aColInd);
+  QAViewer2dTest::CurrentView()->Viewer()->Update();
+  return 0;
+}
+
+//=======================================================================
+//function : V2dText
+//purpose  : v2dtext text_str position(x y) [angle scale font]
+//=======================================================================
+static int V2dText (Draw_Interpretor& , int argc, char** argv)
+{
+  if (argc != 4 && argc != 7)
+  {
+    cerr << "Usage : v2dtext text_str position(x y) [angle scale font]" << endl;
+    return -1;
+  }
+  
+  Handle(AIS2D_InteractiveContext) myAIScontext = QAViewer2dTest::GetAIS2DContext();
+  if (myAIScontext.IsNull())
+  {
+    cerr << "use 'v2dinit' command before " << argv[0] << endl;
+    return -1;
+  }
+  myAIScontext->SetPickMode(Graphic2d_PM_INTERSECT);
+  Handle(V2d_View) V = QAViewer2dTest::CurrentView();
+
+  Handle(Graphic2d_GraphicObject) obj =
+    new Graphic2d_GraphicObject(V->View());
+
+  Quantity_PlaneAngle anAngle = 0.0;
+  Quantity_Factor     aScale = 1.0;
+  Standard_Integer    aFontIn = 0;
+
+  if (argc > 4)
+  {
+    anAngle = atof(argv[4]);
+    aScale  = atof(argv[5]);
+    aFontIn = atoi(argv[6]);
+
+#ifdef OCC198
+    // check font index
+    Standard_Integer aFontMin, aFontMax;
+    QAViewer2dTest::CurrentView()->Driver()->FontBoundIndexs(aFontMin, aFontMax);
+    if (aFontIn < aFontMin || aFontMax < aFontIn)
+    {
+      cout << "Font index must be between " << aFontMin << " and " << aFontMax << endl;
+      return -1;
+    }
+#endif
+  }
+
+  Handle(Graphic2d_Text) text =
+    new Graphic2d_Text(obj, TCollection_ExtendedString(argv[1]),
+                       atof(argv[2]), atof(argv[3]), anAngle,
+                       Aspect_TOT_SOLID, aScale);
+  text->SetFontIndex(aFontIn);
+
+  obj->Display();
+  V->Fitall();
+
+  int i = myMapOfText.Extent();
+
+  TCollection_AsciiString aTxtName ("text_");
+  aTxtName += TCollection_AsciiString(i);
+
+  //////////////////myMapOfText.Bind(aTxtName, text);
+  TCollection_ExtendedString ExtendedString (aTxtName);
+  Standard_ExtString ExtString_aTxtName = ExtendedString.ToExtString();
+  myMapOfText.Bind(ExtString_aTxtName, text);
+
+  cout << "Text " << aTxtName << " created" << endl;
+  return 0; 
+}
+
+//=======================================================================
+//function : ViewerCommands
+//purpose  : 
+//=======================================================================
+void QAViewer2dTest::ViewerCommands(Draw_Interpretor& theCommands)
+{
+  char *group = "2D AIS Viewer - Viewer Commands";
+
+  theCommands.Add("v2dinit",
+		  "v2dinit                       : Create the Viewer window",
+		  __FILE__, V2dInit, group);
+
+  theCommands.Add("v2dsetbg",
+		  "v2dsetbg imagefile [filltype] : Load image as background",
+		  __FILE__, V2dSetBG, group);
+
+  theCommands.Add("v2dgrid",
+		  "v2dgrid [type [Origin(X Y) XStep/RadiusStep YStep/DivisionNb RotationAngle(in radians)] [drawmode]] : Load grid",
+		  __FILE__, V2dGrid, group);
+
+  theCommands.Add("v2drmgrid",
+		  "v2drmgrid                     : Unload grid",
+		  __FILE__, V2dGrid, group);
+
+//  theCommands.Add("v2dplot",
+//		  "v2dplot format filename       : Dump in file in certain format",
+//		  __FILE__, V2dPlot, group);
+
+  theCommands.Add("v2dpsout",
+		  "v2dpsout imagefile [Scale TypeOfColorSpace] [Width Height XCenter YCenter] : PostScript Output",
+		  __FILE__, V2dPSOut, group);
+
+  theCommands.Add("v2dpick",
+		  "v2dpick (MB1 in the viewer) : Print pixel coords and color",
+		  __FILE__, V2dPick, group);
+
+  theCommands.Add("v2dpickgrid",
+		  "v2dpickgrid (MB1 in the viewer) : Print coordinates of a grid point near to MB1 click",
+		  __FILE__, V2dPickGrid, group);
+
+  theCommands.Add("v2dfit",
+		  "v2dfit or <F>                 : Fit all shapes",
+		  __FILE__, V2dFit, group);
+
+  theCommands.Add("v2drepaint",
+		  "v2drepaint                    : Force redraw",
+		  __FILE__, V2dRepaint, group);
+
+  theCommands.Add("v2dclear",
+		  "v2dclear                      : Clear the viewer",
+		  __FILE__, V2dClear, group);
+
+  theCommands.Add("v2dtext", "v2dtext text_str position(x y) [angle scale font]", V2dText, group);
+  theCommands.Add("v2dsettextcolor", "v2dsettextcolor text_name color_index", V2dTextColor, group);
+
+//  theCommands.Add("v2dhelp",
+//		  "v2dhelp                       : Display help on the viewer commands",
+//		  __FILE__, V2dHelp, group);
+}
+#endif
diff --git a/src/RWStepElement/RWStepElement_RWElementDescriptor.cxx b/src/RWStepElement/RWStepElement_RWElementDescriptor.cxx
index 4430271..0dc11e9 100644
--- a/src/RWStepElement/RWStepElement_RWElementDescriptor.cxx
+++ b/src/RWStepElement/RWStepElement_RWElementDescriptor.cxx
@@ -48,9 +48,9 @@ void RWStepElement_RWElementDescriptor::ReadStep (const Handle(StepData_StepRead
   StepElement_ElementOrder aTopologyOrder = StepElement_Linear;
   if (data->ParamType (num, 1) == Interface_ParamEnum) {
     Standard_CString text = data->ParamCValue(num, 1);
-    if      (strcmp(text, ".LINEAR.")) aTopologyOrder = StepElement_Linear;
-    else if (strcmp(text, ".QUADRATIC.")) aTopologyOrder = StepElement_Quadratic;
-    else if (strcmp(text, ".CUBIC.")) aTopologyOrder = StepElement_Cubic;
+    if      (strcmp(text, ".LINEAR.") == 0) aTopologyOrder = StepElement_Linear;
+    else if (strcmp(text, ".QUADRATIC.") == 0) aTopologyOrder = StepElement_Quadratic;
+    else if (strcmp(text, ".CUBIC.") == 0) aTopologyOrder = StepElement_Cubic;
     else ach->AddFail("Parameter #1 (topology_order) has not allowed value");
   }
   else ach->AddFail("Parameter #1 (topology_order) is not enumeration");
diff --git a/src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx b/src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx
index da44bd6..aa814d8 100644
--- a/src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx
+++ b/src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx
@@ -78,9 +78,9 @@ void RWStepFEA_RWFeaAxis2Placement3d::ReadStep (const Handle(StepData_StepReader
   StepFEA_CoordinateSystemType aSystemType = StepFEA_Cartesian;
   if (data->ParamType (num, 5) == Interface_ParamEnum) {
     Standard_CString text = data->ParamCValue(num, 5);
-    if      (strcmp(text, ".CARTESIAN.")) aSystemType = StepFEA_Cartesian;
-    else if (strcmp(text, ".CYLINDRICAL.")) aSystemType = StepFEA_Cylindrical;
-    else if (strcmp(text, ".SPHERICAL.")) aSystemType = StepFEA_Spherical;
+    if      (strcmp(text, ".CARTESIAN.") == 0) aSystemType = StepFEA_Cartesian;
+    else if (strcmp(text, ".CYLINDRICAL.") == 0) aSystemType = StepFEA_Cylindrical;
+    else if (strcmp(text, ".SPHERICAL.") == 0) aSystemType = StepFEA_Spherical;
     else ach->AddFail("Parameter #5 (system_type) has not allowed value");
   }
   else ach->AddFail("Parameter #5 (system_type) is not enumeration");
diff --git a/src/RWStepShape/RWStepShape_RWAngularLocation.cxx b/src/RWStepShape/RWStepShape_RWAngularLocation.cxx
index de17141..2a7a3e6 100644
--- a/src/RWStepShape/RWStepShape_RWAngularLocation.cxx
+++ b/src/RWStepShape/RWStepShape_RWAngularLocation.cxx
@@ -71,9 +71,9 @@ void RWStepShape_RWAngularLocation::ReadStep (const Handle(StepData_StepReaderDa
   StepShape_AngleRelator aAngleSelection = StepShape_Small;
   if (data->ParamType (num, 5) == Interface_ParamEnum) {
     Standard_CString text = data->ParamCValue(num, 5);
-    if      (strcmp(text, ".EQUAL.")) aAngleSelection = StepShape_Equal;
-    else if (strcmp(text, ".LARGE.")) aAngleSelection = StepShape_Large;
-    else if (strcmp(text, ".SMALL.")) aAngleSelection = StepShape_Small;
+    if      (strcmp(text, ".EQUAL.") == 0) aAngleSelection = StepShape_Equal;
+    else if (strcmp(text, ".LARGE.") == 0) aAngleSelection = StepShape_Large;
+    else if (strcmp(text, ".SMALL.") == 0) aAngleSelection = StepShape_Small;
     else ach->AddFail("Parameter #5 (angle_selection) has not allowed value");
   }
   else ach->AddFail("Parameter #5 (angle_selection) is not enumeration");
diff --git a/src/RWStepShape/RWStepShape_RWAngularSize.cxx b/src/RWStepShape/RWStepShape_RWAngularSize.cxx
index eaed6f2..d003d40 100644
--- a/src/RWStepShape/RWStepShape_RWAngularSize.cxx
+++ b/src/RWStepShape/RWStepShape_RWAngularSize.cxx
@@ -60,9 +60,9 @@ void RWStepShape_RWAngularSize::ReadStep (const Handle(StepData_StepReaderData)&
   StepShape_AngleRelator aAngleSelection = StepShape_Small;
   if (data->ParamType (num, 3) == Interface_ParamEnum) {
     Standard_CString text = data->ParamCValue(num, 3);
-    if      (strcmp(text, ".EQUAL.")) aAngleSelection = StepShape_Equal;
-    else if (strcmp(text, ".LARGE.")) aAngleSelection = StepShape_Large;
-    else if (strcmp(text, ".SMALL.")) aAngleSelection = StepShape_Small;
+    if      (strcmp(text, ".EQUAL.") == 0) aAngleSelection = StepShape_Equal;
+    else if (strcmp(text, ".LARGE.") == 0) aAngleSelection = StepShape_Large;
+    else if (strcmp(text, ".SMALL.") == 0) aAngleSelection = StepShape_Small;
     else ach->AddFail("Parameter #3 (angle_selection) has not allowed value");
   }
   else ach->AddFail("Parameter #3 (angle_selection) is not enumeration");
diff --git a/src/SHMessage/SHAPE.us b/src/SHMessage/SHAPE.us
index ff4a0bb..dfb175a 100644
--- a/src/SHMessage/SHAPE.us
+++ b/src/SHMessage/SHAPE.us
@@ -160,7 +160,8 @@ Faces were incorrectly oriented in the shell, corrected
 .FixAdvShell.FixOrientation.MSG5
 Faces were incorrectly oriented in the shell, not corrected
 !
-.FixAdvShell..MSG0
+.FixAdvShell.FixClosedFlag.MSG0
+Shell has incorrect flag isClosed
 !
 .FixAdvShell..MSG5
 !
diff --git a/src/STEPCAFControl/STEPCAFControl_Controller.cxx b/src/STEPCAFControl/STEPCAFControl_Controller.cxx
index 8a64721..9f00413 100644
--- a/src/STEPCAFControl/STEPCAFControl_Controller.cxx
+++ b/src/STEPCAFControl/STEPCAFControl_Controller.cxx
@@ -21,6 +21,7 @@
 #include <STEPCAFControl_Controller.ixx>
 #include <STEPCAFControl_ActorWrite.hxx>
 #include <XSAlgo.hxx>
+#include <Interface_Static.hxx>
 
 //=======================================================================
 //function : STEPCAFControl_Controller
@@ -45,9 +46,30 @@ Standard_Boolean STEPCAFControl_Controller::Init ()
   inic = Standard_True;
   // self-registering
   Handle(STEPCAFControl_Controller) STEPCTL = new STEPCAFControl_Controller;
-// do XSAlgo::Init, cause it does not called before.
+  // do XSAlgo::Init, cause it does not called before.
   XSAlgo::Init();
   // do something to avoid warnings...
   STEPCTL->AutoRecord();
+
+  //-----------------------------------------------------------
+  // Few variables for advanced control of translation process
+  //-----------------------------------------------------------
+
+  // Indicates whether to write sub-shape names to 'Name' attributes of
+  // STEP Representation Items
+  Interface_Static::Init   ("stepcaf", "write.stepcaf.subshapes.name", 'e', "");
+  Interface_Static::Init   ("stepcaf", "write.stepcaf.subshapes.name", '&', "enum 0");
+  Interface_Static::Init   ("stepcaf", "write.stepcaf.subshapes.name", '&', "eval Off"); // 0
+  Interface_Static::Init   ("stepcaf", "write.stepcaf.subshapes.name", '&', "eval On");  // 1
+  Interface_Static::SetIVal("write.stepcaf.subshapes.name", 0); // Disabled by default
+
+  // Indicates whether to read sub-shape names from 'Name' attributes of
+  // STEP Representation Items
+  Interface_Static::Init   ("stepcaf", "read.stepcaf.subshapes.name", 'e', "");
+  Interface_Static::Init   ("stepcaf", "read.stepcaf.subshapes.name", '&', "enum 0");
+  Interface_Static::Init   ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval Off"); // 0
+  Interface_Static::Init   ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval On");  // 1
+  Interface_Static::SetIVal("read.stepcaf.subshapes.name", 0); // Disabled by default
+
   return Standard_True;
 }
diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cdl b/src/STEPCAFControl/STEPCAFControl_Reader.cdl
index 75c87ce..33122ea 100644
--- a/src/STEPCAFControl/STEPCAFControl_Reader.cdl
+++ b/src/STEPCAFControl/STEPCAFControl_Reader.cdl
@@ -53,7 +53,10 @@ uses
     ShapeTool from XCAFDoc,
     Label from TDF,
     LabelSequence from TDF,
-    HSequenceOfTransient from TColStd
+    HSequenceOfTransient from TColStd,
+    RepresentationItem from StepRepr,
+    TransientProcess from Transfer,
+    ConnectedFaceSet from StepShape
 
 is
 
@@ -204,6 +207,51 @@ is
     	---Purpose: Reads materials for instances defined in the STEP model and 
 	--          set reference between shape instances from different assemblyes 
 
+    SettleShapeData(me; theItem: RepresentationItem from StepRepr;
+                        theLab: out Label from TDF;
+                        theShapeTool: ShapeTool from XCAFDoc;
+                        theTP: TransientProcess from Transfer)
+    returns Label from TDF is protected;
+    --- Purpose: Populates the sub-Label of the passed TDF Label with shape
+     --          data associated with the given STEP Representation Item,
+     --          including naming and topological information.
+
+    ExpandSubShapes(me; theShapeTool: ShapeTool from XCAFDoc;
+                        theShapeLabelMap: DataMapOfShapeLabel from XCAFDoc;
+                        theShapePDMap: DataMapOfShapePD from STEPCAFControl)
+    is protected;
+    --- Purpose: Given the maps of already translated shapes, this method
+     --          expands their correspondent Labels in XDE Document so that
+     --          to have a dedicated sub-Label for each sub-shape coming
+     --          with associated name in its STEP Representation Item.
+
+    ExpandManifoldSolidBrep(me; theLab: out Label from TDF;
+                                theItem: RepresentationItem from StepRepr;
+                                theTP: TransientProcess from Transfer;
+                                theShapeTool: ShapeTool from XCAFDoc)
+    is protected;
+    ---  Purpose: Expands the topological structure of Manifold Solid BRep
+     --           STEP entity to OCAF sub-tree. Entities having no names
+     --           associated via their Representation Items are skipped.
+
+    ExpandSBSM(me; theLab: out Label from TDF;
+               theItem: RepresentationItem from StepRepr;
+               theTP: TransientProcess from Transfer;
+               theShapeTool: ShapeTool from XCAFDoc)
+    is protected;
+    ---  Purpose: Expands the topological structure of Shell-Based Surface
+     --           Model STEP entity to OCAF sub-tree. Entities having no names
+     --           associated via their Representation Items are skipped.
+
+    ExpandShell(me; theShell: ConnectedFaceSet from StepShape;
+                    theLab: out Label from TDF;
+                    theTP: TransientProcess from Transfer;
+                    theShapeTool: ShapeTool from XCAFDoc)
+    is protected;
+    ---  Purpose: Expands STEP Shell structure to OCAF sub-tree. Entities
+     --           having no names associated via their Representation Items
+     --           are skipped.
+
     FindInstance (myclass; NAUO: NextAssemblyUsageOccurrence from StepRepr;
                       STool: ShapeTool from XCAFDoc;
      	    	      Tool: Tool from STEPConstruct; 
diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx
index 264957e..52396d2 100644
--- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx
+++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx
@@ -45,6 +45,7 @@
 #include <StepRepr_ShapeAspect.hxx>
 #include <StepRepr_MeasureRepresentationItem.hxx>
 #include <StepRepr_DescriptiveRepresentationItem.hxx>
+#include <StepRepr_SequenceOfRepresentationItem.hxx>
 #include <StepVisual_StyledItem.hxx>
 #include <StepAP214_AppliedExternalIdentificationAssignment.hxx>
 
@@ -161,9 +162,60 @@
 #include <StepShape_ShellBasedSurfaceModel.hxx>
 #include <StepShape_GeometricSet.hxx>
 #include <StepBasic_ProductDefinition.hxx>
+#include <NCollection_DataMap.hxx>
+#include <StepShape_ManifoldSolidBrep.hxx>
+#include <Interface_Static.hxx>
+#include <TColStd_MapOfTransient.hxx>
+#include <TColStd_MapIteratorOfMapOfTransient.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <STEPCAFControl_DataMapIteratorOfDataMapOfShapePD.hxx>
+#include <StepShape_ClosedShell.hxx>
+#include <StepShape_HArray1OfFace.hxx>
+#include <StepShape_HArray1OfFaceBound.hxx>
+#include <StepShape_Loop.hxx>
+#include <StepShape_EdgeLoop.hxx>
+#include <StepShape_HArray1OfOrientedEdge.hxx>
+#include <StepShape_HArray1OfShell.hxx>
 
-//#include <BRepTools.hxx>
+#ifdef DEB
+//! Converts address of the passed shape (TShape) to string.
+//! \param theShape [in] Shape to dump.
+//! \return corresponding string.
+TCollection_AsciiString AddrToString(const TopoDS_Shape& theShape)
+{
+  std::string anAddrStr;
+  std::ostringstream ost;
+  ost << theShape.TShape().Access();
+  anAddrStr = ost.str();
+
+  TCollection_AsciiString aStr =
+    TCollection_AsciiString("[").Cat( anAddrStr.c_str() ).Cat("]");
+
+  return aStr;
+}
+#endif
+
+//=======================================================================
+//function : IsEqual
+//purpose  : global function to check equality of topological shapes
+//=======================================================================
+
+inline Standard_Boolean IsEqual(const TopoDS_Shape& theShape1,
+                                const TopoDS_Shape& theShape2) 
+{
+  return theShape1.IsEqual(theShape2);
+}
+
+//=======================================================================
+//function : AllocateSubLabel
+//purpose  :
+//=======================================================================
 
+static TDF_Label AllocateSubLabel(TDF_Label& theRoot)
+{
+  return TDF_TagSource::NewChild(theRoot);
+}
 
 //=======================================================================
 //function : STEPCAFControl_Reader
@@ -189,7 +241,7 @@ STEPCAFControl_Reader::STEPCAFControl_Reader ():
 //=======================================================================
 
 STEPCAFControl_Reader::STEPCAFControl_Reader (const Handle(XSControl_WorkSession)& WS,
-					      const Standard_Boolean scratch) :
+                                              const Standard_Boolean scratch) :
        myColorMode( Standard_True ),
        myNameMode ( Standard_True ),
        myLayerMode( Standard_True ),
@@ -538,8 +590,10 @@ cout<<"filename="<<filename<<endl;
   if(GetMatMode())
     ReadMaterials(reader.WS(),doc,SeqPDS);
 
-  //  cout << "Ready !!" << endl;
-  
+  // Expand resulting CAF structure for sub-shapes (optionally with their
+  // names) if requested
+  ExpandSubShapes(STool, map, ShapePDMap);
+
   return Standard_True;
 }
 
@@ -761,9 +815,6 @@ Standard_Boolean STEPCAFControl_Reader::ReadColors (const Handle(XSControl_WorkS
       if ( style != aHSeqOfInvisStyle->Value( si ) )
         continue;
       // found that current style is invisible.
-#ifdef DEB
-      cout << "Warning: item No " << i << "(" << style->Item()->DynamicType()->Name() << ") is invisible" << endl;
-#endif
       IsVisible = Standard_False;
       break;
     }
@@ -832,12 +883,8 @@ Standard_Boolean STEPCAFControl_Reader::ReadColors (const Handle(XSControl_WorkS
     if (isSkipSHUOstyle)
       continue; // skip styled item which refer to SHUO
     
-    if ( S.IsNull() ) {
-#ifdef DEB
-      cout << "Warning: item No " << i << "(" << style->Item()->DynamicType()->Name() << ") is not mapped to shape" << endl;
-#endif
+    if ( S.IsNull() )
       continue;
-    }
     
     if ( ! SurfCol.IsNull() ) {
       Quantity_Color col;
@@ -1934,7 +1981,10 @@ Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(XSControl_Wor
             Handle(StepRepr_DescriptiveRepresentationItem) DRI =
               Handle(StepRepr_DescriptiveRepresentationItem)::DownCast(RI);
             aName = DRI->Name();
+            
             aDescription = DRI->Description();
+            if(aName.IsNull())
+              aName = aDescription;
           }
           if(RI->IsKind(STANDARD_TYPE(StepRepr_MeasureRepresentationItem))) {
             // try to find density for material
@@ -1966,7 +2016,9 @@ Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(XSControl_Wor
         }
       }
     }
-    if( aName->Length()==0 ) continue;
+   
+    if( aName.IsNull() || aName->Length()==0 ) 
+      continue;
     // find shape label amd create Material link
     TopoDS_Shape aSh;
     Handle(StepShape_SolidModel) SM = FindSolidForPDS(PDS,graph);
@@ -1987,6 +2039,245 @@ Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(XSControl_Wor
   return Standard_True;
 }
 
+//=======================================================================
+//function : SettleShapeData
+//purpose  :
+//=======================================================================
+
+TDF_Label STEPCAFControl_Reader::SettleShapeData(const Handle(StepRepr_RepresentationItem)& theItem,
+                                                 TDF_Label& theLab,
+                                                 const Handle(XCAFDoc_ShapeTool)& theShapeTool,
+                                                 const Handle(Transfer_TransientProcess)& TP) const
+{
+  TDF_Label aResult = theLab;
+
+  Handle(TCollection_HAsciiString) hName = theItem->Name();
+  if ( hName.IsNull() || hName->IsEmpty() )
+    return aResult;
+
+  Handle(Transfer_Binder) aBinder = TP->Find(theItem);
+  if ( aBinder.IsNull() )
+    return aResult;
+
+  TopoDS_Shape aShape = TransferBRep::ShapeResult(aBinder);
+  if ( aShape.IsNull() )
+    return aResult;
+
+  // Allocate sub-Label
+  aResult = AllocateSubLabel(theLab);
+
+  TCollection_AsciiString aName = hName->String();
+  TDataStd_Name::Set(aResult, aName);
+  theShapeTool->SetShape(aResult, aShape);
+
+  return aResult;
+}
+
+//=======================================================================
+//function : ExpandSubShapes
+//purpose  :
+//=======================================================================
+
+void STEPCAFControl_Reader::ExpandSubShapes(const Handle(XCAFDoc_ShapeTool)& ShapeTool,
+                                            const XCAFDoc_DataMapOfShapeLabel& ShapeLabelMap,
+                                            const STEPCAFControl_DataMapOfShapePD& ShapePDMap) const
+{
+  const Handle(Interface_InterfaceModel)& Model = Reader().WS()->Model();
+  const Handle(Transfer_TransientProcess)& TP = Reader().WS()->TransferReader()->TransientProcess();
+  NCollection_DataMap<TopoDS_Shape, Handle(TCollection_HAsciiString)> ShapeNameMap;
+  TColStd_MapOfTransient aRepItems;
+
+  // Read translation control variables
+  Standard_Boolean doReadSNames = (Interface_Static::IVal("read.stepcaf.subshapes.name") > 0);
+
+  if ( !doReadSNames )
+    return;
+
+  const Interface_Graph& Graph = Reader().WS()->Graph();
+
+  for ( STEPCAFControl_DataMapIteratorOfDataMapOfShapePD it(ShapePDMap); it.More(); it.Next() )
+  {
+    const TopoDS_Shape& aRootShape = it.Key();
+    const Handle(StepBasic_ProductDefinition)& aPDef = it.Value();
+    if ( aPDef.IsNull() )
+      continue;
+
+    // Find SDR by Product
+    Handle(StepShape_ShapeDefinitionRepresentation) aSDR;
+    Interface_EntityIterator entIt = Graph.TypedSharings( aPDef, STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation) );
+    for ( entIt.Start(); entIt.More(); entIt.Next() )
+    {
+      const Handle(Standard_Transient)& aReferer = entIt.Value();
+      aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aReferer);
+      if ( !aSDR.IsNull() )
+        break;
+    }
+
+    if ( aSDR.IsNull() )
+      continue;
+
+    // Access shape representation
+    Handle(StepShape_ShapeRepresentation)
+      aShapeRepr = Handle(StepShape_ShapeRepresentation)::DownCast( aSDR->UsedRepresentation() );
+
+    if ( aShapeRepr.IsNull() )
+      continue;
+
+    // Access representation items
+    Handle(StepRepr_HArray1OfRepresentationItem) aReprItems = aShapeRepr->Items();
+
+    if ( aReprItems.IsNull() )
+      continue;
+
+    if ( !ShapeLabelMap.IsBound(aRootShape) )
+      continue;
+
+    TDF_Label aRootLab = ShapeLabelMap.Find(aRootShape);
+
+    StepRepr_SequenceOfRepresentationItem aMSBSeq;
+    StepRepr_SequenceOfRepresentationItem aSBSMSeq;
+
+    // Iterate over the top level representation items collecting the
+    // topological containers to expand
+    for ( Standard_Integer i = aReprItems->Lower(); i <= aReprItems->Upper(); ++i )
+    {
+      Handle(StepRepr_RepresentationItem) aTRepr = aReprItems->Value(i);
+      if ( aTRepr->IsKind( STANDARD_TYPE(StepShape_ManifoldSolidBrep) ) )
+        aMSBSeq.Append(aTRepr);
+      else if ( aTRepr->IsKind( STANDARD_TYPE(StepShape_ShellBasedSurfaceModel) ) )
+        aSBSMSeq.Append(aTRepr);
+    }
+
+    // Insert intermediate OCAF Labels for SOLIDs in case there are more
+    // than one Manifold Solid BRep in the Shape Representation
+    Standard_Boolean doInsertSolidLab = (aMSBSeq.Length() > 1);
+
+    // Expand Manifold Solid BReps
+    for ( Standard_Integer i = 1; i <= aMSBSeq.Length(); ++i )
+    {
+      const Handle(StepRepr_RepresentationItem)& aManiRepr = aMSBSeq.Value(i);
+
+      // Put additional Label for SOLID
+      TDF_Label aManiLab;
+      if ( doInsertSolidLab )
+        aManiLab = SettleShapeData(aManiRepr, aRootLab, ShapeTool, TP);
+      else
+        aManiLab = aRootLab;
+
+      ExpandManifoldSolidBrep(aManiLab, aMSBSeq.Value(i), TP, ShapeTool);
+    }
+
+    // Expand Shell-Based Surface Models
+    for ( Standard_Integer i = 1; i <= aSBSMSeq.Length(); ++i )
+      ExpandSBSM(aRootLab, aSBSMSeq.Value(i), TP, ShapeTool);
+  }
+}
+
+//=======================================================================
+//function : ExpandManifoldSolidBrep
+//purpose  :
+//=======================================================================
+
+void STEPCAFControl_Reader::ExpandManifoldSolidBrep(TDF_Label& ShapeLab,
+                                                    const Handle(StepRepr_RepresentationItem)& Repr,
+                                                    const Handle(Transfer_TransientProcess)& TP,
+                                                    const Handle(XCAFDoc_ShapeTool)& ShapeTool) const
+{
+  // Access outer shell
+  Handle(StepShape_ManifoldSolidBrep) aMSB = Handle(StepShape_ManifoldSolidBrep)::DownCast(Repr);
+  Handle(StepShape_ClosedShell) aShell = aMSB->Outer();
+
+  // Expand shell contents to CAF tree
+  ExpandShell(aShell, ShapeLab, TP, ShapeTool);
+}
+
+//=======================================================================
+//function : ExpandSBSM
+//purpose  :
+//=======================================================================
+
+void STEPCAFControl_Reader::ExpandSBSM(TDF_Label& ShapeLab,
+                                       const Handle(StepRepr_RepresentationItem)& Repr,
+                                       const Handle(Transfer_TransientProcess)& TP,
+                                       const Handle(XCAFDoc_ShapeTool)& ShapeTool) const
+{
+  Handle(StepShape_ShellBasedSurfaceModel) aSBSM = Handle(StepShape_ShellBasedSurfaceModel)::DownCast(Repr);
+
+  // Access boundary shells
+  Handle(StepShape_HArray1OfShell) aShells = aSBSM->SbsmBoundary();
+  for ( Standard_Integer s = aShells->Lower(); s <= aShells->Upper(); ++s )
+  {
+    const StepShape_Shell& aShell = aShells->Value(s);
+    Handle(StepShape_ConnectedFaceSet) aCFS;
+    Handle(StepShape_OpenShell) anOpenShell = aShell.OpenShell();
+    Handle(StepShape_ClosedShell) aClosedShell = aShell.ClosedShell();
+
+    if ( !anOpenShell.IsNull() )
+      aCFS = anOpenShell;
+    else
+      aCFS = aClosedShell;
+
+    ExpandShell(aCFS, ShapeLab, TP, ShapeTool);
+  }
+}
+
+//=======================================================================
+//function : ExpandShell
+//purpose  :
+//=======================================================================
+
+void STEPCAFControl_Reader::ExpandShell(const Handle(StepShape_ConnectedFaceSet)& Shell,
+                                        TDF_Label& RootLab,
+                                        const Handle(Transfer_TransientProcess)& TP,
+                                        const Handle(XCAFDoc_ShapeTool)& ShapeTool) const
+{
+  // Record CAF data
+  TDF_Label aShellLab = SettleShapeData(Shell, RootLab, ShapeTool, TP);
+
+  // Access faces
+  Handle(StepShape_HArray1OfFace) aFaces = Shell->CfsFaces();
+  for ( Standard_Integer f = aFaces->Lower(); f <= aFaces->Upper(); ++f )
+  {
+    const Handle(StepShape_Face)& aFace = aFaces->Value(f);
+
+    // Record CAF data
+    TDF_Label aFaceLab = SettleShapeData(aFace, aShellLab, ShapeTool, TP);
+
+    // Access face bounds
+    Handle(StepShape_HArray1OfFaceBound) aWires = aFace->Bounds();
+    for ( Standard_Integer w = aWires->Lower(); w <= aWires->Upper(); ++w )
+    {
+      const Handle(StepShape_Loop)& aWire = aWires->Value(w)->Bound();
+
+      // Record CAF data
+      TDF_Label aWireLab = SettleShapeData(aWire, aFaceLab, ShapeTool, TP);
+
+      // Access wire edges
+      // Currently only EDGE LOOPs are considered (!)
+      if ( !aWire->IsInstance( STANDARD_TYPE(StepShape_EdgeLoop) ) )
+        continue;
+
+      // Access edges
+      Handle(StepShape_EdgeLoop) anEdgeLoop = Handle(StepShape_EdgeLoop)::DownCast(aWire);
+      Handle(StepShape_HArray1OfOrientedEdge) anEdges = anEdgeLoop->EdgeList();
+      for ( Standard_Integer e = anEdges->Lower(); e <= anEdges->Upper(); ++e )
+      {
+        Handle(StepShape_Edge) anEdge = anEdges->Value(e)->EdgeElement();
+
+        // Record CAF data
+        TDF_Label anEdgeLab = SettleShapeData(anEdge, aWireLab, ShapeTool, TP);
+
+        // Access vertices
+        Handle(StepShape_Vertex) aV1 = anEdge->EdgeStart();
+        Handle(StepShape_Vertex) aV2 = anEdge->EdgeEnd();
+
+        // Record CAF data
+        SettleShapeData(aV1, anEdgeLab, ShapeTool, TP);
+        SettleShapeData(aV2, anEdgeLab, ShapeTool, TP);
+      }
+    }
+  }
+}
 
 //=======================================================================
 //function : SetColorMode
diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx
index 51765e7..468d4f9 100644
--- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx
+++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx
@@ -77,6 +77,7 @@
 #include <TColStd_HSequenceOfTransient.hxx>
 #include <TDF_Tool.hxx>
 #include <Message_Messenger.hxx>
+#include <TDF_ChildIterator.hxx>
 
 #include <Transfer_Binder.hxx>
 #include <Transfer_TransientListBinder.hxx>
@@ -544,6 +545,45 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer,
   // refresh graph
   writer.WS()->ComputeGraph ( Standard_True );
 
+  /* ================================
+    *  Write names for the sub-shapes
+    * ================================ */
+
+  if ( Interface_Static::IVal("write.stepcaf.subshapes.name") )
+  {
+    Handle(XSControl_TransferWriter) TW = this->ChangeWriter().WS()->TransferWriter();
+    Handle(Transfer_FinderProcess) FP = TW->FinderProcess();
+
+    for ( int i = 1; i <= labels.Length(); i++ )
+    {
+      TDF_Label L = labels.Value(i);
+
+      for ( TDF_ChildIterator it(L, Standard_True); it.More(); it.Next() )
+      {
+        TDF_Label SubL = it.Value();
+
+        // Access name recorded in OCAF TDataStd_Name attribute
+        Handle(TCollection_HAsciiString) hSubName = new TCollection_HAsciiString;
+        if ( !GetLabelName(SubL, hSubName) )
+          continue;
+
+        // Access topological data
+        TopoDS_Shape SubS = XCAFDoc_ShapeTool::GetShape(SubL);
+        if ( SubS.IsNull() )
+          continue;
+
+        // Access the correspondent STEP Representation Item
+        Handle(StepRepr_RepresentationItem) RI;
+        Handle(TransferBRep_ShapeMapper) aShMapper = TransferBRep::ShapeMapper(FP, SubS);
+        if ( !FP->FindTypedTransient(aShMapper, STANDARD_TYPE(StepRepr_RepresentationItem), RI) )
+          continue;
+
+        // Record the name
+        RI->SetName(hSubName);
+      }
+    }
+  }
+
   return Standard_True;
 }
 
diff --git a/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx b/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx
index c99b8ff..824648c 100644
--- a/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx
+++ b/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx
@@ -23,6 +23,7 @@
 //pdn,gka 10.06.99 S4189: command DT_ShapeConvertRev added
 
 #include <SWDRAW_ShapeUpgrade.ixx>
+//#include <SWDRAW_ShapeUpgrade.hxx>
 
 #include <DBRep.hxx>
 #include <ShapeUpgrade.hxx>
@@ -82,6 +83,7 @@
 #include <ShapeUpgrade_ShapeDivideClosed.hxx>
 #include <ShapeUpgrade_RemoveInternalWires.hxx>
 #include <ShapeUpgrade_RemoveLocations.hxx>
+#include <ShapeUpgrade_UnifySameDomain.hxx>
 #include <BRepBuilderAPI_Transform.hxx>
 
 // the plane (equation z=0) shared by PlaneDividedFaceContinuity and PlaneGridShell
@@ -1445,6 +1447,27 @@ static Standard_Integer removeloc (Draw_Interpretor& di,
   DBRep::Set(argv[1],aNewShape);
   return 0;
 }
+
+//=======================================================================
+// unifysamedom
+//=======================================================================
+static Standard_Integer unifysamedom(Draw_Interpretor& , Standard_Integer n, const char** a)
+{
+  if (n < 3)
+    return 1;
+
+  TopoDS_Shape aShape = DBRep::Get(a[2]);
+  if (aShape.IsNull())
+    return 1;
+
+  ShapeUpgrade_UnifySameDomain Unifier(aShape);
+  Unifier.Build();
+  TopoDS_Shape Result = Unifier.Shape();
+
+  DBRep::Set(a[1], Result);
+  return 0;
+}
+
 static Standard_Integer copytranslate(Draw_Interpretor& di, 
                                    Standard_Integer argc, 
                                    const char** argv)
@@ -1565,5 +1588,9 @@ static Standard_Integer copytranslate(Draw_Interpretor& di,
                    __FILE__,removeinternalwires,g);
   
   theCommands.Add ("removeloc","result shape",__FILE__,removeloc,g);
+  
+  theCommands.Add ("unifysamedom",
+                   "unifysamedom result shape",__FILE__,unifysamedom,g);
+  
   theCommands.Add ("copytranslate","result shape dx dy dz",__FILE__,copytranslate,g);
 }
diff --git a/src/ShapeAnalysis/ShapeAnalysis_Curve.cxx b/src/ShapeAnalysis/ShapeAnalysis_Curve.cxx
index 36cf841..ac8f8eb 100644
--- a/src/ShapeAnalysis/ShapeAnalysis_Curve.cxx
+++ b/src/ShapeAnalysis/ShapeAnalysis_Curve.cxx
@@ -980,7 +980,7 @@ Standard_Boolean ShapeAnalysis_Curve::IsPlanar (const TColgp_Array1OfPnt& pnts,
       return Standard_True;
     }
     gp_XYZ aVecMul = N1^Normal;
-    return aVecMul.SquareModulus() < Precision::Confusion()*Precision::Confusion();
+    return aVecMul.SquareModulus() < Precision::SquareConfusion();
   }
 
   if (curve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
diff --git a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx
index ef1b8a5..dfb50f3 100644
--- a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx
+++ b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx
@@ -228,7 +228,7 @@ void ShapeAnalysis_WireOrder::Perform(const Standard_Boolean /*closed*/)
     fins(i) = myXYZ->Value(2*i);
   }
 
-  Standard_Real tol2 = Precision::Confusion()*Precision::Confusion();
+  Standard_Real tol2 = Precision::SquareConfusion();
   idone(1) = Standard_True;
   gp_Pnt wireFirst = debs(1);
   gp_Pnt wireLast  = fins(1);
diff --git a/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx b/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx
index 4ae4b77..89c2ddf 100644
--- a/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx
+++ b/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx
@@ -729,7 +729,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
 
     if(myDeg) {
       if(MaxSeg < myParameters->GMaxSeg()){ 
-        if(aCV != 0 || aCV != 0) {
+        if(aCV != 0 || aCU != 0) {
           if(aCV > 0) aCV--;
           if(aCU > 0) aCU--;
         }
diff --git a/src/ShapeFix/ShapeFix_EdgeProjAux.cxx b/src/ShapeFix/ShapeFix_EdgeProjAux.cxx
index b07ccd1..ddb5cad 100644
--- a/src/ShapeFix/ShapeFix_EdgeProjAux.cxx
+++ b/src/ShapeFix/ShapeFix_EdgeProjAux.cxx
@@ -282,7 +282,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
   cf = theCurve2d->FirstParameter();
   cl = theCurve2d->LastParameter();
   //pdn cutting pcurve by suface bounds
-  if (Precision::IsInfinite(cf)||Precision::IsInfinite(cf)) {
+  if (Precision::IsInfinite(cf)||Precision::IsInfinite(cl)) {
     if(theCurve2d->IsKind(STANDARD_TYPE(Geom2d_Line))) {
       Standard_Real uf,ul,vf,vl;
       theSurface->Bounds(uf,ul,vf,vl);
diff --git a/src/ShapeFix/ShapeFix_Face.cxx b/src/ShapeFix/ShapeFix_Face.cxx
index 440b575..0940260 100644
--- a/src/ShapeFix/ShapeFix_Face.cxx
+++ b/src/ShapeFix/ShapeFix_Face.cxx
@@ -588,7 +588,7 @@ Standard_Boolean ShapeFix_Face::Perform()
           B.Add (tmpFace,iter.Value());
           continue;
         }
-        if(iter.Value().Orientation() != TopAbs_FORWARD || 
+        if(iter.Value().Orientation() != TopAbs_FORWARD && 
            iter.Value().Orientation() != TopAbs_REVERSED) {
           B.Add (tmpFace,TopoDS::Wire(iter.Value()));
           continue;
@@ -1704,7 +1704,7 @@ Standard_Boolean ShapeFix_Face::FixSmallAreaWire()
   Standard_Real prec = ::Precision::PConfusion()*100;
   for (TopoDS_Iterator wi (myFace, Standard_False); wi.More(); wi.Next()) {
     if(wi.Value().ShapeType() != TopAbs_WIRE && 
-       (wi.Value().Orientation() != TopAbs_FORWARD || wi.Value().Orientation() != TopAbs_REVERSED))
+       (wi.Value().Orientation() != TopAbs_FORWARD && wi.Value().Orientation() != TopAbs_REVERSED))
         continue;
     TopoDS_Wire wire = TopoDS::Wire ( wi.Value() );
     Handle(ShapeAnalysis_Wire) saw = new ShapeAnalysis_Wire(wire,myFace,prec);
diff --git a/src/ShapeFix/ShapeFix_Shell.cxx b/src/ShapeFix/ShapeFix_Shell.cxx
index f417091..59b9e02 100644
--- a/src/ShapeFix/ShapeFix_Shell.cxx
+++ b/src/ShapeFix/ShapeFix_Shell.cxx
@@ -46,6 +46,7 @@
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 
+#include <ShapeAnalysis_Shell.hxx>
 #include <ShapeExtend.hxx>
 #include <ShapeBuild_ReShape.hxx> 
 #include <Message_Msg.hxx>
@@ -148,6 +149,25 @@ Standard_Boolean ShapeFix_Shell::Perform(const Handle(Message_ProgressIndicator)
   TopoDS_Shape newsh = Context()->Apply(myShell);
   if ( NeedFix ( myFixOrientationMode) )
     FixFaceOrientation(TopoDS::Shell(newsh));
+
+  TopoDS_Shape aNewsh = Context()->Apply (newsh);
+  ShapeAnalysis_Shell aSas;
+  for (TopExp_Explorer aShellExp (aNewsh, TopAbs_SHELL); aShellExp.More(); aShellExp.Next())
+  {
+    TopoDS_Shell aCurShell = TopoDS::Shell (aShellExp.Current());
+    if (aCurShell.Closed())
+    {
+      aSas.LoadShells (aCurShell);
+      aSas.CheckOrientedShells (aCurShell, Standard_True);
+      if (aSas.HasFreeEdges())
+      {
+        aCurShell.Closed (Standard_False);
+        SendWarning (Message_Msg ("FixAdvShell.FixClosedFlag.MSG0"));//Shell has incorrect flag isClosed
+      }
+      aSas.Clear();
+	}
+  }
+
   if ( status )
     myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE1 );
   if(Status(ShapeExtend_DONE2))
diff --git a/src/ShapeFix/ShapeFix_Wireframe.cxx b/src/ShapeFix/ShapeFix_Wireframe.cxx
index c69fd88..af8ecf7 100644
--- a/src/ShapeFix/ShapeFix_Wireframe.cxx
+++ b/src/ShapeFix/ShapeFix_Wireframe.cxx
@@ -696,7 +696,7 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
 		  C2->D1(first2,P,Vec2);
 		  if ( edge1.Orientation() == TopAbs_REVERSED ) Vec1.Reverse();
 		  if ( edge2.Orientation() == TopAbs_REVERSED ) Vec2.Reverse();
-		  Standard_Real tol2 = Precision::Confusion() * Precision::Confusion();
+          Standard_Real tol2 = Precision::SquareConfusion();
 		  if ( Vec1.SquareMagnitude() < tol2 ||
 		       Vec2.SquareMagnitude() < tol2 ) Ang1 = M_PI/2.;
 		  else Ang1 = Abs(Vec1.Angle(Vec2));
@@ -1136,7 +1136,7 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
 		  C2->D1(first2,P,Vec2);
 		  if ( edge1.Orientation() == TopAbs_REVERSED ) Vec1.Reverse();
 		  if ( edge2.Orientation() == TopAbs_REVERSED ) Vec2.Reverse();
-		  Standard_Real tol2 = Precision::Confusion() * Precision::Confusion();
+          Standard_Real tol2 = Precision::SquareConfusion();
 		  if ( Vec1.SquareMagnitude() < tol2 ||
 		       Vec2.SquareMagnitude() < tol2 ) Ang1 = M_PI/2.;
 		  else Ang1 = Abs(Vec1.Angle(Vec2));
diff --git a/src/ShapeUpgrade/ShapeUpgrade.cdl b/src/ShapeUpgrade/ShapeUpgrade.cdl
index bb0e87f..a914fdb 100644
--- a/src/ShapeUpgrade/ShapeUpgrade.cdl
+++ b/src/ShapeUpgrade/ShapeUpgrade.cdl
@@ -115,6 +115,9 @@ is
     class RemoveInternalWires;
     ---Purpose: Removes all internal wires having area less than specified min area
     
+    class UnifySameDomain;
+    ---Purpose: Unifies same domain faces and edges of specified shape
+    
     C0BSplineToSequenceOfC1BSplineCurve (BS   : BSplineCurve from Geom;
     	    	    	    	         seqBS: out HSequenceOfBoundedCurve from TColGeom)
     returns Boolean;
diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cdl b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cdl
new file mode 100644
index 0000000..df0e9e4
--- /dev/null
+++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cdl
@@ -0,0 +1,63 @@
+-- File:      ShapeUpgrade_UnifySameDomain.cdl
+-- Created:   09.06.12 13:48:36
+-- Author:    jgv at ROLEX
+---Copyright: Open CASCADE 2012
+
+class UnifySameDomain from ShapeUpgrade inherits TShared from MMgt
+
+	---Purpose: Unifies same domain faces and edges of specified shape
+
+uses
+    Shape from TopoDS,
+    ListOfShape from TopTools,
+    ReShape from ShapeBuild
+
+is
+    Create returns UnifySameDomain from ShapeUpgrade;
+    ---Purpose: empty constructor
+
+    Create(aShape: Shape from TopoDS;
+    	   UnifyEdges: Boolean from Standard = Standard_True;
+	   UnifyFaces: Boolean from Standard = Standard_True;
+    	   ConcatBSplines: Boolean from Standard = Standard_False)
+    returns UnifySameDomain from ShapeUpgrade;
+    
+    Initialize(me: mutable; aShape: Shape from TopoDS;
+    	       UnifyEdges: Boolean from Standard = Standard_True;
+	       UnifyFaces: Boolean from Standard = Standard_True;
+    	       ConcatBSplines: Boolean from Standard = Standard_False);
+    
+    Build( me : mutable );
+    	---Purpose: Builds the resulting shape
+    
+    Shape(me) returns Shape from TopoDS;
+    	---C++: return const &
+    	---Purpose: Gives the resulting shape
+    
+    Generated (me; aShape : Shape from TopoDS)
+    returns Shape from TopoDS;
+    
+    UnifyFaces(me: mutable);
+    ---Purpose: this method makes if possible a common face from each
+    --          group of faces lying on coincident surfaces
+
+    UnifyEdges(me: mutable);
+    ---Purpose: this method makes if possible a common edge from each
+    --          group of edges connecting common couple of faces
+
+    UnifyFacesAndEdges(me: mutable);
+    ---Purpose: this method unifies same domain faces and edges
+
+fields
+    
+    myInitShape : Shape from TopoDS;
+    myUnifyFaces : Boolean from Standard;
+    myUnifyEdges : Boolean from Standard;
+    myConcatBSplines : Boolean from Standard;
+    
+    myShape : Shape from TopoDS;
+    
+    myContext   : ReShape from ShapeBuild;
+    --myOldNewMap : DataMapOfShapeShape  from TopTools;
+    
+end UnifySameDomain;
diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx
new file mode 100644
index 0000000..fb50b3a
--- /dev/null
+++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx
@@ -0,0 +1,1397 @@
+// File:      ShapeUpgrade_UnifySameDomain.cxx
+// Created:   09.06.12 14:35:07
+// Author:    jgv at ROLEX
+// Copyright: Open CASCADE 2012
+
+#include <ShapeUpgrade_UnifySameDomain.ixx>
+#include <ShapeUpgrade_UnifySameDomain.hxx>
+#include <TopTools_SequenceOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopExp_Explorer.hxx>
+#include <Geom_Surface.hxx>
+#include <Geom_Line.hxx>
+#include <gp_Dir.hxx>
+#include <Geom_CylindricalSurface.hxx>
+#include <gp_Cylinder.hxx>
+#include <Geom_SurfaceOfRevolution.hxx>
+#include <Geom_SurfaceOfLinearExtrusion.hxx>
+#include <gp_Lin.hxx>
+#include <Geom_Circle.hxx>
+#include <Geom_RectangularTrimmedSurface.hxx>
+#include <TopoDS_Face.hxx>
+#include <BRep_Tool.hxx>
+#include <GeomAdaptor_HSurface.hxx>
+#include <BRepTopAdaptor_TopolTool.hxx>
+#include <IntPatch_ImpImpIntersection.hxx>
+#include <GeomLib_IsPlanarSurface.hxx>
+#include <BRep_Builder.hxx>
+#include <ShapeFix_Wire.hxx>
+#include <TopoDS.hxx>
+#include <ShapeAnalysis_Edge.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TColGeom_SequenceOfSurface.hxx>
+#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
+#include <BRep_TEdge.hxx>
+#include <BRep_CurveRepresentation.hxx>
+#include <TColGeom_Array1OfBSplineCurve.hxx>
+#include <TColGeom_HArray1OfBSplineCurve.hxx>
+#include <TColGeom2d_Array1OfBSplineCurve.hxx>
+#include <TColGeom2d_HArray1OfBSplineCurve.hxx>
+#include <TColStd_Array1OfReal.hxx>
+#include <TopExp.hxx>
+#include <Geom_TrimmedCurve.hxx>
+#include <Geom2d_TrimmedCurve.hxx>
+#include <GeomConvert.hxx>
+#include <Geom2dConvert.hxx>
+#include <GeomConvert_CompCurveToBSplineCurve.hxx>
+#include <Geom2dConvert_CompCurveToBSplineCurve.hxx>
+#include <TColGeom2d_SequenceOfBoundedCurve.hxx>
+#include <BRepLib_MakeEdge.hxx>
+#include <TColStd_MapOfInteger.hxx>
+#include <BRepLib.hxx>
+#include <GC_MakeCircle.hxx>
+#include <Geom_BezierCurve.hxx>
+#include <ShapeBuild_ReShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <ShapeAnalysis_WireOrder.hxx>
+#include <ShapeBuild_Edge.hxx>
+#include <Geom2d_Line.hxx>
+#include <ShapeFix_Face.hxx>
+#include <TColGeom_HArray2OfSurface.hxx>
+#include <ShapeExtend_CompositeSurface.hxx>
+#include <ShapeFix_ComposeShell.hxx>
+#include <ShapeFix_SequenceOfWireSegment.hxx>
+#include <ShapeFix_WireSegment.hxx>
+#include <ShapeFix_Edge.hxx>
+#include <ShapeFix_Shell.hxx>
+#include <ShapeUpgrade_RemoveLocations.hxx>
+
+
+//=======================================================================
+//function : AddOrdinaryEdges
+//purpose  : auxilary
+//=======================================================================
+// adds edges from the shape to the sequence
+// seams and equal edges are dropped
+// Returns true if one of original edges dropped
+static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
+                                         const TopoDS_Shape aShape,
+                                         Standard_Integer& anIndex)
+{
+  //map of edges
+  TopTools_IndexedMapOfShape aNewEdges;
+  //add edges without seams
+  for(TopExp_Explorer exp(aShape,TopAbs_EDGE); exp.More(); exp.Next()) {
+    TopoDS_Shape edge = exp.Current();
+    if(aNewEdges.Contains(edge))
+    {
+      //aNewEdges.Remove(edge);
+      TopoDS_Shape LastEdge = aNewEdges(aNewEdges.Extent());
+      aNewEdges.RemoveLast();
+      if (aNewEdges.FindIndex(edge) != 0)
+        aNewEdges.Substitute(aNewEdges.FindIndex(edge), LastEdge);
+      /////////////////////////
+    }
+    else
+      aNewEdges.Add(edge);
+  }
+
+  Standard_Boolean isDropped = Standard_False;
+  //merge edges and drop seams
+  Standard_Integer i;
+  for (i = 1; i <= edges.Length(); i++) {
+    TopoDS_Shape current = edges(i);
+    if(aNewEdges.Contains(current)) {
+
+      //aNewEdges.Remove(current);
+      TopoDS_Shape LastEdge = aNewEdges(aNewEdges.Extent());
+      aNewEdges.RemoveLast();
+      if (aNewEdges.FindIndex(current) != 0)
+        aNewEdges.Substitute(aNewEdges.FindIndex(current), LastEdge);
+      /////////////////////////
+      edges.Remove(i);
+      i--;
+
+      if(!isDropped) {
+        isDropped = Standard_True;
+        anIndex = i;
+      }
+    }
+  }
+
+  //add edges to the sequemce
+  for (i = 1; i <= aNewEdges.Extent(); i++)
+    edges.Append(aNewEdges(i));
+
+  return isDropped;
+}
+
+//=======================================================================
+//function : getCylinder
+//purpose  : auxilary
+//=======================================================================
+static Standard_Boolean getCylinder(Handle(Geom_Surface)& theInSurface,
+                                    gp_Cylinder& theOutCylinder)
+{
+  Standard_Boolean isCylinder = Standard_False;
+
+  if (theInSurface->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) {
+    Handle(Geom_CylindricalSurface) aGC = Handle(Geom_CylindricalSurface)::DownCast(theInSurface);
+
+    theOutCylinder = aGC->Cylinder();
+    isCylinder = Standard_True;
+  }
+  else if (theInSurface->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution))) {
+    Handle(Geom_SurfaceOfRevolution) aRS =
+      Handle(Geom_SurfaceOfRevolution)::DownCast(theInSurface);
+    Handle(Geom_Curve) aBasis = aRS->BasisCurve();
+    if (aBasis->IsKind(STANDARD_TYPE(Geom_Line))) {
+      Handle(Geom_Line) aBasisLine = Handle(Geom_Line)::DownCast(aBasis);
+      gp_Dir aDir = aRS->Direction();
+      gp_Dir aBasisDir = aBasisLine->Position().Direction();
+      if (aBasisDir.IsParallel(aDir, Precision::Angular())) {
+        // basis line is parallel to the revolution axis: it is a cylinder
+        gp_Pnt aLoc = aRS->Location();
+        Standard_Real aR = aBasisLine->Lin().Distance(aLoc);
+        gp_Ax3 aCylAx (aLoc, aDir);
+
+        theOutCylinder = gp_Cylinder(aCylAx, aR);
+        isCylinder = Standard_True;
+      }
+    }
+  }
+  else if (theInSurface->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion))) {
+    Handle(Geom_SurfaceOfLinearExtrusion) aLES =
+      Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(theInSurface);
+    Handle(Geom_Curve) aBasis = aLES->BasisCurve();
+    if (aBasis->IsKind(STANDARD_TYPE(Geom_Circle))) {
+      Handle(Geom_Circle) aBasisCircle = Handle(Geom_Circle)::DownCast(aBasis);
+      gp_Dir aDir = aLES->Direction();
+      gp_Dir aBasisDir = aBasisCircle->Position().Direction();
+      if (aBasisDir.IsParallel(aDir, Precision::Angular())) {
+        // basis circle is normal to the extrusion axis: it is a cylinder
+        gp_Pnt aLoc = aBasisCircle->Location();
+        Standard_Real aR = aBasisCircle->Radius();
+        gp_Ax3 aCylAx (aLoc, aDir);
+
+        theOutCylinder = gp_Cylinder(aCylAx, aR);
+        isCylinder = Standard_True;
+      }
+    }
+  }
+  else {
+  }
+
+  return isCylinder;
+}
+
+//=======================================================================
+//function : ClearRts
+//purpose  : auxilary
+//=======================================================================
+static Handle(Geom_Surface) ClearRts(const Handle(Geom_Surface)& aSurface)
+{
+  if(aSurface->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
+    Handle(Geom_RectangularTrimmedSurface) rts =
+      Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurface);
+    return rts->BasisSurface();
+  }
+  return aSurface;
+}
+
+//=======================================================================
+//function : IsSameDomain
+//purpose  : 
+//=======================================================================
+static Standard_Boolean IsSameDomain(const TopoDS_Face& aFace,
+                                     const TopoDS_Face& aCheckedFace)
+{
+  //checking the same handles
+  TopLoc_Location L1, L2;
+  Handle(Geom_Surface) S1, S2;
+
+  S1 = BRep_Tool::Surface(aFace,L1);
+  S2 = BRep_Tool::Surface(aCheckedFace,L2);
+
+  if (S1 == S2 && L1 == L2)
+    return Standard_True;
+
+  // planar and cylindrical cases (IMP 20052)
+  Standard_Real aPrec = Precision::Confusion();
+
+  S1 = BRep_Tool::Surface(aFace);
+  S2 = BRep_Tool::Surface(aCheckedFace);
+
+  S1 = ClearRts(S1);
+  S2 = ClearRts(S2);
+
+  //Handle(Geom_OffsetSurface) aGOFS1, aGOFS2;
+  //aGOFS1 = Handle(Geom_OffsetSurface)::DownCast(S1);
+  //aGOFS2 = Handle(Geom_OffsetSurface)::DownCast(S2);
+  //if (!aGOFS1.IsNull()) S1 = aGOFS1->BasisSurface();
+  //if (!aGOFS2.IsNull()) S2 = aGOFS2->BasisSurface();
+
+  // case of two elementary surfaces: use OCCT tool
+  // elementary surfaces: ConicalSurface, CylindricalSurface,
+  //                      Plane, SphericalSurface and ToroidalSurface
+  if (S1->IsKind(STANDARD_TYPE(Geom_ElementarySurface)) &&
+      S2->IsKind(STANDARD_TYPE(Geom_ElementarySurface)))
+  {
+    Handle(GeomAdaptor_HSurface) aGA1 = new GeomAdaptor_HSurface(S1);
+    Handle(GeomAdaptor_HSurface) aGA2 = new GeomAdaptor_HSurface(S2);
+
+    Handle(BRepTopAdaptor_TopolTool) aTT1 = new BRepTopAdaptor_TopolTool();
+    Handle(BRepTopAdaptor_TopolTool) aTT2 = new BRepTopAdaptor_TopolTool();
+
+    try {
+      IntPatch_ImpImpIntersection anIIInt (aGA1, aTT1, aGA2, aTT2, aPrec, aPrec);
+      if (!anIIInt.IsDone() || anIIInt.IsEmpty())
+        return Standard_False;
+
+      return anIIInt.TangentFaces();
+    }
+    catch (Standard_Failure) {
+      return Standard_False;
+    }
+  }
+
+  // case of two planar surfaces:
+  // all kinds of surfaces checked, including b-spline and bezier
+  GeomLib_IsPlanarSurface aPlanarityChecker1 (S1, aPrec);
+  if (aPlanarityChecker1.IsPlanar()) {
+    GeomLib_IsPlanarSurface aPlanarityChecker2 (S2, aPrec);
+    if (aPlanarityChecker2.IsPlanar()) {
+      gp_Pln aPln1 = aPlanarityChecker1.Plan();
+      gp_Pln aPln2 = aPlanarityChecker2.Plan();
+
+      if (aPln1.Position().Direction().IsParallel(aPln2.Position().Direction(),Precision::Angular()) &&
+          aPln1.Distance(aPln2) < aPrec) {
+        return Standard_True;
+      }
+    }
+  }
+
+  // case of two cylindrical surfaces, at least one of which is a swept surface
+  // swept surfaces: SurfaceOfLinearExtrusion, SurfaceOfRevolution
+  if ((S1->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ||
+       S1->IsKind(STANDARD_TYPE(Geom_SweptSurface))) &&
+      (S2->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ||
+       S2->IsKind(STANDARD_TYPE(Geom_SweptSurface))))
+  {
+    gp_Cylinder aCyl1, aCyl2;
+    if (getCylinder(S1, aCyl1) && getCylinder(S2, aCyl2)) {
+      if (fabs(aCyl1.Radius() - aCyl2.Radius()) < aPrec) {
+        gp_Dir aDir1 = aCyl1.Position().Direction();
+        gp_Dir aDir2 = aCyl2.Position().Direction();
+        if (aDir1.IsParallel(aDir2, Precision::Angular())) {
+          gp_Pnt aLoc1 = aCyl1.Location();
+          gp_Pnt aLoc2 = aCyl2.Location();
+          gp_Vec aVec12 (aLoc1, aLoc2);
+          if (aVec12.SquareMagnitude() < aPrec*aPrec ||
+              aVec12.IsParallel(aDir1, Precision::Angular())) {
+            return Standard_True;
+          }
+        }
+      }
+    }
+  }
+
+  return Standard_False;
+}
+
+//=======================================================================
+//function : MovePCurves
+//purpose  :
+//=======================================================================
+static void MovePCurves(TopoDS_Face& aTarget,
+                        const TopoDS_Face& aSource)
+{
+  BRep_Builder B;
+  for(TopExp_Explorer wexp(aSource,TopAbs_WIRE);wexp.More();wexp.Next()) {
+    Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(TopoDS::Wire(wexp.Current()),
+                                                  aTarget, Precision::Confusion());
+    sfw->FixReorder();
+    Standard_Boolean isReoredFailed = sfw->StatusReorder ( ShapeExtend_FAIL );
+    sfw->FixEdgeCurves();
+    if(isReoredFailed)
+      continue;
+
+    sfw->FixShifted();
+    sfw->FixDegenerated();
+
+    // remove degenerated edges from not degenerated points
+    ShapeAnalysis_Edge sae;
+    Handle(ShapeExtend_WireData) sewd = sfw->WireData();
+    for(Standard_Integer i = 1; i<=sewd->NbEdges();i++) {
+      TopoDS_Edge E = sewd->Edge(i);
+      if(BRep_Tool::Degenerated(E)&&!sae.HasPCurve(E,aTarget)) {
+        sewd->Remove(i);
+        i--;
+      }
+    }
+
+    TopoDS_Wire ResWire = sfw->Wire();
+    B.Add(aTarget,ResWire);
+  }
+}
+
+//=======================================================================
+//function : GlueEdgesWithPCurves
+//purpose  : Glues the pcurves of the sequence of edges
+//           and glues their 3d curves
+//=======================================================================
+static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain,
+                                        const TopoDS_Vertex& FirstVertex,
+                                        const TopoDS_Vertex& LastVertex)
+{
+  Standard_Integer i, j;
+
+  TopoDS_Edge FirstEdge = TopoDS::Edge(aChain(1));
+  //TColGeom2d_SequenceOfCurve PCurveSeq;
+  TColGeom_SequenceOfSurface SurfSeq;
+  //TopTools_SequenceOfShape LocSeq;
+  
+  BRep_ListIteratorOfListOfCurveRepresentation itr( (Handle(BRep_TEdge)::DownCast(FirstEdge.TShape()))->Curves() );
+  for (; itr.More(); itr.Next())
+  {
+    Handle(BRep_CurveRepresentation) CurveRep = itr.Value();
+    if (CurveRep->IsCurveOnSurface())
+    {
+      //PCurveSeq.Append(CurveRep->PCurve());
+      SurfSeq.Append(CurveRep->Surface());
+      /*
+      TopoDS_Shape aLocShape;
+      aLocShape.Location(CurveRep->Location());
+      LocSeq.Append(aLocShape);
+      */
+    }
+  }
+
+  Standard_Real fpar, lpar;
+  BRep_Tool::Range(FirstEdge, fpar, lpar);
+  TopoDS_Edge PrevEdge = FirstEdge;
+  TopoDS_Vertex CV;
+  Standard_Real MaxTol = 0.;
+  
+  TopoDS_Edge ResEdge;
+  BRep_Builder BB;
+
+  Standard_Integer nb_curve = aChain.Length();   //number of curves
+  TColGeom_Array1OfBSplineCurve tab_c3d(0,nb_curve-1);                    //array of the curves
+  TColStd_Array1OfReal tabtolvertex(0,nb_curve-1); //(0,nb_curve-2);  //array of the tolerances
+    
+  TopoDS_Vertex PrevVertex = FirstVertex;
+  for (i = 1; i <= nb_curve; i++)
+  {
+    TopoDS_Edge anEdge = TopoDS::Edge(aChain(i));
+    TopoDS_Vertex VF, VL;
+    TopExp::Vertices(anEdge, VF, VL);
+    Standard_Boolean ToReverse = (!VF.IsSame(PrevVertex));
+    
+    Standard_Real Tol1 = BRep_Tool::Tolerance(VF);
+    Standard_Real Tol2 = BRep_Tool::Tolerance(VL);
+    if (Tol1 > MaxTol)
+      MaxTol = Tol1;
+    if (Tol2 > MaxTol)
+      MaxTol = Tol2;
+    
+    if (i > 1)
+    {
+      TopExp::CommonVertex(PrevEdge, anEdge, CV);
+      Standard_Real Tol = BRep_Tool::Tolerance(CV);
+      tabtolvertex(i-2) = Tol;
+    }
+    
+    Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
+    Handle(Geom_TrimmedCurve) aTrCurve = new Geom_TrimmedCurve(aCurve, fpar, lpar);
+    tab_c3d(i-1) = GeomConvert::CurveToBSplineCurve(aTrCurve);
+    GeomConvert::C0BSplineToC1BSplineCurve(tab_c3d(i-1), Precision::Confusion());
+    if (ToReverse)
+      tab_c3d(i-1)->Reverse();
+    PrevVertex = (ToReverse)? VF : VL;
+    PrevEdge = anEdge;
+  }
+  Handle(TColGeom_HArray1OfBSplineCurve)  concatcurve;     //array of the concatenated curves
+  Handle(TColStd_HArray1OfInteger)        ArrayOfIndices;  //array of the remining Vertex
+  GeomConvert::ConcatC1(tab_c3d,
+                        tabtolvertex,
+                        ArrayOfIndices,
+                        concatcurve,
+                        Standard_False,
+                        Precision::Confusion());   //C1 concatenation
+  
+  if (concatcurve->Length() > 1)
+  {
+    GeomConvert_CompCurveToBSplineCurve Concat(concatcurve->Value(concatcurve->Lower()));
+    
+    for (i = concatcurve->Lower()+1; i <= concatcurve->Upper(); i++)
+      Concat.Add( concatcurve->Value(i), MaxTol, Standard_True );
+    
+    concatcurve->SetValue(concatcurve->Lower(), Concat.BSplineCurve());
+  }
+  Handle(Geom_BSplineCurve) ResCurve = concatcurve->Value(concatcurve->Lower());
+  
+  TColGeom2d_SequenceOfBoundedCurve ResPCurves;
+  TopLoc_Location aLoc;
+  for (j = 1; j <= SurfSeq.Length(); j++)
+  {
+    TColGeom2d_Array1OfBSplineCurve tab_c2d(0,nb_curve-1); //array of the pcurves
+    
+    PrevVertex = FirstVertex;
+    PrevEdge = FirstEdge;
+    //TopLoc_Location theLoc = LocSeq(j).Location();
+    for (i = 1; i <= nb_curve; i++)
+    {
+      TopoDS_Edge anEdge = TopoDS::Edge(aChain(i));
+      TopoDS_Vertex VF, VL;
+      TopExp::Vertices(anEdge, VF, VL);
+      Standard_Boolean ToReverse = (!VF.IsSame(PrevVertex));
+
+      /*
+      Handle(Geom2d_Curve) aPCurve =
+        BRep_Tool::CurveOnSurface(anEdge, SurfSeq(j), anEdge.Location()*theLoc, fpar, lpar);
+      */
+      Handle(Geom2d_Curve) aPCurve =
+        BRep_Tool::CurveOnSurface(anEdge, SurfSeq(j), aLoc, fpar, lpar);
+      Handle(Geom2d_TrimmedCurve) aTrPCurve = new Geom2d_TrimmedCurve(aPCurve, fpar, lpar);
+      tab_c2d(i-1) = Geom2dConvert::CurveToBSplineCurve(aTrPCurve);
+      Geom2dConvert::C0BSplineToC1BSplineCurve(tab_c2d(i-1), Precision::Confusion());
+      if (ToReverse)
+        tab_c2d(i-1)->Reverse();
+      PrevVertex = (ToReverse)? VF : VL;
+      PrevEdge = anEdge;
+    }
+    Handle(TColGeom2d_HArray1OfBSplineCurve)  concatc2d;     //array of the concatenated curves
+    Handle(TColStd_HArray1OfInteger)        ArrayOfInd2d;  //array of the remining Vertex
+    Geom2dConvert::ConcatC1(tab_c2d,
+                            tabtolvertex,
+                            ArrayOfInd2d,
+                            concatc2d,
+                            Standard_False,
+                            Precision::Confusion());   //C1 concatenation
+    
+    if (concatc2d->Length() > 1)
+    {
+      Geom2dConvert_CompCurveToBSplineCurve Concat2d(concatc2d->Value(concatc2d->Lower()));
+      
+      for (i = concatc2d->Lower()+1; i <= concatc2d->Upper(); i++)
+        Concat2d.Add( concatc2d->Value(i), MaxTol, Standard_True );
+      
+      concatc2d->SetValue(concatc2d->Lower(), Concat2d.BSplineCurve());
+    }
+    Handle(Geom2d_BSplineCurve) aResPCurve = concatc2d->Value(concatc2d->Lower());
+    ResPCurves.Append(aResPCurve);
+  }
+  
+  ResEdge = BRepLib_MakeEdge(ResCurve,
+                             FirstVertex, LastVertex,
+                             ResCurve->FirstParameter(), ResCurve->LastParameter());
+  BB.SameRange(ResEdge, Standard_False);
+  BB.SameParameter(ResEdge, Standard_False);
+  for (j = 1; j <= ResPCurves.Length(); j++)
+  {
+    BB.UpdateEdge(ResEdge, ResPCurves(j), SurfSeq(j), aLoc, MaxTol);
+    BB.Range(ResEdge, SurfSeq(j), aLoc, ResPCurves(j)->FirstParameter(), ResPCurves(j)->LastParameter());
+  }
+
+  BRepLib::SameParameter(ResEdge, MaxTol, Standard_True);
+  
+  return ResEdge;
+}
+
+//=======================================================================
+//function : MergeEdges
+//purpose  : auxilary
+//=======================================================================
+static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
+                                   const TopoDS_Face& aFace,
+                                   const Standard_Real Tol,
+                                   const Standard_Boolean ConcatBSplines,
+                                   TopoDS_Edge& anEdge)
+{
+  // make chain for union
+  BRep_Builder B;
+  ShapeAnalysis_Edge sae;
+  TopoDS_Edge FirstE = TopoDS::Edge(SeqEdges.Value(1));
+  TopoDS_Edge LastE = FirstE;
+  TopoDS_Vertex VF = sae.FirstVertex(FirstE);
+  TopoDS_Vertex VL = sae.LastVertex(LastE);
+  TopTools_SequenceOfShape aChain;
+  aChain.Append(FirstE);
+  TColStd_MapOfInteger IndUsedEdges;
+  IndUsedEdges.Add(1);
+  Standard_Integer j;
+  for (j = 1; j <= SeqEdges.Length(); j++)
+  {
+    TopoDS_Edge anEdge = TopoDS::Edge(SeqEdges(j));
+    if (BRep_Tool::Degenerated(anEdge))
+      return Standard_False;
+  }
+  
+  for(j=2; j<=SeqEdges.Length(); j++) {
+    for(Standard_Integer k=2; k<=SeqEdges.Length(); k++) {
+      if(IndUsedEdges.Contains(k)) continue;
+      TopoDS_Edge edge = TopoDS::Edge(SeqEdges.Value(k));
+      TopoDS_Vertex VF2 = sae.FirstVertex(edge);
+      TopoDS_Vertex VL2 = sae.LastVertex(edge);
+      if(sae.FirstVertex(edge).IsSame(VL)) {
+        aChain.Append(edge);
+        LastE = edge;
+        VL = sae.LastVertex(LastE);
+        IndUsedEdges.Add(k);
+      }
+      else if(sae.LastVertex(edge).IsSame(VF)) {
+        aChain.Prepend(edge);
+        FirstE = edge;
+        VF = sae.FirstVertex(FirstE);
+        IndUsedEdges.Add(k);
+      }
+    }
+  }
+  if(aChain.Length()<SeqEdges.Length()) {
+#ifdef DEB
+    cout<<"can not create correct chain..."<<endl;
+#endif
+    return Standard_False;
+  }
+  // union edges in chain
+  // first step: union lines and circles
+  TopLoc_Location Loc;
+  Standard_Real fp1,lp1,fp2,lp2;
+  for(j=1; j<aChain.Length(); j++) {
+    TopoDS_Edge edge1 = TopoDS::Edge(aChain.Value(j));
+    Handle(Geom_Curve) c3d1 = BRep_Tool::Curve(edge1,Loc,fp1,lp1);
+    if(c3d1.IsNull()) break;
+    while(c3d1->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
+      Handle(Geom_TrimmedCurve) tc =
+        Handle(Geom_TrimmedCurve)::DownCast(c3d1);
+      c3d1 = tc->BasisCurve();
+    }
+    TopoDS_Edge edge2 = TopoDS::Edge(aChain.Value(j+1));
+    Handle(Geom_Curve) c3d2 = BRep_Tool::Curve(edge2,Loc,fp2,lp2);
+    if(c3d2.IsNull()) break;
+    while(c3d2->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
+      Handle(Geom_TrimmedCurve) tc =
+        Handle(Geom_TrimmedCurve)::DownCast(c3d2);
+      c3d2 = tc->BasisCurve();
+    }
+    if( c3d1->IsKind(STANDARD_TYPE(Geom_Line)) && c3d2->IsKind(STANDARD_TYPE(Geom_Line)) ) {
+      // union lines
+      Handle(Geom_Line) L1 = Handle(Geom_Line)::DownCast(c3d1);
+      Handle(Geom_Line) L2 = Handle(Geom_Line)::DownCast(c3d2);
+      gp_Dir Dir1 = L1->Position().Direction();
+      gp_Dir Dir2 = L2->Position().Direction();
+      //if(!Dir1.IsEqual(Dir2,Precision::Angular())) { 
+      //if(!Dir1.IsParallel(Dir2,Precision::Angular())) { 
+      if(!Dir1.IsParallel(Dir2,Tol)) { 
+        continue;
+      }
+      // can union lines => create new edge
+      TopoDS_Vertex V1 = sae.FirstVertex(edge1);
+      gp_Pnt PV1 = BRep_Tool::Pnt(V1);
+      TopoDS_Vertex V2 = sae.LastVertex(edge2);
+      gp_Pnt PV2 = BRep_Tool::Pnt(V2);
+      gp_Vec Vec(PV1,PV2);
+      Handle(Geom_Line) L = new Geom_Line(gp_Ax1(PV1,Vec));
+      Standard_Real dist = PV1.Distance(PV2);
+      Handle(Geom_TrimmedCurve) tc = new Geom_TrimmedCurve(L,0.0,dist);
+      TopoDS_Edge E;
+      B.MakeEdge (E,tc,Precision::Confusion());
+      B.Add (E,V1);  B.Add (E,V2);
+      B.UpdateVertex(V1, 0., E, 0.);
+      B.UpdateVertex(V2, dist, E, 0.);
+      //ShapeFix_Edge sfe;
+      //sfe.FixAddPCurve(E,aFace,Standard_False);
+      //sfe.FixSameParameter(E);
+      aChain.Remove(j);
+      aChain.SetValue(j,E);
+      j--;
+    }
+    if( c3d1->IsKind(STANDARD_TYPE(Geom_Circle)) && c3d2->IsKind(STANDARD_TYPE(Geom_Circle)) ) {
+      // union circles
+      Handle(Geom_Circle) C1 = Handle(Geom_Circle)::DownCast(c3d1);
+      Handle(Geom_Circle) C2 = Handle(Geom_Circle)::DownCast(c3d2);
+      gp_Pnt P01 = C1->Location();
+      gp_Pnt P02 = C2->Location();
+      if (P01.Distance(P02) > Precision::Confusion()) continue;
+      // can union circles => create new edge
+      TopoDS_Vertex V1 = sae.FirstVertex(edge1);
+      gp_Pnt PV1 = BRep_Tool::Pnt(V1);
+      TopoDS_Vertex V2 = sae.LastVertex(edge2);
+      gp_Pnt PV2 = BRep_Tool::Pnt(V2);
+      TopoDS_Vertex VM = sae.LastVertex(edge1);
+      gp_Pnt PVM = BRep_Tool::Pnt(VM);
+      GC_MakeCircle MC (PV1,PVM,PV2);
+      Handle(Geom_Circle) C = MC.Value();
+      TopoDS_Edge E;
+      if (!MC.IsDone() || C.IsNull()) {
+        // jfa for Mantis issue 0020228
+        if (PV1.Distance(PV2) > Precision::Confusion()) continue;
+        // closed chain
+        C = C1;
+        B.MakeEdge (E,C,Precision::Confusion());
+        B.Add(E,V1);
+        B.Add(E,V2);
+      }
+      else {
+        gp_Pnt P0 = C->Location();
+        gp_Dir D1(gp_Vec(P0,PV1));
+        gp_Dir D2(gp_Vec(P0,PV2));
+        Standard_Real fpar = C->XAxis().Direction().Angle(D1);
+        if(fabs(fpar)>Precision::Confusion()) {
+          // check orientation
+          gp_Dir ND =  C->XAxis().Direction().Crossed(D1);
+          if(ND.IsOpposite(C->Axis().Direction(),Precision::Confusion())) {
+            fpar = -fpar;
+          }
+        }
+        Standard_Real lpar = C->XAxis().Direction().Angle(D2);
+        if(fabs(lpar)>Precision::Confusion()) {
+          // check orientation
+          gp_Dir ND =  C->XAxis().Direction().Crossed(D2);
+          if(ND.IsOpposite(C->Axis().Direction(),Precision::Confusion())) {
+            lpar = -lpar;
+          }
+        }
+        if (lpar < fpar) lpar += 2*M_PI;
+        Handle(Geom_TrimmedCurve) tc = new Geom_TrimmedCurve(C,fpar,lpar);
+        B.MakeEdge (E,tc,Precision::Confusion());
+        B.Add(E,V1);
+        B.Add(E,V2);
+        B.UpdateVertex(V1, fpar, E, 0.);
+        B.UpdateVertex(V2, lpar, E, 0.);
+      }
+      aChain.Remove(j);
+      aChain.SetValue(j,E);
+      j--;
+    }
+  }
+  if (j < aChain.Length()) {
+#ifdef DEB
+    cout<<"null curve3d in edge..."<<endl;
+#endif
+    return Standard_False;
+  }
+  if (aChain.Length() > 1 && ConcatBSplines) {
+    // second step: union edges with various curves
+    // skl for bug 0020052 from Mantis: perform such unions
+    // only if curves are bspline or bezier
+    bool NeedUnion = true;
+    for(j=1; j<=aChain.Length(); j++) {
+      TopoDS_Edge edge = TopoDS::Edge(aChain.Value(j));
+      Handle(Geom_Curve) c3d = BRep_Tool::Curve(edge,Loc,fp1,lp1);
+      if(c3d.IsNull()) continue;
+      while(c3d->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
+        Handle(Geom_TrimmedCurve) tc =
+          Handle(Geom_TrimmedCurve)::DownCast(c3d);
+        c3d = tc->BasisCurve();
+      }
+      if( ( c3d->IsKind(STANDARD_TYPE(Geom_BSplineCurve)) ||
+            c3d->IsKind(STANDARD_TYPE(Geom_BezierCurve)) ) ) continue;
+      NeedUnion = false;
+      break;
+    }
+    if(NeedUnion) {
+#ifdef DEB
+      cout<<"can not make analitical union => make approximation"<<endl;
+#endif
+      TopoDS_Edge E = GlueEdgesWithPCurves(aChain, VF, VL);
+      /*
+      TopoDS_Wire W;
+      B.MakeWire(W);
+      for(j=1; j<=aChain.Length(); j++) {
+        TopoDS_Edge edge = TopoDS::Edge(aChain.Value(j));
+        B.Add(W,edge);
+      }
+      Handle(BRepAdaptor_HCompCurve) Adapt = new BRepAdaptor_HCompCurve(W);
+      Approx_Curve3d Conv(Adapt,Tol,GeomAbs_C1,9,1000);
+      Handle(Geom_BSplineCurve) bc = Conv.Curve();
+      TopoDS_Edge E;
+      B.MakeEdge (E,bc,Precision::Confusion());
+      B.Add (E,VF);
+      B.Add (E,VL);
+      */
+      aChain.SetValue(1,E);
+    }
+    else {
+#ifdef DEB
+      cout<<"can not make approximation for such types of curves"<<endl;
+#endif
+      return Standard_False;
+    }
+  }
+
+  anEdge = TopoDS::Edge(aChain.Value(1));
+  return Standard_True;
+}
+
+//=======================================================================
+//function : ShapeUpgrade_UnifySameDomain
+//purpose  : Constructor
+//=======================================================================
+
+ShapeUpgrade_UnifySameDomain::ShapeUpgrade_UnifySameDomain()
+{
+  myUnifyEdges = Standard_True;
+  myUnifyFaces = Standard_True;
+  myConcatBSplines = Standard_False;
+
+  myContext = new ShapeBuild_ReShape;
+}
+
+//=======================================================================
+//function : ShapeUpgrade_UnifySameDomain
+//purpose  : Constructor
+//=======================================================================
+
+ShapeUpgrade_UnifySameDomain::ShapeUpgrade_UnifySameDomain(const TopoDS_Shape& aShape,
+                                                           const Standard_Boolean UnifyEdges,
+                                                           const Standard_Boolean UnifyFaces,
+                                                           const Standard_Boolean ConcatBSplines)
+{
+  myInitShape = aShape;
+  myShape = aShape;
+  myUnifyEdges = UnifyEdges;
+  myUnifyFaces = UnifyFaces;
+  myConcatBSplines = ConcatBSplines;
+
+  myContext = new ShapeBuild_ReShape;
+}
+
+//=======================================================================
+//function : Initialize
+//purpose  : 
+//=======================================================================
+
+void ShapeUpgrade_UnifySameDomain::Initialize(const TopoDS_Shape& aShape,
+                                              const Standard_Boolean UnifyEdges,
+                                              const Standard_Boolean UnifyFaces,
+                                              const Standard_Boolean ConcatBSplines)
+{
+  myInitShape = aShape;
+  myShape = aShape;
+  myUnifyEdges = UnifyEdges;
+  myUnifyFaces = UnifyFaces;
+  myConcatBSplines = ConcatBSplines;
+
+  myContext->Clear();
+  //myOldNewMap.Clear();
+  //myGenerated.Clear();
+}
+
+//=======================================================================
+//function : UnifyFaces
+//purpose  : 
+//=======================================================================
+
+void ShapeUpgrade_UnifySameDomain::UnifyFaces()
+{
+  //Handle(ShapeBuild_ReShape) myContext = new ShapeBuild_ReShape;
+  TopoDS_Shape aResShape = myContext->Apply(myShape);
+
+  // processing each shell
+  TopExp_Explorer exps;
+  for (exps.Init(myShape, TopAbs_SHELL); exps.More(); exps.Next()) {
+    TopoDS_Shell aShell = TopoDS::Shell(exps.Current());
+
+    // creating map of edge faces
+    TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces;
+    TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces);
+
+    // map of processed shapes
+    TopTools_MapOfShape aProcessed;
+
+    //Handle(ShapeBuild_ReShape) aContext = new ShapeBuild_ReShape;
+
+    Standard_Integer NbModif = 0;
+    Standard_Boolean hasFailed = Standard_False;
+    Standard_Real tol = Precision::Confusion();
+
+    // count faces
+    Standard_Integer nbf = 0;
+    TopExp_Explorer exp;
+    TopTools_MapOfShape mapF;
+    for (exp.Init(aShell, TopAbs_FACE); exp.More(); exp.Next()) {
+      if (mapF.Add(exp.Current()))
+        nbf++;
+    }
+
+    // processing each face
+    mapF.Clear();
+    for (exp.Init(aShell, TopAbs_FACE); exp.More(); exp.Next()) {
+      TopoDS_Face aFace = TopoDS::Face(exp.Current().Oriented(TopAbs_FORWARD));
+
+      if (aProcessed.Contains(aFace))
+        continue;
+
+      Standard_Integer dummy;
+      TopTools_SequenceOfShape edges;
+      AddOrdinaryEdges(edges,aFace,dummy);
+
+      TopTools_SequenceOfShape faces;
+      faces.Append(aFace);
+
+      //surface and location to construct result
+      TopLoc_Location aBaseLocation;
+      Handle(Geom_Surface) aBaseSurface = BRep_Tool::Surface(aFace,aBaseLocation);
+      aBaseSurface = ClearRts(aBaseSurface);
+
+      // find adjacent faces to union
+      Standard_Integer i;
+      for (i = 1; i <= edges.Length(); i++) {
+        TopoDS_Edge edge = TopoDS::Edge(edges(i));
+        if (BRep_Tool::Degenerated(edge))
+          continue;
+
+        const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
+        TopTools_ListIteratorOfListOfShape anIter(aList);
+        for (; anIter.More(); anIter.Next()) {
+          TopoDS_Face anCheckedFace = TopoDS::Face(anIter.Value().Oriented(TopAbs_FORWARD));
+          if (anCheckedFace.IsSame(aFace))
+            continue;
+
+          if (aProcessed.Contains(anCheckedFace))
+            continue;
+
+          if (IsSameDomain(aFace,anCheckedFace)) {
+
+            if (aList.Extent() != 2) {
+              // non mainfold case is not processed
+              continue;
+            }
+
+            // replacing pcurves
+            TopoDS_Face aMockUpFace;
+            BRep_Builder B;
+            B.MakeFace(aMockUpFace,aBaseSurface,aBaseLocation,0.);
+            MovePCurves(aMockUpFace,anCheckedFace);
+
+            if (AddOrdinaryEdges(edges,aMockUpFace,dummy)) {
+              // sequence edges is modified
+              i = dummy;
+            }
+
+            faces.Append(anCheckedFace);
+            aProcessed.Add(anCheckedFace);
+            break;
+          }
+        }
+      }
+
+      // all faces collected in the sequence. Perform union of faces
+      if (faces.Length() > 1) {
+        NbModif++;
+        TopoDS_Face aResult;
+        BRep_Builder B;
+        B.MakeFace(aResult,aBaseSurface,aBaseLocation,0);
+        Standard_Integer nbWires = 0;
+
+        // connecting wires
+        while (edges.Length()>0) {
+
+          Standard_Boolean isEdge3d = Standard_False;
+          nbWires++;
+          TopTools_MapOfShape aVertices;
+          TopoDS_Wire aWire;
+          B.MakeWire(aWire);
+
+          TopoDS_Edge anEdge = TopoDS::Edge(edges(1));
+          edges.Remove(1);
+
+          isEdge3d |= !BRep_Tool::Degenerated(anEdge);
+          B.Add(aWire,anEdge);
+          TopoDS_Vertex V1,V2;
+          TopExp::Vertices(anEdge,V1,V2);
+          aVertices.Add(V1);
+          aVertices.Add(V2);
+
+          Standard_Boolean isNewFound = Standard_False;
+          do {
+            isNewFound = Standard_False;
+            for(Standard_Integer j = 1; j <= edges.Length(); j++) {
+              anEdge = TopoDS::Edge(edges(j));
+              TopExp::Vertices(anEdge,V1,V2);
+              if(aVertices.Contains(V1) || aVertices.Contains(V2)) {
+                isEdge3d |= !BRep_Tool::Degenerated(anEdge);
+                aVertices.Add(V1);
+                aVertices.Add(V2);
+                B.Add(aWire,anEdge);
+                edges.Remove(j);
+                j--;
+                isNewFound = Standard_True;
+              }
+            }
+          } while (isNewFound);
+
+          // sorting any type of edges
+          //aWire = TopoDS::Wire(aContext->Apply(aWire));
+          aWire = TopoDS::Wire(myContext->Apply(aWire));
+
+          //TopoDS_Face tmpF = TopoDS::Face(aContext->Apply(faces(1).Oriented(TopAbs_FORWARD)));
+          TopoDS_Face tmpF = TopoDS::Face(myContext->Apply(faces(1).Oriented(TopAbs_FORWARD)));
+          Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(aWire,tmpF,Precision::Confusion());
+          sfw->FixReorder();
+          Standard_Boolean isDegRemoved = Standard_False;
+          if(!sfw->StatusReorder ( ShapeExtend_FAIL )) {
+            // clear degenerated edges if at least one with 3d curve exist
+            if(isEdge3d) {
+              Handle(ShapeExtend_WireData) sewd = sfw->WireData();
+              for(Standard_Integer j = 1; j<=sewd->NbEdges();j++) {
+                TopoDS_Edge E = sewd->Edge(j);
+                if(BRep_Tool::Degenerated(E)) {
+                  sewd->Remove(j);
+                  isDegRemoved = Standard_True;
+                  j--;
+                }
+              }
+            }
+            sfw->FixShifted();
+            if(isDegRemoved)
+              sfw->FixDegenerated();
+          }
+          TopoDS_Wire aWireFixed = sfw->Wire();
+          //aContext->Replace(aWire,aWireFixed);
+          myContext->Replace(aWire,aWireFixed);
+          //for history
+          /*
+          if (!myOldNewMap.IsBound(aWire))
+          {
+            TopTools_ListOfShape EmptyList;
+            myOldNewMap.Bind(aWire, EmptyList);
+          }
+          myOldNewMap(aWire).Clear();
+          myOldNewMap(aWire).Append(aWireFixed);
+          */
+          /////////////
+          
+          // add resulting wire
+          if(isEdge3d) {
+            B.Add(aResult,aWireFixed);
+          }
+          else  {
+            // sorting edges
+            Handle(ShapeExtend_WireData) sbwd = sfw->WireData();
+            Standard_Integer nbEdges = sbwd->NbEdges();
+            // sort degenerated edges and create one edge instead of several ones
+            ShapeAnalysis_WireOrder sawo(Standard_False, 0);
+            ShapeAnalysis_Edge sae;
+            Standard_Integer aLastEdge = nbEdges;
+            for(Standard_Integer j = 1; j <= nbEdges; j++) {
+              Standard_Real f,l;
+              //smh protection on NULL pcurve
+              Handle(Geom2d_Curve) c2d;
+              if(!sae.PCurve(sbwd->Edge(j),tmpF,c2d,f,l)) {
+                aLastEdge--;
+                continue;
+              }
+              sawo.Add(c2d->Value(f).XY(),c2d->Value(l).XY());
+            }
+            sawo.Perform();
+
+            // constructind one degenerative edge
+            gp_XY aStart, anEnd, tmp;
+            Standard_Integer nbFirst = sawo.Ordered(1);
+            TopoDS_Edge anOrigE = TopoDS::Edge(sbwd->Edge(nbFirst).Oriented(TopAbs_FORWARD));
+            ShapeBuild_Edge sbe;
+            TopoDS_Vertex aDummyV;
+            TopoDS_Edge E = sbe.CopyReplaceVertices(anOrigE,aDummyV,aDummyV);
+            sawo.XY(nbFirst,aStart,tmp);
+            sawo.XY(sawo.Ordered(aLastEdge),tmp,anEnd);
+
+            gp_XY aVec = anEnd-aStart;
+            Handle(Geom2d_Line) aLine = new Geom2d_Line(aStart,gp_Dir2d(anEnd-aStart));
+
+            B.UpdateEdge(E,aLine,tmpF,0.);
+            B.Range(E,tmpF,0.,aVec.Modulus());
+            Handle(Geom_Curve) C3d;
+            B.UpdateEdge(E,C3d,0.);
+            B.Degenerated(E,Standard_True);
+            TopoDS_Wire aW;
+            B.MakeWire(aW);
+            B.Add(aW,E);
+            B.Add(aResult,aW);
+          }
+        }
+
+        // perform substitution of face
+        //aContext->Replace(aContext->Apply(aFace),aResult);
+        myContext->Replace(myContext->Apply(aFace),aResult);
+        //for history
+        /*
+        if (!myOldNewMap.IsBound(aFace))
+        {
+          TopTools_ListOfShape EmptyList;
+          myOldNewMap.Bind(aFace, EmptyList);
+        }
+        myOldNewMap(aFace).Clear();
+        myOldNewMap(aFace).Append(aResult);
+        */
+        /////////////
+
+        ShapeFix_Face sff (aResult);
+        //Intializing by tolerances
+        sff.SetPrecision(Precision::Confusion());
+        sff.SetMinTolerance(tol);
+        sff.SetMaxTolerance(1.);
+        //Setting modes
+        sff.FixOrientationMode() = 0;
+        //sff.FixWireMode() = 0;
+        //sff.SetContext(aContext);
+        sff.SetContext(myContext);
+        // Applying the fixes
+        sff.Perform();
+        if(sff.Status(ShapeExtend_FAIL))
+        hasFailed = Standard_True;
+
+        // breaking down to several faces
+        //TopoDS_Shape theResult = aContext->Apply(aResult);
+        TopoDS_Shape theResult = myContext->Apply(aResult);
+        for (TopExp_Explorer aFaceExp (theResult,TopAbs_FACE); aFaceExp.More(); aFaceExp.Next()) {
+          TopoDS_Face aCurrent = TopoDS::Face(aFaceExp.Current().Oriented(TopAbs_FORWARD));
+          Handle(TColGeom_HArray2OfSurface) grid = new TColGeom_HArray2OfSurface ( 1, 1, 1, 1 );
+          grid->SetValue ( 1, 1, aBaseSurface );
+          Handle(ShapeExtend_CompositeSurface) G = new ShapeExtend_CompositeSurface ( grid );
+          ShapeFix_ComposeShell CompShell;
+          CompShell.Init ( G, aBaseLocation, aCurrent, ::Precision::Confusion() );//myPrecision
+          //CompShell.SetContext( aContext );
+          CompShell.SetContext( myContext );
+
+          TopTools_SequenceOfShape parts;
+          ShapeFix_SequenceOfWireSegment wires;
+          for(TopExp_Explorer W_Exp(aCurrent,TopAbs_WIRE);W_Exp.More();W_Exp.Next()) {
+            Handle(ShapeExtend_WireData) sbwd =
+              new ShapeExtend_WireData ( TopoDS::Wire(W_Exp.Current() ));
+            ShapeFix_WireSegment seg ( sbwd, TopAbs_REVERSED );
+            wires.Append(seg);
+          }
+
+          CompShell.DispatchWires ( parts,wires );
+          for (Standard_Integer j=1; j <= parts.Length(); j++ ) {
+            ShapeFix_Face aFixOrient(TopoDS::Face(parts(j)));
+            //aFixOrient.SetContext(aContext);
+            aFixOrient.SetContext(myContext);
+            aFixOrient.FixOrientation();
+          }
+
+          TopoDS_Shape CompRes;
+          if ( faces.Length() !=1 ) {
+            TopoDS_Shell S;
+            B.MakeShell ( S );
+            for ( i=1; i <= parts.Length(); i++ )
+              B.Add ( S, parts(i) );
+            CompRes = S;
+          }
+          else CompRes = parts(1);
+
+          //aContext->Replace(aCurrent,CompRes);
+          myContext->Replace(aCurrent,CompRes);
+          //for history
+          /*
+          if (!myOldNewMap.IsBound(aCurrent))
+          {
+            TopTools_ListOfShape EmptyList;
+            myOldNewMap.Bind(aCurrent, EmptyList);
+          }
+          myOldNewMap(aCurrent).Clear();
+          myOldNewMap(aCurrent).Append(CompRes);
+          */
+          /////////////
+        }
+
+        // remove the remaining faces
+        for(i = 2; i <= faces.Length(); i++)
+          //aContext->Remove(faces(i));
+          myContext->Remove(faces(i));
+      }
+    } // end processing each face
+
+    //TopoDS_Shape aResult = Shape;
+    if (NbModif > 0 && !hasFailed) {
+      //TopoDS_Shape aResult = aContext->Apply(aShell);
+      TopoDS_Shape aResult = myContext->Apply(aShell);
+
+      ShapeFix_Edge sfe;
+      for (exp.Init(aResult,TopAbs_EDGE); exp.More(); exp.Next()) {
+        TopoDS_Edge E = TopoDS::Edge(exp.Current());
+        sfe.FixVertexTolerance (E);
+        // ptv add fix same parameter
+        sfe.FixSameParameter(E, Precision::Confusion());
+      }
+
+      myContext->Replace(aShell, aResult);
+      //for history
+      /*
+      if (!myOldNewMap.IsBound(aShell))
+      {
+        TopTools_ListOfShape EmptyList;
+        myOldNewMap.Bind(aShell, EmptyList);
+      }
+      myOldNewMap(aShell).Clear();
+      myOldNewMap(aShell).Append(aResult);
+      */
+      /////////////
+    }
+    //else
+    {
+      for (exp.Init(aShell, TopAbs_FACE); exp.More(); exp.Next()) {
+        TopoDS_Face aFace = TopoDS::Face(exp.Current().Oriented(TopAbs_FORWARD));
+        Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire;
+        sfw->SetContext(myContext);
+        sfw->SetPrecision(Precision::Confusion());
+        sfw->SetMinTolerance(Precision::Confusion());
+        sfw->SetMaxTolerance(1.);
+        sfw->SetFace(aFace);
+        for (TopoDS_Iterator iter (aFace,Standard_False); iter.More(); iter.Next()) {
+          TopoDS_Wire wire = TopoDS::Wire(iter.Value());
+          sfw->Load(wire);
+          sfw->FixReorder();
+          sfw->FixShifted();
+        }
+      }
+    }
+  } // end processing each shell
+
+  myShape = myContext->Apply(myShape);
+}
+
+//=======================================================================
+//function : UnifyEdges
+//purpose  : 
+//=======================================================================
+
+void ShapeUpgrade_UnifySameDomain::UnifyEdges()
+{
+  Standard_Real Tol = Precision::Confusion();
+  
+  //Handle(ShapeBuild_ReShape) myContext = new ShapeBuild_ReShape;
+  Standard_Real myTolerance = Precision::Confusion();
+  TopoDS_Shape aResult = myContext->Apply(myShape);
+
+  // processing each solid
+  TopAbs_ShapeEnum aType = TopAbs_SOLID;
+  TopExp_Explorer exps (myShape, aType);
+  if (!exps.More()) {
+    aType = TopAbs_SHELL;
+    exps.Init(myShape, aType);
+  }
+  for (; exps.More(); exps.Next()) {
+    //TopoDS_Solid aSolid = TopoDS::Solid(exps.Current());
+    TopoDS_Shape aSolid = exps.Current();
+
+    TopTools_IndexedMapOfShape ChangedFaces;
+
+    // creating map of edge faces
+    TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces;
+    TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces);
+
+    //Handle(ShapeBuild_ReShape) aContext = new ShapeBuild_ReShape;
+    TopoDS_Shape aRes = aSolid;
+    //aRes = aContext->Apply(aSolid);
+    aRes = myContext->Apply(aSolid);
+
+    // processing each face
+    TopExp_Explorer exp;
+    for (exp.Init(aRes, TopAbs_FACE); exp.More(); exp.Next()) {
+      //TopoDS_Face aFace = TopoDS::Face(aContext->Apply(exp.Current().Oriented(TopAbs_FORWARD)));
+      TopoDS_Face aFace = TopoDS::Face(myContext->Apply(exp.Current().Oriented(TopAbs_FORWARD)));
+      TopTools_IndexedDataMapOfShapeListOfShape aMapFacesEdges;
+
+      for (TopExp_Explorer expe(aFace,TopAbs_EDGE); expe.More(); expe.Next()) {
+        TopoDS_Edge edge = TopoDS::Edge(expe.Current());
+        if (!aMapEdgeFaces.Contains(edge)) continue;
+        const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
+        TopTools_ListIteratorOfListOfShape anIter(aList);
+        for ( ; anIter.More(); anIter.Next()) {
+          TopoDS_Face face = TopoDS::Face(anIter.Value());
+          //TopoDS_Face face1 = TopoDS::Face(aContext->Apply(anIter.Value()));
+          TopoDS_Face face1 = TopoDS::Face(myContext->Apply(anIter.Value()));
+          if (face1.IsSame(aFace)) continue;
+          if (aMapFacesEdges.Contains(face)) {
+            aMapFacesEdges.ChangeFromKey(face).Append(edge);
+          }
+          else {
+            TopTools_ListOfShape ListEdges;
+            ListEdges.Append(edge);
+            aMapFacesEdges.Add(face,ListEdges);
+          }
+        }
+      }
+
+      for (Standard_Integer i=1; i<=aMapFacesEdges.Extent(); i++) {
+        const TopTools_ListOfShape& ListEdges = aMapFacesEdges.FindFromIndex(i);
+        TopTools_SequenceOfShape SeqEdges;
+        TopTools_ListIteratorOfListOfShape anIter(ListEdges);
+        for ( ; anIter.More(); anIter.Next()) {
+          SeqEdges.Append(anIter.Value());
+        }
+        if (SeqEdges.Length()==1) continue;
+        TopoDS_Edge E;
+        if ( MergeEdges(SeqEdges,aFace,Tol,myConcatBSplines,E) ) {
+          // now we have only one edge - aChain.Value(1)
+          // we have to replace old ListEdges with this new edge
+          //aContext->Replace(SeqEdges(1),E);
+          myContext->Replace(SeqEdges(1),E);
+          Standard_Integer j;
+          for (j = 2; j <= SeqEdges.Length(); j++) {
+            //aContext->Remove(SeqEdges(j));
+            myContext->Remove(SeqEdges(j));
+            //myOldNewMap.Bind(SeqEdges(j), E);
+          }
+          //for history
+          /*
+          for (j = 1; j <= SeqEdges.Length(); j++)
+          {
+            if (!myOldNewMap.IsBound(SeqEdges(j)))
+            {
+              TopTools_ListOfShape EmptyList;
+              myOldNewMap.Bind(SeqEdges(j), EmptyList);
+            }
+            myOldNewMap(SeqEdges(j)).Clear();
+            myOldNewMap(SeqEdges(j)).Append(E);
+          }
+          */
+          /////////////
+          
+          TopoDS_Face tmpF = TopoDS::Face(exp.Current());
+          if ( !ChangedFaces.Contains(tmpF) )
+            ChangedFaces.Add(tmpF);
+          tmpF = TopoDS::Face(aMapFacesEdges.FindKey(i));
+          if ( !ChangedFaces.Contains(tmpF) )
+            ChangedFaces.Add(tmpF);
+        }
+      }
+
+    } // end processing each face
+
+    // fix changed faces and replace them in the local context
+    for (Standard_Integer i=1; i<=ChangedFaces.Extent(); i++) {
+      //TopoDS_Face aFace = TopoDS::Face(aContext->Apply(ChangedFaces.FindKey(i)));
+      TopoDS_Face aFace = TopoDS::Face(myContext->Apply(ChangedFaces.FindKey(i)));
+      Handle(ShapeFix_Face) sff = new ShapeFix_Face(aFace);
+      sff->SetContext(myContext);
+      sff->SetPrecision(myTolerance);
+      sff->SetMinTolerance(myTolerance);
+      sff->SetMaxTolerance(Max(1.,myTolerance*1000.));
+      sff->Perform();
+      TopoDS_Shape aNewFace = sff->Face();
+      //aContext->Replace(aFace,aNewFace);
+      myContext->Replace(aFace,aNewFace);
+      //for history
+      /*
+      if (!myOldNewMap.IsBound(aFace))
+      {
+        TopTools_ListOfShape EmptyList;
+        myOldNewMap.Bind(aFace, EmptyList);
+      }
+      myOldNewMap(aFace).Clear();
+      myOldNewMap(aFace).Append(aNewFace);
+      */
+      /////////////
+    }
+
+    if (ChangedFaces.Extent() > 0) {
+      // fix changed shell and replace it in the local context
+      //TopoDS_Shape aRes1 = aContext->Apply(aRes);
+      TopoDS_Shape aRes1 = myContext->Apply(aRes);
+      TopExp_Explorer expsh;
+      for (expsh.Init(aRes1, TopAbs_SHELL); expsh.More(); expsh.Next()) {
+        TopoDS_Shell aShell = TopoDS::Shell(expsh.Current());
+        Handle(ShapeFix_Shell) sfsh = new ShapeFix_Shell;
+        sfsh->FixFaceOrientation(aShell);
+        TopoDS_Shape aNewShell = sfsh->Shell();
+        //aContext->Replace(aShell,aNewShell);
+        myContext->Replace(aShell,aNewShell);
+        //for history
+        /*
+        if (!myOldNewMap.IsBound(aShell))
+        {
+          TopTools_ListOfShape EmptyList;
+          myOldNewMap.Bind(aShell, EmptyList);
+        }
+        myOldNewMap(aShell).Clear();
+        myOldNewMap(aShell).Append(aNewShell);
+        */
+        /////////////
+      }
+      //TopoDS_Shape aRes2 = aContext->Apply(aRes1);
+      TopoDS_Shape aRes2 = myContext->Apply(aRes1);
+      // put new solid into global context
+      myContext->Replace(aSolid,aRes2);
+      //for history
+      /*
+      if (!myOldNewMap.IsBound(aSolid))
+      {
+        TopTools_ListOfShape EmptyList;
+        myOldNewMap.Bind(aSolid, EmptyList);
+      }
+      myOldNewMap(aSolid).Clear();
+      myOldNewMap(aSolid).Append(aRes2);
+      */
+      /////////////
+    }
+
+  } // end processing each solid
+
+  myShape = myContext->Apply(myShape);
+}
+
+//=======================================================================
+//function : UnifyFacesAndEdges
+//purpose  : 
+//=======================================================================
+
+void ShapeUpgrade_UnifySameDomain::UnifyFacesAndEdges()
+{
+  UnifyFaces();
+  
+  /*
+  ShapeUpgrade_RemoveLocations RemLoc;
+  RemLoc.Remove(myShape);
+  myShape = RemLoc.GetResult();
+  */
+
+  UnifyEdges();
+}
+
+//=======================================================================
+//function : Build
+//purpose  : builds the resulting shape
+//======================================================================
+void ShapeUpgrade_UnifySameDomain::Build() 
+{
+  if (myUnifyFaces && myUnifyEdges)
+    UnifyFacesAndEdges();
+
+  else if (myUnifyEdges)
+    UnifyEdges();
+  else if (myUnifyFaces)
+    UnifyFaces();
+
+  //Done();
+}
+
+//=======================================================================
+//function : Shape
+//purpose  : give the resulting shape
+//=======================================================================
+const TopoDS_Shape& ShapeUpgrade_UnifySameDomain::Shape() const
+{
+  return myShape;
+}
+
+//=======================================================================
+//function : Generated
+//purpose  : returns the new shape from the old one
+//=======================================================================
+TopoDS_Shape ShapeUpgrade_UnifySameDomain::Generated(const TopoDS_Shape& aShape) const
+{
+  TopoDS_Shape aNewShape = myContext->Apply(aShape);
+  /*
+  if (aNewShape.IsNull())
+    aNewShape = myOldNewMap(aShape);
+  */
+  
+  return aNewShape;
+}
diff --git a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx
index 03ec4da..90111bb 100644
--- a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx
+++ b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx
@@ -369,7 +369,7 @@ void ShapeUpgrade_WireDivide::Perform ()
 	    theSplit2dTool->SetSplitValues (theKnots2d);
 	  theSplit2dTool->Perform (Standard_True);
 	  Handle(TColStd_HSequenceOfReal) revKnots2d = theSplit2dTool->SplitValues();
-	  if(revKnots2d->Length()!=revKnots2d->Length()) {
+	  if(revKnots2d->Length()!=theKnots2d->Length()) {
 	    isSeam = Standard_False;
 #ifdef DEB
 	    cout << "Error: ShapeUpgrade_WireDivide: seam has different splitting values on pcurvesd" << endl;
diff --git a/src/Standard/Standard.cxx b/src/Standard/Standard.cxx
index 5aed734..bcf9331 100644
--- a/src/Standard/Standard.cxx
+++ b/src/Standard/Standard.cxx
@@ -132,7 +132,7 @@ Standard_MMgrFactory::Standard_MMgrFactory()
 
 Standard_MMgrFactory::~Standard_MMgrFactory()
 {
-  if ( ! myFMMgr ) {
+  if (  myFMMgr ) {
     myFMMgr->Purge(Standard_True);
 //  delete myFMMgr;
 //  myFMMgr = 0;  
diff --git a/src/StdPrs/StdPrs_ShadedShape.cxx b/src/StdPrs/StdPrs_ShadedShape.cxx
index 056994d..2dd0151 100644
--- a/src/StdPrs/StdPrs_ShadedShape.cxx
+++ b/src/StdPrs/StdPrs_ShadedShape.cxx
@@ -29,6 +29,16 @@
 #include <TopoDS_Face.hxx>
 #include <TColgp_Array1OfDir.hxx>
 #include <TColgp_Array1OfPnt2d.hxx>
+#include <TopoDS_Compound.hxx>
+#include <Poly_PolygonOnTriangulation.hxx>
+#include <TopExp.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <NCollection_List.hxx>
+#include <Graphic3d_ArrayOfSegments.hxx>
+#include <Prs3d_LineAspect.hxx>
+#include <TColgp_HArray1OfPnt.hxx>
+#include <Aspect_PolygonOffsetMode.hxx>
 
 #define MAX2(X, Y)	  (Abs(X) > Abs(Y) ? Abs(X) : Abs(Y))
 #define MAX3(X, Y, Z)	(MAX2 (MAX2 (X, Y), Z))
@@ -79,7 +89,7 @@ namespace
     Standard_Real    aUmin (0.0), aUmax (0.0), aVmin (0.0), aVmax (0.0), dUmax (0.0), dVmax (0.0);
 
     // precision for compare square distances
-    const double aPreci = Precision::Confusion() * Precision::Confusion();
+    const double aPreci = Precision::SquareConfusion();
 
     if (!theDrawer->ShadingAspectGlobal())
     {
@@ -202,6 +212,130 @@ namespace
     }
     return Standard_True;
   }
+
+  // =======================================================================
+  // function : ComputeFaceBoundaries
+  // purpose  : Compute boundary presentation for faces of the shape.
+  // =======================================================================
+  static void ComputeFaceBoundaries (const TopoDS_Shape& theShape,
+                                     const Handle (Prs3d_Presentation)& thePresentation,
+                                     const Handle (Prs3d_Drawer)& theDrawer)
+  {
+    // collection of all triangulation nodes on edges
+    // for computing boundaries presentation
+    NCollection_List<Handle(TColgp_HArray1OfPnt)> aNodeCollection;
+    Standard_Integer aNodeNumber = 0;
+
+    TopLoc_Location aTrsf;
+
+    // explore all boundary edges
+    TopTools_IndexedDataMapOfShapeListOfShape anEdgesMap;
+    TopExp::MapShapesAndAncestors (
+      theShape, TopAbs_EDGE, TopAbs_FACE, anEdgesMap);
+
+    Standard_Integer anEdgeIdx = 1;
+    for ( ; anEdgeIdx <= anEdgesMap.Extent (); anEdgeIdx++)
+    {
+      // reject free edges
+      const TopTools_ListOfShape& aFaceList = anEdgesMap.FindFromIndex (anEdgeIdx);
+      if (aFaceList.Extent() == 0)
+        continue;
+
+      // take one of the shared edges and get edge triangulation
+      const TopoDS_Face& aFace  = TopoDS::Face (aFaceList.First ());
+      const TopoDS_Edge& anEdge = TopoDS::Edge (anEdgesMap.FindKey (anEdgeIdx));
+
+      Handle(Poly_Triangulation) aTriangulation =
+        BRep_Tool::Triangulation (aFace, aTrsf);
+
+      if (aTriangulation.IsNull ())
+        continue;
+
+      Handle(Poly_PolygonOnTriangulation) anEdgePoly =
+        BRep_Tool::PolygonOnTriangulation (anEdge, aTriangulation, aTrsf);
+
+      if (anEdgePoly.IsNull ())
+        continue;
+
+      // get edge nodes indexes from face triangulation
+      const TColgp_Array1OfPnt& aTriNodes = aTriangulation->Nodes ();
+      const TColStd_Array1OfInteger& anEdgeNodes = anEdgePoly->Nodes ();
+
+      if (anEdgeNodes.Length () < 2)
+        continue;
+
+      // collect the edge nodes
+      Handle(TColgp_HArray1OfPnt) aCollected =
+        new TColgp_HArray1OfPnt (anEdgeNodes.Lower (), anEdgeNodes.Upper ());
+
+      Standard_Integer aNodeIdx = anEdgeNodes.Lower ();
+      for ( ; aNodeIdx <= anEdgeNodes.Upper (); aNodeIdx++)
+      {
+        // node index in face triangulation
+        Standard_Integer aTriIndex = anEdgeNodes.Value (aNodeIdx);
+
+        // get node and apply location transformation to the node
+        gp_Pnt aTriNode = aTriNodes.Value (aTriIndex);
+        if (!aTrsf.IsIdentity ())
+          aTriNode.Transform (aTrsf);
+
+        // add node to the boundary array
+        aCollected->SetValue (aNodeIdx, aTriNode);
+      }
+
+      aNodeNumber += anEdgeNodes.Length ();
+      aNodeCollection.Append (aCollected);
+    }
+
+    // check if it possible to continue building the presentation
+    if (aNodeNumber == 0)
+      return;
+
+    // allocate polyline array for presentation
+    Standard_Integer aSegmentEdgeNb = 
+      (aNodeNumber - aNodeCollection.Extent()) * 2;
+
+    Handle(Graphic3d_ArrayOfSegments) aSegments = 
+      new Graphic3d_ArrayOfSegments (aNodeNumber, aSegmentEdgeNb);
+
+    // build presentation for edge bondaries
+    NCollection_List<Handle(TColgp_HArray1OfPnt)>::Iterator 
+      aCollIt (aNodeCollection);
+
+    // the edge index is increased in each iteration step to
+    // avoid contiguous segments between different face edges.
+    for ( ; aCollIt.More(); aCollIt.Next () )
+    {
+      const Handle(TColgp_HArray1OfPnt)& aNodeArray = aCollIt.Value ();
+
+      Standard_Integer aNodeIdx = aNodeArray->Lower ();
+
+      // add first node (this node is not shared with previous segment).
+      // for each face edge, indices for sharing nodes 
+      // between segments begin from the first added node.
+      Standard_Integer aSegmentEdge = 
+        aSegments->AddVertex (aNodeArray->Value (aNodeIdx));
+
+      // add subsequent nodes and provide edge indexes for sharing
+      // the nodes between the sequential segments.
+      for ( aNodeIdx++; aNodeIdx <= aNodeArray->Upper (); aNodeIdx++ )
+      {
+        aSegments->AddVertex (aNodeArray->Value (aNodeIdx));
+        aSegments->AddEdge (  aSegmentEdge);
+        aSegments->AddEdge (++aSegmentEdge);
+      }
+    }
+
+    // set up aspect and add polyline data
+    Handle(Graphic3d_AspectLine3d) aBoundaryAspect = 
+      theDrawer->FaceBoundaryAspect ()->Aspect ();
+
+    Handle(Graphic3d_Group) aPrsGrp = Prs3d_Root::NewGroup (thePresentation);
+    aPrsGrp->SetGroupPrimitivesAspect (aBoundaryAspect);
+    aPrsGrp->BeginPrimitives ();
+    aPrsGrp->AddPrimitiveArray (aSegments);
+    aPrsGrp->EndPrimitives ();
+  }
 };
 
 // =======================================================================
@@ -285,5 +419,9 @@ void StdPrs_ShadedShape::Add (const Handle (Prs3d_Presentation)& thePresentation
 
   ShadeFromShape (theShape, thePresentation, theDrawer,
                   theHasTexels, theUVOrigin, theUVRepeat, theUVScale);
-}
 
+  if (theDrawer->IsFaceBoundaryDraw ())
+  {
+    ComputeFaceBoundaries (theShape, thePresentation, theDrawer);
+  }
+}
diff --git a/src/StepData/StepData_StepDumper.cxx b/src/StepData/StepData_StepDumper.cxx
index 777d413..af8b393 100644
--- a/src/StepData/StepData_StepDumper.cxx
+++ b/src/StepData/StepData_StepDumper.cxx
@@ -159,7 +159,7 @@ Standard_Boolean  StepData_StepDumper::Dump
       for (i = 1; i <= nb; i ++)  {
 	if (ids.Value(i) <= 0 || ids.Value(i) == i) continue;
 	sprintf (unid,"%d:#%d",i,ids.Value(i));
-	nbc = strlen (unid);  nbr = ((80-nbc) %4) +2;
+	nbc = (Standard_Integer) strlen (unid);  nbr = ((80-nbc) %4) +2;
 	nbl +=  nbc;
 	if (nbl+nbr0 > 79) { nbl  = nbc;  S<<endl; }
 	else               { nbl += nbr0; for (; nbr0 > 0; nbr0 --) S << " "; }
diff --git a/src/StepData/StepData_StepReaderData.cxx b/src/StepData/StepData_StepReaderData.cxx
index 3838d4c..f644b78 100644
--- a/src/StepData/StepData_StepReaderData.cxx
+++ b/src/StepData/StepData_StepReaderData.cxx
@@ -355,7 +355,7 @@ static Standard_Boolean stepstrcmp(const Standard_CString type,
 //  Attention : False pour dire OK, True sinon (car remplace strcmp)
   Standard_Integer i,j = 0; Standard_Boolean res = Standard_False;
   for (i = 0; name[i] != '\0' && type[i] != '\0' && !res ; i ++) {
-    if (name[i] == ' ') { j = i; break; }
+    if (name[i] == ' ' && type[i] == '\0') { j = i; break; }
     if (type[i] != name[i]) res = Standard_True;
   }
   if (!res || (j == 0)) return res;
diff --git a/src/StepData/StepData_StepWriter.cxx b/src/StepData/StepData_StepWriter.cxx
index 10fc6fc..52d9286 100644
--- a/src/StepData/StepData_StepWriter.cxx
+++ b/src/StepData/StepData_StepWriter.cxx
@@ -510,7 +510,7 @@ void StepData_StepWriter::SendComment(const Handle(TCollection_HAsciiString)& te
 void StepData_StepWriter::SendComment (const Standard_CString text)
 {
   if (!thecomm) Interface_InterfaceMismatch::Raise("StepWriter : Comment");
-  AddString(text,strlen(text));
+  AddString(text,(Standard_Integer) strlen(text));
 }
 
 
@@ -725,7 +725,7 @@ void StepData_StepWriter::OpenSub ()
 void StepData_StepWriter::OpenTypedSub (const Standard_CString subtype)
 {
   AddParam();
-  if (subtype[0] != '\0') AddString (subtype,strlen(subtype));
+  if (subtype[0] != '\0') AddString (subtype,(Standard_Integer) strlen(subtype));
   AddString(textlist);
   thefirst = Standard_True;
   thelevel ++;
@@ -767,7 +767,7 @@ void StepData_StepWriter::Send (const Standard_Integer val)
   char lval[12];
   AddParam();
   sprintf(lval,"%d",val);
-  AddString(lval,strlen(lval));
+  AddString(lval,(Standard_Integer) strlen(lval));
 }
 
 
@@ -926,7 +926,7 @@ void StepData_StepWriter::Send (const Handle(Standard_Transient)& val)
     if (thelabmode < 2 || idnum == idtrue) sprintf(lident,"#%d",idnum);
     else sprintf(lident,"%d:#%d",idnum,idtrue);
     AddParam();
-    AddString(lident,strlen(lident));
+    AddString(lident,(Standard_Integer) strlen(lident));
   }
 }
 
@@ -979,7 +979,7 @@ void StepData_StepWriter::SendString (const TCollection_AsciiString& val)
 void StepData_StepWriter::SendString (const Standard_CString val)
 {
   AddParam();
-  AddString(val,strlen(val));
+  AddString(val,(Standard_Integer) strlen(val));
 }
 
 //  SendEnum : attention, on envoie un intitule d'Enum ... donc entre .  .
diff --git a/src/StepToGeom/StepToGeom_MakeCurve.cxx b/src/StepToGeom/StepToGeom_MakeCurve.cxx
index 47daa5a..889a26b 100644
--- a/src/StepToGeom/StepToGeom_MakeCurve.cxx
+++ b/src/StepToGeom/StepToGeom_MakeCurve.cxx
@@ -52,6 +52,9 @@
 
 Standard_Boolean StepToGeom_MakeCurve::Convert (const Handle(StepGeom_Curve)& SC, Handle(Geom_Curve)& CC)
 {
+  if (SC.IsNull()){
+    return Standard_False;
+  }
   if (SC->IsKind(STANDARD_TYPE(StepGeom_Line))) {
     const Handle(StepGeom_Line) L = Handle(StepGeom_Line)::DownCast(SC);
     return StepToGeom_MakeLine::Convert(L,*((Handle(Geom_Line)*)&CC));
diff --git a/src/StepToTopoDS/StepToTopoDS.cxx b/src/StepToTopoDS/StepToTopoDS.cxx
index b46e913..2f48bd4 100644
--- a/src/StepToTopoDS/StepToTopoDS.cxx
+++ b/src/StepToTopoDS/StepToTopoDS.cxx
@@ -88,7 +88,7 @@ Handle(TCollection_HAsciiString) StepToTopoDS::DecodeEdgeError(const StepToTopoD
 	mess = new TCollection_HAsciiString("Translate Edge Done");
 	break;
       }
-    case StepToTopoDS_BuilderOther:
+    case StepToTopoDS_TranslateEdgeOther:
       {
 	mess = new TCollection_HAsciiString("Translate Edge Other");
 	break;
diff --git a/src/TDF/TDF_LabelNode.cxx b/src/TDF/TDF_LabelNode.cxx
index 28702bd..e6ae66f 100644
--- a/src/TDF/TDF_LabelNode.cxx
+++ b/src/TDF/TDF_LabelNode.cxx
@@ -93,7 +93,7 @@ void TDF_LabelNode::Destroy (const TDF_HAllocator& theAllocator)
     myFirstChild->Destroy (theAllocator);
     myFirstChild = aSecondChild;
   }
-  myFirstAttribute.Nullify();
+  this->~TDF_LabelNode();
   myFather = myBrother = myFirstChild = myLastFoundChild = NULL;
   myTag = myFlags = 0;
 
diff --git a/src/TKCAF/EXTERNLIB b/src/TKCAF/EXTERNLIB
index 5aa8272..3fb4b53 100644
--- a/src/TKCAF/EXTERNLIB
+++ b/src/TKCAF/EXTERNLIB
@@ -10,3 +10,4 @@ TKV2d
 TKCDF
 TKLCAF
 TKV3d
+TKBO
diff --git a/src/TKOpenGl/EXTERNLIB b/src/TKOpenGl/EXTERNLIB
index a7d53f7..8b6922e 100644
--- a/src/TKOpenGl/EXTERNLIB
+++ b/src/TKOpenGl/EXTERNLIB
@@ -7,3 +7,4 @@ CSF_FTGL
 CSF_GL2PS
 CSF_user32
 CSF_gdi32
+CSF_AviLibs
diff --git a/src/TKService/PACKAGES b/src/TKService/PACKAGES
index 1e0072a..228e8ae 100644
--- a/src/TKService/PACKAGES
+++ b/src/TKService/PACKAGES
@@ -12,3 +12,4 @@ PlotMgt
 ImageUtility
 WNT
 TColQuantity
+Font
diff --git a/src/TNaming/TNaming.cdl b/src/TNaming/TNaming.cdl
index 60fcea2..ae3d5da 100644
--- a/src/TNaming/TNaming.cdl
+++ b/src/TNaming/TNaming.cdl
@@ -209,7 +209,8 @@ is
     	CONSTSHAPE,
 	FILTERBYNEIGHBOURGS, 
 	ORIENTATION, 
-	WIREIN
+	WIREIN,
+	SHELLIN
     end NameType;	    
     
     class Name;
@@ -353,7 +354,17 @@ is
     	             To           : in out Shape  from TopoDS) 
     returns Boolean from Standard;
     ---Purpose: Subtitutes shape in source structure
+              
+      
+    OuterWire(theFace: Face from TopoDS; theWire: out Wire from TopoDS)
+        returns Boolean from Standard;
+    --- Purpose: Returns True if outer wire is found and the found wire in <theWire>.
 
+    OuterShell(theSolid: Solid from TopoDS; theShell: out Shell from TopoDS)
+        returns Boolean from Standard;
+    --- Purpose: Returns True if outer Shell is found and the found shell in <theShell>.
+    
+   
       
     ---Purpose: Print of TNaming enumeration
     --          =============================
diff --git a/src/TNaming/TNaming.cxx b/src/TNaming/TNaming.cxx
index 8f7f59d..dbda18e 100644
--- a/src/TNaming/TNaming.cxx
+++ b/src/TNaming/TNaming.cxx
@@ -52,6 +52,9 @@
 #include <TNaming_DataMapOfShapePtrRefShape.hxx>
 #include <TNaming_Tool.hxx>
 
+#include <IntTools_FClass2d.hxx>
+#include <BRepClass3d_SolidClassifier.hxx>
+
 // CopyShape
 #include <TColStd_IndexedDataMapOfTransientTransient.hxx>
 #include <TNaming_TranslateTool.hxx>
@@ -387,6 +390,7 @@ static void LoadNamedShape (TNaming_Builder& B,
   case TNaming_SELECTED :
     {
       B.Select(NS,OS);
+	  break;
     }
   default:
     break;
@@ -736,6 +740,10 @@ Standard_OStream& TNaming::Print (const TNaming_NameType NAME,  Standard_OStream
     {
       s <<"WIREIN"; break;
     }
+	case TNaming_SHELLIN:
+    {
+      s <<"SHELLIN"; break;
+    }
     default :
       {
 	s <<"UNKNOWN_NameType"; break;
@@ -944,6 +952,95 @@ TopoDS_Shape TNaming::FindUniqueContextSet(const TopoDS_Shape& Selection, const
   return TopoDS_Shape();
 }
 
+//=======================================================================
+//function : OuterWire
+//purpose  : Returns True & <theWire> if Outer wire is found.
+//=======================================================================
+Standard_Boolean TNaming::OuterWire(const TopoDS_Face& theFace, TopoDS_Wire& theWire)
+{ 
+  TopoDS_Face aFx;
+  TopoDS_Wire aWx;
+  BRep_Builder aBB;
+  IntTools_FClass2d aFC;
+  Standard_Boolean bFlag(Standard_False);
+  Standard_Real aTol = BRep_Tool::Tolerance(theFace);
+  TopoDS_Iterator aIt(theFace);
+  for (; aIt.More(); aIt.Next()) {
+    aWx=*((TopoDS_Wire*)&aIt.Value());
+    aFx = theFace;
+    aFx.EmptyCopy();
+    aBB.Add(aFx, aWx);
+    aFC.Init(aFx, aTol);
+    bFlag = aFC.IsHole();
+    if (!bFlag) 
+      break;
+  }
+  theWire=aWx;
+  return !bFlag;// if bFlag == True -  not found
+}
+//=======================================================================
+//function : IsInternal
+//purpose  :
+//=======================================================================
+static Standard_Boolean IsInternal(const TopoDS_Shape& aSx)
+{
+  Standard_Boolean bInternal;
+  TopAbs_Orientation aOr;
+  TopoDS_Iterator aIt;
+  bInternal = Standard_False;
+  aIt.Initialize(aSx);
+  for (; aIt.More(); aIt.Next()) {
+    const TopoDS_Shape& aSy=aIt.Value();
+    aOr=aSy.Orientation();
+    bInternal = (aOr == TopAbs_INTERNAL || aOr == TopAbs_EXTERNAL);
+    break;
+  }
+  return bInternal;
+}
+//=======================================================================
+//function : OuterShell
+//purpose  : returns True & <theShell>, if Outer shell is found
+//=======================================================================
+Standard_Boolean TNaming::OuterShell(const TopoDS_Solid& theSolid, 
+				             TopoDS_Shell& theShell)
+{
+  TopoDS_Solid aSDx;
+  TopoDS_Shell aSHx;
+  TopAbs_State aState;
+  Standard_Boolean bFound(Standard_False);
+  Standard_Real aTol(1.e-7);
+  //
+  BRep_Builder aBB;
+  BRepClass3d_SolidClassifier aSC;
+  TopoDS_Iterator aIt(theSolid);
+  for (; aIt.More(); aIt.Next()) {
+    const TopoDS_Shape& aSx = aIt.Value();
+
+    if (aSx.ShapeType() != TopAbs_SHELL)
+      continue;
+    if (IsInternal(aSx)) 
+      continue;
+    //
+    aSHx = *((TopoDS_Shell*)&aSx);
+    //
+    aSDx = theSolid;
+    aSDx.EmptyCopy();
+    //
+    aBB.Add(aSDx, aSHx);
+    //
+    aSC.Load(aSDx);
+    //BRepClass3d_SolidClassifier& aSC=aCtx.SolidClassifier(aSDx);
+    aSC.PerformInfinitePoint(aTol);
+    aState = aSC.State();
+    if(aState == TopAbs_OUT) {
+      bFound = Standard_True;
+      break;
+    }
+  }
+  theShell = aSHx;
+
+  return bFound;
+}
 
 
 
diff --git a/src/TNaming/TNaming_Builder.cdl b/src/TNaming/TNaming_Builder.cdl
index 3bfc69f..a7f0958 100644
--- a/src/TNaming/TNaming_Builder.cdl
+++ b/src/TNaming/TNaming_Builder.cdl
@@ -22,8 +22,7 @@
 
 class Builder from TNaming  
 
-	---Purpose: A tool to create and maintain topological
-    	-- attributes. 
+	---Purpose: A tool to create and maintain topological attributes. 
     	-- Constructor creates an empty
     	-- TNaming_NamedShape attribute at the given
     	-- label. It allows adding "old shape" and "new
@@ -36,9 +35,7 @@ uses
     Label                        from TDF,
     Data                         from TDF, 
     NamedShape                   from TNaming,	
-    PtrNode                      from TNaming,	
-    PtrAttribute                 from TNaming,	
-    PtrDataMapOfShapePtrRefShape from TNaming
+    UsedShapes                   from TNaming
     
 raises
     ConstructionError            from Standard
@@ -78,16 +75,6 @@ is
     	    --  or merged in a Boolean operation.
 	    --          
 	
-	---Category: Load changes
-	--           
-    	Replace (me : in out; oldShape, newShape : Shape from TopoDS);
-	    ---Purpose: Records the shape newShape which is a
-    	    -- modification of the shape oldShape but has a
-    	    -- different geometry as a result of the construction operation.
-    	    -- As an example, consider the case of a face
-    	    -- resulting from construction of a draft in a box or prism.
-	
-
     	---Category: Load Selection.
     	Select (me : in out; aShape, inShape : Shape from TopoDS);
 	    ---Purpose:   Add a  Shape to the current label ,  This Shape is
@@ -98,10 +85,10 @@ is
         ---Category: Querying
 
     	NamedShape(me) returns NamedShape from TNaming;
-	    ---Purpose: Returns the NamedShape which has been build or is under construction.
+	    ---Purpose: Returns the NamedShape which has been built or is under construction.  
 
 fields
-    
-    myMap         : PtrDataMapOfShapePtrRefShape from TNaming; 
-    myAtt         : PtrAttribute                 from TNaming;
+
+    myShapes: UsedShapes from TNaming; 
+    myAtt   : NamedShape from TNaming;
 end Builder;
diff --git a/src/TNaming/TNaming_DeltaOnModification.cxx b/src/TNaming/TNaming_DeltaOnModification.cxx
index 6465bc7..a12520f 100644
--- a/src/TNaming/TNaming_DeltaOnModification.cxx
+++ b/src/TNaming/TNaming_DeltaOnModification.cxx
@@ -102,11 +102,6 @@ static void LoadNamedShape (TNaming_Builder& B,
       B.Select(NS,OS);
       break;
     }
-  case TNaming_REPLACE :
-    {
-      B.Replace(OS,NS);
-      break;
-    }
   }
 }
 
diff --git a/src/TNaming/TNaming_Name.cxx b/src/TNaming/TNaming_Name.cxx
index 57fbe9f..27d1dfe 100644
--- a/src/TNaming/TNaming_Name.cxx
+++ b/src/TNaming/TNaming_Name.cxx
@@ -35,6 +35,7 @@
 #include <TopExp_Explorer.hxx>
 #include <TopoDS_Compound.hxx>
 #include <BRep_Builder.hxx>
+#include <BRepTools.hxx>
 
 #include <TopTools_MapOfShape.hxx>
 #include <TopTools_MapIteratorOfMapOfShape.hxx>
@@ -83,6 +84,8 @@
 //#define  MDTV_DEB_MODUN
 //#define MDTV_DEB_FNB
 //#define  MDTV_DEB_WIN
+//#define MDTV_DEB_ARG
+//#define MDTV_DEB_SHELL
 #ifdef MDTV_DEB
 #include <TCollection_AsciiString.hxx>
 #include <TDF_Tool.hxx>
@@ -113,7 +116,6 @@ void PrintEntries(const TDF_LabelMap& map)
     }
 }
 
-#include <BRepTools.hxx>
 //=======================================================================
 static void DbgTools_Write(const TopoDS_Shape& shape,
 		      const Standard_CString filename) 
@@ -180,14 +182,14 @@ static Standard_Boolean ValidArgs(const TNaming_ListOfNamedShape& Args)
   for (;it.More();it.Next()) {
     const Handle(TNaming_NamedShape)& aNS = it.Value();
     if(aNS.IsNull()) {
-#ifdef MDTV_DEB 
+#ifdef MDTV_DEB_ARG 
       cout << "ValidArgs:: NS (Naming argument) is NULL" <<endl;
 #endif	
       return Standard_False;
     }
     else 
       if(aNS->IsEmpty()) {
-#ifdef MDTV_DEB 
+#ifdef MDTV_DEB_ARG
 	TCollection_AsciiString entry;
 	TDF_Tool::Entry(aNS->Label(), entry);
 	cout << "ValidArgs:: Empty NS, Label = " << entry <<endl;
@@ -196,7 +198,7 @@ static Standard_Boolean ValidArgs(const TNaming_ListOfNamedShape& Args)
     }
       else  
 	if(!aNS->IsValid()) {
-#ifdef MDTV_DEB 
+#ifdef MDTV_DEB_ARG 
 	  TCollection_AsciiString entry;
 	  TDF_Tool::Entry(aNS->Label(), entry);
 	  cout << "ValidArgs::Not valid NS Label = " << entry <<endl;
@@ -508,9 +510,17 @@ static Standard_Boolean FindModifUntil (TNaming_NewShapeIterator&         it,
 					const TopoDS_Shape&               S,
 					const Handle(TNaming_NamedShape)& Context)
 { 
+#ifdef MDTV_DEB_MODUN
+  if(!Context.IsNull())
+    PrintEntry(Context->Label());
+#endif
   Standard_Boolean found = Standard_False;
   for (; it.More(); it.Next()) {
     if (!it.Shape().IsNull()) {
+#ifdef MDTV_DEB_MODUN
+      if(!it.NamedShape().IsNull())
+        PrintEntry(it.NamedShape()->Label());
+#endif
       if (it.NamedShape() == Context) {
 	MS.Add(S);
 	found = Standard_True;
@@ -557,13 +567,16 @@ static void SearchModifUntil (const TDF_LabelMap&               /*Valid*/,
       Standard_Integer k = 0;
       TCollection_AsciiString aNam1 = aGen1 + i + Und + j + ".brep";
       DbgTools_Write(S, aNam1.ToCString());
+      PrintEntry(aNS->Label());//NSLabel
 #endif   
-      for  (TNaming_Iterator itC (Target); itC.More(); itC.Next()) {  // <- generated
+      TNaming_Iterator itC (Target);
+      for  (; itC.More(); itC.Next()) {  // <- generated
 	const TopoDS_Shape& OS = itC.OldShape();
 #ifdef MDTV_DEB_MODUN
 	k++;
 	TCollection_AsciiString aNam2 = aGen2 + i + Und + j + Und + k + ".brep";
 	DbgTools_Write(OS, aNam2.ToCString());
+	PrintEntry(Target->Label());//Target Label
 #endif 
 	if (OS.IsSame(S)) {
 	  theMS.Add(S);
@@ -1420,6 +1433,7 @@ static Standard_Boolean  FilterByNeighbourgs (const TDF_Label&                L,
   i=1;
   aNam = "Boundaries";
 #endif
+  Standard_Boolean isDone = Standard_False;
   if(SCand.Extent() == 1) { // check if a collection is inside
     TopTools_MapIteratorOfMapOfShape it(SCand);
     const TopoDS_Shape& aS = it.Key();
@@ -1493,12 +1507,13 @@ static Standard_Boolean  FilterByNeighbourgs (const TDF_Label&                L,
     } //2
     if (Keep) {
       B.Select (S,S);
+	  isDone = Standard_True;
 #ifdef MDTV_DEB_FNB
       DbgTools_Write(S,  "FilterByNbs_Sel.brep") ;
 #endif
     }
   } //1
-  return Standard_True;
+  return isDone;
 }
 
 //=======================================================================
@@ -1750,78 +1765,283 @@ static Standard_Boolean ORientation (const TDF_Label&                L,
 
 //===========================================================================
 //function : WireIN
-//purpose  : to solve  WIREIN name; Index for case if the Face has several wires
+//purpose  : to solve  WIREIN name
 //=======================================================================
 static Standard_Boolean WireIN(const TDF_Label&                L,
 			       const TDF_LabelMap&             Valid,
-			       const TNaming_ListOfNamedShape& Args,
-			       const Standard_Integer          Index)
+			       const TNaming_ListOfNamedShape& Args, 
+				   const Handle(TNaming_NamedShape)& Stop,
+				   Standard_Integer Index)
 {
   Standard_Boolean aResult(Standard_False);
   if(!ValidArgs(Args)) return aResult;
   TopTools_MapOfShape MS; 
   TDF_LabelMap        Forbiden;
-  if (Args.Extent() != 1 ) 
+  if (Args.Extent() < 1 ) 
     Standard_ConstructionError::Raise("TNaming_Name::Solve"); 
-  const Handle(TNaming_NamedShape)& A = Args.Last(); 
+  const Handle(TNaming_NamedShape)& A = Args.First();
   TNaming_NamingTool::CurrentShape (Valid,Forbiden,A,MS);
+  if (MS.Extent() != 1) return aResult;
+  TopTools_MapIteratorOfMapOfShape itM(MS); 
+  const TopoDS_Shape& aCF = itM.Key()   ;
 #ifdef MDTV_DEB_WIN
   cout <<"MS Extent = " <<MS.Extent() <<endl;
+  DbgTools_Write(aCF, "Context_Face.brep");
 #endif
-  Standard_Integer indx(0), num(0);
-  if(Index > 0) {
-    indx = Index & 0x000000FF;
-    num  = (Index & 0x0000FF00) >> 8;
-#ifdef MDTV_DEB_WIN
-    cout <<"Kept indx = " << indx  <<" maxNum" << num << endl;
-#endif      
-  }
   TNaming_Builder B(L);
-  for (TopTools_MapIteratorOfMapOfShape itM(MS); itM.More(); itM.Next()) {
-    const TopoDS_Shape& S = itM.Key()	;
+  if(Index == 1 ){ //Outer wire case 
+    TopoDS_Wire anOuterWire;
+    TNaming::OuterWire(TopoDS::Face(aCF), anOuterWire);
+	if(!anOuterWire.IsNull()) {
+      B.Select(anOuterWire, anOuterWire);
+	  aResult = Standard_True;
+	}
+  } else { //has internal wires
+	TNaming_ListOfNamedShape ArgsE;
+    ArgsE.Assign(Args);
+    ArgsE.RemoveFirst();
+	// fill Map with edges 
+    TNaming_ListIteratorOfListOfNamedShape it(ArgsE);
+    TopTools_MapOfShape MS; 
+    TDF_LabelMap        Forbiden;
+  
+    TNaming_NamingTool::BuildDescendants (Stop, Forbiden);//fill Forbidden
+    TNaming_NamingTool::CurrentShape  (Valid, Forbiden,it.Value(),MS); // fill MS with last modifications of the first additional argument
+    TopoDS_Shape  CS = MakeShape(MS);
+
+    TNaming_ShapesSet aSet(CS,TopAbs_EDGE);//fill internal map of shapeset by shapes of the specified type
 #ifdef MDTV_DEB_WIN
-    if(!S.IsNull()) {
-      DbgTools_Write(S, "WireIN_S.brep");
-      cout <<"WIREIN: ShapeType = " << S.ShapeType() << " TS = " << S.TShape()->This() <<endl;
-    }
+    TCollection_AsciiString entry; 
+    TDF_Tool::Entry(it.Value()->Label(), entry);
+    TCollection_AsciiString Nam("Arg_");
+    TCollection_AsciiString aNam = Nam + entry + "_" + "2.brep";
+    DbgTools_Write(CS, aNam.ToCString());
+    Standard_Integer ii = 2;
+#endif
+    it.Next();
+    for (; it.More(); it.Next()) {
+#ifdef MDTV_DEB_WIN 
+      TDF_Tool::Entry(it.Value()->Label(), entry);
+#endif
+      MS.Clear();
+      TNaming_NamingTool::CurrentShape (Valid, Forbiden,it.Value(),MS);// fill MS with last modifications of the it.Value()
+      CS = MakeShape(MS); 
+      TNaming_ShapesSet OS(CS,TopAbs_EDGE);
+      aSet.Add(OS); //concatenate both shapesets
+ 
+#ifdef MDTV_DEB_WIN
+      ii++;
+      TCollection_AsciiString aNm = Nam + entry + "_" + ii + ".brep";
+      DbgTools_Write(CS, aNm.ToCString());
+      cout <<"Arg: Entry = " <<entry <<"  TShape = " << CS.TShape() <<endl;
 #endif
-    Standard_Integer aNum(0), aCase(0);
-    TopoDS_Iterator it2(S);
-    for (;it2.More();it2.Next()) aNum++;      
-    if(Index > 0) {
-      if(num == aNum) aCase = 1;//exact solution
-      else if(aNum == 1)   aCase = 2;// possible merge of initial wires
-      else aCase = 3; // indefinite description ==> compound which can include expected wire
+	}
+
+#ifdef MDTV_DEB_WIN
+    cout <<"WIREIN: " << " Internal Map ext = " << aSet.Map().Extent()<<endl;
+    TopTools_MapIteratorOfMapOfShape it1 (aSet.Map());
+    for (int i=1;it1.More();it1.Next(),i++) {
+      cout << "Map("<<i<<"): TShape = " << it1.Key().TShape() << " Orient = " << it1.Key().Orientation() <<" Type = " <<
+		  it1.Key().ShapeType()<<endl;
     }
     
-    Standard_Integer i(0);
-    for (it2.Initialize(S);it2.More();it2.Next()) {
-#ifdef MDTV_DEB_WIN
-      if(!it2.Value().IsNull()) {
-	DbgTools_Write(it2.Value(), "WireIN_it2Value.brep");
-	cout <<"WIREIN: ShapeType = " << it2.Value().ShapeType() << " TS = " << it2.Value().TShape()->This() <<endl;
-      }
+    TopExp_Explorer exp(aCF, TopAbs_EDGE);
+    for(int i =1;exp.More();exp.Next(), i++) {
+     cout << "Context_Face("<<i<<"): TShape = " << exp.Current().TShape() << " Orient = " << exp.Current().Orientation() <<endl;
+    }	    
 #endif
-      i++;
-      if(it2.Value().ShapeType() == TopAbs_WIRE) {
-	if(Index > 0 ) { //szy 26/03/10
-	  if(aCase == 1) {
-	    if(i == indx) {
-	      aResult  = Standard_True;
-	      B.Select(it2.Value(),it2.Value());
+//end for edges
+	
+  for (TopoDS_Iterator itF(aCF); itF.More(); itF.Next()) {// find the expected wire in the face
+    const TopoDS_Shape& S = itF.Value();//wire
+	if(!S.IsNull()) {
+#ifdef MDTV_DEB_WIN    
+      DbgTools_Write(S, "WireIN_S.brep");
+      cout <<"WIREIN: ShapeType = " << S.ShapeType() << " TS = " << S.TShape()->This() <<endl;
+#endif       
+      if(S.ShapeType() == TopAbs_WIRE) {
+		TopTools_MapOfShape aView;
+		Standard_Integer aNum(0x7FFFFFFF);
+	    for (TopoDS_Iterator it(S);it.More();it.Next())
+          aView.Add(it.Value());// edges of wire of the face in map
+
+        TopTools_MapIteratorOfMapOfShape it (aSet.Map());
+		aNum = aView.Extent();
+		if(aNum == aSet.Map().Extent()) {
+          for (;it.More();it.Next()) {
+			if(aView.Contains(it.Key())) {
+				aNum--;
+			}
+		  }
+		}
+		if(aNum == 0) {
+		  B.Select(S, S);
+	      aResult = Standard_True;
 	      break;
-	    }
-	  } else {
-	    B.Select(it2.Value(),it2.Value());
-	    aResult = Standard_True;
+		}
+	  }
+	}	
+  } //
+
+  if(!aResult) {
+	TopoDS_Wire anOuterWire;
+    TNaming::OuterWire(TopoDS::Face(aCF), anOuterWire);
+	if(!anOuterWire.IsNull()) {
+      for (TopoDS_Iterator itF(aCF); itF.More(); itF.Next()) {
+        const TopoDS_Shape& S = itF.Value();//wire
+	    if(!S.IsNull()&& S.ShapeType() == TopAbs_WIRE) {
+		  if(S.IsEqual(anOuterWire)) continue;
+		  B.Select(S, S);
+		}
 	  }
 	}
-	else {
-	  B.Select(it2.Value(),it2.Value());
+  }
+  }
+  return aResult;
+}
+//===========================================================================
+//function : ShellIN
+//purpose  : to solve  SHELLIN name
+//===========================================================================
+static Standard_Boolean ShellIN(const TDF_Label&                L,
+			       const TDF_LabelMap&             Valid,
+			       const TNaming_ListOfNamedShape& Args, 
+				   const Handle(TNaming_NamedShape)& Stop,
+				   Standard_Integer Index)
+{
+  Standard_Boolean aResult(Standard_False);
+  if(!ValidArgs(Args)) 
+	  return aResult;
+  TopTools_MapOfShape MS; 
+  TDF_LabelMap        Forbiden;
+  if (Args.Extent() < 1 ) 
+    Standard_ConstructionError::Raise("TNaming_Name::Solve"); 
+  const Handle(TNaming_NamedShape)& A = Args.First();
+  TNaming_NamingTool::CurrentShape (Valid,Forbiden,A,MS);
+  if (MS.Extent() != 1) return aResult;
+  TopTools_MapIteratorOfMapOfShape itM(MS); 
+  const TopoDS_Shape& aCSO = itM.Key()   ;
+#ifdef MDTV_DEB_SHELL
+  cout <<"MS Extent = " <<MS.Extent() <<endl;
+  DbgTools_Write(aCSO, "Context_Solid.brep");
+#endif
+  TNaming_Builder B(L);
+  if(Index == 1 ){ //Outer Shell case  
+	TopoDS_Shell anOuterShell;
+	TNaming::OuterShell(TopoDS::Solid(aCSO), anOuterShell);
+	if(!anOuterShell.IsNull()) {
+      B.Select(anOuterShell, anOuterShell);
 	  aResult = Standard_True;
+#ifdef MDTV_DEB_SHELL      
+	  cout << "Outer Shell case" <<endl;
+      PrintEntry(L);
+	  DbgTools_Write(anOuterShell, "ShellOut_S.brep");
+	  it.Initialize(aCSO);
+		for(;it.More();it.Next()){ 
+          DbgTools_Write(it.Value(), "ShOut_S.brep");
+		}
+#endif       
 	}
-      }
+  } else { //has internal Shells
+	TNaming_ListOfNamedShape ArgsF;
+    ArgsF.Assign(Args);
+    ArgsF.RemoveFirst();
+	// fill Map with faces 
+    TNaming_ListIteratorOfListOfNamedShape it(ArgsF);
+    TopTools_MapOfShape MS; 
+    TDF_LabelMap        Forbiden;
+  
+    TNaming_NamingTool::BuildDescendants (Stop, Forbiden);//fill Forbidden
+    TNaming_NamingTool::CurrentShape  (Valid, Forbiden,it.Value(),MS); // fill MS with last modifications of the first additional argument
+    TopoDS_Shape  CS = MakeShape(MS);
+
+    TNaming_ShapesSet aSet(CS,TopAbs_FACE);//fill internal map of shapeset by shapes of the specified type
+#ifdef MDTV_DEB_SHELL
+    TCollection_AsciiString entry; 
+    TDF_Tool::Entry(it.Value()->Label(), entry);
+    TCollection_AsciiString Nam("Arg_");
+    TCollection_AsciiString aNam = Nam + entry + "_" + "2.brep";
+    DbgTools_Write(CS, aNam.ToCString());
+    Standard_Integer ii = 2;
+#endif
+    it.Next();
+    for (; it.More(); it.Next()) {
+#ifdef MDTV_DEB_SHELL 
+      TDF_Tool::Entry(it.Value()->Label(), entry);
+#endif
+      MS.Clear();
+      TNaming_NamingTool::CurrentShape (Valid, Forbiden,it.Value(),MS);// fill MS with last modifications of the it.Value()
+      CS = MakeShape(MS); 
+      TNaming_ShapesSet OS(CS,TopAbs_FACE);
+      aSet.Add(OS); //concatenate both shapesets
+ 
+#ifdef MDTV_DEB_SHELL
+      ii++;
+      TCollection_AsciiString aNm = Nam + entry + "_" + ii + ".brep";
+      DbgTools_Write(CS, aNm.ToCString());
+      cout <<"Arg: Entry = " <<entry <<"  TShape = " << CS.TShape() <<endl;
+#endif
+	}
+
+#ifdef MDTV_DEB_SHELL
+    cout <<"SHELLIN: " << " Internal Map ext = " << aSet.Map().Extent()<<endl;
+    TopTools_MapIteratorOfMapOfShape it1 (aSet.Map());
+    for (int i=1;it1.More();it1.Next(),i++) {
+      cout << "Map("<<i<<"): TShape = " << it1.Key().TShape() << " Orient = " << it1.Key().Orientation() <<" Type = " <<
+		  it1.Key().ShapeType()<<endl;
     }
+    
+    TopExp_Explorer exp(aCSO, TopAbs_FACE);
+    for(int i = 1;exp.More();exp.Next(), i++) {
+     cout << "Context_Solid("<<i<<"): TShape = " << exp.Current().TShape() << " Orient = " << exp.Current().Orientation() <<endl;
+    }	    
+#endif
+//end for faces
+	
+  for (TopoDS_Iterator itS(aCSO); itS.More(); itS.Next()) {// find the expected shell in the solid
+    const TopoDS_Shape& S = itS.Value();//shell
+	if(!S.IsNull()) {
+#ifdef MDTV_DEB_SHELL    
+      DbgTools_Write(S, "ShellIN_S.brep");
+      cout <<"SHELLIN: ShapeType = " << S.ShapeType() << " TS = " << S.TShape()->This() <<endl;
+#endif       
+	  if(S.ShapeType() == TopAbs_SHELL) {
+		TopTools_MapOfShape aView;
+		Standard_Integer aNum(0x7FFFFFFF);
+	    for (TopoDS_Iterator it(S);it.More();it.Next())
+          aView.Add(it.Value());// faces of shell of the solid in map
+        
+		aNum = aView.Extent();
+		if(aNum == aSet.Map().Extent()) {
+		  TopTools_MapIteratorOfMapOfShape it (aSet.Map());
+          for (;it.More();it.Next()) {
+			if(aView.Contains(it.Key())) {
+				aNum--;
+			}
+		  }
+		}
+		if(aNum == 0) {
+		  B.Select(S, S);
+	      aResult = Standard_True;
+	      break;
+		}
+	  }
+	}	
+  } //
+
+  if(!aResult) {    
+	TopoDS_Shell anOuterShell; 
+	TNaming::OuterShell(TopoDS::Solid(aCSO), anOuterShell);
+	if(!anOuterShell.IsNull()) {
+      for (TopoDS_Iterator itS(aCSO); itS.More(); itS.Next()) {
+        const TopoDS_Shape& S = itS.Value();//shell
+	    if(!S.IsNull()&& S.ShapeType() == TopAbs_SHELL) {
+		  if(S.IsEqual(anOuterShell)) continue;
+		  B.Select(S, S);
+		}
+	  }
+	}
+  }
   }
   return aResult;
 }
@@ -1857,6 +2077,9 @@ Standard_Boolean TNaming_Name::Solve(const TDF_Label&    aLab,
 				     const TDF_LabelMap& Valid) const
 {
   Standard_Boolean Done = 0;
+#ifdef MDTV_DEB_WIN
+  PrintEntry(aLab);
+#endif
   try {
   switch (myType) {
   case TNaming_UNKNOWN :
@@ -1911,7 +2134,20 @@ Standard_Boolean TNaming_Name::Solve(const TDF_Label&    aLab,
     }
   case TNaming_WIREIN: 
     {
-      Done = WireIN (aLab,Valid,myArgs,myIndex);
+#ifdef MDTV_DEB_WIN  
+      cout << "Name::Solve: NameType = " << myType << "  ";
+  PrintEntry(aLab);
+#endif
+      Done = WireIN (aLab,Valid,myArgs,myStop,myIndex);
+      break;
+    }
+case TNaming_SHELLIN: 
+    {
+#ifdef MDTV_DEB_SHELL
+      cout << "Name::Solve: NameType = " << myType << "  ";
+      PrintEntry(aLab);
+#endif
+      Done = ShellIN (aLab,Valid,myArgs,myStop,myIndex);      
       break;
     }
   }
diff --git a/src/TNaming/TNaming_NamedShape.cdl b/src/TNaming/TNaming_NamedShape.cdl
index ced18e6..ad1d076 100644
--- a/src/TNaming/TNaming_NamedShape.cdl
+++ b/src/TNaming/TNaming_NamedShape.cdl
@@ -80,6 +80,7 @@ is
 	---C++: inline         
 
     Clear (me : mutable);
+    ---C++: alias ~
 
     ID(me) returns GUID from Standard
     	is redefined static;
@@ -139,13 +140,6 @@ is
 	--          attribute may be a brand new one or a new version
 	--          of the previous one.   
 
-    
-    OldPaste(me;
-    	  intoAttribute    : mutable Attribute from TDF;
-	  aRelocTationable : mutable RelocationTable from TDF);
-
-
-
     References(me; aDataSet : DataSet from TDF)
     	is redefined;
 	---Purpose: Adds the directly referenced attributes and labels
diff --git a/src/TNaming/TNaming_NamedShape.cxx b/src/TNaming/TNaming_NamedShape.cxx
index 5e81a04..a015e13 100644
--- a/src/TNaming/TNaming_NamedShape.cxx
+++ b/src/TNaming/TNaming_NamedShape.cxx
@@ -618,28 +618,23 @@ Standard_OStream& TNaming_NamedShape::Dump(Standard_OStream& anOS) const
 
 TNaming_Builder::TNaming_Builder (const TDF_Label& L)
 {
-  Handle(TNaming_UsedShapes) Shapes;
-
   // Find or Build Map;
   const TDF_Label& root = L.Root();
-  if (!root.FindAttribute(TNaming_UsedShapes::GetID(),Shapes)) {
-    Shapes = new TNaming_UsedShapes();
-    root.AddAttribute (Shapes);
+  if (!root.FindAttribute(TNaming_UsedShapes::GetID(),myShapes)) {
+    myShapes = new TNaming_UsedShapes();
+    root.AddAttribute (myShapes);
   }
-  myMap = &(Shapes->myMap);
   
   //Find Or Build Attribute in LIns.
-  Handle(TNaming_NamedShape) Att;
-  if (!L.FindAttribute(TNaming_NamedShape::GetID(),Att)) {
-    Att = new TNaming_NamedShape();  
-    L.AddAttribute(Att);
+  if (!L.FindAttribute(TNaming_NamedShape::GetID(),myAtt)) {
+    myAtt = new TNaming_NamedShape();  
+    L.AddAttribute(myAtt);
   }
   else {
-    Att->Backup();
-    Att->Clear();  
-    Att->myVersion++;
+    myAtt->Backup();
+    myAtt->Clear();  
+    myAtt->myVersion++;
   }
-  myAtt = Att.operator->();
 }
 
 //=======================================================================
@@ -698,12 +693,12 @@ void TNaming_Builder::Generated(const TopoDS_Shape& newShape)
   TNaming_RefShape* pos = 0L;
   TNaming_RefShape* pns;
   
-  if (myMap->IsBound(newShape)) {
+  if (myShapes->myMap.IsBound(newShape)) {
 #ifdef DEB
     cout <<"TNaming_Builder::Generate : the shape is already in the attribute"<<endl;
 #endif
-    pns = myMap->ChangeFind(newShape);
-    if (pns->FirstUse()->myAtt  == myAtt) {
+    pns = myShapes->myMap.ChangeFind(newShape);
+    if (pns->FirstUse()->myAtt  == myAtt.operator->()) {
       Standard_ConstructionError::Raise("TNaming_Builder::Generate");
     }
     TNaming_Node* pdn = new TNaming_Node(pos,pns);
@@ -714,7 +709,7 @@ void TNaming_Builder::Generated(const TopoDS_Shape& newShape)
     pns = new TNaming_RefShape(newShape);    
     TNaming_Node*     pdn = new TNaming_Node(pos,pns); 
     pns  ->FirstUse(pdn);
-    myMap->Bind    (newShape , pns);
+    myShapes->myMap.Bind (newShape , pns);
     myAtt->Add(pdn);
   }
 }
@@ -737,14 +732,14 @@ void TNaming_Builder::Delete(const TopoDS_Shape& oldShape)
   TNaming_RefShape* pns = 0L;
   TNaming_RefShape* pos;
 
-  if (myMap->IsBound(oldShape)) 
-    pos = myMap->ChangeFind(oldShape); 
+  if (myShapes->myMap.IsBound(oldShape)) 
+    pos = myShapes->myMap.ChangeFind(oldShape); 
   else {
 #ifdef DEB
     cout <<"TNaming_Builder::Delete : the shape is not in the data"<<endl;
 #endif
     pos = new TNaming_RefShape(oldShape);  
-    myMap->Bind(oldShape, pos);
+    myShapes->myMap.Bind(oldShape, pos);
   }
   TNaming_Node*     pdn = new TNaming_Node(pos,pns);   
   myAtt->Add(pdn);
@@ -772,20 +767,20 @@ void TNaming_Builder::Generated(const TopoDS_Shape& oldShape,
     return;
   }
   TNaming_RefShape* pos;
-  if (!myMap->IsBound(oldShape)) {
+  if (!myShapes->myMap.IsBound(oldShape)) {
     pos = new TNaming_RefShape(oldShape);
-    myMap->Bind(oldShape,pos);
+    myShapes->myMap.Bind(oldShape,pos);
   }
   else
-    pos = myMap->ChangeFind(oldShape);
+    pos = myShapes->myMap.ChangeFind(oldShape);
   
   TNaming_RefShape* pns;
-  if (!myMap->IsBound(newShape)) {
+  if (!myShapes->myMap.IsBound(newShape)) {
     pns = new TNaming_RefShape(newShape);
-    myMap->Bind(newShape,pns);
+    myShapes->myMap.Bind(newShape,pns);
   }
   else
-    pns = myMap->ChangeFind(newShape);
+    pns = myShapes->myMap.ChangeFind(newShape);
   
   TNaming_Node* pdn = new TNaming_Node(pos,pns);
   myAtt->Add(pdn);
@@ -815,63 +810,20 @@ void TNaming_Builder::Modify(const TopoDS_Shape& oldShape,
     return;
   }
   TNaming_RefShape* pos;
-  if (!myMap->IsBound(oldShape)) {
-    pos = new TNaming_RefShape(oldShape);
-    myMap->Bind(oldShape,pos);
-  }
-  else
-    pos = myMap->ChangeFind(oldShape);
-  
-  TNaming_RefShape* pns;
-  if (!myMap->IsBound(newShape)) {
-    pns = new TNaming_RefShape(newShape);
-    myMap->Bind(newShape,pns);
-  }
-  else
-    pns = myMap->ChangeFind(newShape);
-  
-  TNaming_Node* pdn = new TNaming_Node(pos,pns);
-  myAtt->Add(pdn);
-  UpdateFirstUseOrNextSameShape (pos,pdn);
-  UpdateFirstUseOrNextSameShape (pns,pdn);
-  
-}
-
-//=======================================================================
-//function : Modify
-//purpose  : 
-//=======================================================================
-
-void TNaming_Builder::Replace(const TopoDS_Shape& oldShape,
-			      const TopoDS_Shape& newShape) 
-{ 
-  if (myAtt->myNode == 0L) myAtt->myEvolution = TNaming_REPLACE;
-  else {
-    if (myAtt->myEvolution != TNaming_REPLACE)
-      Standard_ConstructionError::Raise("TNaming_Builder : not same evolution");
-  }
-
-  if (oldShape.IsSame(newShape)) {
-#ifdef DEB
-    cout <<"TNaming_Builder::Modify : oldShape IsSame newShape"<<endl;
-#endif
-    return;
-  }
-  TNaming_RefShape* pos;
-  if (!myMap->IsBound(oldShape)) {
+  if (!myShapes->myMap.IsBound(oldShape)) {
     pos = new TNaming_RefShape(oldShape);
-    myMap->Bind(oldShape,pos);
+    myShapes->myMap.Bind(oldShape,pos);
   }
   else
-    pos = myMap->ChangeFind(oldShape);
+    pos = myShapes->myMap.ChangeFind(oldShape);
   
   TNaming_RefShape* pns;
-  if (!myMap->IsBound(newShape)) {
+  if (!myShapes->myMap.IsBound(newShape)) {
     pns = new TNaming_RefShape(newShape);
-    myMap->Bind(newShape,pns);
+    myShapes->myMap.Bind(newShape,pns);
   }
   else
-    pns = myMap->ChangeFind(newShape);
+    pns = myShapes->myMap.ChangeFind(newShape);
   
   TNaming_Node* pdn = new TNaming_Node(pos,pns);
   myAtt->Add(pdn);
@@ -881,45 +833,7 @@ void TNaming_Builder::Replace(const TopoDS_Shape& oldShape,
 }
 
 //=======================================================================
-static const TopoDS_Shape& DummyShapeToStoreOrientation (const TopAbs_Orientation Or)
-{
-  static TopoDS_Vertex aVForward, aVRev, aVInt, aVExt;
-  switch(Or) {
-  case TopAbs_FORWARD:
-    if(aVForward.IsNull()) {
-      gp_Pnt aPnt(0,0,0);
-      BRepBuilderAPI_MakeVertex aMake(aPnt);
-      aVForward = aMake.Vertex();
-      aVForward.Orientation(TopAbs_FORWARD);
-    }
-    return aVForward;
-  case TopAbs_REVERSED:
-    if(aVRev.IsNull()) {
-      gp_Pnt aPnt(0,0,0);
-      BRepBuilderAPI_MakeVertex aMake(aPnt);
-      aVRev = aMake.Vertex();
-      aVRev.Orientation(TopAbs_REVERSED);
-    }
-    return aVRev;
-  case TopAbs_INTERNAL:
-    if(aVInt.IsNull()) {
-      gp_Pnt aPnt(0,0,0);
-      BRepBuilderAPI_MakeVertex aMake(aPnt);
-      aVInt = aMake.Vertex();
-      aVInt.Orientation(TopAbs_INTERNAL);
-    }
-    return aVInt;
-  case TopAbs_EXTERNAL:
-    if(aVExt.IsNull()) {
-      gp_Pnt aPnt(0,0,0);
-      BRepBuilderAPI_MakeVertex aMake(aPnt);
-      aVExt = aMake.Vertex();
-      aVExt.Orientation(TopAbs_EXTERNAL);
-    }
-    return aVExt;
-  }
-  return aVForward;
-}
+static TopoDS_Vertex theDummyVertex (BRepBuilderAPI_MakeVertex(gp_Pnt(0.,0.,0.)).Vertex());
 
 //=======================================================================
 //function : Select
@@ -936,29 +850,30 @@ void TNaming_Builder::Select (const TopoDS_Shape& S,
 
   TNaming_RefShape* pos;
   if(S.ShapeType() != TopAbs_VERTEX) {
-    const TopoDS_Shape& aV = DummyShapeToStoreOrientation (S.Orientation());
-    if (!myMap->IsBound(aV)) {
+    TopoDS_Shape aV = theDummyVertex;
+    aV.Orientation (S.Orientation());
+    if (!myShapes->myMap.IsBound(aV)) {
       pos = new TNaming_RefShape(aV);
-      myMap->Bind(aV,pos);
+      myShapes->myMap.Bind(aV,pos);
     }
     else
-      pos = myMap->ChangeFind(aV);    
+      pos = myShapes->myMap.ChangeFind(aV);    
   } else {
-    if (!myMap->IsBound(InS)) {
+    if (!myShapes->myMap.IsBound(InS)) {
       pos = new TNaming_RefShape(InS);
-      myMap->Bind(InS,pos);
+      myShapes->myMap.Bind(InS,pos);
     }
     else
-      pos = myMap->ChangeFind(InS);
+      pos = myShapes->myMap.ChangeFind(InS);
   }
 
   TNaming_RefShape* pns;
-  if (!myMap->IsBound(S)) {
+  if (!myShapes->myMap.IsBound(S)) {
     pns = new TNaming_RefShape(S);
-    myMap->Bind(S,pns);
+    myShapes->myMap.Bind(S,pns);
   }
   else
-    pns = myMap->ChangeFind(S);  
+    pns = myShapes->myMap.ChangeFind(S);  
 
   TNaming_Node* pdn = new TNaming_Node(pos,pns);
   myAtt->Add(pdn);
@@ -1721,59 +1636,3 @@ Standard_Integer TNaming_Tool::ValidUntil (const TopoDS_Shape&               S,
   }
   return Until;
 }
- 
-
-//=======================================================================
-//function : OldPaste
-//purpose  : 
-//=======================================================================
-
-void TNaming_NamedShape::OldPaste(const Handle(TDF_Attribute)&       into,
-                                  const Handle(TDF_RelocationTable)& /*Tab*/)
-const
-{ 
-  TDF_Label        Lab = into->Label();
-  if (Lab.IsNull()) {
-    Standard_NullObject::Raise("TNaming_NamedShape::Paste");
-  }
-  //TDF_Insertor Ins(Lab);
-  //TNaming_Builder B(Ins);
-  TNaming_Builder B(Lab);
-
-  TNaming_Iterator It (this);
-  for ( ;It.More() ; It.Next()) {
-    const TopoDS_Shape& OS     = It.OldShape();
-    const TopoDS_Shape& NS     = It.NewShape();
-    TNaming_Evolution   Status = It.Evolution();
-    switch (Status) {
-    case TNaming_PRIMITIVE :
-      {
-	B.Generated(NS);
-	break;
-      }
-    case TNaming_GENERATED :
-      {
-	B.Generated(OS,NS);
-	break;
-      }
-    case TNaming_MODIFY : 
-      {
-	B.Modify(OS,NS);
-	break;
-      }
-    case TNaming_DELETE : 
-      {
-	B.Delete (OS);
-	break;
-      }
-    case TNaming_SELECTED :
-      {
-	B.Select(NS,OS);
-	break;
-      }
-    case TNaming_REPLACE :
-      B.Replace(OS,NS);
-    }
-  }
-}
-
diff --git a/src/TNaming/TNaming_Naming.cxx b/src/TNaming/TNaming_Naming.cxx
index a6f5c0c..a25a33e 100644
--- a/src/TNaming/TNaming_Naming.cxx
+++ b/src/TNaming/TNaming_Naming.cxx
@@ -53,8 +53,13 @@
 #include <TColStd_MapIteratorOfMapOfInteger.hxx>
 #include <TopTools_MapIteratorOfMapOfOrientedShape.hxx>
 #include <TopTools_HArray1OfShape.hxx>
+#include <BRepTools.hxx>
 #include <BRep_Tool.hxx>
 #include <TopoDS.hxx>
+#include <TopoDS_Wire.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Shell.hxx>
+#include <TopoDS_Solid.hxx>
 // #include <TNaming_NCollections.hxx>
 #include <NCollection_Map.hxx>   
 #include <NCollection_DataMap.hxx>
@@ -697,6 +702,7 @@ static Standard_Boolean Filter (const TDF_Label&                  F,
   //DbgTools::DisplayShape(S, F, Quantity_NOC_BLUE1);  
   Write(Context, "FNBS_Context.brep");
   Write(S, "FNBS_S.brep");
+  Write(Neighbourg, "NBS");
 #endif
 #ifdef OCC273
   // mpv : NS and shape must be the same
@@ -835,6 +841,8 @@ static Standard_Boolean Filter (const TDF_Label&                  F,
 #ifdef MDTV_DEB_NBS
   cout << "FilterByNBS: ";
   Print_Entry(NF->Label());
+  cout <<"AppendNS = " ;
+  Print_Entry(NS->Label());
 #endif
   //---------------------
   // Naming des voisins.
@@ -850,8 +858,14 @@ static Standard_Boolean Filter (const TDF_Label&                  F,
     const TopoDS_Shape& aS2 = aNS->Get(); 
     if(!aS.IsNull())
       cout << "Shape arg type = " << aS.ShapeType() <<" TSH = " << aS.TShape()->This()<<endl;
-    if(!aS2.IsNull())
+    if(!aS2.IsNull()) {
       cout << "Build shape type = " << aS2.ShapeType() <<" TSH = " << aS2.TShape()->This()<<endl;
+      Write (aS2, "NBS_BuildShape.brep");
+    }
+    if(aNS.IsNull()) {
+     cout <<"AppendNS = " ;
+     Print_Entry(aNS->Label());
+    }
 #endif
 		  
     const TopoDS_Shape aSNS = aNS->Get();  //allow child level
@@ -925,7 +939,7 @@ static Handle(TNaming_NamedShape) BuildNameInNS (const TDF_Label&
 
 {
   // il faut determiner un nouveau context et un nouveau Stop.
-  // it is necessary to determine new a context and a new Stop
+  // it is necessary to determine a new context and a new Stop
   TopoDS_Shape SC;
   Handle(TNaming_NamedShape) NewStop = Stop;
   
@@ -1248,8 +1262,11 @@ static void BuildScope (TNaming_Scope&    MDF,
 }
 
 //=======================================================================
+//function : HasAncFace
+//purpose  : Returns True & <Face> if ancestor face is found
+//=======================================================================
 static Standard_Boolean HasAncFace(const TopoDS_Shape& Context, 
-				   const TopoDS_Shape& W, TopoDS_Shape& Face)
+				   const TopoDS_Shape& W, TopoDS_Shape& Face, Standard_Boolean& isOuter)
 { 
   Standard_Boolean hasFace(Standard_False);
   if(W.ShapeType() != TopAbs_WIRE)
@@ -1258,14 +1275,22 @@ static Standard_Boolean HasAncFace(const TopoDS_Shape& Context,
   for(;exp.More(); exp.Next()) {
     for (TopoDS_Iterator it(exp.Current()) ; it.More(); it.Next()) {
       if(it.Value().IsEqual(W)) {// is the Wire ?
-	Face = exp.Current();
-	if(!Face.IsNull()) {
-	  hasFace = Standard_True;
-	  //	  cout << "HasAncFace: TS = " <<theFace.TShape()->This() <<endl;
-	  break;
-	}	
-      }
-    }
+	    Face = exp.Current();
+	    if(!Face.IsNull()) {
+	      hasFace = Standard_True;
+	//	  cout << "HasAncFace: TS = " <<theFace.TShape()->This() <<endl;
+		  const TopoDS_Face aFace(TopoDS::Face(Face));
+		  TopoDS_Wire anOuterW; 
+		  if(TNaming::OuterWire(aFace, anOuterW)) {
+		    if(!anOuterW.IsNull() && anOuterW.IsEqual(W)) 
+			  isOuter = Standard_True;
+		    else 
+			  isOuter = Standard_False;		
+		  }
+	      break;		  		  
+		}
+	  }
+	}
     if(hasFace) break;
   }
   return hasFace;
@@ -1296,45 +1321,53 @@ static Handle(TNaming_NamedShape) BuildNameWire (const TDF_Label&
 
   TNaming_Name& theName = Naming->ChangeName();  
   TopoDS_Shape aFace;
-  Standard_Boolean hasFace = HasAncFace(Context, Selection, aFace);
-  if(Selection.ShapeType() == TopAbs_WIRE && Context.ShapeType() < Selection.ShapeType() && hasFace) {	
+  Standard_Boolean isOuter(Standard_False);
+  Standard_Boolean hasFace = HasAncFace(Context, Selection, aFace, isOuter);  
+  if(hasFace && Selection.ShapeType() > Context.ShapeType()) {
     theName.Type(TNaming_WIREIN);
-    if(Context.ShapeType() == TopAbs_FACE) {
-      for (TopoDS_Iterator it(Context) ; it.More(); it.Next()) {
-	if(it.Value().IsEqual(Selection)) {
-	  if (TNaming_Selector::IsIdentified (F, Context, NS, Geom)) {		
-	    theName.Append(NS);
-	    found = Standard_True;
-	    break;
-	  }
-	}
-      }
-      if(!found)
-	return BuildNS (F,Selection, TNaming_UNKNOWN);
-    } else {
-        Standard_Integer indx(0), i(0);
-	for (TopoDS_Iterator it(aFace); it.More(); it.Next()) {
-	  i++;
-	  if(it.Value().IsEqual(Selection)) {
-	    found = Standard_True;
-	    theName.Append(BuildName (Naming->Label(),MDF,aFace,Context,Stop,Geom));
-	    indx = i;
+	if(Context.ShapeType() == TopAbs_FACE) {
+		for (TopoDS_Iterator it(Context) ; it.More(); it.Next()) {
+		  if(it.Value().IsEqual(Selection)) {
+	        if (TNaming_Selector::IsIdentified (F, Context, NS, Geom)) {		
+	          theName.Append(NS);
+	          found = Standard_True;
+	          break;
+			}
+		  }
 	  }
-	}
-	if(found) {
-	  const Standard_Integer num(i);
-	  indx = indx | num << 8;
-	  //cout << " final Index = " << indx <<endl;
-	  theName.Index(indx);
-	} else
-	  return BuildNS (F,Selection, TNaming_UNKNOWN);
-      }
-  }
-  else {
+		if(found) {
+		  theName.Append(BuildName (Naming->Label(),MDF,aFace,Context,Stop,Geom));
+		  if(isOuter) {
+		    theName.Index(1);
+		  } else {
+			  theName.Index(-1);
+			  for (TopExp_Explorer exp(Selection,TopAbs_EDGE) ; exp.More(); exp.Next()) {
+			    if(exp.Current().IsNull()) continue;
+			    if (BRep_Tool::Degenerated(TopoDS::Edge(exp.Current()))) continue;
+			     theName.Append(TNaming_Naming::Name(Naming->Label(),exp.Current(),Context, Geom, 1, 0));
+			  }
+		  }
+		} else
+	       return BuildNS (F,Selection, TNaming_UNKNOWN);
+
+	} else { // context is not Face
+		theName.Append(BuildName (Naming->Label(),MDF,aFace,Context,Stop,Geom));
+		if(isOuter) {
+		theName.Index(1);
+		} else {
+			for (TopExp_Explorer exp(Selection,TopAbs_EDGE) ; exp.More(); exp.Next()) {
+			  if(exp.Current().IsNull()) continue;
+			  if (BRep_Tool::Degenerated(TopoDS::Edge(exp.Current()))) continue;
+			   theName.Append(TNaming_Naming::Name(Naming->Label(),exp.Current(),Context, Geom, 1, 0));
+			}
+		}
+	}//
+  } 
+  else { // => no Face
     theName.Type(TNaming_UNION);
     for (TopExp_Explorer exp(Selection,TopAbs_EDGE) ; exp.More(); exp.Next()) {
-      if(exp.Current().IsNull()) continue;
-      if (BRep_Tool::Degenerated(TopoDS::Edge(exp.Current()))) continue;//03.03.2010
+	  if(exp.Current().IsNull()) continue;
+      if (BRep_Tool::Degenerated(TopoDS::Edge(exp.Current()))) continue;
       theName.Append(BuildName (Naming->Label(),MDF,exp.Current(),Context,Stop,Geom));
     }
   }
@@ -1407,11 +1440,13 @@ static Standard_Integer RepeatabilityInContext(const TopoDS_Shape& Selection,
 //    Write(Selection, "Repeat_Selection.brep");
 //    Write(Context, "Repeat_Context.brep");
     if (Context.ShapeType() < Selection.ShapeType()) {
-      for (TopExp_Explorer exp(Context,Selection.ShapeType()); exp.More(); exp.Next()) {
-	if (exp.Current().IsSame(Selection)) 
-	  aNum++;
-      }
-    } 
+	  if(Selection.ShapeType() != TopAbs_SHELL) {
+        for (TopExp_Explorer exp(Context,Selection.ShapeType()); exp.More(); exp.Next()) {
+	      if (exp.Current().IsSame(Selection)) 
+	        aNum++;
+		}
+	  } 
+	}
     else if(Selection.ShapeType() == TopAbs_COMPOUND) {
       TopoDS_Iterator it(Selection);
       for(;it.More();it.Next()) {
@@ -1430,6 +1465,162 @@ static Standard_Integer RepeatabilityInContext(const TopoDS_Shape& Selection,
 #endif 
   return aNum;
 }
+
+//=======================================================================
+//function : HasAncSolid
+//purpose  : Returns true if Sh has ancestor solid in this context
+//=======================================================================
+static Standard_Boolean HasAncSolid(const TopoDS_Shape& Context, 
+				               const TopoDS_Shape& Sh, TopoDS_Shape& Solid, 
+				               Standard_Boolean& isOuter)
+{ 
+  Standard_Boolean hasSolid(Standard_False);
+  if(Sh.ShapeType() != TopAbs_SHELL)
+    return hasSolid;
+  TopExp_Explorer exp(Context, TopAbs_SOLID);
+  for(;exp.More(); exp.Next()) {
+    for (TopoDS_Iterator it(exp.Current()) ; it.More(); it.Next()) {
+      if(it.Value().IsEqual(Sh)) {// is the Solid ?
+	    Solid = exp.Current();
+	    if(!Solid.IsNull()) {
+	      hasSolid = Standard_True;
+		  TopoDS_Shell anOuterShell;		
+		  if(TNaming::OuterShell(TopoDS::Solid(Solid), anOuterShell)) {
+#ifdef MDTV_DEB_TSOL
+	        Write(anOuterShell, "OuterShell.brep");
+#endif
+		    if(!anOuterShell.IsNull() && anOuterShell.IsEqual(Sh))
+			  isOuter = Standard_True;
+		    else 
+			  isOuter = Standard_False;
+		  }
+	      break;
+		}
+	  }
+	}
+    if(hasSolid) break;
+  }
+  return hasSolid;
+}
+//=======================================================================
+//function : BuildNameShell
+//purpose  : Names Shell
+//=======================================================================
+
+static Handle(TNaming_NamedShape) BuildNameShell (const TDF_Label& F,
+						 TNaming_Scope&                    MDF,
+						 const TopoDS_Shape&               Selection,
+						 const TopoDS_Shape&               Context,
+						 const Handle(TNaming_NamedShape)& Stop,
+						 const Standard_Boolean            Geom)
+{  
+  Handle (TNaming_NamedShape) NS;
+  Standard_Boolean found(Standard_False);
+  Handle (TNaming_Naming)  Naming;
+  if(!F.FindAttribute(TNaming_Naming::GetID(), Naming)) {
+    Naming = new TNaming_Naming ();
+    F.AddAttribute (Naming);
+    TNaming_Name& theName = Naming->ChangeName();
+    theName.ShapeType(Selection.ShapeType());
+    theName.Shape(Selection); 
+  } 
+
+  TNaming_Name& theName = Naming->ChangeName(); 
+  TopoDS_Shape aSolid;
+  Standard_Boolean isOuter(Standard_False);
+  Standard_Boolean hasSolid = HasAncSolid(Context, Selection, aSolid, isOuter);  
+  if(hasSolid && Selection.ShapeType() > Context.ShapeType()) {
+    theName.Type(TNaming_SHELLIN);// SHELLIN
+
+	if(Context.ShapeType() == TopAbs_SOLID) {
+		for (TopoDS_Iterator it(Context) ; it.More(); it.Next()) {
+#ifdef MDTV_DEB_TSOL
+          Write(it.Value(), "Shell_inSo.brep");
+#endif
+		if(it.Value().IsEqual(Selection)) {
+	        found = Standard_True;
+	        break;
+		  }
+	  }
+	  if(found) {
+		// solid => aSolid which is also a context
+		  Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(Context,F);
+		  if(!aNS.IsNull())
+			theName.ContextLabel(aNS->Label());	  
+		  theName.Append(aNS);
+		  if(isOuter) {
+		    theName.Index(1);				 
+		  } else { //not OuterShell
+            theName.Index(-1);
+			for (TopExp_Explorer exp(Selection,TopAbs_FACE) ; exp.More(); exp.Next()) {
+			  if(exp.Current().IsNull()) continue;
+			  theName.Append(BuildName (Naming->Label(),MDF,exp.Current(),Context,Stop,Geom));
+			}
+		  }
+	  } else
+		  return BuildNS (F,Selection, TNaming_UNKNOWN);
+	} else { 
+	// context is not SOLID
+		//theName.Append(BuildName (Naming->Label(),MDF,aSolid,Context,Stop,Geom));//###########		
+		if(isOuter) {
+#ifdef MDTV_DEB_TSOL
+          Write(aSolid, "foundSolid.brep");
+#endif
+		  theName.Index(1);
+		  Handle (TNaming_Naming)  NamingSo = TNaming_Naming::Insert(F); 
+		  TNaming_Name&           theNameSo = NamingSo->ChangeName();
+          theNameSo.ShapeType(aSolid.ShapeType());
+          theNameSo.Shape(aSolid);       
+          theNameSo.Type(TNaming_UNION);
+		  Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(Context,F);
+		  if(!aNS.IsNull())
+			theNameSo.ContextLabel(aNS->Label());
+	      for (TopExp_Explorer exp(aSolid,TopAbs_FACE) ; exp.More(); exp.Next()) 
+	        theNameSo.Append(BuildName (NamingSo->Label(),MDF,exp.Current(),Context,Stop,Geom));
+		  NamingSo->GetName().Solve(NamingSo->Label(),MDF.GetValid());
+		  aNS.Nullify();
+		  NamingSo->Label().FindAttribute(TNaming_NamedShape::GetID(),aNS); 
+		  theName.Append(aNS);
+		} else {
+			theName.Index(-1);
+			// - name Solid: theName.Append(BuildName (Naming->Label(),MDF, aSolid,Context,Stop,Geom));
+		    Handle (TNaming_Naming)  NamingSo = TNaming_Naming::Insert(F); 
+		    TNaming_Name&           theNameSo = NamingSo->ChangeName();
+            theNameSo.ShapeType(aSolid.ShapeType());
+            theNameSo.Shape(aSolid);       
+            theNameSo.Type(TNaming_UNION);
+		    Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(Context,F);
+		    if(!aNS.IsNull())
+			  theNameSo.ContextLabel(aNS->Label());
+	        for (TopExp_Explorer exp(aSolid,TopAbs_FACE) ; exp.More(); exp.Next()) 
+	          theNameSo.Append(BuildName (NamingSo->Label(),MDF,exp.Current(),Context,Stop,Geom));			
+			NamingSo->GetName().Solve(NamingSo->Label(),MDF.GetValid());
+			aNS.Nullify();
+			NamingSo->Label().FindAttribute(TNaming_NamedShape::GetID(),aNS); 
+		    theName.Append(aNS);
+
+			for (TopExp_Explorer exp(Selection,TopAbs_FACE) ; exp.More(); exp.Next()) {
+			  if(exp.Current().IsNull()) continue;
+			  theName.Append(BuildName (Naming->Label(),MDF,exp.Current(),Context,Stop,Geom));
+			}
+		}
+	}//
+  } 
+  else { // => no Solid
+    theName.Type(TNaming_UNION);
+	Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(Context,F);
+	if(!aNS.IsNull())
+	  theName.ContextLabel(aNS->Label());
+    for (TopExp_Explorer exp(Selection,TopAbs_FACE) ; exp.More(); exp.Next()) {
+	  if(exp.Current().IsNull()) continue;     
+      theName.Append(BuildName (Naming->Label(),MDF,exp.Current(),Context,Stop,Geom));
+    }
+  }
+  //Naming->GetName().Solve(Naming->Label(),MDF.GetValid());
+  Naming->Label().FindAttribute(TNaming_NamedShape::GetID(),NS);  
+  return NS;
+}
+
 //=======================================================================
 //function : BuildAggregationNam
 //purpose  : 
@@ -1488,6 +1679,8 @@ static void BuildAggregationName (const TDF_Label&                  F,
 	if(aS.ShapeType() == TopAbs_WIRE) {
 	  aNS = BuildNameWire (aNaming->Label(), MDF, aS, Context,Stop,Geom);
 	}
+	 else if(aS.ShapeType() == TopAbs_SHELL) 
+	    aNS = BuildNameShell (aNaming->Label(), MDF, aS, Context,Stop,Geom);
 	else {
 	  for (TopExp_Explorer exp(aS,atomTyp) ; exp.More(); exp.Next()) {
 	    aName.Append(BuildName (aNaming->Label(),MDF,exp.Current(),Context,Stop,Geom));
@@ -1577,7 +1770,7 @@ Handle(TNaming_NamedShape) TNaming_Naming::Name (const TDF_Label&       F,
 	      TopoDS_Iterator it(itw.Value());
 	      for(int i=1;it.More();it.Next(),i++) {
 		if(it.Value().IsEqual(S)) {
-		  theName.Index(i);
+		  theName.Index(i);//We use this field to save a Seam Shape Index; Before this field was used for GENERATED only
 		  found = Standard_True;
 #ifdef MDTV_OR
 		  cout << "ORDER = " << i <<endl;
@@ -1703,13 +1896,16 @@ Handle(TNaming_NamedShape) TNaming_Naming::Name (const TDF_Label&       F,
       }
     } else {
       if(S.ShapeType() == TopAbs_WIRE)
-	NS = BuildNameWire (Naming->Label(), MDF, S, Context,Stop,Geom);
-      else {
-	theName.Type(TNaming_UNION);
-	for (TopExp_Explorer exp(S,atomType) ; exp.More(); exp.Next()) {
-	  theName.Append(BuildName (Naming->Label(),MDF,exp.Current(),Context,Stop,Geom));
-	}
-      }
+	    NS = BuildNameWire (Naming->Label(), MDF, S, Context,Stop,Geom);
+	  else if(S.ShapeType() == TopAbs_SHELL) {
+		    NS = BuildNameShell (Naming->Label(), MDF, S, Context,Stop,Geom);
+	  }
+	  else {
+	    theName.Type(TNaming_UNION);
+	    for (TopExp_Explorer exp(S,atomType) ; exp.More(); exp.Next()) {
+	    theName.Append(BuildName (Naming->Label(),MDF,exp.Current(),Context,Stop,Geom));
+		}
+	  }
     }
 #else    
     for (TopoDS_Iterator it(S) ; it.More(); it.Next()) {
diff --git a/src/TObj/TObj_TIntSparseArray.cxx b/src/TObj/TObj_TIntSparseArray.cxx
index 482229f..99867b0 100644
--- a/src/TObj/TObj_TIntSparseArray.cxx
+++ b/src/TObj/TObj_TIntSparseArray.cxx
@@ -82,7 +82,7 @@ Handle(TObj_TIntSparseArray) TObj_TIntSparseArray::Set
 //purpose  : 
 //=======================================================================
 
-void TObj_TIntSparseArray::SetValue (const Standard_Integer theId,
+void TObj_TIntSparseArray::SetValue (const Standard_Size theId,
                                          const Standard_Integer theValue)
 {
   // check that modification is allowed
@@ -128,7 +128,7 @@ void TObj_TIntSparseArray::SetValue (const Standard_Integer theId,
 //purpose  : 
 //=======================================================================
 
-void TObj_TIntSparseArray::UnsetValue (const Standard_Integer theId)
+void TObj_TIntSparseArray::UnsetValue (const Standard_Size theId)
 {
   // check that modification is allowed
   if ( !Label().Data()->IsModificationAllowed() )
@@ -182,7 +182,7 @@ void TObj_TIntSparseArray::Clear ()
       TObj_TIntSparseArray_VecOfData::Iterator anIt (myVector);
       for (; anIt.More(); anIt.Next())
       {
-        Standard_Integer anId = anIt.Key();
+        Standard_Size anId = anIt.Key();
         Standard_Integer aVal = anIt.Value();
         backupValue(anId, aVal, AbsentValue);
       }
@@ -196,7 +196,7 @@ void TObj_TIntSparseArray::Clear ()
 //purpose  :
 //=======================================================================
 
-void TObj_TIntSparseArray::backupValue (const Standard_Integer theId,
+void TObj_TIntSparseArray::backupValue (const Standard_Size theId,
                                             const Standard_Integer theCurrValue,
                                             const Standard_Integer theNewValue)
 {
@@ -257,7 +257,7 @@ void TObj_TIntSparseArray::Restore(const Handle(TDF_Attribute)& theDelta)
     TObj_TIntSparseArray_MapOfData::Iterator anIt (aDelta->myOldMap);
     for (; anIt.More(); anIt.Next())
     {
-      Standard_Integer anId = anIt.Key();
+      Standard_Size anId = anIt.Key();
       Standard_Integer anOld = anIt.Value();
       if (anOld == AbsentValue)
         UnsetValue (anId);
diff --git a/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx b/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx
index cee5645..f09c05a 100644
--- a/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx
+++ b/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx
@@ -85,14 +85,14 @@ Standard_Integer TOPOC(Draw_Interpretor& interpretor,Standard_Integer na,const c
       else if (!strcmp(a[1],"OUT")) sta = TopAbs_OUT;
       else if (!strcmp(a[1],"ON"))  sta = TopAbs_ON;
       
-      if (sta==TopAbs_IN||sta==TopAbs_OUT||sta == TopAbs_ON) {
+      if (sta != TopAbs_UNKNOWN) {
 	if (na==2) { PBOOP->GetSplit(sta); } // tsp IN/ON/OUT
 	else if ( na > 2 ) {
 	  TopAbs_ShapeEnum typ = TopAbs_SHAPE;
 	  if      (!strcmp(a[2],"e")) typ = TopAbs_EDGE;
 	  else if (!strcmp(a[2],"f")) typ = TopAbs_FACE;
 	  else if (!strcmp(a[2],"s")) typ = TopAbs_SOLID;
-	  if (typ==TopAbs_EDGE||typ==TopAbs_FACE||typ==TopAbs_SOLID) {
+	  if (typ != TopAbs_SHAPE) {
 	    if (na == 3) { 
 	      // tsp IN/ON/OUT e/f/s
 	      PBOOP->GetSplit(typ,sta);
@@ -107,10 +107,6 @@ Standard_Integer TOPOC(Draw_Interpretor& interpretor,Standard_Integer na,const c
 	    for(i=2;i<na;i++) PBOOP->GetSplit(sta,atoi(a[i])); 
 	  }
 	}
-	else if ( na > 2 ) { 
-	  // tsp IN/ON/OUT i1 i2 ...
-	  for(i=2;i<na;i++) PBOOP->GetSplit(sta,atoi(a[i])); 
-	}
       }
       else { // tsp i1 i2 ...
 	for (i = 1; i < na; i++) {
@@ -132,14 +128,14 @@ Standard_Integer TOPOC(Draw_Interpretor& interpretor,Standard_Integer na,const c
       else if (!strcmp(a[1],"OUT")) sta = TopAbs_OUT;
       else if (!strcmp(a[1],"ON"))  sta = TopAbs_ON;
       
-      if (sta==TopAbs_IN||sta==TopAbs_OUT||sta == TopAbs_ON) {
+      if (sta != TopAbs_UNKNOWN) {
 	if (na==2) { PBOOP->GetMerged(sta); } // tme IN/ON/OUT
 	else if ( na > 2 ) {
 	  TopAbs_ShapeEnum typ = TopAbs_SHAPE;
 	  if      (!strcmp(a[2],"e")) typ = TopAbs_EDGE;
 	  else if (!strcmp(a[2],"f")) typ = TopAbs_FACE;
 	  else if (!strcmp(a[2],"s")) typ = TopAbs_SOLID;
-	  if (typ==TopAbs_EDGE||typ==TopAbs_FACE||typ==TopAbs_SOLID) {
+	  if (typ != TopAbs_SHAPE) {
 	    if (na == 3) { 
 	      // tme IN/ON/OUT e/f/s
 	      PBOOP->GetMerged(typ,sta);
@@ -154,10 +150,6 @@ Standard_Integer TOPOC(Draw_Interpretor& interpretor,Standard_Integer na,const c
 	    for(i=2;i<na;i++) PBOOP->GetMerged(sta,atoi(a[i])); 
 	  }
 	}
-	else if ( na > 2 ) { 
-	  // tme IN/ON/OUT i1 i2 ...
-	  for(i=2;i<na;i++) PBOOP->GetMerged(sta,atoi(a[i])); 
-	}
       }
       else { // tme i1 i2 ...
 	for (i = 1; i < na; i++) {
diff --git a/src/TestTopOpe/TestTopOpe_VarsTopo.cxx b/src/TestTopOpe/TestTopOpe_VarsTopo.cxx
index 5491347..1d6dd6b 100644
--- a/src/TestTopOpe/TestTopOpe_VarsTopo.cxx
+++ b/src/TestTopOpe/TestTopOpe_VarsTopo.cxx
@@ -97,7 +97,7 @@ Standard_Boolean VarsTopo::GetClear() const
 
 void VarsTopo::SetOCT(char* noct)
 {
-  if      (noct != NULL) return;
+  if      (noct == NULL) return;
   else if (!strcmp(noct,"-a")) SetOCT(TopOpeBRepTool_APPROX);
   else if (!strcmp(noct,"-p")) SetOCT(TopOpeBRepTool_BSPLINE1);
   else if (!strcmp(noct,"-i")) SetOCT(TopOpeBRepTool_INTERPOL);
diff --git a/src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx b/src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx
index d21f87b..7d665bb 100644
--- a/src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx
+++ b/src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx
@@ -319,7 +319,7 @@ Standard_Integer dstrace(Draw_Interpretor& di, Standard_Integer n , const char**
   pa[1] = (char *)a1.ToCString();
   for (Standard_Integer i=1;i<n;i++) pa[i+1] = a[i];
   TestTopOpeTools_SetTrace(di,npa,pa);
-  if (pa) delete [] pa;
+  if (pa) free(pa);
   return 0;
 }
 
diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.cdl b/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.cdl
index 4f4acd2..6f04514 100644
--- a/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.cdl
+++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.cdl
@@ -56,9 +56,13 @@ is
     ResetElement(me : in out; E : Shape from TopoDS) is deferred;
     ---Purpose: prepare classification involving element <E>.
     
-    CompareElement(me : in out; E : Shape from TopoDS) is deferred;
-    ---Purpose: Add element <E> in the set of elements used in classification.
-    
+    CompareElement(me : in out; E : Shape from TopoDS)  
+    returns Boolean from Standard 
+    is deferred;
+    ---Purpose: Add element <E> in the set of elements used in classification.  
+    --  Returns FALSE if the element <E> has been already added to the set of elements, 
+    --  otherwise returns TRUE.
+     
     State(me : in out) returns State from TopAbs is deferred;
     ---Purpose: Returns state of classification of 2D point, defined by 
     -- ResetElement, with the current set of elements, defined by Compare.
diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.cxx
index 2074b5d..141d07f 100644
--- a/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.cxx
+++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.cxx
@@ -94,7 +94,8 @@ TopAbs_State TopOpeBRepBuild_CompositeClassifier::Compare
     TopOpeBRepBuild_BlockIterator Bit2 = L2->BlockIterator();
     for (Bit2.Initialize(); Bit2.More(); Bit2.Next()) {
       const TopoDS_Shape& s2 = MYBB->Element(Bit2);
-      CompareElement(s2);
+      if (!CompareElement(s2)) 
+        break;
     }
     state = State();
   }
diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.cdl b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.cdl
index 4aedee0..074d740 100644
--- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.cdl
+++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.cdl
@@ -65,10 +65,13 @@ is
     ---Purpose: prepare classification involving face <F>
     -- define 3D point (later used in Compare()) on first vertex of face <F>.
     
-    CompareElement(me : in out; F : Shape);
+    CompareElement(me : in out; F : Shape) 
+    returns  Boolean from Standard; 
     ---Purpose: Add the face <F> in the set of faces used in 3D point
-    -- classification.
-    
+    -- classification. Returns FALSE if the face <F> has been already  
+    -- added to the set of faces, otherwise returns TRUE.
+
+ 
     State(me : in out) returns State from TopAbs;
     ---Purpose: Returns state of classification of 3D point, defined by 
     -- ResetElement, with the current set of faces, defined by Compare.
diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.cxx
index 165d766..3cf2588 100644
--- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.cxx
+++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.cxx
@@ -154,12 +154,13 @@ void  TopOpeBRepBuild_ShellFaceClassifier::ResetElement(const TopoDS_Shape& F)
 //purpose  : 
 //=======================================================================
 
-void TopOpeBRepBuild_ShellFaceClassifier::CompareElement(const TopoDS_Shape& F)
+Standard_Boolean TopOpeBRepBuild_ShellFaceClassifier::CompareElement(const TopoDS_Shape& F)
 {
 #ifdef DEB
 //  const TopAbs_ShapeEnum t = F.ShapeType();
 #endif
-
+  Standard_Boolean bRet = Standard_True;
+  //
   if (myFirstCompare) {
     Standard_Boolean found = myFaceShellMap.IsBound(F);
     if ( !found ) {
@@ -178,6 +179,7 @@ void TopOpeBRepBuild_ShellFaceClassifier::CompareElement(const TopoDS_Shape& F)
       // dont F fait partie.
       TopoDS_Shape sbid = myFaceShellMap.Find(F);
       myShell = TopoDS::Shell(sbid);
+      bRet = !bRet;
     }
     myFirstCompare = Standard_False;
   }
@@ -187,7 +189,7 @@ void TopOpeBRepBuild_ShellFaceClassifier::CompareElement(const TopoDS_Shape& F)
     // dont F fait partie
     myBuilder.Add(myShell,F);
   }
-
+  return bRet;
 }
 
 #ifdef DEB
diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cdl b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cdl
index 6c37170..f2fc5c1 100644
--- a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cdl
+++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cdl
@@ -66,7 +66,8 @@ is
     ---Purpose: prepare classification involving edge <E>
     -- define 2D point (later used in Compare()) on first vertex of edge <E>.
     
-    CompareElement(me : in out; E : Shape from TopoDS);
+    CompareElement(me : in out; E : Shape from TopoDS) 
+    returns Boolean from Standard;
     ---Purpose: Add the edge <E> in the set of edges used in 2D point
     -- classification.
     
diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx
index d8c7515..b5c341a 100644
--- a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx
+++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx
@@ -421,8 +421,9 @@ void  TopOpeBRepBuild_WireEdgeClassifier::ResetElement(const TopoDS_Shape& EE)
 //purpose  : 
 //=======================================================================
 
-void TopOpeBRepBuild_WireEdgeClassifier::CompareElement(const TopoDS_Shape& EE)
+Standard_Boolean TopOpeBRepBuild_WireEdgeClassifier::CompareElement(const TopoDS_Shape& EE)
 {
+  Standard_Boolean bRet = Standard_True;
   const TopoDS_Edge& E = TopoDS::Edge(EE);
   const TopoDS_Face& F = myBCEdge.Face();
 
@@ -462,6 +463,7 @@ void TopOpeBRepBuild_WireEdgeClassifier::CompareElement(const TopoDS_Shape& EE)
 #ifdef DEB
 //  TopAbs_State state = myFPC.State();
 #endif
+  return bRet;
 }
 
 
diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx
index 1dd1c1f..fd29ab2 100644
--- a/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx
+++ b/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx
@@ -208,7 +208,8 @@ Standard_OStream& TopOpeBRepDS_Dumper::Print(const Handle(Geom_BSplineCurve)&
   if (periodic) OS<<"periodic, ";
   OS<<"degree "<<degree<<", "<<nbpoles<<" poles, "<<nbknots<<" knots"<<endl;
   
-  for (i = 1,OS<<"poles : ",l = strlen("poles : ") + 1,n = nbpoles; 
+  //l = strlen("poles : ") + 1
+  for (i = 1,OS<<"poles : ",l = 9,n = nbpoles; 
        i<=n; 
        i++) {
     if (!compact)      { if (i == 1) lb = 0; else lb = l; }
@@ -228,7 +229,8 @@ Standard_OStream& TopOpeBRepDS_Dumper::Print(const Handle(Geom_BSplineCurve)&
     OS<<endl;
   }
   
-  for (i = 1,OS<<"knots : ",l = strlen("knots : ") + 1,n = nbknots;
+  //l = strlen("knots : ") + 1
+  for (i = 1,OS<<"knots : ",l = 9,n = nbknots;
        i<=n;
        i++) {
     if (!compact)      { if (i == 1) lb = 0; else lb = l; }
@@ -281,7 +283,8 @@ Standard_OStream& TopOpeBRepDS_Dumper::Print(const Handle(Geom2d_BSplineCurve)&
   if (periodic) OS<<"periodic, ";
   OS<<"degree "<<degree<<", "<<nbpoles<<" poles, "<<nbknots<<" knots"<<endl;
   
-  for (i = 1,OS<<"poles : ",l = strlen("poles : ") + 1,n = nbpoles; 
+  //l = strlen("poles : ") + 1
+  for (i = 1,OS<<"poles : ",l = 9,n = nbpoles; 
        i<=n; 
        i++) {
     if (!compact)      { if (i == 1) lb = 0; else lb = l; }
@@ -301,7 +304,8 @@ Standard_OStream& TopOpeBRepDS_Dumper::Print(const Handle(Geom2d_BSplineCurve)&
     OS<<endl;
   }
   
-  for (i = 1,OS<<"knots : ",l = strlen("knots : ") + 1,n = nbknots; 
+  //l = strlen("knots : ") + 1
+  for (i = 1,OS<<"knots : ",l = 9,n = nbknots; 
        i<=n; 
        i++) {
     if (!compact)      { if (i == 1) lb = 0; else lb = l; }
diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx
index 5d58251..9147f28 100644
--- a/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx
+++ b/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx
@@ -327,7 +327,7 @@ Standard_Integer TopOpeBRepTool_TOOL::OnBoundary(const Standard_Real par, const
   
   Standard_Boolean onf = Abs(par-first)<tolp;
   Standard_Boolean onl = Abs(par-last)<tolp;
-  Standard_Boolean onfl =  (onf || onf);
+  Standard_Boolean onfl =  (onf || onl);
   if (onfl && closed) return CLOSING;
   if (onf) return FORWARD;
   if (onl) return REVERSED;
diff --git a/src/TopTools/FILES b/src/TopTools/FILES
new file mode 100644
index 0000000..7ac5ad0
--- /dev/null
+++ b/src/TopTools/FILES
@@ -0,0 +1,2 @@
+TopTools_MutexForShapeProvider.hxx
+TopTools_MutexForShapeProvider.cxx
\ No newline at end of file
diff --git a/src/TopTools/TopTools.cdl b/src/TopTools/TopTools.cdl
index d86918b..d950c35 100644
--- a/src/TopTools/TopTools.cdl
+++ b/src/TopTools/TopTools.cdl
@@ -213,7 +213,9 @@ is
 	
     --
     --     Package methods
-    --     
+    --   
+
+    imported MutexForShapeProvider;
     
     Dump(Sh : Shape from TopoDS; S : in out OStream);
 	  ---Purpose: Dumps the topological structure  of <Sh>  on the
diff --git a/src/TopTools/TopTools_LocationSet.cxx b/src/TopTools/TopTools_LocationSet.cxx
index f95cbcf..1ba6752 100644
--- a/src/TopTools/TopTools_LocationSet.cxx
+++ b/src/TopTools/TopTools_LocationSet.cxx
@@ -178,7 +178,7 @@ void  TopTools_LocationSet::Dump(Standard_OStream& OS) const
 void  TopTools_LocationSet::Write(Standard_OStream& OS) const 
 {
   
-  std::streamsize  prec = OS.precision(15);
+  std::streamsize prec = OS.precision(15);
 
   Standard_Integer i, nbLoc = myMap.Extent();
   OS << "Locations " << nbLoc << "\n";
diff --git a/src/TopTools/TopTools_MutexForShapeProvider.cxx b/src/TopTools/TopTools_MutexForShapeProvider.cxx
new file mode 100644
index 0000000..b9572c0
--- /dev/null
+++ b/src/TopTools/TopTools_MutexForShapeProvider.cxx
@@ -0,0 +1,114 @@
+// Created on: 2012-06-27
+// Created by: Dmitry BOBYLEV
+// Copyright (c) 2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+#include <TopTools_MutexForShapeProvider.hxx>
+
+#include <Standard_Mutex.hxx>
+#include <TopoDS_Iterator.hxx>
+
+
+// macro to compare two types of shapes
+#define SAMETYPE(x,y) ((x) == (y))
+#define LESSCOMPLEX(x,y) ((x) > (y))
+
+//=======================================================================
+//function : TopTools_MutexForShapeProvider
+//purpose  : 
+//=======================================================================
+TopTools_MutexForShapeProvider::TopTools_MutexForShapeProvider()
+{
+}
+
+
+//=======================================================================
+//function : ~TopTools_MutexForShapeProvider
+//purpose  : 
+//=======================================================================
+TopTools_MutexForShapeProvider::~TopTools_MutexForShapeProvider()
+{
+  RemoveAllMutexes();
+}
+
+//=======================================================================
+//function : CreateMutexesForSubShapes
+//purpose  : 
+//=======================================================================
+void TopTools_MutexForShapeProvider::CreateMutexesForSubShapes(const TopoDS_Shape& theShape,
+                                                               const TopAbs_ShapeEnum theType)
+{
+  if (LESSCOMPLEX(theShape.ShapeType(), theType))
+    return;
+
+  for(TopoDS_Iterator anIt(theShape); anIt.More(); anIt.Next())
+  {
+    const TopoDS_Shape& aShape = anIt.Value();
+    if (LESSCOMPLEX(theType, aShape.ShapeType()))
+    {
+      CreateMutexesForSubShapes(aShape, theType);
+    }
+    else if (SAMETYPE(theType, aShape.ShapeType()))
+    {
+      CreateMutexForShape(aShape);
+    }
+  }
+}
+
+//=======================================================================
+//function : CreateMutexForShape
+//purpose  : 
+//=======================================================================
+void TopTools_MutexForShapeProvider::CreateMutexForShape(const TopoDS_Shape& theShape)
+{
+  if (!myMap.IsBound(theShape.TShape()))
+  {
+    Standard_Mutex* aMutex = new Standard_Mutex();
+    myMap.Bind(theShape.TShape(), aMutex);
+  }
+}
+
+//=======================================================================
+//function : CreateMutexForShape
+//purpose  : 
+//=======================================================================
+Standard_Mutex* TopTools_MutexForShapeProvider::GetMutex(const TopoDS_Shape& theShape) const
+{
+  if (myMap.IsBound(theShape.TShape()))
+  {
+    Standard_Mutex* aMutex = myMap.Find(theShape.TShape());
+    return aMutex;
+  }
+  else
+  {
+    return NULL;
+  }
+}
+
+//=======================================================================
+//function : RemoveAllMutexes
+//purpose  : 
+//=======================================================================
+void TopTools_MutexForShapeProvider::RemoveAllMutexes()
+{
+  for (NCollection_DataMap<TopoDS_Shape, Standard_Mutex *>::Iterator anIter;
+         anIter.More(); anIter.Next())
+  {
+    delete anIter.Value();
+  }
+  myMap.Clear();
+}
diff --git a/src/TopTools/TopTools_ShapeSet.cxx b/src/TopTools/TopTools_ShapeSet.cxx
index 503c610..ce66b94 100644
--- a/src/TopTools/TopTools_ShapeSet.cxx
+++ b/src/TopTools/TopTools_ShapeSet.cxx
@@ -458,7 +458,7 @@ void  TopTools_ShapeSet::Write(Standard_OStream& OS)
   // on positionne LC_NUMERIC a "C" (point decimal)
   setlocale(LC_NUMERIC, "C") ;
 
-  std::streamsize  prec = OS.precision(15);
+  std::streamsize prec = OS.precision(15);
 
   // write the copyright
   if (myFormatNb == 2)
@@ -642,7 +642,7 @@ void  TopTools_ShapeSet::Read(Standard_IStream& IS)
     //if(pm = strchr(vers,'\r'))
     //  *pm ='\0';
     
-    for (Standard_Integer lv = (strlen(vers)- 1); lv > 1 && (vers[lv] == '\r' || vers[lv] == '\n') ;lv--) 
+    for (Standard_Size lv = (strlen(vers)- 1); lv > 1 && (vers[lv] == '\r' || vers[lv] == '\n') ;lv--) 
       vers[lv] = '\0';
     
   } while ( ! IS.fail() && strcmp(vers,Version) && strcmp(vers,Version2) );
diff --git a/src/Units/Units_Lexicon.cxx b/src/Units/Units_Lexicon.cxx
index 22da3fa..c1433b5 100644
--- a/src/Units/Units_Lexicon.cxx
+++ b/src/Units/Units_Lexicon.cxx
@@ -59,7 +59,8 @@ void Units_Lexicon::Creates(const Standard_CString afilename)
   char *Oper = oper ;
   char *Coeff = coeff ;
 #endif
-  Standard_Integer i;
+  Standard_Integer fr;
+  Standard_Size i;
   Standard_Real value;
   Handle(Units_Token) token;
   struct stat buf;
@@ -85,7 +86,7 @@ void Units_Lexicon::Creates(const Standard_CString afilename)
   //for(i=0; i<=255; i++)line[i]=0;
 
   while(file.getline(line,255)) {
-    int len = strlen( line ) ;
+    Standard_Size len = strlen( line ) ;
     if(len == 1) continue; //skl - ???
     for ( i = 0 ; i < 30 ; i++ ) {
       if ( i < len )
diff --git a/src/Units/Units_Sentence.cxx b/src/Units/Units_Sentence.cxx
index ac17433..e3f53d2 100644
--- a/src/Units/Units_Sentence.cxx
+++ b/src/Units/Units_Sentence.cxx
@@ -31,8 +31,8 @@ static Handle(Units_Token) CreateTokenForNumber(const Standard_CString str)
 {
   TCollection_AsciiString tstr = str[0];
   Standard_Boolean IsPoint = Standard_False;
-  Standard_Integer len = strlen(str);
-  for(Standard_Integer in=1; in < len; in++) {
+  Standard_Size len = strlen(str);
+  for(Standard_Size in=1; in < len; in++) {
     if( str[in]=='0' || str[in]=='1' || str[in]=='2' || str[in]=='3' || 
         str[in]=='4' || str[in]=='5' || str[in]=='6' || str[in]=='7' || 
         str[in]=='8' || str[in]=='9' ) {
@@ -58,9 +58,9 @@ Units_Sentence::Units_Sentence(const Handle(Units_Lexicon)& alexicon,
 			       const Standard_CString astring)
 {
   Standard_Integer index;
-  Standard_Integer i,limchain;
-//  Standard_Integer k,l;
-//  char chain[255];
+  Standard_Integer k,l;
+  Standard_Size i,limchain;
+  char chain[255];
   Handle(Units_Token) token;
   Handle(Units_Token) referencetoken;
   
diff --git a/src/Units/Units_UnitsDictionary.cxx b/src/Units/Units_UnitsDictionary.cxx
index 6048ee9..56d7fdc 100644
--- a/src/Units/Units_UnitsDictionary.cxx
+++ b/src/Units/Units_UnitsDictionary.cxx
@@ -132,7 +132,7 @@ void Units_UnitsDictionary::Creates(const Standard_CString afilename)
     file.getline(line,255);
     if (!file)
       break;
-    fr = strlen(line);
+    fr = (Standard_Integer) strlen(line);
     if(fr <= 1)
       continue;
     //if( !file || line[0] == '.') { //skl
@@ -178,7 +178,7 @@ void Units_UnitsDictionary::Creates(const Standard_CString afilename)
       //if(!file) break; //skl
       file.getline(line,255);
       file.getline(line,255);
-      fr = strlen(line);
+      fr = (Standard_Integer) strlen(line);
 	  
 #if 0 // skl for OCC13438
       //for(i=0; i<80; i++)name[i] = 0;
@@ -263,7 +263,7 @@ void Units_UnitsDictionary::Creates(const Standard_CString afilename)
            << "Convert" << Convert << endl 
            << "Unit2" << Unit2 << endl ;
 #else
-      int len = strlen( line ) ;
+      Standard_Integer len = (Standard_Integer) strlen( line ) ;
       for ( i=0 ; i<51 ; i++ ) {
         if ( i<len )
           fr = sscanf(&line[i],"%c",&unite[i]);
@@ -328,7 +328,7 @@ void Units_UnitsDictionary::Creates(const Standard_CString afilename)
 	  
       if(convert[0] == '[') {
         coeff = 1.;
-        i = strlen(convert);
+        i = (Standard_Integer) strlen(convert);
         convert[i-1] = 0;
         ismove = Standard_True;
         charnumber = 1;
@@ -357,7 +357,7 @@ void Units_UnitsDictionary::Creates(const Standard_CString afilename)
       }
 	  
       if(convert[charnumber] == '(') {
-        i = strlen(convert);
+        i = (Standard_Integer) strlen(convert);
         convert[i-1] = 0;
         Units_MathSentence mathsentence(&convert[charnumber+1]);
         if(ismove)
diff --git a/src/V3d/V3d.cdl b/src/V3d/V3d.cdl
index 71de97b..f805b9b 100644
--- a/src/V3d/V3d.cdl
+++ b/src/V3d/V3d.cdl
@@ -58,7 +58,8 @@ uses
         PlotMgt,
         Image,
         gp,
-        OSD
+        OSD,
+        Font
 
 is
 
diff --git a/src/V3d/V3d_View.cdl b/src/V3d/V3d_View.cdl
index 6bcbaa4..f96274e 100644
--- a/src/V3d/V3d_View.cdl
+++ b/src/V3d/V3d_View.cdl
@@ -125,7 +125,7 @@ uses
         Plotter                           from Graphic3d,
         Window                            from Aspect,
         PixMap                            from Image,
-        TypeOfImage                       from Image,
+        BufferType                        from Graphic3d,
         Background                        from Aspect,
         GradientBackground                from Aspect,
         PlotterDriver                     from PlotMgt,
@@ -149,7 +149,7 @@ uses
         GraphicCallbackProc               from Aspect,
         FillMethod                        from Aspect,
         GradientFillMethod                from Aspect,
-        FontAspect                        from OSD,
+        FontAspect                        from Font,
         AsciiString                       from TCollection,
         ExtendedString                    from TCollection,
         PrintAlgo                         from Aspect
@@ -524,13 +524,13 @@ is
                               -- Name of font for names of axes --
                               fontOfNames : out AsciiString from TCollection;
                               -- Style of names of axes --
-                              styleOfNames : out FontAspect from OSD;
+                              styleOfNames : out FontAspect from Font;
                               -- Size of names of axes --
                               sizeOfNames : out Integer from Standard;
                               -- Name of font for values --
                               fontOfValues : out AsciiString from TCollection;
                               -- Style of values --
-                              styleOfValues : out FontAspect from OSD;
+                              styleOfValues : out FontAspect from Font;
                               -- Size of values --
                               sizeOfValues : out Integer from Standard)
         ---Purpose: Returns data of a graduated trihedron.
@@ -590,13 +590,13 @@ is
                                   -- Name of font for names of axes --
                                   fontOfNames : AsciiString from TCollection = "Arial";
                                   -- Style of names of axes --
-                                  styleOfNames : FontAspect from OSD = OSD_FA_Bold;
+                                  styleOfNames : FontAspect from Font = Font_FA_Bold;
                                   -- Size of names of axes --
                                   sizeOfNames : Integer from Standard = 12;
                                   -- Name of font for values --
                                   fontOfValues : AsciiString from TCollection = "Arial";
                                   -- Style of values --
-                                  styleOfValues : FontAspect from OSD = OSD_FA_Regular;
+                                  styleOfValues : FontAspect from Font = Font_FA_Regular;
                                   -- Size of values --
                                   sizeOfValues : Integer from Standard = 12)
         ---Purpose: Displays a graduated trihedron.
@@ -967,7 +967,10 @@ is
     SetViewingVolume ( me : mutable ; Left, Right, Bottom, Top, ZNear, ZFar : Real from Standard)
         ---Level: Public
         ---Purpose: Sets Z and XY size of the view according to given values
-    --          with respecting the initial view depth (eye position)
+        --          with respecting the initial view depth (eye position).
+        --          Width/heigth aspect ratio should be preserved by the caller
+        --          of this method similarly to SetSize() to avoid unexpected
+        --          visual results like non-uniform scaling of objects in the view. 
                 raises BadValue from Viewer;
         --              If the ZNear<0, ZFar<0 or ZNear>=Zfar.
 
@@ -1590,8 +1593,8 @@ is
         ---Purpose: dump the view
 
         Dump ( me: mutable;
-               theFile: CString from Standard;
-               theBufferType : TypeOfImage from Image = Image_TOI_RGB )
+               theFile       : CString from Standard;
+               theBufferType : BufferType from Graphic3d = Graphic3d_BT_RGB )
     returns Boolean from Standard;
         ---Level: Public
         ---Purpose: dump the full contents of the view at the same
@@ -1600,9 +1603,9 @@ is
         --          Returns FALSE when the dump has failed
 
         Dump ( me: mutable;
-               theFile   : CString from Standard;
-               theFormat : FormatOfSheetPaper from Aspect;
-               theBufferType : TypeOfImage from Image = Image_TOI_RGB )
+               theFile       : CString from Standard;
+               theFormat     : FormatOfSheetPaper from Aspect;
+               theBufferType : BufferType from Graphic3d = Graphic3d_BT_RGB )
     returns Boolean from Standard;
         ---Level: Public
         ---Purpose: dump the full contents of the view with a
@@ -1653,16 +1656,18 @@ is
     --  Warning: Works only under Windows.
 
         ToPixMap ( me : mutable;
+                   theImage  : in out PixMap from Image;
                    theWidth  : Integer from Standard;
                    theHeight : Integer from Standard;
-                   theBufferType : TypeOfImage from Image = Image_TOI_RGB;
+                   theBufferType : BufferType from Graphic3d = Graphic3d_BT_RGB;
                    theForceCentered : Boolean from Standard = Standard_True )
-        returns PixMap from Image;
+        returns Boolean from Standard;
         ---Level   : Public
         ---Purpose : dump the full contents of the view
         --        to a pixmap of pixel size <theWidth>*<theHeight> and
         --        buffer type <theBufferType>. If <theForceCentered> is true
         --        view scene will be centered.
+        --       Pixmap will be automatically (re)allocated when needed.
 
     SetProjModel( me : mutable;
         amOdel: TypeOfProjectionModel from V3d = V3d_TPM_SCREEN )
diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx
index 9d50f03..3a9d8c3 100644
--- a/src/V3d/V3d_View.cxx
+++ b/src/V3d/V3d_View.cxx
@@ -158,7 +158,7 @@ To solve the problem (for lack of a better solution) I make 2 passes.
 #include <Graphic3d_MapIteratorOfMapOfStructure.hxx>
 #include <Graphic3d_MapOfStructure.hxx>
 #include <Graphic3d_TextureEnv.hxx>
-#include <Image_PixMap.hxx>
+#include <Image_AlienPixMap.hxx>
 #include <V3d.hxx>
 #include <V3d_View.ixx>
 #include <Viewer_BadValue.hxx>
@@ -560,14 +560,12 @@ void V3d_View::SetWindow(const Handle(Aspect_Window)&      aWindow,
 
 /*----------------------------------------------------------------------*/
 
-void V3d_View::Remove() const  {
-
-  MyViewer->DelView(this) ;
-  MyView->Remove() ;
-#ifdef IMP260303
-  MyWindow.Nullify();
-#endif
-
+void V3d_View::Remove() const
+{
+  MyViewer->DelView (this);
+  MyView->Remove();
+  Handle(Aspect_Window)& aWin = const_cast<Handle(Aspect_Window)&> (MyWindow);
+  aWin.Nullify();
 }
 
 /*----------------------------------------------------------------------*/
@@ -3479,22 +3477,20 @@ void V3d_View::ScreenCopy (const Handle(PlotMgt_PlotterDriver)& aPlotterDriver,
 #include <Visual3d_Layer.hxx>
 
 ////////////////////////////////////////////////////////////////
-Standard_Boolean V3d_View::Dump (const Standard_CString theFile,
-                                 const Image_TypeOfImage theBufferType)
+Standard_Boolean V3d_View::Dump (const Standard_CString      theFile,
+                                 const Graphic3d_BufferType& theBufferType)
 {
   Standard_Integer aWinWidth, aWinHeight;
   MyWindow->Size (aWinWidth, aWinHeight);
-
-  Handle(Aspect_PixMap) aPixMap = ToPixMap (aWinWidth, aWinHeight, theBufferType);
-  return !aPixMap.IsNull() && aPixMap->Dump (theFile);
+  Image_AlienPixMap anImage;
+  return ToPixMap (anImage, aWinWidth, aWinHeight, theBufferType) && anImage.Save (theFile);
 }
 
 ////////////////////////////////////////////////////////////////
-Standard_Boolean V3d_View::Dump (const Standard_CString theFile,
+Standard_Boolean V3d_View::Dump (const Standard_CString          theFile,
                                  const Aspect_FormatOfSheetPaper theFormat,
-                                 const Image_TypeOfImage theBufferType)
+                                 const Graphic3d_BufferType&     theBufferType)
 {
-  Standard_Boolean isDone = Standard_False;
   // convert Aspect_FormatOfSheetPaper size to pixel ...
   Quantity_Length anSPWidth, anSPHeight;
   Aspect::ValuesOfFOSP (theFormat, anSPWidth, anSPHeight);
@@ -3508,36 +3504,40 @@ Standard_Boolean V3d_View::Dump (const Standard_CString theFile,
   Quantity_Factor aScale = Min (anSPWidth / aWinWidth, anSPHeight / aWinHeight);
   aPixelWidth  = Standard_Integer (aPixelWidth  * aScale);
   aPixelHeight = Standard_Integer (aPixelHeight * aScale);
+
+  Image_AlienPixMap anImage;
+  ToPixMap (anImage, aPixelWidth, aPixelHeight, theBufferType);
+  OSD_Environment anEnvGamma ("CSF_GAMMA_CORRECTION");
+  TCollection_AsciiString strGamma (anEnvGamma.Value());
+  if (!anImage.IsEmpty() && !strGamma.IsEmpty())
   {
-    Handle(Aspect_PixMap) aBitmap = ToPixMap (aPixelWidth, aPixelHeight, theBufferType);
-    Standard_Real aGammaValue = 1.0;
-    OSD_Environment anEnvGamma ("CSF_GAMMA_CORRECTION");
-    TCollection_AsciiString strGamma (anEnvGamma.Value());
-    if (!strGamma.IsEmpty()) aGammaValue = strGamma.RealValue();
-    isDone = !aBitmap.IsNull() && aBitmap->Dump (theFile, aGammaValue);
+    Standard_Real aGammaValue = strGamma.RealValue();
+    anImage.AdjustGamma (aGammaValue);
   }
-  return isDone;
+  return anImage.Save (theFile);
 }
 
 ////////////////////////////////////////////////////////////////
-Handle(Image_PixMap) V3d_View::ToPixMap (const Standard_Integer  theWidth,
-                                         const Standard_Integer  theHeight,
-                                         const Image_TypeOfImage theBufferType,
-                                         const Standard_Boolean  theIsForceCentred)
+Standard_Boolean V3d_View::ToPixMap (Image_PixMap&               theImage,
+                                     const Standard_Integer      theWidth,
+                                     const Standard_Integer      theHeight,
+                                     const Graphic3d_BufferType& theBufferType,
+                                     const Standard_Boolean      theIsForceCentred)
 {
   // always prefer hardware accelerated offscreen buffer
   Graphic3d_CView* cView = (Graphic3d_CView* )MyView->CView();
   Graphic3d_PtrFrameBuffer aFBOPtr = NULL;
   Graphic3d_PtrFrameBuffer aPrevFBOPtr = (Graphic3d_PtrFrameBuffer )cView->ptrFBO;
+  Standard_Integer aFBOVPSizeX (theWidth), aFBOVPSizeY (theHeight), aFBOSizeXMax (0), aFBOSizeYMax (0);
   Standard_Integer aPrevFBOVPSizeX (0), aPrevFBOVPSizeY (0), aPrevFBOSizeXMax (0), aPrevFBOSizeYMax (0);
   if (aPrevFBOPtr != NULL)
   {
     MyView->FBOGetDimensions (aPrevFBOPtr,
                               aPrevFBOVPSizeX, aPrevFBOVPSizeY,
                               aPrevFBOSizeXMax, aPrevFBOSizeYMax);
-    if (theWidth <= aPrevFBOSizeXMax && theHeight <= aPrevFBOSizeYMax)
+    if (aFBOVPSizeX <= aPrevFBOSizeXMax && aFBOVPSizeY <= aPrevFBOSizeYMax)
     {
-      MyView->FBOChangeViewport (aPrevFBOPtr, theWidth, theHeight);
+      MyView->FBOChangeViewport (aPrevFBOPtr, aFBOVPSizeX, aFBOVPSizeY);
       aFBOPtr = aPrevFBOPtr;
     }
   }
@@ -3545,7 +3545,17 @@ Handle(Image_PixMap) V3d_View::ToPixMap (const Standard_Integer  theWidth,
   if (aFBOPtr == NULL)
   {
     // Try to create hardware accelerated buffer
-    aFBOPtr = MyView->FBOCreate (theWidth, theHeight);
+    aFBOPtr = MyView->FBOCreate (aFBOVPSizeX, aFBOVPSizeY);
+    if (aFBOPtr != NULL)
+    {
+      MyView->FBOGetDimensions (aFBOPtr,
+                                aFBOVPSizeX,  aFBOVPSizeY,
+                                aFBOSizeXMax, aFBOSizeYMax);
+      // reduce viewport in case of hardware limits
+      if (aFBOVPSizeX > aFBOSizeXMax) aFBOVPSizeX = aFBOSizeXMax;
+      if (aFBOVPSizeY > aFBOSizeYMax) aFBOVPSizeY = aFBOSizeYMax;
+      MyView->FBOChangeViewport (aFBOPtr, aFBOVPSizeX, aFBOVPSizeY);
+    }
   }
   cView->ptrFBO = aFBOPtr;
 
@@ -3559,9 +3569,9 @@ Handle(Image_PixMap) V3d_View::ToPixMap (const Standard_Integer  theWidth,
 
     // technically we can reduce existing viewport...
     // but currently allow only dumping the window itself
-    if (theWidth != aWinWidth || theHeight != aWinHeight)
+    if (aFBOVPSizeX != aWinWidth || aFBOVPSizeY != aWinHeight)
     {
-      return Handle(Image_PixMap)();
+      return Standard_False;
     }
   }
 
@@ -3578,10 +3588,10 @@ Handle(Image_PixMap) V3d_View::ToPixMap (const Standard_Integer  theWidth,
     //szv: calculate expansion
     Umin = PUmin; Vmin = PVmin; Umax = PUmax; Vmax = PVmax;
     Standard_Real oldWidth = (PUmax - PUmin), oldHeight = (PVmax - PVmin);
-    Standard_Real newWidth = (oldHeight * theWidth) / theHeight;
+    Standard_Real newWidth = (oldHeight * aFBOVPSizeX) / aFBOVPSizeY;
     if (newWidth < oldWidth)
     {
-      Standard_Real newHeight = (oldWidth * theHeight) / theWidth;
+      Standard_Real newHeight = (oldWidth * aFBOVPSizeY) / aFBOVPSizeX;
       // Expand height
       Standard_Real delta = 0.5 * (newHeight - oldHeight);
       Vmin = PVmin - delta;
@@ -3611,15 +3621,25 @@ Handle(Image_PixMap) V3d_View::ToPixMap (const Standard_Integer  theWidth,
   MyViewMapping = prevMapping;
   MyView->SetViewMapping (prevMapping);
 
+  Standard_Boolean isSuccess = Standard_True;
+
   // allocate image buffer for dumping
-  Image_CRawBufferData aRawBuffer;
-  Handle(Image_PixMap) anImageBitmap = new Image_PixMap (theWidth, theHeight, theBufferType);
-  anImageBitmap->AccessBuffer (aRawBuffer);
-  if (!MyView->BufferDump (aRawBuffer))
+  if (theImage.IsEmpty()
+   || (Standard_Size )aFBOVPSizeX != theImage.SizeX()
+   || (Standard_Size )aFBOVPSizeY != theImage.SizeY())
   {
-    // dump is failed!
-    anImageBitmap = Handle(Image_PixMap)();
+    bool isBigEndian = Image_PixMap::IsBigEndianHost();
+    Image_PixMap::ImgFormat aFormat = Image_PixMap::ImgUNKNOWN;
+    switch (theBufferType)
+    {
+      case Graphic3d_BT_RGB:   aFormat = isBigEndian ? Image_PixMap::ImgRGB  : Image_PixMap::ImgBGR;  break;
+      case Graphic3d_BT_RGBA:  aFormat = isBigEndian ? Image_PixMap::ImgRGBA : Image_PixMap::ImgBGRA; break;
+      case Graphic3d_BT_Depth: aFormat = Image_PixMap::ImgGrayF; break;
+    }
+
+    isSuccess = isSuccess && theImage.InitZero (aFormat, aFBOVPSizeX, aFBOVPSizeY);
   }
+  isSuccess = isSuccess && MyView->BufferDump (theImage, theBufferType);
 
   // FBO now useless, free resources
   if (aFBOPtr != aPrevFBOPtr)
@@ -3631,5 +3651,5 @@ Handle(Image_PixMap) V3d_View::ToPixMap (const Standard_Integer  theWidth,
     MyView->FBOChangeViewport (aPrevFBOPtr, aPrevFBOVPSizeX, aPrevFBOVPSizeY);
   }
   cView->ptrFBO = aPrevFBOPtr;
-  return anImageBitmap;
+  return isSuccess;
 }
diff --git a/src/V3d/V3d_View_4.cxx b/src/V3d/V3d_View_4.cxx
index 562b3e2..b0b049c 100644
--- a/src/V3d/V3d_View_4.cxx
+++ b/src/V3d/V3d_View_4.cxx
@@ -562,13 +562,13 @@ void V3d_View::GetGraduatedTrihedron(/* Names of axes */
                                      /* Name of font for names of axes */
                                      TCollection_AsciiString &fontOfNames,
                                      /* Style of names of axes */
-                                     OSD_FontAspect& styleOfNames,
+                                     Font_FontAspect& styleOfNames,
                                      /* Size of names of axes */
                                      Standard_Integer& sizeOfNames,
                                      /* Name of font for values */
                                      TCollection_AsciiString &fontOfValues,
                                      /* Style of values */
-                                     OSD_FontAspect& styleOfValues,
+                                     Font_FontAspect& styleOfValues,
                                      /* Size of values */
                                      Standard_Integer& sizeOfValues) const
 {
@@ -689,13 +689,13 @@ void V3d_View::GraduatedTrihedronDisplay(/* Names of axes */
                                          /* Name of font for names of axes */
                                          const TCollection_AsciiString &fontOfNames,
                                          /* Style of names of axes */
-                                         const OSD_FontAspect styleOfNames,
+                                         const Font_FontAspect styleOfNames,
                                          /* Size of names of axes */
                                          const Standard_Integer sizeOfNames,
                                          /* Name of font for values */
                                          const TCollection_AsciiString &fontOfValues,
                                          /* Style of values */
-                                         const OSD_FontAspect styleOfValues,
+                                         const Font_FontAspect styleOfValues,
                                          /* Size of values */
                                          const Standard_Integer sizeOfValues)
 {
diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx
index 80ab551..7d82a4a 100644
--- a/src/ViewerTest/ViewerTest.cxx
+++ b/src/ViewerTest/ViewerTest.cxx
@@ -43,6 +43,7 @@
 #include <BRepAdaptor_Curve.hxx>
 #include <StdSelect_ShapeTypeFilter.hxx>
 #include <AIS.hxx>
+#include <AIS_Drawer.hxx>
 #include <AIS_InteractiveObject.hxx>
 #include <AIS_Trihedron.hxx>
 #include <AIS_Axis.hxx>
@@ -51,7 +52,10 @@
 #include <AIS_SignatureFilter.hxx>
 #include <AIS_ListOfInteractive.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
-#include <Image_PixMap.hxx>
+#include <Aspect_InteriorStyle.hxx>
+#include <Graphic3d_AspectFillArea3d.hxx>
+#include <Image_AlienPixMap.hxx>
+#include <Prs3d_ShadingAspect.hxx>
 
 #ifdef HAVE_CONFIG_H
 # include <oce-config.h>
@@ -829,22 +833,21 @@ static Standard_Integer VDump (Draw_Interpretor& di, Standard_Integer argc, cons
     return 1;
   }
 
-  Image_TypeOfImage aBufferType = Image_TOI_RGB;
-
+  Graphic3d_BufferType aBufferType = Graphic3d_BT_RGB;
   if (argc > 2)
   {
     TCollection_AsciiString aBuffTypeStr (argv[2]);
     if (TCollection_AsciiString::ISSIMILAR (aBuffTypeStr, TCollection_AsciiString ("rgb")))
     {
-      aBufferType = Image_TOI_RGB;
+      aBufferType = Graphic3d_BT_RGB;
     }
     else if (TCollection_AsciiString::ISSIMILAR (aBuffTypeStr, TCollection_AsciiString ("rgba")))
     {
-      aBufferType = Image_TOI_RGBA;
+      aBufferType = Graphic3d_BT_RGBA;
     }
     else if (TCollection_AsciiString::ISSIMILAR (aBuffTypeStr, TCollection_AsciiString ("depth")))
     {
-      aBufferType = Image_TOI_FLOAT;
+      aBufferType = Graphic3d_BT_Depth;
     }
   }
 
@@ -854,22 +857,41 @@ static Standard_Integer VDump (Draw_Interpretor& di, Standard_Integer argc, cons
   Handle(AIS_InteractiveContext) IC;
   Handle(V3d_View) view;
   GetCtxAndView (IC, view);
-  if (!view.IsNull())
+  if (view.IsNull())
   {
-    if (aWidth > 0 && aHeight > 0)
-    {
-      return view->ToPixMap (aWidth, aHeight, aBufferType)->Dump (argv[1]) ? 0 : 1;
-    }
-    else
+    di << "Cannot find an active viewer/view\n";
+    return 1;
+  }
+
+  if (aWidth <= 0 || aHeight <= 0)
+  {
+    if (!view->Dump (argv[1], aBufferType))
     {
-      return view->Dump (argv[1], aBufferType) ? 0 : 1;
+      di << "Dumping failed!\n";
+      return 1;
     }
+    return 0;
   }
-  else
+
+  Image_AlienPixMap aPixMap;
+  if (!view->ToPixMap (aPixMap, aWidth, aHeight, aBufferType))
   {
-    di << "Cannot find an active viewer/view" << "\n";
+    di << "Dumping failed!\n";
     return 1;
   }
+
+  if (aPixMap.SizeX() != Standard_Size(aWidth)
+   || aPixMap.SizeY() != Standard_Size(aHeight))
+  {
+    std::cout << "Warning! Dumped dimensions " << aPixMap.SizeX() << "x" << aPixMap.SizeY()
+              << " are lesser than requested " << aWidth          << "x" << aHeight << "\n";
+  }
+  if (!aPixMap.Save (argv[1]))
+  {
+    di << "Saving image failed!\n";
+    return 1;
+  }
+  return 0;
 }
 
 
@@ -1432,6 +1454,98 @@ static int VWidth (Draw_Interpretor& di, Standard_Integer argc, const char** arg
   }
   return 0;
 }
+
+//==============================================================================
+//function : VInteriorStyle
+//purpose  : sets interior style of the a selected or named or displayed shape
+//Draw arg : vsetinteriorstyle [shape] style
+//==============================================================================
+static void SetInteriorStyle (const Handle(AIS_InteractiveObject)& theIAO,
+                              const Standard_Integer theStyle,
+                              Draw_Interpretor& di)
+{
+  if (theStyle < Aspect_IS_EMPTY || theStyle > Aspect_IS_HIDDENLINE) {
+    di << "Style must be within a range [0 (Aspect_IS_EMPTY), " << Aspect_IS_HIDDENLINE <<
+      " (Aspect_IS_HIDDENLINE)]\n";
+    return;
+  }
+  const Handle(Prs3d_Drawer)& aDrawer = theIAO->Attributes();
+  Handle(Prs3d_ShadingAspect) aShadingAspect = aDrawer->ShadingAspect();
+  Handle(Graphic3d_AspectFillArea3d) aFillAspect = aShadingAspect->Aspect();
+  Aspect_InteriorStyle aStyle = (Aspect_InteriorStyle) (theStyle);
+  aFillAspect->SetInteriorStyle (aStyle);
+  TheAISContext()->RecomputePrsOnly (theIAO, Standard_False /*update*/, Standard_True /*all modes*/);
+}
+
+static int VInteriorStyle (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
+{
+  if (argc < 2 || argc > 3) {
+    di << argv[0] << " requires 2 or 3 arguments\n";
+    di << "Usage : " << argv[0] << " [shape] Style : Set interior style" << "\n";
+    di << "Style must match Aspect_InteriorStyle and be one of:\n";
+    di << "         0 = EMPTY, 1 = HOLLOW, 2 = HATCH, 3 = SOLID, 4 = HIDDENLINE\n";
+    return 1;
+  }
+
+  Standard_Boolean    ThereIsCurrent;
+  Standard_Boolean    ThereIsArgument;
+  Standard_Boolean    IsBound = Standard_False ;
+
+  ThereIsArgument = (argc > 2);
+  if ( !a3DView().IsNull() ) {
+    TCollection_AsciiString name;
+    if (ThereIsArgument) {
+      name = argv[1];
+      IsBound= GetMapOfAIS().IsBound2(name);
+    }
+    if (TheAISContext()->HasOpenedContext())
+      TheAISContext()->CloseLocalContext();
+
+    if (TheAISContext() -> NbCurrents() > 0  )
+      ThereIsCurrent =Standard_True;
+    else
+      ThereIsCurrent =Standard_False;
+
+    if ( ThereIsArgument && IsBound ) {
+      const Handle(Standard_Transient) anObj = GetMapOfAIS().Find2(name);
+      if (anObj->IsKind(STANDARD_TYPE(AIS_InteractiveObject))) {
+        const Handle(AIS_InteractiveObject) ashape =
+          Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
+        SetInteriorStyle (ashape, atoi (argv[2]), di);
+      }
+    }
+    //=======================================================================
+    // No arguments specified
+    // But there are one or more selected objects
+    //=======================================================================
+    if (ThereIsCurrent && !ThereIsArgument) {
+      for (TheAISContext() -> InitCurrent() ;
+           TheAISContext() -> MoreCurrent() ;
+           TheAISContext() ->NextCurrent() )
+      {
+        Handle(AIS_InteractiveObject) ashape =  TheAISContext() -> Current();
+        SetInteriorStyle (ashape, atoi (argv[1]), di);
+      }
+    }
+    //=======================================================================
+    // No arguments specified and there are no selected objects
+    //=======================================================================
+    else if (!ThereIsCurrent && !ThereIsArgument){
+      ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName
+       it(GetMapOfAIS());
+      while ( it.More() ) {
+        Handle(AIS_InteractiveObject) ashape =
+          Handle(AIS_InteractiveObject)::DownCast (it.Key1());
+        if (!ashape.IsNull())
+          SetInteriorStyle (ashape, atoi (argv[1]), di);
+        it.Next();
+      }
+    }
+    TheAISContext()->UpdateCurrentViewer();
+  }
+  return 0;
+}
+
 //==============================================================================
 //function : VDonly2
 //author   : ege
@@ -3535,6 +3649,10 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands)
 		  "vunsetwidth          : vwidth  [name of shape]",
 		  __FILE__,VWidth,group);
 
+  theCommands.Add("vsetinteriorstyle",
+		  "vsetinteriorstyle    : vsetinteriorstyle [name of shape] style",
+		  __FILE__,VInteriorStyle,group);
+
   theCommands.Add("vardis",
 		  "vardis          : display activeareas",
 		  __FILE__,VDispAreas,group);
diff --git a/src/ViewerTest/ViewerTest_AviCommands.cxx b/src/ViewerTest/ViewerTest_AviCommands.cxx
index 5897495..cf9892b 100644
--- a/src/ViewerTest/ViewerTest_AviCommands.cxx
+++ b/src/ViewerTest/ViewerTest_AviCommands.cxx
@@ -17,27 +17,26 @@
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
-
-
-#ifdef WNT
-#include <windows.h>
+#if (defined(_WIN32) || defined(__WIN32__)) && defined(HAVE_VIDEOCAPTURE)
+  #include <windows.h>
+  #include <OpenGl_AVIWriter.hxx>
 #endif
 
 #include <ViewerTest.hxx>
 #include <Draw_Interpretor.hxx>
-#include <OpenGl_AVIWriter.hxx>
 
 static Standard_Integer avi_record(Draw_Interpretor& di,
                                    Standard_Integer argc, const char** argv)
 {
-  Standard_Integer aResult(1);
-  if (argc < 2) {
+  if (argc < 2)
+  {
     cout << "Syntax: " << argv[0] << " file | start | stop | save" << endl;
-  } else {
+    return 1;
+  }
 
-#ifndef WNT
-    cout << "AVI writer is implemented only in Windows version" << endl;
-#else  
+  Standard_Integer aResult = 1;
+#if (defined(_WIN32) || defined(__WIN32__))
+  #ifdef HAVE_VIDEOCAPTURE
     static OpenGl_AVIWriter * pAviWriter = 0L;
 
     if (strncmp(argv[1], "file", 5) == 0) {
@@ -71,8 +70,12 @@ static Standard_Integer avi_record(Draw_Interpretor& di,
       cout << pAviWriter->GetLastErrorMessage() << endl;
       aResult = 0;
     }
+  #else
+    cout << "AVI writer capability was disabled\n";
+  #endif
+#else
+  cout << "AVI writer is implemented only in Windows version\n";
 #endif
-  }
   return aResult;
 }
 
@@ -96,6 +99,3 @@ void ViewerTest::AviCommands(Draw_Interpretor& theCommands)
 		  __FILE__,
 		  &avi_record, group); //Draft_Modification
 }
-
-
-
diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx
index 18e5559..10f4ea7 100644
--- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx
+++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx
@@ -123,7 +123,7 @@
 #include <SelectMgr_Selection.hxx>
 #include <StdFail_NotDone.hxx>
 #include <StdPrs_ShadedShape.hxx>
-#include <TopoDS_Wire.hxx> 
+#include <TopoDS_Wire.hxx>
 
 #include <AIS_ConnectedShape.hxx>
 #include <TopLoc_Location.hxx>
@@ -138,6 +138,8 @@
 #include <BRepExtrema_ExtPC.hxx>
 #include <BRepExtrema_ExtPF.hxx>
 
+#include <Prs3d_LineAspect.hxx>
+
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
@@ -2298,7 +2300,7 @@ public:
       Standard_Real Angle ,
       Standard_Boolean Zoom ,
       Standard_Real  Height,
-      OSD_FontAspect FontAspect,
+      Font_FontAspect FontAspect,
       Standard_CString Font
     );
 
@@ -2322,7 +2324,7 @@ protected:
   Standard_Boolean                    aZoomable;
   Quantity_Color                      aColor;
   Standard_CString                    aFont;
-  OSD_FontAspect                      aFontAspect;
+  Font_FontAspect                     aFontAspect;
   Graphic3d_HorizontalTextAlignment   aHJustification;
   Graphic3d_VerticalTextAlignment     aVJustification;
 };
@@ -2340,7 +2342,7 @@ MyTextClass::MyTextClass( const TCollection_ExtendedString& text, const gp_Pnt&
                           Standard_Real     angle       = 0.0 ,
                           Standard_Boolean  zoomable    = Standard_True,
                           Standard_Real     height      = 12.,
-                          OSD_FontAspect    fontAspect  = OSD_FA_Regular,
+                          Font_FontAspect   fontAspect  = Font_FA_Regular,
                           Standard_CString  font        = "Courier")
 {
   aText           = text;
@@ -2440,7 +2442,7 @@ static int VDrawText (Draw_Interpretor& di, Standard_Integer argc, const char**
   const Standard_Real height = atof(argv[12]);
 
   // Text aspect
-  const OSD_FontAspect aspect = OSD_FontAspect(atoi(argv[13]));
+  const Font_FontAspect aspect = Font_FontAspect(atoi(argv[13]));
 
   // Text font
   TCollection_AsciiString font;
@@ -3246,10 +3248,10 @@ static int VDrawPArray (Draw_Interpretor& di, Standard_Integer argc, const char*
   }
   else if (argc < 3)
   {
-    di << "Use: " << argv[0] << " Name TypeOfArray [EnableVBO={0 | 1}]"
+    di << "Use: " << argv[0] << " Name TypeOfArray"
        << " [vertex] ... [bounds] ... [edges]\n"
        << "  TypeOfArray={ points | segments | polylines | triangles |\n"
-       << "                trianglefan | trianglestrips | quads |\n"
+       << "                trianglefans | trianglestrips | quads |\n"
        << "                quadstrips | polygons }\n"
        << "  vertex={ 'v' x y z [normal={ 'n' nx ny nz }] [color={ 'c' r g b }]"
        << " [texel={ 't' tx ty }] } \n"
@@ -3259,20 +3261,16 @@ static int VDrawPArray (Draw_Interpretor& di, Standard_Integer argc, const char*
   }
 
   // read the arguments
-  TCollection_AsciiString aName (argv[1]);
-  TCollection_AsciiString anArrayType (argv[2]);
-  
-  // is argument list has an vbo flag
-  Standard_Boolean hasFlagVbo = Standard_False;
-  if (isdigit (argv[3][0]) && atoi (argv[3]) >= 0 && atoi (argv[3]) <= 1)
-    hasFlagVbo = Standard_True;
+  Standard_Integer aArgIndex = 1;
+  TCollection_AsciiString aName (argv[aArgIndex++]);
+  TCollection_AsciiString anArrayType (argv[aArgIndex++]);
+  const Standard_Integer anArgsFrom = aArgIndex;
 
   // parse number of verticies, bounds, edges
   Standard_Integer aVertexNum = 0, aBoundNum = 0, aEdgeNum = 0;
   Standard_Boolean hasVColors, hasBColors, hasNormals, hasInfos, hasTexels;
   hasVColors = hasNormals = hasBColors = hasInfos = hasTexels = Standard_False;
 
-  Standard_Integer aArgIndex = (hasFlagVbo) ? 4 : 3;
   TCollection_AsciiString aCommand;
   while (aArgIndex < argc)
   {
@@ -3370,7 +3368,7 @@ static int VDrawPArray (Draw_Interpretor& di, Standard_Integer argc, const char*
   }
 
   // parse an array of primitives
-  aArgIndex = (hasFlagVbo) ? 4 : 3;
+  aArgIndex = anArgsFrom;
   while (aArgIndex < argc)
   {
     aCommand = argv[aArgIndex];
@@ -3433,17 +3431,6 @@ static int VDrawPArray (Draw_Interpretor& di, Standard_Integer argc, const char*
       aArgIndex++;
   }
 
-  if (hasFlagVbo)
-  {
-    // enable / disable vbo
-    Handle(Graphic3d_GraphicDriver) aDriver =
-      Handle(Graphic3d_GraphicDriver)::DownCast (
-                      aContextAIS->CurrentViewer()->Device()->GraphicDriver());
-
-    if (!aDriver.IsNull())
-      aDriver->EnableVBO ((Standard_Boolean) atoi (argv[3]));
-  }
-
   // create primitives array object
   Handle (MyPArrayObject) aPObject = new MyPArrayObject (anArray);
 
@@ -4255,12 +4242,12 @@ static Standard_Integer VPolygonOffset(Draw_Interpretor& di,
   }
 
   Standard_Integer aMode;
-  Standard_Real    aFactor, aUnits;
+  Standard_ShortReal    aFactor, aUnits;
   if (argc == 5)
   {
     aMode   = atoi(argv[2]);
-    aFactor = atof(argv[3]);
-    aUnits  = atof(argv[4]);
+    aFactor = (Standard_ShortReal) atof(argv[3]);
+    aUnits  = (Standard_ShortReal) atof(argv[4]);
 
     anInterObj->SetPolygonOffsets(aMode, aFactor, aUnits);
     aContext->UpdateCurrentViewer();
@@ -4293,6 +4280,123 @@ static Standard_Integer VPolygonOffset(Draw_Interpretor& di,
 }
 
 //=======================================================================
+//function : VShowFaceBoundaries
+//purpose  : Set face boundaries drawing on/off for ais object
+//=======================================================================
+static Standard_Integer VShowFaceBoundary (Draw_Interpretor& di,
+                                           Standard_Integer argc,
+                                           const char ** argv)
+{
+  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext ();
+  if (aContext.IsNull ())
+  {
+    std::cout << argv[0] << " Call 'vinit' before!\n";
+    return 1;
+  }
+
+  if ((argc != 3 && argc < 6) || argc > 8)
+  {
+    std::cout << "Usage :\n " << argv[0]
+              << " ObjectName isOn [R G B [LineWidth [LineStyle]]]\n"
+              << "   ObjectName - name of AIS interactive object. \n"
+              << "                if ObjectName = \"\", then set as default\n"
+              << "                settings for all newly displayed objects\n"
+              << "   isOn       - flag indicating whether the boundaries\n"
+              << "                should be turned on or off (can be set\n"
+              << "                to 0 (off) or 1 (on)).\n"
+              << "   R, G, B    - red, green and blue components of boundary\n"
+              << "                color in range (0 - 255).\n"
+              << "                (default is (0, 0, 0)\n"
+              << "   LineWidth  - line width\n"
+              << "                (default is 1)\n"
+              << "   LineStyle  - line fill style :\n"
+              << "                 0 - solid  \n"
+              << "                 1 - dashed \n"
+              << "                 2 - dot    \n"
+              << "                 3 - dashdot\n"
+              << "                 (default is solid)";
+    return 1;
+  }
+
+  TCollection_AsciiString aName (argv[1]);
+
+  Quantity_Parameter aRed      = 0.0;
+  Quantity_Parameter aGreen    = 0.0;
+  Quantity_Parameter aBlue     = 0.0;
+  Standard_Real      aWidth    = 1.0;
+  Aspect_TypeOfLine  aLineType = Aspect_TOL_SOLID;
+  
+  // find object
+  Handle(AIS_InteractiveObject) anInterObj;
+
+  // if name is empty - apply attributes for default aspect
+  if (!aName.IsEmpty ())
+  {
+    ViewerTest_DoubleMapOfInteractiveAndName& aMap = GetMapOfAIS ();
+    if (!aMap.IsBound2 (aName))
+    {
+      std::cout << "Use 'vdisplay' on " << aName << " before" << std::endl;
+      return 1;
+    }
+
+    // find interactive object
+    Handle(Standard_Transient) anObj = GetMapOfAIS ().Find2 (aName);
+    anInterObj = Handle(AIS_InteractiveObject)::DownCast (anObj);
+    if (anInterObj.IsNull ())
+    {
+      std::cout << "Not an AIS interactive object!" << std::endl;
+      return 1;
+    }
+  }
+  
+  const Handle(Prs3d_Drawer)& aDrawer = (aName.IsEmpty ()) ?
+    TheAISContext ()->DefaultDrawer () : anInterObj->Attributes ();
+
+  // turn boundaries on/off
+  Standard_Boolean isBoundaryDraw = (atoi (argv[2]) == 1);
+  aDrawer->SetFaceBoundaryDraw (isBoundaryDraw);
+  
+  // set boundary line color
+  if (argc >= 6)
+  {
+    // Text color
+    aRed   = atof (argv[3])/255.;
+    aGreen = atof (argv[4])/255.;
+    aBlue  = atof (argv[5])/255.;
+  }
+
+  // set line width
+  if (argc >= 7)
+  {
+    aWidth = (Standard_Real)atof (argv[6]);
+  }
+
+  // select appropriate line type
+  if (argc == 8)
+  {
+    switch (atoi (argv[7]))
+    {
+      case 1: aLineType = Aspect_TOL_DASH;    break;
+      case 2: aLineType = Aspect_TOL_DOT;     break;
+      case 3: aLineType = Aspect_TOL_DOTDASH; break;
+      default:
+        aLineType = Aspect_TOL_SOLID;
+    }
+  }
+
+  Quantity_Color aColor (aRed, aGreen, aBlue, Quantity_TOC_RGB);
+
+  Handle(Prs3d_LineAspect) aBoundaryAspect = 
+    new Prs3d_LineAspect (aColor, aLineType, aWidth);
+
+  aDrawer->SetFaceBoundaryAspect (aBoundaryAspect);
+
+  TheAISContext()->Redisplay (anInterObj);
+  
+  return 0;
+}
+
+//=======================================================================
 //function : ObjectsCommands
 //purpose  :
 //=======================================================================
@@ -4374,7 +4478,7 @@ void ViewerTest::ObjectCommands(Draw_Interpretor& theCommands)
     __FILE__, VComputeHLR, group);
 
   theCommands.Add("vdrawparray",
-    "vdrawparray : vdrawparray Name TypeOfArray [EnableVbo=1] [vertex = { 'v' x y z [vertex_normal = { 'n' x y z }] [vertex_color = { 'c' r g b }] ] ... [bound = { 'b' vertex_count [bound_color = { 'c' r g b }] ] ... [edge = { 'e' vertex_id [edge_hidden = { 'h' }] ]",
+    "vdrawparray : vdrawparray Name TypeOfArray [vertex = { 'v' x y z [vertex_normal = { 'n' x y z }] [vertex_color = { 'c' r g b }] ] ... [bound = { 'b' vertex_count [bound_color = { 'c' r g b }] ] ... [edge = { 'e' vertex_id [edge_hidden = { 'h' }] ]",
     __FILE__,VDrawPArray,group);
 
   theCommands.Add("vconnect", 
@@ -4404,4 +4508,10 @@ void ViewerTest::ObjectCommands(Draw_Interpretor& theCommands)
   theCommands.Add("vpolygonoffset",
     "vpolygonoffset : [object [mode factor units]] - sets/gets polygon offset parameters for an object, without arguments prints the default values",
     __FILE__, VPolygonOffset, group);
+
+  theCommands.Add ("vshowfaceboundary",
+    "vshowfaceboundary : ObjectName isOn (1/0) [R G B [LineWidth [LineStyle]]]"
+    "- turns on/off drawing of face boundaries for ais object "
+    "and defines boundary line style.",
+    __FILE__, VShowFaceBoundary, group);
 }
diff --git a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx
index c86a8a0..2d0414a 100644
--- a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx
+++ b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx
@@ -23,6 +23,8 @@
 
 #include <ViewerTest.hxx>
 
+#include <Aspect_GraphicDevice.hxx>
+#include <AIS_InteractiveContext.hxx>
 #include <AIS_InteractiveObject.hxx>
 #include <Draw.hxx>
 #include <Draw_Interpretor.hxx>
@@ -32,21 +34,20 @@
 #include <OpenGl_AspectLine.hxx>
 #include <OpenGl_AspectMarker.hxx>
 #include <OpenGl_AspectText.hxx>
-#include <OpenGl_Callback.hxx>
 #include <OpenGl_Context.hxx>
 #include <OpenGl_Element.hxx>
 #include <OpenGl_ExtFBO.hxx>
 #include <OpenGl_GlCore20.hxx>
-#include <OpenGl_ResourceCleaner.hxx>
-#include <OpenGl_ResourceTexture.hxx>
-#include <OpenGl_ResourceVBO.hxx>
+#include <OpenGl_GraphicDriver.hxx>
 #include <OpenGl_Workspace.hxx>
 #include <Prs3d_Presentation.hxx>
 #include <Prs3d_Root.hxx>
 #include <Select3D_SensitiveCurve.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_Selection.hxx>
+#include <V3d_Viewer.hxx>
 #include <TCollection_AsciiString.hxx>
+#include <V3d_View.hxx>
 
 extern Standard_Boolean VDisplayAISObject (const TCollection_AsciiString& theName,
                                            const Handle(AIS_InteractiveObject)& theAISObj,
@@ -99,6 +100,11 @@ public:
         myIObj->Render(theWorkspace);
     }
 
+    virtual void Release (const Handle(OpenGl_Context)& theGlCtx)
+    {
+      //
+    }
+
   public:
     DEFINE_STANDARD_ALLOC
   };
@@ -174,21 +180,7 @@ void VUserDrawObj::Render(const Handle(OpenGl_Workspace)& theWorkspace) const
     *(theWorkspace->HighlightColor) : aLA->Color();
 
   // To test OpenGl_Window
-  Handle(OpenGl_Context) aCtx = theWorkspace->GetGlContext();
-  GLCONTEXT aGlContext = theWorkspace->GetGContext();
-
-  // To link against OpenGl_Context and extensions
-  GLuint aVboId = -1, aTexId = -1;
-  if (aCtx->arbVBO)
-    aCtx->arbVBO->glGenBuffersARB(1, &aVboId);
-  glGenTextures(1, &aTexId);
-
-  // To link against OpenGl_ResourceCleaner, OpenGl_ResourceVBO, OpenGl_ResourceTexture
-  OpenGl_ResourceCleaner* aResCleaner = OpenGl_ResourceCleaner::GetInstance();
-  if (aVboId != (GLuint)-1)
-    aResCleaner->AddResource(aGlContext, new OpenGl_ResourceVBO(aVboId));
-  if (aTexId != (GLuint)-1)
-    aResCleaner->AddResource(aGlContext, new OpenGl_ResourceTexture(aTexId));
+  //Handle(OpenGl_Context) aCtx = theWorkspace->GetGlContext();
 
   // Finally draw something to make sure UserDraw really works
   glPushAttrib(GL_ENABLE_BIT);
@@ -227,6 +219,13 @@ static Standard_Integer VUserDraw (Draw_Interpretor& di,
     return 1;
   }
 
+  Handle(OpenGl_GraphicDriver) aDriver = Handle(OpenGl_GraphicDriver)::DownCast (aContext->CurrentViewer()->Device()->GraphicDriver());
+  if (aDriver.IsNull())
+  {
+    std::cerr << "Graphic driver not available.\n";
+    return 1;
+  }
+
   if (argc > 2)
   {
     di << argv[0] << "Wrong number of arguments, only the object name expected\n";
@@ -237,7 +236,7 @@ static Standard_Integer VUserDraw (Draw_Interpretor& di,
   VDisplayAISObject(aName, Handle(AIS_InteractiveObject)());
 
   // register the custom element factory function
-  ::UserDrawCallback() = VUserDrawCallback;
+  aDriver->UserDrawCallback() = VUserDrawCallback;
 
   Handle(VUserDrawObj) anIObj = new VUserDrawObj();
   VDisplayAISObject(aName, anIObj);
@@ -245,6 +244,158 @@ static Standard_Integer VUserDraw (Draw_Interpretor& di,
   return 0;
 }
 
+//==============================================================================
+//function : VFeedback
+//purpose  :
+//==============================================================================
+
+static int VFeedback (Draw_Interpretor& theDI,
+                      Standard_Integer  theArgNb,
+                      const char**      theArgVec)
+{
+  // get the active view
+  Handle(V3d_View) aView = ViewerTest::CurrentView();
+  if (aView.IsNull())
+  {
+    std::cerr << "No active view. Please call vinit.\n";
+    return 1;
+  }
+
+  unsigned int aBufferSize = 1024 * 1024;
+  for (;;)
+  {
+    size_t aBytes = (size_t )aBufferSize * sizeof(GLfloat);
+    if (aBytes / sizeof(GLfloat) != (size_t )aBufferSize)
+    {
+      // finito la commedia
+      std::cerr << "Can not allocate buffer - requested size ("
+                << (double(aBufferSize / (1024 * 1024)) * double(sizeof(GLfloat)))
+                << " MiB) is out of address space\n";
+      return 1;
+    }
+
+    GLfloat* aBuffer = (GLfloat* )Standard::Allocate (aBytes);
+    if (aBuffer == NULL)
+    {
+      // finito la commedia
+      std::cerr << "Can not allocate buffer with size ("
+                << (double(aBufferSize / (1024 * 1024)) * double(sizeof(GLfloat)))
+                << " MiB)\n";
+      return 1;
+    }
+
+    glFeedbackBuffer ((GLsizei )aBufferSize, GL_2D, aBuffer);
+    glRenderMode (GL_FEEDBACK);
+
+    aView->Redraw();
+
+    GLint aResult = glRenderMode (GL_RENDER);
+    if (aResult < 0)
+    {
+      aBufferSize *= 2;
+
+      void* aPtr = aBuffer;
+      Standard::Free (aPtr);
+      aBuffer = NULL;
+      continue;
+    }
+
+    std::cout << "FeedBack result= " << aResult << "\n";
+    GLint aPntNb     = 0;
+    GLint aTriNb     = 0;
+    GLint aQuadsNb   = 0;
+    GLint aPolyNb    = 0;
+    GLint aNodesNb   = 0;
+    GLint aLinesNb   = 0;
+    GLint aBitmapsNb = 0;
+    GLint aPassThrNb = 0;
+    GLint aUnknownNb = 0;
+    const GLint NODE_VALUES = 2; // GL_2D
+    for (GLint anIter = 0; anIter < aResult;)
+    {
+        const GLfloat aPos = aBuffer[anIter];
+        switch ((GLint )aPos)
+        {
+          case GL_POINT_TOKEN:
+          {
+            ++aPntNb;
+            ++aNodesNb;
+            anIter += 1 + NODE_VALUES;
+            break;
+          }
+          case GL_LINE_RESET_TOKEN:
+          case GL_LINE_TOKEN:
+          {
+            ++aLinesNb;
+            aNodesNb += 2;
+            anIter += 1 + 2 * NODE_VALUES;
+            break;
+          }
+          case GL_POLYGON_TOKEN:
+          {
+            const GLint aCount = (GLint )aBuffer[++anIter];
+            aNodesNb += aCount;
+            anIter += aCount * NODE_VALUES + 1;
+            if (aCount == 3)
+            {
+              ++aTriNb;
+            }
+            else if (aCount == 4)
+            {
+              ++aQuadsNb;
+            }
+            else
+            {
+              ++aPolyNb;
+            }
+            break;
+          }
+          case GL_BITMAP_TOKEN:
+          case GL_DRAW_PIXEL_TOKEN:
+          case GL_COPY_PIXEL_TOKEN:
+          {
+            ++aBitmapsNb;
+            anIter += 1 + NODE_VALUES;
+            break;
+          }
+          case GL_PASS_THROUGH_TOKEN:
+          {
+            ++aPassThrNb;
+            anIter += 2; // header + value
+            break;
+          }
+          default:
+          {
+            ++anIter;
+            ++aUnknownNb;
+            break;
+          }
+       }
+    }
+    void* aPtr = aBuffer;
+    Standard::Free (aPtr);
+
+    // return statistics
+    theDI << "Total nodes:   " << aNodesNb   << "\n"
+          << "Points:        " << aPntNb     << "\n"
+          << "Line segments: " << aLinesNb   << "\n"
+          << "Triangles:     " << aTriNb     << "\n"
+          << "Quads:         " << aQuadsNb   << "\n"
+          << "Polygons:      " << aPolyNb    << "\n"
+          << "Bitmap tokens: " << aBitmapsNb << "\n"
+          << "Pass through:  " << aPassThrNb << "\n"
+          << "UNKNOWN:       " << aUnknownNb << "\n";
+
+    double aLen2D      = double(aNodesNb * 2 + aPntNb + aLinesNb * 2 + (aTriNb + aQuadsNb + aPolyNb) * 2 + aBitmapsNb + aPassThrNb);
+    double aLen3D      = double(aNodesNb * 3 + aPntNb + aLinesNb * 2 + (aTriNb + aQuadsNb + aPolyNb) * 2 + aBitmapsNb + aPassThrNb);
+    double aLen3D_rgba = double(aNodesNb * 7 + aPntNb + aLinesNb * 2 + (aTriNb + aQuadsNb + aPolyNb) * 2 + aBitmapsNb + aPassThrNb);
+    theDI << "Buffer size GL_2D:       " << aLen2D      * double(sizeof(GLfloat)) / double(1024 * 1024) << " MiB\n"
+          << "Buffer size GL_3D:       " << aLen3D      * double(sizeof(GLfloat)) / double(1024 * 1024) << " MiB\n"
+          << "Buffer size GL_3D_COLOR: " << aLen3D_rgba * double(sizeof(GLfloat)) / double(1024 * 1024) << " MiB\n";
+    return 0;
+  }
+}
+
 //=======================================================================
 //function : OpenGlCommands
 //purpose  :
@@ -257,4 +408,7 @@ void ViewerTest::OpenGlCommands(Draw_Interpretor& theCommands)
   theCommands.Add("vuserdraw",
     "vuserdraw : name - simulates drawing with help of UserDraw",
     __FILE__, VUserDraw, aGroup);
+  theCommands.Add("vfeedback",
+    "vfeedback       : perform test GL feedback rendering",
+    __FILE__, VFeedback, aGroup);
 }
diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx
index edd32f8..7a52338 100644
--- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx
+++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx
@@ -45,19 +45,21 @@
 #include <Draw.hxx>
 #include <Draw_Appli.hxx>
 #include <Aspect_PrintAlgo.hxx>
-#include <Image_PixMap.hxx>
+#include <Image_AlienPixMap.hxx>
 #include <OSD_Timer.hxx>
 #include <TColStd_SequenceOfInteger.hxx>
 #include <Visual3d_LayerItem.hxx>
 #include <V3d_LayerMgr.hxx>
 #include <V3d_LayerMgrPointer.hxx>
 #include <Aspect_TypeOfLine.hxx>
+#include <Image_Diff.hxx>
 
 #ifdef WNT
 #undef DrawText
 #endif
 
 #include <Visual3d_Layer.hxx>
+#include <cstdlib>
 
 #ifndef WNT
 #include <Graphic3d_GraphicDevice.hxx>
@@ -187,8 +189,13 @@ void ViewerTest::ViewerInit (const Standard_Integer thePxLeft,  const Standard_I
 {
   static Standard_Boolean isFirst = Standard_True;
 
-  Standard_Integer aPxLeft   = 0;
-  Standard_Integer aPxTop    = 460;
+  // Default position and dimension of the viewer window.
+  // Note that left top corner is set to be sufficiently small to have 
+  // window fit in the small screens (actual for remote desktops, see #23003).
+  // The position corresponds to the window's client area, thus some 
+  // gap is added for window frame to be visible.
+  Standard_Integer aPxLeft   = 20;
+  Standard_Integer aPxTop    = 40;
   Standard_Integer aPxWidth  = 409;
   Standard_Integer aPxHeight = 409;
   if (thePxWidth != 0 && thePxHeight != 0)
@@ -242,16 +249,14 @@ void ViewerTest::ViewerInit (const Standard_Integer thePxLeft,  const Standard_I
     a3DCollector = new V3d_Viewer(GetG3dDevice(), NameOfWindow.ToExtString());
     a3DViewer->SetDefaultBackgroundColor(Quantity_NOC_BLACK);
     a3DCollector->SetDefaultBackgroundColor(Quantity_NOC_STEELBLUE);
-    Handle(NIS_View) aView =
-      Handle(NIS_View)::DownCast(ViewerTest::CurrentView());
-    if ( aView.IsNull() ) {
-      //       Handle (V3d_View) V = a3DViewer->CreateView();
+    Handle(NIS_View) aView = Handle(NIS_View)::DownCast(ViewerTest::CurrentView());
+    if (aView.IsNull())
+    {
+      //Handle(V3d_View) a3DViewCol = a3DViewer->CreateView();
       aView = new NIS_View (a3DViewer, VT_GetWindow());
       ViewerTest::CurrentView(aView);
       TheNISContext()->AttachView (aView);
     }
-    Handle(V3d_View) a3DViewCol;
-    if ( a3DViewCol.IsNull() ) a3DViewCol    = a3DViewer->CreateView();
 
     // AIS setup
     if ( ViewerTest::GetAISContext().IsNull() ) {
@@ -371,7 +376,7 @@ static void ProcessKeyPress( char *buf_ret )
     }
   }
   else if ( !strcasecmp(buf_ret, "U") ) {
-    // SHADING
+    // Unset display mode
     cout<<"passage au mode par defaut"<<endl;
 #ifndef OCC120
     ViewerTest::CurrentView()->SetDegenerateModeOn();
@@ -398,15 +403,15 @@ static void ProcessKeyPress( char *buf_ret )
     aView->SetProj(V3d_Zpos);
   }
   else if ( !strcasecmp(buf_ret, "B") ) {
-    // Top
+    // Bottom
     aView->SetProj(V3d_Zneg);
   }
   else if ( !strcasecmp(buf_ret, "L") ) {
-    // Top
+    // Left
     aView->SetProj(V3d_Xneg);
   }
   else if ( !strcasecmp(buf_ret, "R") ) {
-    // Top
+    // Right
     aView->SetProj(V3d_Xpos);
   }
 
@@ -655,20 +660,31 @@ void ViewerTest::GetMousePosition(Standard_Integer& Xpix,Standard_Integer& Ypix)
 }
 
 //==============================================================================
+//function : ViewProject: implements VAxo, VTop, VLeft, ...
+//purpose  : Switches to an axonometric, top, left and other views
+//==============================================================================
+
+static int ViewProject(Draw_Interpretor& di, const V3d_TypeOfOrientation ori)
+{
+  if ( ViewerTest::CurrentView().IsNull() ) 
+  {
+    di<<"Call vinit before this command, please"<<"\n";
+    return 1;
+  }
+
+  ViewerTest::CurrentView()->SetProj(ori);
+  return 0;
+}
+
+//==============================================================================
 //function : VAxo
 //purpose  : Switch to an Axonometric view
 //Draw arg : No args
 //==============================================================================
 
 static int VAxo(Draw_Interpretor& di, Standard_Integer , const char** )
-{ if ( ViewerTest::CurrentView().IsNull() ) {
-  di<<"La commande vinit n'a pas ete appele avant"<<"\n";
-  //  VInit(di, argc, argv);
-}
-
-ViewerTest::CurrentView()->SetProj(V3d_XposYnegZpos);
-
-return 0;
+{
+  return ViewProject(di, V3d_XposYnegZpos);
 }
 
 //==============================================================================
@@ -679,16 +695,62 @@ return 0;
 
 static int VTop(Draw_Interpretor& di, Standard_Integer , const char** )
 {
+  return ViewProject(di, V3d_Zpos);
+}
 
-  if ( ViewerTest::CurrentView().IsNull() ) {
-    di<<"La commande vinit n'a pas ete appele avant"<<"\n";
+//==============================================================================
+//function : VBottom
+//purpose  : Switch to a Bottom View
+//Draw arg : No args
+//==============================================================================
 
-    //  VInit(di, , argv);
-  }
+static int VBottom(Draw_Interpretor& di, Standard_Integer , const char** )
+{
+  return ViewProject(di, V3d_Zneg);
+}
 
-  ViewerTest::CurrentView()->SetProj(V3d_Zpos);
-  return 0;
+//==============================================================================
+//function : VLeft
+//purpose  : Switch to a Left View
+//Draw arg : No args
+//==============================================================================
 
+static int VLeft(Draw_Interpretor& di, Standard_Integer , const char** )
+{
+  return ViewProject(di, V3d_Ypos);
+}
+
+//==============================================================================
+//function : VRight
+//purpose  : Switch to a Right View
+//Draw arg : No args
+//==============================================================================
+
+static int VRight(Draw_Interpretor& di, Standard_Integer , const char** )
+{
+  return ViewProject(di, V3d_Yneg);
+}
+
+//==============================================================================
+//function : VFront
+//purpose  : Switch to a Front View
+//Draw arg : No args
+//==============================================================================
+
+static int VFront(Draw_Interpretor& di, Standard_Integer , const char** )
+{
+  return ViewProject(di, V3d_Xpos);
+}
+
+//==============================================================================
+//function : VBack
+//purpose  : Switch to a Back View
+//Draw arg : No args
+//==============================================================================
+
+static int VBack(Draw_Interpretor& di, Standard_Integer , const char** )
+{
+  return ViewProject(di, V3d_Xneg);
 }
 
 //==============================================================================
@@ -705,13 +767,17 @@ static int VHelp(Draw_Interpretor& di, Standard_Integer , const char** )
   di << "========================="<<"\n";
   di << "F : FitAll" << "\n";
   di << "T : TopView" << "\n";
+  di << "B : BottomView" << "\n";
+  di << "R : RightView" << "\n";
+  di << "L : LeftView" << "\n";
   di << "A : AxonometricView" << "\n";
-  di << "R : ResetView" << "\n";
+  di << "D : ResetView" << "\n";
 
   di << "========================="<<"\n";
   di << "S : Shading" << "\n";
   di << "W : Wireframe" << "\n";
   di << "H : HidelLineRemoval" << "\n";
+  di << "U : Unset display mode" << "\n";
 
   di << "========================="<<"\n";
   di << "Selection mode "<<"\n";
@@ -724,9 +790,10 @@ static int VHelp(Draw_Interpretor& di, Standard_Integer , const char** )
   di << "6 : Solid" <<"\n";
   di << "7 : Compound" <<"\n";
 
-  di << "=========================="<<"\n";
-  di << "D : Remove Selected Object"<<"\n";
-  di << "=========================="<<"\n";
+  di << "========================="<<"\n";
+  di << "Z : Switch Z clipping On/Off" << "\n";
+  di << ", : Hilight next detected" << "\n";
+  di << ". : Hilight previous detected" << "\n";
 
   return 0;
 }
@@ -2077,10 +2144,8 @@ static int VPrintView (Draw_Interpretor& di, Standard_Integer argc,
   if (aMode != 0 && aMode != 1)
     aMode = 0;
 
-  Image_CRawBufferData aRawBuffer;
-  HDC anDC = CreateCompatibleDC(0);
-
   // define compatible bitmap
+  HDC anDC = CreateCompatibleDC(0);
   BITMAPINFO aBitmapData;
   memset (&aBitmapData, 0, sizeof (BITMAPINFOHEADER));
   aBitmapData.bmiHeader.biSize          = sizeof (BITMAPINFOHEADER);
@@ -2096,12 +2161,13 @@ static int VPrintView (Draw_Interpretor& di, Standard_Integer argc,
   aBitmapData.bmiHeader.biSizeImage     = 0;
 
   // Create Device Independent Bitmap
+  void* aBitsOut = NULL;
   HBITMAP aMemoryBitmap = CreateDIBSection (anDC, &aBitmapData, DIB_RGB_COLORS,
-                                            &aRawBuffer.dataPtr, NULL, 0);
+                                            &aBitsOut, NULL, 0);
   HGDIOBJ anOldBitmap   = SelectObject(anDC, aMemoryBitmap);
 
   Standard_Boolean isSaved = Standard_False, isPrinted = Standard_False;
-  if (aRawBuffer.dataPtr != 0)
+  if (aBitsOut != NULL)
   {    
     if (aMode == 0)
       isPrinted = aView->Print(anDC,1,1,0,Aspect_PA_STRETCH);
@@ -2111,11 +2177,13 @@ static int VPrintView (Draw_Interpretor& di, Standard_Integer argc,
     // succesfully printed into an intermediate buffer
     if (isPrinted)
     {
-      Handle(Image_PixMap) anImageBitmap =
-                         new Image_PixMap ((Standard_PByte)aRawBuffer.dataPtr,
-                                           aWidth, aHeight,
-                                           aWidth*3 + aWidth%4, 24, 0);
-      isSaved = anImageBitmap->Dump(aFileName.ToCString());
+      Image_PixMap aWrapper;
+      aWrapper.InitWrapper (Image_PixMap::ImgBGR, (Standard_Byte* )aBitsOut, aWidth, aHeight, aWidth * 3 + aWidth % 4);
+      aWrapper.SetTopDown (false);
+
+      Image_AlienPixMap anImageBitmap;
+      anImageBitmap.InitCopy (aWrapper);
+      isSaved = anImageBitmap.Save (aFileName);
     }
     else
     {
@@ -2803,6 +2871,191 @@ static int VMemGpu (Draw_Interpretor& theDI,
   return 0;
 }
 
+// ==============================================================================
+// function : VReadPixel
+// purpose  :
+// ==============================================================================
+static int VReadPixel (Draw_Interpretor& theDI,
+                       Standard_Integer  theArgNb,
+                       const char**      theArgVec)
+{
+  // get the active view
+  Handle(V3d_View) aView = ViewerTest::CurrentView();
+  if (aView.IsNull())
+  {
+    std::cerr << "No active view. Please call vinit.\n";
+    return 1;
+  }
+  else if (theArgNb < 3)
+  {
+    std::cerr << "Usage : " << theArgVec[0] << " xPixel yPixel [{rgb|rgba|depth|hls|rgbf|rgbaf}=rgba] [name]\n";
+    return 1;
+  }
+
+  Image_PixMap::ImgFormat aFormat     = Image_PixMap::IsBigEndianHost() ? Image_PixMap::ImgRGBA : Image_PixMap::ImgBGRA;
+  Graphic3d_BufferType    aBufferType = Graphic3d_BT_RGBA;
+
+  Standard_Integer aWidth, aHeight;
+  aView->Window()->Size (aWidth, aHeight);
+  const Standard_Integer anX = atoi (theArgVec[1]);
+  const Standard_Integer anY = atoi (theArgVec[2]);
+  if (anX < 0 || anX >= aWidth || anY < 0 || anY > aHeight)
+  {
+    std::cerr << "Pixel coordinates (" << anX << "; " << anY << ") are out of view (" << aWidth << " x " << aHeight << ")\n";
+    return 1;
+  }
+
+  Standard_Boolean toShowName = Standard_False;
+  Standard_Boolean toShowHls  = Standard_False;
+  for (Standard_Integer anIter = 3; anIter < theArgNb; ++anIter)
+  {
+    TCollection_AsciiString aParam (theArgVec[anIter]);
+    if (TCollection_AsciiString::ISSIMILAR      (aParam, TCollection_AsciiString ("rgb")))
+    {
+      aFormat     = Image_PixMap::IsBigEndianHost() ? Image_PixMap::ImgRGB : Image_PixMap::ImgBGR;
+      aBufferType = Graphic3d_BT_RGB;
+    }
+    else if (TCollection_AsciiString::ISSIMILAR (aParam, TCollection_AsciiString ("hls")))
+    {
+      aFormat     = Image_PixMap::IsBigEndianHost() ? Image_PixMap::ImgRGB : Image_PixMap::ImgBGR;
+      aBufferType = Graphic3d_BT_RGB;
+      toShowHls   = Standard_True;
+    }
+    else if (TCollection_AsciiString::ISSIMILAR (aParam, TCollection_AsciiString ("rgbf")))
+    {
+      aFormat     = Image_PixMap::ImgRGBF;
+      aBufferType = Graphic3d_BT_RGB;
+    }
+    else if (TCollection_AsciiString::ISSIMILAR (aParam, TCollection_AsciiString ("rgba")))
+    {
+      aFormat     = Image_PixMap::IsBigEndianHost() ? Image_PixMap::ImgRGBA : Image_PixMap::ImgBGRA;
+      aBufferType = Graphic3d_BT_RGBA;
+    }
+    else if (TCollection_AsciiString::ISSIMILAR (aParam, TCollection_AsciiString ("rgbaf")))
+    {
+      aFormat     = Image_PixMap::ImgRGBAF;
+      aBufferType = Graphic3d_BT_RGBA;
+    }
+    else if (TCollection_AsciiString::ISSIMILAR (aParam, TCollection_AsciiString ("depth")))
+    {
+      aFormat     = Image_PixMap::ImgGrayF;
+      aBufferType = Graphic3d_BT_Depth;
+    }
+    else if (TCollection_AsciiString::ISSIMILAR (aParam, TCollection_AsciiString ("name")))
+    {
+      toShowName = Standard_True;
+    }
+  }
+
+  Image_PixMap anImage;
+  if (!anImage.InitTrash (aFormat, aWidth, aHeight))
+  {
+    std::cerr << "Image allocation failed\n";
+    return 1;
+  }
+  else if (!aView->ToPixMap (anImage, aWidth, aHeight, aBufferType))
+  {
+    std::cerr << "Image dump failed\n";
+    return 1;
+  }
+
+  Quantity_Parameter anAlpha;
+  Quantity_Color aColor = anImage.PixelColor (anX, anY, anAlpha);
+  if (toShowName)
+  {
+    if (aBufferType == Graphic3d_BT_RGBA)
+    {
+      theDI << Quantity_Color::StringName (aColor.Name()) << " " << anAlpha << "\n";
+    }
+    else
+    {
+      theDI << Quantity_Color::StringName (aColor.Name()) << "\n";
+    }
+  }
+  else
+  {
+    switch (aBufferType)
+    {
+      default:
+      case Graphic3d_BT_RGB:
+      {
+        if (toShowHls)
+        {
+          theDI << aColor.Hue() << " " << aColor.Light() << " " << aColor.Saturation() << "\n";
+        }
+        else
+        {
+          theDI << aColor.Red() << " " << aColor.Green() << " " << aColor.Blue() << "\n";
+        }
+        break;
+      }
+      case Graphic3d_BT_RGBA:
+      {
+        theDI << aColor.Red() << " " << aColor.Green() << " " << aColor.Blue() << " " << anAlpha << "\n";
+        break;
+      }
+      case Graphic3d_BT_Depth:
+      {
+        theDI << aColor.Red() << "\n";
+        break;
+      }
+    }
+  }
+
+  return 0;
+}
+
+//==============================================================================
+//function : VDiffImage
+//purpose  : The draw-command compares two images.
+//==============================================================================
+
+static int VDiffImage (Draw_Interpretor& theDI, Standard_Integer theArgNb, const char** theArgVec)
+{
+  if (theArgNb < 6)
+  {
+    theDI << "Not enough arguments.\n";
+    return 1;
+  }
+
+  // image file names
+  const char* anImgPathRef = theArgVec[1];
+  const char* anImgPathNew = theArgVec[2];
+
+  // get string tolerance and check its validity
+  Standard_Real aTolColor = atof (theArgVec[3]);
+  if (aTolColor < 0.0)
+    aTolColor = 0.0;
+  if (aTolColor > 1.0)
+    aTolColor = 1.0;
+
+  Standard_Boolean toBlackWhite     = (atoi (theArgVec[4]) == 1);
+  Standard_Boolean isBorderFilterOn = (atoi (theArgVec[5]) == 1);
+
+  // image file of difference
+  const char* aDiffImagePath = (theArgNb >= 7) ? theArgVec[6] : NULL;
+
+  // compare the images
+  Image_Diff aComparer;
+  if (!aComparer.Init (anImgPathRef, anImgPathNew, toBlackWhite))
+  {
+    return 1;
+  }
+
+  aComparer.SetColorTolerance (aTolColor);
+  aComparer.SetBorderFilterOn (isBorderFilterOn);
+  Standard_Integer aDiffColorsNb = aComparer.Compare();
+  theDI << aDiffColorsNb << "\n";
+
+  // save image of difference
+  if (aDiffImagePath != NULL)
+  {
+    aComparer.SaveDiffImage (aDiffImagePath);
+  }
+
+  return 0;
+}
+
 //=======================================================================
 //function : ViewerCommands
 //purpose  :
@@ -2819,11 +3072,26 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands)
     "vhelp            : display help on the viewer commands",
     __FILE__,VHelp,group);
   theCommands.Add("vtop" ,
-    "vtop or <T>         : Top view" ,
+    "vtop or <T>      : Top view" ,
     __FILE__,VTop,group);
+  theCommands.Add("vbottom" ,
+    "vbottom          : Bottom view" ,
+    __FILE__,VBottom,group);
+  theCommands.Add("vleft" ,
+    "vleft            : Left view" ,
+    __FILE__,VLeft,group);
+  theCommands.Add("vright" ,
+    "vright           : Right view" ,
+    __FILE__,VRight,group);
   theCommands.Add("vaxo" ,
     " vaxo or <A>     : Axonometric view ",
     __FILE__,VAxo,group);
+  theCommands.Add("vfront" ,
+    "vfront           : Front view" ,
+    __FILE__,VFront,group);
+  theCommands.Add("vback" ,
+    "vback            : Back view" ,
+    __FILE__,VBack,group);
   theCommands.Add("vpick" ,
     "vpick           : vpick X Y Z [shape subshape] ( all variables as string )",
     VPick,group);
@@ -2914,4 +3182,11 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands)
     "vmemgpu [f]: print system-dependent GPU memory information if available;"
     " with f option returns free memory in bytes",
     __FILE__, VMemGpu, group);
+  theCommands.Add ("vreadpixel",
+    "vreadpixel xPixel yPixel [{rgb|rgba|depth|hls|rgbf|rgbaf}=rgba] [name]"
+    " : Read pixel value for active view",
+    __FILE__, VReadPixel, group);
+  theCommands.Add("diffimage",
+    "diffimage     : diffimage imageFile1 imageFile2 toleranceOfColor(0..1) blackWhite(1|0) borderFilter(1|0) [diffImageFile]",
+    __FILE__, VDiffImage, group);
 }
diff --git a/src/Visual3d/Visual3d.cdl b/src/Visual3d/Visual3d.cdl
index 2080f56..21755f2 100644
--- a/src/Visual3d/Visual3d.cdl
+++ b/src/Visual3d/Visual3d.cdl
@@ -59,7 +59,8 @@ uses
     MMgt,
     Xw,
     WNT,
-    OSD
+    OSD,
+    Font
 
 is
 
diff --git a/src/Visual3d/Visual3d_Layer.cdl b/src/Visual3d/Visual3d_Layer.cdl
index 2ecb2c6..a6d6c09 100644
--- a/src/Visual3d/Visual3d_Layer.cdl
+++ b/src/Visual3d/Visual3d_Layer.cdl
@@ -47,7 +47,7 @@ uses
     LayerItem               from Visual3d,
     NListOfLayerItem        from Visual3d,
     
-        FontAspect          from OSD
+        FontAspect          from Font
 raises
     LayerDefinitionError    from Visual3d
 
diff --git a/src/Visual3d/Visual3d_Light.cxx b/src/Visual3d/Visual3d_Light.cxx
index c2f4b04..549ceaa 100644
--- a/src/Visual3d/Visual3d_Light.cxx
+++ b/src/Visual3d/Visual3d_Light.cxx
@@ -140,11 +140,11 @@ MyType (Visual3d_TOLS_POSITIONAL) {
 		Visual3d_LightDefinitionError::Raise
 			("Bad value for LightAttenuation");
 
-	if ( (Fact1 < 0.0) && (Fact1 > 1.0) )
+	if ( (Fact1 < 0.0) || (Fact1 > 1.0) )
 		Visual3d_LightDefinitionError::Raise
 			("Bad value for LightAttenuation");
 
-	if ( (Fact2 < 0.0) && (Fact2 > 1.0) )
+	if ( (Fact2 < 0.0) || (Fact2 > 1.0) )
 		Visual3d_LightDefinitionError::Raise
 			("Bad value for LightAttenuation");
 
@@ -186,11 +186,11 @@ MyType (Visual3d_TOLS_SPOT) {
 		Visual3d_LightDefinitionError::Raise
 			("Bad value for LightAttenuation");
 
-	if ( (Fact1 < 0.0) && (Fact1 > 1.0) )
+	if ( (Fact1 < 0.0) || (Fact1 > 1.0) )
 		Visual3d_LightDefinitionError::Raise
 			("Bad value for LightAttenuation");
 
-	if ( (Fact2 < 0.0) && (Fact2 > 1.0) )
+	if ( (Fact2 < 0.0) || (Fact2 > 1.0) )
 		Visual3d_LightDefinitionError::Raise
 			("Bad value for LightAttenuation");
 
@@ -378,7 +378,7 @@ void Visual3d_Light::SetAngle (const Standard_Real AngleCone) {
 
 void Visual3d_Light::SetAttenuation1 (const Standard_Real Fact1) {
 
-	if ( (Fact1 < 0.0) && (Fact1 > 1.0) )
+	if ( (Fact1 < 0.0) || (Fact1 > 1.0) )
 		Visual3d_LightDefinitionError::Raise
 			("Bad value for LightAttenuation");
 
@@ -399,7 +399,7 @@ void Visual3d_Light::SetAttenuation1 (const Standard_Real Fact1) {
 
 void Visual3d_Light::SetAttenuation2 (const Standard_Real Fact2) {
 
-	if ( (Fact2 < 0.0) && (Fact2 > 1.0) )
+	if ( (Fact2 < 0.0) || (Fact2 > 1.0) )
 		Visual3d_LightDefinitionError::Raise
 			("Bad value for LightAttenuation");
 
diff --git a/src/Visual3d/Visual3d_View.cdl b/src/Visual3d/Visual3d_View.cdl
index 0f6b6cb..9c2a468 100644
--- a/src/Visual3d/Visual3d_View.cdl
+++ b/src/Visual3d/Visual3d_View.cdl
@@ -87,8 +87,7 @@ uses
     ColorScale              from Aspect,
     PrintAlgo               from Aspect,
 
-    CRawBufferData          from Image,
-
+    BufferType              from Graphic3d,
     CBitFields8             from Graphic3d,
     CView                   from Graphic3d,
     GraphicDriver           from Graphic3d,
@@ -118,10 +117,12 @@ uses
     ExportFormat            from Graphic3d,
     SortType                from Graphic3d,
     Color                   from Quantity,
-    FontAspect              from OSD,
+    FontAspect              from Font,
     AsciiString             from TCollection,
     ExtendedString          from TCollection,
-    CGraduatedTrihedron     from Graphic3d
+    CGraduatedTrihedron     from Graphic3d,
+
+    PixMap                  from Image
 
 raises
     TransformError          from Visual3d,
@@ -634,13 +635,13 @@ is
                           -- Name of font for names of axes --
                           fontOfNames : out AsciiString from TCollection;
                           -- Style of names of axes --
-                          styleOfNames : out FontAspect from OSD;
+                          styleOfNames : out FontAspect from Font;
                           -- Size of names of axes --
                           sizeOfNames : out Integer from Standard;
                           -- Name of font for values --
                           fontOfValues : out AsciiString from TCollection;
                           -- Style of values --
-                          styleOfValues : out FontAspect from OSD;
+                          styleOfValues : out FontAspect from Font;
                           -- Size of values --
                           sizeOfValues : out Integer from Standard)
     returns Boolean from Standard
@@ -677,13 +678,13 @@ is
                               -- Name of font for names of axes --
                               fontOfNames : AsciiString from TCollection;
                               -- Style of names of axes --
-                              styleOfNames : FontAspect from OSD;
+                              styleOfNames : FontAspect from Font;
                               -- Size of names of axes --
                               sizeOfNames : Integer from Standard;
                               -- Name of font for values --
                               fontOfValues : AsciiString from TCollection;
                               -- Style of values --
-                              styleOfValues : FontAspect from OSD;
+                              styleOfValues : FontAspect from Font;
                               -- Size of values --
                               sizeOfValues : Integer from Standard)
     ---Purpose: Displays a graduated trihedron.
@@ -1238,7 +1239,8 @@ is
         ---Purpose: Change offscreen FBO viewport.
 
         BufferDump( me            : mutable;
-                    buffer        : in out CRawBufferData from Image )
+                    theImage      : in out PixMap from Image;
+                    theBufferType : BufferType from Graphic3d )
                    returns Boolean from Standard
         is static;
         ---Level: Public
diff --git a/src/Visual3d/Visual3d_View.cxx b/src/Visual3d/Visual3d_View.cxx
index 8e13c48..195b23e 100644
--- a/src/Visual3d/Visual3d_View.cxx
+++ b/src/Visual3d/Visual3d_View.cxx
@@ -1257,7 +1257,7 @@ Standard_Boolean CustomIsModified = Standard_False;
         VUPIsModified =
             MyCView.Orientation.ViewReferencePoint.x != float (X)
          || MyCView.Orientation.ViewReferencePoint.y != float (Y)
-         || MyCView.Orientation.ViewReferencePoint.y != float (Y);
+         || MyCView.Orientation.ViewReferencePoint.z != float (Z);
         MyCView.Orientation.ViewReferencePoint.x        = float (X);
         MyCView.Orientation.ViewReferencePoint.y        = float (Y);
         MyCView.Orientation.ViewReferencePoint.z        = float (Z);
@@ -1266,7 +1266,7 @@ Standard_Boolean CustomIsModified = Standard_False;
         VRPIsModified =
             MyCView.Orientation.ViewReferencePlane.x != float (X)
          || MyCView.Orientation.ViewReferencePlane.y != float (Y)
-         || MyCView.Orientation.ViewReferencePlane.y != float (Y);
+         || MyCView.Orientation.ViewReferencePlane.z != float (Z);
         MyCView.Orientation.ViewReferencePlane.x        = float (X);
         MyCView.Orientation.ViewReferencePlane.y        = float (Y);
         MyCView.Orientation.ViewReferencePlane.z        = float (Z);
@@ -1275,7 +1275,7 @@ Standard_Boolean CustomIsModified = Standard_False;
         VRUIsModified =
             MyCView.Orientation.ViewReferenceUp.x != float (X)
          || MyCView.Orientation.ViewReferenceUp.y != float (Y)
-         || MyCView.Orientation.ViewReferenceUp.y != float (Y);
+         || MyCView.Orientation.ViewReferenceUp.z != float (Z);
         MyCView.Orientation.ViewReferenceUp.x           = float (X);
         MyCView.Orientation.ViewReferenceUp.y           = float (Y);
         MyCView.Orientation.ViewReferenceUp.z           = float (Z);
@@ -3722,13 +3722,13 @@ Standard_Boolean Visual3d_View::GetGraduatedTrihedron
      /* Name of font for names of axes */
      TCollection_AsciiString& fontOfNames,
      /* Style of names of axes */
-     OSD_FontAspect& styleOfNames,
+     Font_FontAspect& styleOfNames,
      /* Size of names of axes */
      Standard_Integer& sizeOfNames,
      /* Name of font for values */
      TCollection_AsciiString& fontOfValues,
      /* Style of values */
-     OSD_FontAspect& styleOfValues,
+     Font_FontAspect& styleOfValues,
      /* Size of values */
      Standard_Integer& sizeOfValues) const
 {
@@ -3847,13 +3847,13 @@ void Visual3d_View::GraduatedTrihedronDisplay
      /* Name of font for names of axes */
      const TCollection_AsciiString &fontOfNames,
      /* Style of names of axes */
-     const OSD_FontAspect styleOfNames,
+     const Font_FontAspect styleOfNames,
      /* Size of names of axes */
      const Standard_Integer sizeOfNames,
      /* Name of font for values */
      const TCollection_AsciiString &fontOfValues,
      /* Style of values */
-     const OSD_FontAspect styleOfValues,
+     const Font_FontAspect styleOfValues,
      /* Size of values */
      const Standard_Integer sizeOfValues)
 {
@@ -4265,9 +4265,10 @@ void Visual3d_View::FBOChangeViewport(Graphic3d_PtrFrameBuffer& theFBOPtr,
                                      theWidth, theHeight );
 }
 
-Standard_Boolean Visual3d_View::BufferDump (Image_CRawBufferData& theBuffer)
+Standard_Boolean Visual3d_View::BufferDump (Image_PixMap&               theImage,
+                                            const Graphic3d_BufferType& theBufferType)
 {
-  return MyGraphicDriver->BufferDump( MyCView, theBuffer);
+  return MyGraphicDriver->BufferDump (MyCView, theImage, theBufferType);
 }
 
 void Visual3d_View::EnableGLLight( const Standard_Boolean enable ) const
diff --git a/src/Visual3d/Visual3d_ViewManager.cxx b/src/Visual3d/Visual3d_ViewManager.cxx
index 5b0ba09..90ccd31 100644
--- a/src/Visual3d/Visual3d_ViewManager.cxx
+++ b/src/Visual3d/Visual3d_ViewManager.cxx
@@ -137,9 +137,15 @@ void Visual3d_ViewManager::Remove () {
 	cout << "The Manager " << MyId << " have " << Length << " defined views\n";
 	cout << flush;
 #endif
- 
-	MyDefinedView.Clear ();
 
+  // clear all structures whilst views are alive for correct GPU memory management
+  MyDisplayedStructure.Clear();
+  MyHighlightedStructure.Clear();
+  MyVisibleStructure.Clear();
+  MyPickStructure.Clear();
+
+  // clear list of managed views
+  MyDefinedView.Clear();
 }
 
 void Visual3d_ViewManager::ChangeDisplayPriority (const Handle(Graphic3d_Structure)& AStructure, const Standard_Integer OldPriority, const Standard_Integer NewPriority) {
diff --git a/src/Voxel/Voxel_Writer.cxx b/src/Voxel/Voxel_Writer.cxx
index fdc820c..c7c4cb8 100644
--- a/src/Voxel/Voxel_Writer.cxx
+++ b/src/Voxel/Voxel_Writer.cxx
@@ -420,7 +420,7 @@ Standard_Boolean Voxel_Writer::WriteFloatBinaryVoxels(const TCollection_Extended
   if (nb_slices)
   {
     Standard_Integer i1 = 0, i2 = 0;
-    Standard_Real small = Precision::Confusion() * Precision::Confusion();
+    Standard_Real small = Precision::SquareConfusion();
     for (i1 = 0; i1 < nb_slices; i1++)
     {
       if (((Standard_ShortReal**)ds->myData)[i1])
diff --git a/src/VoxelClient/FILES b/src/VoxelClient/FILES
deleted file mode 100644
index 4ad113e..0000000
--- a/src/VoxelClient/FILES
+++ /dev/null
@@ -1,2 +0,0 @@
-VoxelClient_VisDrawer.h
-VoxelClient_VisDrawer.cxx
diff --git a/src/VoxelClient/VoxelClient_VisDrawer.cxx b/src/VoxelClient/VoxelClient_VisDrawer.cxx
deleted file mode 100644
index e75fbc7..0000000
--- a/src/VoxelClient/VoxelClient_VisDrawer.cxx
+++ /dev/null
@@ -1,3373 +0,0 @@
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-#include "VoxelClient_VisDrawer.h"
-
-#include <ElSLib.hxx>
-#include <gp_Dir.hxx>
-#include <Geom_Plane.hxx>
-#include <gce_MakePln.hxx>
-#include <Quantity_Color.hxx>
-#include <Aspect_TypeOfLine.hxx>
-#include <Graphic3d_CUserDraw.hxx>
-
-#include <InterfaceGraphic_telem.hxx>
-#include <OpenGl_Element.hxx>
-#include <OpenGl_Callback.hxx>
-#include <OpenGl_NamedStatus.hxx>
-
-#include <GL/gl.h>
-#include <GL/glu.h>
-
-/**************************************************************************/
-
-class VoxelClient_VisDrawer::VisElement : public OpenGl_Element
-{
-public:
-
-  VisElement (Voxel_VisData*);
-  virtual ~VisElement();
-
-  void EvaluateBounds (Graphic3d_CBounds& theMinMax);
-
-  void Render (const Handle(OpenGl_Workspace) &theWorkspace) const;
-
-private:
-
-  VoxelClient_VisDrawer* myHandler;
-
-public:
-
-  DEFINE_STANDARD_ALLOC
-
-};
-
-//=======================================================================
-//function : VisElement
-//purpose  : Constructor
-//=======================================================================
-
-VoxelClient_VisDrawer::VisElement::VisElement (Voxel_VisData* theData)
-{
-  myHandler = new VoxelClient_VisDrawer (theData);
-}
-
-//=======================================================================
-//function : ~VisElement
-//purpose  : Destructor
-//=======================================================================
-
-VoxelClient_VisDrawer::VisElement::~VisElement ()
-{
-  delete myHandler;
-}
-
-//=======================================================================
-//function : EvaluateBounds
-//purpose  :
-//=======================================================================
-
-void VoxelClient_VisDrawer::VisElement::EvaluateBounds
-  (Graphic3d_CBounds& theMinMax)
-{
-  myHandler->EvalMinMax (theMinMax);
-}
-
-//=======================================================================
-//function : Render
-//purpose  : display element
-//=======================================================================
-
-void VoxelClient_VisDrawer::VisElement::Render
-  (const Handle (OpenGl_Workspace) &theWorkspace) const
-{
-  const Standard_Boolean aHl = (theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT);
-  myHandler->Display (aHl);
-}
-
-//=======================================================================
-//function : VisDrawerCallBack
-//purpose  : visdrawer element create callback, adds an element to graphic
-//           driver's structure
-//=======================================================================
-
-static OpenGl_Element* VisDrawerCallBack (const Graphic3d_CUserDraw* theUserDraw)
-{
-  if (theUserDraw == 0)
-    return 0;
-
-  // Retrieve the user structure
-  Voxel_VisData* aUserData = (Voxel_VisData*) (theUserDraw->Data);
-
-  if (aUserData == 0)
-    return 0;
-
-  VoxelClient_VisDrawer::VisElement *aElem = 
-    new VoxelClient_VisDrawer::VisElement (aUserData);
-
-  if (theUserDraw->Bounds != 0)
-    aElem->EvaluateBounds (*(theUserDraw->Bounds));
-
-  return aElem;
-}
-
-/**************************************************************************/
-void VoxelClient_VisDrawer::Init()
-{
-    static Standard_Boolean isInitializeded(Standard_False);
-
-    if (!isInitializeded)
-    {
-        isInitializeded = Standard_True;
-
-        OpenGl_UserDrawCallback& aCallback = UserDrawCallback ();
-        aCallback = VisDrawerCallBack;
-    }
-}
-
-/**************************************************************************/
-VoxelClient_VisDrawer::VoxelClient_VisDrawer(Voxel_VisData * theData):myData(theData)
-{
-
-}
-
-/**************************************************************************/
-VoxelClient_VisDrawer::~VoxelClient_VisDrawer()
-{
-    if (myData)
-    {
-        // Because a pointer to the data is copied, 
-        // it is possible to make an attempt to delete GL lists for
-        // a structure, which is already deleted.
-        // Such a situation may happen on close of the application.
-        // Therefore, this try / catch is used.
-
-        try
-        {
-            Standard_Integer idir;
-
-            // Points
-
-            // BoolDS
-            if (myData->myDisplay.myBoolPointsList > 0)
-            {
-                glDeleteLists(myData->myDisplay.myBoolPointsList, 1);
-                myData->myDisplay.myBoolPointsList = -1;
-            }
-            for (idir = Xminus; idir <= Zplus; idir++)
-            {
-                if (myData->myDisplay.myBoolNearestPointsList[idir] > 0)
-                {
-                    glDeleteLists(myData->myDisplay.myBoolNearestPointsList[idir], 1);
-                    myData->myDisplay.myBoolNearestPointsList[idir] = -1;
-                }
-            }
-
-            // ColorDS
-            if (myData->myDisplay.myColorPointsList > 0)
-            {
-                glDeleteLists(myData->myDisplay.myColorPointsList, 1);
-                myData->myDisplay.myColorPointsList = -1;
-            }
-            for (idir = Xminus; idir <= Zplus; idir++)
-            {
-                if (myData->myDisplay.myColorNearestPointsList[idir] > 0)
-                {
-                    glDeleteLists(myData->myDisplay.myColorNearestPointsList[idir], 1);
-                    myData->myDisplay.myColorNearestPointsList[idir] = -1;
-                }
-            }
-
-            // ROctBoolDS
-            if (myData->myDisplay.myROctBoolPointsList > 0)
-            {
-                glDeleteLists(myData->myDisplay.myROctBoolPointsList, 1);
-                myData->myDisplay.myROctBoolPointsList = -1;
-            }
-            for (idir = Xminus; idir <= Zplus; idir++)
-            {
-                if (myData->myDisplay.myROctBoolNearestPointsList[idir] > 0)
-                {
-                    glDeleteLists(myData->myDisplay.myROctBoolNearestPointsList[idir], 1);
-                    myData->myDisplay.myROctBoolNearestPointsList[idir] = -1;
-                }
-            }
-
-            // Triangulation
-            if (myData->myDisplay.myTriangulationList > 0)
-            {
-                glDeleteLists(myData->myDisplay.myTriangulationList, 1);
-                myData->myDisplay.myTriangulationList = -1;
-            }
-        }
-        catch (...)
-        {
-
-        }
-    }
-}
-
-/**************************************************************************/
-void VoxelClient_VisDrawer::EvalMinMax(Graphic3d_CBounds & theMinMax) const 
-{
-    theMinMax.XMin = FLT_MAX;
-    theMinMax.YMin = FLT_MAX;
-    theMinMax.ZMin = FLT_MAX;
-    theMinMax.XMax = -FLT_MAX;
-    theMinMax.YMax = -FLT_MAX;
-    theMinMax.ZMax = -FLT_MAX;
-    if(!myData)
-        return;
-    if(myData->myBoolVoxels)
-    {
-        if (theMinMax.XMin > myData->myBoolVoxels->GetX())
-	        theMinMax.XMin = myData->myBoolVoxels->GetX();
-        if (theMinMax.XMax < myData->myBoolVoxels->GetX() + myData->myBoolVoxels->GetXLen())
-	        theMinMax.XMax = myData->myBoolVoxels->GetX() + myData->myBoolVoxels->GetXLen();
-        if (theMinMax.YMin > myData->myBoolVoxels->GetY())
-	        theMinMax.YMin = myData->myBoolVoxels->GetY();
-        if (theMinMax.YMax < myData->myBoolVoxels->GetY() + myData->myBoolVoxels->GetYLen())
-	        theMinMax.YMax = myData->myBoolVoxels->GetY() + myData->myBoolVoxels->GetYLen();
-        if (theMinMax.ZMin > myData->myBoolVoxels->GetZ())
-	        theMinMax.ZMin = myData->myBoolVoxels->GetZ();
-        if (theMinMax.ZMax < myData->myBoolVoxels->GetZ() + myData->myBoolVoxels->GetZLen())
-	        theMinMax.ZMax = myData->myBoolVoxels->GetZ() + myData->myBoolVoxels->GetZLen();
-    }
-    if(myData->myColorVoxels)
-    {
-        if (theMinMax.XMin > myData->myColorVoxels->GetX())
-	        theMinMax.XMin = myData->myColorVoxels->GetX();
-        if (theMinMax.XMax < myData->myColorVoxels->GetX() + myData->myColorVoxels->GetXLen())
-	        theMinMax.XMax = myData->myColorVoxels->GetX() + myData->myColorVoxels->GetXLen();
-        if (theMinMax.YMin > myData->myColorVoxels->GetY())
-	        theMinMax.YMin = myData->myColorVoxels->GetY();
-        if (theMinMax.YMax < myData->myColorVoxels->GetY() + myData->myColorVoxels->GetYLen())
-	        theMinMax.YMax = myData->myColorVoxels->GetY() + myData->myColorVoxels->GetYLen();
-        if (theMinMax.ZMin > myData->myColorVoxels->GetZ())
-	        theMinMax.ZMin = myData->myColorVoxels->GetZ();
-        if (theMinMax.ZMax < myData->myColorVoxels->GetZ() + myData->myColorVoxels->GetZLen())
-	        theMinMax.ZMax = myData->myColorVoxels->GetZ() + myData->myColorVoxels->GetZLen();
-    }
-    if(myData->myROctBoolVoxels)
-    {
-        if (theMinMax.XMin > myData->myROctBoolVoxels->GetX())
-	        theMinMax.XMin = myData->myROctBoolVoxels->GetX();
-        if (theMinMax.XMax < myData->myROctBoolVoxels->GetX() + myData->myROctBoolVoxels->GetXLen())
-	        theMinMax.XMax = myData->myROctBoolVoxels->GetX() + myData->myROctBoolVoxels->GetXLen();
-        if (theMinMax.YMin > myData->myROctBoolVoxels->GetY())
-	        theMinMax.YMin = myData->myROctBoolVoxels->GetY();
-        if (theMinMax.YMax < myData->myROctBoolVoxels->GetY() + myData->myROctBoolVoxels->GetYLen())
-	        theMinMax.YMax = myData->myROctBoolVoxels->GetY() + myData->myROctBoolVoxels->GetYLen();
-        if (theMinMax.ZMin > myData->myROctBoolVoxels->GetZ())
-	        theMinMax.ZMin = myData->myROctBoolVoxels->GetZ();
-        if (theMinMax.ZMax < myData->myROctBoolVoxels->GetZ() + myData->myROctBoolVoxels->GetZLen())
-	        theMinMax.ZMax = myData->myROctBoolVoxels->GetZ() + myData->myROctBoolVoxels->GetZLen();
-    }
-    if (!myData->myTriangulation.IsNull())
-    {
-        Standard_Real x, y, z;
-        const TColgp_Array1OfPnt& nodes = myData->myTriangulation->Nodes();
-        Standard_Integer inode = nodes.Lower(), nb_nodes = nodes.Upper();
-        for (; inode <= nb_nodes; inode++)
-        {
-            nodes.Value(inode).Coord(x, y, z);
-            if (theMinMax.XMin > x)
-	            theMinMax.XMin = x;
-            if (theMinMax.XMax < x)
-	            theMinMax.XMax = x;
-            if (theMinMax.YMin > y)
-	            theMinMax.YMin = y;
-            if (theMinMax.YMax < y)
-	            theMinMax.YMax = y;
-            if (theMinMax.ZMin > z)
-	            theMinMax.ZMin = z;
-            if (theMinMax.ZMax < z)
-	            theMinMax.ZMax = z;
-        }
-    }
-}
-
-/**************************************************************************/
-void VoxelClient_VisDrawer::Display(const Standard_Boolean theHighlight)
-{
-    if (!myData)
-        return;
-    if (myData->myBoolVoxels)
-        DisplayVoxels(theHighlight);
-    if (myData->myColorVoxels)
-        DisplayVoxels(theHighlight);
-    if (myData->myROctBoolVoxels)
-        DisplayVoxels(theHighlight);
-    if (!myData->myTriangulation.IsNull())
-        DisplayTriangulation(theHighlight);
-}
-
-// Some static method to define Open GL visual attributes
-// COlor
-static void setColor(const Quantity_Color& color, const Standard_Boolean highlight)
-{
-    static Quantity_Color highlight_color(Quantity_NOC_BLUE1);
-		if(highlight)
-        glColor3f(highlight_color.Red(), highlight_color.Green(), highlight_color.Blue());
-    else
-        glColor3d(color.Red(), color.Green(), color.Blue());
-}
-
-// Type of Line
-static void setTypeOfLine(const Aspect_TypeOfLine type)
-{
-    if(type == Aspect_TOL_SOLID)
-    {
-        glDisable(GL_LINE_STIPPLE);
-    }
-    else
-    {
-        glEnable(GL_LINE_STIPPLE);
-        if(type == Aspect_TOL_DOT)
-            glLineStipple(1, 0xCCCC);
-        else if(type == Aspect_TOL_DASH)
-            glLineStipple(1, 0xFFC0);
-        else if(type == Aspect_TOL_DOTDASH)
-            glLineStipple(1, 0xFF18);
-    }
-}
-
-// Width of Line
-static void setWidthOfLine(const Standard_Integer width)
-{
-    glLineWidth((Standard_ShortReal) width);
-}
-
-// Normal of the view
-static void getNormal(gp_Dir& normal) 
-{
-	Standard_Real x, y, z;
-	GLint viewport[4];
-	GLdouble model_matrix[16], proj_matrix[16];
-
-	glGetDoublev(GL_MODELVIEW_MATRIX,  model_matrix);
-	glGetDoublev(GL_PROJECTION_MATRIX, proj_matrix);
-	glGetIntegerv(GL_VIEWPORT, viewport);
-
-	gluUnProject(viewport[0], viewport[1], 0., model_matrix, proj_matrix, viewport, &x, &y, &z);
-	gp_Pnt p1(x, y, z);
-	gluUnProject(viewport[0] + viewport[2], viewport[1], 0., model_matrix, proj_matrix, viewport, &x, &y, &z);
-	gp_Pnt p2(x, y, z);
-	gluUnProject(viewport[0], viewport[1] + viewport[3], 0., model_matrix, proj_matrix, viewport, &x, &y, &z);
-	gp_Pnt p3(x, y, z);
-
-	gce_MakePln mkNormal(p1, p2, p3);
-	if (mkNormal.IsDone()) 
-	{
-		const gp_Pln& normal_plane = mkNormal.Value();
-		normal = normal_plane.Axis().Direction();
-	}
-	else
-	{
-		normal = gp::DZ();
-	}
-}
-
-// Normal 2 VoxelDirection converter
-static VoxelDirection getVoxelDirection(const gp_Dir& viewnormal)
-{
-    VoxelDirection vdir;
-	Standard_Real fabsviewnormalx = fabs(viewnormal.X());
-	Standard_Real fabsviewnormaly = fabs(viewnormal.Y());
-	Standard_Real fabsviewnormalz = fabs(viewnormal.Z());
-	if (fabsviewnormalx >= fabsviewnormaly &&
-		fabsviewnormalx >= fabsviewnormalz)
-	{
-		if (viewnormal.X() > 0)
-			vdir = Xminus;
-		else
-			vdir = Xplus;
-	}
-	else if (fabsviewnormaly >= fabsviewnormalx &&
-			 fabsviewnormaly >= fabsviewnormalz)
-	{
-		if (viewnormal.Y() > 0)
-			vdir = Yminus;
-		else
-			vdir = Yplus;
-	}
-	else if (fabsviewnormalz >= fabsviewnormalx &&
-			 fabsviewnormalz >= fabsviewnormaly)
-	{
-		if (viewnormal.Z() > 0)
-			vdir = Zminus;
-		else
-			vdir = Zplus;
-	}
-    return vdir;
-}
-
-// Normal 2 VoxelDirection 3 converter
-static void getVoxel3Directions(const gp_Dir& viewnormal,
-                                VoxelDirection& vdir1,
-                                VoxelDirection& vdir2,
-                                VoxelDirection& vdir3)
-{
-    Standard_Boolean vdir1_set = Standard_False, vdir2_set = Standard_False, vdir3_set = Standard_False;
-
-    // Test X minus
-    Standard_Real dot = viewnormal.Dot(-gp::DX());
-    if (dot >= 0.0)
-    {
-        if (!vdir1_set)
-        {
-            vdir1 = Xminus;
-            vdir1_set = Standard_True;
-        }
-        else if (!vdir2_set)
-        {
-            vdir2 = Xminus;
-            vdir2_set = Standard_True;
-        }
-        else if (!vdir3_set)
-        {
-            vdir3 = Xminus;
-            vdir3_set = Standard_True;
-        }
-    }
-
-    // Test X plus
-    dot = viewnormal.Dot(gp::DX());
-    if (dot >= 0.0)
-    {
-        if (!vdir1_set)
-        {
-            vdir1 = Xplus;
-            vdir1_set = Standard_True;
-        }
-        else if (!vdir2_set)
-        {
-            vdir2 = Xplus;
-            vdir2_set = Standard_True;
-        }
-        else if (!vdir3_set)
-        {
-            vdir3 = Xplus;
-            vdir3_set = Standard_True;
-        }
-    }
-
-    // Test Y minus
-    dot = viewnormal.Dot(-gp::DY());
-    if (dot >= 0.0)
-    {
-        if (!vdir1_set)
-        {
-            vdir1 = Yminus;
-            vdir1_set = Standard_True;
-        }
-        else if (!vdir2_set)
-        {
-            vdir2 = Yminus;
-            vdir2_set = Standard_True;
-        }
-        else if (!vdir3_set)
-        {
-            vdir3 = Yminus;
-            vdir3_set = Standard_True;
-        }
-    }
-
-    // Test Y plus
-    dot = viewnormal.Dot(gp::DY());
-    if (dot >= 0.0)
-    {
-        if (!vdir1_set)
-        {
-            vdir1 = Yplus;
-            vdir1_set = Standard_True;
-        }
-        else if (!vdir2_set)
-        {
-            vdir2 = Yplus;
-            vdir2_set = Standard_True;
-        }
-        else if (!vdir3_set)
-        {
-            vdir3 = Yplus;
-            vdir3_set = Standard_True;
-        }
-    }
-
-    // Test Z minus
-    dot = viewnormal.Dot(-gp::DZ());
-    if (dot >= 0.0)
-    {
-        if (!vdir1_set)
-        {
-            vdir1 = Zminus;
-            vdir1_set = Standard_True;
-        }
-        else if (!vdir2_set)
-        {
-            vdir2 = Zminus;
-            vdir2_set = Standard_True;
-        }
-        else if (!vdir3_set)
-        {
-            vdir3 = Zminus;
-            vdir3_set = Standard_True;
-        }
-    }
-
-    // Test Y plus
-    dot = viewnormal.Dot(gp::DZ());
-    if (dot >= 0.0)
-    {
-        if (!vdir1_set)
-        {
-            vdir1 = Zplus;
-            vdir1_set = Standard_True;
-        }
-        else if (!vdir2_set)
-        {
-            vdir2 = Zplus;
-            vdir2_set = Standard_True;
-        }
-        else if (!vdir3_set)
-        {
-            vdir3 = Zplus;
-            vdir3_set = Standard_True;
-        }
-    }
-}
-
-static Standard_Boolean CheckSize(Voxel_DS* voxels, 
-                      const Standard_Integer ix, const Standard_Integer iy, const Standard_Integer iz, 
-                      const Standard_Real xmin, const Standard_Real xmax,
-                      const Standard_Real ymin, const Standard_Real ymax,
-                      const Standard_Real zmin, const Standard_Real zmax,
-                      Standard_Real& xc, Standard_Real& yc, Standard_Real& zc)
-{
-    voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-    if (xc < xmin || xc > xmax)
-        return Standard_False;
-    if (yc < ymin || yc > ymax)
-        return Standard_False;
-    if (zc < zmin || zc > zmax)
-        return Standard_False;
-    return Standard_True;
-}
-
-static Standard_Boolean CheckSize(Voxel_ROctBoolDS* voxels, 
-                      const Standard_Integer ix, const Standard_Integer iy, const Standard_Integer iz, 
-                      const Standard_Integer i, const Standard_Integer j,
-                      const Standard_Real xmin, const Standard_Real xmax,
-                      const Standard_Real ymin, const Standard_Real ymax,
-                      const Standard_Real zmin, const Standard_Real zmax,
-                      Standard_Real& xc, Standard_Real& yc, Standard_Real& zc)
-{
-    if (j == -1)
-        voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-    else
-        voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-    if (xc < xmin || xc > xmax)
-        return Standard_False;
-    if (yc < ymin || yc > ymax)
-        return Standard_False;
-    if (zc < zmin || zc > zmax)
-        return Standard_False;
-    return Standard_True;
-}
-
-static void drawBoolPoints(const VoxelDirection vdir, const Standard_Boolean nearest,
-                           Voxel_BoolDS* voxels,
-                           const Standard_Real xmin, const Standard_Real xmax,
-                           const Standard_Real ymin, const Standard_Real ymax,
-                           const Standard_Real zmin, const Standard_Real zmax)
-{
-	Standard_Real xc, yc, zc;
-	Standard_Integer ix = 0, nbx = voxels->GetNbX();
-	Standard_Integer iy = 0, nby = voxels->GetNbY();
-	Standard_Integer iz = 0, nbz = voxels->GetNbZ();
-
-    Standard_Boolean check_size = (xmin <= DBL_MAX && xmax >= DBL_MAX &&
-                       ymin <= DBL_MAX && ymax >= DBL_MAX &&
-                       zmin <= DBL_MAX && zmax >= DBL_MAX);
-    check_size = !check_size;
-
-    glBegin(GL_POINTS);
-    switch (vdir)
-	{
-		case Xminus:
-		{
-			for (iy = 0; iy < nby; iy++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (ix = 0; ix < nbx; ix++)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-						Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-						if (value)
-						{
-                            if (!check_size)
-							    voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-							glVertex3d(xc, yc, zc);
-                            if (nearest)
-                                break;
-						}
-					}
-				}
-			}
-			break;
-		}
-		case Xplus:
-		{
-			for (iy = 0; iy < nby; iy++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (ix = nbx - 1; ix >= 0; ix--)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-						Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-						if (value)
-						{
-                            if (!check_size)
-    							voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-							glVertex3d(xc, yc, zc);
-                            if (nearest)
-                                break;
-						}
-					}
-				}
-			}
-			break;
-		}
-		case Yminus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (iy = 0; iy < nby; iy++)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-						Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-						if (value)
-						{
-                            if (!check_size)
-    							voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-							glVertex3d(xc, yc, zc);
-                            if (nearest)
-                                break;
-						}
-					}
-				}
-			}
-			break;
-		}
-		case Yplus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (iy = nby - 1; iy >= 0; iy--)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-						Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-						if (value)
-						{
-                            if (!check_size)
-    							voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-							glVertex3d(xc, yc, zc);
-                            if (nearest)
-                                break;
-						}
-					}
-				}
-			}
-			break;
-		}
-		case Zminus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iy = 0; iy < nby; iy++)
-				{
-					for (iz = 0; iz < nbz; iz++)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-						Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-						if (value)
-						{
-                            if (!check_size)
-    							voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-							glVertex3d(xc, yc, zc);
-                            if (nearest)
-                                break;
-						}
-					}
-				}
-			}
-			break;
-		}
-		case Zplus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iy = 0; iy < nby; iy++)
-				{
-					for (iz = nbz - 1; iz >= 0; iz--)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-						Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-						if (value)
-						{
-                            if (!check_size)
-    							voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-							glVertex3d(xc, yc, zc);
-                            if (nearest)
-                                break;
-						}
-					}
-				}
-			}
-			break;
-		}
-	}
-    glEnd();
-}
-
-static void drawROctBoolPoints(const VoxelDirection vdir, const Standard_Boolean nearest,
-                               Voxel_ROctBoolDS* voxels,
-                               const Standard_Real xmin, const Standard_Real xmax,
-                               const Standard_Real ymin, const Standard_Real ymax,
-                               const Standard_Real zmin, const Standard_Real zmax)
-{
-	Standard_Real xc, yc, zc;
-	Standard_Integer ix = 0, nbx = voxels->GetNbX();
-	Standard_Integer iy = 0, nby = voxels->GetNbY();
-	Standard_Integer iz = 0, nbz = voxels->GetNbZ();
-    Standard_Integer i, j;
-
-    Standard_Boolean check_size = (xmin <= DBL_MAX && xmax >= DBL_MAX &&
-                       ymin <= DBL_MAX && ymax >= DBL_MAX &&
-                       zmin <= DBL_MAX && zmax >= DBL_MAX);
-    check_size = !check_size;
-
-    glBegin(GL_POINTS);
-    switch (vdir)
-	{
-		case Xminus:
-		{
-			for (iy = 0; iy < nby; iy++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (ix = 0; ix < nbx; ix++)
-					{
-                        switch (voxels->Deepness(ix, iy, iz))
-                        {
-                            case 0:
-                            {
-                                if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                    continue;
-						        Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-						        if (value)
-						        {
-                                    if (!check_size)
-							            ((Voxel_DS*)voxels)->GetCenter(ix, iy, iz, xc, yc, zc);
-							        glVertex3d(xc, yc, zc);
-                                    if (nearest)
-                                        break;
-						        }
-                                break;
-                            }
-                            case 1:
-                            {
-                                for (i = 0; i < 8; i++)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, -1, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-						            Standard_Boolean value = voxels->Get(ix, iy, iz, i) == Standard_True;
-						            if (value)
-						            {
-                                        if (!check_size)
-							                voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-							            glVertex3d(xc, yc, zc);
-                                        if (nearest)
-                                            break;
-						            }
-                                }
-                                break;
-                            }
-                            case 2:
-                            {
-                                for (i = 0; i < 8; i++)
-                                {
-                                    for (j = 0; j < 8; j++)
-                                    {
-                                        if (check_size && !CheckSize(voxels, ix, iy, iz, i, j, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                            continue;
-						                Standard_Boolean value = voxels->Get(ix, iy, iz, i, j) == Standard_True;
-						                if (value)
-						                {
-                                            if (!check_size)
-							                    voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-							                glVertex3d(xc, yc, zc);
-                                            if (nearest)
-                                                break;
-						                }
-                                    }
-                                }
-                                break;
-                            }
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Xplus:
-		{
-			for (iy = 0; iy < nby; iy++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (ix = nbx - 1; ix >= 0; ix--)
-					{
-                        switch (voxels->Deepness(ix, iy, iz))
-                        {
-                            case 0:
-                            {
-                                if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                    continue;
-						        Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-						        if (value)
-						        {
-                                    if (!check_size)
-							            ((Voxel_DS*)voxels)->GetCenter(ix, iy, iz, xc, yc, zc);
-							        glVertex3d(xc, yc, zc);
-                                    if (nearest)
-                                        break;
-						        }
-                                break;
-                            }
-                            case 1:
-                            {
-                                for (i = 0; i < 8; i++)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, -1, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-						            Standard_Boolean value = voxels->Get(ix, iy, iz, i) == Standard_True;
-						            if (value)
-						            {
-                                        if (!check_size)
-							                voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-							            glVertex3d(xc, yc, zc);
-                                        if (nearest)
-                                            break;
-						            }
-                                }
-                                break;
-                            }
-                            case 2:
-                            {
-                                for (i = 0; i < 8; i++)
-                                {
-                                    for (j = 0; j < 8; j++)
-                                    {
-                                        if (check_size && !CheckSize(voxels, ix, iy, iz, i, j, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                            continue;
-						                Standard_Boolean value = voxels->Get(ix, iy, iz, i, j) == Standard_True;
-						                if (value)
-						                {
-                                            if (!check_size)
-							                    voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-							                glVertex3d(xc, yc, zc);
-                                            if (nearest)
-                                                break;
-						                }
-                                    }
-                                }
-                                break;
-                            }
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Yminus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (iy = 0; iy < nby; iy++)
-					{
-                        switch (voxels->Deepness(ix, iy, iz))
-                        {
-                            case 0:
-                            {
-                                if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                    continue;
-						        Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-						        if (value)
-						        {
-                                    if (!check_size)
-							            ((Voxel_DS*)voxels)->GetCenter(ix, iy, iz, xc, yc, zc);
-							        glVertex3d(xc, yc, zc);
-                                    if (nearest)
-                                        break;
-						        }
-                                break;
-                            }
-                            case 1:
-                            {
-                                for (i = 0; i < 8; i++)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, -1, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-						            Standard_Boolean value = voxels->Get(ix, iy, iz, i) == Standard_True;
-						            if (value)
-						            {
-                                        if (!check_size)
-							                voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-							            glVertex3d(xc, yc, zc);
-                                        if (nearest)
-                                            break;
-						            }
-                                }
-                                break;
-                            }
-                            case 2:
-                            {
-                                for (i = 0; i < 8; i++)
-                                {
-                                    for (j = 0; j < 8; j++)
-                                    {
-                                        if (check_size && !CheckSize(voxels, ix, iy, iz, i, j, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                            continue;
-						                Standard_Boolean value = voxels->Get(ix, iy, iz, i, j) == Standard_True;
-						                if (value)
-						                {
-                                            if (!check_size)
-							                    voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-							                glVertex3d(xc, yc, zc);
-                                            if (nearest)
-                                                break;
-						                }
-                                    }
-                                }
-                                break;
-                            }
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Yplus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (iy = nby - 1; iy >= 0; iy--)
-					{
-                        switch (voxels->Deepness(ix, iy, iz))
-                        {
-                            case 0:
-                            {
-                                if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                    continue;
-						        Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-						        if (value)
-						        {
-                                    if (!check_size)
-							            ((Voxel_DS*)voxels)->GetCenter(ix, iy, iz, xc, yc, zc);
-							        glVertex3d(xc, yc, zc);
-                                    if (nearest)
-                                        break;
-						        }
-                                break;
-                            }
-                            case 1:
-                            {
-                                for (i = 0; i < 8; i++)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, -1, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-						            Standard_Boolean value = voxels->Get(ix, iy, iz, i) == Standard_True;
-						            if (value)
-						            {
-                                        if (!check_size)
-							                voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-							            glVertex3d(xc, yc, zc);
-                                        if (nearest)
-                                            break;
-						            }
-                                }
-                                break;
-                            }
-                            case 2:
-                            {
-                                for (i = 0; i < 8; i++)
-                                {
-                                    for (j = 0; j < 8; j++)
-                                    {
-                                        if (check_size && !CheckSize(voxels, ix, iy, iz, i, j, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                            continue;
-						                Standard_Boolean value = voxels->Get(ix, iy, iz, i, j) == Standard_True;
-						                if (value)
-						                {
-                                            if (!check_size)
-							                    voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-							                glVertex3d(xc, yc, zc);
-                                            if (nearest)
-                                                break;
-						                }
-                                    }
-                                }
-                                break;
-                            }
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Zminus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iy = 0; iy < nby; iy++)
-				{
-					for (iz = 0; iz < nbz; iz++)
-					{
-                        switch (voxels->Deepness(ix, iy, iz))
-                        {
-                            case 0:
-                            {
-                                if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                    continue;
-						        Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-						        if (value)
-						        {
-                                    if (!check_size)
-							            ((Voxel_DS*)voxels)->GetCenter(ix, iy, iz, xc, yc, zc);
-							        glVertex3d(xc, yc, zc);
-                                    if (nearest)
-                                        break;
-						        }
-                                break;
-                            }
-                            case 1:
-                            {
-                                for (i = 0; i < 8; i++)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, -1, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-						            Standard_Boolean value = voxels->Get(ix, iy, iz, i) == Standard_True;
-						            if (value)
-						            {
-                                        if (!check_size)
-							                voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-							            glVertex3d(xc, yc, zc);
-                                        if (nearest)
-                                            break;
-						            }
-                                }
-                                break;
-                            }
-                            case 2:
-                            {
-                                for (i = 0; i < 8; i++)
-                                {
-                                    for (j = 0; j < 8; j++)
-                                    {
-                                        if (check_size && !CheckSize(voxels, ix, iy, iz, i, j, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                            continue;
-						                Standard_Boolean value = voxels->Get(ix, iy, iz, i, j) == Standard_True;
-						                if (value)
-						                {
-                                            if (!check_size)
-							                    voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-							                glVertex3d(xc, yc, zc);
-                                            if (nearest)
-                                                break;
-						                }
-                                    }
-                                }
-                                break;
-                            }
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Zplus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iy = 0; iy < nby; iy++)
-				{
-					for (iz = nbz - 1; iz >= 0; iz--)
-					{
-                        switch (voxels->Deepness(ix, iy, iz))
-                        {
-                            case 0:
-                            {
-                                if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                    continue;
-						        Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-						        if (value)
-						        {
-                                    if (!check_size)
-							            ((Voxel_DS*)voxels)->GetCenter(ix, iy, iz, xc, yc, zc);
-							        glVertex3d(xc, yc, zc);
-                                    if (nearest)
-                                        break;
-						        }
-                                break;
-                            }
-                            case 1:
-                            {
-                                for (i = 0; i < 8; i++)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, -1, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-						            Standard_Boolean value = voxels->Get(ix, iy, iz, i) == Standard_True;
-						            if (value)
-						            {
-                                        if (!check_size)
-							                voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-							            glVertex3d(xc, yc, zc);
-                                        if (nearest)
-                                            break;
-						            }
-                                }
-                                break;
-                            }
-                            case 2:
-                            {
-                                for (i = 0; i < 8; i++)
-                                {
-                                    for (j = 0; j < 8; j++)
-                                    {
-                                        if (check_size && !CheckSize(voxels, ix, iy, iz, i, j, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                            continue;
-						                Standard_Boolean value = voxels->Get(ix, iy, iz, i, j) == Standard_True;
-						                if (value)
-						                {
-                                            if (!check_size)
-							                    voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-							                glVertex3d(xc, yc, zc);
-                                            if (nearest)
-                                                break;
-						                }
-                                    }
-                                }
-                                break;
-                            }
-                        }
-					}
-				}
-			}
-			break;
-		}
-	}
-    glEnd();
-}
-
-
-
-static void drawColorPoints(const VoxelDirection vdir, const Standard_Boolean nearest,
-                            Voxel_ColorDS* voxels, const Handle(Quantity_HArray1OfColor)& hcolors,
-                            const Standard_Byte minvalue, const Standard_Byte maxvalue,
-                            const Standard_Real xmin, const Standard_Real xmax,
-                            const Standard_Real ymin, const Standard_Real ymax,
-                            const Standard_Real zmin, const Standard_Real zmax)
-{
-  	Standard_Real xc, yc, zc;
-	Standard_Integer ix = 0, nbx = voxels->GetNbX();
-	Standard_Integer iy = 0, nby = voxels->GetNbY();
-	Standard_Integer iz = 0, nbz = voxels->GetNbZ();
-    Standard_Byte value;
-
-    // Colors
-    const Quantity_Array1OfColor& colors = hcolors->Array1();
-
-    Standard_Boolean check_size = (xmin <= DBL_MAX && xmax >= DBL_MAX &&
-                       ymin <= DBL_MAX && ymax >= DBL_MAX &&
-                       zmin <= DBL_MAX && zmax >= DBL_MAX);
-    check_size = !check_size;
-
-    glBegin(GL_POINTS);
-    switch (vdir)
-	{
-		case Xminus:
-		{
-			for (iy = 0; iy < nby; iy++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (ix = 0; ix < nbx; ix++)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-	                    value = voxels->Get(ix, iy, iz);
-	                    if (value >= minvalue && value <= maxvalue)
-	                    {
-                            if (!check_size)
-		                        voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            setColor(colors.Value(value), Standard_False);
-		                    glVertex3d(xc, yc, zc);
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Xplus:
-		{
-			for (iy = 0; iy < nby; iy++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (ix = nbx - 1; ix >= 0; ix--)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-	                    value = voxels->Get(ix, iy, iz);
-	                    if (value >= minvalue && value <= maxvalue)
-	                    {
-                            if (!check_size)
-		                        voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            setColor(colors.Value(value), Standard_False);
-		                    glVertex3d(xc, yc, zc);
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Yminus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (iy = 0; iy < nby; iy++)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-	                    value = voxels->Get(ix, iy, iz);
-	                    if (value >= minvalue && value <= maxvalue)
-	                    {
-                            if (!check_size)
-		                        voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            setColor(colors.Value(value), Standard_False);
-		                    glVertex3d(xc, yc, zc);
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Yplus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (iy = nby - 1; iy >= 0; iy--)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-	                    value = voxels->Get(ix, iy, iz);
-	                    if (value >= minvalue && value <= maxvalue)
-	                    {
-                            if (!check_size)
-		                        voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            setColor(colors.Value(value), Standard_False);
-		                    glVertex3d(xc, yc, zc);
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Zminus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iy = 0; iy < nby; iy++)
-				{
-					for (iz = 0; iz < nbz; iz++)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-	                    value = voxels->Get(ix, iy, iz);
-	                    if (value >= minvalue && value <= maxvalue)
-	                    {
-                            if (!check_size)
-		                        voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            setColor(colors.Value(value), Standard_False);
-		                    glVertex3d(xc, yc, zc);
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Zplus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iy = 0; iy < nby; iy++)
-				{
-					for (iz = nbz - 1; iz >= 0; iz--)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-	                    value = voxels->Get(ix, iy, iz);
-	                    if (value >= minvalue && value <= maxvalue)
-	                    {
-                            if (!check_size)
-		                        voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            setColor(colors.Value(value), Standard_False);
-		                    glVertex3d(xc, yc, zc);
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-    }
-    glEnd();
-}
-
-static void drawBoolQuadrangles(Voxel_BoolDS* voxels, const VoxelDirection vdir, 
-                                const gp_Dir& viewnormal, const Standard_Boolean nearest,
-                                const gp_Pnt& p1, const gp_Pnt& p2, const gp_Pnt& p3, const gp_Pnt& p4,
-                                const Standard_Real xmin, const Standard_Real xmax,
-                                const Standard_Real ymin, const Standard_Real ymax,
-                                const Standard_Real zmin, const Standard_Real zmax)
-{
-    gp_Vec vc;
-    gp_Pnt pc1, pc2, pc3, pc4;
-    Standard_Real xc, yc, zc, xn = 0.0, yn = 0.0, zn = 1.0;
-    Standard_Integer ix, iy, iz, nbx = voxels->GetNbX(), nby = voxels->GetNbY(), nbz = voxels->GetNbZ();
-
-    // Normal
-    viewnormal.Coord(xn, yn, zn);
-
-    Standard_Boolean check_size = (xmin <= DBL_MAX && xmax >= DBL_MAX &&
-                       ymin <= DBL_MAX && ymax >= DBL_MAX &&
-                       zmin <= DBL_MAX && zmax >= DBL_MAX);
-    check_size = !check_size;
-
-    glBegin(GL_QUADS);
-    switch (vdir)
-	{
-		case Xminus:
-		{
-			for (iy = 0; iy < nby; iy++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (ix = 0; ix < nbx; ix++)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-                        Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-                        if (value)
-                        {
-                            // Define translation vector
-                            if (!check_size)
-                                voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            vc.SetCoord(xc, yc, zc);
-
-                            // Translate
-                            pc1 = p1.Translated(vc);
-                            pc2 = p2.Translated(vc);
-                            pc3 = p3.Translated(vc);
-                            pc4 = p4.Translated(vc);
-
-                            // Display
-                            glNormal3d(xn, yn, zn);
-                            pc1.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc2.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc3.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc4.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-
-                            if (nearest)
-                                break;
-                        }
-                    }
-				}
-			}
-			break;
-		}
-		case Xplus:
-		{
-			for (iy = 0; iy < nby; iy++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (ix = nbx - 1; ix >= 0; ix--)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-                        Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-                        if (value)
-                        {
-                            // Define translation vector
-                            if (!check_size)
-                                voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            vc.SetCoord(xc, yc, zc);
-
-                            // Translate
-                            pc1 = p1.Translated(vc);
-                            pc2 = p2.Translated(vc);
-                            pc3 = p3.Translated(vc);
-                            pc4 = p4.Translated(vc);
-
-                            // Display
-                            glNormal3d(xn, yn, zn);
-                            pc1.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc2.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc3.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc4.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Yminus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (iy = 0; iy < nby; iy++)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-                        Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-                        if (value)
-                        {
-                            // Define translation vector
-                            if (!check_size)
-                                voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            vc.SetCoord(xc, yc, zc);
-
-                            // Translate
-                            pc1 = p1.Translated(vc);
-                            pc2 = p2.Translated(vc);
-                            pc3 = p3.Translated(vc);
-                            pc4 = p4.Translated(vc);
-
-                            // Display
-                            glNormal3d(xn, yn, zn);
-                            pc1.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc2.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc3.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc4.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Yplus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (iy = nby - 1; iy >= 0; iy--)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-                        Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-                        if (value)
-                        {
-                            // Define translation vector
-                            if (!check_size)
-                                voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            vc.SetCoord(xc, yc, zc);
-
-                            // Translate
-                            pc1 = p1.Translated(vc);
-                            pc2 = p2.Translated(vc);
-                            pc3 = p3.Translated(vc);
-                            pc4 = p4.Translated(vc);
-
-                            // Display
-                            glNormal3d(xn, yn, zn);
-                            pc1.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc2.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc3.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc4.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Zminus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iy = 0; iy < nby; iy++)
-				{
-					for (iz = 0; iz < nbz; iz++)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-                        Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-                        if (value)
-                        {
-                            // Define translation vector
-                            if (!check_size)
-                                voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            vc.SetCoord(xc, yc, zc);
-
-                            // Translate
-                            pc1 = p1.Translated(vc);
-                            pc2 = p2.Translated(vc);
-                            pc3 = p3.Translated(vc);
-                            pc4 = p4.Translated(vc);
-
-                            // Display
-                            glNormal3d(xn, yn, zn);
-                            pc1.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc2.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc3.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc4.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Zplus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iy = 0; iy < nby; iy++)
-				{
-					for (iz = nbz - 1; iz >= 0; iz--)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-                        Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True;
-                        if (value)
-                        {
-                            // Define translation vector
-                            if (!check_size)
-                                voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            vc.SetCoord(xc, yc, zc);
-
-                            // Translate
-                            pc1 = p1.Translated(vc);
-                            pc2 = p2.Translated(vc);
-                            pc3 = p3.Translated(vc);
-                            pc4 = p4.Translated(vc);
-
-                            // Display
-                            glNormal3d(xn, yn, zn);
-                            pc1.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc2.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc3.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc4.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-    }
-    glEnd();
-}
-
-static void drawROctBoolQuadrangles(Voxel_ROctBoolDS* voxels, const VoxelDirection vdir, 
-                                    const gp_Dir& viewnormal, const Standard_Boolean nearest,
-                                    const gp_Pnt& p1, const gp_Pnt& p2, const gp_Pnt& p3, const gp_Pnt& p4,
-                                    const Standard_Real xmin, const Standard_Real xmax,
-                                    const Standard_Real ymin, const Standard_Real ymax,
-                                    const Standard_Real zmin, const Standard_Real zmax)
-{
-    gp_Vec vc;
-    gp_Pnt pc1, pc2, pc3, pc4;
-    Standard_Real xc, yc, zc, xn = 0.0, yn = 0.0, zn = 1.0;
-    Standard_Integer ix, iy, iz, nbx = voxels->GetNbX(), nby = voxels->GetNbY(), nbz = voxels->GetNbZ(), i, j, deepness;
-
-    // Normal
-    viewnormal.Coord(xn, yn, zn);
-
-    Standard_Boolean check_size = (xmin <= DBL_MAX && xmax >= DBL_MAX &&
-                       ymin <= DBL_MAX && ymax >= DBL_MAX &&
-                       zmin <= DBL_MAX && zmax >= DBL_MAX);
-    check_size = !check_size;
-
-    glBegin(GL_QUADS);
-    switch (vdir)
-	{
-		case Xminus:
-		{
-			for (iy = 0; iy < nby; iy++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (ix = 0; ix < nbx; ix++)
-					{
-                        deepness = voxels->Deepness(ix, iy, iz);
-                        for (i = 0; i < 8; i++)
-                        {
-                            for (j = 0; j < 8; j++)
-                            {
-                                if (deepness == 0 && j)
-                                {
-                                    i = 8;
-                                    break;
-                                }
-                                if (deepness == 1 && j)
-                                    break;
-                                if (deepness == 0)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-                                else if (deepness == 1)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, -1, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-                                else if (deepness == 2)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, j, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-
-                                Standard_Boolean value;
-                                switch (deepness)
-                                {
-                                    case 0:
-                                        value = voxels->Get(ix, iy, iz) == Standard_True;
-                                        break;
-                                    case 1:
-                                        value = voxels->Get(ix, iy, iz, i) == Standard_True;
-                                        break;
-                                    case 2:
-                                        value = voxels->Get(ix, iy, iz, i, j) == Standard_True;
-                                        break;
-                                }
-                                
-                                if (value)
-                                {
-                                    // Define translation vector
-                                    if (!check_size)
-                                    {
-                                        switch (deepness)
-                                        {
-                                            case 0:
-                                                ((Voxel_DS*)voxels)->GetCenter(ix, iy, iz, xc, yc, zc);
-                                                break;
-                                            case 1:
-                                                voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-                                                break;
-                                            case 2:
-                                                voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-                                                break;
-                                        }
-                                    }
-                                    vc.SetCoord(xc, yc, zc);
-
-                                    // Translate
-                                    pc1 = p1.Translated(vc);
-                                    pc2 = p2.Translated(vc);
-                                    pc3 = p3.Translated(vc);
-                                    pc4 = p4.Translated(vc);
-
-                                    // Display
-                                    glNormal3d(xn, yn, zn);
-                                    pc1.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc2.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc3.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc4.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-
-                                    if (nearest)
-                                        break;
-                                }
-                            }
-                        }
-                    }
-				}
-			}
-			break;
-		}
-		case Xplus:
-		{
-			for (iy = 0; iy < nby; iy++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (ix = nbx - 1; ix >= 0; ix--)
-					{
-                        deepness = voxels->Deepness(ix, iy, iz);
-                        for (i = 0; i < 8; i++)
-                        {
-                            for (j = 0; j < 8; j++)
-                            {
-                                if (deepness == 0 && j)
-                                {
-                                    i = 8;
-                                    break;
-                                }
-                                if (deepness == 1 && j)
-                                    break;
-                                if (deepness == 0)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-                                else if (deepness == 1)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, -1, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-                                else if (deepness == 2)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, j, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-
-                                Standard_Boolean value;
-                                switch (deepness)
-                                {
-                                    case 0:
-                                        value = voxels->Get(ix, iy, iz) == Standard_True;
-                                        break;
-                                    case 1:
-                                        value = voxels->Get(ix, iy, iz, i) == Standard_True;
-                                        break;
-                                    case 2:
-                                        value = voxels->Get(ix, iy, iz, i, j) == Standard_True;
-                                        break;
-                                }
-                                
-                                if (value)
-                                {
-                                    // Define translation vector
-                                    if (!check_size)
-                                    {
-                                        switch (deepness)
-                                        {
-                                            case 0:
-                                                ((Voxel_DS*)voxels)->GetCenter(ix, iy, iz, xc, yc, zc);
-                                                break;
-                                            case 1:
-                                                voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-                                                break;
-                                            case 2:
-                                                voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-                                                break;
-                                        }
-                                    }
-                                    vc.SetCoord(xc, yc, zc);
-
-                                    // Translate
-                                    pc1 = p1.Translated(vc);
-                                    pc2 = p2.Translated(vc);
-                                    pc3 = p3.Translated(vc);
-                                    pc4 = p4.Translated(vc);
-
-                                    // Display
-                                    glNormal3d(xn, yn, zn);
-                                    pc1.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc2.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc3.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc4.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-
-                                    if (nearest)
-                                        break;
-                                }
-                            }
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Yminus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (iy = 0; iy < nby; iy++)
-					{
-                        deepness = voxels->Deepness(ix, iy, iz);
-                        for (i = 0; i < 8; i++)
-                        {
-                            for (j = 0; j < 8; j++)
-                            {
-                                if (deepness == 0 && j)
-                                {
-                                    i = 8;
-                                    break;
-                                }
-                                if (deepness == 1 && j)
-                                    break;
-                                if (deepness == 0)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-                                else if (deepness == 1)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, -1, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-                                else if (deepness == 2)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, j, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-
-                                Standard_Boolean value;
-                                switch (deepness)
-                                {
-                                    case 0:
-                                        value = voxels->Get(ix, iy, iz) == Standard_True;
-                                        break;
-                                    case 1:
-                                        value = voxels->Get(ix, iy, iz, i) == Standard_True;
-                                        break;
-                                    case 2:
-                                        value = voxels->Get(ix, iy, iz, i, j) == Standard_True;
-                                        break;
-                                }
-                                
-                                if (value)
-                                {
-                                    // Define translation vector
-                                    if (!check_size)
-                                    {
-                                        switch (deepness)
-                                        {
-                                            case 0:
-                                                ((Voxel_DS*)voxels)->GetCenter(ix, iy, iz, xc, yc, zc);
-                                                break;
-                                            case 1:
-                                                voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-                                                break;
-                                            case 2:
-                                                voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-                                                break;
-                                        }
-                                    }
-                                    vc.SetCoord(xc, yc, zc);
-
-                                    // Translate
-                                    pc1 = p1.Translated(vc);
-                                    pc2 = p2.Translated(vc);
-                                    pc3 = p3.Translated(vc);
-                                    pc4 = p4.Translated(vc);
-
-                                    // Display
-                                    glNormal3d(xn, yn, zn);
-                                    pc1.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc2.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc3.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc4.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-
-                                    if (nearest)
-                                        break;
-                                }
-                            }
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Yplus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (iy = nby - 1; iy >= 0; iy--)
-					{
-                        deepness = voxels->Deepness(ix, iy, iz);
-                        for (i = 0; i < 8; i++)
-                        {
-                            for (j = 0; j < 8; j++)
-                            {
-                                if (deepness == 0 && j)
-                                {
-                                    i = 8;
-                                    break;
-                                }
-                                if (deepness == 1 && j)
-                                    break;
-                                if (deepness == 0)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-                                else if (deepness == 1)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, -1, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-                                else if (deepness == 2)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, j, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-
-                                Standard_Boolean value;
-                                switch (deepness)
-                                {
-                                    case 0:
-                                        value = voxels->Get(ix, iy, iz) == Standard_True;
-                                        break;
-                                    case 1:
-                                        value = voxels->Get(ix, iy, iz, i) == Standard_True;
-                                        break;
-                                    case 2:
-                                        value = voxels->Get(ix, iy, iz, i, j) == Standard_True;
-                                        break;
-                                }
-                                
-                                if (value)
-                                {
-                                    // Define translation vector
-                                    if (!check_size)
-                                    {
-                                        switch (deepness)
-                                        {
-                                            case 0:
-                                                ((Voxel_DS*)voxels)->GetCenter(ix, iy, iz, xc, yc, zc);
-                                                break;
-                                            case 1:
-                                                voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-                                                break;
-                                            case 2:
-                                                voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-                                                break;
-                                        }
-                                    }
-                                    vc.SetCoord(xc, yc, zc);
-
-                                    // Translate
-                                    pc1 = p1.Translated(vc);
-                                    pc2 = p2.Translated(vc);
-                                    pc3 = p3.Translated(vc);
-                                    pc4 = p4.Translated(vc);
-
-                                    // Display
-                                    glNormal3d(xn, yn, zn);
-                                    pc1.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc2.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc3.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc4.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-
-                                    if (nearest)
-                                        break;
-                                }
-                            }
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Zminus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iy = 0; iy < nby; iy++)
-				{
-					for (iz = 0; iz < nbz; iz++)
-					{
-                        deepness = voxels->Deepness(ix, iy, iz);
-                        for (i = 0; i < 8; i++)
-                        {
-                            for (j = 0; j < 8; j++)
-                            {
-                                if (deepness == 0 && j)
-                                {
-                                    i = 8;
-                                    break;
-                                }
-                                if (deepness == 1 && j)
-                                    break;
-                                if (deepness == 0)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-                                else if (deepness == 1)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, -1, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-                                else if (deepness == 2)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, j, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-
-                                Standard_Boolean value;
-                                switch (deepness)
-                                {
-                                    case 0:
-                                        value = voxels->Get(ix, iy, iz) == Standard_True;
-                                        break;
-                                    case 1:
-                                        value = voxels->Get(ix, iy, iz, i) == Standard_True;
-                                        break;
-                                    case 2:
-                                        value = voxels->Get(ix, iy, iz, i, j) == Standard_True;
-                                        break;
-                                }
-                                
-                                if (value)
-                                {
-                                    // Define translation vector
-                                    if (!check_size)
-                                    {
-                                        switch (deepness)
-                                        {
-                                            case 0:
-                                                ((Voxel_DS*)voxels)->GetCenter(ix, iy, iz, xc, yc, zc);
-                                                break;
-                                            case 1:
-                                                voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-                                                break;
-                                            case 2:
-                                                voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-                                                break;
-                                        }
-                                    }
-                                    vc.SetCoord(xc, yc, zc);
-
-                                    // Translate
-                                    pc1 = p1.Translated(vc);
-                                    pc2 = p2.Translated(vc);
-                                    pc3 = p3.Translated(vc);
-                                    pc4 = p4.Translated(vc);
-
-                                    // Display
-                                    glNormal3d(xn, yn, zn);
-                                    pc1.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc2.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc3.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc4.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-
-                                    if (nearest)
-                                        break;
-                                }
-                            }
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Zplus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iy = 0; iy < nby; iy++)
-				{
-					for (iz = nbz - 1; iz >= 0; iz--)
-					{
-                        deepness = voxels->Deepness(ix, iy, iz);
-                        for (i = 0; i < 8; i++)
-                        {
-                            for (j = 0; j < 8; j++)
-                            {
-                                if (deepness == 0 && j)
-                                {
-                                    i = 8;
-                                    break;
-                                }
-                                if (deepness == 1 && j)
-                                    break;
-                                if (deepness == 0)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-                                else if (deepness == 1)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, -1, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-                                else if (deepness == 2)
-                                {
-                                    if (check_size && !CheckSize(voxels, ix, iy, iz, i, j, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                                        continue;
-                                }
-
-                                Standard_Boolean value;
-                                switch (deepness)
-                                {
-                                    case 0:
-                                        value = voxels->Get(ix, iy, iz) == Standard_True;
-                                        break;
-                                    case 1:
-                                        value = voxels->Get(ix, iy, iz, i) == Standard_True;
-                                        break;
-                                    case 2:
-                                        value = voxels->Get(ix, iy, iz, i, j) == Standard_True;
-                                        break;
-                                }
-                                
-                                if (value)
-                                {
-                                    // Define translation vector
-                                    if (!check_size)
-                                    {
-                                        switch (deepness)
-                                        {
-                                            case 0:
-                                                ((Voxel_DS*)voxels)->GetCenter(ix, iy, iz, xc, yc, zc);
-                                                break;
-                                            case 1:
-                                                voxels->GetCenter(ix, iy, iz, i, xc, yc, zc);
-                                                break;
-                                            case 2:
-                                                voxels->GetCenter(ix, iy, iz, i, j, xc, yc, zc);
-                                                break;
-                                        }
-                                    }
-                                    vc.SetCoord(xc, yc, zc);
-
-                                    // Translate
-                                    pc1 = p1.Translated(vc);
-                                    pc2 = p2.Translated(vc);
-                                    pc3 = p3.Translated(vc);
-                                    pc4 = p4.Translated(vc);
-
-                                    // Display
-                                    glNormal3d(xn, yn, zn);
-                                    pc1.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc2.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc3.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-                                    pc4.Coord(xc, yc, zc);
-                                    glVertex3d(xc, yc, zc);
-
-                                    if (nearest)
-                                        break;
-                                }
-                            }
-                        }
-					}
-				}
-			}
-			break;
-		}
-    }
-    glEnd();
-}
-
-
-
-static void drawColorQuadrangles(Voxel_ColorDS* voxels, const VoxelDirection vdir, 
-                                 const gp_Dir& viewnormal, const Standard_Boolean nearest,
-                                 const Handle(Quantity_HArray1OfColor)& hcolors,
-                                 const gp_Pnt& p1, const gp_Pnt& p2, const gp_Pnt& p3, const gp_Pnt& p4,
-                                 const Standard_Byte minvalue, const Standard_Byte maxvalue,
-                                 const Standard_Real xmin, const Standard_Real xmax,
-                                 const Standard_Real ymin, const Standard_Real ymax,
-                                 const Standard_Real zmin, const Standard_Real zmax)
-{
-    gp_Vec vc;
-    gp_Pnt pc1, pc2, pc3, pc4;
-    Standard_Real xc, yc, zc, xn = 0.0, yn = 0.0, zn = 0.0;
-    Standard_Integer ix, iy, iz, nbx = voxels->GetNbX(), nby = voxels->GetNbY(), nbz = voxels->GetNbZ();
-    Standard_Byte value;
-
-    // Normal
-    //viewnormal.Coord(xn, yn, zn);
-    glNormal3d(xn, yn, zn);
-
-    // Colors
-    const Quantity_Array1OfColor& colors = hcolors->Array1();
-
-    Standard_Boolean check_size = (xmin <= DBL_MAX && xmax >= DBL_MAX &&
-                       ymin <= DBL_MAX && ymax >= DBL_MAX &&
-                       zmin <= DBL_MAX && zmax >= DBL_MAX);
-    check_size = !check_size;
-
-    glBegin(GL_QUADS);
-    switch (vdir)
-	{
-		case Xminus:
-		{
-			for (iy = 0; iy < nby; iy++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (ix = 0; ix < nbx; ix++)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-                        value = voxels->Get(ix, iy, iz);
-                        if (value >= minvalue && value <= maxvalue)
-                        {
-                            // Define translation vector
-                            if (!check_size)
-                                voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            vc.SetCoord(xc, yc, zc);
-
-                            // Translate
-                            pc1 = p1.Translated(vc);
-                            pc2 = p2.Translated(vc);
-                            pc3 = p3.Translated(vc);
-                            pc4 = p4.Translated(vc);
-
-                            // Color
-                            setColor(colors.Value(value), Standard_False);
-
-                            // Display
-                            //glNormal3d(xn, yn, zn);
-                            pc1.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc2.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc3.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc4.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-
-                            if (nearest)
-                                break;
-                        }
-                    }
-				}
-			}
-			break;
-		}
-		case Xplus:
-		{
-			for (iy = 0; iy < nby; iy++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (ix = nbx - 1; ix >= 0; ix--)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-                        value = voxels->Get(ix, iy, iz);
-                        if (value >= minvalue && value <= maxvalue)
-                        {
-                            // Define translation vector
-                            if (!check_size)
-                                voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            vc.SetCoord(xc, yc, zc);
-
-                            // Translate
-                            pc1 = p1.Translated(vc);
-                            pc2 = p2.Translated(vc);
-                            pc3 = p3.Translated(vc);
-                            pc4 = p4.Translated(vc);
-
-                            // Color
-                            setColor(colors.Value(value), Standard_False);
-
-                            // Display
-                            //glNormal3d(xn, yn, zn);
-                            pc1.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc2.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc3.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc4.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Yminus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (iy = 0; iy < nby; iy++)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-                        value = voxels->Get(ix, iy, iz);
-                        if (value >= minvalue && value <= maxvalue)
-                        {
-                            // Define translation vector
-                            if (!check_size)
-                                voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            vc.SetCoord(xc, yc, zc);
-
-                            // Translate
-                            pc1 = p1.Translated(vc);
-                            pc2 = p2.Translated(vc);
-                            pc3 = p3.Translated(vc);
-                            pc4 = p4.Translated(vc);
-
-                            // Color
-                            setColor(colors.Value(value), Standard_False);
-
-                            // Display
-                            //glNormal3d(xn, yn, zn);
-                            pc1.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc2.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc3.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc4.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Yplus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iz = 0; iz < nbz; iz++)
-				{
-					for (iy = nby - 1; iy >= 0; iy--)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-                        value = voxels->Get(ix, iy, iz);
-                        if (value >= minvalue && value <= maxvalue)
-                        {
-                            // Define translation vector
-                            if (!check_size)
-                                voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            vc.SetCoord(xc, yc, zc);
-
-                            // Translate
-                            pc1 = p1.Translated(vc);
-                            pc2 = p2.Translated(vc);
-                            pc3 = p3.Translated(vc);
-                            pc4 = p4.Translated(vc);
-
-                            // Color
-                            setColor(colors.Value(value), Standard_False);
-
-                            // Display
-                            //glNormal3d(xn, yn, zn);
-                            pc1.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc2.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc3.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc4.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Zminus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iy = 0; iy < nby; iy++)
-				{
-					for (iz = 0; iz < nbz; iz++)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-                        value = voxels->Get(ix, iy, iz);
-                        if (value >= minvalue && value <= maxvalue)
-                        {
-                            // Define translation vector
-                            if (!check_size)
-                                voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            vc.SetCoord(xc, yc, zc);
-
-                            // Translate
-                            pc1 = p1.Translated(vc);
-                            pc2 = p2.Translated(vc);
-                            pc3 = p3.Translated(vc);
-                            pc4 = p4.Translated(vc);
-
-                            // Color
-                            setColor(colors.Value(value), Standard_False);
-
-                            // Display
-                            //glNormal3d(xn, yn, zn);
-                            pc1.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc2.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc3.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc4.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-		case Zplus:
-		{
-			for (ix = 0; ix < nbx; ix++)
-			{
-				for (iy = 0; iy < nby; iy++)
-				{
-					for (iz = nbz - 1; iz >= 0; iz--)
-					{
-                        if (check_size && !CheckSize(voxels, ix, iy, iz, xmin, xmax, ymin, ymax, zmin, zmax, xc, yc, zc))
-                            continue;
-                        value = voxels->Get(ix, iy, iz);
-                        if (value >= minvalue && value <= maxvalue)
-                        {
-                            // Define translation vector
-                            if (!check_size)
-                                voxels->GetCenter(ix, iy, iz, xc, yc, zc);
-                            vc.SetCoord(xc, yc, zc);
-
-                            // Translate
-                            pc1 = p1.Translated(vc);
-                            pc2 = p2.Translated(vc);
-                            pc3 = p3.Translated(vc);
-                            pc4 = p4.Translated(vc);
-
-                            // Color
-                            setColor(colors.Value(value), Standard_False);
-
-                            // Display
-                            //glNormal3d(xn, yn, zn);
-                            pc1.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc2.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc3.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-                            pc4.Coord(xc, yc, zc);
-                            glVertex3d(xc, yc, zc);
-
-                            if (nearest)
-                                break;
-                        }
-					}
-				}
-			}
-			break;
-		}
-    }
-    glEnd();
-}
-
-static void genListIndex(GLint& index)
-{
-    GLint i = 0;
-    while (++i <= INT_MAX)
-    {
-        if (!glIsList(i))
-        {
-            index = i;
-            break;
-        }
-    }
-}
-
-static void setPlaneNormal(const VoxelDirection& dir, 
-                           const Standard_Real dx, const Standard_Real dy, const Standard_Real dz,
-                           gp_Pln& plane, gp_Pnt& p1, gp_Pnt& p2, gp_Pnt& p3, gp_Pnt& p4)
-{
-    gp_Ax3 axes = plane.Position();
-    Standard_Real dx2 = 0.5 * dx, dy2 = 0.5 * dy, dz2 = 0.5 * dz;
-    switch (dir)
-    {
-        case Xminus:
-            p1.SetCoord(-dx2, -dy2, dz2);
-            p2.SetCoord(-dx2, -dy2, -dz2);
-            p3.SetCoord(-dx2, dy2, -dz2);
-            p4.SetCoord(-dx2, dy2, dz2);
-            axes.SetDirection(-gp::DX());
-            break;
-        case Xplus:
-            p1.SetCoord(dx2, -dy2, dz2);
-            p2.SetCoord(dx2, -dy2, -dz2);
-            p3.SetCoord(dx2, dy2, -dz2);
-            p4.SetCoord(dx2, dy2, dz2);
-            axes.SetDirection(gp::DX());
-            break;
-        case Yminus:
-            p1.SetCoord(dx2, -dy2, dz2);
-            p2.SetCoord(dx2, -dy2, -dz2);
-            p3.SetCoord(-dx2, -dy2, -dz2);
-            p4.SetCoord(-dx2, -dy2, dz2);
-            axes.SetDirection(-gp::DY());
-            break;
-        case Yplus:
-            p1.SetCoord(dx2, dy2, dz2);
-            p2.SetCoord(dx2, dy2, -dz2);
-            p3.SetCoord(-dx2, dy2, -dz2);
-            p4.SetCoord(-dx2, dy2, dz2);
-            axes.SetDirection(gp::DY());
-            break;
-        case Zminus:
-            p1.SetCoord(dx2, dy2, -dz2);
-            p2.SetCoord(-dx2, dy2, -dz2);
-            p3.SetCoord(-dx2, -dy2, -dz2);
-            p4.SetCoord(dx2, -dy2, -dz2);
-            axes.SetDirection(-gp::DZ());
-            break;
-        case Zplus:
-            p1.SetCoord(dx2, dy2, dz2);
-            p2.SetCoord(-dx2, dy2, dz2);
-            p3.SetCoord(-dx2, -dy2, dz2);
-            p4.SetCoord(dx2, -dy2, dz2);
-            axes.SetDirection(gp::DZ());
-            break;
-    }
-}
-
-/**************************************************************************/
-void VoxelClient_VisDrawer::DisplayVoxels(const Standard_Boolean theHighlight)
-{
-    if(!myData)
-        return;
-
-    glEnable(GL_DEPTH_TEST);
-
-	// Boolean voxels
-	if (myData->myBoolVoxels)
-    {
-		// Points
-		if (myData->myDisplay.myDisplayMode == Voxel_VDM_POINTS ||
-            myData->myDisplay.myDisplayMode == Voxel_VDM_NEARESTPOINTS)
-		{
-			glDisable(GL_LIGHTING);
-            if (myData->myDisplay.mySmoothPoints)
-			    glEnable(GL_POINT_SMOOTH);
-            else
-                glDisable(GL_POINT_SMOOTH);
-
-			// Draw the points of voxels (center points of the voxels)
-			// starting visualization from the side looking out from the user.
-			setColor(myData->myDisplay.myColor, theHighlight);
-			glPointSize((Standard_ShortReal) myData->myDisplay.myPointSize);
-
-            // Display
-            DisplayPoints(myData->myDisplay.myDisplayMode == Voxel_VDM_NEARESTPOINTS);
-        }
-	}
-
-    // Color values
-	if (myData->myColorVoxels)
-    {
-		// Points
-		if (myData->myDisplay.myDisplayMode == Voxel_VDM_POINTS ||
-            myData->myDisplay.myDisplayMode == Voxel_VDM_NEARESTPOINTS)
-		{
-			glDisable(GL_LIGHTING);
-            if (myData->myDisplay.mySmoothPoints)
-			    glEnable(GL_POINT_SMOOTH);
-            else
-                glDisable(GL_POINT_SMOOTH);
-
-			// Draw the points of voxels (center points of the voxels)
-			// starting visualization from the side looking out from the user.
-			glPointSize((Standard_ShortReal) myData->myDisplay.myPointSize);
-
-            // Display
-            DisplayPoints(myData->myDisplay.myDisplayMode == Voxel_VDM_NEARESTPOINTS);
-        }
-	}
-
-	// Recursive Octree Boolean voxels
-	if (myData->myROctBoolVoxels)
-    {
-		// Points
-		if (myData->myDisplay.myDisplayMode == Voxel_VDM_POINTS ||
-            myData->myDisplay.myDisplayMode == Voxel_VDM_NEARESTPOINTS)
-		{
-			glDisable(GL_LIGHTING);
-            if (myData->myDisplay.mySmoothPoints)
-			    glEnable(GL_POINT_SMOOTH);
-            else
-                glDisable(GL_POINT_SMOOTH);
-
-			// Draw the points of voxels (center points of the voxels)
-			// starting visualization from the side looking out from the user.
-			setColor(myData->myDisplay.myColor, theHighlight);
-			glPointSize((Standard_ShortReal) myData->myDisplay.myPointSize);
-
-            // Display
-            DisplayPoints(myData->myDisplay.myDisplayMode == Voxel_VDM_NEARESTPOINTS);
-        }
-	}
-
-    // Shading drawn by boxes
-    if (myData->myDisplay.myDisplayMode == Voxel_VDM_BOXES || 
-        myData->myDisplay.myDisplayMode == Voxel_VDM_NEARESTBOXES)
-    {
-		glEnable(GL_LIGHTING);
-        glEnable(GL_COLOR_MATERIAL);
-
-		// Draw quadrangles of voxels looking to the user.
-		setColor(myData->myDisplay.myColor, theHighlight);
-
-        // Display
-        DisplayBoxes(myData->myDisplay.myDisplayMode == Voxel_VDM_NEARESTBOXES);
-
-        glDisable(GL_COLOR_MATERIAL);
-    }
-
-    // Highlighted voxel
-    HighlightVoxel();
-}
-
-/**************************************************************************/
-void VoxelClient_VisDrawer::DisplayPoints(const Standard_Boolean nearest)
-{
-    //OSD_Timer timer;
-    //timer.Start();
-
-    // Find the side of the cube which normal looks to (or out) the user's eye.
-	gp_Dir viewnormal;
-	getNormal(viewnormal);
-
-    // Range of displayed data
-    Standard_Real xmin = myData->myDisplay.myDisplayedXMin;
-    Standard_Real xmax = myData->myDisplay.myDisplayedXMax;
-    Standard_Real ymin = myData->myDisplay.myDisplayedYMin;
-    Standard_Real ymax = myData->myDisplay.myDisplayedYMax;
-    Standard_Real zmin = myData->myDisplay.myDisplayedZMin;
-    Standard_Real zmax = myData->myDisplay.myDisplayedZMax;
-
-    // Boolean points
-	if (myData->myBoolVoxels)
-    {
-        if (nearest || myData->myDisplay.myDegenerateMode)
-        {
-	        VoxelDirection vdir1, vdir2, vdir3;
-            getVoxel3Directions(viewnormal, vdir1, vdir2, vdir3);
-
-            if (myData->myDisplay.myUsageOfGLlists)
-            {
-                // Clean all allocated GL lists for the case of first call.
-                if (myData->myDisplay.myBoolNearestPointsFirst)
-                {
-                    for (Standard_Integer idir = Xminus; idir <= Zplus; idir++)
-                    {
-                        if (myData->myDisplay.myBoolNearestPointsList[idir] > 0)
-                        {
-                            glDeleteLists(myData->myDisplay.myBoolNearestPointsList[idir], 1);
-                            myData->myDisplay.myBoolNearestPointsList[idir] = -1;
-                        }
-                    }
-                    myData->myDisplay.myBoolNearestPointsFirst = Standard_False;
-                }
-
-                // Generate GL lists if needed.
-                if (myData->myDisplay.myBoolNearestPointsList[(Standard_Integer) vdir1] < 0)
-                {
-                    genListIndex(myData->myDisplay.myBoolNearestPointsList[(Standard_Integer) vdir1]);
-                    glNewList(myData->myDisplay.myBoolNearestPointsList[(Standard_Integer) vdir1], GL_COMPILE);
-                    drawBoolPoints(vdir1, Standard_True, myData->myBoolVoxels,
-                                   xmin, xmax, ymin, ymax, zmin, zmax);
-                    glEndList();
-                }
-                if (myData->myDisplay.myBoolNearestPointsList[(Standard_Integer) vdir2] < 0)
-                {
-                    genListIndex(myData->myDisplay.myBoolNearestPointsList[(Standard_Integer) vdir2]);
-                    glNewList(myData->myDisplay.myBoolNearestPointsList[(Standard_Integer) vdir2], GL_COMPILE);
-                    drawBoolPoints(vdir2, Standard_True, myData->myBoolVoxels,
-                                   xmin, xmax, ymin, ymax, zmin, zmax);
-                    glEndList();
-                }
-                if (myData->myDisplay.myBoolNearestPointsList[(Standard_Integer) vdir3] < 0)
-                {
-                    genListIndex(myData->myDisplay.myBoolNearestPointsList[(Standard_Integer) vdir3]);
-                    glNewList(myData->myDisplay.myBoolNearestPointsList[(Standard_Integer) vdir3], GL_COMPILE);
-                    drawBoolPoints(vdir3, Standard_True, myData->myBoolVoxels,
-                                   xmin, xmax, ymin, ymax, zmin, zmax);
-                    glEndList();
-                }
-                glCallList(myData->myDisplay.myBoolNearestPointsList[(Standard_Integer) vdir1]);
-                glCallList(myData->myDisplay.myBoolNearestPointsList[(Standard_Integer) vdir2]);
-                glCallList(myData->myDisplay.myBoolNearestPointsList[(Standard_Integer) vdir3]);
-            }
-            else
-            {
-                drawBoolPoints(vdir1, Standard_True, myData->myBoolVoxels,
-                               xmin, xmax, ymin, ymax, zmin, zmax);
-                drawBoolPoints(vdir2, Standard_True, myData->myBoolVoxels,
-                               xmin, xmax, ymin, ymax, zmin, zmax);
-                drawBoolPoints(vdir3, Standard_True, myData->myBoolVoxels,
-                               xmin, xmax, ymin, ymax, zmin, zmax);
-            }
-        }
-        else
-        {
-            if (myData->myDisplay.myUsageOfGLlists)
-            {
-                if (myData->myDisplay.myBoolPointsFirst)
-                {
-                    // Delete previous GL list.
-                    if (myData->myDisplay.myBoolPointsList > 0)
-                    {
-                        glDeleteLists(myData->myDisplay.myBoolPointsList, 1);
-                        myData->myDisplay.myBoolPointsList = -1;
-                    }
-
-                    // Generate a new GL list
-                    genListIndex(myData->myDisplay.myBoolPointsList);
-                    glNewList(myData->myDisplay.myBoolPointsList, GL_COMPILE);
-                    VoxelDirection vdir = getVoxelDirection(viewnormal);
-                    drawBoolPoints(vdir, Standard_False, myData->myBoolVoxels,
-                                   xmin, xmax, ymin, ymax, zmin, zmax);
-                    glEndList();
-
-                    // The first call has just been passed...
-                    myData->myDisplay.myBoolPointsFirst = Standard_False;
-                }
-                glCallList(myData->myDisplay.myBoolPointsList);
-            }
-            else
-            {
-                VoxelDirection vdir = getVoxelDirection(viewnormal);
-                drawBoolPoints(vdir, Standard_False, myData->myBoolVoxels,
-                               xmin, xmax, ymin, ymax, zmin, zmax);
-            }
-        }
-	}
-
-    // Color points
-	if (myData->myColorVoxels)
-    {
-        if (nearest || myData->myDisplay.myDegenerateMode)
-        {
-	        VoxelDirection vdir1, vdir2, vdir3;
-            getVoxel3Directions(viewnormal, vdir1, vdir2, vdir3);
-
-            if (myData->myDisplay.myUsageOfGLlists)
-            {
-                // Clean all allocated GL lists for the case of first call.
-                if (myData->myDisplay.myColorNearestPointsFirst)
-                {
-                    for (Standard_Integer idir = Xminus; idir <= Zplus; idir++)
-                    {
-                        if (myData->myDisplay.myColorNearestPointsList[idir] > 0)
-                        {
-                            glDeleteLists(myData->myDisplay.myColorNearestPointsList[idir], 1);
-                            myData->myDisplay.myColorNearestPointsList[idir] = -1;
-                        }
-                    }
-                    myData->myDisplay.myColorNearestPointsFirst = Standard_False;
-                }
-
-                // Generate GL lists if needed.
-                if (myData->myDisplay.myColorNearestPointsList[(Standard_Integer) vdir1] < 0)
-                {
-                    genListIndex(myData->myDisplay.myColorNearestPointsList[(Standard_Integer) vdir1]);
-                    glNewList(myData->myDisplay.myColorNearestPointsList[(Standard_Integer) vdir1], GL_COMPILE);
-                    drawColorPoints(vdir1, Standard_True, myData->myColorVoxels, myData->myDisplay.myColors,
-                                    myData->myDisplay.myColorMinValue, myData->myDisplay.myColorMaxValue,
-                                    xmin, xmax, ymin, ymax, zmin, zmax);
-                    glEndList();
-                }
-                if (myData->myDisplay.myColorNearestPointsList[(Standard_Integer) vdir2] < 0)
-                {
-                    genListIndex(myData->myDisplay.myColorNearestPointsList[(Standard_Integer) vdir2]);
-                    glNewList(myData->myDisplay.myColorNearestPointsList[(Standard_Integer) vdir2], GL_COMPILE);
-                    drawColorPoints(vdir2, Standard_True, myData->myColorVoxels, myData->myDisplay.myColors,
-                                    myData->myDisplay.myColorMinValue, myData->myDisplay.myColorMaxValue,
-                                    xmin, xmax, ymin, ymax, zmin, zmax);
-                    glEndList();
-                }
-                if (myData->myDisplay.myColorNearestPointsList[(Standard_Integer) vdir3] < 0)
-                {
-                    genListIndex(myData->myDisplay.myColorNearestPointsList[(Standard_Integer) vdir3]);
-                    glNewList(myData->myDisplay.myColorNearestPointsList[(Standard_Integer) vdir3], GL_COMPILE);
-                    drawColorPoints(vdir3, Standard_True, myData->myColorVoxels, myData->myDisplay.myColors,
-                                    myData->myDisplay.myColorMinValue, myData->myDisplay.myColorMaxValue,
-                                    xmin, xmax, ymin, ymax, zmin, zmax);
-                    glEndList();
-                }
-            
-                glCallList(myData->myDisplay.myColorNearestPointsList[(Standard_Integer) vdir1]);
-                glCallList(myData->myDisplay.myColorNearestPointsList[(Standard_Integer) vdir2]);
-                glCallList(myData->myDisplay.myColorNearestPointsList[(Standard_Integer) vdir3]);
-            }
-            else
-            {
-                drawColorPoints(vdir1, Standard_True, myData->myColorVoxels, myData->myDisplay.myColors,
-                                myData->myDisplay.myColorMinValue, myData->myDisplay.myColorMaxValue,
-                                xmin, xmax, ymin, ymax, zmin, zmax);
-                drawColorPoints(vdir2, Standard_True, myData->myColorVoxels, myData->myDisplay.myColors,
-                                myData->myDisplay.myColorMinValue, myData->myDisplay.myColorMaxValue,
-                                xmin, xmax, ymin, ymax, zmin, zmax);
-                drawColorPoints(vdir3, Standard_True, myData->myColorVoxels, myData->myDisplay.myColors,
-                                myData->myDisplay.myColorMinValue, myData->myDisplay.myColorMaxValue,
-                                xmin, xmax, ymin, ymax, zmin, zmax);
-            }
-        }
-        else
-        {
-            if (myData->myDisplay.myUsageOfGLlists)
-            {
-                if (myData->myDisplay.myColorPointsFirst)
-                {
-                    // Delete previous GL list.
-                    if (myData->myDisplay.myColorPointsList > 0)
-                    {
-                        glDeleteLists(myData->myDisplay.myColorPointsList, 1);
-                        myData->myDisplay.myColorPointsList = -1;
-                    }
-
-                    // Generate a new GL list
-                    genListIndex(myData->myDisplay.myColorPointsList);
-                    glNewList(myData->myDisplay.myColorPointsList, GL_COMPILE);
-                    VoxelDirection vdir = getVoxelDirection(viewnormal);
-                    drawColorPoints(vdir, Standard_False, myData->myColorVoxels, myData->myDisplay.myColors,
-                                    myData->myDisplay.myColorMinValue, myData->myDisplay.myColorMaxValue,
-                                    xmin, xmax, ymin, ymax, zmin, zmax);
-                    glEndList();
-
-                    // The first call has just been passed...
-                    myData->myDisplay.myColorPointsFirst = Standard_False;
-                }
-                glCallList(myData->myDisplay.myColorPointsList);
-            }
-            else
-            {
-                VoxelDirection vdir = getVoxelDirection(viewnormal);
-                drawColorPoints(vdir, Standard_False, myData->myColorVoxels, myData->myDisplay.myColors,
-                                myData->myDisplay.myColorMinValue, myData->myDisplay.myColorMaxValue,
-                                xmin, xmax, ymin, ymax, zmin, zmax);
-            }
-        }
-	}
-
-    // Recursive Octree Boolean points
-	if (myData->myROctBoolVoxels)
-    {
-        if (nearest || myData->myDisplay.myDegenerateMode)
-        {
-	        VoxelDirection vdir1, vdir2, vdir3;
-            getVoxel3Directions(viewnormal, vdir1, vdir2, vdir3);
-
-            if (myData->myDisplay.myUsageOfGLlists)
-            {
-                // Clean all allocated GL lists for the case of first call.
-                if (myData->myDisplay.myROctBoolNearestPointsFirst)
-                {
-                    for (Standard_Integer idir = Xminus; idir <= Zplus; idir++)
-                    {
-                        if (myData->myDisplay.myROctBoolNearestPointsList[idir] > 0)
-                        {
-                            glDeleteLists(myData->myDisplay.myROctBoolNearestPointsList[idir], 1);
-                            myData->myDisplay.myROctBoolNearestPointsList[idir] = -1;
-                        }
-                    }
-                    myData->myDisplay.myROctBoolNearestPointsFirst = Standard_False;
-                }
-
-                // Generate GL lists if needed.
-                if (myData->myDisplay.myROctBoolNearestPointsList[(Standard_Integer) vdir1] < 0)
-                {
-                    genListIndex(myData->myDisplay.myROctBoolNearestPointsList[(Standard_Integer) vdir1]);
-                    glNewList(myData->myDisplay.myROctBoolNearestPointsList[(Standard_Integer) vdir1], GL_COMPILE);
-                    drawROctBoolPoints(vdir1, Standard_True, myData->myROctBoolVoxels,
-                                       xmin, xmax, ymin, ymax, zmin, zmax);
-                    glEndList();
-                }
-                if (myData->myDisplay.myROctBoolNearestPointsList[(Standard_Integer) vdir2] < 0)
-                {
-                    genListIndex(myData->myDisplay.myROctBoolNearestPointsList[(Standard_Integer) vdir2]);
-                    glNewList(myData->myDisplay.myROctBoolNearestPointsList[(Standard_Integer) vdir2], GL_COMPILE);
-                    drawROctBoolPoints(vdir2, Standard_True, myData->myROctBoolVoxels,
-                                       xmin, xmax, ymin, ymax, zmin, zmax);
-                    glEndList();
-                }
-                if (myData->myDisplay.myROctBoolNearestPointsList[(Standard_Integer) vdir3] < 0)
-                {
-                    genListIndex(myData->myDisplay.myROctBoolNearestPointsList[(Standard_Integer) vdir3]);
-                    glNewList(myData->myDisplay.myROctBoolNearestPointsList[(Standard_Integer) vdir3], GL_COMPILE);
-                    drawROctBoolPoints(vdir3, Standard_True, myData->myROctBoolVoxels,
-                                       xmin, xmax, ymin, ymax, zmin, zmax);
-                    glEndList();
-                }
-                glCallList(myData->myDisplay.myROctBoolNearestPointsList[(Standard_Integer) vdir1]);
-                glCallList(myData->myDisplay.myROctBoolNearestPointsList[(Standard_Integer) vdir2]);
-                glCallList(myData->myDisplay.myROctBoolNearestPointsList[(Standard_Integer) vdir3]);
-            }
-            else
-            {
-                drawROctBoolPoints(vdir1, Standard_True, myData->myROctBoolVoxels,
-                                   xmin, xmax, ymin, ymax, zmin, zmax);
-                drawROctBoolPoints(vdir2, Standard_True, myData->myROctBoolVoxels,
-                                   xmin, xmax, ymin, ymax, zmin, zmax);
-                drawROctBoolPoints(vdir3, Standard_True, myData->myROctBoolVoxels,
-                                   xmin, xmax, ymin, ymax, zmin, zmax);
-            }
-        }
-        else
-        {
-            if (myData->myDisplay.myUsageOfGLlists)
-            {
-                if (myData->myDisplay.myROctBoolPointsFirst)
-                {
-                    // Delete previous GL list.
-                    if (myData->myDisplay.myROctBoolPointsList > 0)
-                    {
-                        glDeleteLists(myData->myDisplay.myROctBoolPointsList, 1);
-                        myData->myDisplay.myROctBoolPointsList = -1;
-                    }
-
-                    // Generate a new GL list
-                    genListIndex(myData->myDisplay.myROctBoolPointsList);
-                    glNewList(myData->myDisplay.myROctBoolPointsList, GL_COMPILE);
-                    VoxelDirection vdir = getVoxelDirection(viewnormal);
-                    drawROctBoolPoints(vdir, Standard_False, myData->myROctBoolVoxels,
-                                       xmin, xmax, ymin, ymax, zmin, zmax);
-                    glEndList();
-
-                    // The first call has just been passed...
-                    myData->myDisplay.myROctBoolPointsFirst = Standard_False;
-                }
-                glCallList(myData->myDisplay.myROctBoolPointsList);
-            }
-            else
-            {
-                VoxelDirection vdir = getVoxelDirection(viewnormal);
-                drawROctBoolPoints(vdir, Standard_False, myData->myROctBoolVoxels,
-                                   xmin, xmax, ymin, ymax, zmin, zmax);
-            }
-        }
-	}
-
-    //timer.Stop();
-	//Standard_Real seconds, cpu;
-	//Standard_Integer minutes, hours;
-	//timer.Show(seconds, minutes, hours, cpu);
-    //cout<<"DisplayPoints()"<<" took "<<minutes<<" minutes, "<<seconds<<" seconds"<<endl;
-}
-
-/**************************************************************************/
-void VoxelClient_VisDrawer::DisplayBoxes(const Standard_Boolean nearest)
-{
-    // Range of displayed data
-    Standard_Real xmin = myData->myDisplay.myDisplayedXMin;
-    Standard_Real xmax = myData->myDisplay.myDisplayedXMax;
-    Standard_Real ymin = myData->myDisplay.myDisplayedYMin;
-    Standard_Real ymax = myData->myDisplay.myDisplayedYMax;
-    Standard_Real zmin = myData->myDisplay.myDisplayedZMin;
-    Standard_Real zmax = myData->myDisplay.myDisplayedZMax;
-
-    // Find the side of the cube which normal looks to (or out) the user's eye.
-	gp_Dir viewnormal;
-	getNormal(viewnormal);
-
-    // Get three sides of the box looking to the user.
-	VoxelDirection vdir1, vdir2, vdir3;
-    getVoxel3Directions(viewnormal, vdir1, vdir2, vdir3);
-
-    // Three quadrangles with normals looking to the user
-    gp_Pln plane1(gp::Origin(), viewnormal);
-    gp_Pln plane2(plane1), plane3(plane1);
-
-    // Boolean boxes
-	if (myData->myBoolVoxels &&
-        myData->myBoolVoxels->GetNbX() &&
-        myData->myBoolVoxels->GetNbY() &&
-        myData->myBoolVoxels->GetNbZ())
-    {
-        // Compute size
-        Standard_Real dx = myData->myBoolVoxels->GetXLen() / (Standard_Real) myData->myBoolVoxels->GetNbX();
-        Standard_Real dy = myData->myBoolVoxels->GetYLen() / (Standard_Real) myData->myBoolVoxels->GetNbY();
-        Standard_Real dz = myData->myBoolVoxels->GetZLen() / (Standard_Real) myData->myBoolVoxels->GetNbZ();
-        Standard_Real d  = 0.01 * (Standard_Real) myData->myDisplay.myQuadrangleSize;
-        dx *= d;
-        dy *= d;
-        dz *= d;
-
-        // Translatethe quadrangles to the side of the voxel
-        gp_Pnt p11, p12, p13, p14, p21, p22, p23, p24, p31, p32, p33, p34;
-        setPlaneNormal(vdir1, dx, dy, dz, plane1, p11, p12, p13, p14);
-        setPlaneNormal(vdir2, dx, dy, dz, plane2, p21, p22, p23, p24);
-        setPlaneNormal(vdir3, dx, dy, dz, plane3, p31, p32, p33, p34);
-
-        // Display
-        Standard_Boolean skin = nearest || myData->myDisplay.myDegenerateMode;
-        drawBoolQuadrangles(myData->myBoolVoxels, vdir1, plane1.Axis().Direction(), 
-                            skin, p11, p12, p13, p14,
-                            xmin, xmax, ymin, ymax, zmin, zmax);
-        drawBoolQuadrangles(myData->myBoolVoxels, vdir2, plane2.Axis().Direction(), 
-                            skin, p21, p22, p23, p24,
-                            xmin, xmax, ymin, ymax, zmin, zmax);
-        drawBoolQuadrangles(myData->myBoolVoxels, vdir3, plane3.Axis().Direction(), 
-                            skin, p31, p32, p33, p34,
-                            xmin, xmax, ymin, ymax, zmin, zmax);
-    }
-    // Color quadrangles
-	else if (myData->myColorVoxels &&
-             myData->myColorVoxels->GetNbX() &&
-             myData->myColorVoxels->GetNbY() &&
-             myData->myColorVoxels->GetNbZ())
-    {
-        // Compute size
-        Standard_Real dx = myData->myColorVoxels->GetXLen() / (Standard_Real) myData->myColorVoxels->GetNbX();
-        Standard_Real dy = myData->myColorVoxels->GetYLen() / (Standard_Real) myData->myColorVoxels->GetNbY();
-        Standard_Real dz = myData->myColorVoxels->GetZLen() / (Standard_Real) myData->myColorVoxels->GetNbZ();
-        Standard_Real d  = 0.01 * (Standard_Real) myData->myDisplay.myQuadrangleSize;
-        dx *= d;
-        dy *= d;
-        dz *= d;
-
-        // Translatethe quadrangles to the side of the voxel
-        gp_Pnt p11, p12, p13, p14, p21, p22, p23, p24, p31, p32, p33, p34;
-        setPlaneNormal(vdir1, dx, dy, dz, plane1, p11, p12, p13, p14);
-        setPlaneNormal(vdir2, dx, dy, dz, plane2, p21, p22, p23, p24);
-        setPlaneNormal(vdir3, dx, dy, dz, plane3, p31, p32, p33, p34);
-
-        // Display
-        Standard_Boolean skin = nearest || myData->myDisplay.myDegenerateMode;
-        drawColorQuadrangles(myData->myColorVoxels, vdir1, plane1.Axis().Direction(), skin, 
-                             myData->myDisplay.myColors, p11, p12, p13, p14,
-                             myData->myDisplay.myColorMinValue, myData->myDisplay.myColorMaxValue,
-                             xmin, xmax, ymin, ymax, zmin, zmax);
-        drawColorQuadrangles(myData->myColorVoxels, vdir2, plane2.Axis().Direction(), skin, 
-                             myData->myDisplay.myColors, p21, p22, p23, p24,
-                             myData->myDisplay.myColorMinValue, myData->myDisplay.myColorMaxValue,
-                             xmin, xmax, ymin, ymax, zmin, zmax);
-        drawColorQuadrangles(myData->myColorVoxels, vdir3, plane3.Axis().Direction(), skin, 
-                             myData->myDisplay.myColors, p31, p32, p33, p34,
-                             myData->myDisplay.myColorMinValue, myData->myDisplay.myColorMaxValue,
-                             xmin, xmax, ymin, ymax, zmin, zmax);
-    }
-    // Recursive Octree Boolean boxes
-	else if (myData->myROctBoolVoxels &&
-             myData->myROctBoolVoxels->GetNbX() &&
-             myData->myROctBoolVoxels->GetNbY() &&
-             myData->myROctBoolVoxels->GetNbZ())
-    {
-        // Compute size
-        Standard_Real dx = myData->myROctBoolVoxels->GetXLen() / (Standard_Real) myData->myROctBoolVoxels->GetNbX();
-        Standard_Real dy = myData->myROctBoolVoxels->GetYLen() / (Standard_Real) myData->myROctBoolVoxels->GetNbY();
-        Standard_Real dz = myData->myROctBoolVoxels->GetZLen() / (Standard_Real) myData->myROctBoolVoxels->GetNbZ();
-        Standard_Real d  = 0.01 * (Standard_Real) myData->myDisplay.myQuadrangleSize;
-        dx *= d;
-        dy *= d;
-        dz *= d;
-
-        // Translatethe quadrangles to the side of the voxel
-        gp_Pnt p11, p12, p13, p14, p21, p22, p23, p24, p31, p32, p33, p34;
-        setPlaneNormal(vdir1, dx, dy, dz, plane1, p11, p12, p13, p14);
-        setPlaneNormal(vdir2, dx, dy, dz, plane2, p21, p22, p23, p24);
-        setPlaneNormal(vdir3, dx, dy, dz, plane3, p31, p32, p33, p34);
-
-        // Display
-        Standard_Boolean skin = nearest || myData->myDisplay.myDegenerateMode;
-        drawROctBoolQuadrangles(myData->myROctBoolVoxels, vdir1, plane1.Axis().Direction(), 
-                                skin, p11, p12, p13, p14,
-                                xmin, xmax, ymin, ymax, zmin, zmax);
-        drawROctBoolQuadrangles(myData->myROctBoolVoxels, vdir2, plane2.Axis().Direction(), 
-                                skin, p21, p22, p23, p24,
-                                xmin, xmax, ymin, ymax, zmin, zmax);
-        drawROctBoolQuadrangles(myData->myROctBoolVoxels, vdir3, plane3.Axis().Direction(), 
-                                skin, p31, p32, p33, p34,
-                                xmin, xmax, ymin, ymax, zmin, zmax);
-    }
-}
-
-/**************************************************************************/
-void VoxelClient_VisDrawer::DisplayTriangulation(const Standard_Boolean theHighlight)
-{
-    if(!myData || myData->myTriangulation.IsNull())
-        return;
-
-    glEnable(GL_DEPTH_TEST);
-    glEnable(GL_LIGHTING);
-
-    const TColgp_Array1OfPnt& nodes = myData->myTriangulation->Nodes();
-    const Poly_Array1OfTriangle& triangles = myData->myTriangulation->Triangles();
-    Standard_Integer itriangle = triangles.Lower(), nb_triangles = triangles.Upper();
-
-    Standard_Boolean compute_normals = Standard_False;
-    if (myData->myNormalsOfNodes.IsNull())
-    {
-        compute_normals = Standard_True;
-        myData->myNormalsOfNodes = new TColgp_HArray1OfDir(itriangle, nb_triangles);
-
-        // Release the GL list
-        if (myData->myDisplay.myTriangulationList > 0)
-        {
-            glDeleteLists(myData->myDisplay.myTriangulationList, 1);
-            myData->myDisplay.myTriangulationList = -1;
-        }
-
-        // Generate a new GL list
-        if (myData->myDisplay.myUsageOfGLlists)
-        {
-            genListIndex(myData->myDisplay.myTriangulationList);
-            glNewList(myData->myDisplay.myTriangulationList, GL_COMPILE);
-        }
-    }
-    TColgp_Array1OfDir& normals = myData->myNormalsOfNodes->ChangeArray1();
-
-    if (!myData->myDisplay.myUsageOfGLlists || compute_normals)
-    {
-
-        glBegin(GL_TRIANGLES);
-
-        Standard_Integer n1, n2, n3;
-        Standard_Real x, y, z;
-        for (; itriangle <= nb_triangles; itriangle++)
-        {
-            const Poly_Triangle& t = triangles.Value(itriangle);
-            t.Get(n1, n2, n3);
-
-            const gp_Pnt& p1 = nodes.Value(n1);
-            const gp_Pnt& p2 = nodes.Value(n2);
-            const gp_Pnt& p3 = nodes.Value(n3);
-
-            // Make the normal:
-            if (compute_normals)
-            {
-                gp_Vec v1(p1, p2), v2(p1, p3);
-                v1.Cross(v2);
-                if (v1.SquareMagnitude() > 1.e-14)
-                    v1.Normalize();
-                else
-                    v1.SetCoord(0.0, 0.0, 1.0);
-                normals.SetValue(itriangle, v1);
-                v1.Coord(x, y, z);
-            }
-            else
-            {
-                normals.Value(itriangle).Coord(x, y, z);
-            }
-            glNormal3d(x, y, z);
-
-            // P1
-            p1.Coord(x, y, z);
-            glVertex3d(x, y, z);
-
-            // P2
-            p2.Coord(x, y, z);
-            glVertex3d(x, y, z);
-
-            // P3
-            p3.Coord(x, y, z);
-            glVertex3d(x, y, z);
-        }
-
-        glEnd();
-
-        if (myData->myDisplay.myUsageOfGLlists)
-            glEndList();
-    }
-
-    if (myData->myDisplay.myUsageOfGLlists)
-        glCallList(myData->myDisplay.myTriangulationList);
-}
-
-void VoxelClient_VisDrawer::HighlightVoxel()
-{
-    if (myData &&
-        myData->myDisplay.myHighlightx >= 0 &&
-        myData->myDisplay.myHighlighty >= 0 &&
-        myData->myDisplay.myHighlightz >= 0)
-    {
-        Standard_Integer nbx, nby, nbz;
-        Standard_Real xlen, ylen, zlen, xc, yc, zc;
-        Voxel_DS* ds = (Voxel_DS*) myData->myBoolVoxels;
-        if (myData->myColorVoxels)
-            ds = (Voxel_DS*) myData->myColorVoxels;
-        if (myData->myROctBoolVoxels)
-            ds = (Voxel_DS*) myData->myROctBoolVoxels;
-        nbx = ds->GetNbX();
-        nby = ds->GetNbY();
-        nbz = ds->GetNbZ();
-        xlen = ds->GetXLen();
-        ylen = ds->GetYLen();
-        zlen = ds->GetZLen();
-        ds->GetCenter(myData->myDisplay.myHighlightx, 
-                      myData->myDisplay.myHighlighty, 
-                      myData->myDisplay.myHighlightz, 
-                      xc, yc, zc);
-
-        Standard_Real half_voxelx = xlen / Standard_Real(nbx) / 2.0;
-        Standard_Real half_voxely = ylen / Standard_Real(nby) / 2.0;
-        Standard_Real half_voxelz = zlen / Standard_Real(nbz) / 2.0;
-        Standard_Real x1 = xc - half_voxelx, y1 = yc - half_voxely, z1 = zc - half_voxelz;
-        Standard_Real x2 = xc + half_voxelx, y2 = yc + half_voxely, z2 = zc + half_voxelz;
-
-        setColor(Quantity_NOC_BLUE1, Standard_True);
-        setTypeOfLine(Aspect_TOL_SOLID);
-        setWidthOfLine(3);
-
-        glBegin(GL_LINES);
-
-        glVertex3d(x1, y1, z1);
-        glVertex3d(x1, y2, z1);
-
-        glVertex3d(x1, y1, z1);
-        glVertex3d(x2, y1, z1);
-
-        glVertex3d(x1, y1, z1);
-        glVertex3d(x1, y1, z2);
-
-        glVertex3d(x1, y2, z1);
-        glVertex3d(x2, y2, z1);
-
-        glVertex3d(x2, y1, z1);
-        glVertex3d(x2, y2, z1);
-
-        glVertex3d(x2, y2, z1);
-        glVertex3d(x2, y2, z2);
-
-        glVertex3d(x1, y1, z2);
-        glVertex3d(x1, y2, z2);
-
-        glVertex3d(x1, y1, z2);
-        glVertex3d(x2, y1, z2);
-
-        glVertex3d(x2, y1, z2);
-        glVertex3d(x2, y2, z2);
-
-        glVertex3d(x2, y2, z2);
-        glVertex3d(x1, y2, z2);
-
-        glVertex3d(x1, y2, z2);
-        glVertex3d(x1, y2, z1);
-
-        glVertex3d(x2, y1, z1);
-        glVertex3d(x2, y1, z2);
-
-        glEnd();
-    }
-}
diff --git a/src/VrmlData/VrmlData_Geometry.cxx b/src/VrmlData/VrmlData_Geometry.cxx
index 171c879..b8ce84f 100644
--- a/src/VrmlData/VrmlData_Geometry.cxx
+++ b/src/VrmlData/VrmlData_Geometry.cxx
@@ -70,14 +70,10 @@ IMPLEMENT_STANDARD_RTTIEXT (VrmlData_TextureCoordinate, VrmlData_Node)
 //purpose  : 
 //=======================================================================
 
-const gp_XYZ& VrmlData_ArrayVec3d::Value (const Standard_Integer i) const
+const gp_XYZ& VrmlData_ArrayVec3d::Value (const Standard_Size i) const
 {
-  size_t anIndex = (size_t)i;
-  if  (anIndex >= myLength) {
-    static gp_XYZ anOrigin (0., 0., 0.);
-    return anOrigin;
-  }
-  return myArray[i];
+  static gp_XYZ anOrigin (0., 0., 0.);
+  return i < myLength ? myArray[i] : anOrigin;
 }
 
 //=======================================================================
@@ -642,7 +638,7 @@ VrmlData_ErrorStatus VrmlData_ArrayVec3d::ReadArray
   if (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) {
     // Match the name with the current word in the stream
     if (theName) {
-      const Standard_Integer aNameLen = strlen(theName);
+      const Standard_Size aNameLen = strlen(theName);
       if (strncmp (theBuffer.LinePtr, theName, aNameLen))
         aStatus = VrmlData_VrmlFormatError;
       else
diff --git a/src/VrmlData/VrmlData_IndexedFaceSet.cxx b/src/VrmlData/VrmlData_IndexedFaceSet.cxx
index 3981ecc..b21bb5c 100644
--- a/src/VrmlData/VrmlData_IndexedFaceSet.cxx
+++ b/src/VrmlData/VrmlData_IndexedFaceSet.cxx
@@ -104,7 +104,7 @@ const Handle(TopoDS_TShape)& VrmlData_IndexedFaceSet::TShape ()
           arrNodes[arrIndice[2]] - arrNodes[arrIndice[0]]
         };
         if ((aVec[0] ^ aVec[1]).SquareModulus() >
-            Precision::Confusion()*Precision::Confusion())
+            Precision::SquareConfusion())
           ++nTri;
         else {
           const_cast<Standard_Integer&> (arrIndice[0]) = -1;
diff --git a/src/VrmlData/VrmlData_Scene.cxx b/src/VrmlData/VrmlData_Scene.cxx
index 2254c74..70385c1 100644
--- a/src/VrmlData/VrmlData_Scene.cxx
+++ b/src/VrmlData/VrmlData_Scene.cxx
@@ -860,7 +860,7 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadArrIndex
             aStatus = VrmlData_UnrecoverableError;
           else {
             for (size_t i = 0; i < aNbBlocks; i++)
-              anArray[i] = vecIndice(i);
+              anArray[i] = vecIndice((Standard_Integer)i);
             theNBlocks = aNbBlocks;
             theArray = anArray;
           } 
diff --git a/src/VrmlData/VrmlData_ShapeConvert.cxx b/src/VrmlData/VrmlData_ShapeConvert.cxx
index 2762d50..3749524 100644
--- a/src/VrmlData/VrmlData_ShapeConvert.cxx
+++ b/src/VrmlData/VrmlData_ShapeConvert.cxx
@@ -257,9 +257,9 @@ void VrmlData_ShapeConvert::Convert (const Standard_Boolean theExtractFaces,
                   TColgp_Array1OfPnt arrNodes(1, nbNodes);
                   TColStd_Array1OfReal arrUVNodes(1, nbNodes);
 
-                  for(i = 1; i <= nbNodes; i++) {
-                    arrUVNodes(i) = aPrs->Value(aPrs->Lower() + i - 1);
-                    arrNodes(i) = aCurve.Value(arrUVNodes(i));
+                  for(Standard_Integer j = 1; j <= nbNodes; j++) {
+                    arrUVNodes(j) = aPrs->Value(aPrs->Lower() + j - 1);
+                    arrNodes(j) = aCurve.Value(arrUVNodes(j));
                   }
                   aPol = new Poly_Polygon3D(arrNodes, arrUVNodes);
                   aPol->Deflection (aPT->Deflection());
@@ -276,9 +276,9 @@ void VrmlData_ShapeConvert::Convert (const Standard_Boolean theExtractFaces,
                 
                   TColgp_Array1OfPnt arrNodes(1, nbNodes);
                   TColStd_Array1OfReal arrUVNodes(1, nbNodes);
-                  for (i = 1; i <= nbNodes; i++) {
-                    arrNodes(i) = TD.Value(i);
-                    arrUVNodes(i) = TD.Parameter(i);
+                  for (Standard_Integer j = 1; j <= nbNodes; j++) {
+                    arrNodes(j) = TD.Value(j);
+                    arrUVNodes(j) = TD.Parameter(j);
                   }
                   aPol = new Poly_Polygon3D(arrNodes, arrUVNodes);
                   aPol->Deflection (aDeflection);
@@ -419,7 +419,7 @@ Handle_VrmlData_Geometry VrmlData_ShapeConvert::triToIndexedFaceSet
   Poly_Connect PC(theTri);
   // Create the Normals node (if UV- values are available)
   TopLoc_Location aLoc;
-  const Standard_Real aConf2 = Precision::Confusion()*Precision::Confusion();
+  const Standard_Real aConf2 = Precision::SquareConfusion();
   const Handle(Geom_Surface) aSurface = BRep_Tool::Surface (theFace, aLoc);
   if (theTri->HasUVNodes() && aSurface.IsNull() == Standard_False) {
     if (aSurface->IsCNu(1) && aSurface->IsCNv(1))
diff --git a/src/WNT/WNT.cdl b/src/WNT/WNT.cdl
index 670a398..0942dd6 100644
--- a/src/WNT/WNT.cdl
+++ b/src/WNT/WNT.cdl
@@ -20,7 +20,6 @@
 
 -- Modifications: DCB at March 1998  Porting MFT for Windows NT (95)
 --                PLOTNIKOV Eugeny at July 1998 (BUC60286)
---                VKH at October 1999 (class PixMap added)
 
 package WNT
 
@@ -75,10 +74,6 @@ package WNT
         ---Purpose:  Creates the Window drawable.
         ---Category: Classes
 
-    class PixMap;
-    ---Purpose: Creates a windows bitmap
-    ---Category: Classes
-
     class WClass;
         ---Purpose:  Creates a Windows NT window class.
         ---Category: Classes
diff --git a/src/WNT/WNT_FontMapEntry.cxx b/src/WNT/WNT_FontMapEntry.cxx
index e4166f2..41cba9f 100644
--- a/src/WNT/WNT_FontMapEntry.cxx
+++ b/src/WNT/WNT_FontMapEntry.cxx
@@ -30,7 +30,7 @@
 
 WNT_FontMapEntry :: WNT_FontMapEntry ( const Standard_CString aFontName )
 {
-  int   i;
+  Standard_Size   i;
   char* p;
 
   char* fName = new char[ strlen ( aFontName ) + 1 ];
diff --git a/src/WNT/WNT_ImageManager.cxx b/src/WNT/WNT_ImageManager.cxx
index bf0a823..43abee8 100644
--- a/src/WNT/WNT_ImageManager.cxx
+++ b/src/WNT/WNT_ImageManager.cxx
@@ -391,7 +391,7 @@ Standard_Integer WNT_ImageManager :: StringHashCode (
 
  } u;
 
- n = strlen ( aString );
+ n = (Standard_Integer) strlen ( aString );
 
  if ( n > 0 ) {
 
diff --git a/src/WNT/WNT_ImageProcessor.cxx b/src/WNT/WNT_ImageProcessor.cxx
index 6f86756..f5e7e38 100644
--- a/src/WNT/WNT_ImageProcessor.cxx
+++ b/src/WNT/WNT_ImageProcessor.cxx
@@ -43,7 +43,8 @@
 #include <Quantity_Color.hxx>
 #include <WNT_GraphicDevice.hxx>
 #include <WNT_TypeOfImage.hxx>
-#include <Image_PixMap.hxx>
+#include <Image_AlienPixMap.hxx>
+#include <TCollection_AsciiString.hxx>
 
 //***//
 #define I_SUCCESS Standard_True
@@ -290,64 +291,45 @@ int __WNT_API SaveWindowToFile (
 
 }  // end SaveWindowToFile
 
-int DumpBitmapToFile (Handle(WNT_GraphicDevice)& , HDC ,
-                      HBITMAP theHBitmap,
-                      char* theFileName)
+int DumpBitmapToFile (HBITMAP     theHBitmap,
+                      const char* theFileName)
 {
-  // Copy data from HBITMAP
+  // get informations about the bitmap
   BITMAP aBitmap;
+  if (GetObject (theHBitmap, sizeof(BITMAP), &aBitmap) == 0)
+  {
+    return I_ERROR;
+  }
 
-  // Get informations about the bitmap
-  GetObject (theHBitmap, sizeof(BITMAP), (LPSTR )&aBitmap);
-  Standard_Integer aWidth  = aBitmap.bmWidth;
-  Standard_Integer aHeight = aBitmap.bmHeight;
+  Image_AlienPixMap anImage;
+  const Standard_Size aSizeRowBytes = Standard_Size(aBitmap.bmWidth) * 4;
+  if (!anImage.InitTrash (Image_PixMap::ImgBGR32, Standard_Size(aBitmap.bmWidth), Standard_Size(aBitmap.bmHeight), aSizeRowBytes))
+  {
+    return I_ERROR;
+  }
+  anImage.SetTopDown (false);
 
   // Setup image data
   BITMAPINFOHEADER aBitmapInfo;
   memset (&aBitmapInfo, 0, sizeof(BITMAPINFOHEADER));
-  aBitmapInfo.biSize = sizeof(BITMAPINFOHEADER);
-  aBitmapInfo.biWidth = aWidth;
-  aBitmapInfo.biHeight = aHeight; // positive means bottom-up!
-  aBitmapInfo.biPlanes = 1;
-  aBitmapInfo.biBitCount = 32;
+  aBitmapInfo.biSize        = sizeof(BITMAPINFOHEADER);
+  aBitmapInfo.biWidth       = aBitmap.bmWidth;
+  aBitmapInfo.biHeight      = aBitmap.bmHeight; // positive means bottom-up!
+  aBitmapInfo.biPlanes      = 1;
+  aBitmapInfo.biBitCount    = 32; // use 32bit for automatic word-alignment per row
   aBitmapInfo.biCompression = BI_RGB;
 
-  Standard_Integer aBytesPerLine = aWidth * 4;
-  Standard_Byte* aDataPtr = new Standard_Byte[aBytesPerLine * aHeight];
-
   // Copy the pixels
   HDC aDC = GetDC (NULL);
-  Standard_Boolean isSuccess
-    = GetDIBits (aDC,             // handle to DC
-                 theHBitmap,      // handle to bitmap
-                 0,               // first scan line to set
-                 aHeight,         // number of scan lines to copy
-                 aDataPtr,        // array for bitmap bits
-                 (LPBITMAPINFO )&aBitmapInfo, // bitmap data info
-                 DIB_RGB_COLORS   // RGB
-                 ) != 0;
-
-  if (isSuccess)
-  {
-    Handle(Image_PixMap) anImagePixMap = new Image_PixMap (aDataPtr,
-                                                           aWidth, aHeight,
-                                                           aBytesPerLine,
-                                                           aBitmapInfo.biBitCount,
-                                                           Standard_False); // bottom-up!
-
-    // Release dump memory here
-    delete[] aDataPtr;
+  Standard_Boolean isSuccess = GetDIBits (aDC, theHBitmap,
+                                          0,                           // first scan line to set
+                                          aBitmap.bmHeight,            // number of scan lines to copy
+                                          anImage.ChangeData(),        // array for bitmap bits
+                                          (LPBITMAPINFO )&aBitmapInfo, // bitmap data info
+                                          DIB_RGB_COLORS) != 0;
 
-    // save the image
-    anImagePixMap->Dump (theFileName);
-  }
-  else
-  {
-    // Release dump memory
-    delete[] aDataPtr;
-  }
   ReleaseDC (NULL, aDC);
-  return isSuccess ? I_SUCCESS : I_ERROR;
+  return (isSuccess && anImage.Save (theFileName)) ? I_SUCCESS : I_ERROR;
 }
 
 //***//
@@ -408,8 +390,7 @@ int SaveBitmapToFile (Handle(WNT_GraphicDevice)& gDev,
   }
   if (Ret)
   {
-    retVal = DumpBitmapToFile (gDev, NULL,
-                               hNewBmp, fName);
+    retVal = DumpBitmapToFile (hNewBmp, fName);
   } 
  
     if (hNewBmp != NULL && newBmp) DeleteObject (hNewBmp);
diff --git a/src/WNT/WNT_PixMap.cdl b/src/WNT/WNT_PixMap.cdl
deleted file mode 100644
index 32e7028..0000000
--- a/src/WNT/WNT_PixMap.cdl
+++ /dev/null
@@ -1,105 +0,0 @@
--- Created on: 1999-10-27
--- Created by: VKH
--- Copyright (c) 1999 Matra Datavision
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- The content of this file is subject to the Open CASCADE Technology Public
--- License Version 6.5 (the "License"). You may not use the content of this file
--- except in compliance with the License. Please obtain a copy of the License
--- at http://www.opencascade.org and read it completely before using this file.
---
--- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
--- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
---
--- The Original Code and all software distributed under the License is
--- distributed on an "AS IS" basis, without warranty of any kind, and the
--- Initial Developer hereby disclaims all such warranties, including without
--- limitation, any warranties of merchantability, fitness for a particular
--- purpose or non-infringement. Please see the License for the specific terms
--- and conditions governing the rights and limitations under the License.
-
--- Updated:     SZV IMP100701 Add the "depth" field and method
---              to the pixmap object.
-
-class PixMap from WNT
-
-    ---Version:
-
-    ---Purpose: This class defines a windows bitmap
-
-    ---Keywords: Bitmap, Pixmap
-
-inherits
-    PixMap                from Aspect
-
-uses
-    Handle                from Aspect,
-    Color                 from Quantity,
-    Window                from Aspect
-
-raises
-    PixmapDefinitionError from Aspect,
-    PixmapError           from Aspect
-
-is
-
-    Create ( aWindow          : Window from Aspect;
-             aWidth, anHeight : Integer from Standard;
-             aCDepth          : Integer from Standard = 0 )
-    returns mutable PixMap from WNT
-    raises PixmapDefinitionError from Aspect;
-    ---Level: Public
-    ---Purpose:  Warning! When <aDepth> is NULL , the pixmap is created
-    -- with the SAME depth than the window <aWindow>
-
-    ---------------------------------------------------
-    -- Category: Methods to modify the class definition
-    ---------------------------------------------------
-
-    Destroy ( me : mutable )
-    ---Level: Advanced
-    ---Purpose: Destroies the Bitmap
-    ---C++: alias ~
-    --  Trigger: Raises if Bitmap is not defined properly
-    raises PixmapError from Aspect is virtual;
-
-    Dump ( me; aFilename : CString from Standard ;
-           aGammaValue: Real from Standard = 1.0 )
-    returns Boolean
-    ---Level: Advanced
-    ---Purpose:
-    -- Dumps the Bitmap to an image file with
-    -- an optional gamma correction value
-    -- and returns TRUE if the dump occurs normaly.
-    ---Category: Methods to modify the class definition
-    raises PixmapError from Aspect is virtual;
-
-    PixelColor ( me         : in;
-                 theX, theY : in Integer from Standard )
-    returns Color from Quantity
-    is virtual;
-    ---Purpose:
-    -- Returns the pixel color.
-
-    ----------------------------
-    -- Category: Inquire methods
-    ----------------------------
-
-    PixmapID ( me ) returns Handle from Aspect is virtual;
-    ---Level: Advanced
-    ---Purpose: Returns the ID of the just created bitmap
-    ---Category: Inquire methods
-
-    ----------------------------
-    -- Category: Private methods
-    ----------------------------
-
-    PreferedDepth( me ; aWindow: Window from Aspect;
-                   aDepth: Integer from Standard)
-    returns Integer from Standard is private;
-
-fields
-    myDC       : Handle from Aspect is protected;
-    myBitmap   : Handle from Aspect is protected;
-    myWND      : Window from Aspect;
-end PixMap;
diff --git a/src/WNT/WNT_PixMap.cxx b/src/WNT/WNT_PixMap.cxx
deleted file mode 100644
index acf8c71..0000000
--- a/src/WNT/WNT_PixMap.cxx
+++ /dev/null
@@ -1,155 +0,0 @@
-// Created on: 1999-12-20
-// Created by: VKH
-// Copyright (c) 1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-//    SZV/GG IMP100701 Add the "depth" field and method
-//              to the pixmap object.
-
-
-//-Version
-
-// include windows.h first to have all definitions available
-#include <windows.h>
-
-#include <WNT_PixMap.ixx>
-
-#include <WNT_Window.hxx>
-
-extern int DumpBitmapToFile( Handle(WNT_GraphicDevice)&, HDC, HBITMAP, char* );
-
-#include <WNT_GraphicDevice.hxx>
-
-Standard_Integer WNT_PixMap::PreferedDepth(
-  const Handle(Aspect_Window)& aWindow,
-  const Standard_Integer aCDepth) const
-{
-  Standard_Integer theDepth = 32;
-  if (aCDepth <= 1) theDepth = 1;
-  else if (aCDepth <=  4) theDepth =  4;
-  else if (aCDepth <=  8) theDepth =  8;
-  else if (aCDepth <= 16) theDepth = 16;
-  else if (aCDepth <= 24) theDepth = 24;
-
-  return theDepth;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////
-WNT_PixMap::WNT_PixMap ( const Handle(Aspect_Window)& aWindow,
-                         const Standard_Integer aWidth,
-                         const Standard_Integer anHeight,
-                         const Standard_Integer aCDepth ) :
-Aspect_PixMap(aWidth, anHeight, PreferedDepth(aWindow, aCDepth))
-{
-  myWND = aWindow;
-
-  const Handle(WNT_Window)& hWindow = Handle(WNT_Window)::DownCast(aWindow);
-  HDC hdc = GetDC ( (HWND)(hWindow->HWindow()) );
-  HDC hdcMem = CreateCompatibleDC ( hdc );
-  ReleaseDC ( (HWND)(hWindow->HWindow()), hdc );
-  myDC = hdcMem;
-
-  Standard_Integer theNbColors = 0, theFormat = PFD_TYPE_RGBA;
-
-#ifdef BUG  // Our OpenGl driver supports only RGB mode.
-  //WIL001: Color table can not be initialized - do not use
-  if (myDepth <= 8)
-  {
-    theNbColors = (1 << myDepth);
-    theFormat = PFD_TYPE_COLORINDEX;
-  }
-#endif
-
-  Standard_Integer sizeBmi = Standard_Integer(sizeof(BITMAPINFO)+sizeof(RGBQUAD)*theNbColors);
-  PBITMAPINFO pBmi = (PBITMAPINFO)(new char[sizeBmi]);
-  ZeroMemory (  pBmi, sizeBmi  );
-
-  pBmi->bmiHeader.biSize          = sizeof (BITMAPINFOHEADER); //sizeBmi
-  pBmi->bmiHeader.biWidth         = aWidth;
-  pBmi->bmiHeader.biHeight        = anHeight;
-  pBmi->bmiHeader.biPlanes        = 1;
-  pBmi->bmiHeader.biBitCount      = (WORD)myDepth; //WIL001: was 24
-  pBmi->bmiHeader.biCompression   = BI_RGB;
-
-  LPVOID ppvBits;
-  HBITMAP hBmp = CreateDIBSection ( hdcMem, pBmi, DIB_RGB_COLORS, &ppvBits, NULL, 0 );
-  if ( !hBmp )
-    Aspect_PixmapDefinitionError::Raise ( "CreateDIBSection" );
-  SelectBitmap ( hdcMem, hBmp );
-  myBitmap = hBmp;
-
-  delete[] pBmi;
-
-  if (myDepth > 1) {
-
-    PIXELFORMATDESCRIPTOR pfd;
-    ZeroMemory (  &pfd, sizeof (PIXELFORMATDESCRIPTOR)  );
-    pfd.nSize           =  sizeof (PIXELFORMATDESCRIPTOR);
-    pfd.nVersion        =  1;
-    pfd.dwFlags         =  PFD_SUPPORT_OPENGL | PFD_DRAW_TO_BITMAP;
-    pfd.iPixelType      =  (BYTE)theFormat; //WIL001: was PFD_TYPE_RGBA
-    pfd.cColorBits      =  (BYTE)myDepth; //WIL001: was 24
-    pfd.cDepthBits      =  24;//
-    pfd.iLayerType      =  PFD_MAIN_PLANE;
-
-    Standard_Integer iPf = ChoosePixelFormat(hdcMem, &pfd);
-    if ( !iPf )
-      Aspect_PixmapDefinitionError::Raise ( "ChoosePixelFormat" );
-
-    if ( !DescribePixelFormat ( hdcMem, iPf, sizeof(PIXELFORMATDESCRIPTOR), &pfd ) )
-      Aspect_PixmapDefinitionError::Raise ( "DescribePixelFormat" );
-
-    if ( !SetPixelFormat(hdcMem, iPf, &pfd) )
-      Aspect_PixmapDefinitionError::Raise ( "SetPixelFormat" );
-  }
-}
-
-///////////////////////////////
-void WNT_PixMap::Destroy ()
-{
-  if ( myDC     ) DeleteDC ( (HDC)myDC );
-  if ( myBitmap ) DeleteObject ( (HBITMAP)myBitmap );
-}
-
-////////////////////////////////////////////////////////////
-Standard_Boolean WNT_PixMap::Dump ( const Standard_CString aFilename,
-                                   const Standard_Real aGammaValue ) const
-{
-  // *** gamma correction must be implemented also on WNT system ...
-  const Handle(WNT_Window) hWindow = Handle(WNT_Window)::DownCast(myWND);
-
-  Handle(WNT_GraphicDevice) dev =
-    Handle ( WNT_GraphicDevice )::DownCast ( hWindow->MyGraphicDevice );
-  if ( dev.IsNull() ) return Standard_False;
-  //Aspect_PixmapError::Raise ( "WNT_GraphicDevice is NULL" );
-
-  return DumpBitmapToFile ( dev, (HDC)myDC, (HBITMAP)myBitmap, (Standard_PCharacter)aFilename );
-}
-
-////////////////////////////////////////////////////////////
-Standard_Address WNT_PixMap::PixmapID() const
-{
-  return myDC;
-}
-
-Quantity_Color WNT_PixMap::PixelColor (const Standard_Integer ,
-                                       const Standard_Integer ) const
-{
-  Aspect_PixmapError::Raise ("PixelColor() method not implemented!");
-  return Quantity_Color (0.0, 0.0, 0.0, Quantity_TOC_RGB);
-}
diff --git a/src/WNT/WNT_Window.cdl b/src/WNT/WNT_Window.cdl
index 0a53f41..21a5cfe 100644
--- a/src/WNT/WNT_Window.cdl
+++ b/src/WNT/WNT_Window.cdl
@@ -47,7 +47,7 @@ class Window from WNT inherits Window from Aspect
     TypeOfResize       from Aspect,
     FillMethod         from Aspect,
     GradientFillMethod from Aspect,
-    PixMap             from Aspect,
+    PixMap             from Image,
     NameOfColor        from Quantity,
     Color              from Quantity,
     Parameter          from Quantity,
@@ -354,8 +354,8 @@ class Window from WNT inherits Window from Aspect
 	--	    or the area is out of the Window.
      raises WindowError from Aspect is virtual;
 
-    ToPixMap ( me )
-    returns PixMap from Aspect
+    ToPixMap ( me ; theImage : in out PixMap from Image )
+    returns Boolean
     ---Level   : Public
     ---Purpose : dump the full contents of the window to a pixmap.
     is virtual;
@@ -591,7 +591,6 @@ class Window from WNT inherits Window from Aspect
  friends
 
     class WDriver from WNT,
-    class IconBox from WNT,
-    class PixMap  from WNT
+    class IconBox from WNT
 
 end Window;
diff --git a/src/WNT/WNT_Window.cxx b/src/WNT/WNT_Window.cxx
index 6c57d2b..479aa99 100644
--- a/src/WNT/WNT_Window.cxx
+++ b/src/WNT/WNT_Window.cxx
@@ -27,7 +27,7 @@
 
 #include <WNT_Window.ixx>
 
-#include <Image_PixMap.hxx>
+#include <Image_AlienPixMap.hxx>
 #include <Aspect_Convert.hxx>
 
 #include <stdio.h>
@@ -733,7 +733,16 @@ void WNT_Window :: RestoreArea (
 Standard_Boolean WNT_Window::Dump (const Standard_CString theFilename,
                                    const Standard_Real theGammaValue) const
 {
-  return ToPixMap()->Dump (theFilename, theGammaValue);
+  Image_AlienPixMap anImg;
+  if (!ToPixMap (anImg) || anImg.IsEmpty())
+  {
+    return Standard_False;
+  }
+  if (Abs (theGammaValue - 1.0) > 0.001)
+  {
+    anImg.AdjustGamma (theGammaValue);
+  }
+  return anImg.Save (theFilename);
 }  // end WNT_Window :: Dump
 //***//
 //*************************** DumpArea ***********************************//
@@ -753,61 +762,50 @@ Standard_Boolean WNT_Window::DumpArea (const Standard_CString theFilename,
 }  // end WNT_Window :: DumpArea
 //***//
 
-static Handle(Image_PixMap) ConvertBitmap (HBITMAP theHBitmap)
+static Standard_Boolean ConvertBitmap (HBITMAP       theHBitmap,
+                                       Image_PixMap& thePixMap)
 {
-  Handle(Image_PixMap) anImagePixMap;
-  // Copy data from HBITMAP
+  // Get informations about the bitmap
   BITMAP aBitmap;
+  if (GetObject (theHBitmap, sizeof(BITMAP), (LPSTR )&aBitmap) == 0)
+  {
+    return Standard_False;
+  }
 
-  // Get informations about the bitmap
-  GetObject (theHBitmap, sizeof(BITMAP), (LPSTR )&aBitmap);
-  Standard_Integer aWidth  = aBitmap.bmWidth;
-  Standard_Integer aHeight = aBitmap.bmHeight;
+  const Standard_Size aSizeRowBytes = Standard_Size(aBitmap.bmWidth) * 4;
+  if (!thePixMap.InitTrash (Image_PixMap::ImgBGR32, Standard_Size(aBitmap.bmWidth), Standard_Size(aBitmap.bmHeight), aSizeRowBytes))
+  {
+    return Standard_False;
+  }
+  thePixMap.SetTopDown (false);
 
   // Setup image data
   BITMAPINFOHEADER aBitmapInfo;
   memset (&aBitmapInfo, 0, sizeof(BITMAPINFOHEADER));
-  aBitmapInfo.biSize = sizeof(BITMAPINFOHEADER);
-  aBitmapInfo.biWidth = aWidth;
-  aBitmapInfo.biHeight = aHeight; // positive means bottom-up!
-  aBitmapInfo.biPlanes = 1;
-  aBitmapInfo.biBitCount = 32;
+  aBitmapInfo.biSize        = sizeof(BITMAPINFOHEADER);
+  aBitmapInfo.biWidth       = aBitmap.bmWidth;
+  aBitmapInfo.biHeight      = aBitmap.bmHeight; // positive means bottom-up!
+  aBitmapInfo.biPlanes      = 1;
+  aBitmapInfo.biBitCount    = 32; // use 32bit for automatic word-alignment per row
   aBitmapInfo.biCompression = BI_RGB;
 
-  Standard_Integer aBytesPerLine = aWidth * 4;
-  Standard_Byte* aDataPtr = new Standard_Byte[aBytesPerLine * aHeight];
-
   // Copy the pixels
   HDC aDC = GetDC (NULL);
-  Standard_Boolean isSuccess
-    = GetDIBits (aDC,             // handle to DC
-                 theHBitmap,      // handle to bitmap
-                 0,               // first scan line to set
-                 aHeight,         // number of scan lines to copy
-                 aDataPtr,        // array for bitmap bits
-                 (LPBITMAPINFO )&aBitmapInfo, // bitmap data info
-                 DIB_RGB_COLORS   // RGB
-                 ) != 0;
-
-  if (isSuccess)
-  {
-    anImagePixMap = new Image_PixMap (aDataPtr,
-                                      aWidth, aHeight,
-                                      aBytesPerLine,
-                                      aBitmapInfo.biBitCount,
-                                      Standard_False); // bottom-up!
-  }
-  // Release dump memory
-  delete[] aDataPtr;
+  Standard_Boolean isSuccess = GetDIBits (aDC, theHBitmap,
+                                          0,                           // first scan line to set
+                                          aBitmap.bmHeight,            // number of scan lines to copy
+                                          thePixMap.ChangeData(),      // array for bitmap bits
+                                          (LPBITMAPINFO )&aBitmapInfo, // bitmap data info
+                                          DIB_RGB_COLORS) != 0;
   ReleaseDC (NULL, aDC);
-  return anImagePixMap;
+  return isSuccess;
 }
 
-Handle(Aspect_PixMap) WNT_Window::ToPixMap() const
+Standard_Boolean WNT_Window::ToPixMap (Image_PixMap& thePixMap) const
 {
   if (myDoubleBuffer && myHPixmap)
   {
-    return ConvertBitmap ((HBITMAP )myHPixmap);
+    return ConvertBitmap ((HBITMAP )myHPixmap, thePixMap);
   }
 
   RECT aRect;
@@ -825,13 +823,13 @@ Handle(Aspect_PixMap) WNT_Window::ToPixMap() const
   HBITMAP anHBitmapOld = (HBITMAP )SelectObject (aMemDC, anHBitmapDump);
   BitBlt (aMemDC, 0, 0, aWidth, aHeight, aSrcDC, 0, 0, SRCCOPY);
 
-  Handle(Image_PixMap) anImagePixMap = ConvertBitmap (anHBitmapDump);
+  Standard_Boolean isSuccess = ConvertBitmap (anHBitmapDump, thePixMap);
 
   // Free objects
   DeleteObject (SelectObject (aMemDC, anHBitmapOld));
   DeleteDC (aMemDC);
 
-  return anImagePixMap;
+  return isSuccess;
 }
 
 //****************************** Load ************************************//
diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.cdl b/src/XCAFDoc/XCAFDoc_ShapeTool.cdl
index 286ae52..11b6094 100644
--- a/src/XCAFDoc/XCAFDoc_ShapeTool.cdl
+++ b/src/XCAFDoc/XCAFDoc_ShapeTool.cdl
@@ -239,8 +239,12 @@ is
     	---Purpose: Adds a new top-level (creates and returns a new label)
 	--          For internal use. Used by public method AddShape.
 
-    RemoveShape (me; L: Label from TDF) returns Boolean;
+    RemoveShape (me; L: Label from TDF;
+                 removeCompletely: Boolean = Standard_True)
+    returns Boolean;
     	---Purpose: Removes shape (whole label and all its sublabels)
+    --          If removeCompletely is true, removes complete shape
+	--          If removeCompletely is false, removes instance(location) only
 	--          Returns False (and does nothing) if shape is not free
 	--          or is not top-level shape
     
diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx
index 014926a..7f85299 100644
--- a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx
+++ b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx
@@ -607,10 +607,27 @@ TDF_Label XCAFDoc_ShapeTool::AddShape (const TopoDS_Shape& theShape,
 //purpose  : 
 //=======================================================================
 
-Standard_Boolean XCAFDoc_ShapeTool::RemoveShape (const TDF_Label& L) const
+Standard_Boolean XCAFDoc_ShapeTool::RemoveShape (const TDF_Label& L,
+                                                 const Standard_Boolean removeCompletely) const
 {
   if ( ! IsTopLevel ( L ) || ! IsFree ( L ) ) return Standard_False;
+
+  Handle(TDataStd_TreeNode) aNode;
+  TDF_Label aLabel;
+  if (removeCompletely &&
+      L.FindAttribute (XCAFDoc::ShapeRefGUID(), aNode) &&
+      aNode->HasFather() &&
+      L.IsAttribute (XCAFDoc_Location::GetID()))
+  {
+    aLabel = aNode->Father()->Label();
+  }
+
   L.ForgetAllAttributes (Standard_True);
+
+  if (removeCompletely && !aLabel.IsNull())
+  {
+    return RemoveShape(aLabel);
+  }
   return Standard_True;
 }
 
diff --git a/src/XCAFPrs/XCAFPrs_AISObject.cxx b/src/XCAFPrs/XCAFPrs_AISObject.cxx
index 37985b5..d08fac9 100644
--- a/src/XCAFPrs/XCAFPrs_AISObject.cxx
+++ b/src/XCAFPrs/XCAFPrs_AISObject.cxx
@@ -459,6 +459,7 @@ void XCAFPrs_AISObject::Compute (const Handle(PrsMgr_PresentationManager3d)& aPr
     //i++;
 #endif
     if (! s.IsVisible() ) continue;
+    Prs3d_Root::NewGroup(aPrs);
     AddStyledItem ( s, it.Value(), aPresentationManager, aPrs, aMode );
   }
   
diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx
index f75f346..b87825e 100644
--- a/src/XDEDRAW/XDEDRAW.cxx
+++ b/src/XDEDRAW/XDEDRAW.cxx
@@ -40,6 +40,8 @@
 #include <DDocStd.hxx>
 #include <DDocStd_DrawDocument.hxx>
 
+#include <STEPCAFControl_Controller.hxx>
+
 #include <TDF_Tool.hxx>
 #include <TDF_Data.hxx>
 #include <TDF_LabelSequence.hxx>
@@ -92,6 +94,11 @@
 #include <TColStd_HArray1OfInteger.hxx>
 #include <TColStd_HArray1OfReal.hxx>
 
+#include <AIS_InteractiveObject.hxx>
+#include <AIS_Drawer.hxx>
+#include <Aspect_TypeOfLine.hxx>
+#include <Prs3d_LineAspect.hxx>
+
 #define ZVIEW_SIZE 1000000.0
 // avoid warnings on 'extern "C"' functions returning C++ classes
 #ifdef _MSC_VER
@@ -161,6 +168,48 @@ static Standard_Integer saveDoc (Draw_Interpretor& di, Standard_Integer argc, co
   return 0;
 }
 
+//=======================================================================
+//function : openDoc
+//purpose  :
+//=======================================================================
+static Standard_Integer openDoc (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
+{
+  Handle(TDocStd_Document) D;
+  Handle(DDocStd_DrawDocument) DD;
+  Handle(TDocStd_Application) A;
+
+  if ( !DDocStd::Find(A) )
+    return 1;
+
+  if ( argc != 3 )
+  {
+    di << "invalid number of arguments. Usage:\t XOpen filename docname" << "\n";
+    return 1;
+  }
+
+  Standard_CString Filename = argv[1];
+  Standard_CString DocName = argv[2];
+
+  if ( DDocStd::GetDocument(DocName, D, Standard_False) )
+  {
+    di << "document with name " << DocName << " already exists" << "\n";
+    return 1;
+  }
+
+  if ( A->Open(Filename, D) != PCDM_RS_OK )
+  {
+    di << "cannot open XDE document" << "\n";
+    return 1;
+  }
+
+  DD = new DDocStd_DrawDocument(D);
+  TDataStd_Name::Set(D->GetData()->Root(), DocName);
+  Draw::Set(DocName, DD);
+
+  di << "document " << DocName << " opened" << "\n";
+
+  return 0;
+}
 
 //=======================================================================
 //function : dump
@@ -829,6 +878,135 @@ static Standard_Integer XSetTransparency (Draw_Interpretor& di, Standard_Integer
   return 0;
 }
 
+//=======================================================================
+//function : XShowFaceBoundary
+//purpose  : Set face boundaries on/off
+//=======================================================================
+static Standard_Integer XShowFaceBoundary (Draw_Interpretor& di,
+                                           Standard_Integer argc,
+                                           const char ** argv)
+{
+  if (( argc != 4 && argc < 7 ) || argc > 9)
+  {
+    di << "Usage :\n " << argv[0]
+       << " Doc Label IsOn [R G B [LineWidth [LineStyle]]]\n"
+       << "   Doc       - is the document name. \n"
+       << "   Label     - is the shape label. \n"
+       << "   IsOn      - flag indicating whether the boundaries\n"
+       << "                should be turned on or off (can be set\n"
+       << "                to 0 (off) or 1 (on)).\n"
+       << "   R, G, B   - red, green and blue components of boundary\n"
+       << "                color in range (0 - 255).\n"
+       << "                (default is (0, 0, 0)\n"
+       << "   LineWidth - line width\n"
+       << "                (default is 1)\n"
+       << "   LineStyle - line fill style :\n"
+       << "                 0 - solid  \n"
+       << "                 1 - dashed \n"
+       << "                 2 - dot    \n"
+       << "                 3 - dashdot\n"
+       << "                (default is solid)";
+
+    return 1;
+  }
+
+  // get specified document
+  Handle(TDocStd_Document) aDoc;
+  DDocStd::GetDocument (argv[1], aDoc);
+  if (aDoc.IsNull())
+  {
+    di << argv[1] << " is not a document" << "\n"; 
+    return 1;
+  }
+
+  Handle(AIS_InteractiveContext) aContext;
+  if (!TPrsStd_AISViewer::Find (aDoc->GetData()->Root(), aContext)) 
+  {
+    di << "Cannot find viewer for document " << argv[1] << "\n";
+    return 1;
+  }
+
+  // get shape tool for shape verification
+  Handle(XCAFDoc_ShapeTool) aShapes =
+    XCAFDoc_DocumentTool::ShapeTool (aDoc->Main());
+
+  // get label and validate that it is a shape label
+  TDF_Label aLabel;
+  TDF_Tool::Label (aDoc->GetData(), argv[2], aLabel);
+  if (aLabel.IsNull() || !aShapes->IsShape (aLabel))
+  {
+    di << argv[2] << " is not a valid shape label!";
+    return 1;
+  }
+
+  // get presentation from label
+  Handle(TPrsStd_AISPresentation) aPrs;
+  if (!aLabel.FindAttribute (TPrsStd_AISPresentation::GetID (), aPrs))
+  {
+    aPrs = TPrsStd_AISPresentation::Set (aLabel,XCAFPrs_Driver::GetID ());
+  }
+
+  Handle(AIS_InteractiveObject) anInteractive = aPrs->GetAIS ();
+  if (anInteractive.IsNull ())
+  {
+    di << "Can't set drawer attributes.\n"
+          "Interactive object for shape label doesn't exists.";
+    return 1;
+  }
+
+  // get drawer
+  const Handle(AIS_Drawer)& aDrawer = anInteractive->Attributes ();
+
+  // default attributes
+  Quantity_Parameter aRed      = 0.0;
+  Quantity_Parameter aGreen    = 0.0;
+  Quantity_Parameter aBlue     = 0.0;
+  Standard_Real      aWidth    = 1.0;
+  Aspect_TypeOfLine  aLineType = Aspect_TOL_SOLID;
+  
+  // turn boundaries on/off
+  Standard_Boolean isBoundaryDraw = (atoi (argv[3]) == 1);
+  aDrawer->SetFaceBoundaryDraw (isBoundaryDraw);
+  
+  // set boundary color
+  if (argc >= 7)
+  {
+    // Text color
+    aRed   = atof (argv[4])/255.;
+    aGreen = atof (argv[5])/255.;
+    aBlue  = atof (argv[6])/255.;
+  }
+
+  // set line width
+  if (argc >= 8)
+  {
+    aWidth = (Standard_Real)atof (argv[7]);
+  }
+
+  // select appropriate line type
+  if (argc == 9)
+  {
+    switch (atoi (argv[8]))
+    {
+      case 1: aLineType = Aspect_TOL_DASH;    break;
+      case 2: aLineType = Aspect_TOL_DOT;     break;
+      case 3: aLineType = Aspect_TOL_DOTDASH; break;
+      default:
+        aLineType = Aspect_TOL_SOLID;
+    }
+  }
+
+  Quantity_Color aColor (aRed, aGreen, aBlue, Quantity_TOC_RGB);
+
+  Handle(Prs3d_LineAspect) aBoundaryAspect = 
+    new Prs3d_LineAspect (aColor, aLineType, aWidth);
+
+  aDrawer->SetFaceBoundaryAspect (aBoundaryAspect);
+
+  aContext->Redisplay (anInteractive);
+  
+  return 0;
+}
 
 //=======================================================================
 //function : Init
@@ -841,6 +1019,9 @@ void XDEDRAW::Init(Draw_Interpretor& di)
   static Standard_Boolean initactor = Standard_False;
   if (initactor) return;  initactor = Standard_True;
 
+  // Load static variables for STEPCAF (ssv; 16.08.2012)
+  STEPCAFControl_Controller::Init();
+
   // OCAF *** szy: use <pload> command
 
 //  DDF::AllCommands(di);
@@ -867,6 +1048,9 @@ void XDEDRAW::Init(Draw_Interpretor& di)
   di.Add ("XSave","[Doc Path] \t: Save Doc or first document in session",
 		   __FILE__, saveDoc, g);
 
+  di.Add ("XOpen","Path Doc \t: Open XDE Document with name Doc from Path",
+          __FILE__, openDoc, g);
+
   di.Add ("Xdump","Doc [int deep (0/1)] \t: Print information about tree's structure",
 		   __FILE__, dump, g);
 
@@ -894,6 +1078,11 @@ void XDEDRAW::Init(Draw_Interpretor& di)
   di.Add ("XSetTransparency", "Doc Transparency [label1 label2 ...]\t: Set transparency for given label(s) or whole doc",
 		   __FILE__, XSetTransparency, g);
 
+  di.Add ("XShowFaceBoundary", 
+          "Doc Label IsOn [R G B [LineWidth [LineStyle]]]:"
+          "- turns on/off drawing of face boundaries and defines boundary line style",
+          __FILE__, XShowFaceBoundary, g);
+
   // Specialized commands
   XDEDRAW_Shapes::InitCommands ( di );
   XDEDRAW_Colors::InitCommands ( di );
diff --git a/src/XDEDRAW/XDEDRAW_Shapes.cxx b/src/XDEDRAW/XDEDRAW_Shapes.cxx
index 06c2427..9a547f7 100644
--- a/src/XDEDRAW/XDEDRAW_Shapes.cxx
+++ b/src/XDEDRAW/XDEDRAW_Shapes.cxx
@@ -143,8 +143,9 @@ static Standard_Integer getShape (Draw_Interpretor& di, Standard_Integer argc, c
 
 static Standard_Integer removeShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
 {
-  if (argc!=3) {
-    di<<"Use: "<<argv[0]<<" DocName Label"<<"\n";
+  if (argc != 3 && argc != 4)
+  {
+    di<<"Use: "<<argv[0]<<" DocName Label [int removeCompletely (1/0)]"<<"\n";
     return 1;
   }
   Handle(TDocStd_Document) Doc;   
@@ -158,7 +159,10 @@ static Standard_Integer removeShape (Draw_Interpretor& di, Standard_Integer argc
 //  XCAFDoc_ShapeTool myAssembly;
 //  myAssembly.Init(Doc);
   Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(Doc->Main());
-  myAssembly->RemoveShape(aLabel);
+  Standard_Boolean removeCompletely = Standard_True;
+  if ( argc == 4 && atoi(argv[3]) == 0 ) 
+    removeCompletely = Standard_False;
+  myAssembly->RemoveShape(aLabel, removeCompletely);
   
   return 0;
 }
diff --git a/src/XSControl/XSControl_TransferReader.cxx b/src/XSControl/XSControl_TransferReader.cxx
index 7d3e787..fac3f01 100644
--- a/src/XSControl/XSControl_TransferReader.cxx
+++ b/src/XSControl/XSControl_TransferReader.cxx
@@ -895,7 +895,7 @@ Standard_Integer XSControl_TransferReader::TransferOne
 	  <<"      Ident : "<<lab->ToCString()
 	  <<  Interface_MSG::Blanks(14 - lab->Length())<<"******\n";
     sout << "******    Type : "<<theModel->TypeName(ent,Standard_False)
-        <<  Interface_MSG::Blanks(44 - strlen(theModel->TypeName(ent,Standard_False)))
+        <<  Interface_MSG::Blanks((Standard_Integer) (44 - strlen(theModel->TypeName(ent,Standard_False))))
 	<<  "******";
     sout<<"\n*******************************************************************\n";
   }
diff --git a/src/XSDRAW/XSDRAW.cxx b/src/XSDRAW/XSDRAW.cxx
index c69184a..efdc87e 100644
--- a/src/XSDRAW/XSDRAW.cxx
+++ b/src/XSDRAW/XSDRAW.cxx
@@ -238,7 +238,7 @@ void XSDRAW::LoadDraw (Draw_Interpretor& theCommands)
   if (!first || first[0] == '\0') {
     char ligne[80];  ligne[0] = '\0'; char truc;
 //    cin.clear();  cin.get (ligne,79,'\n');
-    cin >> ligne;  int ln = strlen(ligne);
+    cin >> ligne;  Standard_Size ln = strlen(ligne);
     char *ff = &ligne[0], *ss = NULL;
     cin.get(truc);  if (truc != '\n') { cin>>&ligne[ln+1]; ss = &ligne[ln+1]; }
     return  XSDRAW::GetList (ff,ss);
diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx
index 02674e9..e669fc6 100644
--- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx
+++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx
@@ -94,18 +94,17 @@ static Standard_Integer writestl
 	<< " shape file [ascii/binary (0/1) : 1 by default] [InParallel (0/1) : 0 by default]" << "\n";
   } else {
     TopoDS_Shape aShape = DBRep::Get(argv[1]);
-    Standard_Boolean anASCIIMode = Standard_False;
+    Standard_Boolean isASCIIMode = Standard_False;
 	Standard_Boolean isInParallel = Standard_False;
-    if (argc==4) {
-      Standard_Integer mode = atoi(argv[3]);
-      if (mode==0) anASCIIMode = Standard_True;
-    }
-	if (argc==5) {
-      isInParallel = atoi(argv[4]) == 1;
-      Standard::SetReentrant(isInParallel);
+    if (argc > 3) {
+      isASCIIMode = (atoi(argv[3]) == 0);
+      if (argc > 4) {
+        isInParallel = (atoi(argv[4]) == 1);
+        Standard::SetReentrant(isInParallel);
+      }
     }
-	StlAPI_Writer aWriter;
-    aWriter.ASCIIMode() = anASCIIMode;
+    StlAPI_Writer aWriter;
+    aWriter.ASCIIMode() = isASCIIMode;
     aWriter.Write (aShape, argv[2], isInParallel);
   }
   return 0;
diff --git a/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx b/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx
index 9200ebe..88f021c 100644
--- a/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx
+++ b/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx
@@ -160,9 +160,9 @@ Standard_Boolean XmlMNaming_NamedShapeDriver::Paste
     case TNaming_SELECTED:
       aBld.Select(aNewShape, anOldShape);
       break;
-    case TNaming_REPLACE:
-      aBld.Replace(anOldShape,aNewShape);
-      break;
+      //    case TNaming_REPLACE:
+      //      aBld.Replace(anOldShape,aNewShape);
+      //      break;
     default:
       Standard_DomainError::Raise("TNaming_Evolution; enum term unknown");
     }
@@ -248,7 +248,7 @@ static const XmlObjMgt_DOMString& EvolutionString(const TNaming_Evolution i)
     case TNaming_MODIFY       : return ::EvolModifyString();
     case TNaming_DELETE       : return ::EvolDeleteString();
     case TNaming_SELECTED     : return ::EvolSelectedString();
-    case TNaming_REPLACE      : return ::EvolReplaceString();
+      //    case TNaming_REPLACE      : return ::EvolReplaceString();
   default:
     Standard_DomainError::Raise("TNaming_Evolution; enum term unknown");
   }
@@ -274,7 +274,7 @@ static TNaming_Evolution EvolutionEnum (const XmlObjMgt_DOMString& theString)
     else if (theString.equals (::EvolSelectedString()))
       aResult = TNaming_SELECTED;
     else if (theString.equals (::EvolReplaceString()))
-      aResult = TNaming_REPLACE;
+      aResult = TNaming_MODIFY; // for compatibility //TNaming_REPLACE;
     else
       Standard_DomainError::Raise
         ("TNaming_Evolution; string value without enum term equivalence");
diff --git a/src/XmlMNaming/XmlMNaming_NamingDriver.cxx b/src/XmlMNaming/XmlMNaming_NamingDriver.cxx
index f6f22e7..229b7e9 100644
--- a/src/XmlMNaming/XmlMNaming_NamingDriver.cxx
+++ b/src/XmlMNaming/XmlMNaming_NamingDriver.cxx
@@ -52,7 +52,8 @@ IMPLEMENT_DOMSTRING (NTSubtractionString,       "subtraction")
 IMPLEMENT_DOMSTRING (NTConstShapeString,        "constshape")
 IMPLEMENT_DOMSTRING (NTFilterByNeighString,     "filterbyneigh")
 IMPLEMENT_DOMSTRING (NTOrientationString,       "orientation")
-IMPLEMENT_DOMSTRING (NTWireInString,             "wirein")
+IMPLEMENT_DOMSTRING (NTWireInString,            "wirein")
+IMPLEMENT_DOMSTRING (NTShellInString,            "shellin")
 
 IMPLEMENT_DOMSTRING (ShCompoundString,          "compound")
 IMPLEMENT_DOMSTRING (ShCompsolidString,         "compsolid")
@@ -329,6 +330,7 @@ static const XmlObjMgt_DOMString& NameTypeToString (const TNaming_NameType theE)
   case TNaming_FILTERBYNEIGHBOURGS : return ::NTFilterByNeighString();
   case TNaming_ORIENTATION         : return ::NTOrientationString();
   case TNaming_WIREIN              : return ::NTWireInString();
+  case TNaming_SHELLIN             : return ::NTShellInString();
   default:
     Standard_DomainError::Raise("TNaming_NameType; enum term unknown ");
   }
@@ -397,6 +399,8 @@ static TNaming_NameType NameTypeFromString (const XmlObjMgt_DOMString& theString
       aResult = TNaming_ORIENTATION;
     else if (theString.equals (::NTWireInString()))
       aResult = TNaming_WIREIN;
+    else if (theString.equals (::NTShellInString()))
+      aResult = TNaming_SHELLIN;
     else
       Standard_DomainError::Raise
         ("TNaming_NameType; string value without enum term equivalence");
diff --git a/src/Xw/FILES b/src/Xw/FILES
index 9d2dee5..a16b8c2 100644
--- a/src/Xw/FILES
+++ b/src/Xw/FILES
@@ -1,5 +1,3 @@
-Test.com
-Test_deb.com
 Xw_Extension.h
 Xw_Cextern.hxx
 Xw_alloc_color.cxx
diff --git a/src/Xw/Test.com b/src/Xw/Test.com
deleted file mode 100644
index 8f2f48f..0000000
--- a/src/Xw/Test.com
+++ /dev/null
@@ -1,3 +0,0 @@
-#csh
-../drv/MEM/$STATION/Test$1
-
diff --git a/src/Xw/Test_deb.com b/src/Xw/Test_deb.com
deleted file mode 100644
index 1564d56..0000000
--- a/src/Xw/Test_deb.com
+++ /dev/null
@@ -1,3 +0,0 @@
-#csh
-$DEBUG ../drv/MEM/$STATION/Test$1
-
diff --git a/src/Xw/Xw.cdl b/src/Xw/Xw.cdl
index 2487f77..7c93708 100644
--- a/src/Xw/Xw.cdl
+++ b/src/Xw/Xw.cdl
@@ -56,10 +56,6 @@ is
         ---Purpose: Creates the X Window drawable.
         ---Category: Classes
 
-        class PixMap;
-        ---Purpose: Creates a X pixmap
-        ---Category: Classes
-
         class ColorMap;
         ---Purpose: Creates the X Colormap
         ---Category: Classes
diff --git a/src/Xw/Xw_PixMap.cdl b/src/Xw/Xw_PixMap.cdl
deleted file mode 100644
index e76abb6..0000000
--- a/src/Xw/Xw_PixMap.cdl
+++ /dev/null
@@ -1,100 +0,0 @@
--- Created on: 1999-10-14
--- Created by: VKH
--- Copyright (c) 1999 Matra Datavision
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- The content of this file is subject to the Open CASCADE Technology Public
--- License Version 6.5 (the "License"). You may not use the content of this file
--- except in compliance with the License. Please obtain a copy of the License
--- at http://www.opencascade.org and read it completely before using this file.
---
--- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
--- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
---
--- The Original Code and all software distributed under the License is
--- distributed on an "AS IS" basis, without warranty of any kind, and the
--- Initial Developer hereby disclaims all such warranties, including without
--- limitation, any warranties of merchantability, fitness for a particular
--- purpose or non-infringement. Please see the License for the specific terms
--- and conditions governing the rights and limitations under the License.
-
--- Updated:     GG IMP100701 Add the "depth" field and method
---              to the pixmap object.
-
-class PixMap from Xw
-
-    ---Version:
-
-    ---Purpose: This class defines a X11 pixmap
-
-    ---Keywords: Bitmap, Pixmap, X11
-
-inherits
-    PixMap                from Aspect
-uses
-    Handle                from Aspect,
-    Color                 from Quantity,
-    Window                from Aspect,
-    Window                from Xw
-raises
-    PixmapDefinitionError from Aspect,
-    PixmapError           from Aspect
-is
-    Create ( aWindow          : Window from Aspect;
-             aWidth, anHeight : Integer from Standard;
-             aDepth           : Integer from Standard = 0 )
-    returns mutable PixMap from Xw
-    raises PixmapDefinitionError from Aspect;
-    ---Level: Public
-    ---Purpose:  Warning! When <aDepth> is NULL , the pixmap is created
-    -- with the SAME depth than the window <aWindow>
-
-    ---------------------------------------------------
-    -- Category: Methods to modify the class definition
-    ---------------------------------------------------
-
-    Destroy ( me : mutable )
-    ---Level: Advanced
-    ---Purpose: Destroies the Pixmap
-    --  Trigger: Raises if Pixmap is not defined properly
-    raises PixmapError from Aspect is virtual;
-
-    Dump ( me ; aFilename : CString from Standard;
-           aGammaValue: Real from Standard = 1.0 )
-    returns Boolean
-    is virtual;
-    ---Level: Advanced
-    ---Purpose:
-    -- Dumps the Bitmap to an image file with
-    -- an optional gamma correction value
-    -- and returns TRUE if the dump occurs normaly.
-    ---Category: Methods to modify the class definition
-
-    PixelColor ( me         : in;
-                 theX, theY : in Integer from Standard )
-    returns Color from Quantity
-    is virtual;
-    ---Purpose:
-    -- Returns the pixel color.
-
-    ----------------------------
-    -- Category: Inquire methods
-    ----------------------------
-
-    PixmapID ( me ) returns Handle from Aspect is virtual;
-    ---Level: Advanced
-    ---Purpose: Returns the ID of the just created pixmap
-    ---Category: Inquire methods
-
-    ----------------------------
-    -- Category: Private methods
-    ----------------------------
-
-    PreferedDepth( me ; aWindow : Window from Aspect;
-                   aDepth : Integer from Standard)
-    returns Integer from Standard is private;
-
-fields
-    myPixmap : Handle from Aspect is protected;
-    myWindow : Window from Xw;
-end PixMap;
diff --git a/src/Xw/Xw_PixMap.cxx b/src/Xw/Xw_PixMap.cxx
deleted file mode 100644
index e9035cf..0000000
--- a/src/Xw/Xw_PixMap.cxx
+++ /dev/null
@@ -1,176 +0,0 @@
-// Created on: 1999-10-14
-// Created by: VKH
-// Copyright (c) 1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-// Updated      GG 06/03/00 Xw_PixMap MUST creates a Pixmap and no more an Image !!!
-//              GG IMP100701 Add the "depth" field and method
-//              to the pixmap object.
-
-
-
-//-Version
-
-#define xTRACE 1
-
-#include <errno.h>
-#include <stdio.h>
-
-#include <Xw_PixMap.ixx>
-
-#include <Xw_Window.hxx>
-#include <Xw_Extension.h>
-
-#include <TCollection_AsciiString.hxx>
-#include <Image_PixMap.hxx>
-
-XW_STATUS Xw_save_xwd_image ( void*, void*, char* );
-XW_STATUS Xw_save_bmp_image ( void*, void*, char* );
-XW_STATUS Xw_save_gif_image ( void*, void*, char* );
-
-Standard_Integer Xw_PixMap::PreferedDepth(
-			const Handle(Aspect_Window)& aWindow,
-		     	const Standard_Integer aDepth) const {
-  Handle(Xw_Window) hwindow = Handle(Xw_Window)::DownCast(aWindow);
-  XW_EXT_WINDOW *pwindow = (XW_EXT_WINDOW*) hwindow->ExtendedWindow();
-  if( aDepth <= 0 ) return _DEPTH;
-// Gets the nearest depth from possible screen depths
-  Standard_Integer i,j;
-  Screen *scr = DefaultScreenOfDisplay(_DISPLAY);
-  for( i=j=0 ; i<scr->ndepths ; i++ ) {
-    if( Abs(aDepth - scr->depths[i].depth) <
-		Abs(aDepth - scr->depths[j].depth) ) {
-      j = i;
-    }
-  }
-  return scr->depths[j].depth;
-}
-
-
-//////////////////////////////////////////////////////////////////////////////////////////
-Xw_PixMap::Xw_PixMap ( const Handle(Aspect_Window)& aWindow,
-                       const Standard_Integer aWidth,
-                       const Standard_Integer anHeight,
-		       const Standard_Integer aDepth ) :
-	Aspect_PixMap(aWidth, anHeight, PreferedDepth(aWindow, aDepth))
-{
-
-  myWindow = Handle(Xw_Window)::DownCast(aWindow);
-
-  XW_EXT_WINDOW *pwindow = (XW_EXT_WINDOW*) myWindow->ExtendedWindow();
-
-  Xw_print_error();
-  if( !Xw_get_trace() ) Xw_set_synchronize(_DISPLAY,True);
-  myPixmap = XCreatePixmap( _DISPLAY, _WINDOW, myWidth, myHeight, myDepth);
-  if( !Xw_get_trace() ) Xw_set_synchronize(_DISPLAY,False);
-
-  if ( !myPixmap || Xw_print_error() ) {
-    char errstring[256];
-    sprintf(errstring," *** Xw_PixMap : Cann't allocates pixmap of size %d x %d, request failed with errno : '%s'",myWidth, myHeight,strerror(errno));
-    Aspect_PixmapDefinitionError::Raise ( errstring );
-  }
-}
-
-///////////////////////////////
-void
-Xw_PixMap::Destroy ()
-{
-  if( myPixmap ) {
-#ifdef TRACE
-    printf(" $$$ Xw_PixMap::Destroy() %x\n",myPixmap);
-#endif
-    XW_EXT_WINDOW *pwindow = (XW_EXT_WINDOW*) myWindow->ExtendedWindow();
-    XFreePixmap(_DISPLAY,myPixmap);
-  }
-}
-
-
-////////////////////////////////////////////////////////////
-Standard_Boolean Xw_PixMap::Dump (const Standard_CString theFilename,
-                                  const Standard_Real theGammaValue) const
-{
-  // the attributes
-  XWindowAttributes winAttr;
-  XW_EXT_WINDOW *pwindow = (XW_EXT_WINDOW*) myWindow->ExtendedWindow();
-  XGetWindowAttributes (_DISPLAY, _WINDOW, &winAttr);
-
-  // find the image
-  XImage* pximage = XGetImage (_DISPLAY, myPixmap,
-                               0, 0, myWidth, myHeight,
-                               AllPlanes, ZPixmap);
-  if (pximage == NULL)
-  {
-    return Standard_False;
-  }
-
-  if (winAttr.visual->c_class == TrueColor)
-  {
-    Standard_Byte* aDataPtr = (Standard_Byte* )pximage->data;
-    Handle(Image_PixMap) anImagePixMap = new Image_PixMap (aDataPtr,
-                                                           pximage->width, pximage->height,
-                                                           pximage->bytes_per_line,
-                                                           pximage->bits_per_pixel,
-                                                           Standard_True);
-    // destroy the image
-    XDestroyImage (pximage);
-
-    // save the image
-    return anImagePixMap->Dump (theFilename, theGammaValue);
-  }
-  else
-  {
-    std::cerr << "Visual Type not supported!";
-    // destroy the image
-    XDestroyImage (pximage);
-    return Standard_False;
-  }
-}
-
-////////////////////////////////////////////////////////////
-Aspect_Handle Xw_PixMap::PixmapID() const
-{
-  return myPixmap;
-}
-
-Quantity_Color Xw_PixMap::PixelColor (const Standard_Integer theX,
-                                      const Standard_Integer theY) const
-{
-  // the attributes
-  XWindowAttributes winAttr;
-  XW_EXT_WINDOW *pwindow = (XW_EXT_WINDOW*) myWindow->ExtendedWindow();
-  XGetWindowAttributes (_DISPLAY, _WINDOW, &winAttr);
-
-  // find the image
-  XImage* pximage = XGetImage (_DISPLAY, myPixmap,
-                               0, 0, myWidth, myHeight,
-                               AllPlanes, ZPixmap);
-  if (pximage == NULL)
-  {
-    return Quantity_Color (0.0, 0.0, 0.0, Quantity_TOC_RGB);
-  }
-
-  XColor aColor;
-  aColor.pixel = XGetPixel (pximage, theX, theY);
-  XDestroyImage (pximage);
-
-  XQueryColor (_DISPLAY, myWindow->XColorMap(), &aColor);
-  return Quantity_Color (Quantity_Parameter (aColor.red)   / 65535.0,
-                         Quantity_Parameter (aColor.green) / 65535.0,
-                         Quantity_Parameter (aColor.blue)  / 65535.0,
-                         Quantity_TOC_RGB);
-}
diff --git a/src/Xw/Xw_Window.cdl b/src/Xw/Xw_Window.cdl
index b5ce738..7f3043b 100644
--- a/src/Xw/Xw_Window.cdl
+++ b/src/Xw/Xw_Window.cdl
@@ -49,7 +49,7 @@ uses
     Handle             from Aspect,
     FillMethod         from Aspect,
     GradientFillMethod from Aspect,
-    PixMap             from Aspect,
+    PixMap             from Image,
     NameOfColor        from Quantity,
     Parameter          from Quantity,
     Ratio              from Quantity,
@@ -330,8 +330,8 @@ is
     --      or the area is out of the Window.
     raises WindowError from Aspect is virtual;
 
-    ToPixMap ( me )
-    returns PixMap from Aspect
+    ToPixMap ( me ; theImage : in out PixMap from Image )
+    returns Boolean
     ---Level   : Public
     ---Purpose : dump the full contents of the window to a pixmap.
     is virtual;
@@ -677,7 +677,6 @@ fields
 friends
 
     class Driver from Xw,
-    class IconBox from Xw,
-    class PixMap from Xw
+    class IconBox from Xw
 
 end Window ;
diff --git a/src/Xw/Xw_Window.cxx b/src/Xw/Xw_Window.cxx
index c390d44..0cd280f 100644
--- a/src/Xw/Xw_Window.cxx
+++ b/src/Xw/Xw_Window.cxx
@@ -77,7 +77,7 @@
 #include <Xw_Cextern.hxx>
 //}
 #include <Aspect_Convert.hxx>
-#include <Image_PixMap.hxx>
+#include <Image_AlienPixMap.hxx>
 
 #include <Xw_Extension.h>
 
@@ -860,15 +860,14 @@ Standard_Boolean Xw_Window::DumpArea (const Standard_CString theFilename,
   return Standard_Boolean(aStatus);
 }
 
-Handle(Aspect_PixMap) Xw_Window::ToPixMap() const
+Standard_Boolean Xw_Window::ToPixMap (Image_PixMap& thePixMap) const
 {
-  Handle(Image_PixMap) anImagePixMap;
   int aDummy, aWidth, aHeight;
   XW_WINDOWSTATE state = Xw_get_window_position (MyExtendedWindow,
                                                  &aDummy, &aDummy, &aWidth, &aHeight);
   if (state == XW_WS_UNKNOWN)
   {
-    return anImagePixMap;
+    return Standard_False;
   }
 
   XW_EXT_IMAGEDATA* pimage = NULL;
@@ -893,22 +892,27 @@ Handle(Aspect_PixMap) Xw_Window::ToPixMap() const
 
   if (pimage == NULL)
   {
-    return anImagePixMap;
+    return Standard_False;
   }
 
   XImage* pximage = (pimage->zximage) ? pimage->zximage : pimage->pximage;
   XW_EXT_WINDOW* pwindow = (XW_EXT_WINDOW* )MyExtendedWindow;
-  if (pwindow->pcolormap->visual->c_class == TrueColor)
+  if (pwindow->pcolormap->visual->c_class != TrueColor)
   {
-    Standard_Byte* aDataPtr = (Standard_Byte* )pximage->data;
-    anImagePixMap = new Image_PixMap (aDataPtr,
-                                      pximage->width, pximage->height,
-                                      pximage->bytes_per_line,
-                                      pximage->bits_per_pixel,
-                                      Standard_True);
+    return Standard_False;
   }
+
+  const bool isBigEndian = (pximage->byte_order == MSBFirst);
+  Image_PixMap::ImgFormat aFormat = (pximage->bits_per_pixel == 32)
+                                  ? (isBigEndian ? Image_PixMap::ImgRGB32 : Image_PixMap::ImgBGR32)
+                                  : (isBigEndian ? Image_PixMap::ImgRGB   : Image_PixMap::ImgBGR);
+  Image_PixMap aWrapper;
+  aWrapper.InitWrapper (aFormat, (Standard_Byte* )pximage->data, pximage->width, pximage->height, pximage->bytes_per_line);
+  aWrapper.SetTopDown (true);
+
+  Standard_Boolean isSuccess = thePixMap.InitCopy (aWrapper);
   Xw_close_image (pimage);
-  return anImagePixMap;
+  return isSuccess;
 }
 
 Standard_Boolean Xw_Window::Load (const Standard_CString aFilename) const {
diff --git a/src/Xw/Xw_save_image.cxx b/src/Xw/Xw_save_image.cxx
index 66f3f7a..e0be6a4 100644
--- a/src/Xw/Xw_save_image.cxx
+++ b/src/Xw/Xw_save_image.cxx
@@ -34,13 +34,14 @@
 # include <oce-config.h>
 #endif
 
+#include <Image_AlienPixMap.hxx>
+#include <TCollection_AsciiString.hxx>
+
 #include <Xw_Extension.h>
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
 
-#include <Image_PixMap.hxx>
-
 #ifdef XW_PROTOTYPE
 XW_STATUS Xw_save_image_adv (Display *aDisplay,Window aWindow,XWindowAttributes aWinAttr,XImage *aPximage,Colormap aColormap,int aNcolors,char *filename)
 #else
@@ -54,22 +55,22 @@ int ncolors;
 char *filename;
 #endif /*XW_PROTOTYPE*/
 {
-  if (aWinAttr.visual->c_class == TrueColor)
-  {
-    Standard_Byte* aDataPtr = (Standard_Byte* )aPximage->data;
-    Handle(Image_PixMap) anImagePixMap = new Image_PixMap (aDataPtr,
-                                                           aPximage->width, aPximage->height,
-                                                           aPximage->bytes_per_line,
-                                                           aPximage->bits_per_pixel,
-                                                           Standard_True);
-    // save the image
-    return anImagePixMap->Dump (filename) ? XW_SUCCESS : XW_ERROR;
-  }
-  else
+  if (aWinAttr.visual->c_class != TrueColor)
   {
     std::cerr << "Visual Type not supported!";
-    return XW_SUCCESS;
+    return XW_ERROR;
   }
+
+  const bool isBigEndian = (aPximage->byte_order == MSBFirst);
+  Image_PixMap::ImgFormat aFormat = (aPximage->bits_per_pixel == 32)
+                                  ? (isBigEndian ? Image_PixMap::ImgRGB32 : Image_PixMap::ImgBGR32)
+                                  : (isBigEndian ? Image_PixMap::ImgRGB   : Image_PixMap::ImgBGR);
+  Image_PixMap aWrapper;
+  aWrapper.InitWrapper (aFormat, (Standard_Byte* )aPximage->data, aPximage->width, aPximage->height, aPximage->bytes_per_line);
+  aWrapper.SetTopDown (true);
+
+  Image_AlienPixMap anAlienImage;
+  return (anAlienImage.InitCopy (aWrapper) && anAlienImage.Save (filename)) ? XW_SUCCESS : XW_ERROR;
 }
 
 #ifdef XW_PROTOTYPE
diff --git a/src/math/math_FunctionSetRoot.cxx b/src/math/math_FunctionSetRoot.cxx
index c8044da..b57115c 100644
--- a/src/math/math_FunctionSetRoot.cxx
+++ b/src/math/math_FunctionSetRoot.cxx
@@ -747,7 +747,7 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F,
   // s'il on est dejas sur la solution, il faut leurer ce test pour eviter
   // de faire une seconde iteration...
   Save(0) = Max (F2, EpsSqrt);
-
+  Standard_Real aTol_Func = Epsilon(F2);
   FSR_DEBUG("=== Mode Debug de Function Set Root" << endl)
   FSR_DEBUG("    F2 Initial = " << F2)
 
@@ -1038,12 +1038,18 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F,
     //fin du test solution
    
     // Analyse de la progression...
-    if (F2 < PreviousMinimum) { 
+    //comparison of current minimum and previous minimum
+    if ((F2 - PreviousMinimum) <= aTol_Func){ 
       if (Kount > 5) {
 	// L'historique est il bon ?
 	if (F2 >= 0.95*Save(Kount - 5)) {
 	  if (!ChangeDirection) ChangeDirection = Standard_True;
-	  else return; //  si un gain inf a 5% on sort
+	  else 
+    {
+      Done = Standard_True;
+      State = F.GetStateNumber();
+      return; //  si un gain inf a 5% on sort
+    }
 	}
 	else ChangeDirection = Standard_False; //Si oui on recommence
       }
@@ -1084,9 +1090,15 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F,
 	  return;
 	}
       }
-      else return; // y a plus d'issues
+      else 
+      {
+        
+        State = F.GetStateNumber();
+        return; // y a plus d'issues
+      }
     }
   }
+  State = F.GetStateNumber();
 }
 
 

-- 
OCE packaging



More information about the debian-science-commits mailing list