Closed zennithn closed 3 years ago
Derpherp :P
Oh, what you can do is turn this pull request into a 'draft'. That way we cannot accidentally merge it, but we will be able to organize discussions about the code you're writing until it's ready! Then you can also request reviews and such before the branch is actually completed.
@Lathreas I agree that HumerusDataObjectBeforeFileIO.cs is pretty bad, and I view it as being approximately where ExampleBone.cs is in the code. Some parts should indeed go in the engine or anatomy folders - for example BoneBranchControlPoint shouldn't be in HumerusDataObjectBeforeFileIO.cs at all; I just need the code right now.
The following would be great to get into the engine or anatomy folders at some point (within ~2 weeks?), so that I could simply reference them from HumerusDataObjectBeforeFileIO.cs:
It's not clear yet that we need a truly separate Humerus.cs, Radius.cs, etc yet. If the API and data representation for LongBone objects is good enough, then we can get away from hard-coding values. So, let's see how far we can get with HumerusDataObjectBeforeFileIO.cs and see what can be made generalizable.
Edit: On second thought, I'll plan on taking on refactoring work myself, so that we can avoid you and I doing redundant work. Please see my message from Discord:
Mmm...yeah, I think I want to hold off on further data representation work for a humerus until the raytracing code is merged.
Also, I think I'd actually like to do this data representation by jumping in to refactoring (instead of trying to keep my code to a separate class, as I have been doing). This is because a lot of the things I want to do that would support better data representation require working with the engine or anatomy code.
I'm realizing that, otherwise, there could be a lot of redundant work between Lathreas and myself.
@Lathreas One other thought I forgot to mention - I feel like LongBone itself could be refactored a bit to incorporate some of the data handling developed in HumerusDataObjectBeforeFileIO.cs. You understand LongBone better than I do, so I'd be afraid to take that on right now. However, after some discussion, if you find the way data is represented to be useful, I'd be happy to help with refactoring code into LongBone.
Alright, here's a real first pull request! This refactors some code from LongBone into a new class LongitudinalStructure. Please also be sure to view issue https://github.com/Freedom-of-Form-Foundation/anatomy3d/issues/49
It's entirely possible I've done something that will create bugs, since I'm quite new at C#. Sorry in advance!
I thought I just about had a pull request together, aaaand I just realized that in my refactoring, I completely forgot to update all of the calls to getters and setters previously present in the refactored class. Sorry about that!
herpderp