gmio/src/gmio_support/stl_occ.h

72 lines
2.3 KiB
C
Raw Normal View History

2015-03-05 00:41:07 +08:00
/****************************************************************************
2015-05-28 15:40:24 +08:00
** gmio
2015-05-06 15:39:37 +08:00
** Copyright Fougue (2 Mar. 2015)
2015-07-13 17:42:03 +08:00
** contact@fougue.pro
2015-03-05 00:41:07 +08:00
**
** This software is a reusable library whose purpose is to provide complete
** I/O support for various CAD file formats (eg. STL)
**
** This software is governed by the CeCILL-B license under French law and
** abiding by the rules of distribution of free software. You can use,
** modify and/ or redistribute the software under the terms of the CeCILL-B
** license as circulated by CEA, CNRS and INRIA at the following URL
2015-03-30 15:05:25 +08:00
** "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html".
2015-03-05 00:41:07 +08:00
****************************************************************************/
/*! \file stl_occ.h
2015-03-05 01:25:51 +08:00
* Support of OpenCascade's StlMesh_Mesh
*/
#ifndef __cplusplus
# error C++ compiler required
#endif
#ifndef GMIO_SUPPORT_STL_OCC_H
#define GMIO_SUPPORT_STL_OCC_H
#include "support_global.h"
2015-03-19 23:34:53 +08:00
#include "../gmio_stl/stl_mesh.h"
#include "../gmio_stl/stl_mesh_creator.h"
class Handle_StlMesh_Mesh;
class StlMesh_Mesh;
2015-03-20 17:11:57 +08:00
/*! Domain in a OpenCascade \c StlMesh_Mesh object
2014-11-21 18:39:23 +08:00
*
* The domain is indicated with its index within the STL mesh
*/
struct GMIO_LIBSUPPORT_EXPORT gmio_occ_stl_mesh_domain
{
gmio_occ_stl_mesh_domain();
gmio_occ_stl_mesh_domain(const StlMesh_Mesh* mesh, int dom_id = 1);
gmio_occ_stl_mesh_domain(const Handle_StlMesh_Mesh& hndMesh, int dom_id = 1);
const StlMesh_Mesh* mesh;
int domain_id;
};
typedef struct gmio_occ_stl_mesh_domain gmio_occ_stl_mesh_domain_t;
2015-03-19 23:34:53 +08:00
/*! Returns a gmio_stl_mesh mapped to domain in StlMesh_Mesh
*
* The mesh's cookie will point to \p mesh_domain
2015-03-19 23:34:53 +08:00
*/
GMIO_LIBSUPPORT_EXPORT
gmio_stl_mesh_t gmio_stl_occmesh(const gmio_occ_stl_mesh_domain_t* mesh_domain);
2015-03-19 23:34:53 +08:00
/*! Returns a gmio_stl_mesh_creator that will build a new domain in a
* StlMesh_Mesh object
*
* The creator's cookie will point \p mesh
*/
GMIO_LIBSUPPORT_EXPORT
gmio_stl_mesh_creator_t gmio_stl_occmesh_creator(StlMesh_Mesh* mesh);
/*! Same as gmio_stl_occmesh_creator(StlMesh_Mesh*) but takes a handle
2015-03-19 23:34:53 +08:00
*
* The creator's cookie will point to the internal data(ie StlMesh_Mesh*) of
* handle \p hnd
2014-11-21 18:39:23 +08:00
*/
GMIO_LIBSUPPORT_EXPORT
gmio_stl_mesh_creator_t gmio_stl_hnd_occmesh_creator(const Handle_StlMesh_Mesh& hnd);
#endif /* GMIO_SUPPORT_STL_OCC_H */