Wrongly rendered cylinder on drawing page with Arch Section and Draft Shape2DView

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
simsiem
Posts: 46
Joined: Tue Feb 02, 2016 7:19 am

Wrongly rendered cylinder on drawing page with Arch Section and Draft Shape2DView

Post by simsiem »

Hi,

I have a complex architectural model. Part of it is a simple model of a cistern made up of some Part objects. Different 2D views of the model are taken with Arch Sections together with Draft Shape2DViews and finally brought onto a drawing page. It turns out that Part cylinders are wrongly drawn on the page in some cases.

Attached you find the following svg files exported from the drawing page.
  • house_drawing_error.svg: Shows the wrong rendering of the cistern. It is on the right and vertically roughly in the middle.
  • house_drawing_corrected.svg: I manually corrected the drawing to show, how it should look like.
Debugging so far:
  • The Draft shape 2D views (intermediate rendering step) look correct.
  • Creating a new Arch section, Draft shape 2D view or Drawing page does not help.
  • I was able to isolate the following effect: If a Part cylinder is not hidden, it renders correctly. But if it is partially hidden, it renders wrongly on the page.
For this third observation, I created a minimal example file: partially_hidden_cylinder_on_drawing_page.fcstd. You can move the cylinder to see when it is rendered correctly or wrongly on the drawing page.

Is this effect known? How can I proceed with debugging. I have no clue where to go on.

Best regards

Simon

---
OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10423 (Git)
Build type: None
Branch: master
Hash: 45bf8ed91ed1bd65d7c5750685f8c435c9b092cf
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Attachments
partially_hidden_cylinder_on_drawing_page.fcstd
Isolated error file
(9.58 KiB) Downloaded 52 times
house_drawing_error.svg
House model with the failure
(455.92 KiB) Downloaded 184 times
house_drawing_corrected.svg
Manually corrected house model
(453.23 KiB) Downloaded 183 times
Last edited by simsiem on Tue Mar 14, 2017 1:16 pm, edited 2 times in total.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Wrongly rendered cylinder on drawing page with Arch Section and Draft Shape2DView

Post by sgrogan »

simsiem wrote:Is this effect known? How can I proceed with debugging. I have no clue where to go on.
This sounds like an OCC HLR bug. On Ubuntu the most recent daily builds are now built with OCCT 7.1 Which may have the fix. What is your FreeCAD version?
"fight the good fight"
simsiem
Posts: 46
Joined: Tue Feb 02, 2016 7:19 am

Re: Wrongly rendered cylinder on drawing page with Arch Section and Draft Shape2DView

Post by simsiem »

Damn, I always forget to add my version summary. Now I added it to the original posting to make it complete.

Thanks, sgrogan, for the quick answer.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Wrongly rendered cylinder on drawing page with Arch Section and Draft Shape2DView

Post by yorik »

I am not sure it's the OCC HLR bug. That bug prevents objects that are pure lines (no face) to be projected. In this case the arcs are flipped/displaced but they are there... Strange, I've never seen this before. I'll investigate further when I have a minute.

You could maybe try to remove the cylinder from the objects seen by the section plane, and add it manually to the Drawing view with a standard Drawing View object, you might get better results (but I'm not sure since internally they use the same functionality).
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Wrongly rendered cylinder on drawing page with Arch Section and Draft Shape2DView

Post by yorik »

Ok it's not the HLR bug, but a bug in Draft. I'll try to fix it.

In any case, in your example, this doesn't work (that's where the bug happens):

- making a Drawing DraftView of the Shape2DView

But these two other methods work:

- making a Drawing DraftView of the Section plane
- making a Drawing View (the standard one, not Draft) of the Shape2DView
simsiem
Posts: 46
Joined: Tue Feb 02, 2016 7:19 am

Re: Wrongly rendered cylinder on drawing page with Arch Section and Draft Shape2DView

Post by simsiem »

Thanks, yorik, for analyzing.
simsiem
Posts: 46
Joined: Tue Feb 02, 2016 7:19 am

Re: Wrongly rendered cylinder on drawing page with Arch Section and Draft Shape2DView

Post by simsiem »

yorik wrote:Ok it's not the HLR bug, but a bug in Draft. I'll try to fix it.
Any news an that? Should I fill a bug report?
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Wrongly rendered cylinder on drawing page with Arch Section and Draft Shape2DView

Post by yorik »

It's actually fixed since a couple of days (git commit 5372865)... Sorry, forgot to write back here. Since OpenCasCade 7.1 doesn't have the HLR bug anymore, it is now used to draw arcs with the correct orientation. Hopefully this will get rid of the problem for good...
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Wrongly rendered cylinder on drawing page with Arch Section and Draft Shape2DView

Post by NormandC »

I confirm the Drawing view shows the cylinder correctly in the following version. But first you must force recompute the document. I use the Macro ForceRecompute.

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10611 (Git)
Build type: None
Branch: master
Hash: 44a9ecd25f27ec3efe52c9de9c95ef2b3e19dd17
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
simsiem
Posts: 46
Joined: Tue Feb 02, 2016 7:19 am

Re: Wrongly rendered cylinder on drawing page with Arch Section and Draft Shape2DView

Post by simsiem »

Thanks, yorik, I could have tested it before asking. Sorry.

I can confirm that both, the minimal example and the big model with the cistern, render correctly.

Thanks for the quick fix.

Simon


Tested with:

OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10544 (Git)
Build type: Unknown
Branch: master
Hash: 69af452bc3b2b71942c1b92cef9a147feb7d5a43
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Post Reply