Create dgnwrite.cpp

/******************************************************************************
 * $Id: dgnwrite.cpp,v 1.33 2006/01/25 18:43:19 kintel Exp $
 *
 * Project:  Microstation DGN Access Library
 * Purpose:  DGN Access functions related to writing DGN elements.
 * Author:   Frank Warmerdam, warmerdam@pobox.com
 *
 ******************************************************************************
 * Copyright (c) 2002, Frank Warmerdam <warmerdam@pobox.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 ******************************************************************************
 *
 * $Log: dgnwrite.cpp,v $
 * Revision 1.33  2006/01/25 18:43:19  kintel
 * B-Spline curve and surface support
 *
 * Revision 1.27  2005/12/19 15:42:17  fwarmerdam
 * Fixed maximum number of points test in DGNCreateMultiPointElem()
 * per email from Chris @ melbpc.
 *
 * Revision 1.26  2005/12/19 15:39:00  fwarmerdam
 * Two fixes for uor handling in DGNCreate() as per Chris @melbpc's email.
 *
 * Revision 1.25  2005/12/18 22:12:49  kintel
 * Fix for cloning DGNST_CONE
 *
 * Revision 1.24  2005/11/18 22:45:01  fwarmerdam
 * Avoid use of round(), not available on win32.
 *
 * Revision 1.23  2005/11/18 17:35:48  fwarmerdam
 * Use rounding to improve calculation of text parameters in
 * DGNCreateTextElem() as per bug:
 * http://bugzilla.maptools.org/show_bug.cgi?id=1203
 *
 * Revision 1.22  2005/11/18 17:16:35  fwarmerdam
 * added TextNode implementation from Ilya Beylin
 *
 * Revision 1.21  2005/06/22 16:18:38  fwarmerdam
 * Fixed from JeffGIS for cloning DGNST_TAG_SET properly.
 *
 * Revision 1.20  2004/03/23 16:17:12  warmerda
 * Corrected level setting of cell header groups, and also fixed total length
 * of cell groups.
 *
 * Revision 1.19  2004/03/23 16:06:27  warmerda
 * Fixed up complex header attribute handling as complained about by EDG.
 *
 * Revision 1.18  2003/11/25 15:47:56  warmerda
 * Added surface type for complex headers: Marius
 *
 * Revision 1.17  2003/11/21 16:17:33  warmerda
 * fix missing handling of min/max Z in DGNCreateMultiPointElem()
 *
 * Revision 1.16  2003/11/21 14:43:59  warmerda
 * removed extra bounds transformation in DGNCreateCellHeaderFromGroup()
 *
 * Revision 1.15  2003/11/19 17:37:00  warmerda
 * Fixes from Marius: use ElemTypeHasDispHdr, and cosmetic
 *
 * Revision 1.14  2003/11/05 17:17:38  warmerda
 * use DGNLoadTCB() to ensure scaling setup
 *
 * Revision 1.13  2003/08/19 20:17:15  warmerda
 * Implemented DGNCreateConeElem(). Extended DGNCreateComplex*() to
 * support 3D surface and 3D solid elements.
 * Marius Kintel
 *
 * Revision 1.12  2003/06/27 14:50:53  warmerda
 * avoid warnings
 *
 * Revision 1.11  2003/06/12 17:33:17  warmerda
 * improved DNGO_CAPTURE_RAW_DATA flag documnentation
 *
 * Revision 1.10  2003/05/21 03:42:01  warmerda
 * Expanded tabs
 *
 * Revision 1.9  2003/05/15 14:47:24  warmerda
 * implement quaternion support on write
 *
 * Revision 1.8  2003/05/12 18:48:57  warmerda
 * added preliminary 3D write support
 *
 * Revision 1.7  2003/02/06 16:53:48  warmerda
 * Improved text bounding box calcuation from Mart Kelder.
 *
 * Revision 1.6  2003/01/20 20:06:55  warmerda
 * added cell header creation
 *
 * Revision 1.5  2002/11/13 21:26:32  warmerda
 * added more documentation
 *
 * Revision 1.4  2002/11/12 19:45:54  warmerda
 * added support to update TCB in DGNCreate
 *
 * Revision 1.3  2002/11/11 20:38:43  warmerda
 * implemented write api
 *
 * Revision 1.2  2002/10/20 01:50:20  warmerda
 * added new write prototypes
 *
 * Revision 1.1  2002/03/14 21:40:43  warmerda
 * New
 *
 */