2015-03-05 00:41:07 +08:00
|
|
|
/****************************************************************************
|
|
|
|
** GeomIO Library
|
2015-05-06 15:39:37 +08:00
|
|
|
** Copyright Fougue (2 Mar. 2015)
|
2015-03-05 00:41:07 +08:00
|
|
|
** contact@fougsys.fr
|
|
|
|
**
|
|
|
|
** 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
|
|
|
****************************************************************************/
|
|
|
|
|
2015-04-02 16:27:51 +08:00
|
|
|
/*! \file stl_occ.h
|
2015-03-05 01:25:51 +08:00
|
|
|
* Support of OpenCascade's StlMesh_Mesh
|
|
|
|
*/
|
|
|
|
|
2015-04-02 16:27:51 +08:00
|
|
|
#ifndef GMIO_SUPPORT_STL_OCC_H
|
|
|
|
#define GMIO_SUPPORT_STL_OCC_H
|
2014-03-28 23:33:35 +08:00
|
|
|
|
|
|
|
#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"
|
|
|
|
|
2014-03-28 23:33:35 +08:00
|
|
|
#include <Handle_StlMesh_Mesh.hxx>
|
2014-04-17 16:19:23 +08:00
|
|
|
struct gmio_stl_mesh;
|
|
|
|
struct gmio_stl_mesh_creator;
|
2014-03-28 23:33:35 +08:00
|
|
|
|
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
|
|
|
|
*/
|
2014-03-28 23:33:35 +08:00
|
|
|
class GMIO_LIBSUPPORT_EXPORT gmio_OccStlMeshDomain
|
|
|
|
{
|
|
|
|
public:
|
2015-03-20 00:31:08 +08:00
|
|
|
gmio_OccStlMeshDomain(const Handle_StlMesh_Mesh& stlMesh, int domId = 1);
|
2014-03-28 23:33:35 +08:00
|
|
|
|
2015-03-20 00:31:08 +08:00
|
|
|
const Handle_StlMesh_Mesh& mesh() const;
|
|
|
|
void setMesh(const Handle_StlMesh_Mesh& stlMesh);
|
2014-03-28 23:33:35 +08:00
|
|
|
|
2015-03-20 00:31:08 +08:00
|
|
|
int domainId() const;
|
|
|
|
void setDomainId(int domId);
|
2014-03-28 23:33:35 +08:00
|
|
|
|
|
|
|
private:
|
2015-03-20 00:31:08 +08:00
|
|
|
Handle_StlMesh_Mesh m_mesh;
|
|
|
|
int m_domainId;
|
2014-03-28 23:33:35 +08:00
|
|
|
};
|
|
|
|
|
2015-03-05 01:25:51 +08:00
|
|
|
/*! Initializes \p mesh so it maps to a domain in StlMesh_Mesh
|
2014-11-21 18:39:23 +08:00
|
|
|
*
|
|
|
|
* \c mesh->cookie will point to \p meshCookie
|
|
|
|
*/
|
2014-03-28 23:33:35 +08:00
|
|
|
GMIO_LIBSUPPORT_EXPORT
|
2015-03-19 23:34:53 +08:00
|
|
|
void gmio_stl_set_occmesh(
|
|
|
|
gmio_stl_mesh* mesh, const gmio_OccStlMeshDomain& meshCookie);
|
|
|
|
|
|
|
|
/*! Returns a gmio_stl_mesh mapped to domain in StlMesh_Mesh
|
|
|
|
*
|
|
|
|
* The mesh's cookie will point to \p meshCookie
|
|
|
|
*/
|
|
|
|
GMIO_LIBSUPPORT_EXPORT
|
|
|
|
gmio_stl_mesh gmio_stl_occmesh(const gmio_OccStlMeshDomain& meshCookie);
|
2014-03-28 23:33:35 +08:00
|
|
|
|
2015-03-05 01:25:51 +08:00
|
|
|
/*! Initializes \p creator to build a new domain in a StlMesh_Mesh object
|
2014-11-21 18:39:23 +08:00
|
|
|
*
|
2015-03-19 23:34:53 +08:00
|
|
|
* \c creator->cookie will point to the internal data(ie StlMesh_Mesh*) of
|
|
|
|
* handle \p mesh
|
|
|
|
*/
|
|
|
|
GMIO_LIBSUPPORT_EXPORT
|
|
|
|
void gmio_stl_set_occmesh_creator(
|
|
|
|
gmio_stl_mesh_creator* creator, const Handle_StlMesh_Mesh& mesh);
|
|
|
|
|
|
|
|
/*! Returns a gmio_stl_mesh_creator that will build a new domain in a
|
|
|
|
* StlMesh_Mesh object
|
|
|
|
*
|
|
|
|
* The creator's cookie will point to the internal data(ie StlMesh_Mesh*) of
|
|
|
|
* handle \p mesh
|
2014-11-21 18:39:23 +08:00
|
|
|
*/
|
2014-03-28 23:33:35 +08:00
|
|
|
GMIO_LIBSUPPORT_EXPORT
|
2015-03-19 23:34:53 +08:00
|
|
|
gmio_stl_mesh_creator gmio_stl_occmesh_creator(const Handle_StlMesh_Mesh& mesh);
|
2014-03-28 23:33:35 +08:00
|
|
|
|
2015-04-02 16:27:51 +08:00
|
|
|
#endif /* GMIO_SUPPORT_STL_OCC_H */
|