mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 15:53:00 +00:00
fixes for clang
This commit is contained in:
@@ -258,6 +258,7 @@ namespace {
|
||||
struct point_projection_visitor_ {
|
||||
taxonomy::point3 p;
|
||||
double u;
|
||||
typedef void result_type;
|
||||
|
||||
void operator()(const taxonomy::line& c) {
|
||||
project_onto_curve(c, p, u);
|
||||
@@ -279,6 +280,7 @@ namespace {
|
||||
struct point_projection_visitor {
|
||||
taxonomy::item* curve;
|
||||
double u;
|
||||
typedef void result_type;
|
||||
|
||||
void operator()(const taxonomy::point3& p) {
|
||||
point_projection_visitor_ v{ p };
|
||||
|
||||
@@ -40,10 +40,10 @@ ifcopenshell::geometry::Representation::Serialization::Serialization(const BRep&
|
||||
|
||||
for (ifcopenshell::geometry::ConversionResults::const_iterator it = brep.begin(); it != brep.end(); ++ it) {
|
||||
if (it->hasStyle() && it->Style().diffuse) {
|
||||
auto clr = it->Style().diffuse.get().components;
|
||||
surface_styles_.push_back(clr[0]);
|
||||
surface_styles_.push_back(clr[1]);
|
||||
surface_styles_.push_back(clr[2]);
|
||||
const auto& clr = *it->Style().diffuse.get().components;
|
||||
surface_styles_.push_back(clr(0));
|
||||
surface_styles_.push_back(clr(1));
|
||||
surface_styles_.push_back(clr(2));
|
||||
} else {
|
||||
surface_styles_.push_back(-1.);
|
||||
surface_styles_.push_back(-1.);
|
||||
@@ -96,7 +96,7 @@ ifcopenshell::geometry::ConversionResultShape* ifcopenshell::geometry::Represent
|
||||
// @todo, check
|
||||
gp_GTrsf trsf;
|
||||
gp_Trsf tr;
|
||||
const auto& m = it->Placement().components;
|
||||
const auto& m = *it->Placement().components;
|
||||
tr.SetValues(
|
||||
m(0, 0), m(0, 1), m(0, 2), m(0, 3),
|
||||
m(1, 0), m(1, 1), m(1, 2), m(1, 3),
|
||||
@@ -244,7 +244,7 @@ bool ifcopenshell::geometry::Representation::BRep::calculate_projected_surface_a
|
||||
// @todo check
|
||||
gp_GTrsf trsf;
|
||||
gp_Trsf tr;
|
||||
const auto& m = place.components;
|
||||
const auto& m = *place.components;
|
||||
tr.SetValues(
|
||||
m(0, 0), m(0, 1), m(0, 2), m(0, 3),
|
||||
m(1, 0), m(1, 1), m(1, 2), m(1, 3),
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
using namespace ifcopenshell::geometry::taxonomy;
|
||||
|
||||
namespace {
|
||||
bool compare(const trimmed_curve& a, const trimmed_curve& b);
|
||||
|
||||
bool compare(const collection& a, const collection& b);
|
||||
|
||||
template <typename T>
|
||||
bool compare(const eigen_base<T>& t, const eigen_base<T>& u) {
|
||||
auto t_begin = t.components->data();
|
||||
@@ -84,10 +88,6 @@ namespace {
|
||||
-1 : (!b_lt_a ? 0 : 1);
|
||||
}
|
||||
|
||||
bool compare(const trimmed_curve& a, const trimmed_curve& b);
|
||||
|
||||
bool compare(const collection& a, const collection& b);
|
||||
|
||||
bool compare(const extrusion& a, const extrusion& b) {
|
||||
// @todo extrusions can also have non-identity matrices right? perhaps it's time
|
||||
// for a dedicated transform node and not on the abstract geom_item.
|
||||
|
||||
Reference in New Issue
Block a user