Uploaded November 2022 | Updated November 2026, 2 minutes ago
OpenSCAD is a tool that allows you to program CAD models using its custom programming language rather than dragging and dropping models in an editor. This allows you to define your designs entirely in code that can be compiled into rendered images or 3D models. Let's explore how we can connect that compilation feature to GitHub actions so we can automatically create new models whenever code is edited in our design.
To do this we'll be taking advantage of GitHub Actions and using that to open Pull Requests with the updated models as STL files that we can review and merge into our code. We can take advantage of GitHub's built-in STL viewer in order to preview models directly in any web browser.
Because we are only using features natively included in GitHub we can also use this as a full development loop so we can edit and regenerate models anywhere where we can access GitHub including things like a phone by using tools like http://github.dev/!
If you missed the first video introducing OpenSCAD you can watch that here: youtu.be/HxiyUi4RQzw
Get OpenSCAD: openscad.org/index.html
OpenSCAD's documentation: openscad.org/documentation.html
OpenSCAD on GitHub: github.com/openscad/openscad
You can get a copy of my models and the SCAD files that generate them here: github.com/runewake2/scad-examples
Join the World of Zero Discord Server: discord.gg/hU5Kq2u
OpenSCAD is a tool that allows you to program CAD models using its custom programming language rather than dragging and dropping models in an editor. This allows you to define your designs entirely in code that can be compiled into rendered images or 3D models. Let's explore how we can connect that compilation feature to GitHub actions so we can automatically create new models whenever code is edited in our design.
To do this we'll be taking advantage of GitHub Actions and using that to open Pull Requests with the updated models as STL files that we can review and merge into our code. We can take advantage of GitHub's built-in STL viewer in order to preview models directly in any web browser.
Because we are only using features natively included in GitHub we can also use this as a full development loop so we can edit and regenerate models anywhere where we can access GitHub including things like a phone by using tools like http://github.dev/!
If you missed the first video introducing OpenSCAD you can watch that here: youtu.be/HxiyUi4RQzw
Get OpenSCAD: openscad.org/index.html
OpenSCAD's documentation: openscad.org/documentation.html
OpenSCAD on GitHub: github.com/openscad/openscad
You can get a copy of my models and the SCAD files that generate them here: github.com/runewake2/scad-examples
Join the World of Zero Discord Server: discord.gg/hU5Kq2u
 or my video that covers using [Unity Quaternion operators](https://worldofzero.com/videos/rotation-math-tricks-using-unitys-quaternion-operators/).
Gimble locking occurs when two or more of the axis of rotation align with one another causing the available rotations the object can take to be limited (multiple rotations cause the same overall effect on the object). You can learn more about this effect on Wikipedia: https://en.wikipedia.org/wiki/Gimbal_lock
Ive been a big fan of 6DoF games since I was really young and draw a lot of inspiration from games like Descent, Overload and more. The style of games are really fun and I highly recommend giving one a try if youve never played one before.
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Live Coding a Basic 6 Degree of Freedom Flight Controller](https://i.ytimg.com/vi/sCSnitP6xPo/mqdefault.jpg)




The end result of this is will allow us to tweak the radius, location, inside and outside color of the circle we draw in world space. This allows us to do a lot more than we could previously even though we havent really added that many new features. We also migrate to use an unlit shader instead of using the default PBR shader. This is new compared to our original surface shader and is closer to the end result were trying to build. An unlit shader ignores lighting in the scene including things like global illumination and allows us to get a single consistent color across the entire surface our shaders material is applied to.
The World of Zero Discord Server: https://discord.gg/hU5Kq2u Using Properties and Steps in Part 2 of our Ripple in Shader Graph](https://i.ytimg.com/vi/tL3GbBAqF3E/mqdefault.jpg)





![Exploring Top-Level Programs in C# 9
Top-Level Programs is a new feature being introduced in C# 9.0 that significantly simplifies certain C# programs and allows you to remove almost all of the boilerplate code from them. This pattern allows you to call functions at the top-level of your C# program meaning that you do not need a class or function definition in order to call those functions. Instead C# automatically generates that code for you when your code is compiled.
The simplest top-level program is just one line:
```csharp
System.Console.WriteLine(Hello, World of Zero!);
```
There are a few special features included with top-level programs that help you to fully use some of the features like accepting command line arguments or async functions.
### `args` variable
C#s top-level programs include a magic `args` variable which contains a `string[]` of command-line arguments provided. Here is a working example script that accepts a command line argument to greet you by name.
```csharp
using System;
// If there is 1 argument greet that argument by name
if (args.Length 1)
{
Console.WriteLine($Hello, {args[0]}!);
} else { // Otherwise greet a generic Internet 🤖
Console.WriteLine(Hello Internet!);
}
```
Use `dotnet run World of Zero` or similar to run this code and be greeted with Hello, World of Zero!
### `async` and `await` support
You may take advantage of async functions inside of a top-level program. This allows for things like async file operations, web requests etc to be made without having to wrap them in a separate async function.
For example this task will print two numbers with a short pause between them.
```csharp
using System;
using System.Threading.Tasks;
Console.WriteLine(One);
await Task.Delay(1000);
Console.WriteLine(Two);
```
***
More info about some of the new features in C# 9.0 and how to use them is available here: https://devblogs.microsoft.com/dotnet/welcome-to-c-9-0/
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Exploring Top-Level Programs in C# 9](https://i.ytimg.com/vi/uxxROAx6MMU/mqdefault.jpg)