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.
 
 

57 lines
1.0 KiB

#pragma once
#include "OccHelper.hpp"
#include "assert.hpp"
namespace meshless {
class OccShape {
public:
int max_points = 500000;
int seed_;
int n_samples = 15;
double zeta = 1 - 1e-10;
double epsilon = 0;
TopoDS_Shape myShape;
public:
OccShape() {}
OccShape(const TopoDS_Shape& myShape_) {
max_points = 500000;
seed_;
n_samples = 15;
zeta = 1 - 1e-10;
epsilon = 0;
myShape = myShape_;
}
OccShape& maxPoints(int max_points) {
this->max_points = max_points;
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;
}
};
};