mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 23:50:59 +00:00
Fix constructors and assignment op for Kernel
This commit is contained in:
+26
-10
@@ -250,22 +250,38 @@ public:
|
|||||||
, ifc_planeangle_unit(-1.0)
|
, ifc_planeangle_unit(-1.0)
|
||||||
, modelling_precision(0.00001)
|
, modelling_precision(0.00001)
|
||||||
, dimensionality(1.)
|
, dimensionality(1.)
|
||||||
, placement_rel_to(0)
|
, placement_rel_to(nullptr)
|
||||||
, faceset_helper_(nullptr)
|
, faceset_helper_(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
MAKE_TYPE_NAME(Kernel)(const MAKE_TYPE_NAME(Kernel)& other) : IfcGeom::Kernel(0) {
|
MAKE_TYPE_NAME(Kernel)(const MAKE_TYPE_NAME(Kernel)& other)
|
||||||
*this = other;
|
: IfcGeom::Kernel(0)
|
||||||
|
, deflection_tolerance(other.deflection_tolerance)
|
||||||
|
, max_faces_to_orient(other.max_faces_to_orient)
|
||||||
|
, ifc_length_unit(other.ifc_length_unit)
|
||||||
|
, ifc_planeangle_unit(other.ifc_planeangle_unit)
|
||||||
|
, modelling_precision(other.modelling_precision)
|
||||||
|
, dimensionality(other.dimensionality)
|
||||||
|
, placement_rel_to(other.placement_rel_to)
|
||||||
|
// @nb faceset_helper_ always initialized to 0
|
||||||
|
, faceset_helper_(nullptr)
|
||||||
|
, offset(other.offset)
|
||||||
|
, rotation(other.rotation)
|
||||||
|
, offset_and_rotation(other.offset_and_rotation)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
MAKE_TYPE_NAME(Kernel)& operator=(const MAKE_TYPE_NAME(Kernel)& other) {
|
MAKE_TYPE_NAME(Kernel)& operator=(const MAKE_TYPE_NAME(Kernel)& other) {
|
||||||
setValue(GV_DEFLECTION_TOLERANCE, other.getValue(GV_DEFLECTION_TOLERANCE));
|
deflection_tolerance = other.deflection_tolerance;
|
||||||
setValue(GV_MAX_FACES_TO_ORIENT, other.getValue(GV_MAX_FACES_TO_ORIENT));
|
max_faces_to_orient = other.max_faces_to_orient;
|
||||||
setValue(GV_LENGTH_UNIT, other.getValue(GV_LENGTH_UNIT));
|
ifc_length_unit = other.ifc_length_unit;
|
||||||
setValue(GV_PLANEANGLE_UNIT, other.getValue(GV_PLANEANGLE_UNIT));
|
ifc_planeangle_unit = other.ifc_planeangle_unit;
|
||||||
setValue(GV_PRECISION, other.getValue(GV_PRECISION));
|
modelling_precision = other.modelling_precision;
|
||||||
setValue(GV_DIMENSIONALITY, other.getValue(GV_DIMENSIONALITY));
|
dimensionality = other.dimensionality;
|
||||||
setValue(GV_LAYERSET_FIRST, other.getValue(GV_LAYERSET_FIRST));
|
placement_rel_to = other.placement_rel_to;
|
||||||
|
offset = other.offset;
|
||||||
|
rotation = other.rotation;
|
||||||
|
offset_and_rotation = other.offset_and_rotation;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user