KiCad PCB EDA Suite
create_3Dgraphic_brd_items.cpp File Reference
#include "../3d_rendering/raytracing/shapes2D/ring_2d.h"
#include "../3d_rendering/raytracing/shapes2D/filled_circle_2d.h"
#include "../3d_rendering/raytracing/shapes2D/round_segment_2d.h"
#include "../3d_rendering/raytracing/shapes2D/triangle_2d.h"
#include <board_adapter.h>
#include <board.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_text.h>
#include <fp_shape.h>
#include <zone.h>
#include <string_utils.h>
#include <fp_text.h>
#include <convert_basic_shapes_to_polygon.h>
#include <trigo.h>
#include <geometry/shape_segment.h>
#include <geometry/geometry_utils.h>
#include <geometry/shape_circle.h>
#include <geometry/shape_rect.h>
#include <geometry/shape_simple.h>
#include <gr_text.h>
#include <utility>
#include <vector>
#include <wx/log.h>

Go to the source code of this file.

Macros

#define SEG_CNT_MAX   128
 

Functions

void addTextSegmToContainer (int x0, int y0, int xf, int yf, void *aData)
 

Variables

static int s_textWidth
 
static CONTAINER_2D_BASEs_dstcontainer = nullptr
 
static float s_biuTo3Dunits
 
static const BOARD_ITEMs_boardItem = nullptr
 

Macro Definition Documentation

◆ SEG_CNT_MAX

#define SEG_CNT_MAX   128

Function Documentation

◆ addTextSegmToContainer()

void addTextSegmToContainer ( int  x0,
int  y0,
int  xf,
int  yf,
void *  aData 
)

Definition at line 69 of file create_3Dgraphic_brd_items.cpp.

70 {
71  const SFVEC2F start3DU( x0 * s_biuTo3Dunits, -y0 * s_biuTo3Dunits );
72  const SFVEC2F end3DU ( xf * s_biuTo3Dunits, -yf * s_biuTo3Dunits );
73 
74  if( Is_segment_a_circle( start3DU, end3DU ) )
76  *s_boardItem) );
77  else
79  *s_boardItem ) );
80 }
static CONTAINER_2D_BASE * s_dstcontainer
static int s_textWidth
void Add(OBJECT_2D *aObject)
Definition: container_2d.h:49
glm::vec2 SFVEC2F
Definition: xv3d_types.h:42
static float s_biuTo3Dunits
bool Is_segment_a_circle(const SFVEC2F &aStart, const SFVEC2F &aEnd)
Check if segment start and end is very close to each other.
static const BOARD_ITEM * s_boardItem

References CONTAINER_2D_BASE::Add(), Is_segment_a_circle(), s_biuTo3Dunits, s_boardItem, s_dstcontainer, and s_textWidth.

Referenced by BOARD_ADAPTER::addFootprintShapesWithClearance(), and BOARD_ADAPTER::addShapeWithClearance().

Variable Documentation

◆ s_biuTo3Dunits

◆ s_boardItem

◆ s_dstcontainer

◆ s_textWidth