mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-31 00:46:36 +00:00
Silence final compiler warnings
Generated with the assistance of an AI coding tool.
This commit is contained in:
@@ -961,10 +961,6 @@ class curve_segment_evaluator {
|
||||
auto cos_start_angle = cos(start_angle);
|
||||
auto sin_start_angle = sin(start_angle);
|
||||
|
||||
// point on the parent curve
|
||||
auto pcStartX = R * cos_start_angle + pcCenterX;
|
||||
auto pcStartY = R * sin_start_angle + pcCenterY;
|
||||
|
||||
auto pcStartDx = -sign_l * sin_start_angle;
|
||||
auto pcStartDy = sign_l * cos_start_angle;
|
||||
|
||||
@@ -1198,8 +1194,7 @@ class curve_segment_evaluator {
|
||||
m.col(3) = Eigen::Vector4d(X, Y, 0.0, 1.0);
|
||||
return m;
|
||||
},
|
||||
[start = start_, lu = length_unit_, coeffX, coeffY, convert_u](double u) -> Eigen::Matrix4d {
|
||||
auto x = convert_u(u + start); // find x for u
|
||||
[coeffY](double) -> Eigen::Matrix4d {
|
||||
Eigen::Matrix4d c = Eigen::Matrix4d::Zero();
|
||||
c(3, 0) = coeffY[2]; // this may need a unit conversion (also assume there is only 3 coefficients)
|
||||
return c;
|
||||
|
||||
@@ -30,8 +30,6 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcEllipseProfileDef& inst) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const bool rotated = ry > rx;
|
||||
|
||||
taxonomy::matrix4::ptr m4;
|
||||
bool has_position = true;
|
||||
#ifdef SCHEMA_IfcParameterizedProfileDef_Position_IS_OPTIONAL
|
||||
|
||||
@@ -36,25 +36,6 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcFixedReferenceSweptAreaSolid
|
||||
// @todo currently only the case is handled where directrix returns a piecewise_function
|
||||
if (auto fn = std::dynamic_pointer_cast<taxonomy::function_item>(dir)) {
|
||||
function_item_evaluator evaluator(settings_, fn);
|
||||
double start = 0;
|
||||
double end = fn->length();
|
||||
#ifdef SCHEMA_HAS_IfcDirectrixCurveSweptAreaSolid
|
||||
// IfcDirectrixCurveSweptAreaSolid introduced in 4.3 changed attribute type
|
||||
// from optional IfcParamValue to optional IfcCurveMeasureSelect.
|
||||
// Invocation of mapping on pre-4.3 models can never result in a piecewise_function.
|
||||
if (inst.StartParam() && inst.StartParam().as<IfcSchema::IfcLengthMeasure>()) {
|
||||
double s = inst.StartParam().as<IfcSchema::IfcLengthMeasure>();
|
||||
if (s > start) {
|
||||
start = s;
|
||||
}
|
||||
}
|
||||
if (inst.EndParam() && inst.EndParam().as<IfcSchema::IfcLengthMeasure>()) {
|
||||
double e = inst.EndParam().as<IfcSchema::IfcLengthMeasure>();
|
||||
if (e < end) {
|
||||
end = e;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
auto evaluation_points = evaluator.evaluation_points();
|
||||
for (const auto& dist_along : evaluation_points) {
|
||||
auto m4 = evaluator.evaluate(dist_along);
|
||||
@@ -86,10 +67,10 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcFixedReferenceSweptAreaSolid
|
||||
Eigen::Vector3d tangent = m4.col(0).head<3>().normalized();
|
||||
Eigen::Vector3d proj = (ref->components() - tangent * tangent.dot(ref->components()));
|
||||
proj.normalize();
|
||||
auto ref = proj.cross(tangent);
|
||||
auto binormal = proj.cross(tangent);
|
||||
|
||||
m4b.col(0).head<3>() = proj;
|
||||
m4b.col(1).head<3>() = ref;
|
||||
m4b.col(1).head<3>() = binormal;
|
||||
m4b.col(2).head<3>() = tangent;
|
||||
m4b.col(3).head<3>() = pos;
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcIShapeProfileDef& inst) {
|
||||
#ifdef SCHEMA_IfcIShapeProfileDef_HAS_FlangeEdgeRadius
|
||||
const bool doFlangeEdgeRadius = !!inst.FlangeEdgeRadius();
|
||||
const bool hasSlope = !!inst.FlangeSlope();
|
||||
#else
|
||||
const bool doFlangeEdgeRadius = false;
|
||||
#endif
|
||||
|
||||
const double x1 = inst.OverallWidth() / 2.0f * length_unit_;
|
||||
|
||||
@@ -44,11 +44,5 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcMappedItem& inst) {
|
||||
collection->children.push_back(shapes);
|
||||
collection->matrix = taxonomy::make<taxonomy::matrix4>(res);
|
||||
|
||||
if (shapes != nullptr) {
|
||||
for (auto& c : taxonomy::cast<taxonomy::collection>(shapes)->children) {
|
||||
// @todo previously style was also copied.
|
||||
}
|
||||
}
|
||||
|
||||
return collection;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user