Loading
WilliamAAdams

Bezier Heart in OpenScad

by WilliamAAdams May 13, 2011
Download All Files

Thing Apps Enabled

Please Login to Comment

Thanks for this amazing library William. In my opinion, bezier is really something that should be added to OpenSCAD.

I attempted to use your library to create a 2D polygon, to use with an extrude_rotate. There were no module to do such a thing, so I added a BezPolygon module to do just that. I remixed it, you can have a look if you want:

http://www.thingiverse.com/thing:2170645

Again, thanks a lot for that library. You had all the math prepared for me. I don't think I would had managed to do it otherwise :D

Bezier library for OpenScad

well, it's funny how these things work out. Just this past week I was cleaning up my local hard disk, and decided to refresh my various OpenSCAD. There have been a few changes over the past 6 years. If you're interested:

https://github.com/wiladams/OpenScadModels

Looking back at it all, I think I was a younger smarter self then. It's taking me a while to get back into that OpenScad frame of thinking. I had a lot more fun and freedom when I started doing modeling using Lua instead.

I'm glad you found some use from this. I think I did a version that used nothing more than a 4x4 matrix and some glue. Matrix multiplication has become a core part of OpenScad, so I might check that out.

I can't get the demo heart.scad file to work.  I get the following messages in openscad:

WARNING: Ignoring Unknown module 'bezcubicfilletcolored'.

I'm sure I'm doing something wrong.

I am using openscad 2011.12.30
I noticed the demo uses bezier.scad, which I did not have, so I downoaded the public domain openscad bezier function by WilliamAAdams listed as the thing this was derived from and put that in my library.  perhaps there is a different bezier.scad file I need?

I uploaded a bezier.scad that seems to work.  OpenScad has changed since I first created this thing, so there is now an error related to linear_extrude.  It seemed to render anyway.  I don't know if it will actually print though.

Oh... that's a hard one.  It looks like I didn't include the specific version of the bezier library with this particular thing, and the library moved along.

I haven't touched this in almost two years, but I'll try to find the appropriate version of the bezier library to go with it.

Ahh I see.  I guess someone modified the bezier library and didn't bother to make it backward compatible, or bother giving it a different name.   If they wanted to make it incompatible with older versions, there's no reason they couldn't call the new library bezier 2.0 or something so people could tell what is what.. it's not like we don't have long filenames now.

I tried it with the library posted here and I still get the same errors, then at the bottom it says:
warning no top level geomery to render
and I just get nothing.

This is really amazing stuff you are doing!

I thought I would mention that what you have here is very close to how I modeled http://www.thingiverse.com/thing:6353http://www.thingiverse.com/thi... using high-end professional software. If you are able to make that line going through the center of the heart into a bezier curve on the XZ plane, and the line going across into
a bezier on the ZY plane, and join them with a 3 dimensional curve, things start to get really interesting!

I have no idea how challenging that is to code, but as I'm sure you know, it would enable you to create very unique geometry that goes way above and beyond working with primitives.

If there
is anyone here that seems willing and able, it is probably you. The stuff you have been contributing to OpenSCAD has literally been blowing my mind.

Valentine's Day Heart Box
by Starno

Thanks for the compliment. I actually looked at your heart as inspiration for what would be interesting to show people how easy it would be to use Bezier curves for modeling in OpenScad.

If I get you, what you're saying is, if we had Bezier Surfaces (even if they were limited), that would be very nifty.

Well, it just so happens that's exactly what I'm working on.

Basically, I'm viewing OpenScad as if it were a graphics card with some primitives. Then you just build up a 3D libr
ary from there, and it's all fairly well troden ground. Nost the most efficient thing in the world, and it would be better if OpenScad had the primitives directly, but perhaps this stuff will be inspiring enough to get them incoroporated over time.

Yeah, that is pretty much what I am saying. Modeling 3d objects with bezier surfaces instead of only being able to add/subtract from existing solid geometry can create curvy amazingness. Hearts, helmets, ergonomic features, variable diameter tubes, beautiful art, etc. The possibilities are (almost?) limitless, especially with 3d printing.