Commit Graph

1003 Commits

Author SHA1 Message Date
Seth Hillbrand f8a4edb1c9 First pass renaming module to footprint
This is mostly in comments and the few remainin text strings that
reference module
2020-10-20 20:49:11 -07:00
Seth Hillbrand 4085757aeb Remove beginning/ending spaces in translations
Adding space padding makes translations more difficult by increasing
string counts
2020-10-20 12:08:04 -07:00
jean-pierre charras 539ac4c214 Remove a few include<wx/wx.h> in many files that do not actually use this include. 2020-10-19 09:00:50 +02:00
jean-pierre charras f6b4b66a86 Avoid include wx/wx.h in many files that do not actually use this include.
Including wx.h includes the full set of wxWidgets include files, that is not good,
and can create some conflicts with some Windows headers on msys2.
2020-10-18 18:21:34 +02:00
Ian McInerney 06f01d0d8a Add platform-specific code to allow wxChoice to ellipsize
Fixes https://gitlab.com/kicad/code/kicad/issues/5377
2020-10-17 23:20:13 +01:00
Jeff Young 92d84b0d67 Naming updates. 2020-10-15 01:35:16 +01:00
Jeff Young 1703729269 Require explicit decl of maxError and errorLocations.
This should reduce both performance issues and clearance issues.
2020-10-13 13:49:07 +01:00
Jeff Young 07f139381b Nullptr safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/5893
2020-10-06 12:49:29 +01:00
Jeff Young 52794b3456 Nullptr safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/5893
2020-10-06 12:08:31 +01:00
Mario Luzeiro d31c5c41e6 3D-Viewer: add an infobar to the panel preview 2020-10-06 10:42:46 +00:00
Mario Luzeiro 1cbe8fcc1f 3D-Viewer: check for minimum required version of OpenGL
Fixes https://gitlab.com/kicad/code/kicad/issues/5286
2020-10-06 10:42:46 +00:00
Jeff Young 37906511f5 Class renaming.
DRAWSEGMENT  -> PCB_SHAPE
EDGE_MODULE  -> FP_SHAPE
TEXTE_PCB    -> PCB_TEXT
TEXTE_MODULE -> FP_TEXT
2020-10-05 11:55:33 +01:00
Mark Roszko a28a0e14ba Fix conversion warnings 2020-10-05 10:41:14 +00:00
Jeff Young 7a4900b8dc PCB_LINE_T -> PCB_SHAPE_T and PCB_MODULE_EDGE_T -> PCB_FP_SHAPE_T
Also updated footprint text and zone types for consistencey.
2020-10-04 16:49:04 +01:00
jean-pierre charras bda275de46 more cleanup about removing useless include 2020-10-03 11:48:16 +02:00
Mario Luzeiro cea1a56f5f 3D-Viewer: set default alpha when import from legacy
keep the current alpha when import colors from stackup.
request a refresh instead of a reload when using OpenGL render.

Fixes https://gitlab.com/kicad/code/kicad/issues/5717
2020-10-02 23:14:42 +00:00
Jeff Young 5b7c6e100d Clip tech layers to board in 3D renderer.
Fixes https://gitlab.com/kicad/code/kicad/issues/4873
2020-10-01 16:50:22 +01:00
Jeff Young 3c01147f10 Fix 3D hole knock-out of silkscreen.
It still doesn't knock-out the board edges, but this is a good first
step.

