Fix, again, the extensions of PATHTYPE 4 in GdsParser.
Even when we were creating Contacts of null width or height, they where bumped to the minimal size by the constructor, hence bits sticking out at the end with Gds PATHTYPE 4. Now, allow null size for non-composite (which contains a cut) and non-cut Contacts. * Fix: In GdsParser::readStructure(), always use the bounding box as abutment box if the later is empty (case of small sub-components). This was making the sub-component seemingly diseapear in the viewer... * Fix: In GdsParser::xyToPath(), slight change in xadjust & yadjust. * Change: In Contact::create(), force the contact width and height to the minimal size *only* if it's a composite layer *or* a basic layer of "cut" material.
This commit is contained in:
parent
10c550593e
commit
8604f4a26d
|
@ -963,7 +963,7 @@ namespace {
|
||||||
|
|
||||||
if (_validSyntax) _stream >> _record;
|
if (_validSyntax) _stream >> _record;
|
||||||
|
|
||||||
if (not useLayer0AsBoundary()) {
|
if (not useLayer0AsBoundary() or _cell->getAbutmentBox().isEmpty()) {
|
||||||
UpdateSession::close();
|
UpdateSession::close();
|
||||||
_cell->setAbutmentBox( _cell->getBoundingBox() );
|
_cell->setAbutmentBox( _cell->getBoundingBox() );
|
||||||
UpdateSession::open();
|
UpdateSession::open();
|
||||||
|
@ -1652,17 +1652,23 @@ namespace {
|
||||||
if (points[0].getX() == points[1].getX()) {
|
if (points[0].getX() == points[1].getX()) {
|
||||||
hWidthCap = width;
|
hWidthCap = width;
|
||||||
vWidthCap = bgnextn + twoGrid;
|
vWidthCap = bgnextn + twoGrid;
|
||||||
//yadjust = -vWidthCap/2 + twoGrid;
|
yadjust = (-vWidthCap + twoGrid) / 2;
|
||||||
if (points[0].getY() > points[1].getY())
|
if (points[0].getY() > points[1].getY())
|
||||||
yadjust = -yadjust;
|
yadjust = -yadjust;
|
||||||
} else {
|
} else {
|
||||||
hWidthCap = bgnextn + twoGrid;
|
hWidthCap = bgnextn + twoGrid;
|
||||||
vWidthCap = width;
|
vWidthCap = width;
|
||||||
//xadjust = -hWidthCap/2 + twoGrid;
|
xadjust = (-hWidthCap + twoGrid) / 2;
|
||||||
if (points[0].getX() > points[1].getX())
|
if (points[0].getX() > points[1].getX())
|
||||||
xadjust = -xadjust;
|
xadjust = -xadjust;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cdebug_log(101,0) << " twoGrid=" << DbU::getValueString(twoGrid)
|
||||||
|
<< " hWidthCap=" << DbU::getValueString(hWidthCap)
|
||||||
|
<< " vWidthCap=" << DbU::getValueString(vWidthCap)
|
||||||
|
<< " xadjust=" << DbU::getValueString(xadjust)
|
||||||
|
<< " yadjust=" << DbU::getValueString(yadjust)
|
||||||
|
<< endl;
|
||||||
Contact* source = Contact::create( net
|
Contact* source = Contact::create( net
|
||||||
, layer
|
, layer
|
||||||
, points[0].getX() + xadjust
|
, points[0].getX() + xadjust
|
||||||
|
@ -1692,7 +1698,7 @@ namespace {
|
||||||
if (points[i-1].getX() == points[i].getX()) {
|
if (points[i-1].getX() == points[i].getX()) {
|
||||||
hWidthCap = width;
|
hWidthCap = width;
|
||||||
vWidthCap = endextn + twoGrid;
|
vWidthCap = endextn + twoGrid;
|
||||||
//yadjust = vWidthCap/2 + twoGrid;
|
yadjust = (vWidthCap + twoGrid) /2;
|
||||||
if (points[i-1].getY() > points[i].getY())
|
if (points[i-1].getY() > points[i].getY())
|
||||||
yadjust = -yadjust;
|
yadjust = -yadjust;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1700,7 +1706,7 @@ namespace {
|
||||||
<< " twoGrid=" << DbU::getValueString(twoGrid) << endl;
|
<< " twoGrid=" << DbU::getValueString(twoGrid) << endl;
|
||||||
hWidthCap = endextn + twoGrid;
|
hWidthCap = endextn + twoGrid;
|
||||||
vWidthCap = width;
|
vWidthCap = width;
|
||||||
//xadjust = hWidthCap/2 - twoGrid;
|
xadjust = (hWidthCap - twoGrid) / 2;
|
||||||
if (points[i-1].getX() > points[i].getX())
|
if (points[i-1].getX() > points[i].getX())
|
||||||
xadjust = -xadjust;
|
xadjust = -xadjust;
|
||||||
cdebug_log(101,0) << "xadjust=" << DbU::getValueString(xadjust) << endl;
|
cdebug_log(101,0) << "xadjust=" << DbU::getValueString(xadjust) << endl;
|
||||||
|
|
|
@ -119,6 +119,8 @@ Contact::Contact(Net* net, const Layer* layer, DbU::Unit x, DbU::Unit y, DbU::Un
|
||||||
if (not _layer)
|
if (not _layer)
|
||||||
throw Error("Contact::Contact(): Can't create " + _TName("Contact") + ", NULL layer.");
|
throw Error("Contact::Contact(): Can't create " + _TName("Contact") + ", NULL layer.");
|
||||||
|
|
||||||
|
const BasicLayer* basicLayer = dynamic_cast<const BasicLayer*>( layer );
|
||||||
|
if (not basicLayer or basicLayer->getMaterial() != BasicLayer::Material::cut) return;
|
||||||
if ( _width < _layer->getMinimalSize() ) _width = _layer->getMinimalSize();
|
if ( _width < _layer->getMinimalSize() ) _width = _layer->getMinimalSize();
|
||||||
if ( _height < _layer->getMinimalSize() ) _height = _layer->getMinimalSize();
|
if ( _height < _layer->getMinimalSize() ) _height = _layer->getMinimalSize();
|
||||||
}
|
}
|
||||||
|
@ -147,6 +149,8 @@ Contact::Contact(Net* net, Component* anchor, const Layer* layer, DbU::Unit dx,
|
||||||
|
|
||||||
_anchorHook.attach(anchor->getBodyHook());
|
_anchorHook.attach(anchor->getBodyHook());
|
||||||
|
|
||||||
|
const BasicLayer* basicLayer = dynamic_cast<const BasicLayer*>( layer );
|
||||||
|
if (not basicLayer or basicLayer->getMaterial() != BasicLayer::Material::cut) return;
|
||||||
if ( _width < _layer->getMinimalSize() ) _width = _layer->getMinimalSize();
|
if ( _width < _layer->getMinimalSize() ) _width = _layer->getMinimalSize();
|
||||||
if ( _height < _layer->getMinimalSize() ) _height = _layer->getMinimalSize();
|
if ( _height < _layer->getMinimalSize() ) _height = _layer->getMinimalSize();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue