Files
ViewDesignEngine/include/vde/brep/step_import.h
T

34 lines
928 B
C++
Raw Normal View History

#pragma once
#include "vde/brep/brep.h"
#include <string>
#include <vector>
namespace vde::brep {
/// STEP import error codes
enum class StepError {
Ok = 0,
FileNotFound,
ParseError,
InvalidHeader,
UnsupportedSchema,
MissingEntity,
EntityTypeError,
};
/// Parse a STEP file (AP203/AP214) and return B-Rep bodies
/// @param filepath Path to .step/.stp file
/// @return Vector of BrepModel bodies (one per PRODUCT in the file)
[[nodiscard]] std::vector<BrepModel> import_step(const std::string& filepath);
/// Parse STEP data from a string (for testing)
[[nodiscard]] std::vector<BrepModel> import_step_from_string(const std::string& step_data);
/// Get the last error from import_step / import_step_from_string
[[nodiscard]] StepError step_last_error();
/// Get a human-readable description of the last error
[[nodiscard]] const std::string& step_last_error_message();
} // namespace vde::brep