Fixes https://gitlab.com/kicad/code/kicad/issues/4837
2020-10-01 11:49:28 +01:00
jean-pierre charras 42350a4928 Minor code cleanup: remove useless include or useless code.
fix also a minor compil warning
2020-10-01 11:36:15 +02:00
Ian McInerney 38584e55dd Don't process an invalid window position
This is used for computing a vector index, so it can't be
negative.
2020-09-30 23:34:04 +01:00
Ian McInerney a5ed5e5675 Handle single line segments on footprint edgecuts
Also, only display an infobar message for footprints when
there is no footprint loaded (instead of if the outline
isn't closed).

Fixes https://gitlab.com/kicad/code/kicad/issues/4866
2020-09-30 23:34:04 +01:00
Ian McInerney 78c43158f4 Annotate the board class with if it is for a footprint edit/view 2020-09-30 23:34:04 +01:00
jean-pierre charras 3f8c9d49f8 Revert "Code cleanup: remove useless wx/wx.h include inside a few files."
due to compil issue on Linux

This reverts commit cffccc3970.
2020-09-30 20:47:20 +02:00
jean-pierre charras cffccc3970 Code cleanup: remove useless wx/wx.h include inside a few files.
in most of files, including wx.h is not necessary, when only 2 or 3 wx files must be included.
Moreover, on windows, including wx.h sometimes create compil warnings about
shadowed vars defined in some specific windows headers.
2020-09-30 20:03:27 +02:00
Seth Hillbrand bf3cb0b1d0 Standardize pad type enums 2020-09-30 08:38:35 -07:00
Jeff Young d3f8f2b81e Remove confusion between pad->IsOnLayer and pad->IsPadOnLayer 2020-09-30 11:50:51 +01:00
Mario Luzeiro ab57c93c98 3D-Viewer: add selection color as an option 2020-09-28 02:26:25 +00:00
Mario Luzeiro ec3c20bf84 3D-Viewer: do not use selection while on preview 2020-09-28 02:26:25 +00:00
Mario Luzeiro 6db0c58e8f 3D-Viewer: fix some code style 2020-09-28 02:26:25 +00:00
Mario Luzeiro 5205709399 3D-Viewer: use LAYER_SELECT_OVERLAY color for selection
preserve material transparency while rendering as selected
2020-09-28 02:26:25 +00:00
Mario Luzeiro 10676eb926 3D-Viewer: only show intersection information while using opengl 2020-09-28 02:26:25 +00:00
Mario Luzeiro 3f2cada6c6 3D-Viewer: fix a bug introduced in the previous commits 2020-09-28 02:26:25 +00:00
Mario Luzeiro 6bc19dbfe9 3D-Viewer: intercect modules and cooper items
show module and net information.
highlight shapes when selected.
2020-09-28 02:26:25 +00:00
Mario Luzeiro a1e94c2583 3D-Viewer: request a redraw when a footprint is selected in pcbnew 2020-09-28 02:26:25 +00:00
Mario Luzeiro fe51cc947c 3D-Viewer: render 3D shapes in green if footprint is selected 2020-09-28 02:26:25 +00:00
Mario Luzeiro c7a546042e 3D-Viewer: add skip material to model loading 2020-09-28 02:26:25 +00:00
Mario Luzeiro 0ab82ef66a 3D-Viewer: add an option to enable render of plated pads
by default this option is disabled and will render as in previous
version.
2020-09-27 13:35:55 +00:00
Ian McInerney fc565edb33 Add a palette to the toolbars to display groups of actions
This adds a palette to toolbar items that displays groups
of actions when long-pressed on a button.
2020-09-27 01:00:44 +01:00
jean-pierre charras 0b03d8a5ff Fix a few Coverity warnings. 2020-09-20 16:30:23 +02:00
jean-pierre charras 6ec6baf401 3d viewer: save color settings.
The call to SaveColorSettings() was not at the right place, and the new
color settings never saved.

Fixes #5529
https://gitlab.com/kicad/code/kicad/issues/5529
2020-09-17 17:15:25 +02:00
Jon Evans e9b627bfd8 ADDED: Center marker dimension type 2020-09-16 20:55:11 -04:00
Jon Evans 75ffce1a0b ADDED: Leader dimension object
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5555
2020-09-15 23:37:38 -04:00
jean-pierre charras 98339cd5eb 3d viewer: fix incorrect calculation of pad hole size of vertical shape.
Fixes #5627
https://gitlab.com/kicad/code/kicad/issues/5627
2020-09-15 10:17:31 +02:00
Jon Evans b11e315d10 Refactor DIMENSION to hide internal details; add some new properties
This is a board file format change to account for the new properties.
Also, we now only store the critical information about the dimension's
geometry in the board, rather than storing every drawn line.

The DIMENSION object is now an abstract base, and ALIGNED_DIMENSION
is the implementation that exists today (we will add more dimension
types in the future)
2020-09-11 21:12:36 -04:00
Jeff Young e2bc7557cc Clean up arc/circle polygonization.
1) For a while now we've been using a calculated seg count from a given
maxError, and a correction factor to push the radius out so that all
the error is outside the arc/circle.  However, the second calculation
(which pre-dates the first) is pretty much just the inverse of the first
(and yields nothing more than maxError back). This is particularly
sub-optimal given the cost of trig functions.

2) There are a lot of old optimizations to reduce segcounts in certain
situations, someting that our error-based calculation compensates for
 anyway.  (Smaller radii need fewer segments to meet the maxError
condition.) But perhaps more importantly we now surface maxError in the
UI and we don't really want to call it "Max deviation except when it's
not".

3) We were also clamping the segCount twice: once in the calculation
routine and once in most of it's callers.  Furthermore, the caller
clamping was inconsistent (both in being done and in the clamping
value). We now clamp only in the calculation routine.

4) There's no reason to use the correction factors in the 3Dviewer;
it's just a visualization and whether the polygonization error is
inside or outside the shape isn't really material.

5) The arc-correction-disabling stuff (used for solder mask layer) was
somewhat fragile in that it depended on the caller to turn it back on
afterwards.  It's now only exposed as a RAII object which  automatically
cleans up when it goes out of scope.

6) There were also bugs in a couple of the polygonization routines where
we'd accumulate round-off error in adding up the segments and end up with
an overly long last segment (which of course would voilate the error
max). This was the cause of the linked bug and also some issues with vias
that we had fudged in the past with extra clearance.

Fixes https://gitlab.com/kicad/code/kicad/issues/5567
2020-09-11 11:23:49 +01:00
Seth Hillbrand 08d4e91f3b Change partitions to fixed size
Partititioning small polygons causes excessive partitions when we use a
fixed number of cells per side.  Partitioning by size keeps the
partition count limited and speeds the calculations.

Also adds an option to not partition the grid for elements (like 3d
raytracing) that do not need it.

Fixes https://gitlab.com/kicad/code/kicad/issues/5579
2020-09-10 09:31:20 -07:00
Mario Luzeiro d52c475b27 3D-Viewer: implements plated copper texture
improves copper and board textures.
Related to https://gitlab.com/kicad/code/kicad/-/issues/2058
Use only one PerlinNoise class.
2020-09-08 21:02:20 +00:00
Mario Luzeiro f0edbd088c 3D-Viewer: fixing z-fight issues 2020-09-08 21:02:20 +00:00
Mario Luzeiro e288218c4f 3D-Viewer: subtract pads poly to F_Cu and B_Cu poly layers 2020-09-08 21:02:20 +00:00
Mario Luzeiro d7a95951e1 3D-Viewer: implement nonplated copper on raytracing 2020-09-08 21:02:19 +00:00