mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
Correct verbosity check
This commit is contained in:
@@ -311,7 +311,7 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons
|
|||||||
TopoDS_Shape opening_shape = apply_transformation(opening_shape_unlocated, opening_shape_gtrsf);
|
TopoDS_Shape opening_shape = apply_transformation(opening_shape_unlocated, opening_shape_gtrsf);
|
||||||
|
|
||||||
double opening_volume;
|
double opening_volume;
|
||||||
if ( Logger::Verbosity() >= Logger::LOG_WARNING ) {
|
if (Logger::LOG_WARNING >= Logger::Verbosity()) {
|
||||||
opening_volume = shape_volume(opening_shape);
|
opening_volume = shape_volume(opening_shape);
|
||||||
if ( opening_volume <= ALMOST_ZERO )
|
if ( opening_volume <= ALMOST_ZERO )
|
||||||
Logger::Message(Logger::LOG_WARNING,"Empty opening for:",entity->entity);
|
Logger::Message(Logger::LOG_WARNING,"Empty opening for:",entity->entity);
|
||||||
@@ -397,7 +397,7 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons
|
|||||||
bool is_valid = analyser.IsValid() != 0;
|
bool is_valid = analyser.IsValid() != 0;
|
||||||
if ( is_valid ) {
|
if ( is_valid ) {
|
||||||
entity_shape = brep_cut_result;
|
entity_shape = brep_cut_result;
|
||||||
if ( Logger::Verbosity() >= Logger::LOG_WARNING ) {
|
if (Logger::LOG_WARNING >= Logger::Verbosity()) {
|
||||||
const double volume_after_subtraction = shape_volume(entity_shape);
|
const double volume_after_subtraction = shape_volume(entity_shape);
|
||||||
double original_shape_volume = shape_volume(entity_shape);
|
double original_shape_volume = shape_volume(entity_shape);
|
||||||
if ( ALMOST_THE_SAME(original_shape_volume,volume_after_subtraction) )
|
if ( ALMOST_THE_SAME(original_shape_volume,volume_after_subtraction) )
|
||||||
@@ -718,13 +718,15 @@ gp_Pnt IfcGeom::Kernel::point_above_plane(const gp_Pln& pln, bool agree) {
|
|||||||
|
|
||||||
void IfcGeom::Kernel::apply_tolerance(TopoDS_Shape& s, double t) {
|
void IfcGeom::Kernel::apply_tolerance(TopoDS_Shape& s, double t) {
|
||||||
ShapeAnalysis_ShapeTolerance toler;
|
ShapeAnalysis_ShapeTolerance toler;
|
||||||
if (toler.Tolerance(s, 0) > t) {
|
if (Logger::LOG_WARNING >= Logger::Verbosity()) {
|
||||||
Handle_TopTools_HSequenceOfShape shapes = toler.OverTolerance(s, t);
|
if (toler.Tolerance(s, 0) > t + ALMOST_ZERO) {
|
||||||
for (int i = 1; i <= shapes->Length(); ++i) {
|
Handle_TopTools_HSequenceOfShape shapes = toler.OverTolerance(s, t + ALMOST_ZERO);
|
||||||
const TopoDS_Shape& sub = shapes->Value(i);
|
for (int i = 1; i <= shapes->Length(); ++i) {
|
||||||
std::stringstream ss;
|
const TopoDS_Shape& sub = shapes->Value(i);
|
||||||
TopAbs::Print(sub.ShapeType(), ss);
|
std::stringstream ss;
|
||||||
Logger::Warning("Tolerance of " + boost::lexical_cast<std::string>(toler.Tolerance(sub, 0)) + " on " + ss.str());
|
TopAbs::Print(sub.ShapeType(), ss);
|
||||||
|
Logger::Warning("Tolerance of " + boost::lexical_cast<std::string>(toler.Tolerance(sub, 0)) + " on " + ss.str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ShapeFix_ShapeTolerance tol;
|
ShapeFix_ShapeTolerance tol;
|
||||||
|
|||||||
Reference in New Issue
Block a user