Skip to content

FIX: dxf fixes on mcad & ecad#7298

Draft
gkorompi wants to merge 5 commits intomainfrom
dxf_fix
Draft

FIX: dxf fixes on mcad & ecad#7298
gkorompi wants to merge 5 commits intomainfrom
dxf_fix

Conversation

@gkorompi
Copy link
Copy Markdown
Contributor

@gkorompi gkorompi commented Feb 21, 2026

  1. get_dxf_layers updated to support older versions of .dxf
  2. empty xml path caused anstranslator to faile in RedHat 9 when calling ImportCad
  3. no need to have a layers list as an input requirement for import_dxf when we call get_dxf_layers inside of it

2 different customers face issues with these functions.

@gkorompi gkorompi requested a review from a team as a code owner February 21, 2026 14:13
for idx in indices:
if "2" in lines[idx + index_offset]:
layer_names.append(lines[idx + index_offset + 1].replace("\n", ""))
if not layer_names:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add some tests to cover the new lines you implemented

Copy link
Copy Markdown
Collaborator

@SMoraisAnsys SMoraisAnsys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @gkorompi Can you have a look into my comments ?

Comment thread src/ansys/aedt/core/application/analysis_3d.py Outdated
Comment thread src/ansys/aedt/core/application/analysis_3d.py Outdated
Comment thread src/ansys/aedt/core/application/analysis_3d.py Outdated
Comment on lines +825 to +828
index_offset = 1
for idx in indices:
if "2" in lines[idx + index_offset]:
layer_names.append(lines[idx + index_offset + 1].replace("\n", ""))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain the logic behind this code ?

self.logger.warning("aedb_exists. Renaming it to %s", project_name)
if xml_path is None:
xml_path = Path("").name
xml_path = str(Path(cad_path).with_suffix(".xml"))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you casting into str when the previous code was using Path ? That's also the case for the elif a line below

gkorompi and others added 3 commits February 23, 2026 13:03
Co-authored-by: Sébastien Morais <146729917+SMoraisAnsys@users.noreply.github.com>
Co-authored-by: Sébastien Morais <146729917+SMoraisAnsys@users.noreply.github.com>
Co-authored-by: Sébastien Morais <146729917+SMoraisAnsys@users.noreply.github.com>
@Samuelopez-ansys
Copy link
Copy Markdown
Member

Hi @gkorompi what is the status of this PR? I will move it to draft until you fix the suggestions

@Samuelopez-ansys Samuelopez-ansys marked this pull request as draft March 12, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants