From bf2e2f75374db266e322db38a484ffe5a9675196 Mon Sep 17 00:00:00 2001 From: Leo Terziman Date: Fri, 17 Mar 2017 14:55:18 +0100 Subject: [PATCH] Extended support for tessellation parameter to more IFC shapes --- code/IFCGeometry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/IFCGeometry.cpp b/code/IFCGeometry.cpp index f80fadff9..908f5e065 100644 --- a/code/IFCGeometry.cpp +++ b/code/IFCGeometry.cpp @@ -258,7 +258,7 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul return; } - const unsigned int cnt_segments = std::max(2u,static_cast(16 * std::fabs(max_angle)/AI_MATH_HALF_PI_F)); + const unsigned int cnt_segments = std::max(2u,static_cast(conv.settings.cylindricalTessellation * std::fabs(max_angle)/AI_MATH_HALF_PI_F)); const IfcFloat delta = max_angle/cnt_segments; has_area = has_area && std::fabs(max_angle) < AI_MATH_TWO_PI_F*0.99; @@ -327,7 +327,7 @@ void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, Conv return; } - const unsigned int cnt_segments = 16; + const unsigned int cnt_segments = conv.settings.cylindricalTessellation; const IfcFloat deltaAngle = AI_MATH_TWO_PI/cnt_segments; const size_t samples = curve->EstimateSampleCount(solid.StartParam,solid.EndParam);