- Ifc: improve intersection check for openings.
parent
650e515dd6
commit
b42f279110
|
@ -1970,15 +1970,14 @@ 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];
|
||||||
|
|
||||||
if(check_intersection) {
|
|
||||||
const IfcFloat vert_d = -(x * nor);
|
|
||||||
dmin = std::min(dmin, vert_d);
|
|
||||||
dmax = std::max(dmax, vert_d);
|
|
||||||
}
|
|
||||||
|
|
||||||
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) {
|
||||||
|
dmin = std::min(dmin, v.z);
|
||||||
|
dmax = std::max(dmax, v.z);
|
||||||
|
}
|
||||||
|
|
||||||
// sanity rounding
|
// sanity rounding
|
||||||
vv = std::max(vv,IfcVector2());
|
vv = std::max(vv,IfcVector2());
|
||||||
vv = std::min(vv,one_vec);
|
vv = std::min(vv,one_vec);
|
||||||
|
@ -2245,7 +2244,7 @@ void ProcessExtrudedAreaSolid(const IfcExtrudedAreaSolid& solid, TempMesh& resul
|
||||||
out.push_back(in[next]);
|
out.push_back(in[next]);
|
||||||
|
|
||||||
if(openings) {
|
if(openings) {
|
||||||
if(GenerateOpenings(*conv.apply_openings,nors,temp, i >= size/2)) {
|
if(GenerateOpenings(*conv.apply_openings,nors,temp,true, true)) {
|
||||||
++sides_with_openings;
|
++sides_with_openings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2264,7 +2263,7 @@ void ProcessExtrudedAreaSolid(const IfcExtrudedAreaSolid& solid, TempMesh& resul
|
||||||
|
|
||||||
curmesh.vertcnt.push_back(size);
|
curmesh.vertcnt.push_back(size);
|
||||||
if(openings && size > 2) {
|
if(openings && size > 2) {
|
||||||
if(GenerateOpenings(*conv.apply_openings,nors,temp, true)) {
|
if(GenerateOpenings(*conv.apply_openings,nors,temp,true, true)) {
|
||||||
++sides_with_v_openings;
|
++sides_with_v_openings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue