Improve crossing check for the layout algorithm.
This commit is contained in:
parent
f2624692e3
commit
3ce704d039
|
@ -2,6 +2,7 @@
|
||||||
- Bug fixes.
|
- Bug fixes.
|
||||||
- Improve canceling nesting.
|
- Improve canceling nesting.
|
||||||
- Fix incorrect nesting status for valid cases.
|
- Fix incorrect nesting status for valid cases.
|
||||||
|
- Improve crossing check for the layout algorithm.
|
||||||
|
|
||||||
# Version 0.7.40 Nov 23, 2020
|
# Version 0.7.40 Nov 23, 2020
|
||||||
- New function Warning.
|
- New function Warning.
|
||||||
|
|
|
@ -480,10 +480,11 @@ VPosition::CrossingType VPosition::Crossing(const VLayoutPiece &detail) const
|
||||||
|
|
||||||
for(auto &position : m_data.positionsCache)
|
for(auto &position : m_data.positionsCache)
|
||||||
{
|
{
|
||||||
if (position.boundingRect.intersects(layoutBoundingRect) || position.boundingRect.contains(detailBoundingRect))
|
if (position.boundingRect.intersects(layoutBoundingRect) || position.boundingRect.contains(detailBoundingRect)
|
||||||
|
|| detailBoundingRect.contains(position.boundingRect))
|
||||||
{
|
{
|
||||||
if (position.layoutAllowancePath.contains(contourPath) ||
|
if (position.layoutAllowancePath.contains(contourPath) || contourPath.contains(position.layoutAllowancePath)
|
||||||
position.layoutAllowancePath.intersects(layoutAllowancePath))
|
|| position.layoutAllowancePath.intersects(layoutAllowancePath))
|
||||||
{
|
{
|
||||||
return CrossingType::Intersection;
|
return CrossingType::Intersection;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user