From 5f6400c0325f1498d0c9a763146c757c1e9cd180 Mon Sep 17 00:00:00 2001 From: wanqing0421 Date: Sat, 26 Apr 2025 00:43:56 +0800 Subject: [PATCH 1/2] add scale and transform function during the stl model importing process --- .../geometryPhasicFlow/stlWall/stlWall.cpp | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/utilities/Utilities/geometryPhasicFlow/stlWall/stlWall.cpp b/utilities/Utilities/geometryPhasicFlow/stlWall/stlWall.cpp index cc561f3f..2c0cc550 100755 --- a/utilities/Utilities/geometryPhasicFlow/stlWall/stlWall.cpp +++ b/utilities/Utilities/geometryPhasicFlow/stlWall/stlWall.cpp @@ -31,6 +31,11 @@ bool pFlow::stlWall::readSTLWall { auto fileName = dict.getVal("file"); + real scale = dict.getValOrSet("scale", static_cast(1.0)); + + realx3 transform = dict.getValOrSet("transform", realx3(0)); + + auto scaleFirst = dict.getValOrSet("scaleFirst", Logical("Yes")); fileSystem file("./stl",fileName); @@ -42,12 +47,37 @@ bool pFlow::stlWall::readSTLWall return false; } - for(uint64 i=0; i Date: Sat, 26 Apr 2025 01:13:42 +0800 Subject: [PATCH 2/2] correction for tab --- .../geometryPhasicFlow/stlWall/stlWall.cpp | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/utilities/Utilities/geometryPhasicFlow/stlWall/stlWall.cpp b/utilities/Utilities/geometryPhasicFlow/stlWall/stlWall.cpp index 2c0cc550..d1958988 100755 --- a/utilities/Utilities/geometryPhasicFlow/stlWall/stlWall.cpp +++ b/utilities/Utilities/geometryPhasicFlow/stlWall/stlWall.cpp @@ -26,62 +26,62 @@ Licence: bool pFlow::stlWall::readSTLWall ( - const dictionary& dict + const dictionary& dict ) { - auto fileName = dict.getVal("file"); + auto fileName = dict.getVal("file"); - real scale = dict.getValOrSet("scale", static_cast(1.0)); + real scale = dict.getValOrSet("scale", static_cast(1.0)); - realx3 transform = dict.getValOrSet("transform", realx3(0)); + realx3 transform = dict.getValOrSet("transform", realx3(0)); - auto scaleFirst = dict.getValOrSet("scaleFirst", Logical("Yes")); - - fileSystem file("./stl",fileName); + auto scaleFirst = dict.getValOrSet("scaleFirst", Logical("Yes")); + + fileSystem file("./stl",fileName); - stlFile stl(file); - if(!stl.read()) - { - fatalErrorInFunction << - " error in reading stl file "<< file <