Utility to inspect OpenCascade models

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
freecad-heini-1
Posts: 6373
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Utility to inspect OpenCascade models

Postby freecad-heini-1 » Sun Oct 14, 2018 9:03 am

My experiment with the Defeaturing tool:
https://peertube.mastodon.host/videos/w ... d8e6783872

A difficult one, created with Cimatron from user Polymer, in this video Polymer uses face repair tools:
phpBB [video]


Next video from user Polymer using Cimatron defeaturing tools:
phpBB [video]


easyw-fc and his defeaturing workbench:
phpBB [video]


OCC defeaturing is not as good as the tool from Cimatron and need a bit more improvement.
freecad-heini-1
Posts: 6373
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Utility to inspect OpenCascade models

Postby freecad-heini-1 » Sun Oct 14, 2018 10:09 am

Great, Analysis Situs is running on Wine hq.
Analysis_Situs_Wine_hq.gif
Analysis_Situs_Wine_hq.gif (359.49 KiB) Viewed 478 times
How to change the appearance, because it's very bright?
User avatar
Quaoar
Posts: 73
Joined: Thu Jul 27, 2017 11:56 am
Location: Nizhny Novgorod
Contact:

Re: Utility to inspect OpenCascade models

Postby Quaoar » Mon Mar 04, 2019 9:22 pm

A small update for anyone who follows:
freecad-heini-1 wrote:
Sun Oct 14, 2018 10:09 am
How to change the appearance, because it's very bright?
Available since today (ver. 0.3.0). The color can be changed from the parameter editor. Also, some more B-Rep inspection functions are not available in both GUI and console.
saso wrote:
Sat Oct 13, 2018 9:42 pm
Also, would it be possible and make sense to bring Analysis Situs directly in to FreeCAD, as a workbench or add-on for example?
This tool is too much different from FC to directly embed it. At the same time, if you find some piece of code useful, just take it away.
FOSS CAD model inspection utility and prototyping framework: http://analysissitus.org
User avatar
Quaoar
Posts: 73
Joined: Thu Jul 27, 2017 11:56 am
Location: Nizhny Novgorod
Contact:

Re: Utility to inspect OpenCascade models

Postby Quaoar » Sat Jan 18, 2020 9:47 pm

Yet another update: I have finally compiled Analysis Situs on Linux (Ubuntu18_04) and it seems to work pretty much as expected. If anybody wants to give it a try, the master branch of the Git repo is Linux-ready (though, cmake scripts might deserve some more polishing; also there is a big deal of compilation warnings).
FOSS CAD model inspection utility and prototyping framework: http://analysissitus.org
User avatar
easyw-fc
Posts: 2761
Joined: Thu Jul 09, 2015 9:34 am

Re: Utility to inspect OpenCascade models

Postby easyw-fc » Tue Jan 21, 2020 9:44 pm

Quaoar wrote:
Sat Jan 18, 2020 9:47 pm
Yet another update: I have finally compiled Analysis Situs on Linux (Ubuntu18_04) and it seems to work pretty much as expected. If anybody wants to give it a try, the master branch of the Git repo is Linux-ready (though, cmake scripts might deserve some more polishing; also there is a big deal of compilation warnings).
Hi @Quaoar
I've tried to build it on linux but I got some errors...
here my steps:

Code: Select all

cd AnalysisSitus
mkdir build
cd ~/AnalysisSitus/build
cmake ../

-- The CXX compiler identification is GNU 7.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Analysis Situs VERSION_MAJOR: 0
-- Analysis Situs VERSION_MINOR: 3
-- Analysis Situs VERSION_PATCH: 2
CMake Error at CMakeLists.txt:35 (message):
  ...  root 3rdparty directory was not found.

  Please, set 3RDPARTY_DIR variable.


-- Configuring incomplete, errors occurred!
Could you please post some tips on how and which 3RDPARTY are required to build Analysis Situs on Linux?

Thx
Maurice
User avatar
Quaoar
Posts: 73
Joined: Thu Jul 27, 2017 11:56 am
Location: Nizhny Novgorod
Contact:

Re: Utility to inspect OpenCascade models

Postby Quaoar » Wed Jan 22, 2020 12:34 pm

easyw-fc wrote:
Tue Jan 21, 2020 9:44 pm
Could you please post some tips on how and which 3RDPARTY are required to build Analysis Situs on Linux?
Thx
Maurice
I tried to gather some notes here: https://docs.google.com/document/d/1JWb ... bzZJM/edit#

Honestly, I am a newbie in linux, so the compilation process can likely be simplified or at least polished. I will be working to improve the configuration, and any criticism is very welcome,
FOSS CAD model inspection utility and prototyping framework: http://analysissitus.org
User avatar
tanderson69
Posts: 1510
Joined: Thu Feb 18, 2010 1:07 am

