Skip to content

Commit

Permalink
Big Update Apr/2024 UI and Surfaces - Preview
Browse files Browse the repository at this point in the history
  • Loading branch information
mnesarco committed Apr 29, 2024
1 parent 8b60e76 commit 8cdfde1
Show file tree
Hide file tree
Showing 103 changed files with 17,637 additions and 2,604 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
__pycache__/
notes.ipynb
.env
build/
build/
lab.ipynb
__bawr_cache__/
34 changes: 32 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
{
"cSpell.words": [
"Antialiasing",
"Autoupdate",
"BAWR",
"Bezier",
"beziers",
"bspline",
"BSplineApproxInterp",
"cleartext",
"fcdoc",
"fclog",
"fcpref",
"fcscript",
"fcui",
"freecad",
"fretboard",
"Marz"
]
"Fretwire",
"linexy",
"Luthiery",
"Marz",
"OCCT",
"Peghead",
"pivy",
"Pixmap",
"Preselection",
"qobject",
"rgetattr",
"rsetattr",
"SETIN",
"Stringset",
"tigl",
"Trussrod",
"unpolish"
],
"python.defaultInterpreterPath": "/usr/bin/python3"
}
80 changes: 16 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,71 +62,44 @@ This is a work in progress project, this is the list of the currently implemente
* Pockets/Holes


![Params](https://github.com/mnesarco/MarzWorkbench/raw/master/docs/images/parameters.png)

### Planned Features

* Nut
* 3d Object
* 3D Object

* Neck
* Custom profile editor

* Other
* Provide better options for transition curves
* Create a Neck Profile repository
* Body
* Armrest
* Belly cut
* Carved top

* Binding
* Fretboard binding
* Body binding

## Documentation

Just add objects (Instrument, Fretboard, Neck, Body, etc...) from the toolbar and change parameters. All the parameters are on the Root Instrument Object.
The Wiki contains some useful documents: [Wiki](https://github.com/mnesarco/MarzWorkbench/wiki)


![ui](https://github.com/mnesarco/MarzWorkbench/raw/master/docs/images/ui-elements.png)

The Wiki contains some useful documents: [Wiki](https://github.com/mnesarco/MarzWorkbench/wiki)

## Requirements

* FreeCAD v0.19+ ([link](https://github.com/FreeCAD/FreeCAD/releases/))

**Notes**

* This project was designed for 0.19.x, so 0.18.x support is very experimental but it works most of the time.
* The user experience in 0.19.x is significantly better.
* Windows users may experience some issues in v0.19.x
* FreeCAD v0.21+ ([releases](https://github.com/FreeCAD/FreeCAD/releases/))
* Curves Workbench 0.6.31+ (Install using AddonManager)

## Install

### Automatic Install

The recommended way to install this workbench is through the FreeCAD [Addon Manager](https://wiki.freecad.org/Std_AddonMgr).


### Manual Install

<details>
<summary>Expand for manual install instructions</summary>

Download latest version from releases: https://github.com/mnesarco/MarzWorkbench/releases

As any FreeCAD extension, download the code and copy into FreeCAD's Mod directory: https://wiki.freecadweb.org/Installing_more_workbenches

### Linux / Mac

1. Download latest version from releases: https://github.com/mnesarco/MarzWorkbench/releases
2. Unzip to: $HOME/.FreeCAD/Mod/Marz
3. Restart FreeCAD

### Windows

1. Download latest version from releases: https://github.com/mnesarco/MarzWorkbench/releases
2. Unzip to: C:\Users\\******\AppData\Roaming\FreeCAD\Mod\Marz
3. Restart FreeCAD

I do all the development and testing in Linux, I have no Windows or Mac Hardware. It should work in those environments but I have not tested it.

</details>

## Bugs

If you find problems, please report the issue here in Github. I will try to fix/respond not too late.
If you find problems, please report the issue here in Github.

## Background

Expand All @@ -136,24 +109,3 @@ and it is very practical for quick calculations and references, but it is 2D and
I decided to go to the next level and make it 3D, so I started this project and work on this in my
free time. This is a work in progress thing.

FreeCAD extensions are coded in Python, Python is not my preferred language, so maybe there are
some non pythonic patterns in my code but I did my best.

This is also my first FreeCAD extension, so it involved a lot of googling, and forum reading. FreeCAD documentation is
minimal so I have learned most of the things reading other extensions and the forum.

My Web based project was written in javascript using THREE.js library, and in order to port my existing
code quickly, I ported the THREE.js Vector2 class. (I added the credits in the file) At some point in
future I will refactor all the code to use FreeCAD's Vector class exclusively.

## Multicore multiprocessing in Python

In order to make the code more performant, I coded it to be multithreaded, but python threads runs all on the same core, so they are not suitable for CPU bound tasks, so I used QT Treads to overcome this limitation. The code itself is very clean and reusable and could be a good library for other FreeCAD extensions.

## Cache Management

Some 3D Boolean operations are very slow, so I used an aggressive cache strategy to avoid recreation of expensive objects. Thanks to Python's Decorators, it was not too difficult, but I plan to change this strategy to something more reactive based on a dependency graph.

## General note on code

I started this project porting my existing javascript code, some things still needs to be refactored properly.
Loading

0 comments on commit 8cdfde1

Please sign in to comment.