You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.5 KiB

  1. /*
  2. * KiRouter - a push-and-(sometimes-)shove PCB router
  3. *
  4. * Copyright (C) 2019 CERN
  5. * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
  6. *
  7. * This program is free software: you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation, either version 3 of the License, or (at your
  10. * option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include "pns_arc.h"
  21. #include "pns_node.h"
  22. #include "pns_utils.h"
  23. namespace PNS {
  24. const SHAPE_LINE_CHAIN ARC::Hull( int aClearance, int aWalkaroundThickness, int aLayer ) const
  25. {
  26. return ArcHull( m_arc, aClearance, aWalkaroundThickness );
  27. }
  28. ARC* ARC::Clone() const
  29. {
  30. ARC* a = new ARC( m_arc, m_net );
  31. a->m_parent = m_parent;
  32. a->m_sourceItem = m_sourceItem;
  33. a->m_movable = m_movable;
  34. a->m_layers = m_layers;
  35. a->m_marker = m_marker;
  36. a->m_rank = m_rank;
  37. a->m_routable = m_routable;
  38. return a;
  39. }
  40. OPT_BOX2I ARC::ChangedArea( const ARC* aOther ) const
  41. {
  42. BOX2I tmp = Shape( -1 )->BBox();
  43. tmp.Merge( aOther->Shape( -1 )->BBox() );
  44. return tmp;
  45. }
  46. }