Skip to content

feat(modeling): avoid creating multiple temporary vec3 objects in cal… - #1498

Merged
z3dev merged 1 commit into
jscad:masterfrom
MaccheroniCode:feat/calculate-plane
Nov 3, 2026
Merged

z3dev merged 1 commit into
jscad:masterfrom
MaccheroniCode:feat/calculate-plane

Conversation

@B3rn475

@B3rn475 B3rn475 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

…culatePlane

on-behalf-of: @MaccheroniCode info@maccheronicode.it

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Does your submission pass tests?

Note: please do NOT include build files (those generate by the build-xxx commands) with your PR,

Thank you for your help in advance, much appreciated !

@z3dev z3dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@B3rn475 Nice! Did all the test suites pass? Just double checking.

@B3rn475

B3rn475 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

I do confirm.

AFAICS this is just performing the sum of a series of vec3s. Now we just accumulate in the same object instead of creating a new one every time.
It is also fine because we have the guarantee, by construction, that the vect3 used to accumulate into is not shared.

@z3dev z3dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good

@z3dev
z3dev merged commit 60d9fbb into jscad:master Nov 3, 2026
2 checks passed
@B3rn475
B3rn475 deleted the feat/calculate-plane branch November 3, 2026 08:33
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.

2 participants