How to project drawings (TechDraw, Drawing, Export DXF, svg)

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

How to project drawings (TechDraw, Drawing, Export DXF, svg)

Post by Roland »

Hello Forum,

Somehow I fail to project sufficient views of my design.

Techdraw does only one view (front), it gives errors for side and top view. ("App::Document::_RecomputeFeature(): Unknown exception in Feature "View" thrown)
Same trouble with the older Drawing WB (no error reported, just Front View OK, further invisible projections)
Export as DXF only yields a front view (5000 kB), Side and Top view only 1 kB, no error message (says: "successfully exported *.dxf, NOT).
An effort to produce svg files gave errors.

The goal is to produce a drawing with dimensions, So typically a job for TechDraw.

What could be a solution?

Best regards,

Roland
Attachments
Capture.PNG
Capture.PNG (45.42 KiB) Viewed 1595 times
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: How to project drawings (TechDraw, Drawing, Export DXF, svg)

Post by vocx »

Roland wrote: Tue Aug 27, 2019 3:08 pm ...
The goal is to produce a drawing with dimensions, So typically a job for TechDraw.

What could be a solution?
...
The solution is TechDraw!

But you need to describe exactly how you are trying to produce the drawing. Just saying "it doesn't work", is not helpful.

Step by step, what did you do? Also, very important, which FreeCAD version?

Don't use the old Drawing Workbench as it is outdated, and no longer maintained.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: How to project drawings (TechDraw, Drawing, Export DXF, svg)

Post by wandererfan »

Roland wrote: Tue Aug 27, 2019 3:08 pm Techdraw does only one view (front), it gives errors for side and top view. ("App::Document::_RecomputeFeature(): Unknown exception in Feature "View" thrown)
Same trouble with the older Drawing WB (no error reported, just Front View OK, further invisible projections)
Export as DXF only yields a front view (5000 kB), Side and Top view only 1 kB, no error message (says: "successfully exported *.dxf, NOT).
The model produces errors in TechDraw, Drawing and DXF Export because all 3 rely on the same OCC routines.

Usually this kind of issue is due to a geometry problem that confuses the OCC Boolean and/or Hidden Line removal routines.

From the picture it looks like your model is build from many pieces assembled in some way. This is a particular problem for OCC since the various assembly methods produce invalid OCC shapes due to overlapping faces and edges/wires that "self-intersect" in the result.

The individual pieces are likely valid if checked with Part Module Check geometry command, but the end shape that needs to be printed or exported will likely fail.

Fixing this is on the todo list.

If you can share the model, I can try to give you more details.
chrisb
Veteran
Posts: 54309
Joined: Tue Mar 17, 2015 9:14 am

Re: How to project drawings (TechDraw, Drawing, Export DXF, svg)

Post by chrisb »

Moved to TechDraw forum.

In TechDraw you can insert multiple linked views where a side view is contained. Did you use this or did you first insert front view, then you turned the object and you inserted a side view?

To help further, wandererfan pretty sure will need the file. As I guess it is more than 1MB in size, consider to upload it to a publicly available fileserver.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

Re: How to project drawings (TechDraw, Drawing, Export DXF, svg)

Post by Roland »

Dear Vocx,

Thanks for answering.

This is my FreeCAD:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16117 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: dbb4cc6415bac848a294f03b80f65e888d531742
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

This is my computer: Processor Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, 2592 Mhz, 6 Core(s), 12 Logical Processor(s).

File size is large (the consolidated mux): 2670 KB. But hopefully not too large for FreeCAD.

Steps:
1/ Prepare mux using A2+, version V0.4.26a
2/ Place mux in separate document.
From there , I am doing the usual things for simple models.
3/ Select page template. (A4 Landscape, blank)
4/ Select page scale: 1:100
5/ Select orientation to be projected (either Front, Side, or Top).
6/ Select the model (here the mux)
7/ Select Insert View in Page.
An alternative route:

And then it gives the error that I already reported: "App::Document::_RecomputeFeature(): Unknown exception in Feature "View" thrown"

It does so for some views, but not for all. (Not for Front View, actually not for Isometric projection either). But indeed it stalls for Top View, and for Side View. Also, the computer gets extraordinarily slow for Front View and Iso View, although it runs one of the most modern processors.

Notably: after Front or ISO was projected, FreeCAD almost completely stalls. The drawing is there, but it cannot be elaborated further. At least not within a reasonable time frame. Any key hit (e.g. X position) results in at least 10 minutes of "processing". Not workable.

Is this type of job too difficult fro FreeCAD?

It worries me that also some (not all, as explained) DXF exports seems to be impossible.

Do you have a clue?

Best regards,

Roland
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

Re: How to project drawings (TechDraw, Drawing, Export DXF, svg)

Post by Roland »

@ Chrisb,

Thanks Chris,

I tried both: Insert Project Group and also Insert View in Page.

The Project Group command takes ages to respond, and if it does, it stalls on the Top and Side view.
The Insert View in Page gives the errors that I explained in detail here above.

Roland
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

Re: How to project drawings (TechDraw, Drawing, Export DXF, svg)

Post by Roland »

@Wanderfan.

Thanks Wanderfan,

Indeed this model has been assembled from numerous other assemblies. (mainly using A2+, partly also Assembly 2).
And indeed there is overlap between all those parts. It is still a draft, a concept for further elaboration and review. At this stage it is not possible to avoid the spatial overlap.

I would be grateful if you could indicate a drawing solution that could accept the temporary imperfections. If you need the file for that, I could send it to you under confidentiality. Do you have a PGP (GNUPG) public key that I could use for encryption?

Best regards,

Roland

Postscriptum:
The lazy response of my PC comes with errors in the report view: "

Code: Select all

DVP::extractFaces - View -Can't make faces from projected edges
"
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

Re: How to project drawings (TechDraw, Drawing, Export DXF, svg)

Post by Roland »

Following the thinking of Wanderfan,

(TechDraw / FreeCAD has difficulties to distinguish lines & faces that are very close to each other [my rephrasing]) I rotated the model by 0.5 degrees along Y and also 0.5 degrees along X. After that, Techdraw was able to produce the 3 views.

That took about 45 minutes. Unfortunately, the job is still very hard for TechDraw / FreeCAD. It takes a very long time and large computing resources for executing any command. (Just saving this result requires more than 30 minutes).

In my opinion this needs to be resolved for FreeCad to be suitable for a business environment.

Could you think of any other hacks & tricks to make this work for now?

Greetz

Roland
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: How to project drawings (TechDraw, Drawing, Export DXF, svg)

Post by vocx »

Roland wrote: Tue Aug 27, 2019 10:29 pm In my opinion this needs to be resolved for FreeCad to be suitable for a business environment.

Could you think of any other hacks & tricks to make this work for now?
FreeCAD works very well for many cases, but in others it becomes very slow due to the amount of calculations it needs to do to find edges that are hidden by faces or bodies. This is a known problem which is not a problem of FreeCAD itself but of the underlying OpenCASCADE Technology (OCCT) libraries. Unless the OCCT libraries improve this, TechDraw will still be slow in certain cases.
Roland wrote: Tue Aug 27, 2019 6:42 pm ...
Indeed this model has been assembled from numerous other assemblies. (mainly using A2+, partly also Assembly 2).
...
Do not mix Assembly2 and A2plus. The latter one is a fork of the former one, however, they should not be thought of as compatible. Maybe the fact that you are using both workbenches is causing you more problems, and resulting in invalid shapes that affect the processing by TechDraw. The best you could do is to re-assemble the entire thing with A2plus. Assembly2 is no longer maintained by its developer, so there is no guarantee it will keep working in the future. Meanwhile, A2plus has a healthy community around it, so it will still be around, even if Assembly3 starts rising.

I know for certain that some users have big architectural models, 10 MB to 20 MB in size, and they don't experience as much slowness as you. The key is that they use the Arch SectionPlane tool to obtain a projection. Arch SectionPlane and then TechDraw NewArch tools work slightly better for architectural (big) models, while TechDraw NewView and TechDraw NewProjGroup are mostly intended for small parts and assemblies.

The difference is that with TechDraw NewView you can dimension the objects in the TechDraw Page. With Arch SectionPlane and then TechDraw NewArch you first create the dimensions with Draft Dimension in the model itself; then the TechDraw page only displays the Arch section. See Tutorial for open windows; section 7 tells you how to use Arch SectionPlane with TechDraw NewArch.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: How to project drawings (TechDraw, Drawing, Export DXF, svg)

Post by wandererfan »

Roland wrote: Tue Aug 27, 2019 10:29 pm (TechDraw / FreeCAD has difficulties to distinguish lines & faces that are very close to each other [my rephrasing]) I rotated the model by 0.5 degrees along Y and also 0.5 degrees along X. After that, Techdraw was able to produce the 3 views.

That took about 45 minutes. Unfortunately, the job is still very hard for TechDraw / FreeCAD. It takes a very long time and large computing resources for executing any command. (Just saving this result requires more than 30 minutes).

In my opinion this needs to be resolved for FreeCad to be suitable for a business environment.

Could you think of any other hacks & tricks to make this work for now?
You've already discovered my "go-to" suggestion of changing the projection direction slightly. The creates a different set of line/face intersections that OCC sometimes handles better than the original. Usually not much faster, though.

A couple of other things you can try:
- CoarseView in the PropertyEditor under HLR Parameters. This uses a polygon approximation that is much faster that the regular algorithm at the expense of accuracy. This is a good choice for rough work.

- set Perspective under Projection to true and set the focus distance to a large number(to minimize the perspective effect). This uses a different projection algorithm which sometimes produces better results.
Post Reply