Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix default footprint setup #1167

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 45 additions & 106 deletions docker/development/initdb/dump.sql
Original file line number Diff line number Diff line change
Expand Up @@ -169,41 +169,41 @@ CREATE TABLE `Footprint` (
LOCK TABLES `Footprint` WRITE;
/*!40000 ALTER TABLE `Footprint` DISABLE KEYS */;
INSERT INTO `Footprint` VALUES (1,3,'CBGA-32','32-Lead Ceramic Ball Grid Array');
INSERT INTO `Footprint` VALUES (2,5,'FCBGA-576','576-Ball Ball Grid Array, Thermally Enhanced');
INSERT INTO `Footprint` VALUES (3,7,'PBGA-119','119-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (4,9,'PBGA-169','169-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (5,11,'PBGA-225','225-Ball Plastic a Ball Grid Array');
INSERT INTO `Footprint` VALUES (6,13,'PBGA-260','260-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (7,15,'PBGA-297','297-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (8,17,'PBGA-304','304-Lead Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (9,19,'PBGA-316','316-Lead Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (10,21,'PBGA-324','324-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (11,23,'PBGA-385','385-Lead Ball Grid Array');
INSERT INTO `Footprint` VALUES (12,25,'PBGA-400','400-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (13,27,'PBGA-484','484-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (14,29,'PBGA-625','625-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (15,31,'PBGA-676','676-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (16,33,'SBGA-256','256-Ball Ball Grid Array, Thermally Enhanced');
INSERT INTO `Footprint` VALUES (17,35,'SBGA-304','304-Ball Ball Grid Array, Thermally Enhanced');
INSERT INTO `Footprint` VALUES (18,37,'SBGA-432','432-Ball Ball Grid Array, Thermally Enhanced');
INSERT INTO `Footprint` VALUES (19,39,'CerDIP-8','8-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (20,41,'CerDIP-14','14-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (21,43,'CerDIP-16','16-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (22,45,'CerDIP-18','18-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (23,47,'CerDIP-20','20-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (24,49,'CerDIP-24 Narrow','24-Lead Ceramic Dual In-Line Package - Narrow Body');
INSERT INTO `Footprint` VALUES (25,51,'CerDIP-24 Wide','24-Lead Ceramic Dual In-Line Package - Wide Body');
INSERT INTO `Footprint` VALUES (26,53,'CerDIP-28','28-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (27,55,'CerDIP-40','40-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (28,57,'PDIP-8','8-Lead Plastic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (29,59,'PDIP-14','14-Lead Plastic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (30,61,'PDIP-16','16-Lead Plastic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (31,63,'PDIP-18','18-Lead Plastic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (32,65,'PDIP-20','20-Lead Plastic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (33,67,'PDIP-24','24-Lead Plastic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (34,69,'PDIP-28 Narrow','28-Lead Plastic Dual In-Line Package, Narrow Body');
INSERT INTO `Footprint` VALUES (35,71,'PDIP-28 Wide','28-Lead Plastic Dual In-Line Package, Wide Body');
INSERT INTO `Footprint` VALUES (36,NULL,'SOIC-N-EP-8','8-Lead Standard Small Outline Package, with Expose Pad');
INSERT INTO `Footprint` VALUES (2,4,'FCBGA-576','576-Ball Ball Grid Array, Thermally Enhanced');
INSERT INTO `Footprint` VALUES (3,5,'PBGA-119','119-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (4,5,'PBGA-169','169-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (5,5,'PBGA-225','225-Ball Plastic a Ball Grid Array');
INSERT INTO `Footprint` VALUES (6,5,'PBGA-260','260-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (7,5,'PBGA-297','297-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (8,5,'PBGA-304','304-Lead Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (9,5,'PBGA-316','316-Lead Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (10,5,'PBGA-324','324-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (11,5,'PBGA-385','385-Lead Ball Grid Array');
INSERT INTO `Footprint` VALUES (12,5,'PBGA-400','400-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (13,5,'PBGA-484','484-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (14,5,'PBGA-625','625-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (15,5,'PBGA-676','676-Ball Plastic Ball Grid Array');
INSERT INTO `Footprint` VALUES (16,6,'SBGA-256','256-Ball Ball Grid Array, Thermally Enhanced');
INSERT INTO `Footprint` VALUES (17,6,'SBGA-304','304-Ball Ball Grid Array, Thermally Enhanced');
INSERT INTO `Footprint` VALUES (18,6,'SBGA-432','432-Ball Ball Grid Array, Thermally Enhanced');
INSERT INTO `Footprint` VALUES (19,8,'CerDIP-8','8-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (20,8,'CerDIP-14','14-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (21,8,'CerDIP-16','16-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (22,8,'CerDIP-18','18-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (23,8,'CerDIP-20','20-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (24,8,'CerDIP-24 Narrow','24-Lead Ceramic Dual In-Line Package - Narrow Body');
INSERT INTO `Footprint` VALUES (25,8,'CerDIP-24 Wide','24-Lead Ceramic Dual In-Line Package - Wide Body');
INSERT INTO `Footprint` VALUES (26,8,'CerDIP-28','28-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (27,8,'CerDIP-40','40-Lead Ceramic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (28,9,'PDIP-8','8-Lead Plastic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (29,9,'PDIP-14','14-Lead Plastic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (30,9,'PDIP-16','16-Lead Plastic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (31,9,'PDIP-18','18-Lead Plastic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (32,9,'PDIP-20','20-Lead Plastic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (33,9,'PDIP-24','24-Lead Plastic Dual In-Line Package');
INSERT INTO `Footprint` VALUES (34,9,'PDIP-28 Narrow','28-Lead Plastic Dual In-Line Package, Narrow Body');
INSERT INTO `Footprint` VALUES (35,9,'PDIP-28 Wide','28-Lead Plastic Dual In-Line Package, Wide Body');
INSERT INTO `Footprint` VALUES (36,10,'SOIC-N-EP-8','8-Lead Standard Small Outline Package, with Expose Pad');
/*!40000 ALTER TABLE `Footprint` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `FootprintAttachment`;
Expand Down Expand Up @@ -253,77 +253,16 @@ CREATE TABLE `FootprintCategory` (

LOCK TABLES `FootprintCategory` WRITE;
/*!40000 ALTER TABLE `FootprintCategory` DISABLE KEYS */;
INSERT INTO `FootprintCategory` VALUES (1,NULL,1,142,0,1,'Root Category',NULL,'Root Category');
INSERT INTO `FootprintCategory` VALUES (2,1,2,5,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (3,2,3,4,2,1,'CBGA',NULL,'Root Category ➤ BGA ➤ CBGA');
INSERT INTO `FootprintCategory` VALUES (4,1,6,9,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (5,4,7,8,2,1,'FCBGA',NULL,'Root Category ➤ BGA ➤ FCBGA');
INSERT INTO `FootprintCategory` VALUES (6,1,10,13,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (7,6,11,12,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (8,1,14,17,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (9,8,15,16,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (10,1,18,21,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (11,10,19,20,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (12,1,22,25,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (13,12,23,24,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (14,1,26,29,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (15,14,27,28,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (16,1,30,33,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (17,16,31,32,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (18,1,34,37,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (19,18,35,36,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (20,1,38,41,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (21,20,39,40,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (22,1,42,45,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (23,22,43,44,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (24,1,46,49,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (25,24,47,48,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (26,1,50,53,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (27,26,51,52,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (28,1,54,57,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (29,28,55,56,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (30,1,58,61,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (31,30,59,60,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (32,1,62,65,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (33,32,63,64,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (34,1,66,69,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (35,34,67,68,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (36,1,70,73,1,1,'BGA',NULL,'Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES (37,36,71,72,2,1,'PBGA',NULL,'Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES (38,1,74,77,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (39,38,75,76,2,1,'CERDIP',NULL,'Root Category ➤ DIP ➤ CERDIP');
INSERT INTO `FootprintCategory` VALUES (40,1,78,81,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (41,40,79,80,2,1,'CERDIP',NULL,'Root Category ➤ DIP ➤ CERDIP');
INSERT INTO `FootprintCategory` VALUES (42,1,82,85,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (43,42,83,84,2,1,'CERDIP',NULL,'Root Category ➤ DIP ➤ CERDIP');
INSERT INTO `FootprintCategory` VALUES (44,1,86,89,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (45,44,87,88,2,1,'CERDIP',NULL,'Root Category ➤ DIP ➤ CERDIP');
INSERT INTO `FootprintCategory` VALUES (46,1,90,93,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (47,46,91,92,2,1,'CERDIP',NULL,'Root Category ➤ DIP ➤ CERDIP');
INSERT INTO `FootprintCategory` VALUES (48,1,94,97,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (49,48,95,96,2,1,'CERDIP',NULL,'Root Category ➤ DIP ➤ CERDIP');
INSERT INTO `FootprintCategory` VALUES (50,1,98,101,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (51,50,99,100,2,1,'CERDIP',NULL,'Root Category ➤ DIP ➤ CERDIP');
INSERT INTO `FootprintCategory` VALUES (52,1,102,105,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (53,52,103,104,2,1,'CERDIP',NULL,'Root Category ➤ DIP ➤ CERDIP');
INSERT INTO `FootprintCategory` VALUES (54,1,106,109,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (55,54,107,108,2,1,'CERDIP',NULL,'Root Category ➤ DIP ➤ CERDIP');
INSERT INTO `FootprintCategory` VALUES (56,1,110,113,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (57,56,111,112,2,1,'PDIP',NULL,'Root Category ➤ DIP ➤ PDIP');
INSERT INTO `FootprintCategory` VALUES (58,1,114,117,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (59,58,115,116,2,1,'PDIP',NULL,'Root Category ➤ DIP ➤ PDIP');
INSERT INTO `FootprintCategory` VALUES (60,1,118,121,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (61,60,119,120,2,1,'PDIP',NULL,'Root Category ➤ DIP ➤ PDIP');
INSERT INTO `FootprintCategory` VALUES (62,1,122,125,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (63,62,123,124,2,1,'PDIP',NULL,'Root Category ➤ DIP ➤ PDIP');
INSERT INTO `FootprintCategory` VALUES (64,1,126,129,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (65,64,127,128,2,1,'PDIP',NULL,'Root Category ➤ DIP ➤ PDIP');
INSERT INTO `FootprintCategory` VALUES (66,1,130,133,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (67,66,131,132,2,1,'PDIP',NULL,'Root Category ➤ DIP ➤ PDIP');
INSERT INTO `FootprintCategory` VALUES (68,1,134,137,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (69,68,135,136,2,1,'PDIP',NULL,'Root Category ➤ DIP ➤ PDIP');
INSERT INTO `FootprintCategory` VALUES (70,1,138,141,1,1,'DIP',NULL,'Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES (71,70,139,140,2,1,'PDIP',NULL,'Root Category ➤ DIP ➤ PDIP');
INSERT INTO `FootprintCategory` VALUES ('1','null','1','20','0','1','Root Category','','Root Category');
INSERT INTO `FootprintCategory` VALUES ('2','1','2','11','1','1','BGA','null','Root Category ➤ BGA');
INSERT INTO `FootprintCategory` VALUES ('3','2','3','4','2','1','CBGA','null','Root Category ➤ BGA ➤ CBGA');
INSERT INTO `FootprintCategory` VALUES ('4','2','5','6','2','1','FCBGA','null','Root Category ➤ BGA ➤ FCBGA');
INSERT INTO `FootprintCategory` VALUES ('5','2','7','8','2','1','PBGA','null','Root Category ➤ BGA ➤ PBGA');
INSERT INTO `FootprintCategory` VALUES ('6','2','9','10','2','1','SBGA','','Root Category ➤ BGA ➤ SBGA');
INSERT INTO `FootprintCategory` VALUES ('7','1','12','17','1','1','DIP','null','Root Category ➤ DIP');
INSERT INTO `FootprintCategory` VALUES ('8','7','13','14','2','1','CERDIP','null','Root Category ➤ DIP ➤ CERDIP');
INSERT INTO `FootprintCategory` VALUES ('9','7','15','16','2','1','PDIP','null','Root Category ➤ DIP ➤ PDIP');
INSERT INTO `FootprintCategory` VALUES ('10','1','18','19','1','1','PDIP','null','Root Category ➤ SOIC');
/*!40000 ALTER TABLE `FootprintCategory` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `FootprintImage`;
Expand Down
10 changes: 10 additions & 0 deletions src/PartKeepr/FootprintBundle/Entity/FootprintCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ public function getFootprints()
return $this->footprints->getValues();
}

/**
* Adds a child.
*
* @param FootprintCategory $child
*/
public function addChild(FootprintCategory $child)
{
$this->children[] = $child;
}

/**
* Returns the children.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ PBGA-676:
# SBGA
SBGA-256:
description: 256-Ball Ball Grid Array, Thermally Enhanced
category: BGA/PBGA
category: BGA/SBGA
image: BGA/SBGA-256.png
SBGA-304:
description: 304-Ball Ball Grid Array, Thermally Enhanced
category: BGA/PBGA
category: BGA/SBGA
image: BGA/SBGA-304.png
SBGA-432:
description: 432-Ball Ball Grid Array, Thermally Enhanced
category: BGA/PBGA
category: BGA/SBGA
image: BGA/SBGA-432.png

# Ceramic DIP
Expand Down Expand Up @@ -150,6 +150,9 @@ PDIP-28 Wide:
description: 28-Lead Plastic Dual In-Line Package, Wide Body
category: DIP/PDIP
image: DIP/PDIP-28-W.png

# SOIC
SOIC-N-EP-8:
description: 8-Lead Standard Small Outline Package, with Expose Pad
category: SOIC

Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected function addFootprintCategoryPath(array $path, FootprintCategory $pare
$category = new FootprintCategory();
$category->setParent($parentNode);
$category->setName($name);
$parentNode->getChildren()[] = $category;
$parentNode->addChild($category);

$this->entityManager->persist($category);
}
Expand Down