Guitar fretboard macro / guitar body

Show off your FreeCAD projects here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
ryback08
Posts: 57
Joined: Mon Jan 09, 2012 10:06 pm

Guitar fretboard macro / guitar body

Post by ryback08 »

Guitar Fretboard Maker (Macro), Python scrpit is unbelievable to make complexe form.... I love FreeCAD
Macro is link to this post.

Why do not create "macro section" on this forum ??

Image

roll on cam module


edit - news files (2012/03/18)
add shape name & close windows when macro is done
Attachments
Fretboard_v01.zip
Fretboard Maker - Macro for FreeCAD (v0.1)
(5.03 KiB) Downloaded 567 times
Last edited by ryback08 on Sun Mar 18, 2012 6:25 pm, edited 1 time in total.
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Show your FreeCAD projects here!

Post by yorik »

Excellent! It works very well, congratulations. What about putting your macro here? http://sourceforge.net/apps/mediawiki/f ... os_recipes
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Show your FreeCAD projects here!

Post by NormandC »

Awesome work, ryback! :)

Question: the script generates two shapes, the first is the fretboard, the second is a simple face some distance from the fretboard. Is that to indicate the scale length/saddle placement?
yorikvanhavre wrote:What about putting your macro here? http://sourceforge.net/apps/mediawiki/f ... os_recipes
You need wiki rights for that, which Yorik can give you. But I can do it for you if you prefer. It definitely deserves to be in the wiki, it's one of the nicest scripts so far!

Edit: I just found in my files an OM guitar body I had started last year. I used a DXF blueprint from someone named C. Grellier published on a creative commons license. I don't exactly remember how I imported it in FreeCAD. Since B-splines are not supported, I may have converted as polylines (in LibreCAD?) somehow to import in FreeCAD, then convert the polyline back to B-spline with the Draft tool. I extruded it, and I stopped there. I think I'm going to try to finish it, so I can use your script! :mrgreen:

Image
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Show your FreeCAD projects here!

Post by NormandC »

Gaaah! Booleans are murder. :evil:

I spent a significant part of my evening fighting with boolean operations to create the top and bottom radii on the guitar top. At first I created revolved solid "cupolas" and tried to cut my extrusion with them, but one would succeed and the other would fail. At last, I reversed my methodology and decided to try "common" (intersection of two shapes) instead. That worked!

Side view:
Image

Now, I have to figure out how to hollow this out... :? (the neck will be plenty of fun too!)

FYI, the blueprint for the guitar I'm trying to model, and a few others, is available here: http://www.grellier.fr/plans.php?id=1&lang=en
ryback08
Posts: 57
Joined: Mon Jan 09, 2012 10:06 pm

Re: Show your FreeCAD projects here!

Post by ryback08 »

yorikvanhavre wrote:What about putting your macro here? http://sourceforge.net/apps/mediawiki/f ... os_recipes
I'm ok. I would like to be sure that my plugin fully works before post. It is the first time i program. I did not quite understand what I was doing, especially in main.
Many thinks that i would like correct :
- It is possible to name shape (default, it is Shape, Shape001....) ??
- close windows when the plugin is done
normandc wrote:Question: the script generates two shapes, the first is the fretboard, the second is a simple face some distance from the fretboard. Is that to indicate the scale length/saddle placement?
Yes, the second shape is just the scale lenght distance (diapason). indication for place the bridge at good distance. I had this to help the construction.
Maybe it is possible to replace this in freecad by a construction line ??
normandc wrote:You need wiki rights for that, which Yorik can give you. But I can do it for you if you prefer. It definitely deserves to be in the wiki, it's one of the nicest scripts so far!
I'm ok normal, thanks

For body guitar, i use SVG import (now it is work with right dimension) (make with inkscape, very simple for Bspline)

now, how to make complex galbe similar this ??
Image

Maybe I must create a new post because my answer is out of sujet
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Show your FreeCAD projects here!

Post by yorik »

ryback08 wrote:- It is possible to name shape (default, it is Shape, Shape001....) ??
Yes, where you used Part.show(myShape), you must use this instead:

Code: Select all

obj = FreeCAD.ActiveDocument.addObject("Part::Feature","myNewName")
obj.Shape = myShape
ryback08 wrote:- close windows when the plugin is done
- inside your setupUi function, you give an internal name to your Dialog widget, so other functions can get it after:

Code: Select all

self.dialog = Dialog
- at the end of the createFretboard function, you just close it (contrary of "show()"

Code: Select all

self.dialog.hide()
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Show your FreeCAD projects here!

Post by NormandC »

ryback08 wrote:For body guitar, i use SVG import (now it is work with right dimension) (make with inkscape, very simple for Bspline)
I meant that I could not import into FreeCAD a DXF that included Bsplines. But that was 10 months ago. Are you saying Bsplines in imported SVG is supported in FreeCAD now?
ryback08 wrote:now, how to make complex galbe similar this ??
I'm interested in knowing that too, and I think this subject would benefit from a new topic, as it's going to get lost here. But to be honest, there's still much stuff missing in FreeCAD to model prismatic objects. Doing complex surfacing like that is not possible in the GUI, maybe in python but I'm not sure of that either.

Edit: reworded the 2nd part of my reply.
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Show your FreeCAD projects here!

Post by shoogen »

normandc wrote:Are you saying Bsplines in imported SVG is supported in FreeCAD now?
[/quote]SVG only supports bezier curves and these can be imported to freecad
ado
Posts: 1
Joined: Wed Jun 21, 2017 11:12 pm

Re: Guitar fretboard macro / guitar body

Post by ado »

Can anybody tell me how to use this fretborad file? thanks
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Guitar fretboard macro / guitar body

Post by NormandC »

Post Reply