Support For Stick Fonts

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Support For Stick Fonts

Post by yorik »

wandererfan wrote:A PropertyBool was my first thought, too. Is it really such a burden?
Not really a burden, more something actually unnecessary, because it should be obvious and not something the user needs to do... But the method of trying to make a face from a simple letter L seems to work well, although, would you believe, some of the sticky fonts actually MANAGE to produce a closed loop from a L :roll: fortunately the face formed from it is invalid.
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Support For Stick Fonts

Post by quick61 »

Very nice Yorik! Stick Fonts are working! No problems so far. :)

I also noticed that the ability to select an edge as a Sweep Path is once again working as well. Not sure which commit fixed this but it's a keeper!

Nice way to hit the milestone of 4000 commits. :geek:
Squares are swept along edges of shapes while CamBam Stick Fonts grace the top face.
Squares are swept along edges of shapes while CamBam Stick Fonts grace the top face.
Stick_Sweep.png (65.54 KiB) Viewed 2531 times
Mark

OS: Kubuntu 14.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4000 (Git)
Branch: master
Hash: a4f208c8ac9986d135d681a8fbe974a3321f965c
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.1 (OCE 0.17 dev.)
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Support For Stick Fonts

Post by NormandC »

Cool! But I would have expected at least a POV-Ray rendering. :P

It's crazy. For me the 5,000th commit on SVN was like yesterday. Time flies. :shock:
User avatar
Chris_G
Veteran
Posts: 2598
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Support For Stick Fonts

Post by Chris_G »

Hi Yorik,

I think there is a typo in your last commit (stricky):

Code: Select all

+ if testWire.isClosed:
+ try:
+ testFace = Part.Face(testWire)
+ except:
+ stricky = True
+ else:
+ if not testFace.isValid():
+ sticky = True
+ else:
+ sticky = True
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Support For Stick Fonts

Post by yorik »

Ah thanks for the find Chris_G :) fixed now.
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Support For Stick Fonts

Post by quick61 »

I do hate to be the bringer of bad news, (maybe bad news), but has anyone tried exporting any of the Stick fonts to DXF format?

When I try, I get the following error in Report View -

Code: Select all

processing ShapeString
Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "/home/mark/Build/FreeCAD/Mod/Draft/importDXF.py", line 1625, in export
    block = getBlock(sh,ob,lwPoly)
  File "/home/mark/Build/FreeCAD/Mod/Draft/importDXF.py", line 1456, in getBlock
    writeShape(sh,obj,block,lwPoly)	
  File "/home/mark/Build/FreeCAD/Mod/Draft/importDXF.py", line 1485, in writeShape
    dxfobject.append(dxfLibrary.PolyLine(getWire(wire,nospline,lw=False), [0.0,0.0,0.0],
  File "/home/mark/Build/FreeCAD/Mod/Draft/importDXF.py", line 1404, in getWire
    edges = DraftGeomUtils.sortEdges(wire.Edges)
  File "/home/mark/Build/FreeCAD/Mod/Draft/DraftGeomUtils.py", line 648, in sortEdges
    eset = edict[v]
<type 'exceptions.KeyError'>: ((4.720036401656606, 18.545999638964865, 0.0),)
Stack Trace: Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "/home/mark/Build/FreeCAD/Mod/Draft/importDXF.py", line 1625, in export
    block = getBlock(sh,ob,lwPoly)
  File "/home/mark/Build/FreeCAD/Mod/Draft/importDXF.py", line 1456, in getBlock
    writeShape(sh,obj,block,lwPoly)	
  File "/home/mark/Build/FreeCAD/Mod/Draft/importDXF.py", line 1485, in writeShape
    dxfobject.append(dxfLibrary.PolyLine(getWire(wire,nospline,lw=False), [0.0,0.0,0.0],
  File "/home/mark/Build/FreeCAD/Mod/Draft/importDXF.py", line 1404, in getWire
    edges = DraftGeomUtils.sortEdges(wire.Edges)
  File "/home/mark/Build/FreeCAD/Mod/Draft/DraftGeomUtils.py", line 648, in sortEdges
    eset = edict[v]
Is anyone else seeing this? Should there be a Mantas ticket filled out?

Mark

OS: Ubuntu 14.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4004 (Git)
Branch: master
Hash: 9f7956b17e3780b710f2db9b7a0003b7fa6d818d
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.1
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Support For Stick Fonts

Post by yorik »

Yes there is a problem with the new DraftGeomUtils.sortEdges()... I saw it too. I'll fix that ASAP.
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Support For Stick Fonts

Post by quick61 »

yorik wrote:Yes there is a problem with the new DraftGeomUtils.sortEdges()... I saw it too. I'll fix that ASAP.
Not trying to do anything "productive" with it today Yorik, just testing. That is the only thing I have found buggy with it so far. Export to SVG is working 100%. Moving, Cloning, Scaling, etc., all working. :)

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Support For Stick Fonts

Post by quick61 »

Getting better. :) FreeCAD is now exporting the stick fonts, but they are not quite right when opened in LibreCAD, PyCAM, or opened as DXF in FreeCAD. I'm sure your aware of this Yorik, but just in case...

0.99 Mb - StickFonts.dxf Download

Or do I have something set wrong in my Preferences? :?

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
yanghang
Posts: 11
Joined: Thu May 26, 2022 6:11 am

Re: Support For Stick Fonts

Post by yanghang »

I found a problem, single-line (stick) text will be converted twice, and the lines will overlap. I want to convert it to a cutting path, but it will still cut twice, affecting the cutting efficiency.
Attachments
Dingtalk_20230410143836.jpg
Dingtalk_20230410143836.jpg (39.65 KiB) Viewed 577 times
Post Reply