|
KiCad PCB EDA Suite
|
#include <eda_angle.h>
Public Member Functions | |
| EDA_ANGLE (double aValue, EDA_ANGLE_T aAngleType) | |
| Angles can be created in degrees, 1/10ths of a degree, or radians, and read as any of the angle types. | |
| constexpr | EDA_ANGLE (double aAngleInDegrees) |
| Construct an EDA_ANGLE in degrees. | |
| EDA_ANGLE (const VECTOR2D &aVector) | |
| EDA_ANGLE () | |
| double | AsDegrees () const |
| int | AsTenthsOfADegree () const |
| double | AsRadians () const |
| bool | IsCardinal () const |
| bool | IsCardinal90 () const |
| bool | IsZero () const |
| bool | IsHorizontal () const |
| bool | IsVertical () const |
| bool | IsParallelTo (EDA_ANGLE aAngle) const |
| EDA_ANGLE | Invert () const |
| double | Sin () const |
| double | Cos () const |
| double | Tan () const |
| EDA_ANGLE | Normalize () |
| EDA_ANGLE | Normalized () const |
| EDA_ANGLE | NormalizeNegative () |
| EDA_ANGLE | Normalize90 () |
| EDA_ANGLE | Normalize180 () |
| EDA_ANGLE | Normalize720 () |
| EDA_ANGLE | Snapped (const EDA_ANGLE &aStep) const |
Snap to the nearest integer multiple of aStep (returns *this if aStep <= 0). | |
| EDA_ANGLE | KeepUpright () const |
| EDA_ANGLE | Round (int digits) const |
| EDA_ANGLE & | operator+= (const EDA_ANGLE &aAngle) |
| EDA_ANGLE & | operator-= (const EDA_ANGLE &aAngle) |
Static Public Member Functions | |
| static EDA_ANGLE | Arccos (double x) |
| static EDA_ANGLE | Arcsin (double x) |
| static EDA_ANGLE | Arctan (double x) |
| static EDA_ANGLE | Arctan2 (double y, double x) |
Static Public Attributes | |
| static constexpr double | DEGREES_TO_RADIANS = M_PI / 180.0 |
Static Private Member Functions | |
| static double | foldToTwoPeriods (double aValue, double aPeriod) |
| Exactly remove whole periods from values beyond two periods, keeping the sign, so the normalization loops run at most twice. | |
Private Attributes | |
| double | m_value |
| value in degrees | |
Definition at line 35 of file eda_angle.h.
|
inline |
Angles can be created in degrees, 1/10ths of a degree, or radians, and read as any of the angle types.
Angle type must be explicitly specified at creation, because there is no other way of knowing what an int or a double represents.
Definition at line 45 of file eda_angle.h.
References DEGREES_TO_RADIANS, m_value, RADIANS_T, and TENTHS_OF_A_DEGREE_T.
Referenced by Arccos(), Arcsin(), Arctan(), Arctan2(), Cos(), Invert(), IsParallelTo(), KeepUpright(), Normalize(), Normalize180(), Normalize720(), Normalize90(), Normalized(), NormalizeNegative(), operator+=(), operator-=(), Round(), Sin(), and Snapped().
|
inlineexplicitconstexpr |
Construct an EDA_ANGLE in degrees.
This is really only for the statically-defined global angles. All other code should use EDA_ANGLE( xxx, DEGREES_T ).
| aAngleInDegrees |
Definition at line 67 of file eda_angle.h.
References m_value.
|
inlineexplicit |
Definition at line 71 of file eda_angle.h.
References EDA_ANGLE(), m_value, RADIANS_T, VECTOR2< T >::x, and VECTOR2< T >::y.
|
inline |
Definition at line 111 of file eda_angle.h.
References m_value.
Referenced by Arccos(), Arcsin(), Arctan(), Arctan2(), EDA_ANGLE(), Invert(), IsParallelTo(), KeepUpright(), operator+=(), operator-=(), Round(), and Snapped().
|
inlinestatic |
Definition at line 217 of file eda_angle.h.
References EDA_ANGLE(), EDA_ANGLE(), and RADIANS_T.
Referenced by DRC_TEST_PROVIDER_TRACK_ANGLE::Run().
|
inlinestatic |
Definition at line 219 of file eda_angle.h.
References EDA_ANGLE(), EDA_ANGLE(), and RADIANS_T.
|
inlinestatic |
Definition at line 221 of file eda_angle.h.
References EDA_ANGLE(), EDA_ANGLE(), and RADIANS_T.
|
inlinestatic |
Definition at line 223 of file eda_angle.h.
References EDA_ANGLE(), EDA_ANGLE(), and RADIANS_T.
|
inline |
Definition at line 115 of file eda_angle.h.
References m_value.
Referenced by std::abs(), DXF_IMPORT_PLUGIN::addEllipse(), PCB_IO_IPC2581::addPackage(), PCB_IO_IPC2581::addPad(), PCB_IO_IPC2581::addSlotCavity(), BOARD_CONSTRAINT_ADAPTER::ApplyReferenceValues(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), approximateLineChainWithArcs(), DXF_PLOTTER::Arc(), GERBER_PLOTTER::Arc(), PNG_PLOTTER::Arc(), PS_PLOTTER::Arc(), PNS::ArcHull(), arcParameter(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), boost_test_print_type(), BuildConstraintFromItems(), checkAngleClose(), checkAngleInRange(), CheckArcGeom(), Collide(), PCB_BARCODE::computeCacheKey(), ALTIUM_PCB::ConvertArcs6ToBoardItemOnLayer(), ConvertArcToPolyline(), ConvertArcToPolyline(), ALTIUM_PCB::ConvertComponentBody6ToFootprintItem(), ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), SHAPE_ARC::ConvertToPolyline(), PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), GENCAD_EXPORTER::createComponentsSection(), MICROWAVE_TOOL::createFootprint(), PCB_IO_EASYEDAPRO_PARSER::createPAD(), GENCAD_EXPORTER::createShapesSection(), BOARD_ADAPTER::createTrackWithMargin(), PCB_IO_EASYEDAPRO_V3_PARSER::createV3PAD(), PADS_IO::deriveArc(), KIGFX::OPENGL_GAL::DrawBitmap(), KIGFX::PREVIEW::ARC_ASSISTANT::drawCenterGuides(), KIGFX::PREVIEW::ARC_ASSISTANT::drawEndpointGuides(), EaglePcbTextToKiCadAlignment(), IDF_EXPORTER::exportFootprint(), IDF_EXPORTER::exportFootprintIdfModels(), EXPORTER_PCB_VRML::ExportVrmlPadHole(), DS_DATA_MODEL_IO::format(), PCB_IO_KICAD_SEXPR::format(), EDA_UNIT_UTILS::FormatAngle(), DSN::SPECCTRA_DB::FromBOARD(), PCB_IO_IPC2581::generateComponents(), GetArcToSegmentCount(), CADSTAR_SCH_ARCHIVE_LOADER::getCadstarAngle(), KIGFX::PREVIEW::RULER_ITEM::GetDimensionStrings(), SCH_SCREEN::GetLabelOrientationForPoint(), PAD::GetMsgPanelInfo(), SNAP_LINE_MANAGER::GetNearestSnapLinePoint(), PCB_BARCODE::GetOrientation(), PAD::GetOrientationDegrees(), PCBEXPR_VAR_REF::GetValue(), PG_UNIT_EDITOR::GetValueFromControl(), hash_fp_item(), HelperShapeLineChainFromAltiumVertices(), HYPERLYNX_PAD_STACK::HYPERLYNX_PAD_STACK(), idf_append_shape(), Invert(), SHAPE_SEGMENT::Is45Degree(), IsGraphicEditArcUsable(), IsParallelTo(), KeepUpright(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbol(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymbolFieldAttribute(), DSN::SPECCTRA_DB::makeIMAGE(), EDA_UNIT_UTILS::UI::MessageTextFromValue(), UNITS_PROVIDER::MessageTextFromValue(), PCB_POINT_EDITOR::OnSelectionChange(), operator!=(), std::hash< GLYPH_CACHE_KEY >::operator()(), std::hash< TEXT_ATTRIBUTES >::operator()(), operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/(), operator<(), operator<<(), operator<<(), operator<=(), operator==(), operator>(), operator>=(), kiapi::common::PackTextAttributes(), padNeedsUpdate(), ALTIUM_PCB::ParseComponentsBodies6Data(), GRAPHIC_EXTEND_PLANNER::Plan(), DXF_PLOTTER::plotOneLineOfText(), BRDITEMS_PLOTTER::PlotShape(), CONSTRAINT_OVERLAY::render(), REFERENCE_IMAGE::Rotate(), Round(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveField(), Snapped(), PNS::DRAGGER::startDragArc(), UNITS_PROVIDER::StringFromValue(), SVG_PLOTTER::Text(), ORIGIN_TRANSFORMS::ToDisplay(), PCB_ORIGIN_TRANSFORMS::ToDisplay(), SPICE_VALUE::ToString(), AR_MATRIX::traceArc(), DIALOG_DRAW_LAYERS_SETTINGS::TransferDataToWindow(), TransformIsClose(), SHAPE_ARC::update_values(), PCB_DIM_RADIAL::updateText(), ARC_GEOM_SYNCER::Validate(), DIPTRACE_SCH_IMPORT_FIXTURE::ValueFieldAngleDegrees(), KIGFX::PREVIEW::ELLIPSE_ASSISTANT::ViewDraw(), KIGFX::PREVIEW::TWO_POINT_ASSISTANT::ViewDraw(), and zoneNeedsUpdate().
|
inline |
Definition at line 119 of file eda_angle.h.
References DEGREES_TO_RADIANS, and m_value.
Referenced by angleIsSpecial(), GERBER_PLOTTER::Arc(), PNG_PLOTTER::Arc(), SVG_PLOTTER::Arc(), GEOM_TEST::ArePerpendicular(), RENDER_3D_RAYTRACE_BASE::backfillPostMachine(), KIGFX::OPENGL_GAL::BitmapText(), BOOST_AUTO_TEST_CASE(), EXPORTER_STEP::buildFootprint3DShapes(), PCB_GRID_HELPER::computeAnchors(), PSLIKE_PLOTTER::computeTextParameters(), SHAPE_ELLIPSE::conicOf(), BE_SHAPE_ARC::ConnectChildren(), BE_SHAPE_CIRCLE::ConnectChildren(), Cos(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::CAIRO_GAL_BASE::DrawArc(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::CAIRO_GAL_BASE::DrawEllipse(), KIGFX::OPENGL_GAL::DrawEllipse(), KIGFX::CAIRO_GAL_BASE::DrawEllipseArc(), KIGFX::OPENGL_GAL::DrawEllipseArc(), PDF_PLOTTER::drawOverbars(), KIGFX::OPENGL_GAL::drawSegment(), KI_TEST::ellipseEquationAt(), EXPORTER_PCB_VRML::ExportVrmlFootprint(), PNG_PLOTTER::FlashRegularPolygon(), gen_arc(), RENDER_3D_OPENGL::generateInvCone(), PCB_SHAPE::GetConnectionPoints(), BOARD_ADAPTER::GetFootprintMatrix(), EDA_SHAPE::GetLength(), SHAPE_ARC::GetLength(), ELLIPSE< NumericType >::GetPointAtAngle(), hashShape(), SHAPE_ELLIPSE::Intersect(), BE_SHAPE_ARC::IsThereATangentPassingThroughPoint(), CU_SHAPE_CIRCLE::Paths(), CU_SHAPE_SEGMENT::Paths(), CU_SHAPE_SEGMENT::Paths(), CU_SHAPE_SEGMENT::Paths(), PDF_PLOTTER::renderWord(), segmentIntersectsArc(), EDA_SHAPE::ShortenArcForEndings(), BE_SHAPE_CIRCLE::ShortenChildDueToGV(), Sin(), STROKE_PARAMS::Stroke(), Tan(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testShapeLineChain(), and TransformEllipseToBeziers().
|
inline |
Definition at line 117 of file eda_angle.h.
References KiROUND(), and m_value.
Referenced by BOOST_AUTO_TEST_CASE(), EDA_SHAPE::Compare(), PADSTACK::Compare(), PCB_BARCODE::Compare(), SCH_TEXTBOX::compare(), KIGFX::PREVIEW::ANGLE_ITEM::drawPreviewShape(), CADSTAR_SCH_ARCHIVE_LOADER::getCadstarAngle(), FOOTPRINT::cmp_drawings::operator()(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveArc(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), and SCH_IO_KICAD_SEXPR_LIB_CACHE::saveText().
|
inline |
Definition at line 196 of file eda_angle.h.
References AsRadians(), and EDA_ANGLE().
Referenced by PS_PLOTTER::Arc(), BOOST_AUTO_TEST_CASE(), ZONE_FILLER::buildThermalSpokes(), EDA_SHAPE::calcEdit(), commonParallelProjection(), PCB_GRID_HELPER::computeAnchors(), ALTIUM_PCB::ConvertArcs6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertArcs6ToPcbShape(), ConvertArcToPolyline(), SHAPE_ARC::ConvertToPolyline(), drawTicksAlongLine(), evalEllipsePoint(), IMPORTED_ARC::GetBoundingBox(), DIALOG_MOVE_EXACT::GetTranslationInIU(), DIALOG_POSITION_RELATIVE::getTranslationInIU(), CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions(), TRANSFORM::MapAngles(), PCAD2KICAD::PCAD_ARC::Parse(), SCH_IO_ALTIUM::ParseArc(), SCH_IO_ALTIUM::ParsePieChart(), GERBER_PLOTTER::plotArc(), GERBER_PLOTTER::plotRoundRectAsRegion(), PLOTTER::polyArc(), CONSTRAINT_OVERLAY::render(), RotatePoint(), RotatePoint(), STROKE_PARAMS::Stroke(), AR_MATRIX::traceArc(), AR_MATRIX::traceCircle(), and EDA_ELLIPSE_POINT_EDIT_BEHAVIOR::UpdateItem().
|
inlinestaticprivate |
Exactly remove whole periods from values beyond two periods, keeping the sign, so the normalization loops run at most twice.
Repeated subtraction alone never terminates once the spacing between doubles exceeds the period. Non-finite values become 0.
Definition at line 338 of file eda_angle.h.
References std::abs().
Referenced by IsCardinal(), IsCardinal90(), Normalize(), Normalize180(), Normalize720(), Normalize90(), and NormalizeNegative().
|
inline |
Definition at line 172 of file eda_angle.h.
References AsDegrees(), DEGREES_T, EDA_ANGLE(), and EDA_ANGLE().
Referenced by PCB_IO_IPC2581::addPackage(), PSLIKE_PLOTTER::computeTextParameters(), GENCAD_EXPORTER::createComponentsSection(), PCB_IO_IPC2581::generateComponents(), and operator-().
| bool EDA_ANGLE::IsCardinal | ( | ) | const |
Definition at line 40 of file eda_angle.cpp.
References foldToTwoPeriods(), and m_value.
Referenced by KIGEOM::BoxHitTest(), ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer(), GERBER_PLOTTER::FlashPadOval(), GERBER_PLOTTER::FlashPadRect(), EDA_SHAPE::GetCornersInSequence(), KIGEOM::GetOvalKeyPoints(), SCH_LINE::IsOrthogonal(), AR_MATRIX::PlacePad(), PCB_SHAPE::rebakeFromTransform(), and EDA_SHAPE::rotate().
| bool EDA_ANGLE::IsCardinal90 | ( | ) | const |
Definition at line 57 of file eda_angle.cpp.
References std::abs(), foldToTwoPeriods(), and m_value.
Referenced by ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer(), GERBER_PLOTTER::FlashPadOval(), and GERBER_PLOTTER::FlashPadRect().
|
inline |
Definition at line 141 of file eda_angle.h.
References m_value.
Referenced by AdjustFieldForSymbolOrientation(), AdjustTextForSymbolOrientation(), BOOST_AUTO_TEST_CASE(), PNS::AREA_CONSTRAINT::Check(), ComputeDogbone(), KIGFX::SCH_PAINTER::draw(), SCH_FIELD::GetDrawRotation(), FIELDS_GRID_TABLE::GetValue(), SCH_SELECTION_TOOL::GuessSelectionCandidates(), EASYPC::SCH_BUILDER::placeFields(), SCH_FIELD::Plot(), SCH_SYMBOL::PlotLocalPowerIconShape(), DOGBONE_CORNER_ROUTINE::ProcessLinePair(), LINE_FILLET_ROUTINE::ProcessLinePair(), SCH_EDIT_TOOL::Rotate(), SCH_IO_KICAD_LEGACY::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), and SimulateRenderTransform().
|
inline |
Definition at line 153 of file eda_angle.h.
References AsDegrees(), DEGREES_T, EDA_ANGLE(), EDA_ANGLE(), equals(), and Normalize90().
|
inline |
Definition at line 147 of file eda_angle.h.
References m_value.
Referenced by BOOST_AUTO_TEST_CASE(), SCH_EDIT_TOOL::ChangeTextType(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), and DIALOG_FIELD_PROPERTIES::UpdateField().
|
inline |
Definition at line 135 of file eda_angle.h.
References m_value.
Referenced by ZONE_FILLER::addCopperThievingPattern(), ZONE_FILLER::addHatchFillTypeOnZone(), CADSTAR_SCH_ARCHIVE_LOADER::applyTransform(), PCB_BARCODE::AssembleBarcode(), BOOST_AUTO_TEST_CASE(), KIGEOM::BoxHitTest(), PCB_BARCODE::ComputeTextPoly(), AM_PRIMITIVE::ConvertBasicShapeToPolygon(), CornerListToPolygon(), BOARD_ADAPTER::createTrackWithMargin(), DS_DATA_MODEL_IO::format(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::format(), GERBER_DRAW_ITEM::GetABPosition(), PCB_TEXT::GetBoundingBox(), PCB_TEXTBOX::GetCornersInSequence(), BOARD_ADAPTER::GetFootprintMatrix(), PAD::GetMsgPanelInfo(), KIFONT::OUTLINE_FONT::getTextAsGlyphsUnlocked(), GERBER_DRAW_ITEM::GetXYPosition(), API_HANDLER_COMMON::handleGetTextExtents(), SVG_PLOTTER::Text(), KIFONT::STROKE_GLYPH::Transform(), TransformRoundChamferedRectToPolygon(), and TransformTrapezoidToPolygon().
| EDA_ANGLE EDA_ANGLE::KeepUpright | ( | ) | const |
Definition at line 23 of file eda_angle.cpp.
References AsDegrees(), DEGREES_T, EDA_ANGLE(), EDA_ANGLE(), and Normalize().
|
inline |
Definition at line 228 of file eda_angle.h.
References EDA_ANGLE(), foldToTwoPeriods(), and m_value.
Referenced by PCB_IO_IPC2581::addPackage(), PCB_IO_IPC2581::addPad(), PCB_IO_IPC2581::addSlotCavity(), EASYPC_PCB::FRAME::Angle(), KIGFX::PREVIEW::ARC_GEOM_MANAGER::applySolution(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), PLOTTER::Arc(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), ALLEGRO::BOARD_BUILDER::buildArc(), ALLEGRO::BOARD_BUILDER::buildPolygonShapes(), ALLEGRO::BOARD_BUILDER::buildSegmentChain(), ALLEGRO::BOARD_BUILDER::buildTrack(), SHAPE_ARC::Collide(), commonParallelProjection(), EDA_SHAPE::computeArcBBox(), SHAPE_ARC::ConstructFromStartEndCenter(), ALTIUM_PCB::ConvertArcs6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertArcs6ToPcbShape(), ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), GENCAD_EXPORTER::createComponentsSection(), GENCAD_EXPORTER::createShapesSection(), EaglePcbTextToKiCadAlignment(), GERBER_PLOTTER::FlashPadOval(), DSN::SPECCTRA_DB::FromBOARD(), PCB_IO_IPC2581::generateComponents(), PCB_ARC::GetArcAngleEnd(), PCB_ARC::GetArcAngleStart(), GERBER_DRAW_ITEM::GetBoundingBox(), EDA_SHAPE::GetCornersInSequence(), PCB_TEXTBOX::GetCornersInSequence(), PCB_TEXT::GetDrawRotation(), SHAPE_ARC::GetEndAngle(), ELLIPSE< int >::GetPointAtAngle(), SHAPE_ARC::GetStartAngle(), PCB_TEXT::GetTextAngle(), HelperShapeLineChainFromAltiumVertices(), GERBER_DRAW_ITEM::HitTest(), PCB_ARC::HitTest(), EDA_SHAPE::hitTest(), BOX2< VECTOR2I >::Intersects(), KeepUpright(), PCB_TEXT::KeepUpright(), DSN::SPECCTRA_DB::makeIMAGE(), TRANSFORM::MapAngles(), Normalized(), padNeedsUpdate(), SCH_IO_KICAD_SEXPR_PARSER::parseSymbolArc(), FABMASTER::processArc(), processTextItem(), PCB_DIMENSION_BASE::Rotate(), PCB_TEXT::Rotate(), REFERENCE_IMAGE::Rotate(), RotatePoint(), RotatePoint(), SHAPE_ARC::sliceContainsPoint(), STROKE_PARAMS::Stroke(), PLOTTER::ThickArc(), AR_MATRIX::traceArc(), PCB_DIM_ALIGNED::updateText(), and PCB_DIM_RADIAL::updateText().
|
inline |
Definition at line 273 of file eda_angle.h.
References EDA_ANGLE(), foldToTwoPeriods(), and m_value.
Referenced by SEG::Angle(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PADS_IO::deriveArc(), KIGFX::SCH_PAINTER::draw(), CADSTAR_SCH_ARCHIVE_LOADER::fixUpLibraryPins(), FOOTPRINT::Flip(), PCB_ARC::GetAngle(), CADSTAR_SCH_ARCHIVE_LOADER::getComponentOrientation(), PAD::GetMsgPanelInfo(), CADSTAR_SCH_ARCHIVE_LOADER::getSpinStyle(), SHAPE_SEGMENT::Is45Degree(), CADSTAR_PCB_ARCHIVE_LOADER::loadComponents(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbol(), PCB_DIM_ORTHOGONAL::Rotate(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveArc(), FOOTPRINT::SetOrientation(), FABMASTER::setupText(), SPICE_VALUE::ToString(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow(), and KIGFX::PREVIEW::ELLIPSE_ASSISTANT::ViewDraw().
|
inline |
Definition at line 286 of file eda_angle.h.
References EDA_ANGLE(), foldToTwoPeriods(), and m_value.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), KIGFX::PREVIEW::ARC_ASSISTANT::drawCenterGuides(), PCB_IO_KICAD_SEXPR::format(), and EDA_SHAPE::SetArcAngleAndEnd().
|
inline |
Definition at line 260 of file eda_angle.h.
References EDA_ANGLE(), foldToTwoPeriods(), and m_value.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), build45DegLeader(), PCB_IO_EASYEDAPRO_PARSER::createPAD(), PCB_IO_EASYEDAPRO_V3_PARSER::createV3PAD(), KIGFX::PCB_PAINTER::draw(), SCH_SCREEN::GetLabelOrientationForPoint(), KIGEOM::GetOvalKeyPoints(), GERBER_DRAW_ITEM::GetTextD_CodePrms(), IsParallelTo(), and KIGFX::PCB_PAINTER::renderNetNameForSegment().
|
inline |
Definition at line 241 of file eda_angle.h.
References EDA_ANGLE(), and Normalize().
Referenced by PAD::GetOrientation(), PCB_TEXTBOX::GetTextAngle(), FABMASTER::loadFootprints(), PCB_BARCODE::SetOrientation(), PCB_TEXTBOX::SetTextAngle(), and Snap90Degrees().
|
inline |
Definition at line 247 of file eda_angle.h.
References EDA_ANGLE(), foldToTwoPeriods(), and m_value.
Referenced by PLOTTER::Arc(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), CADSTAR_PCB_ARCHIVE_LOADER::getShapeFromVertex(), and PLOTTER::ThickArc().
Definition at line 320 of file eda_angle.h.
References AsDegrees(), DEGREES_T, EDA_ANGLE(), and EDA_ANGLE().
Definition at line 326 of file eda_angle.h.
References AsDegrees(), DEGREES_T, EDA_ANGLE(), and EDA_ANGLE().
|
inlinenodiscard |
Definition at line 312 of file eda_angle.h.
References AsDegrees(), DEGREES_T, EDA_ANGLE(), EDA_ANGLE(), and KiROUND().
Referenced by SPRINT_LAYOUT_PARSER::processPad().
|
inline |
Definition at line 177 of file eda_angle.h.
References AsRadians(), and EDA_ANGLE().
Referenced by PS_PLOTTER::Arc(), ZONE_FILLER::buildThermalSpokes(), EDA_SHAPE::calcEdit(), commonParallelProjection(), PCB_GRID_HELPER::computeAnchors(), ALTIUM_PCB::ConvertArcs6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertArcs6ToPcbShape(), ConvertArcToPolyline(), SHAPE_ARC::ConvertToPolyline(), drawTicksAlongLine(), evalEllipsePoint(), IMPORTED_ARC::GetBoundingBox(), DIALOG_MOVE_EXACT::GetTranslationInIU(), DIALOG_POSITION_RELATIVE::getTranslationInIU(), CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions(), TRANSFORM::MapAngles(), PCAD2KICAD::PCAD_ARC::Parse(), SCH_IO_ALTIUM::ParseArc(), SCH_IO_ALTIUM::ParsePieChart(), GERBER_PLOTTER::plotArc(), GERBER_PLOTTER::plotRoundRectAsRegion(), PLOTTER::polyArc(), CONSTRAINT_OVERLAY::render(), RotatePoint(), RotatePoint(), STROKE_PARAMS::Stroke(), AR_MATRIX::traceCircle(), and EDA_ELLIPSE_POINT_EDIT_BEHAVIOR::UpdateItem().
Snap to the nearest integer multiple of aStep (returns *this if aStep <= 0).
Definition at line 300 of file eda_angle.h.
References AsDegrees(), DEGREES_T, EDA_ANGLE(), EDA_ANGLE(), and KiROUND().
Referenced by BOOST_AUTO_TEST_CASE(), and GridFrameRotationDelta().
|
inline |
Definition at line 215 of file eda_angle.h.
References AsRadians().
|
staticconstexpr |
Definition at line 121 of file eda_angle.h.
Referenced by AsRadians(), and EDA_ANGLE().
|
private |
value in degrees
Definition at line 350 of file eda_angle.h.
Referenced by AsDegrees(), AsRadians(), AsTenthsOfADegree(), EDA_ANGLE(), EDA_ANGLE(), EDA_ANGLE(), EDA_ANGLE(), IsCardinal(), IsCardinal90(), IsHorizontal(), IsVertical(), IsZero(), Normalize(), Normalize180(), Normalize720(), Normalize90(), and NormalizeNegative().