Giter Club home page Giter Club logo

freecadsimulator's Introduction

FreeCADSimulator

A tiny Python environment for debugging FreeCAD Python macros. Include the FakeFreeCad program into your code and it simulates a subset of FreeCAD actions.

It will draw a top down 2D view of your design (sort of) but that's not the point. What it will do is make it easy to step through your program, view variables and do all the other things that you can't do in the FreeCAD macro editor.

Demo

This is the output from a very simple FreeCAD program:

from FakeFreeCad import *

### code from FreeCad starts here
### Make it into a function that can be called to make the part

def makePlate():

    plate = Part.makeBox(800,600,100)
    hole = Part.makeCylinder(200,200,Base.Vector(400,300,0))
    plate = plate.cut(hole)

    Part.show(plate)
    Gui.SendMsgToActiveView("ViewFit")
    Gui.activeDocument().activeView().viewAxometric()

### End of the FreeCad code

# Open the display

tk_display = TKDisplay(1000,600)

Display.setCanvas(tk_display)

Display.addMessageLine("Gadgetmaker 1.0 by Rob Miles")

# Call the FreeCad function to design the part

makePlate()

# Display the output

tk_display.mainloop()

I'm using it to create a case making program I'm working on. It will eventually appear on GitHub along with documentation. GadgetMaker

Have fun

Rob Miles

freecadsimulator's People

Contributors

crazyrobmiles avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.