Extrude from curved surface of cylinder

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
jmaustpc
Posts: 9615
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Extrude from curved surface of cylinder

Postby jmaustpc » Tue Aug 19, 2014 2:17 am

I just had a thought...this is what we do in the code to create a helix....we put a line on a surface and rap that surface around a cylinder or something like that.....
User avatar
bejant
Posts: 6050
Joined: Thu Jul 11, 2013 3:06 pm

Re: Extrude from curved surface of cylinder

Postby bejant » Tue Aug 19, 2014 2:56 am

Reported as issue #1699.
mario52
Posts: 2804
Joined: Wed May 16, 2012 2:13 pm

Re: Extrude from curved surface of cylinder

Postby mario52 » Tue Aug 19, 2014 3:44 pm

hi
slowly but surely
FreeCAD_the_best.png
FreeCAD the Best
FreeCAD_the_best.png (10.57 KiB) Viewed 1833 times
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.
tiwariaditya13
Posts: 3
Joined: Mon Aug 18, 2014 3:42 am

Re: Extrude from curved surface of cylinder

Postby tiwariaditya13 » Wed Aug 20, 2014 1:00 am

Thanks Every body ......
Special thanks to bejant for his help.

mario52 Can you share your design details how you have done it, if you have used python can you please share that.
mario52
Posts: 2804
Joined: Wed May 16, 2012 2:13 pm

Re: Extrude from curved surface of cylinder

Postby mario52 » Wed Aug 20, 2014 7:50 pm

hi
the macro Macro_FCCircularText
360 degrees
Image
180 degrees or choice
Image
I have not worked for extrude or boolean operation these procedures take an eternity with me !!
it would be nice, integrated of FreeCAD procedure is not complicated, and jim for the icon ?
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.
mario52
Posts: 2804
Joined: Wed May 16, 2012 2:13 pm

Re: Extrude from curved surface of cylinder

Postby mario52 » Sat Nov 22, 2014 1:35 pm

hi
version with GUI ( the explanation for lather)

Image

the wiki page Macro_FCCircularText

EDIT new version corrected 23/11/2014 (16h17 Paris)

Code: Select all

texte = unicode(self.textEdit.toPlainText())
App.Console.PrintMessage(u"texte         " + unicode(texte)+"\n")
EDIT new version corrected 02/02/2014 (17h30)
suppression 2 str(

EDIT 15/05/2015 20h34 Paris
replace link to github
the macro Macro_FCCircularText.FCMacro

mario
Last edited by mario52 on Fri May 15, 2015 6:49 pm, edited 3 times in total.
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.
jmh
Posts: 97
Joined: Thu Oct 30, 2014 3:04 pm
Location: East Coast USA

Re: Extrude from curved surface of cylinder

Postby jmh » Sat Nov 22, 2014 4:27 pm

@mario52 - Very nice! Thanks for the tool and work.

John
User avatar
bejant
Posts: 6050
Joined: Thu Jul 11, 2013 3:06 pm

Re: Extrude from curved surface of cylinder

Postby bejant » Sat Nov 22, 2014 11:42 pm

Thanks Mario, but when I ran the macro I got the following error message:

Code: Select all

Exception (Sat Nov 22 16:36:21 2014): type must be str or unicode, not QString 
Traceback (most recent call last):
  File "/home/myusername/.FreeCAD/Macro_FCCircularText.FCMacro", line 1131, in on_PU_Benchmarks
    ff.on_PU_Execute()
  File "/home/myusername/.FreeCAD/Macro_FCCircularText.FCMacro", line 1275, in on_PU_Execute
    ss=Draft.makeShapeString(String=texte[ii2],FontFile=PolicePath,Size=SizeCaractere,Tracking=0)
  File "/usr/lib/freecad/Mod/Draft/Draft.py", line 2311, in makeShapeString
    obj.FontFile = FontFile
Base.FreeCADError: FreeCAD exception thrown (type must be str or unicode, not QString)
User avatar
shoogen
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Extrude from curved surface of cylinder

Postby shoogen » Sat Nov 22, 2014 11:55 pm

could you try

Code: Select all

String=unicode(texte[ii2])
User avatar
bejant
Posts: 6050
Joined: Thu Jul 11, 2013 3:06 pm

Re: Extrude from curved surface of cylinder

Postby bejant » Sun Nov 23, 2014 12:19 am

Running with Line 1275 changed to:

Code: Select all

ss=Draft.makeShapeString(String=unicode(texte[ii2]),FontFile=PolicePath,Size=SizeCaractere,Tracking=0)
results in this error message:

Code: Select all

Exception (Sat Nov 22 17:14:26 2014): type must be str or unicode, not QString 
Traceback (most recent call last):
  File "/home/myusername/.FreeCAD/Macro_FCCircularText.FCMacro", line 1275, in on_PU_Execute
    ss=Draft.makeShapeString(String=unicode(texte[ii2]),FontFile=PolicePath,Size=SizeCaractere,Tracking=0)
  File "/usr/lib/freecad/Mod/Draft/Draft.py", line 2311, in makeShapeString
    obj.FontFile = FontFile
Base.FreeCADError: FreeCAD exception thrown (type must be str or unicode, not QString)