3D printer repository with customizer tools

1 Like

I always felt the Customizer feature was under-promoted on Thingiverse. For that matter, promotion of OpenSCAD for designs was/is under-promoted. A number of my designs on Thingiverse use Customizer.

1 Like

Using GPT-Helper( GitHub - jas3333/GPT-Helper ) and asking it to:
Create an OpenSCAD program placing a small green cube on top of a larger red cube.

I got something pretty close, with small red cube on top of larger yellow cube. Which is pretty cool. I’ll be updating GPT-Helper to GPT3.5 and see how that works soon.

// Create a red cube
difference() {
  cube([20, 20, 20]);
  translate([0, 0, -1])
    cube([21, 21, 1]);
}

// Create a green cube
difference() {
  cube([15, 15, 15]);
  translate([0, 0, -1])
    cube([16, 16, 1]);
}

// Place the green cube on top of the red cube
translate([0, 0, 20])
  color("green")
    difference() {
      cube([15, 15, 15]);
      translate([0, 0, -1])
        cube([16, 16, 1]);
    }

GPT-Helper with Chat3-5 produces the same code. Oddly, it’s a much simpler task than what was produced:

// Create a red cube
color("red")
  cube([20, 20, 20]);

// Place the green cube on top of the red cube
translate([0, 0, 20])
  color("green")
      cube([15, 15, 15]);

Using the Code-Davinci model gets closer but only labels the module’s color for green instead of creating the cube as colored.

module small_green_cube() {
  cube(size = [1, 1, 1], center = true);
}

module large_red_cube() {
  color("red")
  cube(size = [2, 2, 2], center = true);
}

small_green_cube();
translate([0, 0, 1])
large_red_cube();
1 Like

I saw where someone was using Chat GPT to create OpenSCAD models but I had not had time to play with it and see how good it does work. Glad to see you’re having fun with it.

Ya, I installed GPT-Helper a little while ago and since it’s easily started with “npm start” and it automatically launches a chrome tab to the local server, I will pop it up every now and then just to see what it gives me for results. It uses the openAI site for results so it’s kinda like testing what GPT3 is capable of with the generic models.

I’d not had to try to do much coding except for asking it to make a basic Arduino Blink sketch. So seeing it used to OpenSCAD coding just had to be tried. :slight_smile:

1 Like

Hadnt thought about having ChatGPT write code.
Impressive:

Phrase ; write an arduino function that calls a function based on a index value

Code:
void callFunction(int index) {
switch(index) {
case 0:
functionOne();
break;
case 1:
functionTwo();
break;
case 2:
functionThree();
break;
default:
// Handle an invalid index value
break;
}
}

You would need to define the functions that can be called by callFunction() . Here’s an example of how to define three functions:

void functionOne() {
// Code for function one
}

void functionTwo() {
// Code for function two
}

void functionThree() {
// Code for function three
}

2 Likes