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

Re: Extrude from curved surface of cylinder

Postby jmaustpc » Wed Oct 21, 2015 2:37 pm

orionstars wrote:Does this macro work if FreeCAD 0.15 is running on Mac 10.10.5?
I have only had a quick look at the macro, but I can not see why it would not. I recommend you give it a try and see. Mario is usually very helpful and would no doubt like to know if it does not work.

Jim
orionstars
Posts: 7
Joined: Tue Oct 20, 2015 6:40 pm

Re: Extrude from curved surface of cylinder

Postby orionstars » Thu Oct 22, 2015 7:35 pm

Thanks. I have been giving it a go - but with no success yet. I'm a newer FreeCad user so I'm sure it's me in the learning curve.
mario52
Posts: 2738
Joined: Wed May 16, 2012 2:13 pm

Re: Extrude from curved surface of cylinder

Postby mario52 » Fri Oct 23, 2015 6:03 pm

Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.
orionstars
Posts: 7
Joined: Tue Oct 20, 2015 6:40 pm

Re: Extrude from curved surface of cylinder

Postby orionstars » Sat Oct 24, 2015 12:31 am

Thanks for the first link Mario - thats actually how I found your macro in the beginning. I will check into the second one.

While I'm a newer FreeCAD user - I'm relatively familiar with CAD - but a complete rookie at macros. Not even in Excel or the like. So I'm certain it's in my using and not in the macro itself.

I did follow (correctly I think) the info from here :
http://www.freecadweb.org/wiki/index.ph ... _displayed.

But when I execute the macro, the input window comes up, I can enter in information (or just leave it as it popped up) and press Run or Run Comp and I end up with a blank screen and the attached text file in the Report View.

Any thoughts?
pete
Attachments
FCCircular Error - Pete.txt
Error message in Report View Window
(6.41 KiB) Downloaded 15 times
mario52
Posts: 2738
Joined: Wed May 16, 2012 2:13 pm

Re: Extrude from curved surface of cylinder

Postby mario52 » Sat Oct 24, 2015 5:56 pm

hi
it looks like he does not find the ttf font Font file not found: .../macfontdir/macfont.ttf
try with an other font to see and verify if the path is good for my display the path complete : "C:/Windows/Fonts/ARIAL.TTF"
I want to see the full path

(your error)
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
Traceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 5079, in execute
CharList = Part.makeWireString(obj.String,obj.FontFile,obj.Size,obj.Tracking)
<class 'Part.OCCError'>: Font file not found: .../macfontdir/macfont.ttf
.../macfontdir/macfont.ttf
texte [u'XII', u'XI', u'X', u'IX', u'VIII', u'VII', u'VI', u'V', u'IIII', u'III', u'II', u'I']
rayon 10.0
rotation 360
SizeCaractere 2.0
debout 0
Time : 0.00 min

