mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 07:49:59 +00:00
Merge branch 'v0.8.0' into v0.8.0
This commit is contained in:
@@ -205,7 +205,6 @@ void ColladaSerializer::ColladaExporter::ColladaScene::add(
|
||||
|
||||
const auto& posmatrix = transformation_towrite;
|
||||
|
||||
// @todo check
|
||||
double matrix_array[4][4] = {
|
||||
{ (double)posmatrix(0,0), (double)posmatrix(0,1), (double)posmatrix(0,2), (double)posmatrix(0,3) },
|
||||
{ (double)posmatrix(1,0), (double)posmatrix(1,1), (double)posmatrix(1,2), (double)posmatrix(1,3) },
|
||||
@@ -249,10 +248,10 @@ void ColladaSerializer::ColladaExporter::ColladaScene::addParent(const IfcGeom::
|
||||
const auto& posmatrix = transformation_towrite;
|
||||
|
||||
double matrix_array[4][4] = {
|
||||
{ (double)posmatrix(0,0), (double)posmatrix(1,0), (double)posmatrix(2,0), (double)posmatrix(3,0) },
|
||||
{ (double)posmatrix(0,1), (double)posmatrix(1,1), (double)posmatrix(2,1), (double)posmatrix(3,1) },
|
||||
{ (double)posmatrix(0,2), (double)posmatrix(1,2), (double)posmatrix(2,2), (double)posmatrix(3,2) },
|
||||
{ (double)posmatrix(0,3), (double)posmatrix(1,3), (double)posmatrix(2,3), (double)posmatrix(3,3) }
|
||||
{ (double)posmatrix(0,0), (double)posmatrix(0,1), (double)posmatrix(0,2), (double)posmatrix(0,3) },
|
||||
{ (double)posmatrix(1,0), (double)posmatrix(1,1), (double)posmatrix(1,2), (double)posmatrix(1,3) },
|
||||
{ (double)posmatrix(2,0), (double)posmatrix(2,1), (double)posmatrix(2,2), (double)posmatrix(2,3) },
|
||||
{ (double)posmatrix(3,0), (double)posmatrix(3,1), (double)posmatrix(3,2), (double)posmatrix(3,3) }
|
||||
};
|
||||
|
||||
std::string name = serializer->object_id(&parent);
|
||||
|
||||
@@ -398,6 +398,7 @@ IfcGeom::Element* HdfSerializer::read(IfcParse::IfcFile& f, const std::string& g
|
||||
auto uvcoords = read_dataset<double>(meshGroup, DATASET_NAME_UVCOORDS);
|
||||
auto material_ids = read_dataset<int>(meshGroup, DATASET_NAME_MATERIAL_IDS);
|
||||
auto item_ids = read_dataset<int>(meshGroup, DATASET_NAME_ITEM_IDS);
|
||||
auto edges_item_ids = read_dataset<int>(meshGroup, DATASET_NAME_EDGES_ITEM_IDS);
|
||||
|
||||
std::vector<surface_style_serialization> surface_styles;
|
||||
|
||||
@@ -435,6 +436,7 @@ IfcGeom::Element* HdfSerializer::read(IfcParse::IfcFile& f, const std::string& g
|
||||
material_ids,
|
||||
surface_style_ptrs,
|
||||
item_ids
|
||||
, edges_item_ids
|
||||
));
|
||||
|
||||
triangulation_cache_.insert({ representation_id_str, triangulation_geometry });
|
||||
@@ -696,6 +698,7 @@ const H5std_string HdfSerializer::DATASET_NAME_INDICES = "indices";
|
||||
const H5std_string HdfSerializer::DATASET_NAME_EDGES = "edges";
|
||||
const H5std_string HdfSerializer::DATASET_NAME_MATERIAL_IDS = "material_ids";
|
||||
const H5std_string HdfSerializer::DATASET_NAME_ITEM_IDS = "item_ids";
|
||||
const H5std_string HdfSerializer::DATASET_NAME_EDGES_ITEM_IDS = "edges_item_ids";
|
||||
const H5std_string HdfSerializer::DATASET_NAME_MATERIALS = "materials";
|
||||
const H5std_string HdfSerializer::DATASET_NAME_OCCT = "brep";
|
||||
const H5std_string HdfSerializer::DATASET_NAME_PLACEMENT = "placement";
|
||||
|
||||
@@ -47,6 +47,7 @@ private:
|
||||
static const H5std_string DATASET_NAME_EDGES;
|
||||
static const H5std_string DATASET_NAME_MATERIAL_IDS;
|
||||
static const H5std_string DATASET_NAME_ITEM_IDS;
|
||||
static const H5std_string DATASET_NAME_EDGES_ITEM_IDS;
|
||||
static const H5std_string DATASET_NAME_MATERIALS;
|
||||
static const H5std_string DATASET_NAME_OCCT;
|
||||
static const H5std_string DATASET_NAME_PLACEMENT;
|
||||
|
||||
@@ -352,6 +352,13 @@ ptree* descend(ifcopenshell::geometry::abstract_mapping* mapping, IfcSchema::Ifc
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SCHEMA_HAS_IfcAlignmentSegment
|
||||
if (auto* als = product->as<IfcSchema::IfcAlignmentSegment>()) {
|
||||
ptree node;
|
||||
format_entity_instance(mapping, als->DesignParameters(), node, child, false);
|
||||
}
|
||||
#endif
|
||||
|
||||
return &child;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user