[Mesh] Feature*: remove unused includes

- also some sorting
This commit is contained in:
Uwe
2022-11-11 13:39:28 +01:00
parent 21f47cf2ec
commit dbff8faef6
19 changed files with 61 additions and 156 deletions

View File

@@ -20,16 +20,16 @@
* *
***************************************************************************/
#ifndef MESH_GRID_H
#define MESH_GRID_H
#include <set>
#include "MeshKernel.h"
#include <Base/Vector3D.h>
#include <Base/BoundBox.h>
#include "MeshKernel.h"
#define MESH_CT_GRID 256 // Default value for number of elements per grid
#define MESH_MAX_GRIDS 100000 // Default value for maximum number of grids
#define MESH_CT_GRID_PER_AXIS 20
@@ -41,7 +41,6 @@ class MeshKernel;
class MeshGeomFacet;
class MeshGrid;
//#define MESHGRID_BBOX_EXTENSION 1.0e-3f
#define MESHGRID_BBOX_EXTENSION 10.0f
/**

View File

@@ -20,22 +20,12 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Matrix.h>
#include <Base/Sequencer.h>
#include "FeatureMeshCurvature.h"
#include "MeshFeature.h"
#include "Core/Curvature.h"
#include "Core/Elements.h"
#include "Core/Iterator.h"
#include "FeatureMeshCurvature.h"
#include "MeshFeature.h"
using namespace Mesh;

View File

@@ -20,17 +20,15 @@
* *
***************************************************************************/
#ifndef FeatureMeshCurvature_H
#define FeatureMeshCurvature_H
#include <App/DocumentObject.h>
#include <App/PropertyLinks.h>
#include <App/PropertyGeo.h>
#include "Mesh.h"
#include "MeshProperties.h"
namespace Mesh
{

View File

@@ -20,18 +20,14 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include <Base/Tools.h>
#include "Core/Degeneration.h"
#include "Core/Triangulation.h"
#include "FeatureMeshDefects.h"
#include "Core/Degeneration.h"
#include "Core/TopoAlgorithm.h"
#include "Core/Triangulation.h"
#include <Base/Tools.h>
using namespace Mesh;

View File

@@ -20,14 +20,14 @@
* *
***************************************************************************/
#ifndef MESH_FEATURE_MESH_DEFECTS_H
#define MESH_FEATURE_MESH_DEFECTS_H
#include <App/PropertyStandard.h>
#include <App/PropertyLinks.h>
#include "MeshFeature.h"
namespace Mesh
{

View File

@@ -20,19 +20,11 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Sequencer.h>
#include "FeatureMeshExport.h"
#include "MeshFeature.h"
#include "Core/MeshIO.h"
using namespace Mesh;
using namespace MeshCore;
@@ -41,9 +33,9 @@ PROPERTY_SOURCE(Mesh::Export, App::DocumentObject)
Export::Export()
{
ADD_PROPERTY(Source ,(nullptr));
ADD_PROPERTY(FileName,(""));
ADD_PROPERTY(Format ,(""));
ADD_PROPERTY(Source, (nullptr));
ADD_PROPERTY(FileName, (""));
ADD_PROPERTY(Format, (""));
}
short Export::mustExecute() const

View File

@@ -20,15 +20,14 @@
* *
***************************************************************************/
#ifndef MESH_FEATUREMESHEXPORT_H
#define MESH_FEATUREMESHEXPORT_H
#include <App/DocumentObject.h>
#include <App/PropertyStandard.h>
#include <App/PropertyLinks.h>
#ifndef MESH_GLOBAL_H
#include <Mod/Mesh/MeshGlobal.h>
# include <Mod/Mesh/MeshGlobal.h>
#endif
namespace Mesh

View File

@@ -20,18 +20,10 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Sequencer.h>
#include "FeatureMeshImport.h"
#include "Core/MeshIO.h"
using namespace Mesh;
using namespace MeshCore;
@@ -39,9 +31,8 @@ using namespace MeshCore;
PROPERTY_SOURCE(Mesh::Import, Mesh::Feature)
Mesh::Import::Import()
{
ADD_PROPERTY(FileName,(""));
Mesh::Import::Import() {
ADD_PROPERTY(FileName, (""));
}
short Mesh::Import::mustExecute() const

View File

@@ -20,15 +20,14 @@
* *
***************************************************************************/
#ifndef FEATURE_MESH_IMPORT_H
#define FEATURE_MESH_IMPORT_H
#include "MeshFeature.h"
#include <App/PropertyStandard.h>
#include <App/PropertyFile.h>
namespace Mesh
{

View File

@@ -20,20 +20,12 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Sequencer.h>
#include <Base/Converter.h>
#include "Core/Algorithm.h"
#include "Core/Evaluation.h"
#include "Core/Iterator.h"
#include "Core/Visitor.h"
#include "FeatureMeshSegmentByMesh.h"
@@ -46,10 +38,10 @@ PROPERTY_SOURCE(Mesh::SegmentByMesh, Mesh::Feature)
SegmentByMesh::SegmentByMesh()
{
ADD_PROPERTY(Source ,(nullptr));
ADD_PROPERTY(Tool ,(nullptr));
ADD_PROPERTY(Base ,(0.0,0.0,0.0));
ADD_PROPERTY(Normal ,(0.0,0.0,1.0));
ADD_PROPERTY(Source, (nullptr));
ADD_PROPERTY(Tool, (nullptr));
ADD_PROPERTY(Base, (0.0, 0.0, 0.0));
ADD_PROPERTY(Normal, (0.0, 0.0, 1.0));
}
short SegmentByMesh::mustExecute() const

View File

@@ -20,17 +20,13 @@
* *
***************************************************************************/
#ifndef FEATURE_MESH_SEGMENTBYMESH_H
#define FEATURE_MESH_SEGMENTBYMESH_H
#include <App/PropertyStandard.h>
#include <App/PropertyLinks.h>
#include "MeshFeature.h"
#include <App/PropertyLinks.h>
#include <App/PropertyGeo.h>
namespace Mesh
{

View File

@@ -20,21 +20,9 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Sequencer.h>
#include "Core/MeshKernel.h"
#include "Core/Algorithm.h"
#include "Core/Evaluation.h"
#include "Core/Iterator.h"
#include "Core/Visitor.h"
#include "Core/SetOperations.h"
#include "FeatureMeshSetOperations.h"
@@ -48,8 +36,8 @@ PROPERTY_SOURCE(Mesh::SetOperations, Mesh::Feature)
SetOperations::SetOperations()
{
ADD_PROPERTY(Source1 ,(nullptr));
ADD_PROPERTY(Source2 ,(nullptr));
ADD_PROPERTY(Source1, (nullptr));
ADD_PROPERTY(Source2, (nullptr));
ADD_PROPERTY(OperationType, ("union"));
}

View File

@@ -20,17 +20,13 @@
* *
***************************************************************************/
#ifndef FEATURE_MESH_SETOPERATIONS_H
#define FEATURE_MESH_SETOPERATIONS_H
#include <App/PropertyStandard.h>
#include <App/PropertyLinks.h>
#include "MeshFeature.h"
#include <App/PropertyLinks.h>
#include <App/PropertyGeo.h>
namespace Mesh
{

View File

@@ -20,23 +20,16 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Interpreter.h>
#include <App/Document.h>
#include "FeatureMeshSolid.h"
#include "Mesh.h"
namespace Mesh {
const App::PropertyIntegerConstraint::Constraints intSampling = {0,INT_MAX,1};
const App::PropertyLength::Constraints floatRange = {0.0,FLT_MAX,1.0};
const App::PropertyIntegerConstraint::Constraints intSampling = {0, INT_MAX, 1};
const App::PropertyLength::Constraints floatRange = {0.0, FLT_MAX, 1.0};
}
using namespace Mesh;
@@ -46,8 +39,8 @@ PROPERTY_SOURCE(Mesh::Sphere, Mesh::Feature)
Sphere::Sphere()
{
ADD_PROPERTY(Radius ,(5.0));
ADD_PROPERTY(Sampling ,(50));
ADD_PROPERTY(Radius, (5.0));
ADD_PROPERTY(Sampling, (50));
Radius.setConstraints(&floatRange);
Sampling.setConstraints(&intSampling);
}

View File

@@ -20,14 +20,13 @@
* *
***************************************************************************/
#ifndef FEATURE_MESH_SOLID_H
#define FEATURE_MESH_SOLID_H
#include "MeshFeature.h"
#include <App/PropertyUnits.h>
#include <App/PropertyLinks.h>
namespace Mesh
{

View File

@@ -20,47 +20,40 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Sequencer.h>
#include <Base/Matrix.h>
using Base::Matrix4D;
#include "FeatureMeshTransform.h"
#include <App/PropertyLinks.h>
#include <App/PropertyGeo.h>
using Base::Matrix4D;
using namespace Mesh;
using namespace MeshCore;
PROPERTY_SOURCE(Mesh::Transform, Mesh::Feature)
Transform::Transform()
{
ADD_PROPERTY(Source ,(nullptr));
ADD_PROPERTY(Position,(Matrix4D()));
ADD_PROPERTY(Source, (nullptr));
ADD_PROPERTY(Position, (Matrix4D()));
}
App::DocumentObjectExecReturn *Transform::execute()
App::DocumentObjectExecReturn* Transform::execute()
{
/*
Feature *pcFirst = dynamic_cast<Feature*>(Source.getValue());
if(!pcFirst || pcFirst->isError())
return new App::DocumentObjectExecReturn("Unknown Error");
Feature* pcFirst = dynamic_cast<Feature*>(Source.getValue());
if (!pcFirst || pcFirst->isError())
return new App::DocumentObjectExecReturn("Unknown Error");
Matrix4D Matrix =Position.getValue();
Matrix4D Matrix = Position.getValue();
MeshCore::MeshKernel *pcKernel = new MeshCore::MeshKernel(pcFirst->Mesh.getValue()); // Result Meshkernel
pcKernel->Transform(Matrix);
Mesh.setValue(pcKernel);
MeshCore::MeshKernel* pcKernel =
new MeshCore::MeshKernel(pcFirst->Mesh.getValue());// Result Meshkernel
pcKernel->Transform(Matrix);
Mesh.setValue(pcKernel);
*/
return App::DocumentObject::StdReturn;
return App::DocumentObject::StdReturn;
}

View File

@@ -20,14 +20,12 @@
* *
***************************************************************************/
#ifndef FEATURE_MESH_TRANSFORM_H
#define FEATURE_MESH_TRANSFORM_H
#include "MeshFeature.h"
#include <App/PropertyLinks.h>
#include <App/PropertyGeo.h>
#include "MeshFeature.h"
namespace Mesh

View File

@@ -20,21 +20,10 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Sequencer.h>
#include <Base/Matrix.h>
#include <Base/Vector3D.h>
#include "FeatureMeshTransformDemolding.h"
#include "Core/MeshIO.h"
using namespace Mesh;
using namespace MeshCore;
@@ -44,21 +33,21 @@ PROPERTY_SOURCE(Mesh::TransformDemolding, Mesh::Transform)
TransformDemolding::TransformDemolding()
{
ADD_PROPERTY(Source,(nullptr));
ADD_PROPERTY(Rotation,(0.0));
ADD_PROPERTY(Axis,(0.0,0.0,1.0));
ADD_PROPERTY(Source, (nullptr));
ADD_PROPERTY(Rotation, (0.0));
ADD_PROPERTY(Axis, (0.0, 0.0, 1.0));
}
App::DocumentObjectExecReturn *TransformDemolding::execute()
{/*
{ /*
Feature *pcFirst = dynamic_cast<Feature*>(Source.getValue());
if(!pcFirst || pcFirst->isError())
return new App::DocumentObjectExecReturn("Unknown Error");
if (!pcFirst || pcFirst->isError())
return new App::DocumentObjectExecReturn("Unknown Error");
MeshCore::MeshKernel *pcKernel = new MeshCore::MeshKernel(pcFirst->Mesh.getValue()); // Result Meshkernel
Base::Matrix4D trans(Base::Vector3f(0,0,0), Axis.getValue(), Rotation.getValue() );
MeshCore::MeshKernel* pcKernel = new MeshCore::MeshKernel(pcFirst->Mesh.getValue()); // Result Meshkernel
Base::Matrix4D trans(Base::Vector3f(0, 0, 0), Axis.getValue(), Rotation.getValue());
//Matrix4D trans;
//trans.rotLine( Axis.getValue(), Rotation.getValue() );
//trans.rotLine(Axis.getValue(), Rotation.getValue());
pcKernel->Transform(trans);
Mesh.setValue(pcKernel);
*/

View File

@@ -20,15 +20,12 @@
* *
***************************************************************************/
#ifndef FEATURE_MESH_TRANSFORM_DEMOLDING_H
#define FEATURE_MESH_TRANSFORM_DEMOLDING_H
#include "FeatureMeshTransform.h"
#include <App/PropertyLinks.h>
#include <App/PropertyGeo.h>
#include <App/PropertyStandard.h>
#include "FeatureMeshTransform.h"
namespace Mesh