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

fixes #77 #78

Merged
merged 2 commits into from
Apr 25, 2024
Merged

fixes #77 #78

merged 2 commits into from
Apr 25, 2024

Conversation

teade
Copy link
Contributor

@teade teade commented Apr 24, 2024

Fixes #77 issue with cone surfaces used to limit tori extents.

@@ -598,7 +598,7 @@ def GenTorusAnnexVSurface(face,Vparams,forceCylinder=False):
Apex = face.Surface.Center + za * axis
semiAngle = abs(math.atan(d1/(z1-za)))

ConeAxis = axis if za < 0 else -axis
ConeAxis = axis if (face.Surface.Center.dot(axis) + z1 - Apex.dot(axis)) > 0.0 else -axis
Copy link
Member

Choose a reason for hiding this comment

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

You are right the current test is wrong although it worked so far.
I would prefer you to rewrite the instruction like
ConeAxis = axis if z1-za > 0.0 else -axis

@teade
Copy link
Contributor Author

teade commented Apr 24, 2024

Thanks, that is a more efficient way of checking the which side of the apex the point is. I have updated the PR.

@psauvan psauvan merged commit bc74e7e into GEOUNED-org:main Apr 25, 2024
6 checks passed
@shimwell shimwell mentioned this pull request Apr 26, 2024
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.

[BUG] - Issue with converting bodies containing tori with 'forceCylinder' set to 'False'
2 participants