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

Refactor CylinderSector to allow angles more than 180° #3296

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

nplinden
Copy link
Contributor

Description

A proposition for change solving issue #3293, that causes the CylinderSector to have an angle limit of 180° rather than 360°.

Fixes

The existing CylinderSector class is renamed to _HalfCylinderSector, the _ prefix indicating that it is for internal use only.
A new CynlinderSector class is created, and is a composite surface made up of two _HalfCylinderSector like so:

image

This naturally doubles the angle limit to from 180° to 360°.

Pros: This fixes requires very little additionnal code and no additionnal trig/boolean algebra, with no API change
Cons: This add an unecessary middle plane if the angle is less than 180°

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@nplinden nplinden changed the title Cylindersector Refactor CylinderSector to allow angles more than 180° Feb 11, 2025
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.

1 participant