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

Offset Meshing Plugin Improvements #7508

Merged
merged 3 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ void Polyhedron_demo_polylines_io_plugin::simplify()
{
Scene_polylines_item* item = qobject_cast<Scene_polylines_item*>(scene->item(scene->mainSelectionIndex()));
bool ok;
double err = QInputDialog::getDouble(mw, "Squared Frechet Distance", "Enter the squared approximation error:", pow(0.01*item->diagonalBbox(),2),0,999,8,&ok);
double err = QInputDialog::getDouble(mw, "Squared Frechet Distance", "Enter the squared approximation error:", pow(0.01*item->bboxDiagonal(),2),0,999,8,&ok);
if(!ok)
return;
for(Scene_polylines_item::Polylines_container::iterator
Expand Down
13 changes: 13 additions & 0 deletions Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,16 @@ if(TBB_FOUND)
target_link_libraries(c3t3_io_plugin PUBLIC CGAL::TBB_support)
target_link_libraries(c3t3_rib_exporter_plugin PUBLIC CGAL::TBB_support)
endif()

qt5_wrap_ui(offsetMeshingUI_FILES Offset_meshing_dialog.ui)
polyhedron_demo_plugin(offset_meshing_plugin Offset_meshing_plugin
${offsetMeshingUI_FILES})
target_link_libraries(offset_meshing_plugin PUBLIC scene_surface_mesh_item
scene_polygon_soup_item
scene_polylines_item)
if(TARGET CGAL::Eigen3_support)
target_link_libraries(offset_meshing_plugin PUBLIC CGAL::Eigen3_support)
endif()
if(TARGET CGAL::TBB_support)
target_link_libraries(offset_meshing_plugin PUBLIC CGAL::TBB_support)
endif()
Original file line number Diff line number Diff line change
@@ -1,64 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Remeshing_dialog</class>
<widget class="QDialog" name="Remeshing_dialog">
<class>Offset_meshing_dialog</class>
<widget class="QDialog" name="Offset_meshing_dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>376</width>
<height>216</height>
<width>413</width>
<height>294</height>
</rect>
</property>
<property name="windowTitle">
<string>Meshing criteria</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="2" colspan="2">
<item row="1" column="2" colspan="2">
<widget class="DoubleEdit" name="angle">
<property name="text">
<string>25.0</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="2">
<widget class="DoubleEdit" name="sizing">
<property name="text">
<string>0.00</string>
<item row="7" column="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="approxLabel">
<item row="4" column="1">
<widget class="QLabel" name="sizingLabel_2">
<property name="text">
<string>Approximation &amp;error:</string>
<string>Edge size</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="2" colspan="2">
<widget class="DoubleEdit" name="approx">
<item row="4" column="2" colspan="2">
<widget class="DoubleEdit" name="edge_sizing">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>0.00</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="text">
<string>&amp;Topological criterion:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<item row="6" column="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="buddy">
<cstring>tags</cstring>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</widget>
</spacer>
</item>
<item row="4" column="2" colspan="2">
<item row="5" column="2" colspan="2">
<widget class="QComboBox" name="tags">
<item>
<property name="text">
Expand All @@ -77,69 +83,75 @@
</item>
</widget>
</item>
<item row="5" column="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
<item row="5" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="text">
<string>Topological criterion</string>
</property>
</spacer>
</item>
<item row="6" column="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<property name="buddy">
<cstring>tags</cstring>
</property>
</widget>
</item>
<item row="3" column="2" colspan="2">
<widget class="DoubleEdit" name="edge_sizing">
<property name="enabled">
<bool>true</bool>
</property>
<widget class="DoubleEdit" name="approx">
<property name="text">
<string>0.00</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="sizingLabel_2">
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="approxLabel">
<property name="text">
<string>&amp;Edge size:</string>
<string>Approximation error</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="2" colspan="2">
<widget class="DoubleEdit" name="sizing">
<property name="text">
<string>0.00</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="sizingLabel">
<property name="text">
<string>&amp;Size:</string>
<string>Size</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<item row="1" column="1">
<widget class="QLabel" name="angleLabel">
<property name="text">
<string>&amp;Angle:</string>
<string>Angle</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="objectName">
<property name="font">
<font>
<pointsize>15</pointsize>
</font>
</property>
<property name="text">
<string>Meshing Criteria</string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
Expand All @@ -154,7 +166,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>Remeshing_dialog</receiver>
<receiver>Offset_meshing_dialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
Expand All @@ -170,7 +182,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Remeshing_dialog</receiver>
<receiver>Offset_meshing_dialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
Expand Down
Loading