-
Notifications
You must be signed in to change notification settings - Fork 128
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
Feat/4010 pass primitive features #4019
Conversation
Update GeometryModeler._create_object in Primitives.py Add **kwargs as last argument to most primitive creation methods in Primitives3D
Addressed a defect #4017 that was identified while updating unit tests. Added documentation and updated the unit tests to allow properties of primitives to be set using arguments when they are created.
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
A comma on the last line in a list of arguments is invalid Python 2.7 syntax.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #4019 +/- ##
=======================================
Coverage 81.41% 81.42%
=======================================
Files 182 182
Lines 63313 63322 +9
=======================================
+ Hits 51549 51558 +9
Misses 11764 11764 |
- Address a syntax change in Maxwell 2D for primitives in Primitives2D in the plane property. - Automate assignment of any valid property to a primitive on instantiation using kwargs.
test_09_plot() was failing because the regular polygon start and first position were along the z-axis while the polygon should have been in the XY plane. This was also the case in the "main" branch.
@PipKat : I've added def create_polyhedron(
self,
cs_axis=None,
center_position=[0.0, 0.0, 0.0],
start_position=[0.0, 1.0, 0.0],
height=1.0,
num_sides=12,
name=None,
matname=None,
**kwargs,
): meets the PEP style requirement but causes the IronPython unit test to fail. If I fix this so IronPython unit test passes, then it fails the style check. |
There is a defect in the native API that leads to strange behavior when transparency of 2d objects is set.
Black changes syntax that causes IronPython failures. This was resolved using # fmt: on ... # fmt: off
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.
Nice improvement
Allow primitive properties to be set on instantiation by passing named arguments. |
No description provided.