Nice video! I reimplemented it in build123d (a different type of CodeCAD that uses python and has built-in functions like fillet/chamfer). Here is the source code in build123d: from build123d import * with BuildPart() as p: with BuildSketch() as s: RectangleRounded(43.25,43.25,5) extrude(amount=-35) with BuildSketch() as s2: RectangleRounded(43.25+8,43.25+8,5) extrude(amount=5) Hole(38.5/2)
@@MostlyBuilds I have to confess but I am aware of them but was too lazy to work with them and instead just made screw holes in the print but I could tap the screws into. Probably terrible practise
Check out this rounded cube library: danielupshaw.com/openscad-rounded-corners/ The pink cube in the example is the one you want I think. I assumed you just want a softer edge. I came across this chamfer library as well that just chops it off at and angle, if you prefer that: github.com/hraftery/prism-chamfer My rounded cube implementation that just does the sides is pretty basic. Certainly possible to improve on it with what you are asking for, but probably better to leverage the work of others that have spent the time to build proper libraries for rounding.
A pretty simple way would be to place octohedra with the radius of your desired chamfer at each of the (offset inwards) corners of the "cube", then wrap everything up in a "hull". Make the octohedra with two cylinders end to end, with d2=0 and $fn=4. Just use spheres and you'll get rounded fillets from the same code, mix and match if you want. You can do the same sort of thing with the "minkowski" operation, if you can get your head around how it works.
Thanks! You could always try contributing a change to the open source repo. The devs that run it are on IRC I believe. I chatted them a while ago about a feature I was considering building and they were cool about it. Sadly I never got around to completing it 😩 What situations would you find it useful to pipe a result to a function or module? Just looking to eliminate intermediate variables or something?
I've tried OpenSCAD, JSCAD, and FreeCAD.. FreeCAD is the winner. OpenSCAD you wind up with a piles of obtuse code. JSCAD gives you obscure errors if the slightest thing is off, making you dig thru their source code to understand why. FreeCAD, you just put your parameters, equations and constraints in a spreadsheet and the rest is traditional CAD. So easy. And if you require code to generate the object, you can interface to FreeCAD from almost any language, and generate your object.
@@The-KP "and the rest is traditional cad" That can be a problem. CAD is complex and if you are new to it, the learning curve can be steep, especially with Free CAD which is known to be buggy. However, if you are already comfortable with simple programming concepts then OpenSCAD makes designing simple functional parts like this quick and easy as demonstrated in this video. Including parameters and saving portions as reusable functions makes future designs even easier. For simple functional parts like this, OpenSCAD is ideal.
It’s not hard to learn in my opinion. Most of your time is spent calling the SCAD functions to describe the geometry, which is basically equivalent to calling custom functions written in your language of choice. The actual language constructs that you need for control flow and looping etc are basically the same as any other language. I’ve heard of projects that let you write code in another language and compile to SCAD. I looked this one up after I saw your message: github.com/jeff-dh/SolidPython No idea how good it is, but maybe worth checking out.
JSCAD (formerly OpenJSCAD) is a JavaScript-based equivalent if that would feel more comfortable. There's also SolidPython which is a python front-end that compiles to OpenSCAD code.
I just recently learned about this software, the code reminds me of Python and isn't intimidating at all. I was worried that it would look like C or C++ being an open source project.
Yeah it’s pretty friendly. For a long time the IDE didn’t have autocomplete, but they added that in the past few years. It’s really nice. Between that and the “cheat sheet” that they publish, I rarely ever have to look stuff up in the official manual. openscad.org/cheatsheet/ Thanks for checking out the video!
There are some VERY cool tricks too. Look deeply into the Customizer for starters. Selected text can be dragged to move it, or cntrl-dragged to copy it, nice. Also, and this might be the MOST useful feature of this wonderful program: Put your cursor just to the right of any digit, then ALT-UP will increase that digit and ALT-DOWN will decrease it. Updates will render instantly, and it makes fine adjustment SOOOO simple. If you need more precision, ALT-RIGHT will add decimals to the number. Brilliant. Lastly, since I hate to type, I created a whole bunch more of the command templates, the ones you can access by right-clicking in the Editor, and clicking Insert Template. There are a few simple ones by default, but you can make whatever you want. I often want to create a cube with both rotation and translation, so I made one template that inserts all three with default values. The templates are just .txt files with a .json extension, and the syntax is easy. I'm happy to help if you have any questions. :)
@@MostlyBuilds I have a question, if you don't mind. Does autocomplete do anything more than showing you the syntax and completing the keyword you are typing, or am I just using it wrong? It would be great to be able to insert the entire structure with default values, like Insert Template, right then and there. Thank you for your consideration, and for making this great video!
@@davidkaye821 my experience with the autocomplete is the same as yours. It's pretty basic, but it's so much better than before when there was nothing at all. The better solution that you described would be really nice. Other IDEs behave this way with inserting the whole code block and putting placeholder values in (Xcode for example). Recently I read about a VSCode plugin for OpenSCAD: github.com/Leathong/openscad-support-vscode I haven't used it, but it says that it supports autocomplete. Not sure how it performs. Might be worth checking out. Thanks for the comments and the kind words!
@@MostlyBuilds Would you be interested in seeing all the templates I've made up? My goal is to NEVER type a keyword in again. I could post them right here in these comments, it's just a page or two of text.
FYI, use union() instead of group(). It was brought to my attention that group() is an older API that likely just aliases union().
Nice video! I reimplemented it in build123d (a different type of CodeCAD that uses python and has built-in functions like fillet/chamfer). Here is the source code in build123d:
from build123d import *
with BuildPart() as p:
with BuildSketch() as s:
RectangleRounded(43.25,43.25,5)
extrude(amount=-35)
with BuildSketch() as s2:
RectangleRounded(43.25+8,43.25+8,5)
extrude(amount=5)
Hole(38.5/2)
Very cool! I will definitely check out build123d! Thanks for sharing. Consider subscribing 🙂
Great vid! You are a natural teacher. 👍👍
Thanks! I’m planning to make more OpenSCAD videos.
This was great. Explained well and easy to follow. Thanks.
amazing work. i use solid works and matlab with tool packs , this scad is like learning to walk again.
Brilliant video. Extremely followable and reproducible.
Well done 👏🙏
Scad looks great for my next project - more tutorials would ber great. Currently trying to do this kind of thing with geometry nodes in Blender.
Thanks for the feedback! I have a few ideas for future videos. Consider subscribing if that interests you 😀
@@MostlyBuilds Already did ☺️ My project is to design a large power bank that will be 3D printed. Lots off complicated fittings etc.
@@davidrgilson cool! If you aren’t aware of “heat set inserts,” that might be something to check out if your parts need solid screw attachment points.
@@MostlyBuilds I have to confess but I am aware of them but was too lazy to work with them and instead just made screw holes in the print but I could tap the screws into. Probably terrible practise
@@MostlyBuilds to clarify, I'm talking about the previous power bank for they designed in Blender. Maybe I'll do better with this next one!
Great starting tutorial in less than ten minutes!
Thanks! Maybe I need a more catchy title. OpenSCAD in less than 10 minutes, or your money back!
Can it be used for construction purpose?
Very nice, you made the process seamless.
How would I go about adding a chamfer along the top ?
Check out this rounded cube library: danielupshaw.com/openscad-rounded-corners/
The pink cube in the example is the one you want I think. I assumed you just want a softer edge. I came across this chamfer library as well that just chops it off at and angle, if you prefer that: github.com/hraftery/prism-chamfer
My rounded cube implementation that just does the sides is pretty basic. Certainly possible to improve on it with what you are asking for, but probably better to leverage the work of others that have spent the time to build proper libraries for rounding.
A pretty simple way would be to place octohedra with the radius of your desired chamfer at each of the (offset inwards) corners of the "cube", then wrap everything up in a "hull". Make the octohedra with two cylinders end to end, with d2=0 and $fn=4. Just use spheres and you'll get rounded fillets from the same code, mix and match if you want.
You can do the same sort of thing with the "minkowski" operation, if you can get your head around how it works.
Great video! Man, I really wish OpenSCAD had an Elixir-style "pipe" operator.
Thanks! You could always try contributing a change to the open source repo. The devs that run it are on IRC I believe. I chatted them a while ago about a feature I was considering building and they were cool about it. Sadly I never got around to completing it 😩
What situations would you find it useful to pipe a result to a function or module? Just looking to eliminate intermediate variables or something?
I use PowerShell a lot at work so I'm very used to piping stuff around a bunch so a pipe operator would be pretty cool.
That was awesome, thanks for that!
Thanks for the feedback! I might post more OpenSCAD videos in the future. Consider subscribing if you are interested.
@@MostlyBuilds I have done so already! I would be interested in more OpenSCAD videos for sure.
Great video+explanation+presentation! Well done mate - NEW SUB 🙏🏻
Thanks so much! I’m planning to do more OpenSCAD videos in the future.
Please do mate, even just small basic builds, you are really smooth with your presentation@@MostlyBuilds
so much work for such a simple shape
I've tried OpenSCAD, JSCAD, and FreeCAD.. FreeCAD is the winner. OpenSCAD you wind up with a piles of obtuse code. JSCAD gives you obscure errors if the slightest thing is off, making you dig thru their source code to understand why. FreeCAD, you just put your parameters, equations and constraints in a spreadsheet and the rest is traditional CAD. So easy. And if you require code to generate the object, you can interface to FreeCAD from almost any language, and generate your object.
@@The-KP Haha and I gave up on FreeCAD cuz Fusion360 was just so much more intuitive.
@@The-KP "and the rest is traditional cad" That can be a problem. CAD is complex and if you are new to it, the learning curve can be steep, especially with Free CAD which is known to be buggy. However, if you are already comfortable with simple programming concepts then OpenSCAD makes designing simple functional parts like this quick and easy as demonstrated in this video. Including parameters and saving portions as reusable functions makes future designs even easier. For simple functional parts like this, OpenSCAD is ideal.
The `#` and `!` tips 🤯!
Haha awesome right? I was really hoping for a comment about this when I was making the video! You made my day 🎉
Very informative
Hey man! I think iam doing something wrong. Can you help me to understand what iam doing wrong if i send you screenshot? Thansk à lot!
Sure. If you want to message me on instagram I’ll take a look: instagram.com/mostlybuilds
Superb
OpenSCAD seems to rely on a custom language. That doesn't seem like a good decision to me. Otherwise, I found the concept intriguing.
It’s not hard to learn in my opinion. Most of your time is spent calling the SCAD functions to describe the geometry, which is basically equivalent to calling custom functions written in your language of choice. The actual language constructs that you need for control flow and looping etc are basically the same as any other language.
I’ve heard of projects that let you write code in another language and compile to SCAD. I looked this one up after I saw your message: github.com/jeff-dh/SolidPython
No idea how good it is, but maybe worth checking out.
JSCAD (formerly OpenJSCAD) is a JavaScript-based equivalent if that would feel more comfortable. There's also SolidPython which is a python front-end that compiles to OpenSCAD code.
Nice one
I just recently learned about this software, the code reminds me of Python and isn't intimidating at all. I was worried that it would look like C or C++ being an open source project.
Yeah it’s pretty friendly. For a long time the IDE didn’t have autocomplete, but they added that in the past few years. It’s really nice. Between that and the “cheat sheet” that they publish, I rarely ever have to look stuff up in the official manual. openscad.org/cheatsheet/
Thanks for checking out the video!
There are some VERY cool tricks too. Look deeply into the Customizer for starters.
Selected text can be dragged to move it, or cntrl-dragged to copy it, nice.
Also, and this might be the MOST useful feature of this wonderful program: Put your cursor just to the right of any digit, then ALT-UP will increase that digit and ALT-DOWN will decrease it. Updates will render instantly, and it makes fine adjustment SOOOO simple. If you need more precision, ALT-RIGHT will add decimals to the number. Brilliant.
Lastly, since I hate to type, I created a whole bunch more of the command templates, the ones you can access by right-clicking in the Editor, and clicking Insert Template. There are a few simple ones by default, but you can make whatever you want. I often want to create a cube with both rotation and translation, so I made one template that inserts all three with default values. The templates are just .txt files with a .json extension, and the syntax is easy.
I'm happy to help if you have any questions. :)
@@MostlyBuilds I have a question, if you don't mind. Does autocomplete do anything more than showing you the syntax and completing the keyword you are typing, or am I just using it wrong? It would be great to be able to insert the entire structure with default values, like Insert Template, right then and there. Thank you for your consideration, and for making this great video!
@@davidkaye821 my experience with the autocomplete is the same as yours. It's pretty basic, but it's so much better than before when there was nothing at all. The better solution that you described would be really nice. Other IDEs behave this way with inserting the whole code block and putting placeholder values in (Xcode for example).
Recently I read about a VSCode plugin for OpenSCAD: github.com/Leathong/openscad-support-vscode
I haven't used it, but it says that it supports autocomplete. Not sure how it performs. Might be worth checking out.
Thanks for the comments and the kind words!
@@MostlyBuilds Would you be interested in seeing all the templates I've made up? My goal is to NEVER type a keyword in again. I could post them right here in these comments, it's just a page or two of text.
great video
I really love openscad. Its biggest limitation is that it doesn't generate real arcs.
i wonder if some code from blender could be brought in for that
Great video