New Tool - TD View from 3D View
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- wandererfan
- Veteran
- Posts: 6309
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
New Tool - TD View from 3D View
git commit 13676bfe57 adds a new tool to TechDraw. TechDraw_ActiveView copies the active 3D view to a new TD View.
This tool is still somewhat experimental. You can not do anything with the result at present (except look at it) and the result is a "snapshot" and does not update with changes to the model.
ActiveView is very fast as no calculations are performed.
This tool is still somewhat experimental. You can not do anything with the result at present (except look at it) and the result is a "snapshot" and does not update with changes to the model.
ActiveView is very fast as no calculations are performed.
Re: New Tool - TD View from 3D View
Good!
It could be useful to print 3D views of Textures, or the last Yorik's shadows script.
It could be useful to print 3D views of Textures, or the last Yorik's shadows script.
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
Re: New Tool - TD View from 3D View
Amazing!! I like much that we are both trying to go the same way each in our own manner. This is very rich for FreeCAD.
Your implementation does everything under the hood without actually displaying a viewer, that's much better and more solid than mine...
Your implementation does everything under the hood without actually displaying a viewer, that's much better and more solid than mine...
- wandererfan
- Veteran
- Posts: 6309
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: New Tool - TD View from 3D View
If it is useful to you:
in TechDrawGui:
Code: Select all
copyActiveViewToSvgFile(document, filePath, (options))
Description: save a copy of the active view for "document" to file "filePath"
Returns: double (estimated scale) ** not correct yet
Options:
width - float - width of generated svg in mm
height - float - height of generated svg in mm
paintBackground - bool - paint/do not paint background
backgroundColor - tuple - (r,g,b,a)
lineWidth - float - weight of lines
border - float - empty space around image
mode - int - rendering mode (AS_IS, WIREFRAME, POINTS, WIREFRAME_OVERLAY, HIDDEN_LINE, BOUNDING_BOX)
Re: New Tool - TD View from 3D View
Definitely! Is it okay to you if we extend it a bit so we can provide our own list of objects/viewproviders/nodes, and maybe set the camera orientation too?
The easiest way would be to provide a list of object names, so in your function it would be just a matter of filtering out SoGroups by name, but I haven't found a way to find out which SoGroup relates to which object...
The easiest way would be to provide a list of object names, so in your function it would be just a matter of filtering out SoGroups by name, but I haven't found a way to find out which SoGroup relates to which object...
- wandererfan
- Veteran
- Posts: 6309
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: New Tool - TD View from 3D View
Something like this note to myself in the code?
Code: Select all
using namespace TechDraw;
using namespace Gui;
//notes for selection view
//SoSeparator* newSG;
//for obj in objList:
// vProv = obj.ViewObject
// sg = vProv.getSG(obj);
// for child in sg:
// newSG->addChild();
//
//creates Svg file and returns estimate of scale
double Grabber3d::copyActiveViewToSvgFile(App::Document* appDoc,
std::string fileSpec,
double outWidth, double outHeight,
bool paintBackground, const QColor& bgColor,
double lineWidth, double border,
int renderMode)
{
Re: New Tool - TD View from 3D View
In the ActiveView panel, is the render mode options working?
Because in my case, with the FreeCAD example file, the generated image is always the same (no wireframe, no points). OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18024 (Git)
Build type: Release
Branch: master
Hash: 9cc8f6eb666b0a0ae2dc256f7bc0beb8c987710c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
Because in my case, with the FreeCAD example file, the generated image is always the same (no wireframe, no points). OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18024 (Git)
Build type: Release
Branch: master
Hash: 9cc8f6eb666b0a0ae2dc256f7bc0beb8c987710c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
- wandererfan
- Veteran
- Posts: 6309
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: New Tool - TD View from 3D View
Hi People,
is this Tool really comming in the offical release 0.19 in March?
I tried to install some Developers versions 0.1917352 in 64bit but I could not found the camera - icon in TD.
I need something like this to mark single objects in a template with a position number and an explanation.
But in general, How can I get and .svg -file out of my actual view ?
At the Moment I press print on the keyboard and cut it out from the screenshot --> horrible but I have no other Idea at the moment.
This Active View tool will really help me to get documents done and to extend a technicial drawing into printable documentation of a designed System.
Thanks for Help and for your work already!
normally used
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16131 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 3129ae4296e40ed20e7b3d460b86e6969acbe1c3
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
for tests
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17352 (Git)
Build type: Release
Branch: master
Hash: ec0049921b813ee78c1fd4ea304e70904a3208f7
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
is this Tool really comming in the offical release 0.19 in March?
I tried to install some Developers versions 0.1917352 in 64bit but I could not found the camera - icon in TD.
I need something like this to mark single objects in a template with a position number and an explanation.
But in general, How can I get and .svg -file out of my actual view ?
At the Moment I press print on the keyboard and cut it out from the screenshot --> horrible but I have no other Idea at the moment.
This Active View tool will really help me to get documents done and to extend a technicial drawing into printable documentation of a designed System.
Thanks for Help and for your work already!
normally used
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16131 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 3129ae4296e40ed20e7b3d460b86e6969acbe1c3
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
for tests
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17352 (Git)
Build type: Release
Branch: master
Hash: ec0049921b813ee78c1fd4ea304e70904a3208f7
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)