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
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Extrude from curved surface of cylinder

Post by jmaustpc »

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
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Extrude from curved surface of cylinder

Post by bejant »

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

Re: Extrude from curved surface of cylinder

Post by mario52 »

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

Re: Extrude from curved surface of cylinder

Post by tiwariaditya13 »

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
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Extrude from curved surface of cylinder

Post by mario52 »

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, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Extrude from curved surface of cylinder

Post by mario52 »

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, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
jmh
Posts: 97
Joined: Thu Oct 30, 2014 3:04 pm
Location: East Coast USA

Re: Extrude from curved surface of cylinder

Post by jmh »

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

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

Re: Extrude from curved surface of cylinder

Post by bejant »

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
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Extrude from curved surface of cylinder

Post by shoogen »

could you try

Code: Select all

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

Re: Extrude from curved surface of cylinder

Post by bejant »

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)
Post Reply