Saturday, December 3, 2022

Writing a post in Markdown in Blogger

Friday, August 12, 2022

Failing to install IfcOpenShell using homebrew in macOS

I. Background and Objective

To try my hand at BIM things, I did BIM Modelling tutorial for FreeCAD.
In that tutorial, at the point of exporting a model in IFC format, one is told to install IfcOpenShell.
I tried installing IfcOpenShell in vain.


II. Summary

The following is the situation/facts as I found it.

  1. Lack of a header file(“BRepAdaptor_HCompCurve.h”) from opencascade hinders building process of IfcOpenShell.
  2. In a discussion thread in the official IfcOpenShell, a developer recommends downgrading opencascade to 7.5.
  3. The header file seems to have existed until the version 7.5.?, but removed at least in the latest version 7.6.0.
  4. Installing opencascade 7.5.0 was not successful due to the lack of a header file “tbb/task_scheduler_init.h” from tbb.
  5. At the moment I installed tbb and tbb@2020 in homebrew, and I am not aware of how to remove the former or to give precedence to the latter.


III. Details

1. “BRepAdaptor_HCompCurve.h” missing

Installation commands are on the main page of the IfcOpenShell repository.
Dependency installation and repository cloning seemed to complete without any error.

Installation instructions
Installation commands.

But the command to build exited with errors. I checked the include directory for opencascade, which is substituted DOCC_INCLUDE_DIR in the cmake command, did really contain header files for opencascade but did not contain “BRepAdaptor_HCompCurve.h”.

“Fatal error” during make run.


2. Opencascade downgrading

In a discussion thread in the official IFcOpenShell, a developer recommends downgrading opencascade to 7.5 for now(posted Jan 13 2022).

Excerpt from the post.


3. Removal of the header file in question

The header file seems to have existed until at least the version 7.5.0.

Online documentation of opencascade 7.5.0.
Online documentation for opencascade 7.6.0.


4. Installation of opencascade 7.5.0

To install opencascade using homebrew, one needs to use brew extract command.
The following snapshot shows where I hit the stumbling block again, and the cause was the lack of a header file “tbb/task_scheduler_init.h” from tbb.

Fatal error during installation.


As far as I searched on google, few web resources mentions this problem. But official(?) issue tracker page for opencascade does list it(and it is still open).

Above mentioned problem listed in issue tracker.


5. If only I can make use of my tbb@2020 package!

My homebrew has both tbb and tbb@2020 packages, and I confirmed tbb@2020 contained task_scheduler_init.h. But I am not aware of how to remove the former or to give precedence to the latter.

Saturday, July 24, 2021

network related commands

Check IP address

To list all network devices

networksetup -listallhardwareports

Using the output of above command, one can check IP address by

ifconfig getifaddr <device name>

https://www.switchingtomac.com/tutorials/using-the-terminal-to-identify-network-settings/


telnet

https://help.dreamhost.com/hc/en-us/articles/216606088-Telnet#:~:text=To%20exit%20the%20Telnet%20session,Ctrl%20%2B%20%5D%20on%20your%20keyboard.

Unsorted

https://geekflare.com/linux-networking-commands/


 https://techtalk.gfi.com/scan-open-ports-in-windows-a-quick-guide/#:~:text=To%20view%20the%20TCP%2FUDP,address%20of%20the%20remote%20host.

netstat –ano ¦find /i “listening”




Saturday, August 1, 2020

C#

  1. To exit the environment(or console dialog), the followings will work, according to this
    You can use Environment.Exit(0); and Application.Exit.

Saturday, May 16, 2020

Regular Expression


  1. To search for unicode character sets used in certain languages, one can use \p properties, i.e. perluniprops. Such as the following to search for a part of strings composed Arabic letters and/or spaces.
    grep '[\s\p{Arabic}]*'
    https://perldoc.perl.org/perluniprops.html#Properties-accessible-through-%5cp%7b%7d-and-%5cP%7b%7d

Friday, May 8, 2020

linux commands

  1. To find which partition is mounted where, use findmnt:
    findmnt /dev/sda1
  2. To mount, use mount, to unmount use umount.
  3. To list all mount disk, "mount -l".
  4. To check file systems
    https://www.tecmint.com/find-linux-filesystem-type/
  5. To make partitions and format and mount, see
    http://www.nemotos.net/?p=3132

Monday, May 4, 2020

Wiktionary


  • Parsing raw compressed dump file. Example to extract the title of all pages().
    bzcat pages-articles.xml.bz2 | grep '<title>[^[:space:][:punct:]]*</title>' | sed 's:.*<title>\(.*\)</title>.*:\1:'
    https://stackoverflow.com/questions/3364279/has-anyone-parsed-wiktionary/9735019
  • Regular expression which include unicode characters. For instance if Arabic,
    ^[\p{Arabic}\s\p{N}]+$
    https://stackoverflow.com/questions/29729391/regular-expression-arabic-characters-and-numbers-only

Writing a post in Markdown in Blogger

Following articles are helpful. * [【令和最新版】Blogger で Markdown を用いて記事を書く方法](https://qiita.com/hoge_fu-ga/items/267ea5ad4f8c120eaeb8) * [Bl...