LengthUnit.Millimeters,
Double.parseDouble(matcher.group(2)),
Double.parseDouble(matcher.group(3)),
0,
Double.parseDouble(matcher.group(4))));
Configuration cfg = Configuration.get();
if (cfg != null && createMissingParts) {
String packageId = matcher.group(6);
String partId = packageId + "-" + matcher.group(5);
Part part = cfg.getPart(partId);
if (part == null) {
part = new Part(partId);
Package pkg = cfg.getPackage(packageId);
if (pkg == null) {
pkg = new Package(packageId);
cfg.addPackage(pkg);
}
part.setPackage(pkg);
cfg.addPart(part);
}
placement.setPart(part);
}