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

Flat end shape option #35

Merged
merged 10 commits into from
Aug 20, 2016
Merged

Flat end shape option #35

merged 10 commits into from
Aug 20, 2016

Conversation

RegMeasures
Copy link
Collaborator

A first attempt at adding an option to have a flat section at the tip and/or tail of specified width. Let me know what you think.

Merging Mike's better use of boost::optional
not sure why my clone seems to need this correcting when I just updated
and Mike's master has this already
Basic implementation compiles but it isn't working correctly yet.
produces funny bow ties at ends of skis...
It seems to work ok but I can't work out why I have to reverse the sign
of the flatWidth in shape-parts.cpp
Correcting some errors (omissions) I made when merging Mikes last
changes
@RegMeasures
Copy link
Collaborator Author

It's just occurred to me that maybe I should add some validation to check that the flat section is not wider than the tip/tail? Not sure what would happen if you enter a flat section which is too wide...

Also I forgot to note in my original comment that this pull request relates to #12

@splitn2
Copy link

splitn2 commented Jul 28, 2016

Do you mean the ski or board width stays straight in this section @RegMeasures ? Sounds useful even if its in small lengths so we can play with shapes a bit more.

assert(type == "Basic Bezier");
return std::unique_ptr<ShapeEndPart> {
new BasicBezier { endHandle, transitionHandle } };
assert(type == "Basic Bezier" || type == "Flat");
Copy link
Owner

Choose a reason for hiding this comment

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

Indent

@mikemag
Copy link
Owner

mikemag commented Jul 30, 2016

Looking good. The main issue is that -2 you were wondering about. I don't think it's far off, and I made some suggestions which I hope will help there.

I agree it might be good to throw an error if the flat section is too wide. I may be generally poor that such errors now, though... like I don't recall what happens if you make the tail just too short or something :) If you see this kind of error handling being weak already then don't sweat it; I'm willing to take an issue to improve that broadly in the future.

Thanks again for working on this stuff!!!

@mikemag
Copy link
Owner

mikemag commented Jul 30, 2016

Oh, for the final commit, the extra .bat files are just fine. Let's leave out the .exe, though. I never know what's up with the output generated on Windows vs. Mac and those extra lines, so lets leave the sample output out of the final commit, too. I'll regen them when I make a new release.

@splitn2
Copy link

splitn2 commented Jul 30, 2016

awesome guys great to see some progress here , thanks so much for your time on this its wicked. I've been machining inside edges into some DIY splitboards today getting my CNC skills tuned up so the overall recipe is brewing up nicely here in my workshop!!!!! The CNC precision and hands on tools makes for a lot better DIY cut splitboard than than the past ways of doing it.... now days its a waterjet cut board and a quick rebate to cut the inside edge rebate and groove on cnc, and the board is a splitboard. I'm so stoked today the DIY boards are actually economic to do, which makes for a great way to package up a deal for new comers to splitboarding.

Then for this MonkeyCAM and SnoCAD-X we make them from scratch, some Java and some C++ , and mix it all up with design ideas and rider input and we will have a shitload of fun in the mountains riding these beasts, its amazing how we can weave all this passion and technology together!!!!!!!!!!!!!!!!!!!!!

@mikemag @sou-l @RegMeasures @toddrednz @NickAlbers bring it on lads!!!!!!

@RegMeasures
Copy link
Collaborator Author

Hi @mikemag,

I've had another look over this and I think it should be pretty close to being ready to merge. Changes I've made are:

  • Tidying up the worst of my syntax inconsistencies
  • Investigating why I needed to make flatEndY negative. I think I finally understand this now. See Flat end shape option #35 (comment) regarding this. Without the negative I get interesting bow tie ends!
  • Adding a BOOST_ASSERT_MSG in shape-parts.cpp to throw a meaningfull error if the flat width is wider than the end of the board
  • Removing the flat nose from the example ski (so it has a Basic Bezier nose and a Flat tail)
  • Removing changes to the exe and sample output from the pull request so you can re-generate these

Let me know what you think.

@mikemag
Copy link
Owner

mikemag commented Aug 20, 2016

Yea, this looks great. I clearly remembered wrong; the outline is generated counterclockwise from the nose, so in the -Y space as you learned. I left a note here but forgot:

// Path is counterclockwise, start point at (0,0,0).
I actually can't remember why I picked to do it that way, but you've adapted properly. This looks excellent!!

@mikemag mikemag merged commit 75ecf7b into mikemag:master Aug 20, 2016
@mikemag
Copy link
Owner

mikemag commented Aug 20, 2016

@RegMeasures RegMeasures deleted the end-shapes branch June 12, 2017 23:02
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.

3 participants