A note on NetGen

NetGen rocks.
# This script generates facets for all CAD parts located in
# the specified target directory.

set workdir "C:/work/data"
set targetExt "stp"
set filenames []

# Callback on visiting a certain file.
proc on_visit {path} {
global filenames
# puts "Next filename: $path"
lappend filenames $path

# Recursive visiting procedure.
proc visit {base glob func} {
foreach f [glob -nocomplain -types f -directory $base $glob] {
if {[catch {eval $func [list [file join $base $f]]} err]} {
puts stderr "error: $err"
foreach d [glob -nocomplain -types d -directory $base *] {
visit [file join $base $d] $glob $func

# Procedure to find files of a certain type.
proc find_files {base ext} {
visit $base *.$ext [list on_visit]

# Find files with a certain extension.
find_files [lindex $workdir 0] $targetExt

# Load each model and check.
foreach inFilename $filenames {
puts "Next model to process: $inFilename"
if { [catch {load-step $inFilename}] } {
puts stderr "error: cannot read a STEP file."


puts "Checked [llength $filenames] files."
NetGen rocks all the time.
NetGen accuracy is not perfect.
Analysis Situs CLI.
Corrupted mesh.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store