-
Notifications
You must be signed in to change notification settings - Fork 872
ODB: cuboid shape for dbMarker #9516
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
Changes from all commits
6aabb94
d43033f
3143e7f
254881d
eba3be8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,6 +146,12 @@ dbIStream& operator>>(dbIStream& stream, _dbMarker& obj) | |
| obj.shapes_.emplace_back(p); | ||
| break; | ||
| } | ||
| case _dbMarker::ShapeType::kCuboid: { | ||
| Cuboid c; | ||
| stream >> c; | ||
| obj.shapes_.emplace_back(c); | ||
| break; | ||
| } | ||
|
Comment on lines
+149
to
+154
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True but 3dblox violations are not yet handled in that scope altogether. I intent to address this in a separate PR. |
||
| } | ||
| } | ||
| // User Code End >> | ||
|
|
@@ -182,9 +188,12 @@ dbOStream& operator<<(dbOStream& stream, const _dbMarker& obj) | |
| } else if (std::holds_alternative<Rect>(shape)) { | ||
| stream << _dbMarker::ShapeType::kRect; | ||
| stream << std::get<Rect>(shape); | ||
| } else { | ||
| } else if (std::holds_alternative<Polygon>(shape)) { | ||
|
osamahammad21 marked this conversation as resolved.
|
||
| stream << _dbMarker::ShapeType::kPolygon; | ||
| stream << std::get<Polygon>(shape); | ||
| } else if (std::holds_alternative<Cuboid>(shape)) { | ||
|
osamahammad21 marked this conversation as resolved.
|
||
| stream << _dbMarker::ShapeType::kCuboid; | ||
| stream << std::get<Cuboid>(shape); | ||
| } | ||
| } | ||
| // User Code End << | ||
|
|
@@ -708,6 +717,12 @@ void dbMarker::addShape(const Polygon& polygon) | |
| marker->shapes_.emplace_back(polygon); | ||
| } | ||
|
|
||
| void dbMarker::addShape(const Cuboid& cuboid) | ||
| { | ||
| _dbMarker* marker = (_dbMarker*) this; | ||
| marker->shapes_.emplace_back(cuboid); | ||
| } | ||
|
|
||
| void dbMarker::setTechLayer(dbTechLayer* layer) | ||
| { | ||
| _dbMarker* marker = (_dbMarker*) this; | ||
|
|
@@ -782,8 +797,10 @@ Rect dbMarker::getBBox() const | |
| } | ||
| } else if (std::holds_alternative<Rect>(shape)) { | ||
| bbox.merge(std::get<Rect>(shape)); | ||
| } else { | ||
| } else if (std::holds_alternative<Polygon>(shape)) { | ||
| bbox.merge(std::get<Polygon>(shape).getEnclosingRect()); | ||
| } else if (std::holds_alternative<Cuboid>(shape)) { | ||
| bbox.merge(std::get<Cuboid>(shape).getEnclosingRect()); | ||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.