ENH:loading the step in boost thread

github: #6079
Change-Id: I0a289fc9730e7d091a71137cf11a711dfee5392f
(cherry picked from commit b454e7d8bb91b62b3be6121c567f7aee291eff50)
(cherry picked from commit b7ffba39e407317ad3cc4fe65d220f0049963aa9)
This commit is contained in:
Mack
2025-03-25 11:28:07 +08:00
committed by Noisyfox
parent ed40ce590b
commit 5004fbbf60
3 changed files with 466 additions and 216 deletions

View File

@@ -87,14 +87,28 @@ private:
class Step
{
public:
enum class Step_Status {
LOAD_SUCCESS,
LOAD_ERROR,
CANCEL,
MESH_SUCCESS,
MESH_ERROR
};
Step(fs::path path, ImportStepProgressFn stepFn = nullptr, StepIsUtf8Fn isUtf8Fn = nullptr);
Step(std::string path, ImportStepProgressFn stepFn = nullptr, StepIsUtf8Fn isUtf8Fn = nullptr);
bool load();
~Step();
Step_Status load();
unsigned int get_triangle_num(double linear_defletion, double angle_defletion);
unsigned int get_triangle_num_tbb(double linear_defletion, double angle_defletion);
void clean_mesh_data();
Step_Status mesh(Model* model,
bool& is_cancel,
bool isSplitCompound,
double linear_defletion = 0.003,
double angle_defletion = 0.5);
std::atomic<bool> m_stop_mesh;
void update_process(int load_stage, int current, int total, bool& cancel);
private:
std::string m_path;
ImportStepProgressFn m_stepFn;