What exactly does Polygon constrain and how to edit?

What exactly does Polygon constrain and how to edit?

graham.wideman
Advocate Advocate
2,844 Views
6 Replies
Message 1 of 7

What exactly does Polygon constrain and how to edit?

graham.wideman
Advocate
Advocate

When you use Sketch > Create > Polygon, what exactly does Fusion create, and how do you edit it?  For example, create a Hexagon.

 

What I would expect, under the hood:

  • A piece of geometry with 6 side edges and 6 vertices
  • The sides are equal lengths, and attached to each other at the vertices
  • A variable parameter for the "size", which internally might be based on distance from center to a vertex, or the length of a side.
  • A variable parameter for location of the center of polygon
  • A variable parameter for the orientation angle of the polygon

... and with those three variables initially unconstrained, I would expect to adjust them with UI gestures, or be able to either edit them in a dialog box, or to be able to apply external graphical constraints, such as X, Y distance dimensions to a vertex, that starts to constrain the position, and then additional constraints could dimension the size and orientation.

 

However, this does not seem to entirely fit the way Fusion polygons behave.

 

After initially creating a Hexagon at some random (non-origin) location, we can select it and notice that it has a Pentagon icon at the center. What does that actually do? Double clicking on it doesn't seem to do anything.

 

Attempting to drag the Hexagon using its center point does not move the Hexagon. Instead, one of the vertices stays fixed in place, and dragging the center point causes the Hexagon to expand and rotate.  Not the expected behavior at all. But inconsistent with that (though more expected), dragging any other vertices does in indeed move the Hexagon while preserving size and orientation.

 

Now browsing the vertices, we see that each one has a Coincident constraint? This is puzzling -- apparently the feature of having the edges join to each other is separate from the Polygon constraint?

 

We can even delete the coincident constraint at one or two of the vertices. For some of the now-half-constrained edge lines, the free endpoint can be dragged, rotating and stretching that line. But for others of the supposedly now-half-constrained lines, dragging the free endpoint moves the remainder of the polygon around.  This acts particularly erratically if there are any additional external constraints on the Polygon.

 

Deleting the actual Pentagon-icon Polygon constraint does genuinely seem to turn the Hexagon into just six lines joined with coincident endpoints, and then dragging one of those endpoints stretches the two adjoining lines as expected.

 

So as near as I can tell, the Polygon menu function creates a "thing" that consists of a hodgepodge of individual lines whose endpoints are 'joined" with coincident-constraints that are exposed to the user (at risk of accidental disruption), plus the Polygon constraint itself that maintains some number of additional constraints (endpoint positions? relative angles?) to make the polygon a uniform shape with equal-length sides and equal-angle vertices. 

 

Those inscrutable Polygon constraints are evidently not symmetrical, so that their interaction with UI gestures, and with other external constraints is sometimes unexpected. And that apparatus loses the plot if you accidentally break one or more of the exposed vertex coincident constraints. That accident is particularly apt to happen, since polygon vertices are exactly the places where you are likely to add additional lines and coincident constraints that you later attempt to delete, accidentally clobbering the integrity of the Polygon despite the continued presence of the Polygon constraint icon.

 

Polygons should be a powerful and easy-to-apply feature, but I consistently stumble over them doing something unexpected that's seemingly unrecoverable and requires basically deleting them and starting over (at the cost of redoing other elements that depend on them).

 

Perhaps there's more to learn on this? 

Accepted solutions (1)
2,845 Views
6 Replies
Replies (6)
Message 2 of 7

jeff_strater
Community Manager
Community Manager
Accepted solution

The polygon constraint is not editable (which you've already realized, just confirming that).  It would be nice it if was, but there are lots of complexities there that prevented us from going down that path.  For instance, if you change the number of sides of a polygon downstream references (dimensions, constraints, even references to faces generated by a side) all become very difficult to manage.  Not impossible, but not seen as currently worth the effort.  In the almost 10 years that Fusion has been out, this is the first time that I have seen this question.  Polygon today can be thought of more as an easy tool for geometry creation, more than a "feature".  Fillet is very much the same.  You cannot edit a sketch fillet (other than to change the radius dimension).  A polygon is also not a primitive itself, it is just a collection of lines and points (similar to a rectangle).

 

As to what the polygon constraint actually does - it is really just a specialized circular pattern.  Polygons are constructed, essentially, by patterning a set of points, then connecting them with lines.  That is also why the coincident constraint appears on each edge of the polygon (all lines/curves in Fusion have coincident constraints to their endpoints).

 

I agree that the drag behavior is less than ideal.  I will raise that with the sketch team to see if it is possible to change it, or what problems that might cause.

 


Jeff Strater
Engineering Director
Message 3 of 7

TrippyLighting
Consultant
Consultant

It would indeed be nice if we had a fully parametric polygon, but is isn't really too hard to create one by hand.

 

TrippyLighting_0-1652108588222.png

 


EESignature

Message 4 of 7

graham.wideman
Advocate
Advocate

Thanks @jeff_strater for that speedy response -- much appreciated!

 

> what the polygon constraint actually does - it is really just a specialized circular pattern.

> Polygons are constructed, essentially, by patterning a set of points, then connecting them with lines. 

 

Ah-hah, that explains some of the odd behavior. There's an intermediate set of points to which the lines are (initially?) constrained.  That prompts wondering whether the exposed constraints are one line-end to another, or line-end to point, or some random combo, but I'm not sure the answer would be actionable anyway.

 

Anyhow, the number one irritant on these polygons is not the drag behavior. It's the lack of robustness of the exposed constraints required to keep a polygon functioning as a polygon.  That revolves around the fact that the coincident constraints are exposed, and the way the UI makes it close to impossible to distinguish between multiple coincident constraints once you have added more at the polygon vertices. 

 

Is there any use case whatsoever for a Polygon with one or more of its vertex coincident constraints deleted?

 

I appreciate your comments on the difficulty of implementing full edit of the underlying Polygon internal params.   But could that Polygon constraint icon at least provide access to a feature to lock+hide (/unlock+unhide) the exposed vertex coincident constraints?  That would vastly improve the experience!

 

Thanks again for your comments!

Message 5 of 7

graham.wideman
Advocate
Advocate

I appreciate your demo of polygon geometry at a fixed location based on a sample side and some construction lines etc.

 

Is there some tractable way to encapsulate that so it behaves like a primitive -- so its position, size and rotation are driven by attaching constraints?

0 Likes
Message 6 of 7

TrippyLighting
Consultant
Consultant

@graham.wideman wrote:

 

Is there some tractable way to encapsulate that so it behaves like a primitive -- so its position, size and rotation are driven by attaching constraints?


Yes, you simply start the design away from the sketch origin. The polygon is constructed from 3 lines  (2 construction lines and one solid line) and a pattern of the solid line. The pattern is driven by the user defined numSides parameter.

 

The true benefit of a parametric polygon primitive would be if you need two or more different polygons in a sketch.

As we don't have that, you can use the move tool with the copy flag enabled to copy the existing polygon. Then you'll have to manually create another user parameter, say numSides2 and update the pattern and angle calculation of the copied polygon with the new parameter.


The two polygons in the attached file are completely independent and can be dragged around freely. As such they can be independently constrained and dimensioned.

 

TrippyLighting_0-1652185743632.png

 

 

 


EESignature

Message 7 of 7

graham.wideman
Advocate
Advocate

Thanks for your more extensive demo, @TrippyLighting

0 Likes