PS: you can use the toolbar at the top of the window post (B, i, ..Code ......Color.....) and paste your code or errors in the balise
ex: for the color red select your text and click "Font Colour" an choice your color [ color =#FF0000] your text [ /color]
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.
orionstars
Posts: 7
Joined: Tue Oct 20, 2015 6:40 pm

Re: Extrude from curved surface of cylinder

Postby orionstars » Mon Oct 26, 2015 7:42 pm

Hey Mario,
Thanks for the error posting tip.

As for the path in the macro .../macfontdir/macfont.ttf is what I see and what does not work.

I found the path to the Arial front on my machine: /Library/Fonts/Arial.ttf

I will see about editing the path in the macro and try again.

More to follow.
pete
orionstars
Posts: 7
Joined: Tue Oct 20, 2015 6:40 pm

Re: Extrude from curved surface of cylinder

Postby orionstars » Mon Oct 26, 2015 7:58 pm

So when I choose to execute the macro - the popup window shows - I pasted the path of the new font /Library/Fonts/Arial.ttf and clicked clock - roman - axial run (then again with run comp) and seemingly end up with the same error.

I will grab it and post it in a minute.

Can I ask how to edit a macro? - Or should I be leaving this alone!??! :?:

I opened the execute macro window - choose the circular text macro from Mario - clicked edit - it opens in a FreeCAD window.

I can find the line about fonts Line 152 - sound correct?

should I change that too/instead?
mario52
Posts: 2738
Joined: Wed May 16, 2012 2:13 pm

Re: Extrude from curved surface of cylinder

Postby mario52 » Mon Oct 26, 2015 8:53 pm

hi
yes exact this line are modified for the PluginManager you modify .../macfontdir/macfont.ttf for your system and
please copy and past your path complete here i modify the code in my macro for adapt in your system

good night
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.
orionstars
Posts: 7
Joined: Tue Oct 20, 2015 6:40 pm

Re: Extrude from curved surface of cylinder

Postby orionstars » Thu Nov 05, 2015 7:38 pm

Hey Mario,
Sorry for the delay in responding - fixing our bathroom shower has eaten away any spare time I have as a stay-at-home dad.

I just started to write that I still cannot make this work. Typed out the things I tried and then thought I should try one more time. This time things went very differently! Well. Not perfect but much better.

I still do not see any output on the screen itself BUT in the Report view I now have:
/Library/Fonts/Arial.ttf
texte [u'XII', u'XI', u'X', u'IX', u'VIII', u'VII', u'VI', u'V', u'IIII', u'III', u'II', u'I']
rayon 10.0
rotation 360
SizeCaractere 3.0
debout 0
Time : 0.01 min


and in the Python console I see:

Python 2.7.9 (default, Mar 21 2015, 09:14:52)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> App.setActiveDocument("Unnamed")
>>> App.ActiveDocument=App.getDocument("Unnamed")
>>> Gui.ActiveDocument=Gui.getDocument("Unnamed")
>>> App.closeDocument("Unnamed")
>>> App.setActiveDocument("")
>>> App.ActiveDocument=None
>>> Gui.ActiveDocument=None
>>> App.setActiveDocument("Unnamed")
>>> App.ActiveDocument=App.getDocument("Unnamed")
>>> Gui.ActiveDocument=Gui.getDocument("Unnamed")
>>> Gui.getDocument("Unnamed").getObject("FcClock").Visibility=True
>>> Gui.getDocument("Unnamed").getObject("ShapeString").Visibility=True
>>> Gui.getDocument("Unnamed").getObject("ShapeString001").Visibility=True
>>> Gui.getDocument("Unnamed").getObject("ShapeString002").Visibility=True
>>> Gui.getDocument("Unnamed").getObject("ShapeString003").Visibility=True
>>> Gui.getDocument("Unnamed").getObject("ShapeString004").Visibility=True
>>> Gui.getDocument("Unnamed").getObject("ShapeString005").Visibility=True
>>> Gui.getDocument("Unnamed").getObject("ShapeString006").Visibility=True
>>> Gui.getDocument("Unnamed").getObject("ShapeString007").Visibility=True
>>> Gui.getDocument("Unnamed").getObject("ShapeString008").Visibility=True
>>> Gui.getDocument("Unnamed").getObject("ShapeString009").Visibility=True
>>> Gui.getDocument("Unnamed").getObject("ShapeString010").Visibility=True
>>> Gui.getDocument("Unnamed").getObject("ShapeString011").Visibility=True
>>>


---------------------------
SO I just tried it again (60 seconds after the above) and now I see:
Report view:

New Font /Library/Fonts/Arial.ttf
Cannot compute Inventor representation for the shape of ShapeString007.
Cannot compute Inventor representation for the shape of ShapeString007.
Cannot compute Inventor representation for the shape of ShapeString011.
Cannot compute Inventor representation for the shape of ShapeString011.
/Library/Fonts/Arial.ttf
texte FreeCAD the best
rayon 19.0
rotation 360
SizeCaractere 3.0
debout 1
Time : 0.01 min


Now I just did it again, have the same output in the report view - BUT this time I pressed "run comp" and clicked on the Shape under the "combo view" and see
Screen Shot 2015-11-05 at 1.32.42 PM.png
Screen Shot 2015-11-05 at 1.32.42 PM.png (59.07 KiB) Viewed 814 times
Note that it is missing the letters I and S (Possibly the errors in the above report view as well as a space?)

I will keep going here.
Mario - the path above is the file path for the Arial font on my iMac running 10.10.5 - it's a 27-inch Mid-2011 iMac running 2.7GHz with 4GB ram. Hope that helps.

Part of my problem was that I was pasting into the dialogue window the path to the new font location. Today when I clicked on the New Font button my computer immediately reacted and started loading it's internal file finder window - I didn't get that before - though I may not have tried this method before either.
orionstars
Posts: 7
Joined: Tue Oct 20, 2015 6:40 pm

Re: Extrude from curved surface of cylinder

Postby orionstars » Thu Nov 05, 2015 7:50 pm

Things improve -
Screen Shot 2015-11-05 at 1.46.04 PM.png
Screen Shot 2015-11-05 at 1.46.04 PM.png (26.36 KiB) Viewed 812 times
How about that?

/Library/Fonts/Arial.ttf
texte [u'XII', u'XI', u'X', u'IX', u'VIII', u'VII', u'VI', u'V', u'IIII', u'III', u'II', u'I']
rayon 10.0
rotation 360
SizeCaractere 2.0
debout 0
Time : 0.01 min

Fin FCCircularText


Here is the report window the the smaller inside set of roman numerals. The larger numerals one is essentially the same.

Thank you for your patience with me as I learned this. Part of my problem was my views. Once I also set my zoom to "Fit All" after i ran the macro (with the correct font path) everything was there.
Thanks Mario and all. I will keep at it now.
pete
cron