[SOLVED] Migrating (soon to be deprecated) Drawing WB tickets to TechDraw WB

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Migrating (soon to be deprecated) Drawing WB tickets to TechDraw WB

Postby ian.rees » Fri Feb 10, 2017 8:34 am

triplus wrote:After 3 clicks to add the views result is still far from ideal:
Quite a lot of work went in to that "far from ideal" result. A large part of that was building a good foundation so that polish (like what I think you're wanting) should be easy to implement. It would be helpful if your criticism were a little more specific and objective.

Is it safe to say that your concerns could be addressed by:

* Making the projection group (optionally?) default to auto scale, rather than 1:1.
* Some sort of preference for which views appear by default in the projection group?
triplus wrote:Imagine you would need to create 100 of such drawings.
I have, and all of the steps required are (or at least were several months ago) scriptable as wf suggested. The positions and such are all FreeCAD properties... -Ian-
triplus
Posts: 8706
Joined: Mon Dec 12, 2011 4:45 pm

Re: Migrating (soon to be deprecated) Drawing WB tickets to TechDraw WB

Postby triplus » Fri Feb 10, 2017 11:50 am

ian.rees wrote:It would be helpful if your criticism were a little more specific and objective.
It was.
I have, and all of the steps required are (or at least were several months ago) scriptable as wf suggested. The positions and such are all FreeCAD properties... -Ian-
Yes this is what i was after. If i use something like this (quick test after i inserted Cube and drawing page with one drawing view):

Code: Select all

App.activeDocument().addObject('TechDraw::DrawViewPart','View002')
App.activeDocument().View002.Source = App.activeDocument().Box
App.activeDocument().View002.Direction = (0.000000e+00,0.000000e+00,1.000000e+00)
App.activeDocument().View002.Scale = 1.000000e+00
App.activeDocument().View002.Rotation = 0.000000e+00
App.activeDocument().Page.addView(App.activeDocument().View002)
App.ActiveDocument.recompute()
Drawing view is created. And if i set X = 0 and Y = 0 it is centred at the bottom left corner of the drawing template. No special math is needed in the macro to get such results. This works for me.
triplus
Posts: 8706
Joined: Mon Dec 12, 2011 4:45 pm

Re: Migrating (soon to be deprecated) Drawing WB tickets to TechDraw WB

Postby triplus » Fri Feb 10, 2017 12:29 pm

Small inconvenience i detected. Rotating the drawing view of the Cube won't rotate the drawing view around the drawing view center. Therefore displacement is introduced and from macro point of view i guess this is not desirable.
wandererfan
Posts: 3062
Joined: Tue Nov 06, 2012 5:42 pm

Re: Migrating (soon to be deprecated) Drawing WB tickets to TechDraw WB

Postby wandererfan » Fri Feb 10, 2017 3:42 pm

triplus wrote:Small inconvenience i detected. Rotating the drawing view of the Cube won't rotate the drawing view around the drawing view center. Therefore displacement is introduced and from macro point of view i guess this is not desirable.
won't rotate (this I don't know about) or won't rotate about the correct center (this I know about)? The view rotates around the center of the frame. Have said to myself "you should fix that" a couple of times, but something else always bumps it down the list.
triplus
Posts: 8706
Joined: Mon Dec 12, 2011 4:45 pm

Re: Migrating (soon to be deprecated) Drawing WB tickets to TechDraw WB

Postby triplus » Fri Feb 10, 2017 4:18 pm

wandererfan wrote:...or won't rotate about the correct center (this I know about)? The view rotates around the center of the frame. Have said to myself "you should fix that" a couple of times, but something else always bumps it down the list.
This one. As after it would be really easy to create macros for inserting all sorts of drawing views and to get predictable results without involving any math. Basically everything issue #0000956 was about (and more).

P.S. Ideally just the drawing geometry should rotate around its center without involving the "View Frame"?
User avatar
Kunda1
Posts: 5759
Joined: Thu Jan 05, 2017 9:03 pm

Re: Migrating (soon to be deprecated) Drawing WB tickets to TechDraw WB

Postby Kunda1 » Tue Feb 21, 2017 4:16 pm

Continuing with the list:
issue #1679 Add an action to set orthographic projections as hints for a drawing page
Is this something that will be done for Drawing WB ?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
triplus
Posts: 8706
Joined: Mon Dec 12, 2011 4:45 pm

Re: Migrating (soon to be deprecated) Drawing WB tickets to TechDraw WB

Postby triplus » Tue Feb 21, 2017 11:45 pm

wandererfan wrote:1880 - Show/hide drawing template structure
Did some tests with splines:

https://forum.freecadweb.org/viewtopic. ... 95#p161295

And decided to test this new feature in TechDraw. Works good and when exporting to SVG the drawing template View related setting is respected. All in all nice and useful addition.

Thanks for implementing it.
wandererfan
Posts: 3062
Joined: Tue Nov 06, 2012 5:42 pm

Re: Migrating (soon to be deprecated) Drawing WB tickets to TechDraw WB

Postby wandererfan » Wed Feb 22, 2017 8:57 pm

triplus wrote:Thanks for implementing it.
You're welcome!