outp = peripheries;
if (peripheries < 1)
outp = 1;
+
+ if (peripheries >= 1 && penwidth > 0) {
+ // allocate extra vertices representing the outline, i.e., the outermost
+ // periphery with penwidth taken into account
+ ++outp;
+ }
+
if (sides < 3) { /* ellipses */
sides = 2;
vertices = N_NEW(outp * sides, pointf);
bb.y = 2. * P.y;
}
outline_bb = bb;
+ if (outp > peripheries) {
+ // add an outline at half the penwidth outside the outermost periphery
+ P.x += penwidth / 2;
+ P.y += penwidth / 2;
+ i = sides * peripheries;
+ vertices[i].x = -P.x;
+ vertices[i].y = -P.y;
+ i++;
+ vertices[i].x = P.x;
+ vertices[i].y = P.y;
+ i++;
+ outline_bb.x = 2. * P.x;
+ outline_bb.y = 2. * P.y;
+ }
} else {
/*
* the current segments, and outside by GAP distance, intersect.
*/
- if (peripheries >= 1 && penwidth > 0) {
- // allocate extra vertices representing the outline, i.e., the outermost
- // periphery with penwidth taken into account
- ++outp;
- }
-
vertices = N_NEW(outp * sides, pointf);
if (ND_shape(n)->polygon->vertices) {
poly_desc_t* pd = (poly_desc_t*)ND_shape(n)->polygon->vertices;
#include "test_edge_node_overlap_utilities.h"
#include "test_utilities.h"
-TEST_CASE("Overlap ellipse node shapes",
- "[!shouldfail] Test that an edge connected to an ellipse based node "
- "touches that node and does not overlap it too much, regardless of "
- "the node shape") {
+TEST_CASE(
+ "Overlap ellipse node shapes",
+ "Test that an edge connected to an ellipse based node touches that "
+ "node and does not overlap it too much, regardless of the node shape") {
const auto shape = GENERATE_COPY(
filter([](const std::string_view shape) { return shape != "point"; },