Re: Utility to inspect OpenCascade models

Postby tanderson69 » Wed Jan 22, 2020 4:04 pm

Quaoar wrote:
Wed Jan 22, 2020 12:34 pm
... and any criticism is very welcome,
ok :D

Normally on debian based distros, locally built packages get installed to '/usr/local/'. My build processes became much smoother, once I quit fighting this.

Dependencies that are real specific, like ActiveData, I would make git submodules and do a recursive clone on the parent repo. This will clone everything at once and make sure the different git repos are synced.

did you really need to build tcl/tk. I have never had to do that for occt?

IMHO: Have you tried meson build? In any situation that I can, I have replaced cmake with meson and been a lot happier!
User avatar
easyw-fc
Posts: 2761
Joined: Thu Jul 09, 2015 9:34 am

Re: Utility to inspect OpenCascade models

Postby easyw-fc » Wed Jan 22, 2020 10:31 pm

Quaoar wrote:
Wed Jan 22, 2020 12:34 pm
I tried to gather some notes here: https://docs.google.com/document/d/1JWb ... bzZJM/edit#
Hi @Quaoar
I'm trying to build it using cmake and the terminal... this is much handy to reproduce the building in different PCs...
(the same is suggested for FreeCAD [Single command for Python 3 and Qt5 https://www.freecadweb.org/wiki/CompileOnUnix])
here my initial attempts: (please note that I can already build FreeCAD)

Code: Select all

git clone https://gitlab.com/ssv/AnalysisSitus.git
cd AnalysisSitus
mkdir build
cd ~/AnalysisSitus/build
sudo apt install build-essential
sudo apt install qtcreator
sudo apt install qt5-default
sudo apt-get install libqt5x11extras5-dev
cd ~/AnalysisSitus/build
cmake -D 3RDPARTY_DIR=/usr/lib ../
cd ~
git clone https://gitlab.kitware.com/vtk/vtk.git
cd vtk
git checkout tags/v8.2.0
sudo apt-get install libxt-dev
cd ~/AnalysisSitus/build
cmake -D 3RDPARTY_DIR=/usr/lib ../
cmake -D 3RDPARTY_DIR=/usr/lib -D 3RDPARTY_vtk_LIBRARY_DIR=../../vtk ../
cd ~
git clone  https://gitlab.com/ssv/active-data.git
cd ~/AnalysisSitus/build
cmake -D 3RDPARTY_DIR=/usr/lib -D 3RDPARTY_vtk_LIBRARY_DIR=../../vtk ../
and the latest errors:

Code: Select all

-- Analysis Situs VERSION_MAJOR: 0
-- Analysis Situs VERSION_MINOR: 3
-- Analysis Situs VERSION_PATCH: 2
-- Processing Qt 3-rd party
-- ... Qt cmake configuration at /usr/lib/x86_64-linux-gnu/cmake/Qt5
-- ... Qt libraries: /usr/lib/x86_64-linux-gnu/cmake/Qt5
-- Processing active_data 3-rd party
-- ... Searching for active_data in /usr/lib for compiler gxx and bitness 64
-- ... Found: active_data_DIR_NAME = 
-- ... Warning: directory for active_data 3-rd party not found
-- ... Sub-dir hint for includes is empty
-- ... Hint on header is ActData.h, so let's search for its containing directory with suffix hint inc;include
-- ... Warning: include dir seems bad!
-- ... Active Data Include dirs: 
-- ... Active Data Library dirs: ../../active-data
-- ... Active Data Binary  dirs: 
CMake Error at cmake/asitus_ActiveData.cmake:18 (set):
  set given invalid arguments for CACHE mode.
Call Stack (most recent call first):
  CMakeLists.txt:42 (include)


-- ... Active Data Debug Library dirs: ../../active-data
-- ... Active Data Debug Binary  dirs: 
-- Processing Eigen 3-rd party
-- ... Searching for eigen in /usr/lib for compiler gxx and bitness 64
-- ... Found: EIGEN_DIR = 
-- ... Eigen dir: /usr/lib
-- Processing vtk 3-rd party
-- ... Searching for vtk in /usr/lib for compiler gxx and bitness 64
-- ... Found: vtk_DIR_NAME = 
-- ... Warning: directory for vtk 3-rd party not found
-- ... Sub-dir hint for includes is empty
-- ... Hint on header is vtkAlgorithm.h, so let's search for its containing directory with suffix hint inc;include
-- ... Warning: include dir seems bad!
-- ... VTK Include dir is not conventional
-- ... VTK Include dirs: /include/vtk-8.2
-- ... VTK Library dirs: ../../vtk
-- ... VTK Binary  dirs: 
CMake Error at cmake/asitus_VTK.cmake:21 (set):
  set given invalid arguments for CACHE mode.
Call Stack (most recent call first):
  CMakeLists.txt:48 (include)


-- ... VTK Debug Library dirs: ../../vtk
-- ... VTK Debug Binary  dirs: 
-- Processing OCCT 3-rd party
-- ... Searching for OCCT in /usr/lib for compiler gxx and bitness 64
-- ... Found: OCCT_DIR_NAME = 
-- ... Warning: directory for OCCT 3-rd party not found
-- ... Sub-dir hint for includes is empty
-- ... Hint on header is Standard.hxx, so let's search for its containing directory with suffix hint inc;include
-- ... Warning: include dir seems bad!
-- ... Attempting to find path by hint library "TKernel"
-- ... Hint suffix for searching of libraries is lin64/gxx/lib;lib;lib/intel64/gxx
-- ... OCCT Include dirs: 
-- ... OCCT Library dirs: 
-- ... OCCT Binary  dirs: 
CMake Error at cmake/asitus_OCCT.cmake:7 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  CMakeLists.txt:51 (include)


-- ... OCCT Debug Library dirs: 
-- ... OCCT Debug Binary  dirs: 
-- ... OCCT libraries: 
-- Processing tcl 3-rd party
-- ... Sub-dir hint for includes is empty
-- ... Hint on header is tcl.h, so let's search for its containing directory with suffix hint inc;include
-- ... Warning: include dir seems bad!
-- ... Attempting to find path by hint library "tcl86"
-- ... Hint suffix for searching of libraries is lin64/gxx/lib;lib;lib/intel64/gxx
-- Processing Inno Setup 3-rd party
-- ... Searching for innosetup in /usr/lib for compiler gxx and bitness 64
-- ... Found: INNOSETUP_DIR = 
-- ... Inno Setup dir: /usr/lib/
-- ... Unsetting 3RDPARTY_mobius_DIR
-- ... Unsetting 3RDPARTY_mobius_INCLUDE_DIR
-- ... Unsetting 3RDPARTY_mobius_LIBRARY_DIR
-- ... Unsetting 3RDPARTY_mobius_DLL_DIR
CMake Error at CMakeLists.txt:123 (message):
  NOT FOUND: 3RDPARTY_active_data_INCLUDE_DIR 3RDPARTY_OCCT_INCLUDE_DIR
  3RDPARTY_OCCT_LIBRARY_DIR 3RDPARTY_tcl_INCLUDE_DIR 3RDPARTY_tcl_LIBRARY_DIR


-- Configuring incomplete, errors occurred!
See also "/home/mau/AnalysisSitus/build/CMakeFiles/CMakeOutput.log".
would you please help me to go further?
Maurice
User avatar
Quaoar
Posts: 73
Joined: Thu Jul 27, 2017 11:56 am
Location: Nizhny Novgorod
Contact:

Re: Utility to inspect OpenCascade models

Postby Quaoar » Sat Jan 25, 2020 8:04 am

tanderson69 wrote:
Wed Jan 22, 2020 4:04 pm
Normally on debian based distros, locally built packages get installed to '/usr/local/'. My build processes became much smoother, once I quit fighting this.

Dependencies that are real specific, like ActiveData, I would make git submodules and do a recursive clone on the parent repo. This will clone everything at once and make sure the different git repos are synced.

did you really need to build tcl/tk. I have never had to do that for occt?

IMHO: Have you tried meson build? In any situation that I can, I have replaced cmake with meson and been a lot happier!
Hi tanderson69, and thanks for your comments. I will try to organize Active Data as a git submodule indeed. As for Tcl/Tk, Tk is not required but Tcl is needed because there's an embedded Tcl console which makes much sense for rapid prototyping. It's pretty much like OpenCascade's Draw console but with different commands. I have never heard about Meson, will check it :!:
FOSS CAD model inspection utility and prototyping framework: http://analysissitus.org
User avatar
Quaoar
Posts: 73
Joined: Thu Jul 27, 2017 11:56 am
Location: Nizhny Novgorod
Contact:

Re: Utility to inspect OpenCascade models

Postby Quaoar » Sat Jan 25, 2020 8:08 am

easyw-fc wrote:
Wed Jan 22, 2020 10:31 pm
... would you please help me to go further?
Maurice
Hello Maurice. Thanks for giving it a try and sorry for my crappy configuration scripts, it's too bad if you wasted much time on it. I will try to make it more conventional and smart, and your link to FreeCAD's guide is of much help.

I will check your log and come up to you soon.
FOSS CAD model inspection utility and prototyping framework: http://analysissitus.org