CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[Other] .STL face splitting tool

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 6, 2017, 18:53
Default .STL face splitting tool
  #1
Member
 
Chris L
Join Date: Sep 2012
Posts: 53
Rep Power: 13
vbchris is on a distinguished road
UPDATE 2: Now runs fast.
UPDATE 1: Made more verbose and significantly improved performance.


Hi all,

I hacked together a program that I use for splitting .STL files into different faces. I've seen a few threads on the forum that essentially have the same issue I had and would like to share this program for feedback.

If anyone knows of a better method please let me know!! This is the bane of my meshing existance.

There are a number of features that are in development but which are not currently included.

Objective:

Create a simple command line tool which automatically identifies faces in a .stl file and splits the solid into individual components.

Secondary objective, pre-process .STL file prior to use by snappyHexMesh to check for common quality issues, grid alignment with surfaces, water-tightness, etc.


How to:

Github link -> https://github.com/vbchrist/stlFaceFinder

Download stlFaceFinder.exe

Currently windows 32-bit only (which works on 64-bit too).

Use windows command promt to run from command line.

stlFaceFinder.exe [inputFile] [outputFile]

[inputFile] = either local file or complete file path (validation of file not done) [outputFile] = either local file or complete file path (will overwrite files without warning)

Example:

Download pipe.STL (from this repo) and place it in the directory of stlFaceFinder.exe. Open windows command promt or power shell. change directory to where stlFaceFinder.exe and pipe.stl are located.

Run the program using

stlFaceFinder.exe pipe.STL output.STL

The output should be,

C:\path\to\files> ./stlFaceFinder.exe wier.STL release.stl

Importing C:\path\to\files\wier.STL... Done.

6162 facets in file.

Generating edge list ... Sorting edges ... Done. (1.50148)

Matching facets ... Done.

Successfully matched 18486 of 18486 facet edges.

Doing setup ... Done.

Searching for surfaces ... Done.

Assigning new surfaces to STL solids ... Done.

Writing to C:\path\to\files\release.stl... Done.

Last edited by Tobi; January 22, 2018 at 18:13.
vbchris is offline   Reply With Quote

Old   January 22, 2018, 18:12
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
I moved it to the contributors forum. However, is there a linux based version too?
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 27, 2018, 00:19
Default
  #3
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I get the missing MSVCP140D.dll error.

However, I have tried MS VS C++ redist 2015 & 2017, x86 and x64 and it is not still not detected. Seems to be a build error.
LuckyTran is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[ANSYS Meshing] Workbench Meshing Tool - Max Face Size Parameter MaxHeat ANSYS Meshing & Geometry 3 March 2, 2021 07:50
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
[blockMesh] Internal walls of zero thickness anger OpenFOAM Meshing & Mesh Conversion 23 February 6, 2020 18:25
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 07:36


All times are GMT -4. The time now is 00:31.