TechDraw to Master

Merged, abandoned or rejected pull requests are moved here to clear the main Pull Requests forum.
User avatar
wandererfan
Posts: 3680
Joined: Tue Nov 06, 2012 5:42 pm

Re: TechDraw to Master

Postby wandererfan » Sat Jul 02, 2016 1:17 pm

wmayer wrote:This is very critical because as soon as a new string is assigned to "outfragment" the variable "end" is invalid. And I assume that in this case "what" afterwards is not longer valid either and thus "begin" points to something invalid, too.
Makes sense. Wonder why Ubuntu & Apple work??

Please try latest version. It works here, but I wasn't getting the fails you were getting.

Thanks,
wf
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: TechDraw to Master

Postby triplus » Sat Jul 02, 2016 1:35 pm

Just to confirm TechDraw is available in the build i did today! Probably yesterday i didn't get the correct branch.

Looking good. I added some views and dimensions. Everything can be moved around. Title block text can be edited directly by clicking on it. Spreadsheet view still works! And as a bonus it has preferences page! ;) Good job and thanks to all involved over the years for making it. It's amazing it is finally here and it looks like it will meet all the expectations.

Some UX notes and first impressions:

In the sidebar when inserting 2D projections i noticed characters are used for arrows. Maybe icons could be used instead. In Python you would do something like this:

Code: Select all

iconArrowUp = QtGui.qApp.style().standardIcon(QtGui.QStyle.SP_ArrowUp)
The result can be observed in the middle button on the attached image:
TechDraw.png
TechDraw.png (21.42 KiB) Viewed 1376 times
As for the attached image i do have one observation. Green indicators for inserting title block text, view text and i guess view "drag handle" UX elements do work. But i would imagine this visual elements could become distraction once user gets over the initial learning curve. If something would be done to improve this in the future that would be nice! But this should not be priority and more user feedback is needed.
Last edited by triplus on Sat Jul 02, 2016 1:52 pm, edited 1 time in total.
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: TechDraw to Master

Postby triplus » Sat Jul 02, 2016 1:51 pm

As for the attached image i do have one observation. Green indicators for inserting title block text, view text and i guess view "drag handle" UX elements do work. But i would imagine this visual elements could become distraction once user gets over the initial learning curve. If something would be done to improve this in the future that would be nice! But this should not be priority and more user feedback is needed.
Never mind! That is what Turn View frames to on or off tool is for! :) I like the new addition as when drawing geometry isn't located on the drawing template it can still be seen on the screen. I don't know what exactly i pressed to produce this but here it is:

Code: Select all

While committing the data to the property the selection has changed.
P.S. When exporting drawing geometry to SVG it would be nice if "empty background" would be exported as transparent instead of white.
User avatar
wandererfan
Posts: 3680
Joined: Tue Nov 06, 2012 5:42 pm

Re: TechDraw to Master

Postby wandererfan » Sat Jul 02, 2016 2:24 pm

triplus wrote:Good job and thanks to all involved over the years for making it. It's amazing it is finally here and it looks like it will meet all the expectations.
Thanks for the kind words. This really had a cast of thousands!

What platform are you on? We're having some trouble on Win loading Templates.

wf
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: TechDraw to Master

Postby triplus » Sat Jul 02, 2016 2:40 pm

wandererfan wrote:What platform are you on? We're having some trouble on Win loading Templates.
I am using Ubuntu 16.04. Template loading seems to work fine here (quick tests for now). I inserted multiple drawing templates in my earlier tests but there was only one report like that i noticed in the terminal when i was finished. Therefore i am guessing it is related to a different thing.
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: TechDraw to Master

Postby triplus » Sat Jul 02, 2016 3:13 pm

When editing title block text if users isn't precise more than one dialog can be opened (for example double click will open 2). After first one is filled out and return key is pressed user will therefore be presented with another one. Clicking just return key will crash FreeCAD.
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: TechDraw to Master

Postby triplus » Sun Jul 03, 2016 9:28 am

And we should probably talk a bit about the name. That is i don't feel TechDraw is long term solution. Drawing would i guess do better.

