13 Via(
const Point_2&, uint z1, uint z2, Real r);
14 const Point_2& location()
const {
return mPoint; }
15 uint zmin()
const {
return mLayer[0]; }
16 uint zmax()
const {
return mLayer[1]; }
17 uint z(uint i)
const {
return mLayer[i]; }
18 uint height()
const {
return zmax() - zmin() + 1; }
19 Real diameter()
const {
return mRadius * 2.0; }
20 Real radius()
const {
return mRadius; }
21 Real squared_radius()
const {
return mRadius * mRadius; }
23 bool overlaps(
const Via&, Real clearance,
Point_25 * = 0)
const;
24 bool contains(
const Point_25&)
const;
26 Circle_2 getCircle()
const {
return Circle_2(mPoint, mRadius * mRadius); }
27 bool onLayer(uint z)
const {
return mLayer[0] <= z && z <= mLayer[1]; }
33 void extendTo(uint z);
34 void merge(
const Via&);
35 uint cutLayers(uint zmin, uint zmax);
36 void setRange(uint zmin, uint zmax);
37 static Via fromPy(PyObject *);
38 std::string str()
const;
39 PyObject *getPy()
const;
40 PyObject *getShortPy()
const;
46inline Via::Via(
const Point_2 &v, uint z1, uint z2, Real r) : mPoint(v), mRadius(r)
49 throw std::invalid_argument(
"via of 0 height");
50 mLayer[0] = std::min(z1, z2);
51 mLayer[1] = std::max(z1, z2);
55 if (z != zmin() && z != zmax())
56 throw std::runtime_error(
"the other end of this via from the specified point is not clearly defined");
57 return z == zmin() ? zmax() : zmin();
64inline void Via::extendTo(uint z)
66 mLayer[0] = std::min(mLayer[0], z);
67 mLayer[1] = std::max(mLayer[1], z);
69inline void Via::setRange(uint zmin, uint zmax)
Definition Geometry.hpp:131
uint otherEnd(uint z) const
FIXME: We need to distinguish between the vertical path of a track and the via itself,...
Definition Via.hpp:53
Definition AShape.hpp:332