You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.3 KiB

3 years ago
#pragma once
#include "OccHelper.hpp"
#include "assert.hpp"
namespace meshless {
class OccShape {
public:
3 years ago
int max_points_boundary = 500000;
int max_points_interior = 500000;
3 years ago
int seed_;
int n_samples = 15;
double zeta = 1 - 1e-10;
double epsilon = 0;
TopoDS_Shape myShape;
public:
OccShape() {}
OccShape(const TopoDS_Shape& myShape_) {
3 years ago
max_points_boundary = 500000;
3 years ago
seed_;
n_samples = 15;
zeta = 1 - 1e-10;
epsilon = 0;
myShape = myShape_;
}
3 years ago
OccShape& maxPointsBoundary(int max_points_boundary) {
this->max_points_boundary = max_points_boundary;
return *this;
}
OccShape& maxPointsInterior(int max_points_interior) {
this->max_points_interior = max_points_interior;
3 years ago
return *this;
}
OccShape& seed(int seed) {
seed_ = seed;
return *this;
}
OccShape& numSamples(int n_samples) {
this->n_samples = n_samples;
return *this;
}
OccShape& proximityTolerance(double zeta) {
assert_msg((0 < zeta && zeta < 1), "Zeta must be between 0 and 1, got %f.", zeta);
this->zeta = zeta;
return *this;
}
OccShape& boundaryProximity(double epsilon) {
assert_msg((0 < epsilon && epsilon < 1), "Epsilon must be between 0 and 1, got %f.", epsilon);
this->epsilon = epsilon;
return *this;
}
};
};