jmaustpc wrote:Hi Luke
I tried to compile your branch drawing
https://github.com/mrlukeparry/FreeCAD_ ... ee/drawing
Are you interested in us testing this, or is it to early for testing, or is this the appropriate branch?
Kubuntu 12.04 64bit
if it is helpful here is the error message
[ 90%] Building CXX object src/Mod/Inspection/Gui/CMakeFiles/InspectionGui.dir/Workbench.cpp.o
Linking CXX shared library ../../../../Mod/Assembly/AssemblyGui.so
[ 90%] Built target AssemblyGui
[ 90%] Generating moc_TaskTetParameter.cpp
[ 91%] ViewProviderFemMeshPy.xml
Traceback (most recent call last):
File "/home/user/Downloads/cad/mystuff/bitbucket-freecad-clone-sf-master/clone2/lukeperry/code/src/Tools/generate.py", line 96, in <module>
File "/home/user/Downloads/cad/mystuff/bitbucket-freecad-clone-sf-master/clone2/lukeperry/code/src/Tools/generate.py", line 92, in main
File "/home/user/Downloads/cad/mystuff/bitbucket-freecad-clone-sf-master/clone2/lukeperry/code/src/Tools/generate.py", line 35, in generate
GenerateModelInst = generateBase.generateModel_Module.parse(filename)
File "/home/user/Downloads/cad/mystuff/bitbucket-freecad-clone-sf-master/clone2/lukeperry/code/src/Tools/generateBase/generateModel_Module.py", line 2282, in parse
doc = minidom.parse(inFileName)
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1920, in parse
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 23, column 1
make: *** [src/Mod/Fem/Gui/ViewProviderFemMeshPy.h] Error 1
make: *** [src/Mod/Fem/Gui/CMakeFiles/FemGui.dir/all] Error 2
make: *** Waiting for unfinished jobs....
Linking CXX shared library ../../../../Mod/Inspection/InspectionGui.so
[ 91%] Built target InspectionGui
make: *** [all] Error 2
mrlukeparry wrote:Fixed that issue. Just copied over the Fem directory in master over to the drawing branch.
As far as I'm aware it's not adopted by any Mechanical CAD Package. I won't get into the discussion, but the biggest problem with using this template format is that there is no easy way to translate this into other formats such as .dxf, .dwg (Autocad / Teigha) or even our own representation if we ever needed it.
Dealing with XML is not impossible, and can be quite easy to manipulate using DOM (Document Object Model) functionality built into Qt. However, interacting with it through QGraphicsView is not great even if we have QSvg - which is apparently now obsolete. The other original idea was to parse any text fields and turn these into editable text boxes, but this alone creates further impracticalities.
The other big problem that seemed to be happening was the size and variation between templates based primarily on the paper size and the standard used (ANSI, ISO, Arch). There is nothing stopping someone creating these but in the future if these maintained it creates a lot of duplication of work.
I decided that we might as well do it RFT (right first time) rather than wait after the maiden release of the new module, which could be later in the year now.
triplus wrote:And what about custom templates? Currently it is possible to make one in for example Inskscape and individual text fields can be controlled from FreeCAD properties...
triplus wrote:If the answer is YES then i guess there will still be the possibility to do everything that is possible ATM. For example edit the drawing in Inkscape and to be able to open it in any SVG viewer...
If the answer is NO than i guess this would represent a substantial loss to me concerning FreeCAD capabilities but i will not go into this because it is in the end up to developer to choose and as i see it it was already chosen to move away from SVG as the basis for Drawing Workbench but i am still wondering about the plans to support exporting to SVG in this new Drawing Workbench when it lands in FreeCAD?
arcol wrote:Or custom graphics, eg. company's logo. The best if it is vector art, so scales fine.
Nothing fancy, but may involve some bezier lines here and there, which is pretty hard to redo it in pure python.
Or custom font, which is best to just convert to bezier curve (think of Coca-Cxxa),
it will never ever write an another string, so perfectly fine just to convert to vector art,
instead of trying to include the font inside freecad.
I do think everyone at a point *want* to include a logo.
Or even watermark, like: PREVIEW ONLY or CUSTOM SCALE or INSIDE USE ONLY or DO NOT COPY or whatever.
I try to list some usecases which may be too hard to do from scripting only.
For the same reason in freecad it is easier to model then in openscad.
yorik wrote:Also, the SVG format, even if not widely used in technical CAD (yet), is very convenient and easy, it can contain bitmap images, it has powerful representation possibilities (linestyles, pattern-filling, transparency, blurring, gradients, etc), it can be created 100% graphically, it is open and human readable, and displays natively in web browsers. It is by far the best vector 2D format available, I think. The ease of use and the flexibility of templates, for the final user of freecad, is something that would be very hard to achieve with any other system. The idea, after all, is that users create their templates, not freecad developers. And they need to be able to use an easy tool like inkscape, otherwise they won't do it.