https://github.com/asmaloney/meshio

CloudCompare plugin for loading COLLADA, glTF, and IFC-SPF 3D models

https://github.com/asmaloney/meshio

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.6%) to scientific vocabulary

Keywords

3d-mesh cloudcompare cloudcompare-plugin collada file-format gltf ifc
Last synced: 6 months ago · JSON representation

Repository

CloudCompare plugin for loading COLLADA, glTF, and IFC-SPF 3D models

Basic Info
  • Host: GitHub
  • Owner: asmaloney
  • License: bsd-3-clause
  • Language: C++
  • Default Branch: master
  • Homepage:
  • Size: 90.8 KB
Statistics
  • Stars: 33
  • Watchers: 5
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Topics
3d-mesh cloudcompare cloudcompare-plugin collada file-format gltf ifc
Created almost 7 years ago · Last pushed over 1 year ago
Metadata Files
Readme Funding License

README.md

CloudCompare Plugin License

MeshIO

This is a plugin for CloudCompare for reading 3D model files (meshes). It uses the Open Asset Import Library (Assimp).

Currently MeshIO supports reading the following formats:

Requirements

MeshIO has two requirements that are currently different from CloudCompare itself:

  1. CMake >= 3.22
  2. C++17 compiler

Building

Unfortunately, because of the way CloudCompare is set up, you have to build all of CloudCompare before you can build a plugin for it. So the first thing to do is to get the CloudCompare source and build CloudCompare.

Once you have it building properly:

  • clone this repository into the CloudCompare/plugins/private directory:

    cd CloudCompare/plugins/private git clone --recursive https://github.com/asmaloney/MeshIO.git

  • re-run CloudCompare's cmake

  • turn on PLUGIN-3rdParty_MESH_IO in the CloudCompare cmake options

  • build CloudCompare

Note: If you are building for CloudCompare 2.11.x, use the tagged version of MeshIO at cloudcompare-2.11.x

Adding Another Format

As long as it is a format supported by Assimp, getting the basics implemented is fairly straightforward (a bunch of copy-paste).

For example, to add a new format "Foo":

  • copy and rename the header & source file of an existing importer (e.g. glTF)
  • add the header & source files to the appropriate CMakeLists.txt files
  • change the FilterInfo info in the constructor for the new format (details of the struct are found in CloudCompare's FileIOFilter.h) - the id should start with MeshIO cpp FooFilter::FooFilter() : // clang-format off mioAbstractLoader( { "MeshIO Foo Filter", FileIOFilter::DEFAULT_PRIORITY, QStringList{ "foo", "bar" }, "foo", QStringList{ "MeshIO - Foo file (*.foo *.bar)" }, QStringList(), Import } ) { }
  • add the new importer to MeshIO::getFilters() in MeshIO.cpp: cpp ccIOPluginInterface::FilterList MeshIO::getFilters() { // clang-format off return { FileIOFilter::Shared( new COLLADAFilter ), FileIOFilter::Shared( new glTFFilter ), FileIOFilter::Shared( new IFCFilter ), FileIOFilter::Shared( new FooFilter ), // <-- }; }
  • set the CMake variable in CMakeLists.txt so that Assimp builds the format: cmake set( ASSIMP_BUILD_FOO_IMPORTER TRUE CACHE INTERNAL "override ASSIMP flags" FORCE )

This should result in the basic geometry and materials being loaded.

Next Steps

You may need to massage the data a bit to make it suitable for working with in CloudCompare. For example the IFC importer cleans up some naming, and you might need to clean up object hierarchies. This can be done by overriding mioAbstractLoader::_postProcess().

Once you have it working, please consider contributing it using a pull request.

Caveat

This plugin is using another library to read these file formats. There will be problems with some files (e.g. IFC-SPF is not 100% implemented). It also means that some mesh names might be lost when importing some formats.

Because this plugin is basically translating the Assimp data into something CloudCompare understands, it can be tricky to figure out where the problem lies since it could involve any or all of the three components.

If you find files that do not work as expected, please add an issue here and attach the smallest example you have that isn't working. I will try to assess where the problem lies and either report it to the Assimp project or CloudCompare project as necessary.

Icon

The icon is by qubodup (Public Domain).

License

This project is licensed under the BSD 3-Clause license - see LICENSE file for details.

Individual source files contain the following tag instead of the full license text:

SPDX-License-Identifier: BSD-3-Clause

This enables machine processing of license information based on SPDX License Identifiers.

Owner

  • Name: Andy Maloney
  • Login: asmaloney
  • Kind: user
  • Location: Canada, Earth, Sol, Oort Cloud

Software guy & independent researcher. Writer of code & hater of pseudo-"AI".

GitHub Events

Total
  • Watch event: 3
Last Year
  • Watch event: 3

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 79
  • Total Committers: 1
  • Avg Commits per committer: 79.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 9
  • Committers: 1
  • Avg Commits per committer: 9.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Andy Maloney a****y@g****m 79

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 9
  • Total pull requests: 0
  • Average time to close issues: about 1 month
  • Average time to close pull requests: N/A
  • Total issue authors: 8
  • Total pull request authors: 0
  • Average comments per issue: 5.44
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: 3 days
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 6.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • asmaloney (2)
  • tiagodts (1)
  • Niexiaoer (1)
  • FrozenCo (1)
  • mh-9 (1)
  • EpicWink (1)
  • JeRo84 (1)
  • jfbourdon (1)
Pull Request Authors
Top Labels
Issue Labels
unconfirmed (3) question (3) bug (1) Windows (1) assimp (1) enhancement (1) Linux (1)
Pull Request Labels