mirror of https://github.com/CGAL/cgal
Added samples that show the mismatch between input and result
This commit is contained in:
parent
98fe0b9439
commit
95abf99c8b
|
|
@ -882,6 +882,8 @@ Boolean_set_operations_2/demo/Boolean_set_operations_2_GraphicsView/data/bulldog
|
|||
Boolean_set_operations_2/demo/Boolean_set_operations_2_GraphicsView/data/bulldog_2.bps -text
|
||||
Boolean_set_operations_2/demo/Boolean_set_operations_2_GraphicsView/data/char_g.bps -text
|
||||
Boolean_set_operations_2/demo/Boolean_set_operations_2_GraphicsView/data/char_m.bps -text
|
||||
Boolean_set_operations_2/demo/Boolean_set_operations_2_GraphicsView/data/custom_1.bps -text
|
||||
Boolean_set_operations_2/demo/Boolean_set_operations_2_GraphicsView/data/custom_2.bps -text
|
||||
Boolean_set_operations_2/demo/Boolean_set_operations_2_GraphicsView/data/flag.bps -text
|
||||
Boolean_set_operations_2/demo/Boolean_set_operations_2_GraphicsView/data/logo.bps -text
|
||||
Boolean_set_operations_2/demo/Boolean_set_operations_2_GraphicsView/data/spoun.bps -text
|
||||
|
|
|
|||
|
|
@ -465,7 +465,9 @@ public slots:
|
|||
void on_actionOpenLinear_triggered() ;
|
||||
void on_actionOpenDXF_triggered() ;
|
||||
void on_actionOpenBezier_triggered() ;
|
||||
void on_actionSave_triggered() ;
|
||||
void on_actionSaveRed_triggered() ;
|
||||
void on_actionSaveBlue_triggered() ;
|
||||
void on_actionSaveResult_triggered() ;
|
||||
void on_actionIntersection_triggered() ;
|
||||
void on_actionUnion_triggered() ;
|
||||
void on_actionBlueMinusRed_triggered() ;
|
||||
|
|
@ -999,27 +1001,79 @@ void MainWindow::on_actionOpenBezier_triggered()
|
|||
open(QFileDialog::getOpenFileName(this, tr("Open Bezier Polygon"), "../data", tr("Bezier Curve files (*.bps)") ));
|
||||
}
|
||||
|
||||
void MainWindow::on_actionSave_triggered()
|
||||
void MainWindow::on_actionSaveRed_triggered()
|
||||
{
|
||||
if ( mCircular_active )
|
||||
{
|
||||
if ( !save_circular(QFileDialog::getSaveFileName(this, tr("Save Acive Circular Polygon Set"), "../data", tr("Linear Curve files (*.lps)") )
|
||||
,active_set().circular()
|
||||
if ( !save_circular(QFileDialog::getSaveFileName(this, tr("Save 'P' Circular Polygon Set"), "../data", tr("Linear Curve files (*.lps)") )
|
||||
,red_set().circular()
|
||||
)
|
||||
)
|
||||
{
|
||||
show_error("Caanoit save circular polygon set.");
|
||||
show_error("Cannot save circular polygon set.");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !save_bezier(QFileDialog::getSaveFileName(this, tr("Save Acive Bezier Polygon Set"), "../data", tr("Bezier Curve files (*.bps)") )
|
||||
if ( !save_bezier(QFileDialog::getSaveFileName(this, tr("Save 'P' Bezier Polygon Set"), "../data", tr("Bezier Curve files (*.bps)") )
|
||||
,active_set().bezier()
|
||||
)
|
||||
)
|
||||
{
|
||||
show_error("Caanoit save bezier polygon set.");
|
||||
show_error("Cannot save bezier polygon set.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::on_actionSaveBlue_triggered()
|
||||
{
|
||||
if ( mCircular_active )
|
||||
{
|
||||
if ( !save_circular(QFileDialog::getSaveFileName(this, tr("Save 'Q' Circular Polygon Set"), "../data", tr("Linear Curve files (*.lps)") )
|
||||
,active_set().circular()
|
||||
)
|
||||
)
|
||||
{
|
||||
show_error("Cannot save circular polygon set.");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !save_bezier(QFileDialog::getSaveFileName(this, tr("Save 'Q' Bezier Polygon Set"), "../data", tr("Bezier Curve files (*.bps)") )
|
||||
,active_set().bezier()
|
||||
)
|
||||
)
|
||||
{
|
||||
show_error("Cannot save bezier polygon set.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::on_actionSaveResult_triggered()
|
||||
{
|
||||
if ( mCircular_active )
|
||||
{
|
||||
if ( !save_circular(QFileDialog::getSaveFileName(this, tr("Save Result Circular Polygon Set"), "../data", tr("Linear Curve files (*.lps)") )
|
||||
,result_set().circular()
|
||||
)
|
||||
)
|
||||
{
|
||||
show_error("Cannot save circular polygon set.");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !save_bezier(QFileDialog::getSaveFileName(this, tr("Save Result Bezier Polygon Set"), "../data", tr("Bezier Curve files (*.bps)") )
|
||||
,result_set().bezier()
|
||||
)
|
||||
)
|
||||
{
|
||||
show_error("Cannot save bezier polygon set.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,9 @@
|
|||
<addaction name="actionOpenDXF" />
|
||||
<addaction name="actionOpenBezier" />
|
||||
<addaction name="separator" />
|
||||
<addaction name="actionSave" />
|
||||
<addaction name="actionSaveRed" />
|
||||
<addaction name="actionSaveBlue" />
|
||||
<addaction name="actionSaveResult" />
|
||||
<addaction name="separator" />
|
||||
<addaction name="actionQuit" />
|
||||
</widget>
|
||||
|
|
@ -215,9 +217,21 @@
|
|||
</property>
|
||||
</action>
|
||||
|
||||
<action name="actionSave" >
|
||||
<action name="actionSaveRed" >
|
||||
<property name="text" >
|
||||
<string>&Save Currently Active Set</string>
|
||||
<string>&Save 'P' Set</string>
|
||||
</property>
|
||||
</action>
|
||||
|
||||
<action name="actionSaveBlue" >
|
||||
<property name="text" >
|
||||
<string>&Save 'Q' Set</string>
|
||||
</property>
|
||||
</action>
|
||||
|
||||
<action name="actionSaveResult" >
|
||||
<property name="text" >
|
||||
<string>&Save Result Set</string>
|
||||
</property>
|
||||
</action>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
DOUBLE
|
||||
1
|
||||
1
|
||||
5
|
||||
4
|
||||
0 15
|
||||
0 5
|
||||
5 0
|
||||
15 0
|
||||
4
|
||||
15 0
|
||||
25 0
|
||||
30 5
|
||||
30 15
|
||||
4
|
||||
30 15
|
||||
30 50
|
||||
20 50
|
||||
20 10
|
||||
4
|
||||
20 10
|
||||
20 5
|
||||
10 5
|
||||
10 10
|
||||
4
|
||||
10 10
|
||||
10 50
|
||||
0 50
|
||||
0 15
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
DOUBLE
|
||||
1
|
||||
1
|
||||
5
|
||||
4
|
||||
0 35
|
||||
0 45
|
||||
5 50
|
||||
15 50
|
||||
4
|
||||
15 50
|
||||
25 50
|
||||
30 45
|
||||
30 35
|
||||
4
|
||||
30 35
|
||||
30 0
|
||||
20 0
|
||||
20 40
|
||||
4
|
||||
20 40
|
||||
20 45
|
||||
10 45
|
||||
10 40
|
||||
4
|
||||
10 40
|
||||
10 0
|
||||
0 0
|
||||
0 35
|
||||
|
|
@ -343,6 +343,7 @@ struct Draw_bezier_X_monotone_curve
|
|||
}
|
||||
} ;
|
||||
|
||||
|
||||
template<class Bezier_boundary_pieces>
|
||||
class Bezier_boundary_pieces_graphics_item : public Boundary_pieces_graphics_item<Bezier_boundary_pieces,Draw_bezier_curve,Bezier_bbox>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue