Skip to content

[BUG] Fix cad_mesh_grading_factor to accept float/double and remove incorrect GradingFactor enum #46

@sankalps0549

Description

@sankalps0549

Describe the bug
The Python implementation of cad_mesh_grading_factor (CadMeshGradingFactor in the COM) currently restricts the input to int values or the enum GradingFactor defined in common.py. This is incorrect.
The underlying COM API accepts a double value, and the Python API should accept a float, not an enum or integer-coded options. The presence of the GradingFactor enum (SLOW = 0, FAST = 1) incorrectly suggests that the API only supports two discrete values, which is not the case.

Image

Expected behavior

  • cad_mesh_grading_factor should accept a float in the range 0 to 1 (inclusive), matching the COM API’s double parameter.
  • Enum GradingFactor should not exist, as it incorrectly constrains the valid input.

Environment:

  • OS: Windows 11
  • Python Version: 3.10.11
  • Package Version: 26.0.4
  • Moldflow Synergy Version: 2026.1

Additional context
The GradingFactor enum in common.py was mistakenly added due to misinterpreting the COM signature. It should be removed, and the API should be updated so that users can pass a float directly. Documentation and type hints should be updated accordingly.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions