1
1
from entities .common import (
2
- Align , Angle , Author , Category , Created , Deprecated , Description , Fill , GrabArea , Height , Keywords , Layer , Length ,
3
- Name , Polygon , Position , Rotation , Text , Value , Version , Vertex , Width
2
+ Align , Angle , Author , Category , Circle , Created , Deprecated , Description , Diameter , Fill , GrabArea , Height ,
3
+ Keywords , Layer , Length , Name , Polygon , Position , Rotation , Text , Value , Version , Vertex , Width
4
4
)
5
5
from entities .component import (
6
6
Clock , Component , DefaultValue , ForcedNet , Gate , Negated , Norm , PinSignalMap , Prefix , Required , Role , SchematicOnly ,
@@ -88,6 +88,7 @@ def test_symbol() -> None:
88
88
polygon .add_vertex (Vertex (Position (- 2.54 , - 25.4 ), Angle (0.0 )))
89
89
polygon .add_vertex (Vertex (Position (- 2.54 , 22.86 ), Angle (0.0 )))
90
90
symbol .add_polygon (polygon )
91
+ symbol .add_circle (Circle ('b5599e68-ff6a-464b-9a40-c6ba8ef8daf5' , Layer ('sym_outlines' ), Width (0.254 ), Fill (False ), GrabArea (False ), Diameter (1.27 ), Position (5.715 , 0.0 )))
91
92
symbol .add_text (Text ('b9c4aa19-0a46-400c-9c96-e8c3dfb8f83e' , Layer ('sym_names' ), Value ('{{NAME}}' ), Align ('center bottom' ), Height (2.54 ), Position (0.0 , 22.86 ), Rotation (0.0 )))
92
93
93
94
assert str (symbol ) == """(librepcb_symbol 01b03c10-7334-4bd5-b2bc-942c18325d2b
@@ -108,6 +109,9 @@ def test_symbol() -> None:
108
109
(vertex (position -2.54 -25.4) (angle 0.0))
109
110
(vertex (position -2.54 22.86) (angle 0.0))
110
111
)
112
+ (circle b5599e68-ff6a-464b-9a40-c6ba8ef8daf5 (layer sym_outlines)
113
+ (width 0.254) (fill false) (grab_area false) (diameter 1.27) (position 5.715 0.0)
114
+ )
111
115
(text b9c4aa19-0a46-400c-9c96-e8c3dfb8f83e (layer sym_names) (value "{{NAME}}")
112
116
(align center bottom) (height 2.54) (position 0.0 22.86) (rotation 0.0)
113
117
)
0 commit comments