Quick fix py create_shape() setting propagation

This commit is contained in:
Thomas Krijnen
2022-06-06 09:58:42 +02:00
parent 00e46ce39e
commit a92d37cd64
+36
View File
@@ -370,6 +370,9 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
IfcParse::IfcFile* file = instance->data().file;
IfcGeom::Kernel kernel(file);
// @todo unify this logic with the logic in iterator impl.
kernel.setValue(IfcGeom::Kernel::GV_MAX_FACES_TO_ORIENT, settings.get(IfcGeom::IteratorSettings::SEW_SHELLS) ? std::numeric_limits<double>::infinity() : -1);
kernel.setValue(IfcGeom::Kernel::GV_DIMENSIONALITY, (settings.get(IfcGeom::IteratorSettings::INCLUDE_CURVES) ? (settings.get(IfcGeom::IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES) ? -1. : 0.) : +1.));
kernel.setValue(IfcGeom::Kernel::GV_LAYERSET_FIRST,
@@ -377,6 +380,39 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
? +1.0
: -1.0
);
kernel.setValue(IfcGeom::Kernel::GV_NO_WIRE_INTERSECTION_CHECK,
settings.get(IteratorSettings::NO_WIRE_INTERSECTION_CHECK)
? +1.0
: -1.0
);
kernel.setValue(IfcGeom::Kernel::GV_NO_WIRE_INTERSECTION_TOLERANCE,
settings.get(IteratorSettings::NO_WIRE_INTERSECTION_TOLERANCE)
? +1.0
: -1.0
);
kernel.setValue(IfcGeom::Kernel::GV_PRECISION_FACTOR,
settings.get(IteratorSettings::STRICT_TOLERANCE)
? 1.0
: 10.0
);
kernel.setValue(IfcGeom::Kernel::GV_DISABLE_BOOLEAN_RESULT,
settings.get(IteratorSettings::DISABLE_BOOLEAN_RESULT)
? +1.0
: -1.0
);
kernel.setValue(IfcGeom::Kernel::GV_DEBUG_BOOLEAN,
settings.get(IteratorSettings::DEBUG_BOOLEAN)
? +1.0
: -1.0
);
kernel.setValue(IfcGeom::Kernel::GV_BOOLEAN_ATTEMPT_2D,
settings.get(IteratorSettings::BOOLEAN_ATTEMPT_2D)
? +1.0
: -1.0
);
if (instance->declaration().is(Schema::IfcProduct::Class())) {
if (representation) {