mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 15:53:00 +00:00
Merge branch 'v0.8.0' into tfk-rocksdb-storage
This commit is contained in:
@@ -141,13 +141,12 @@ size_t write_accessor(json& j, std::ofstream& ofs, It begin, It end, int bufferV
|
||||
accessor["componentType"] = component_type<typename It::value_type>::value;
|
||||
accessor["count"] = num;
|
||||
|
||||
if (N == 1) {
|
||||
if constexpr (N == 1) {
|
||||
j["bufferViews"].push_back({ {"buffer", 0}, {"byteOffset", (size_t)ofs.tellp()}, { "byteLength", num * 4}, {"target", ELEMENT_ARRAY_BUFFER} });
|
||||
} else {
|
||||
j["bufferViews"].push_back({ {"buffer", 0}, {"byteStride", 12}, { "byteOffset", (size_t)ofs.tellp()}, { "byteLength", num * 12}, {"target", ARRAY_BUFFER}});
|
||||
}
|
||||
|
||||
|
||||
std::array<typename It::value_type, N> min, max;
|
||||
min.fill(std::numeric_limits<typename It::value_type>::max());
|
||||
max.fill(std::numeric_limits<typename It::value_type>::lowest());
|
||||
|
||||
@@ -82,9 +82,10 @@ boost::optional<std::string> format_attribute(ifcopenshell::geometry::abstract_m
|
||||
}
|
||||
|
||||
switch(argument_type) {
|
||||
case IfcUtil::Argument_BOOL: {
|
||||
const bool b = argument;
|
||||
value = b ? "true" : "false";
|
||||
case IfcUtil::Argument_BOOL:
|
||||
case IfcUtil::Argument_LOGICAL:{
|
||||
const boost::logic::tribool b = argument;
|
||||
value = b.value == boost::logic::tribool::indeterminate_value ? "unknown" : b ? "true" : "false";
|
||||
break; }
|
||||
case IfcUtil::Argument_DOUBLE: {
|
||||
const double d = argument;
|
||||
|
||||
Reference in New Issue
Block a user