Possible constraint resolver bug

Possible constraint resolver bug

brucePBRKZ
Contributor Contributor
126 Views
1 Reply
Message 1 of 2

Possible constraint resolver bug

brucePBRKZ
Contributor
Contributor

I am working on an add-in to dimension a sketch and have come across some strange behaviour.

 

The attached design contains 3 sketches of the same figure with different dimensions, all added programatically. The add-in attempts to add a horizontal and a vertical linear dimension from every point to the origin.

 

The sketch named Absolute has dimensions with constant numeric values and is fully constrained.

The sketch named Simple Param has dimensions as a multiple of the parameter Fifty which is defined as 50mm  and is also fully constrained.

The sketch named Complex Param has dimensions as a multiple of the parameter MartletWidth which is defined as FieldWidth/4 and FieldWidth is defined by a dimension in another sketch, but also has the value 50mm  and is NOT fully constrained.

 

If we edit this sketch we can see that several points, including this one, are under constrained:

Screenshot 2025-07-01 at 10.14.50.png

However, if we try to move this point we cannot.

If we add a linear dimension to the origin we get the "sketch is over constrained, make it driven?" error.

We can add an angle dimension to the two unconstrained construction lines and this succeeds and makes this point fully constrained.

 

If we change the value of the parameter Fifty to FieldWidth/4, the Simple Param sketch is still fully constrained, and has the dimensions we were unable to add to Complex Param.

 

If we then edit Simple Param and delete the horizontal dimension on that same point, the padlock icon on the sketch name disappears, but the construction lines are still displayed black, although other lines in the sketch turn red/brown, however the point with the deleted dimension (and the connected black construction lines) can be moved.

 

If we add back the deleted dimension then the padlock icon returns, and if we leave the constant value unchanged the sketch reverts to being fully constrained, but if we replace the original expression (Fifty * 0.2682436893845673) or even 50 * 0.2682436893845673 then the padlock disappears, the geometry around the point we changed remains black, but some other, previously black geometry is red/brown.

 

I may not understand the full complexity of this, but it looks inconsistent to me.

0 Likes
127 Views
1 Reply
Reply (1)
Message 2 of 2

brucePBRKZ
Contributor
Contributor

Here is another example, this time involving no parameters. The sketch Martlet in the attached design Addin Test v8 is not constrained, the attached screen recording shows that the under constrained points cannot be moved, however if the coincident constraint is removed then we can see that the two points can each be moved but only along a particular curve. Re-applying the coincident constraint makes the sketch fully constrained while being exactly the same shape as it is in the saved file.

0 Likes