Skip to content

Move shell functions out of surface.cpp and into shell.cpp#1220

Merged
rpavlik merged 1 commit intosolvespace:masterfrom
phkahler:holes
Feb 14, 2022
Merged

Move shell functions out of surface.cpp and into shell.cpp#1220
rpavlik merged 1 commit intosolvespace:masterfrom
phkahler:holes

Conversation

@phkahler
Copy link
Copy Markdown
Member

This was the first thing I wanted to do when starting to write code for #955 Hole Tool. Then decided it might be frowned upon, so proposing it separately.

@phkahler phkahler requested review from rpavlik and ruevs February 13, 2022 20:00
Copy link
Copy Markdown
Contributor

@rpavlik rpavlik left a comment

Choose a reason for hiding this comment

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

This is just moving the code to a separate file, right? I don't have to review every line? ;) Sounds good to me, long source files often make me nervous

@phkahler
Copy link
Copy Markdown
Member Author

This is just moving the code to a separate file, right? I don't have to review every line? ;) Sounds good to me, long source files often make me nervous

@rpavlik Yes, that's it - just moving functions. I don't like huge source files either and this split naturally almost in half.

@rpavlik rpavlik merged commit c5ea9a4 into solvespace:master Feb 14, 2022
@ruevs
Copy link
Copy Markdown
Member

ruevs commented Feb 14, 2022

A perfect split :-)

@phkahler
Copy link
Copy Markdown
Member Author

I remember whitequark not wanting to refactor just for the sake of refactoring - something about using git blame - so I wanted to get opinions on it. Looks like we're on the same page. If the change makes sense or makes things easier then make it.

@ruevs
Copy link
Copy Markdown
Member

ruevs commented Feb 15, 2022

In principle I'm with Whitequark on this. But this particular change makes sense.

On the other hand when someone submitted a pull request that split solvespace.h in "50" separate headers - totally stupid (albeit perhaps not totally pointless).

Or - for example - globally finding and replacing unsigned int with uint32_t I would never approve of - that would be stupid, pointless and dangerous (bug prone) at the same time..

@rpavlik
Copy link
Copy Markdown
Contributor

rpavlik commented Feb 15, 2022

For things that don't move files (like spacing) there's actually a mechanism for telling git blame to ignore certain commits now. I don't think GitHub handles it yet, but there is hope on the horizon, I've used it in other projects already. Just an fyi, I don't intend to submit a reformatting commit or anything.

@phkahler phkahler deleted the holes branch December 26, 2022 19:41
devin-ai-integration Bot pushed a commit to erkinalp/solvespace that referenced this pull request Apr 3, 2025
dennisyangji pushed a commit to Orthogonalpub/ode_solvespace that referenced this pull request Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants