KiCad PCB EDA Suite
Loading...
Searching...
No Matches
orcad_converter_sheet.cpp File Reference
#include <sch_io/orcad/orcad_converter.h>
#include <sch_io/ole_image.h>
#include <algorithm>
#include <array>
#include <charconv>
#include <cctype>
#include <chrono>
#include <cmath>
#include <functional>
#include <numeric>
#include <limits>
#include <map>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include <wx/buffer.h>
#include <wx/filename.h>
#include <wx/image.h>
#include <wx/log.h>
#include <wx/tokenzr.h>
#include <wx/translation.h>
#include <base_units.h>
#include <bitmap_base.h>
#include <connection_graph.h>
#include <core/kicad_algo.h>
#include <ki_exception.h>
#include <kiid.h>
#include <layer_ids.h>
#include <lib_symbol.h>
#include <math/util.h>
#include <page_info.h>
#include <progress_reporter.h>
#include <project.h>
#include <reference_image.h>
#include <reporter.h>
#include <schematic.h>
#include <sch_bitmap.h>
#include <sch_bus_entry.h>
#include <sch_junction.h>
#include <sch_label.h>
#include <sch_line.h>
#include <sch_no_connect.h>
#include <sch_screen.h>
#include <sch_shape.h>
#include <sch_sheet.h>
#include <sch_sheet_path.h>
#include <sch_sheet_pin.h>
#include <sch_symbol.h>
#include <sch_pin.h>
#include <import_net_map.h>
#include <sch_text.h>
#include <string_utils.h>
#include <stroke_params.h>
#include <template_fieldnames.h>
#include <title_block.h>
#include <sch_io/orcad/orcad_stream.h>

Go to the source code of this file.

Functions

VECTOR2I OrcadStretchedImageSize (int aWidth, int aHeight, int aBoxWidth, int aBoxHeight)
 
KIGFX::COLOR4D OrcadColor (int aColorIndex)
 
int OrcadPageOrder (wxString &aName)
 Return a numeric page prefix (or -1); strip only the "N - title" convention.
 
static std::string scopedHierBusName (const std::string &aName, uint32_t aOccurrenceId)
 
static bool parseVectorBusName (const std::string &aName, std::string &aPrefix, int &aFirst, int &aLast)
 
static std::string scopedHierBusMember (const std::string &aName, const std::map< std::string, std::string > &aBusNames)
 
static std::string scopedHierBusRange (const std::string &aName, const std::map< std::string, std::string > &aBusNames)
 
static bool rawPointOnSegment (int aX, int aY, const ORCAD_WIRE &aWire)
 
static std::optional< VECTOR2IrawWireIntersection (const ORCAD_WIRE &aFirst, const ORCAD_WIRE &aSecond)
 
static bool rawBusSegmentsTouch (const ORCAD_WIRE &aFirst, const ORCAD_WIRE &aSecond)
 
static std::set< std::string > busPrefixTokens (const std::string &aPrefix)
 
static std::string firstBusPrefixToken (const std::string &aPrefix)
 
static std::string connectedBusName (const ORCAD_RAW_PAGE &aPage, const ORCAD_BLOCK_PIN &aPin, const std::string &aFallback)
 
static LABEL_FLAG_SHAPE hierarchicalPinShape (ORCAD_PORT_TYPE aType)
 
static uint32_t busNetAt (const ORCAD_RAW_PAGE &aPage, const ORCAD_BLOCK_PIN &aPin)
 
static std::string flatNetSuffix (const ORCAD_DRAWN_INSTANCE &aBlock)
 
static std::optional< VECTOR2IsafeConnectivityLabelPosition (SCH_SCREEN *aScreen, const VECTOR2I &aPosition, const std::optional< std::vector< SEG > > &aSourceWires)
 
static std::optional< std::vector< SEG > > eligibleSourceConnectivityWires (const ORCAD_RAW_PAGE &aPage, const VECTOR2I &aPosition, const std::set< std::string > &aNames, bool aBus=false, uint32_t *aNetId=nullptr)
 

Function Documentation

◆ busNetAt()

◆ busPrefixTokens()

static std::set< std::string > busPrefixTokens ( const std::string & aPrefix)
static

Definition at line 879 of file orcad_converter_sheet.cpp.

References end, and result.

Referenced by connectedBusName().

◆ connectedBusName()

◆ eligibleSourceConnectivityWires()

static std::optional< std::vector< SEG > > eligibleSourceConnectivityWires ( const ORCAD_RAW_PAGE & aPage,
const VECTOR2I & aPosition,
const std::set< std::string > & aNames,
bool aBus = false,
uint32_t * aNetId = nullptr )
static

◆ firstBusPrefixToken()

static std::string firstBusPrefixToken ( const std::string & aPrefix)
static

Definition at line 904 of file orcad_converter_sheet.cpp.

References end.

Referenced by connectedBusName().

◆ flatNetSuffix()

static std::string flatNetSuffix ( const ORCAD_DRAWN_INSTANCE & aBlock)
static

◆ hierarchicalPinShape()

static LABEL_FLAG_SHAPE hierarchicalPinShape ( ORCAD_PORT_TYPE aType)
static

◆ OrcadColor()

◆ OrcadPageOrder()

int OrcadPageOrder ( wxString & aName)

Return a numeric page prefix (or -1); strip only the "N - title" convention.

Definition at line 631 of file orcad_converter_sheet.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ OrcadStretchedImageSize()

VECTOR2I OrcadStretchedImageSize ( int aWidth,
int aHeight,
int aBoxWidth,
int aBoxHeight )

◆ parseVectorBusName()

static bool parseVectorBusName ( const std::string & aName,
std::string & aPrefix,
int & aFirst,
int & aLast )
static

Definition at line 698 of file orcad_converter_sheet.cpp.

References end, and next().

Referenced by connectedBusName(), scopedHierBusMember(), and scopedHierBusRange().

◆ rawBusSegmentsTouch()

static bool rawBusSegmentsTouch ( const ORCAD_WIRE & aFirst,
const ORCAD_WIRE & aSecond )
static

◆ rawPointOnSegment()

◆ rawWireIntersection()

static std::optional< VECTOR2I > rawWireIntersection ( const ORCAD_WIRE & aFirst,
const ORCAD_WIRE & aSecond )
static

◆ safeConnectivityLabelPosition()

◆ scopedHierBusMember()

static std::string scopedHierBusMember ( const std::string & aName,
const std::map< std::string, std::string > & aBusNames )
static

Definition at line 735 of file orcad_converter_sheet.cpp.

References std::abs(), next(), and parseVectorBusName().

Referenced by ORCAD_CONVERTER::recordNetNameMap().

◆ scopedHierBusName()

static std::string scopedHierBusName ( const std::string & aName,
uint32_t aOccurrenceId )
static

Definition at line 687 of file orcad_converter_sheet.cpp.

Referenced by ORCAD_CONVERTER::Convert().

◆ scopedHierBusRange()

static std::string scopedHierBusRange ( const std::string & aName,
const std::map< std::string, std::string > & aBusNames )
static

Definition at line 777 of file orcad_converter_sheet.cpp.

References std::abs(), and parseVectorBusName().

Referenced by ORCAD_CONVERTER::Convert().