Issues with parametric constraints on V14

I have long had issues with constraints on V14, and my disappointment with the functionality of constraints has been a factor in my deciding against upgrading, and looking at other packages. But, I just want to double-check with the experts here. And perhaps advise me about the current state of BricsCAD in regard to constraints.

Attached is a simple 2D sketch with constraints. A 4-sided shape represents a component in a mechanical assembly. It is attached to a straight vertical line. If I edit the dimension beyond a certain value, the 4-sided shape will flip to become a mirror image of itself.

I realize that the flipping is actually consistent with the logic of the constraints. But, I cannot figure out any constraint that will prevent flipping. This issue has even made drawings that are non-kinematic, but use constraints, useless for me. Is there a way in v14 to stop that flipping action? Are constraints actually usable now?

-Joe

Comments

  • Got an error message upon posting. But the message apparently went through. Here is the DWG file I described.
  • RSW
    RSW
    edited January 2022
    When you get things like flipping or moving in directions opposite of expected it is often caused by underconstraining the object or constraints affecting each other in a way that one or more constraints cause one or more other constraints to behave different as expected.

    Often this can be solved by adding one or more additional constraints. Sometimes constraints just work against each other and there is no really good solution to make it work the way you want/have in mind, then it is better to try breaking up the object in subobjects (with constraints) to see if that might create something that is acceptable and does what you want.

    In your example I went a bit the quick and lazy way and added angular constraints to all three corners that didn't have them and then it no longer flips.
    Maybe it could have been solved by adding an angular constraint to just one or two of these three corners but that is something you can try out yourself.
  • The _dcaligned command has three options. The Point & line and 2Lines options have 'directional' properties. Using them here (for the '=1.5' and the '=6.0' constraints) prevents the observed flipping.
    : _dcaligned
    Specify first constraint point or [Entity/Point & line/2Lines] <Entity>:
  • Joe Dunfee
    edited January 2022
    Thank you very much for taking the time to look. You've solved a long-standing issue for me, that kept me from using parametrics.

    I had wrongly assumed that a rectangle can be fully constrained by making the ends of the lines coincident and placing perpendicular constraints to 3 of the lines that meets at the corners. I see now that this logic was wrong. Note that I would have thought that three of the 90 Deg constraints would be what it needs, and that four would over constrain. But, with three, it does flip (though this flipping action is sometimes hard to reproduce). I am now experimenting with four perpendicular constraints. It may be that it was not angular vs. perpendicular constraints, but rather that all four corners are constrained. Though, in my human logic, it would seem to over constrain it.

    -Joe
  • Thank you, Mr. Klein Gebbinck, you are certainly an authority on all things BricsCAD. I think I was typing my message at the same time as yours, so I didn't see it at the time.

    Constraints are certainly a challenging thing to understand, and things like directionality are things that are "under the hood" make it even harder. I suspect that the ability to constrain a block, which didn't happen till later versions, may have prevented my issues.
  • The _dcaligned command has three options. The Point & line and 2Lines options have 'directional' properties. Using them here (for the '=1.5' and the '=6.0' constraints) prevents the observed flipping.

    I know I applied the aligned dimension constraint by choosing the entity on the drawing attached to my initial message. I just now tried the aligned dimension constraint by selecting two points. But, it still flips. It seems that the only way to really prevent it (at least so far in my tests) is to put either an angle constraint or a perpendicular at every corner. See the attached drawing for examples.

    -joe

  • Please reread my previous post, and look at the attached DWG. You are not using the two options I have mentioned.
  • Thank you again for that insight. I think I was confused by the options on the command prompt, and lost sight of the directions you gave. Below is my description, and it highlights another issue with the _dcaligned command prompt. But since this is v14, it is not reasonable to ask BricsCAD to address it.

    I was able to use the Point & LIne, by typing P at the : _dcaligned prompt.

    : _dcaligned
    Specify first constraint point or [Entity/Point & line/2Lines] :p
    Specify constraint point or [Line] :
    Select line:

    The above dimension type works in the example. But will only work if I have a right angle at one of the lines.

    I tried the "2" and the "l" options [font designers should not use the same shape for different letters] and even the capital "L" to initiate that option without success. Note that the "invalid Point" response appears even though I have not taken any action.

    : _dcaligned
    Specify first constraint point or [Entity/Point & line/2Lines] :2
    *Invalid point*
    Specify first constraint point or [Entity/Point & line/2Lines] :l
    Unable to recognize entry. Please try again.
    Specify first constraint point or [Entity/Point & line/2Lines] :L
    Unable to recognize entry. Please try again.
    Specify first constraint point or [Entity/Point & line/2Lines] : [I typed the Enter key]
    Select an entity:
    Cancel

    The 2 lines method requires two parallel lines. So some situations will not be possible to prevent flipping. Still the Point & Line approach should work for most of my projects.

  • Use 2L for the 2Lines option (you can also use a lowercase L: 2l). And, yes, this option requires parallel lines.
    Both the Point & line option and the 2Lines option define a perpendicular distance, but also prevent flipping. The point will stay on the same side of the line and the first line will stay on the same side of the second line.