Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid special characters in tags #111

Merged
merged 4 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ classifiers = [
]
dependencies=[
'gmsh',
'nympy<2.0a0',
'pyparsing',
'cadquery>=2',
'cadquery-ocp>=7',
'numpy',
'networkx',
'trimesh',
'unidecode',
]

[project.urls]
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ gmsh
pyparsing
cadquery>=2.2.0
cadquery-ocp>=7.7.0
numpy
numpy<2.0a0
trimesh
networkx
unidecode
Cython
3 changes: 2 additions & 1 deletion src/CAD_to_OpenMC/assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import math
import sys

from unidecode import unidecode
from datetime import datetime

from pymoab import core, types
Expand Down Expand Up @@ -315,7 +316,7 @@ def import_stp_files(
s = gmsh.model.getEntityName(3, vid)
part = s.split("/")[-1]
g = re.match(r"^([^\s_@]+)", part)
tag = g[0]
tag = unidecode(g[0])
if self.verbose > 1:
print(
f"INFO: Tagging volume #{vid} label:{s} with material {tag}"
Expand Down