IFC: Fix more bad references
parent
4540250116
commit
e67bcca744
|
@ -602,12 +602,12 @@ bool IntersectingLineSegments(const IfcVector2& n0, const IfcVector2& n1,
|
||||||
const IfcVector2& m0, const IfcVector2& m1,
|
const IfcVector2& m0, const IfcVector2& m1,
|
||||||
IfcVector2& out0, IfcVector2& out1)
|
IfcVector2& out0, IfcVector2& out1)
|
||||||
{
|
{
|
||||||
const IfcVector2& n0_to_n1 = n1 - n0;
|
const IfcVector2 n0_to_n1 = n1 - n0;
|
||||||
|
|
||||||
const IfcVector2& n0_to_m0 = m0 - n0;
|
const IfcVector2 n0_to_m0 = m0 - n0;
|
||||||
const IfcVector2& n1_to_m1 = m1 - n1;
|
const IfcVector2 n1_to_m1 = m1 - n1;
|
||||||
|
|
||||||
const IfcVector2& n0_to_m1 = m1 - n0;
|
const IfcVector2 n0_to_m1 = m1 - n0;
|
||||||
|
|
||||||
const IfcFloat e = 1e-5f;
|
const IfcFloat e = 1e-5f;
|
||||||
const IfcFloat smalle = 1e-9f;
|
const IfcFloat smalle = 1e-9f;
|
||||||
|
@ -927,7 +927,7 @@ size_t CloseWindows(ContourVector& contours,
|
||||||
IfcFloat best = static_cast<IfcFloat>(1e10);
|
IfcFloat best = static_cast<IfcFloat>(1e10);
|
||||||
IfcVector3 bestv;
|
IfcVector3 bestv;
|
||||||
|
|
||||||
const IfcVector3& world_point = minv * IfcVector3(proj_point.x,proj_point.y,0.0f);
|
const IfcVector3 world_point = minv * IfcVector3(proj_point.x,proj_point.y,0.0f);
|
||||||
|
|
||||||
BOOST_FOREACH(const TempOpening* opening, refs) {
|
BOOST_FOREACH(const TempOpening* opening, refs) {
|
||||||
BOOST_FOREACH(const IfcVector3& other, opening->wallPoints) {
|
BOOST_FOREACH(const IfcVector3& other, opening->wallPoints) {
|
||||||
|
@ -1066,7 +1066,7 @@ IfcMatrix4 ProjectOntoPlane(std::vector<IfcVector2>& out_contour, const TempMesh
|
||||||
|
|
||||||
// Project all points into the new coordinate system, collect min/max verts on the way
|
// Project all points into the new coordinate system, collect min/max verts on the way
|
||||||
BOOST_FOREACH(const IfcVector3& x, in_verts) {
|
BOOST_FOREACH(const IfcVector3& x, in_verts) {
|
||||||
const IfcVector3& vv = m * x;
|
const IfcVector3 vv = m * x;
|
||||||
// keep Z offset in the plane coordinate system. Ignoring precision issues
|
// keep Z offset in the plane coordinate system. Ignoring precision issues
|
||||||
// (which are present, of course), this should be the same value for
|
// (which are present, of course), this should be the same value for
|
||||||
// all polygon vertices (assuming the polygon is planar).
|
// all polygon vertices (assuming the polygon is planar).
|
||||||
|
@ -1144,7 +1144,7 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
|
||||||
std::vector<IfcVector2> contour_flat;
|
std::vector<IfcVector2> contour_flat;
|
||||||
|
|
||||||
IfcVector3 nor;
|
IfcVector3 nor;
|
||||||
const IfcMatrix4& m = ProjectOntoPlane(contour_flat, curmesh, ok, nor);
|
const IfcMatrix4 m = ProjectOntoPlane(contour_flat, curmesh, ok, nor);
|
||||||
if(!ok) {
|
if(!ok) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1242,7 +1242,7 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
|
||||||
for (unsigned int vi = 0, vend = profile_vertcnts[f]; vi < vend; ++vi, ++vi_total) {
|
for (unsigned int vi = 0, vend = profile_vertcnts[f]; vi < vend; ++vi, ++vi_total) {
|
||||||
const IfcVector3& x = profile_verts[vi_total];
|
const IfcVector3& x = profile_verts[vi_total];
|
||||||
|
|
||||||
const IfcVector3& v = m * x;
|
const IfcVector3 v = m * x;
|
||||||
IfcVector2 vv(v.x, v.y);
|
IfcVector2 vv(v.x, v.y);
|
||||||
|
|
||||||
//if(check_intersection) {
|
//if(check_intersection) {
|
||||||
|
@ -1322,7 +1322,7 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
|
||||||
MakeDisjunctWindowContours(other, temp_contour, poly);
|
MakeDisjunctWindowContours(other, temp_contour, poly);
|
||||||
if(poly.size() == 1) {
|
if(poly.size() == 1) {
|
||||||
|
|
||||||
const BoundingBox& newbb = GetBoundingBox(poly[0].outer);
|
const BoundingBox newbb = GetBoundingBox(poly[0].outer);
|
||||||
if (!BoundingBoxesOverlapping(ibb, newbb )) {
|
if (!BoundingBoxesOverlapping(ibb, newbb )) {
|
||||||
// Good guy bounding box
|
// Good guy bounding box
|
||||||
bb = newbb ;
|
bb = newbb ;
|
||||||
|
@ -1438,7 +1438,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
|
||||||
// working coordinate system.
|
// working coordinate system.
|
||||||
bool ok;
|
bool ok;
|
||||||
IfcVector3 nor;
|
IfcVector3 nor;
|
||||||
const IfcMatrix3& m = DerivePlaneCoordinateSpace(curmesh, ok, nor);
|
const IfcMatrix3 m = DerivePlaneCoordinateSpace(curmesh, ok, nor);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1686,7 +1686,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<p2t::Triangle*>& tris = cdt->GetTriangles();
|
const std::vector<p2t::Triangle*> tris = cdt->GetTriangles();
|
||||||
|
|
||||||
// Collect the triangles we just produced
|
// Collect the triangles we just produced
|
||||||
BOOST_FOREACH(p2t::Triangle* tri, tris) {
|
BOOST_FOREACH(p2t::Triangle* tri, tris) {
|
||||||
|
|
Loading…
Reference in New Issue