Therefore if we plan to have both drawing workbenches in FreeCAD 0.17 i suggest we name TechDraw -> Drawing and current Drawing -> Drawing Legacy or something like that. But i guess up to and including FreeCAD 0.16 Drawing Legacy workbench and Drawing Dimensioning module is the recommended workflow. FreeCAD 0.17 and up i guess Drawing (TechDraw) is the recommended workflow.
User avatar
wandererfan
Posts: 3680
Joined: Tue Nov 06, 2012 5:42 pm

Re: TechDraw to Master

Postby wandererfan » Sun Jul 03, 2016 1:41 pm

triplus wrote:And we should probably talk a bit about the name. That is i don't feel TechDraw is long term solution. Drawing would i guess do better.
I'm not wild about the name either, but it was late, I was tired, ... :D
wmayer
Site Admin
Posts: 15500
Joined: Thu Feb 19, 2009 10:32 am

Re: TechDraw to Master

Postby wmayer » Sun Jul 03, 2016 4:06 pm

wandererfan wrote:Please try latest version. It works here, but I wasn't getting the fails you were getting.
Thanks, this fixes the crash.

I have found a few more issues:
  • When you click on one of the green fields a dialog comes up to enter arbitrary text. However, this dialog doesn't have a layout applied.
  • The drawing doesn't support unicode. When entering text with non-ASCII characters (e.g. Umlauts) then the text in the drawing is broken afterwards.
  • When you create a standard cube and add a length dimension of the diagonal (which has the length 10*sqrt(2) ~ 14.142135623730951) it displays the text 14.14210 (precision is set to 5). This means the last digit is wrong and should be 14.14213.
    When increasing the digits e.g. to 10 then the text becomes 14.1421000000
  • On systems where the decimal separator is a comma it should also display a comma
  • I got a (not yet reproducible) crash when closing a techdraw.
The crash happens here:

Code: Select all


MDIViewPage::~MDIViewPage()
{
    // Safely remove graphicview items that have built up TEMP SOLUTION
    for(auto it : deleteItems) {
        auto qObjPtr( dynamic_cast<QObject *>(it) );
        if (qObjPtr) {
            qObjPtr->deleteLater();
        } else {
            delete it;
        }
    }
    deleteItems.clear();

    delete m_view; // looks like it crashes here
}
User avatar
yorik
Site Admin
Posts: 11712
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: TechDraw to Master

Postby yorik » Sun Jul 03, 2016 8:43 pm

I have something very strange, I cannot build the TechDraw branch, although I can build master:

Code: Select all

[ 24%] Linking CXX shared library ../../../lib/libSMESH.so
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o: In function `MPI::Intracomm::Intracomm()':
SMESH_Mesh.cpp:(.text._ZN3MPI9IntracommC2Ev[_ZN3MPI9IntracommC5Ev]+0x14): undefined reference to `MPI::Comm::Comm()'
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o: In function `MPI::Intracomm::Intracomm(ompi_communicator_t*)':
SMESH_Mesh.cpp:(.text._ZN3MPI9IntracommC2EP19ompi_communicator_t[_ZN3MPI9IntracommC5EP19ompi_communicator_t]+0x19): undefined reference to `MPI::Comm::Comm()'
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o: In function `MPI::Op::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)':
SMESH_Mesh.cpp:(.text._ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb[_ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb]+0x26): undefined reference to `ompi_mpi_cxx_op_intercept'
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o:(.data.rel.ro._ZTVN3MPI3WinE[_ZTVN3MPI3WinE]+0x48): undefined reference to `MPI::Win::Free()'
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o:(.data.rel.ro._ZTVN3MPI8DatatypeE[_ZTVN3MPI8DatatypeE]+0x78): undefined reference to `MPI::Datatype::Free()'
collect2: error: ld returned 1 exit status
src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/build.make:1244: recipe for target 'lib/libSMESH.so' failed
make[2]: *** [lib/libSMESH.so] Error 1
CMakeFiles/Makefile2:535: recipe for target 'src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/all' failed
make[1]: *** [src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
I don't see any difference between master and techdraw related to smesh, or the build parameters, or anything that could cause this error in one of the branches and the other not, I tried rebasing the branch too, same result :shock: I can't figure out what can possibly be wrong. Any idea?