[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.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
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

Post by ian.rees »

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
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

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

Post by triplus »

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
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

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

Post by triplus »

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.
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

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

Post by wandererfan »

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
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

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

Post by triplus »

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
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

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

Post by Kunda1 »

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 ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

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

Post by triplus »

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.
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

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

Post by wandererfan »

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