parametric dimensions of sketch in TechDraw

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: parametric dimensions of sketch in TechDraw

Post by sgrogan »

wandererfan wrote:my guess would be that the OCC HLR algorithm failed. I'm running a somewhat newer version of OCC.
Works also with OCCT 7.0
bike.PNG
bike.PNG (52.3 KiB) Viewed 1547 times
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10473 (Git)
Build type: Release
Branch: master
Hash: 78b986a2657b7de79b6e350a2535dc0fbfe3f1cf
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
"fight the good fight"
sankey
Posts: 10
Joined: Sun Mar 12, 2017 1:56 am

Re: parametric dimensions of sketch in TechDraw

Post by sankey »

Indeed I compiled FreeCAD using all dependencies from the stable (jessie) repositories. That's probably a good assumption that my outdated OCCT is the culprit, and this bug is probably not worth digging into until I manage to update my OCE/OCCT version.

FWIW, I also tried upgrading liboce-* packages to the versions provided by jessie-backports:

OCE 0.16.1 == OCCT 6.7.1 (jessie)
OCE 0.17.1 == OCCT 6.8.0 (jessie-backports)

After recompiling, it still didn't work. FreeCAD now reports "OCC version: 6.8.0.oce-0.17"

It sounds to me like FreeCAD is fully compatible with OCC 7+ and there's no reason to be using OCE other than the fact that OCCT is not available in the standard repositories. It looks like (lib)opencascade was historically available in an ubuntu release:

http://packages.ubuntu.com/source/precise/opencascade

I wonder why it got dropped. No maintainer?

Now's not the time for me to start ramping up on Debian packaging, but I have "Package FreeCAD for GNU Guix" on my to-do list. Meanwhile, I'll just have to do work in an Ubuntu VM or something.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: parametric dimensions of sketch in TechDraw

Post by sgrogan »

sankey wrote: After recompiling, it still didn't work. FreeCAD now reports "OCC version: 6.8.0.oce-0.17"
I can reproduce the error with
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: Unknown
Branch: master
Hash: 45bf8ed91ed1bd65d7c5750685f8c435c9b092cf
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.9.1.oce-0.18-dev

So it seems OCCT 7.+ is required to progress.
"fight the good fight"
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: parametric dimensions of sketch in TechDraw

Post by NormandC »

sankey wrote:It looks like (lib)opencascade was historically available in an ubuntu release:

I wonder why it got dropped. No maintainer?
It was also available in Debian. Most Ubuntu packages come from Debian.

No, back then it was a licensing issue. OCC had its own custom license that wasn't considered truly free by some Linux distros. The project was also not very welcoming of patches from the community (OCC is also licensed commercially to paying customers), and its build system made it hard to compile on many platforms. This was the reasons for the OCE fork in 2011, which was licensed under the LGPL. Debian/Ubuntu switched to it around 2012.

In 2013 OCCT was re-licensed under the LGPL, and a collaborative development portal with a git repo was added before. And OCCT 7.0.0 released in early 2016 was migrated to the CMake build system.
sgrogan wrote:I can reproduce the error with
And I confirm it with

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10473 (Git)
Build type: Unknown
Branch: master
Hash: 78b986a2657b7de79b6e350a2535dc0fbfe3f1cf
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
sankey wrote:Now's not the time for me to start ramping up on Debian packaging,
Why not? Most of the work was just done for the Ubuntu PPA, the adjustments would be ridiculously simple for your purpose.
  1. Download the OCCT 7.1.0 source tarball:

    Code: Select all

    wget "http://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=89aebdea8d6f4d15cfc50e9458cd8e2e25022326;sf=tgz"
  2. Extract it
  3. Download attached debian-occt7.1.tar.gz file
  4. Extract it into the source OCCT folder
  5. Go into /debian/changelog and replace its content with

    Code: Select all

    opencascade (7.1.0-0) stable; urgency=low
    
      * Initial Release of Open Cascade Technology 7.1.0 (OCCT). 
    
     -- Your Name <your email>  Sun, 05 Mar 2017 05:00:33 -0500
    Unless it should be "jessie" instead of "stable"?
  6. cd to the source folder and run

    Code: Select all

    debuild -j2
    Where you replace the "2" digit with the number of processes you want the build to run.
Then you wait!
Attachments
debian-occt7.1.tar.gz
(51.19 KiB) Downloaded 32 times
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: parametric dimensions of sketch in TechDraw

Post by renatorivo »

Sorry if I open this old post, but in the Italian forum it was reported an SVG file that is not usable in Tech Draw.
Here is the result in Ubuntu.
svg-errore.png
svg-errore.png (112.86 KiB) Viewed 918 times
OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16093 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 690774c0effe4fd7b8d2b5e2fb2b8c8d145e21ce
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)

The original post: https://forum.freecadweb.org/viewtopic. ... a91d1b1362
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: parametric dimensions of sketch in TechDraw

Post by wandererfan »

This is the slightly more informative message OP should have received:
"Exception (Tue Mar 19 08:17:00 2019): GeometryObject::projectShape - error occurred while projecting shape"

Drawing.projectShape fails on side views also. Looks like a failure in HLR, so this is an probably an upstream issue in OCC.

This might take some time to figure out. Please make a ticket so it doesn't get forgotten.
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: parametric dimensions of sketch in TechDraw

Post by wandererfan »

renatorivo wrote: Mon Mar 18, 2019 8:57 pm Sorry if I open this old post, but in the Italian forum it was reported an SVG file that is not usable in Tech Draw.
If it is of any use to the OP, I used Path>Simplify in Inkscape and now the file works.
sample1_Simple.png
sample1_Simple.png (10.91 KiB) Viewed 849 times
Attachments
sample1_Simple.svg
(3.07 KiB) Downloaded 24 times
sample1_Simple.FCStd
(25.02 KiB) Downloaded 18 times
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: parametric dimensions of sketch in TechDraw

Post by renatorivo »

Tried, it works. Thank you.
Post Reply