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

Give CylinderSegment a "barycenter" attribute #480

Closed
OrtnerMichael opened this issue Feb 22, 2022 · 1 comment
Closed

Give CylinderSegment a "barycenter" attribute #480

OrtnerMichael opened this issue Feb 22, 2022 · 1 comment
Assignees
Milestone

Comments

@OrtnerMichael
Copy link
Member

The problem is that the position attribute of the CylinderSegment is always in the center of the full cylinder.

import magpylib as magpy
s = magpy.magnet.CylinderSegment((0,0,1000), (1,2,1,0,20))
s.show(markers=[s.position], style_marker_symbol='o', style_marker_size=10)

image

When computing interactions or forces or torques we need the geometric center (should also be the start point of the magnetization arrow). Should we add a method s.barycenter() to this class ? Would make these computations much simpler.

@Alexboiboi Alexboiboi added this to the 4.0 milestone Mar 3, 2022
@Alexboiboi Alexboiboi self-assigned this Mar 3, 2022
@Alexboiboi
Copy link
Member

closed by #484

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

No branches or pull requests

2 participants