Add an option to disable the subtraction of IfcOpeningElements from relating building elements to the IfcGeomObject settings

This commit is contained in:
Thomas Krijnen
2012-10-19 08:20:43 +00:00
parent 8b11a1baf7
commit e729795da2
4 changed files with 12 additions and 3 deletions
+7 -2
View File
@@ -47,8 +47,10 @@
// Welds vertices that belong to different faces
bool weld_vertices = true;
bool convert_back_units = false;
bool use_faster_booleans = false;
bool disable_subtractions = false;
int IfcGeomObjects::IfcMesh::addvert(const gp_XYZ& p) {
const float X = convert_back_units ? (float) (p.X() / IfcGeom::GetValue(IfcGeom::GV_LENGTH_UNIT)) : (float)p.X();
@@ -386,7 +388,7 @@ IfcGeomObjects::IfcGeomObject* _get() {
}
}
if ( openings && openings->Size() ) {
if ( !disable_subtractions && openings && openings->Size() ) {
IfcGeom::ShapeList opened_shapes;
try {
if ( use_faster_booleans ) {
@@ -628,9 +630,12 @@ void IfcGeomObjects::Settings(int setting, bool value) {
case SEW_SHELLS:
IfcGeom::SetValue(IfcGeom::GV_MAX_FACES_TO_SEW,value ? 1000 : -1);
break;
case IfcGeomObjects::FORCE_CCW_FACE_ORIENTATION:
case FORCE_CCW_FACE_ORIENTATION:
IfcGeom::SetValue(IfcGeom::GV_FORCE_CCW_FACE_ORIENTATION,value ? 1 : -1);
break;
case DISABLE_OPENING_SUBTRACTIONS:
disable_subtractions = value;
break;
}
}
int IfcGeomObjects::Progress() {
+3
View File
@@ -97,6 +97,9 @@ namespace IfcGeomObjects {
// By default singular faces have no explicitly defined orientation, to
// force faces to be defined CounterClockWise set this to true.
const int FORCE_CCW_FACE_ORIENTATION = 7;
// Disables the subtraction of IfcOpeningElement representations from
// the related building element representations.
const int DISABLE_OPENING_SUBTRACTIONS = 8;
// End of settings enumeration.
+1 -1
View File
@@ -685,7 +685,7 @@ bool IfcFile::Init(IfcParse::IfcSpfStream* f) {
// Update the status after every 1000 instances parsed
if ( !((++x)%1000) ) {
std::stringstream ss; ss << "\r#" << currentId;
Logger::Status(ss.str());
Logger::Status(ss.str(), false);
}
if ( entity->is(Ifc2x3::Type::IfcRoot) ) {
Ifc2x3::IfcRoot::ptr ifc_root = (Ifc2x3::IfcRoot::ptr) entity;
+1
View File
@@ -26,6 +26,7 @@ namespace IfcGeomObjects {
const int SEW_SHELLS = 5;
const int FASTER_BOOLEANS = 6;
const int FORCE_CCW_FACE_ORIENTATION = 7;
const int DISABLE_OPENING_SUBTRACTIONS = 8;
class IfcMesh {
public: