|
[Sponsors] |
February 5, 2016, 04:37 |
Moving a .stl File
|
#1 |
Member
gereksiz
Join Date: Mar 2015
Posts: 42
Rep Power: 11 |
Hello,
I have a stl file but I need to change its position. I know I can scale or rotate it by using surfaceTransformPoints but I couldn't find a way to move it. Is it possible to do it without a CAD program by an OF utility, a script or something like that? Regards, |
|
February 5, 2016, 05:01 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29 |
surfaceTransformPoints does seem to have a translate feature. Did you try it?
https://github.com/OpenFOAM/OpenFOAM...nsformPoints.C
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
February 5, 2016, 06:02 |
|
#3 |
Member
gereksiz
Join Date: Mar 2015
Posts: 42
Rep Power: 11 |
Honestly I couldn't use it if it's used for moving it.
for example I used this script and nothing changed. #!/bin/bash export FILE="first.stl" surfaceTransformPoints -translate "(1 1 300)" $FILE surfaceTransformPoints -rollPitchYaw "(0 0 0 )" $FILE second.stl |
|
February 5, 2016, 09:37 |
|
#4 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29 |
I just tried it and it works. If you properly included your script here it doesn't work because you made a mistake in the command. If not, perhaps the version of the utility you are using is too old.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
February 11, 2016, 11:59 |
|
#5 |
Member
gereksiz
Join Date: Mar 2015
Posts: 42
Rep Power: 11 |
Yeah it worked, thanks. The reason why it didn't work at the first time is that I didn't write the output file, at least I guess so.
It works like this. It moves the geometry 300 meters in z direction. #!/bin/bash export FILE="first.stl" surfaceTransformPoints -translate "(0 0 300)" $FILE second.stl |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 03:30 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 06:42 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 03:23 |
pisoFoam compiling error with OF 1.7.1 on MAC OSX | Greg Givogue | OpenFOAM Programming & Development | 3 | March 4, 2011 17:18 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |