|
KiCad PCB EDA Suite
|
#include <step_pcb_model.h>
Public Member Functions | |
| STEP_PCB_MODEL (const wxString &aPcbName, REPORTER *aReporter) | |
| virtual | ~STEP_PCB_MODEL () |
| void | SpecializeVariant (OUTPUT_FORMAT aVariant) |
| bool | AddPadShape (const PAD *aPad, const VECTOR2D &aOrigin, bool aVia, SHAPE_POLY_SET *aClipPolygon=nullptr) |
| bool | AddHole (const SHAPE_SEGMENT &aShape, int aPlatingThickness, PCB_LAYER_ID aLayerTop, PCB_LAYER_ID aLayerBot, bool aVia, const VECTOR2D &aOrigin, bool aCutCopper, bool aCutBody) |
| bool | AddBarrel (const SHAPE_SEGMENT &aShape, PCB_LAYER_ID aLayerTop, PCB_LAYER_ID aLayerBot, bool aVia, const VECTOR2D &aOrigin, const wxString &aNetname) |
| bool | AddBackdrill (const SHAPE_SEGMENT &aShape, PCB_LAYER_ID aLayerStart, PCB_LAYER_ID aLayerEnd, const VECTOR2D &aOrigin) |
| Add a backdrill hole shape to remove board material and copper plating. | |
| bool | AddCounterbore (const VECTOR2I &aPosition, int aDiameter, int aDepth, bool aFrontSide, const VECTOR2D &aOrigin) |
| Add a counterbore shape to remove board material from the top or bottom of a hole. | |
| bool | AddCountersink (const VECTOR2I &aPosition, int aDiameter, int aDepth, int aAngle, bool aFrontSide, const VECTOR2D &aOrigin) |
| Add a countersink shape to remove board material from the top or bottom of a hole. | |
| std::map< PCB_LAYER_ID, int > | GetCopperLayerKnockouts (int aDiameter, int aDepth, int aAngle, bool aFrontSide) |
| Get the knockout diameters for copper layers that a counterbore or countersink crosses. | |
| bool | AddPolygonShapes (const SHAPE_POLY_SET *aPolyShapes, PCB_LAYER_ID aLayer, const VECTOR2D &aOrigin, const wxString &aNetname) |
| bool | AddComponent (const std::string &aFileName, const std::string &aRefDes, bool aBottom, const VECTOR2D &aPosition, double aRotation, const VECTOR3D &aOffset, const VECTOR3D &aOrientation, const VECTOR3D &aScale, bool aSubstituteModels=true) |
| void | SetCopperColor (double r, double g, double b) |
| void | SetPadColor (double r, double g, double b) |
| void | SetEnabledLayers (const LSET &aLayers) |
| void | SetFuseShapes (bool aValue) |
| void | SetSimplifyShapes (bool aValue) |
| void | SetStackup (const BOARD_STACKUP &aStackup) |
| void | SetNetFilter (const wxString &aFilter) |
| void | SetExtraPadThickness (bool aValue) |
| void | OCCSetMergeMaxDistance (double aDistance=OCC_MAX_DISTANCE_TO_MERGE_POINTS) |
| bool | CreatePCB (SHAPE_POLY_SET &aOutline, const VECTOR2D &aOrigin, bool aPushBoardBody) |
| bool | MakeShapes (std::vector< TopoDS_Shape > &aShapes, const SHAPE_POLY_SET &aPolySet, bool aConvertToArcs, double aThickness, double aZposition, const VECTOR2D &aOrigin) |
| Convert a SHAPE_POLY_SET to TopoDS_Shape's (polygonal vertical prisms, or flat faces) | |
| bool | MakeShapeAsThickSegment (TopoDS_Shape &aShape, const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, double aWidth, double aThickness, double aZposition, const VECTOR2D &aOrigin) |
| Make a segment shape based on start and end point. | |
| bool | MakePolygonAsWall (TopoDS_Shape &aShape, SHAPE_POLY_SET &aPolySet, double aHeight, double aZposition, const VECTOR2D &aOrigin) |
| Make a polygonal shape to create a vertical wall. | |
| bool | WriteSTEP (const wxString &aFileName, bool aOptimize, bool compress) |
| bool | WriteBREP (const wxString &aFileName) |
| bool | WriteXAO (const wxString &aFileName) |
| bool | WriteGLTF (const wxString &aFileName) |
| Write the assembly in binary GLTF Format. | |
| bool | WritePLY (const wxString &aFileName) |
| bool | WriteSTL (const wxString &aFileName) |
| bool | WriteU3D (const wxString &aFileName) |
| bool | WritePDF (const wxString &aFileName) |
Private Member Functions | |
| bool | isBoardOutlineValid () |
| void | getLayerZPlacement (PCB_LAYER_ID aLayer, double &aZPos, double &aThickness) |
| void | getCopperLayerZPlacement (PCB_LAYER_ID aLayer, double &aZPos, double &aThickness) |
| void | getBoardBodyZPlacement (double &aZPos, double &aThickness) |
| bool | getModelLabel (const std::string &aFileNameUTF8, const VECTOR3D &aScale, TDF_Label &aLabel, bool aSubstituteModels, wxString *aErrorMessage=nullptr) |
| Load a 3D model data. | |
| bool | getModelLocation (bool aBottom, const VECTOR2D &aPosition, double aRotation, const VECTOR3D &aOffset, const VECTOR3D &aOrientation, TopLoc_Location &aLocation) |
| bool | readIGES (Handle(TDocStd_Document) &aDoc, const char *aFname) |
| bool | readSTEP (Handle(TDocStd_Document) &aDoc, const char *aFname) |
| bool | readVRML (Handle(TDocStd_Document) &aDoc, const char *aFname) |
| bool | performMeshing (Handle(XCAFDoc_ShapeTool) &aShapeTool) |
| TDF_Label | transferModel (Handle(TDocStd_Document)&source, Handle(TDocStd_Document) &dest, const VECTOR3D &aScale) |
| bool | CompressSTEP (wxString &inputFile, wxString &outputFile) |
| Handle (XCAFApp_Application) m_app | |
| Handle (TDocStd_Document) m_doc | |
| Handle (XCAFDoc_ShapeTool) m_assy | |
Private Attributes | |
| TDF_Label | m_assy_label |
| bool | m_hasPCB |
| bool | m_simplifyShapes |
| bool | m_fuseShapes |
| bool | m_extraPadThickness |
| std::vector< TDF_Label > | m_pcb_labels |
| MODEL_MAP | m_models |
| int | m_components |
| double | m_precision |
| double | m_angleprec |
| double | m_copperColor [3] |
| double | m_padColor [3] |
| BOARD_STACKUP | m_stackup |
| LSET | m_enabledLayers |
| wxString | m_netFilter |
| double | m_minx |
| double | m_mergeOCCMaxDist |
| std::vector< TopoDS_Shape > | m_copperCutouts |
| std::vector< TopoDS_Shape > | m_boardCutouts |
| std::vector< TopoDS_Shape > | m_board_outlines |
| std::map< wxString, std::vector< TopoDS_Shape > > | m_board_copper |
| std::map< wxString, std::vector< TopoDS_Shape > > | m_board_copper_pads |
| std::map< wxString, std::vector< TopoDS_Shape > > | m_board_copper_vias |
| std::map< wxString, std::vector< TopoDS_Shape > > | m_board_copper_fused |
| std::vector< TopoDS_Shape > | m_board_front_silk |
| std::vector< TopoDS_Shape > | m_board_back_silk |
| std::vector< TopoDS_Shape > | m_board_front_mask |
| std::vector< TopoDS_Shape > | m_board_back_mask |
| std::map< wxString, std::vector< std::pair< gp_Pnt, TopoDS_Shape > > > | m_pad_points |
| wxString | m_pcbName |
| Name of the PCB, which will most likely be the file name of the path. | |
| OUTPUT_FORMAT | m_outFmt |
| The current output format for created file. | |
| REPORTER * | m_reporter |
Definition at line 92 of file step_pcb_model.h.
| STEP_PCB_MODEL::STEP_PCB_MODEL | ( | const wxString & | aPcbName, |
| REPORTER * | aReporter ) |
Definition at line 782 of file step_pcb_model.cpp.
References FMT_OUT_UNKNOWN, m_angleprec, m_assy_label, m_components, m_extraPadThickness, m_fuseShapes, m_hasPCB, m_mergeOCCMaxDist, m_minx, m_outFmt, m_pcbName, m_precision, m_reporter, m_simplifyShapes, OCC_MAX_DISTANCE_TO_MERGE_POINTS, USER_ANGLE_PREC, and USER_PREC.
|
virtual |
Definition at line 803 of file step_pcb_model.cpp.
| bool STEP_PCB_MODEL::AddBackdrill | ( | const SHAPE_SEGMENT & | aShape, |
| PCB_LAYER_ID | aLayerStart, | ||
| PCB_LAYER_ID | aLayerEnd, | ||
| const VECTOR2D & | aOrigin ) |
Add a backdrill hole shape to remove board material and copper plating.
A backdrill removes board material between the specified layers (inclusive), removes annular rings on copper layers within that span, and removes the copper barrel plating through those layers.
| aShape | The hole shape (position and diameter of the backdrill) |
| aLayerStart | The starting copper layer (e.g., F_Cu for top backdrill) |
| aLayerEnd | The ending copper layer (inclusive, the layer where backdrill stops) |
| aOrigin | The origin offset for coordinate transformation |
Definition at line 1067 of file step_pcb_model.cpp.
References SEG::A, SEG::B, B_Cu, F_Cu, getLayerZPlacement(), SHAPE_SEGMENT::GetSeg(), SHAPE_SEGMENT::GetWidth(), m_boardCutouts, m_copperCutouts, MakeShapeAsThickSegment(), and top().
| bool STEP_PCB_MODEL::AddBarrel | ( | const SHAPE_SEGMENT & | aShape, |
| PCB_LAYER_ID | aLayerTop, | ||
| PCB_LAYER_ID | aLayerBot, | ||
| bool | aVia, | ||
| const VECTOR2D & | aOrigin, | ||
| const wxString & | aNetname ) |
Definition at line 1039 of file step_pcb_model.cpp.
References SEG::A, SEG::B, getLayerZPlacement(), SHAPE_SEGMENT::GetSeg(), SHAPE_SEGMENT::GetWidth(), m_board_copper_pads, m_board_copper_vias, MakeShapeAsThickSegment(), and top().
| bool STEP_PCB_MODEL::AddComponent | ( | const std::string & | aFileName, |
| const std::string & | aRefDes, | ||
| bool | aBottom, | ||
| const VECTOR2D & | aPosition, | ||
| double | aRotation, | ||
| const VECTOR3D & | aOffset, | ||
| const VECTOR3D & | aOrientation, | ||
| const VECTOR3D & | aScale, | ||
| bool | aSubstituteModels = true ) |
Definition at line 1675 of file step_pcb_model.cpp.
References _, COMPONENT, getModelLabel(), getModelLocation(), m_assy_label, m_reporter, RPT_SEVERITY_DEBUG, RPT_SEVERITY_ERROR, and RPT_SEVERITY_WARNING.
| bool STEP_PCB_MODEL::AddCounterbore | ( | const VECTOR2I & | aPosition, |
| int | aDiameter, | ||
| int | aDepth, | ||
| bool | aFrontSide, | ||
| const VECTOR2D & | aOrigin ) |
Add a counterbore shape to remove board material from the top or bottom of a hole.
A counterbore creates a cylindrical recess from the specified side of the board, removing board material and copper down to the specified depth.
| aPosition | The center position of the counterbore |
| aDiameter | The diameter of the counterbore (in IU) |
| aDepth | The depth of the counterbore from the board surface (in IU) |
| aFrontSide | True if counterbore is on the front (top) side, false for back (bottom) |
| aOrigin | The origin offset for coordinate transformation |
Definition at line 1123 of file step_pcb_model.cpp.
References _, B_Cu, F_Cu, getBoardBodyZPlacement(), getLayerZPlacement(), m_boardCutouts, m_copperCutouts, m_reporter, pcbIUScale, RPT_SEVERITY_ERROR, traceKiCad2Step, VECTOR2< T >::x, and VECTOR2< T >::y.
| bool STEP_PCB_MODEL::AddCountersink | ( | const VECTOR2I & | aPosition, |
| int | aDiameter, | ||
| int | aDepth, | ||
| int | aAngle, | ||
| bool | aFrontSide, | ||
| const VECTOR2D & | aOrigin ) |
Add a countersink shape to remove board material from the top or bottom of a hole.
A countersink creates an inverted cone recess from the specified side of the board. The angle parameter specifies the total cone angle (the angle between opposite sides of the cone), so the angle between the board surface and the cone slope is half this value.
| aPosition | The center position of the countersink |
| aDiameter | The diameter of the countersink at the board surface (in IU) |
| aDepth | The depth of the countersink from the board surface (in IU) |
| aAngle | The total cone angle in decidegrees (e.g., 900 = 90°, 820 = 82°) |
| aFrontSide | True if countersink is on the front (top) side, false for back (bottom) |
| aOrigin | The origin offset for coordinate transformation |
Definition at line 1231 of file step_pcb_model.cpp.
References _, B_Cu, F_Cu, getBoardBodyZPlacement(), getLayerZPlacement(), m_boardCutouts, m_copperCutouts, M_PI, m_reporter, pcbIUScale, RPT_SEVERITY_ERROR, traceKiCad2Step, VECTOR2< T >::x, and VECTOR2< T >::y.
| bool STEP_PCB_MODEL::AddHole | ( | const SHAPE_SEGMENT & | aShape, |
| int | aPlatingThickness, | ||
| PCB_LAYER_ID | aLayerTop, | ||
| PCB_LAYER_ID | aLayerBot, | ||
| bool | aVia, | ||
| const VECTOR2D & | aOrigin, | ||
| bool | aCutCopper, | ||
| bool | aCutBody ) |
Definition at line 983 of file step_pcb_model.cpp.
References SEG::A, SEG::B, getLayerZPlacement(), SHAPE_SEGMENT::GetSeg(), SHAPE_SEGMENT::GetWidth(), m_boardCutouts, m_copperCutouts, m_extraPadThickness, MakeShapeAsThickSegment(), and top().
| bool STEP_PCB_MODEL::AddPadShape | ( | const PAD * | aPad, |
| const VECTOR2D & | aOrigin, | ||
| bool | aVia, | ||
| SHAPE_POLY_SET * | aClipPolygon = nullptr ) |
Definition at line 810 of file step_pcb_model.cpp.
References _, B_Cu, B_Mask, SHAPE_POLY_SET::BooleanIntersection(), CASTELLATED, SHAPE_POLY_SET::ClearArcs(), ERROR_INSIDE, ERROR_OUTSIDE, F_Cu, F_Mask, PAD::FlashLayer(), fuseShapesOrCompound(), PAD::GetAttribute(), PAD::GetDrillSize(), PAD::GetEffectiveHoleShape(), PAD::GetLayerSet(), getLayerZPlacement(), BOARD_ITEM::GetMaxError(), BOARD_CONNECTED_ITEM::GetNetname(), PAD::GetNumber(), BOARD_ITEM::GetParentFootprint(), PAD::GetProperty(), FOOTPRINT::GetReferenceAsString(), BOARD_CONNECTED_ITEM::GetShortNetname(), BOARD_ITEM::GetX(), BOARD_ITEM::GetY(), PAD::IsOnLayer(), m_board_copper_pads, m_enabledLayers, m_extraPadThickness, m_fuseShapes, m_pad_points, m_reporter, m_simplifyShapes, MakePolygonAsWall(), MakeShapeAsThickSegment(), MakeShapes(), name, pcbIUScale, PTH, RPT_SEVERITY_ERROR, LSET::Seq(), top(), TransformCircleToPolygon(), TransformOvalToPolygon(), PAD::TransformShapeToPolygon(), VECTOR2< T >::x, and VECTOR2< T >::y.
| bool STEP_PCB_MODEL::AddPolygonShapes | ( | const SHAPE_POLY_SET * | aPolyShapes, |
| PCB_LAYER_ID | aLayer, | ||
| const VECTOR2D & | aOrigin, | ||
| const wxString & | aNetname ) |
Definition at line 1634 of file step_pcb_model.cpp.
References _, B_SilkS, F_Mask, F_SilkS, SHAPE_POLY_SET::FullPointCount(), getLayerZPlacement(), IsCopperLayer(), SHAPE_POLY_SET::IsEmpty(), LayerName(), m_board_back_mask, m_board_back_silk, m_board_copper, m_board_front_mask, m_board_front_silk, m_enabledLayers, m_reporter, m_simplifyShapes, MakeShapes(), and RPT_SEVERITY_ERROR.
|
private |
Definition at line 2859 of file step_pcb_model.cpp.
References _, and m_reporter.
Referenced by WriteSTEP().
| bool STEP_PCB_MODEL::CreatePCB | ( | SHAPE_POLY_SET & | aOutline, |
| const VECTOR2D & | aOrigin, | ||
| bool | aPushBoardBody ) |
Definition at line 2380 of file step_pcb_model.cpp.
References _, KIGFX::COLOR4D::a, SHAPE_POLY_SET::Append(), KIGFX::COLOR4D::b, B_Mask, B_SilkS, BOARD, BS_ITEM_TYPE_DIELECTRIC, colorFromStackup(), SHAPE_POLY_SET::CPolygons(), cut, KIGFX::COLOR4D::Darken(), F_Mask, F_SilkS, SHAPE_POLY_SET::FullPointCount(), fuseShapesOrCompound(), KIGFX::COLOR4D::g, getBoardBodyZPlacement(), GetKiCadThreadPool(), Handle(), index, isBoardOutlineValid(), KEY_CORE, m_assy_label, m_board_back_mask, m_board_back_silk, m_board_copper, m_board_copper_fused, m_board_copper_pads, m_board_copper_vias, m_board_front_mask, m_board_front_silk, m_board_outlines, m_boardCutouts, m_copperColor, m_copperCutouts, m_enabledLayers, m_fuseShapes, m_hasPCB, m_padColor, m_pcb_labels, m_pcbName, m_reporter, m_stackup, makeCompound(), MakeShapes(), SHAPE_POLY_SET::OutlineCount(), KIGFX::COLOR4D::r, RPT_SEVERITY_DEBUG, RPT_SEVERITY_ERROR, RPT_SEVERITY_WARNING, tp, and UnescapeString().
|
private |
Definition at line 1618 of file step_pcb_model.cpp.
References B_Cu, F_Cu, getLayerZPlacement(), and top().
Referenced by AddCounterbore(), AddCountersink(), CreatePCB(), and getModelLocation().
| std::map< PCB_LAYER_ID, int > STEP_PCB_MODEL::GetCopperLayerKnockouts | ( | int | aDiameter, |
| int | aDepth, | ||
| int | aAngle, | ||
| bool | aFrontSide ) |
Get the knockout diameters for copper layers that a counterbore or countersink crosses.
For a counterbore, the diameter is constant for all layers within the depth. For a countersink, the diameter varies based on the cone angle and the Z position of each layer.
| aDiameter | The diameter at the board surface (in IU) |
| aDepth | The depth of the feature from the board surface (in IU) |
| aAngle | The cone angle in decidegrees (0 for counterbore, >0 for countersink) |
| aFrontSide | True if feature is on the front (top) side, false for back (bottom) |
Definition at line 1386 of file step_pcb_model.cpp.
References B_Cu, BS_ITEM_TYPE_COPPER, F_Cu, getLayerZPlacement(), M_PI, m_stackup, pcbIUScale, and traceKiCad2Step.
|
private |
Definition at line 1559 of file step_pcb_model.cpp.
References B_Cu, BS_ITEM_TYPE_COPPER, BS_ITEM_TYPE_DIELECTRIC, F_Cu, BOARD_STACKUP_ITEM::GetBrdLayerId(), BOARD_STACKUP_ITEM::GetSublayersCount(), BOARD_STACKUP_ITEM::GetThickness(), BOARD_STACKUP_ITEM::GetType(), BOARD_STACKUP_ITEM::GetTypeName(), KEY_PREPREG, m_stackup, and pcbIUScale.
Referenced by getLayerZPlacement().
|
private |
Definition at line 1519 of file step_pcb_model.cpp.
References B_Cu, B_SilkS, F_Cu, F_SilkS, getCopperLayerZPlacement(), IsBackLayer(), IsCopperLayer(), IsFrontLayer(), and top().
Referenced by AddBackdrill(), AddBarrel(), AddCounterbore(), AddCountersink(), AddHole(), AddPadShape(), AddPolygonShapes(), getBoardBodyZPlacement(), GetCopperLayerKnockouts(), and getModelLocation().
|
private |
Load a 3D model data.
| aFileNameUTF8 | is the filename encoded UTF8 (different formats allowed) but for WRML files a model data can be loaded instead of the vrml data, not suitable in a step file. |
| aScale | is the X,Y,Z scaling factors. |
| aLabel | is the TDF_Label to store the data. |
| aSubstituteModels | = true to allows data substitution, false to disallow. |
| aErrorMessage | (can be nullptr) is an error message to be displayed on error. |
Definition at line 3215 of file step_pcb_model.cpp.
References _, fileType(), FMT_IGES, FMT_OUT_GLTF, FMT_OUT_PDF, FMT_OUT_PLY, FMT_OUT_STL, FMT_OUT_U3D, FMT_STEP, FMT_STEPZ, FMT_WRL, FMT_WRZ, getModelLabel(), Handle(), m_components, m_models, m_outFmt, m_reporter, prefixNames(), readIGES(), readSTEP(), readVRML(), RPT_SEVERITY_ERROR, TO_UTF8, transferModel(), VECTOR3< T >::x, VECTOR3< T >::y, and VECTOR3< T >::z.
Referenced by AddComponent(), and getModelLabel().
|
private |
Definition at line 3463 of file step_pcb_model.cpp.
References B_Cu, BOARD_OFFSET, F_Cu, getBoardBodyZPlacement(), getLayerZPlacement(), M_PI, top(), VECTOR2< T >::x, VECTOR3< T >::x, VECTOR2< T >::y, VECTOR3< T >::y, and VECTOR3< T >::z.
Referenced by AddComponent().
|
private |
|
private |
Referenced by CreatePCB(), getModelLabel(), MakeShapeAsThickSegment(), transferModel(), WriteBREP(), and WriteXAO().
|
private |
|
private |
Definition at line 1791 of file step_pcb_model.cpp.
References m_pcb_labels.
Referenced by CreatePCB(), WriteBREP(), WritePDF(), WritePLY(), WriteSTEP(), WriteSTL(), and WriteU3D().
| bool STEP_PCB_MODEL::MakePolygonAsWall | ( | TopoDS_Shape & | aShape, |
| SHAPE_POLY_SET & | aPolySet, | ||
| double | aHeight, | ||
| double | aZposition, | ||
| const VECTOR2D & | aOrigin ) |
Make a polygonal shape to create a vertical wall.
It is a specialized version of MakeShape()
| aShape | is the TopoDS_Shape to initialize (must be empty) |
| aPolySet | is the outline of the wall |
| aHeight | is the height of the wall. |
| aZposition | is the Z postion of the wall |
| aOrigin | is the origin of the coordinates |
Definition at line 1935 of file step_pcb_model.cpp.
References m_simplifyShapes, and MakeShapes().
Referenced by AddPadShape().
| bool STEP_PCB_MODEL::MakeShapeAsThickSegment | ( | TopoDS_Shape & | aShape, |
| const VECTOR2D & | aStartPoint, | ||
| const VECTOR2D & | aEndPoint, | ||
| double | aWidth, | ||
| double | aThickness, | ||
| double | aZposition, | ||
| const VECTOR2D & | aOrigin ) |
Make a segment shape based on start and end point.
If they're too close, make a cylinder. It is a specialized version of MakeShape()
| aShape | is the TopoDS_Shape to initialize (must be empty) |
| aStartPoint | is the start point of the segment |
| aEndPoint | is the end point of the segment |
| aWidth | is the width of the segment |
| aThickness | is the height of the created segment, or 0.0: flat face pointing up, -0.0: down. |
| aOrigin | is the origin of the coordinates |
Definition at line 1797 of file step_pcb_model.cpp.
References _, circle(), Handle(), m_mergeOCCMaxDist, m_reporter, pcbIUScale, RotatePoint(), RPT_SEVERITY_ERROR, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by AddBackdrill(), AddBarrel(), AddHole(), and AddPadShape().
| bool STEP_PCB_MODEL::MakeShapes | ( | std::vector< TopoDS_Shape > & | aShapes, |
| const SHAPE_POLY_SET & | aPolySet, | ||
| bool | aConvertToArcs, | ||
| double | aThickness, | ||
| double | aZposition, | ||
| const VECTOR2D & | aOrigin ) |
Convert a SHAPE_POLY_SET to TopoDS_Shape's (polygonal vertical prisms, or flat faces)
| aShapes | is the TopoDS_Shape list to append to |
| aPolySet | is the polygon set |
| aConvertToArcs | set to approximate with arcs |
| aThickness | is the height of the created prism, or 0.0: flat face pointing up, -0.0: down. |
| aOrigin | is the origin of the coordinates |
Definition at line 2137 of file step_pcb_model.cpp.
References _, approximateLineChainWithArcs(), SHAPE_POLY_SET::CPolygon(), SHAPE_POLY_SET::CPolygons(), formatBBox(), m_mergeOCCMaxDist, m_reporter, makeWireFromChain(), pcbIUScale, SHAPE_POLY_SET::Polygon(), RPT_SEVERITY_DEBUG, RPT_SEVERITY_ERROR, RPT_SEVERITY_WARNING, SHAPE_POLY_SET::Simplify(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by AddPadShape(), AddPolygonShapes(), CreatePCB(), and MakePolygonAsWall().
| void STEP_PCB_MODEL::OCCSetMergeMaxDistance | ( | double | aDistance = OCC_MAX_DISTANCE_TO_MERGE_POINTS | ) |
Definition at line 1784 of file step_pcb_model.cpp.
References m_mergeOCCMaxDist.
|
private |
Definition at line 3681 of file step_pcb_model.cpp.
References DEG2RAD(), m_reporter, and RPT_SEVERITY_DEBUG.
Referenced by WriteGLTF(), WritePDF(), WritePLY(), WriteSTL(), and WriteU3D().
|
private |
Definition at line 3534 of file step_pcb_model.cpp.
References USER_PREC.
Referenced by getModelLabel().
|
private |
Definition at line 3577 of file step_pcb_model.cpp.
References USER_PREC.
Referenced by getModelLabel().
|
private |
Definition at line 3619 of file step_pcb_model.cpp.
Referenced by getModelLabel().
| void STEP_PCB_MODEL::SetCopperColor | ( | double | r, |
| double | g, | ||
| double | b ) |
Definition at line 1768 of file step_pcb_model.cpp.
References m_copperColor.
| void STEP_PCB_MODEL::SetEnabledLayers | ( | const LSET & | aLayers | ) |
Definition at line 1732 of file step_pcb_model.cpp.
References m_enabledLayers.
| void STEP_PCB_MODEL::SetExtraPadThickness | ( | bool | aValue | ) |
Definition at line 1762 of file step_pcb_model.cpp.
References m_extraPadThickness.
| void STEP_PCB_MODEL::SetFuseShapes | ( | bool | aValue | ) |
Definition at line 1738 of file step_pcb_model.cpp.
References m_fuseShapes.
| void STEP_PCB_MODEL::SetNetFilter | ( | const wxString & | aFilter | ) |
Definition at line 1756 of file step_pcb_model.cpp.
References m_netFilter.
| void STEP_PCB_MODEL::SetPadColor | ( | double | r, |
| double | g, | ||
| double | b ) |
Definition at line 1776 of file step_pcb_model.cpp.
References m_padColor.
| void STEP_PCB_MODEL::SetSimplifyShapes | ( | bool | aValue | ) |
Definition at line 1744 of file step_pcb_model.cpp.
References m_simplifyShapes.
| void STEP_PCB_MODEL::SetStackup | ( | const BOARD_STACKUP & | aStackup | ) |
Definition at line 1750 of file step_pcb_model.cpp.
References m_stackup.
|
inline |
Definition at line 99 of file step_pcb_model.h.
References m_outFmt.
|
private |
Definition at line 3638 of file step_pcb_model.cpp.
References Handle(), rescaleShapes(), VECTOR3< T >::x, VECTOR3< T >::y, and VECTOR3< T >::z.
Referenced by getModelLabel().
| bool STEP_PCB_MODEL::WriteBREP | ( | const wxString & | aFileName | ) |
Definition at line 2997 of file step_pcb_model.cpp.
References _, FMT_OUT_BREP, getOneShape(), Handle(), isBoardOutlineValid(), m_outFmt, m_reporter, and RPT_SEVERITY_ERROR.
| bool STEP_PCB_MODEL::WriteGLTF | ( | const wxString & | aFileName | ) |
Write the assembly in binary GLTF Format.
We only support binary GLTF because GLTF is weird Officially, binary GLTF is actually json+binary in one file If we elected non-binary output with opecascade, it will generate that one file as two separate files, one containing json that references the binary Which is actually more annoying to deal with (to do the temp file rename, since we dont control the binary name) and silly when you can just have the one file.
| aFileName | Output file path |
Definition at line 3709 of file step_pcb_model.cpp.
References _, KIPLATFORM::IO::DuplicatePermissions(), FMT_OUT_GLTF, GetISO8601CurrentDateTime(), GetSemanticVersion(), m_outFmt, m_reporter, performMeshing(), and RPT_SEVERITY_ERROR.
| bool STEP_PCB_MODEL::WritePDF | ( | const wxString & | aFileName | ) |
Definition at line 3947 of file step_pcb_model.cpp.
References _, PDF_PLOTTER::CreateC2WMatrixFromAngles(), distance(), KIPLATFORM::IO::DuplicatePermissions(), FMT_OUT_PDF, U3D::WRITER::GetCenter(), U3D::WRITER::GetMeshBoundingBox(), isBoardOutlineValid(), m_outFmt, m_reporter, U3D::WRITER::Perform(), performMeshing(), and RPT_SEVERITY_ERROR.
| bool STEP_PCB_MODEL::WritePLY | ( | const wxString & | aFileName | ) |
Definition at line 3778 of file step_pcb_model.cpp.
References _, KIPLATFORM::IO::DuplicatePermissions(), FMT_OUT_PLY, GetISO8601CurrentDateTime(), GetSemanticVersion(), isBoardOutlineValid(), m_outFmt, m_reporter, performMeshing(), and RPT_SEVERITY_ERROR.
| bool STEP_PCB_MODEL::WriteSTEP | ( | const wxString & | aFileName, |
| bool | aOptimize, | ||
| bool | compress ) |
Definition at line 2898 of file step_pcb_model.cpp.
References _, CompressSTEP(), KIPLATFORM::IO::DuplicatePermissions(), FMT_OUT_STEP, isBoardOutlineValid(), m_outFmt, m_reporter, RPT_SEVERITY_ERROR, and RPT_SEVERITY_WARNING.
| bool STEP_PCB_MODEL::WriteSTL | ( | const wxString & | aFileName | ) |
Definition at line 3851 of file step_pcb_model.cpp.
References _, KIPLATFORM::IO::DuplicatePermissions(), FMT_OUT_STL, getOneShape(), isBoardOutlineValid(), m_outFmt, m_reporter, performMeshing(), and RPT_SEVERITY_ERROR.
| bool STEP_PCB_MODEL::WriteU3D | ( | const wxString & | aFileName | ) |
Definition at line 3900 of file step_pcb_model.cpp.
References _, KIPLATFORM::IO::DuplicatePermissions(), FMT_OUT_U3D, isBoardOutlineValid(), m_outFmt, m_reporter, U3D::WRITER::Perform(), performMeshing(), and RPT_SEVERITY_ERROR.
| bool STEP_PCB_MODEL::WriteXAO | ( | const wxString & | aFileName | ) |
Definition at line 3030 of file step_pcb_model.cpp.
References FMT_OUT_XAO, getOneShape(), Handle(), index, m_outFmt, m_pad_points, m_reporter, name, RPT_SEVERITY_DEBUG, and RPT_SEVERITY_ERROR.
|
private |
Definition at line 342 of file step_pcb_model.h.
Referenced by STEP_PCB_MODEL().
|
private |
Definition at line 333 of file step_pcb_model.h.
Referenced by AddComponent(), CreatePCB(), and STEP_PCB_MODEL().
|
private |
Definition at line 370 of file step_pcb_model.h.
Referenced by AddPolygonShapes(), and CreatePCB().
|
private |
Definition at line 368 of file step_pcb_model.h.
Referenced by AddPolygonShapes(), and CreatePCB().
|
private |
Definition at line 361 of file step_pcb_model.h.
Referenced by AddPolygonShapes(), and CreatePCB().
|
private |
Definition at line 364 of file step_pcb_model.h.
Referenced by CreatePCB().
|
private |
Definition at line 362 of file step_pcb_model.h.
Referenced by AddBarrel(), AddPadShape(), and CreatePCB().
|
private |
Definition at line 363 of file step_pcb_model.h.
Referenced by AddBarrel(), and CreatePCB().
|
private |
Definition at line 369 of file step_pcb_model.h.
Referenced by AddPolygonShapes(), and CreatePCB().
|
private |
Definition at line 367 of file step_pcb_model.h.
Referenced by AddPolygonShapes(), and CreatePCB().
|
private |
Definition at line 358 of file step_pcb_model.h.
Referenced by CreatePCB().
|
private |
Definition at line 355 of file step_pcb_model.h.
Referenced by AddBackdrill(), AddCounterbore(), AddCountersink(), AddHole(), and CreatePCB().
|
private |
Definition at line 340 of file step_pcb_model.h.
Referenced by getModelLabel(), and STEP_PCB_MODEL().
|
private |
Definition at line 343 of file step_pcb_model.h.
Referenced by CreatePCB(), and SetCopperColor().
|
private |
Definition at line 354 of file step_pcb_model.h.
Referenced by AddBackdrill(), AddCounterbore(), AddCountersink(), AddHole(), and CreatePCB().
|
private |
Definition at line 346 of file step_pcb_model.h.
Referenced by AddPadShape(), AddPolygonShapes(), CreatePCB(), and SetEnabledLayers().
|
private |
Definition at line 337 of file step_pcb_model.h.
Referenced by AddHole(), AddPadShape(), SetExtraPadThickness(), and STEP_PCB_MODEL().
|
private |
Definition at line 336 of file step_pcb_model.h.
Referenced by AddPadShape(), CreatePCB(), SetFuseShapes(), and STEP_PCB_MODEL().
|
private |
Definition at line 334 of file step_pcb_model.h.
Referenced by CreatePCB(), and STEP_PCB_MODEL().
|
private |
Definition at line 350 of file step_pcb_model.h.
Referenced by MakeShapeAsThickSegment(), MakeShapes(), OCCSetMergeMaxDistance(), and STEP_PCB_MODEL().
|
private |
Definition at line 349 of file step_pcb_model.h.
Referenced by STEP_PCB_MODEL().
|
private |
Definition at line 339 of file step_pcb_model.h.
Referenced by getModelLabel().
|
private |
Definition at line 347 of file step_pcb_model.h.
Referenced by SetNetFilter().
|
private |
The current output format for created file.
Definition at line 379 of file step_pcb_model.h.
Referenced by getModelLabel(), SpecializeVariant(), STEP_PCB_MODEL(), WriteBREP(), WriteGLTF(), WritePDF(), WritePLY(), WriteSTEP(), WriteSTL(), WriteU3D(), and WriteXAO().
|
private |
Definition at line 373 of file step_pcb_model.h.
Referenced by AddPadShape(), and WriteXAO().
|
private |
Definition at line 344 of file step_pcb_model.h.
Referenced by CreatePCB(), and SetPadColor().
|
private |
Definition at line 338 of file step_pcb_model.h.
Referenced by CreatePCB(), and isBoardOutlineValid().
|
private |
Name of the PCB, which will most likely be the file name of the path.
Definition at line 376 of file step_pcb_model.h.
Referenced by CreatePCB(), and STEP_PCB_MODEL().
|
private |
Definition at line 341 of file step_pcb_model.h.
Referenced by STEP_PCB_MODEL().
|
private |
Definition at line 380 of file step_pcb_model.h.
Referenced by AddComponent(), AddCounterbore(), AddCountersink(), AddPadShape(), AddPolygonShapes(), CompressSTEP(), CreatePCB(), getModelLabel(), MakeShapeAsThickSegment(), MakeShapes(), performMeshing(), STEP_PCB_MODEL(), WriteBREP(), WriteGLTF(), WritePDF(), WritePLY(), WriteSTEP(), WriteSTL(), WriteU3D(), and WriteXAO().
|
private |
Definition at line 335 of file step_pcb_model.h.
Referenced by AddPadShape(), AddPolygonShapes(), MakePolygonAsWall(), SetSimplifyShapes(), and STEP_PCB_MODEL().
|
private |
Definition at line 345 of file step_pcb_model.h.
Referenced by CreatePCB(), GetCopperLayerKnockouts(), getCopperLayerZPlacement(), and SetStackup().