Skip to content

Commit e729795

Browse files
committed
Add an option to disable the subtraction of IfcOpeningElements from relating building elements to the IfcGeomObject settings
1 parent 8b11a1b commit e729795

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

src/ifcgeom/IfcGeomObjects.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@
4747

4848
// Welds vertices that belong to different faces
4949
bool weld_vertices = true;
50+
5051
bool convert_back_units = false;
5152
bool use_faster_booleans = false;
53+
bool disable_subtractions = false;
5254

5355
int IfcGeomObjects::IfcMesh::addvert(const gp_XYZ& p) {
5456
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() {
386388
}
387389
}
388390

389-
if ( openings && openings->Size() ) {
391+
if ( !disable_subtractions && openings && openings->Size() ) {
390392
IfcGeom::ShapeList opened_shapes;
391393
try {
392394
if ( use_faster_booleans ) {
@@ -628,9 +630,12 @@ void IfcGeomObjects::Settings(int setting, bool value) {
628630
case SEW_SHELLS:
629631
IfcGeom::SetValue(IfcGeom::GV_MAX_FACES_TO_SEW,value ? 1000 : -1);
630632
break;
631-
case IfcGeomObjects::FORCE_CCW_FACE_ORIENTATION:
633+
case FORCE_CCW_FACE_ORIENTATION:
632634
IfcGeom::SetValue(IfcGeom::GV_FORCE_CCW_FACE_ORIENTATION,value ? 1 : -1);
633635
break;
636+
case DISABLE_OPENING_SUBTRACTIONS:
637+
disable_subtractions = value;
638+
break;
634639
}
635640
}
636641
int IfcGeomObjects::Progress() {

src/ifcgeom/IfcGeomObjects.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ namespace IfcGeomObjects {
9797
// By default singular faces have no explicitly defined orientation, to
9898
// force faces to be defined CounterClockWise set this to true.
9999
const int FORCE_CCW_FACE_ORIENTATION = 7;
100+
// Disables the subtraction of IfcOpeningElement representations from
101+
// the related building element representations.
102+
const int DISABLE_OPENING_SUBTRACTIONS = 8;
100103

101104
// End of settings enumeration.
102105

src/ifcparse/IfcParse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ bool IfcFile::Init(IfcParse::IfcSpfStream* f) {
685685
// Update the status after every 1000 instances parsed
686686
if ( !((++x)%1000) ) {
687687
std::stringstream ss; ss << "\r#" << currentId;
688-
Logger::Status(ss.str());
688+
Logger::Status(ss.str(), false);
689689
}
690690
if ( entity->is(Ifc2x3::Type::IfcRoot) ) {
691691
Ifc2x3::IfcRoot::ptr ifc_root = (Ifc2x3::IfcRoot::ptr) entity;

src/ifcwrap/Interface.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ namespace IfcGeomObjects {
2626
const int SEW_SHELLS = 5;
2727
const int FASTER_BOOLEANS = 6;
2828
const int FORCE_CCW_FACE_ORIENTATION = 7;
29+
const int DISABLE_OPENING_SUBTRACTIONS = 8;
2930

3031
class IfcMesh {
3132
public:

0 commit comments

Comments
 (0)