@@ -3277,15 +3277,8 @@ namespace webifc::geometry
32773277 double flangeThickness = _loader.GetDoubleArgument ();
32783278
32793279 // optional fillet
3280- bool hasFillet = false ;
3281- double filletRadius = 0 ;
3282- if (_loader.GetTokenType () == parsing::IfcTokenType::REAL)
3283- {
3284- _loader.StepBack ();
3285-
3286- hasFillet = true ;
3287- filletRadius = _loader.GetOptionalDoubleParam (0 );
3288- }
3280+ double filletRadius = _loader.GetOptionalDoubleParam (0 );
3281+ bool hasFillet = filletRadius > 0 ;
32893282
32903283 profile.curve = GetIShapedCurve (width, depth, webThickness, flangeThickness, hasFillet, filletRadius, placement);
32913284
@@ -3312,30 +3305,19 @@ namespace webifc::geometry
33123305 }
33133306
33143307 _loader.MoveToArgumentOffset (expressID, 3 );
3315- double filletRadius = 0 ;
33163308 double depth = _loader.GetDoubleArgument ();
33173309 double width = _loader.GetOptionalDoubleParam (0 );
3318- if (width == 0 )
3319- {
3320- width = depth;
3321- }
3310+ if (width == 0 ) { width = depth;}
33223311 double thickness = _loader.GetDoubleArgument ();
3323- filletRadius = _loader.GetOptionalDoubleParam (0 );
3312+ double filletRadius = _loader.GetOptionalDoubleParam (0 );
3313+ bool hasFillet = filletRadius > 0 ;
33243314 double edgeRadius = _loader.GetOptionalDoubleParam (0 );
33253315 double legSlope = _loader.GetOptionalDoubleParam (0 );
33263316 // double centreOfGravityInX =
33273317 _loader.GetOptionalDoubleParam (0 );
33283318 // double centreOfGravityInY =
33293319 _loader.GetOptionalDoubleParam (0 );
33303320
3331- // optional fillet
3332- bool hasFillet = false ;
3333-
3334- if (filletRadius > 0 )
3335- {
3336- hasFillet = true ;
3337- }
3338-
33393321 profile.curve = GetLShapedCurve (width, depth, thickness, hasFillet, filletRadius, edgeRadius, legSlope, _circleSegments, placement);
33403322
33413323 return profile;
@@ -3367,24 +3349,14 @@ namespace webifc::geometry
33673349 // double flangeThickness =
33683350 _loader.GetDoubleArgument ();
33693351 double filletRadius = _loader.GetOptionalDoubleParam (0 );
3352+ bool hasFillet = filletRadius != 0 ;
33703353 double flangeEdgeRadius = _loader.GetOptionalDoubleParam (0 );
33713354 // double webEdgeRadius =
33723355 _loader.GetOptionalDoubleParam (0 );
33733356 // double webSlope =
33743357 _loader.GetOptionalDoubleParam (0 );
33753358 double flangeSlope = _loader.GetOptionalDoubleParam (0 );
33763359
3377- // TODO: REVIEW THIS OPTIONS FILLET (should be CentreOfGravityInY not optional fillet)
3378- bool hasFillet = false ;
3379-
3380- if (_loader.GetTokenType () == parsing::IfcTokenType::REAL)
3381- {
3382- _loader.StepBack ();
3383-
3384- hasFillet = true ;
3385- filletRadius = _loader.GetOptionalDoubleParam (0 );
3386- }
3387-
33883360 profile.curve = GetTShapedCurve (width, depth, webThickness, hasFillet, filletRadius, flangeEdgeRadius, flangeSlope, placement);
33893361
33903362 return profile;
@@ -3417,10 +3389,10 @@ namespace webifc::geometry
34173389 double flangeThickness = _loader.GetDoubleArgument ();
34183390
34193391 // optional parameters
3420- // double filletRadius = GetOptionalDoubleParam();
3392+ double filletRadius = _loader.GetOptionalDoubleParam (0 );
3393+ bool hasFillet = filletRadius > 0 ;
34213394 // double edgeRadius = GetOptionalDoubleParam();
34223395 // double flangeSlope = GetOptionalDoubleParam();
3423- double filletRadius = 0 ;
34243396 double edgeRadius = 0 ;
34253397 double flangeSlope = 0 ;
34263398
@@ -3448,15 +3420,14 @@ namespace webifc::geometry
34483420 placement = GetAxis2Placement2D (placementID);
34493421 }
34503422
3451- bool hasFillet = false ;
3452-
34533423 _loader.MoveToArgumentOffset (expressID, 3 );
34543424
34553425 double depth = _loader.GetDoubleArgument ();
34563426 double Width = _loader.GetDoubleArgument ();
34573427 double Thickness = _loader.GetDoubleArgument ();
34583428 double girth = _loader.GetDoubleArgument ();
34593429 double filletRadius = _loader.GetOptionalDoubleParam (0 );
3430+ bool hasFillet = filletRadius > 0 ;
34603431 // double ventreOfGravityInX =
34613432 _loader.GetOptionalDoubleParam (0 );
34623433
@@ -3484,15 +3455,14 @@ namespace webifc::geometry
34843455 glm::dmat3 placement = GetAxis2Placement2D (placementID);
34853456 }
34863457
3487- bool hasFillet = false ;
3488-
34893458 _loader.MoveToArgumentOffset (expressID, 3 );
34903459
34913460 double depth = _loader.GetDoubleArgument ();
34923461 double flangeWidth = _loader.GetDoubleArgument ();
34933462 double webThickness = _loader.GetDoubleArgument ();
34943463 double flangeThickness = _loader.GetDoubleArgument ();
34953464 double filletRadius = _loader.GetOptionalDoubleParam (0 );
3465+ bool hasFillet = filletRadius > 0 ;
34963466 double edgeRadius = _loader.GetOptionalDoubleParam (0 );
34973467
34983468 profile.curve = GetZShapedCurve (depth, flangeWidth, webThickness, flangeThickness, filletRadius, edgeRadius, placement);
0 commit comments