mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix constructor arguments names
This commit is contained in:
@@ -807,7 +807,7 @@ int main(int argc, char** argv) {
|
||||
else if (output_extension == HDF) {
|
||||
const path_t mtl_filename = change_extension(output_filename, MTL);
|
||||
settings.set(IfcGeom::IteratorSettings::DISABLE_TRIANGULATION, true);
|
||||
serializer = boost::make_shared<HdfSerializer>(IfcUtil::path::to_utf8(output_temp_filename), IfcUtil::path::to_utf8(output_filename), settings);
|
||||
serializer = boost::make_shared<HdfSerializer>(IfcUtil::path::to_utf8(output_temp_filename), settings);
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
@@ -37,9 +37,9 @@ typedef struct s2_t {
|
||||
double a, b, c;
|
||||
} s2_t;
|
||||
|
||||
HdfSerializer::HdfSerializer(const std::string& obj_filename, const std::string& mtl_filename, const SerializerSettings& settings)
|
||||
HdfSerializer::HdfSerializer(const std::string& hdf_filename, const SerializerSettings& settings)
|
||||
: GeometrySerializer(settings)
|
||||
, mtl_filename(obj_filename)
|
||||
, hdf_filename(hdf_filename)
|
||||
, DATASET_NAME_POSITIONS("Positions")
|
||||
, DATASET_NAME_NORMALS("Normals")
|
||||
, DATASET_NAME_INDICES("Indices")
|
||||
@@ -88,7 +88,7 @@ bool HdfSerializer::ready() {
|
||||
}
|
||||
|
||||
void HdfSerializer::writeHeader() {
|
||||
const H5std_string FILE_NAME(mtl_filename);
|
||||
const H5std_string FILE_NAME(hdf_filename);
|
||||
file = H5::H5File(FILE_NAME, H5F_ACC_TRUNC);
|
||||
|
||||
}
|
||||
@@ -110,17 +110,11 @@ void HdfSerializer::write(const IfcGeom::BRepElement<real_t>* o) {
|
||||
|
||||
H5::Group OCCTGroup;
|
||||
H5::DataSet OCCTDataset;
|
||||
|
||||
|
||||
//const IfcGeom::BRepElement<real_t>*elem = static_cast<IfcGeom::BRepElement<real_t>*>(o);
|
||||
|
||||
|
||||
const IfcGeom::Representation::BRep& brepmesh = o->geometry();
|
||||
const IfcGeom::Representation::Serialization *serialization = new IfcGeom::Representation::Serialization(brepmesh);
|
||||
std::string brep_data = serialization->brep_data();
|
||||
|
||||
/*Logger::Status(brep_data);*/
|
||||
|
||||
const IfcGeom::TriangulationElement<real_t>*triangular_element = new IfcGeom::TriangulationElement<real_t>(*o);
|
||||
const IfcGeom::Representation::Triangulation<real_t>& mesh = triangular_element->geometry();
|
||||
const int vcount = (int)mesh.verts().size() / 3;
|
||||
|
||||
@@ -31,11 +31,8 @@
|
||||
// http://people.sc.fsu.edu/~jburkardt/txt/obj_format.txt
|
||||
class HdfSerializer : public GeometrySerializer {
|
||||
private:
|
||||
const std::string mtl_filename;
|
||||
std::ofstream obj_stream;
|
||||
std::ofstream mtl_stream;
|
||||
const std::string hdf_filename;
|
||||
unsigned int vcount_total;
|
||||
std::set<std::string> materials;
|
||||
H5::H5File file;
|
||||
std::set<std::string> guids;
|
||||
std::vector<double> double_data_container;
|
||||
@@ -50,11 +47,10 @@ private:
|
||||
|
||||
|
||||
public:
|
||||
HdfSerializer(const std::string& obj_filename, const std::string& mtl_filename, const SerializerSettings& settings);
|
||||
HdfSerializer(const std::string& hdf_filename, const SerializerSettings& settings);
|
||||
virtual ~HdfSerializer() {}
|
||||
bool ready();
|
||||
void writeHeader();
|
||||
void writeMaterial(const IfcGeom::Material& style);
|
||||
void write(const IfcGeom::BRepElement<real_t>* o);
|
||||
void write(const IfcGeom::TriangulationElement<real_t>* /*o*/) {}
|
||||
void finalize() {}
|
||||
|
||||
Reference in New Issue
Block a user