1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-26 10:19:45 +03:00
occt/src/BRepMesh/BRepMesh_CustomDelaunayBaseMeshAlgo.hxx
oan f2006a6f19 0028089: Mesh - New algorithm for triangulation of 2d polygons
Added custom meshing core algorithm to generate base mesh using Delabella library,
which can be enabled via IMeshTools_Parameters::MeshAlgo option or CSF_MeshAlgo environment variable.

Do not fill cirles filter upon explicit initialization.
Call base postProcessMesh functionality after initialization of circles in BRepMesh_CustomDelaunayBaseMeshAlgo.

Added Vsprintf() wrapper for vsprintf() preserving C locale.
2020-09-27 12:00:07 +03:00

55 lines
1.8 KiB
C++

// Created on: 2019-06-07
// Copyright (c) 2019 OPEN CASCADE SAS
// Created by: Oleg AGASHIN
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepMesh_CustomDelaunayBaseMeshAlgo_HeaderFile
#define _BRepMesh_CustomDelaunayBaseMeshAlgo_HeaderFile
class BRepMesh_DataStructureOfDelaun;
class BRepMesh_Delaun;
//! Class provides base functionality to build face triangulation using custom
//! triangulation algorithm with possibility to modify final mesh.
//! Performs generation of mesh using raw data from model.
template<class BaseAlgo>
class BRepMesh_CustomDelaunayBaseMeshAlgo : public BaseAlgo
{
public:
//! Constructor.
BRepMesh_CustomDelaunayBaseMeshAlgo ()
{
}
//! Destructor.
virtual ~BRepMesh_CustomDelaunayBaseMeshAlgo ()
{
}
protected:
//! Performs processing of generated mesh.
virtual void postProcessMesh (BRepMesh_Delaun& theMesher,
const Message_ProgressRange& theRange)
{
const Handle(BRepMesh_DataStructureOfDelaun)& aStructure = this->getStructure();
std::pair<Standard_Integer, Standard_Integer> aCellsCount = this->getCellsCount (aStructure->NbNodes());
theMesher.InitCirclesTool (aCellsCount.first, aCellsCount.second);
BaseAlgo::postProcessMesh (theMesher, theRange);
}
};
#endif