Skip to main content
Question

I want to convert the obj model with map coordinates to the glb model with local coordinates (0,0,0).


Forum|alt.badge.img+1

I'm converting an obj file to local coordinates, glb.
Running one obj file in FME will take you to the desired local coordinates.
But when I run thousands of obj files in FME, they don't move to local coordinates (0,0,0).

I want to move thousands of obj files all to (0,0,0) at once.

For reference, I activated move to local coordinate.

 

3 replies

featuremichael
Supporter
Forum|alt.badge.img+8

hi @hn35987,

then try to run, a workbench in a batch process, where every single obj file will be converted.

 

1.) Make a Workbench File, that works for your process.

2.) [this part works this way when all of your obj files are in the same folder]

At first get all fme_Basenames of your Obj files. I Like to get a list (for the batchfile process) with the Reader (Text) and insert all of my files, then in de Navigator Menu on the left side, Set for the Text-Reader [Parameters: Features to Read → Max Feature to Read: 1) - Then under the [User Attribute] for the Text Reader, deactivate “text_line_data” and activate under the [Formate Attributes] = fme_basename  then Inspect the outcome and send the basenames in an Texteditor oder Excel-Sheet

3.) Open your workbench in an Text Editor:

Example Textline to Textline:

Bring this in a Linestring:

 3.)a)

"C:\Program Files\FME2023.1\fme.exe" D:\OUT\textline2textline.fmw --SourceDataset_TEXTLINE "D:\a.txt" --FEATURE_TYPES "" --DestDataset_TEXTLINE "$(FME_MF_DIR)b.txt"

Import this linestring to Excel and get the “Basename[a&B]” from SourceDataset and DestDataset renamed with your Basename

Like This:

4.) Save your Work into an Textfile and clean up the spaces to a clean string like in “3.)a)

save it as a batch file and start the batch process.

 

Greetings Michael


jasperwis
Enthusiast
Forum|alt.badge.img+15
  • Enthusiast
  • March 14, 2024

Or a FeatureReader (Directory and File Pathnames) to find all obj files and a WorkspaceRunner (Wait for job to complete = Yes)


featuremichael
Supporter
Forum|alt.badge.img+8
jasperwis wrote:

Or a FeatureReader (Directory and File Pathnames) to find all obj files and a WorkspaceRunner (Wait for job to complete = Yes)

I didn’t know that 🙈 but I need my option often for automatic tasks 😎✌️


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings