Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CGAL::IO::read_OM() #8427

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

Conversation

afabri
Copy link
Member

@afabri afabri commented Aug 22, 2024

Summary of Changes

Add a function to read an OpenMesh file ( *.om ) in CGALlab. This file format stores also edges and vertices marked as features.
For the moment the function itself is not documented.

Release Management

@afabri afabri self-assigned this Aug 22, 2024
@afabri afabri added this to the 6.1-beta milestone Aug 22, 2024
auto sm_efeature_pmap = boost::make_assoc_property_map(sm_efeature_map);

// Try building a surface_mesh
SMesh* SM = new SMesh();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SMesh* SM = new SMesh();
SMesh* sm = new SMesh();

the name should be lower case

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started from the STL plugin.

Lab/demo/Lab/Plugins/IO/OM_io_plugin.cpp Show resolved Hide resolved
bool CGAL_Lab_om_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{
#if 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#if 0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saving a mesh in *.om format is not yet done. It would be cleaner to reply false in a can_save() method.

Comment on lines 40 to 44
/*
operator OpenMesh::EdgeHandle () const {
return OpenMesh::EdgeHandle(idx());
}
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should go to another pull request. The thing is that the edge_descriptor we wrote cannot be passed to methods like status(e).

} // namespace IO
} // namespace CGAL

#endif // CGAL_IO_OM
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing EOL

Stream_support/include/CGAL/IO/OM.h Show resolved Hide resolved
@MaelRL MaelRL added the Not yet approved The feature or pull-request has not yet been approved. label Aug 27, 2024
@janetournois janetournois added the depends on another PR This pull-request should only be merged after other ones. label Sep 5, 2024
@janetournois
Copy link
Member

In the demo, loading a .om file containing a surface mesh that has no feature vertices and no feature edges should not create a selection item.
This PR should be modified to have this behaviour

@janetournois janetournois removed the depends on another PR This pull-request should only be merged after other ones. label Sep 10, 2024
@sloriot
Copy link
Member

sloriot commented Sep 17, 2024

Cannot open include file: 'CXGAL/IO/OM.h'

@afabri
Copy link
Member Author

afabri commented Sep 20, 2024

Failed in 6.0-Ic-327 and must be tested again. Fix is committed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Not yet approved The feature or pull-request has not yet been approved. Ready to be tested Under Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants