mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-16 10:34:31 +00:00
IfcConvert --precision option.
Sets the decimal precision to be used to format floating-point values, 15 by default. Use a negative value to use the system's default precision (should be 6 typically). Applicable for OBJ and DAE output. For DAE output, value >= 15 means that up to 16 decimals are used, and any other value means that 6 or 7 decimals are used.
This commit is contained in:
committed by
Thomas Krijnen
parent
2d58a1bc7c
commit
ecff54c480
@@ -51,6 +51,7 @@ void WaveFrontOBJSerializer::writeMaterial(const IfcGeom::Material& style)
|
||||
? style.original_name() : style.name());
|
||||
IfcUtil::sanitate_material_name(material_name);
|
||||
mtl_stream << "newmtl " << material_name << "\n";
|
||||
|
||||
if (style.hasDiffuse()) {
|
||||
const double* diffuse = style.diffuse();
|
||||
mtl_stream << "Kd " << diffuse[0] << " " << diffuse[1] << " " << diffuse[2] << "\n";
|
||||
@@ -77,11 +78,9 @@ void WaveFrontOBJSerializer::write(const IfcGeom::TriangulationElement<real_t>*
|
||||
? o->name() : o->unique_id()));
|
||||
obj_stream << "g " << name << "\n";
|
||||
obj_stream << "s 1" << "\n";
|
||||
|
||||
obj_stream << std::setprecision(std::numeric_limits<double>::digits10);
|
||||
|
||||
const IfcGeom::Representation::Triangulation<real_t>& mesh = o->geometry();
|
||||
|
||||
|
||||
const int vcount = (int)mesh.verts().size() / 3;
|
||||
for ( std::vector<real_t>::const_iterator it = mesh.verts().begin(); it != mesh.verts().end(); ) {
|
||||
const real_t x = *(it++) + (real_t)settings().offset[0];
|
||||
|
||||
Reference in New Issue
Block a user