-
Notifications
You must be signed in to change notification settings - Fork 0
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
Enable FreeCAD to generate mesh in different formats #1
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
This looks good in terms of content. I think the commits should be squashed and rebased (rather than merging from upstream) into atomic parts intended for review. And then we need to write out in the PR what changes are being made and why. I'm having an issue actually generating and visualizing a mesh right now with this workflow, but I don't think it's your code. |
I have created a PR in the main repo: FreeCAD#14667 (comment) . Will keep in mind to squash the commits for next time. Whats and whys are mentioned in the main PR. Not sure why you are not able to generate meshes, I was able to generate and visualize meshes using different file formats |
} | ||
else if (str == ".msh") { | ||
ind = 3; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be an error instead of silently using the default.
node_ind = int(line_list[2]) | ||
if(int(line_list[3])- int(line_list[2]) + 1 == total_num_nodes): | ||
contigous_numbered = True | ||
elif (read_node is True) and (len(nodes) < total_num_nodes): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elif (read_node is True) and (len(nodes) < total_num_nodes): | |
elif read_node and len(nodes) < total_num_nodes: |
line_list = line.split(" ") | ||
total_num_nodes = int(line_list[1]) | ||
node_ind = int(line_list[2]) | ||
if(int(line_list[3])- int(line_list[2]) + 1 == total_num_nodes): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like pylint is run in CI. Best to run that linting and formatting.
while line != "": | ||
line = f.readline() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's usually more idiomatic to for line in f.readlines()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought of using for
loop in this but seeing that while
loop is being used for other file types, I wanted to keep the code consistent.
No description provided.