What's new

AlibreScript Code Assistant - Custom GPT

stepalibre

Alibre Super User
For anyone using AI to help write Alibre Script or AlibreX Python code, my Alibre Python Shell addon may be of interest to you. The Alibre Python Shell is what I use to quickly test IronPython and Alibre API code, which obviously includes AI-generated code.

References:
 

stepalibre

Alibre Super User
I noticed 5k chats counted for one of my GPTs. It's unclear how OpenAI counts conversations, unique chat sessions, or if each user is only counted once (for the first chat). Is anyone using it for AD?

1727324885658.png


edit: I removed all references to AlibreScript.
 
Last edited:

stepalibre

Alibre Super User
Gen AI is on fire!
1733246278515.png
Python:
from AlibreScript import *

def create_base_plate_with_holes(hole_count):
    # Initialize a part session
    part = CurrentPart()

    # Define dimensions for the base plate and holes
    plate_length = 100.0  # Length of the base plate
    plate_width = 50.0    # Width of the base plate
    plate_thickness = 5.0 # Thickness of the base plate
    hole_diameter = 5.0   # Diameter of the holes
    hole_offset = 10.0    # Offset of the holes from the edges

    # Create a base plate
    base_sketch = part.AddSketch('BasePlateSketch', part.XYPlane)
    base_sketch.AddRectangle(-plate_width / 2, -plate_length / 2, plate_width / 2, plate_length / 2, False)
    part.AddExtrudeBoss('BasePlate', base_sketch, plate_thickness, False, part.EndCondition.ToDepth, None, 0, part.DirectionType.Normal, None, 0, False)

    # Create holes based on hole_count
    hole_positions = []
    if hole_count == 2:
        hole_positions = [
            (-plate_width / 2 + hole_offset, 0),
            (plate_width / 2 - hole_offset, 0)
        ]
    elif hole_count == 4:
        hole_positions = [
            (-plate_width / 2 + hole_offset, -plate_length / 2 + hole_offset),
            (plate_width / 2 - hole_offset, -plate_length / 2 + hole_offset),
            (-plate_width / 2 + hole_offset, plate_length / 2 - hole_offset),
            (plate_width / 2 - hole_offset, plate_length / 2 - hole_offset)
        ]
    elif hole_count == 6:
        hole_positions = [
            (-plate_width / 2 + hole_offset, -plate_length / 2 + hole_offset),
            (plate_width / 2 - hole_offset, -plate_length / 2 + hole_offset),
            (-plate_width / 2 + hole_offset, plate_length / 2 - hole_offset),
            (plate_width / 2 - hole_offset, plate_length / 2 - hole_offset),
            (0, -plate_length / 2 + hole_offset),
            (0, plate_length / 2 - hole_offset)
        ]

    for (x, y) in hole_positions:
        hole_sketch = part.AddSketch('HoleSketch', part.XYPlane)
        hole_sketch.AddCircle(x, y, hole_diameter / 2, False)
        part.AddExtrudeCut('ThroughHole', hole_sketch, 0, False, part.EndCondition.ThroughAll, None, 0, part.DirectionType.Normal, None, 0, False)

    # Save the part
    #part.Save()

# Run the function to create a base plate with a specified number of holes
# Example usage with hardcoded sample sizes
create_base_plate_with_holes(4)  # Change to 2, 4, or 6 as needed
 

Stu3d

Senior Member
I look forward to your take on DeepSeek, just watched a Youtube video on it prgramming a couple of simple games and its thought process is amazing.
 

stepalibre

Alibre Super User
Started this weekend on macOS. I only tried powershell scripting problems. Don't care how models compare really it's more about what it's good for in my work. I have ChatGPT Pro with unlimited tokens and I've ran API programs consistently on and off and have yet to hit a limit! So I hadn't spent much time on my local projects since Pro was released, OpenAI is too good.
And yes I checked my account I didn't even reach my spending limit.

I still haven't worked out how to package a model to be included in a program or add-on without requiring LM studio and enabling the CLI or a similar process. I have a dataset for my custom software that can be included in the app but you still need your own local LLM or a API key to connect to. I want a fully embedded and low or no cost solution that provide the same abilities and results as o1 or DeepSeek. I have a few ideas.
image.png
 

stepalibre

Alibre Super User
Started this weekend on macOS. I only tried powershell scripting problems. Don't care how models compare really it's more about what it's good for in my work. I have ChatGPT Pro with unlimited tokens and I've ran API programs consistently on and off and have yet to hit a limit! So I hadn't spent much time on my local projects since Pro was released, OpenAI is too good.
And yes I checked my account I didn't even reach my spending limit.

I still haven't worked out how to package a model to be included in a program or add-on without requiring LM studio and enabling the CLI or a similar process. I have a dataset for my custom software that can be included in the app but you still need your own local LLM or a API key to connect to. I want a fully embedded and low or no cost solution that provide the same abilities and results as o1 or DeepSeek. I have a few ideas.
View attachment 43836
Ollama has it and is simple to get up and running so maybe this or something similar would need to be installed.
consistently
constantly ;)
 

stepalibre

Alibre Super User
Ollama has it and is simple to get up and running so maybe this or something similar would need to be installed.

constantly ;)
Ok, more options are available, many tradeoffs some unavoidable.
 

stepalibre

Alibre Super User
@Stu3d your post sent me down a serious DeepSeek research mission. I hadn't been following the media coverage and didn't know much about it or how BIG AI was handling the news. As I've said many times now, I care about the utility of AI in technical work so I can't really confirm if it's better than o1 Pro until I build something. It seems to perform better than Gemini advanced and Claude at multi-step problems, I think o1 pro would be hard to beat. My current process with commercial models is working great. I run long running processes and barely hit my limit. ChatGPT Pro is unlimited. I'll continue to pay for commercial AI, but for local long running data driven work DeepSeek or any model with good reasoning will be what I build with.
 
Top