@@ -700,20 +700,20 @@ def test_arc():
700700 point_0_m5 = Point2D ([0 , - 5 ])
701701
702702 with pytest .raises (ValueError , match = "Start and end points must be different." ):
703- Arc (point_0_0 , point_0_5 , point_0_5 )
703+ Arc (point_0_5 , point_0_5 , point_0_0 )
704704
705705 with pytest .raises (ValueError , match = "Center and start points must be different." ):
706- Arc (point_0_0 , point_0_0 , point_5_0 )
706+ Arc (point_0_0 , point_5_0 , point_0_0 )
707707
708708 with pytest .raises (ValueError , match = "Center and end points must be different." ):
709- Arc (point_0_0 , point_0_5 , point_0_0 )
709+ Arc (point_0_5 , point_0_0 , point_0_0 )
710710
711711 with pytest .raises (ValueError , match = "The start and end points of the arc are not" ):
712- Arc (point_0_0 , point_0_5 , point_6_0 )
712+ Arc (point_0_5 , point_6_0 , point_0_0 )
713713
714714 # Let's create a simple arc
715- arc = Arc (point_0_0 , point_0_5 , point_5_0 )
716- arc_2 = Arc (point_0_0 , point_0_5 , point_5_0 )
715+ arc = Arc (point_0_5 , point_5_0 , point_0_0 )
716+ arc_2 = Arc (point_0_5 , point_5_0 , point_0_0 )
717717 assert arc == arc_2
718718 assert not (arc != arc_2 )
719719
@@ -734,7 +734,7 @@ def test_arc():
734734 # Validate the PyVista hack for generating the PolyData
735735 #
736736 # Needed : 180º arc, counterclockwise
737- arc_180 = Arc (point_0_0 , point_0_5 , point_0_m5 , clockwise = False )
737+ arc_180 = Arc (point_0_5 , point_0_m5 , point_0_0 , clockwise = False )
738738 pd = arc_180 .visualization_polydata
739739
740740 # Since the arc is counterclockwise, all X values should be <=0
@@ -744,7 +744,7 @@ def test_arc():
744744 # Validate the PyVista hack for generating the PolyData
745745 #
746746 # Needed : 180º arc, clockwise
747- arc_180 = Arc (point_0_0 , point_0_5 , point_0_m5 , clockwise = True )
747+ arc_180 = Arc (point_0_5 , point_0_m5 , point_0_0 , clockwise = True )
748748 pd = arc_180 .visualization_polydata
749749
750750 # Since the arc is clockwise, all X values should be >=0
@@ -792,3 +792,16 @@ def test_polydata_methods():
792792 assert len (pd ) == 2
793793 assert len (pd_edges ) == 1
794794 assert len (pd_faces ) == 1
795+
796+
797+ def test_sketch_pyconus2024_voglster_issue1195 ():
798+ """Test sketching unexpected behavior observed in PyConUS 2024 by @voglster."""
799+
800+ sketch = Sketch ()
801+ p_start , p_end , p_center = Point2D ([1 , 0 ]), Point2D ([- 1 , 0 ]), Point2D ([0 , 0 ])
802+ sketch .arc (p_start , p_end , p_center )
803+
804+ # Check that the arc is correctly defined
805+ assert sketch .edges [0 ].start == p_start
806+ assert sketch .edges [0 ].end == p_end
807+ assert sketch .edges [0 ].center == p_center
0 commit comments