Skip to content

Commit a92d37c

Browse files
committed
Quick fix py create_shape() setting propagation
1 parent 00e46ce commit a92d37c

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

src/ifcwrap/IfcGeomWrapper.i

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,49 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
370370
IfcParse::IfcFile* file = instance->data().file;
371371

372372
IfcGeom::Kernel kernel(file);
373+
374+
// @todo unify this logic with the logic in iterator impl.
375+
373376
kernel.setValue(IfcGeom::Kernel::GV_MAX_FACES_TO_ORIENT, settings.get(IfcGeom::IteratorSettings::SEW_SHELLS) ? std::numeric_limits<double>::infinity() : -1);
374377
kernel.setValue(IfcGeom::Kernel::GV_DIMENSIONALITY, (settings.get(IfcGeom::IteratorSettings::INCLUDE_CURVES) ? (settings.get(IfcGeom::IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES) ? -1. : 0.) : +1.));
375378
kernel.setValue(IfcGeom::Kernel::GV_LAYERSET_FIRST,
376379
settings.get(IfcGeom::IteratorSettings::LAYERSET_FIRST)
377380
? +1.0
378381
: -1.0
379382
);
383+
kernel.setValue(IfcGeom::Kernel::GV_NO_WIRE_INTERSECTION_CHECK,
384+
settings.get(IteratorSettings::NO_WIRE_INTERSECTION_CHECK)
385+
? +1.0
386+
: -1.0
387+
);
388+
kernel.setValue(IfcGeom::Kernel::GV_NO_WIRE_INTERSECTION_TOLERANCE,
389+
settings.get(IteratorSettings::NO_WIRE_INTERSECTION_TOLERANCE)
390+
? +1.0
391+
: -1.0
392+
);
393+
kernel.setValue(IfcGeom::Kernel::GV_PRECISION_FACTOR,
394+
settings.get(IteratorSettings::STRICT_TOLERANCE)
395+
? 1.0
396+
: 10.0
397+
);
398+
399+
kernel.setValue(IfcGeom::Kernel::GV_DISABLE_BOOLEAN_RESULT,
400+
settings.get(IteratorSettings::DISABLE_BOOLEAN_RESULT)
401+
? +1.0
402+
: -1.0
403+
);
404+
405+
kernel.setValue(IfcGeom::Kernel::GV_DEBUG_BOOLEAN,
406+
settings.get(IteratorSettings::DEBUG_BOOLEAN)
407+
? +1.0
408+
: -1.0
409+
);
410+
411+
kernel.setValue(IfcGeom::Kernel::GV_BOOLEAN_ATTEMPT_2D,
412+
settings.get(IteratorSettings::BOOLEAN_ATTEMPT_2D)
413+
? +1.0
414+
: -1.0
415+
);
380416

381417
if (instance->declaration().is(Schema::IfcProduct::Class())) {
382418
if (representation) {

0 commit comments

Comments
 (0)