Compare commits

...

5 Commits

Author SHA1 Message Date
wuyoli 41ca031038 change atom feed to rss feed 2022-03-07 23:59:16 +00:00
wuyoli 5bf5e4797e move credits to about page 2022-02-18 19:00:46 +00:00
wuyoli 4ee49b6c26 correct date in 1st post 2022-02-18 18:54:50 +00:00
wuyoli 1c5096d1b7 write 1st post 2022-02-18 18:05:01 +00:00
wuyoli 8e3f44a3dd make sidebar narrower 2022-02-18 11:47:02 +00:00
5 changed files with 71 additions and 5 deletions

View File

@ -5,6 +5,7 @@ compile_sass = true
highlight_code = true
build_search_index = false
generate_feed = true
feed_filename = "rss.xml"
highlight_theme = "nord"
default_language = "en"

View File

@ -0,0 +1,59 @@
+++
title = "Design ideas for a Code-CAD package"
template = "page.html"
date = 2022-02-18T20:00:00Z
[taxonomies]
tags = ["CAD"]
[extra]
summary = "Basic high-level collection of ideas about a CAD package"
mathjax = "tex-mml"
+++
# Goal
The goal of this project is to make a [CAD](https://en.wikipedia.org/wiki/Computer-aided\_design)-system which is mainly accessed by a powerful functional programming interface.
It will be [Free and Open Source Software](https://www.gnu.org/philosophy/free-sw.en.html).
# Requirements
- Functional programmable interface
- Mechanical CAD
- Basic shapes
- Basic boolean operations
- Electronic CAD
- Basic components
- Simulation
- A (more or less) standardized way of exchanging programs in form of modules/packages
- A way of deconstructing the part(s) by virtually mimicking the assembly/fabrication process to get to the starting materials
- A way of dealing with units, that doesn't feel like an afterthought
- Synthesis of constraints for the parameters
- Support for tolerances
# Reasoning
> Combining forms can use high level programs to build still higher level ones in a style not possible in conventional languages.</p>
> — <cite>[John Backus](https://doi.org/10.1145/359576.359579)</cite>
One can think of these forms as basic shapes like for example cubes or spheres and the programs as functions, which combine them and return a "higher level" shape.
This way very complex final outcomes can be generated. The ability to build a new layer of abstraction above the underlying principles and parts can make it easier to discuss them.
This is why a functional approach to building this is superior to others.
The distribution system is already a solved problem, since there are already many different build systems and methods of distributing software and code. In this case [Nix](https://nixos.org/)
seems to be a good choice because it is already functional at its core. Especially Nix flakes seem to be a good fit for this task.
The functions which describe a part can have different parameters. As described [here](https://www.youtube.com/watch?v=MhlDpMZUTrg) not all combinations of them lead to a valid result.
A system to find the constraints would eliminate a lot of guesswork.
Idiomatic support for tolerances would similarily help with this.
# Existing solutions
[Solidworks](https://www.solidworks.com/), [Freecad](https://www.freecad.org/), and others are graphical CAD packages, which offer many features and are (mostly) easier to learn than a Code-CAD package.
[OpenSCAD](https://openscad.org/) is a Code-CAD package, which means that it offers many advantages over Graphical packages like the ability to be versioned with Git. But it does not offer a
functional interface. The output is implemented as a set of commands, that show a object on screen and not as a value, that is returned from the function.
[FunCAD](http://gramlich.net/projects/funcad/introduction.html) is a work (kind of) in progress CAD package. It aims to provide a operation for every step that could be done in a workshop.
I believe this is the wrong way to do go about that because the user should be able to think abut fabrication after the shape is already done.
[ImplicitCAD](https://implicitcad.org/) is a functional Code-CAD package, which is licensed under [AGPL 3](https://github.com/Haskell-Things/ImplicitCAD/blob/master/LICENSE). This is a problem
because it restricts the users to the same license for their projects. I think more permissive license would be more suitable (at least for the basic libraries that will be imported in the
code of the part itself). The viewer/editor can be under a GPL license without any problem.

View File

@ -4,4 +4,10 @@ template = "about.html"
paginate_by = 0
+++
# What is this?
This is My Blog. I will write about things I'm interested in. Most will probably be tech/computer-related stuff.
# Credits
This website is published with [Zola](https://www.getzola.org/).
The theme was originally made by [CaiCai](https://www.caicai.me/), ported to Zola by [longfangsong](https://longfangsong.github.io/), and modified to feature the [Nord](https://www.nordtheme.com/)
color theme by me.

View File

@ -127,12 +127,12 @@ img {
.content {
height: auto;
float: right;
width: 70%;
width: 75%;
margin-top: 60px;
}
.page-top {
width: 70%;
width: 75%;
position: fixed;
right: 0;
z-index: 3;
@ -196,7 +196,7 @@ img {
}
#sidebar {
width: 30%;
width: 25%;
-webkit-background-size: cover;
background-size: cover;
background-color: #434C5E;

View File

@ -71,8 +71,8 @@
</ul>
<div class="footer">
{% block footer %}
<span>Designed by </span><a href="https://www.caicai.me">CaiCai</a>
<div class="by_zola"><a href="https://www.getzola.org/" target="_blank">Proudly published with Zola!</a></div>
<!--<span>Designed by </span><a href="https://www.caicai.me">CaiCai</a>
<div class="by_zola"><a href="https://www.getzola.org/" target="_blank">Proudly published with Zola!</a></div>-->
{% endblock footer %}
</div>
</div>