Block Constraint

Info about new implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
User avatar
GlouGlou
Posts: 920
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Block Constraint

Postby GlouGlou » Thu May 10, 2018 8:50 am

Hi,
I've got some difficults to hook on a freezed spline with block constraint.
its unable to hook on the 2 last points.
Have a look inside my file: if you delete the block constraint, the line is released and hooked on the spline.
Is it a bug?

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13661 (Git)
Build type: Release
Branch: master
Hash: 7fa81fd2e66a35b69a11c11bae38126eebac4b3f
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: French/France (fr_FR)
Attachments
BCtest.FCStd
(5.65 KiB) Downloaded 15 times
chrisb
Posts: 11436
Joined: Tue Mar 17, 2015 9:14 am

Re: Block Constraint

Postby chrisb » Thu May 10, 2018 9:25 am

I can confirm the issue. It occurs in Abdullah's new Sketcher as well, which is not merged yet, but available as AppImage: https://forum.freecadweb.org/viewtopic. ... 30#p230561.
abdullah wrote:Abdullah
abdullah
Posts: 2599
Joined: Sun May 04, 2014 3:16 pm

Re: Block Constraint

Postby abdullah » Thu May 10, 2018 10:51 am

GlouGlou wrote:
Thu May 10, 2018 8:50 am
I've got some difficults to hook on a freezed spline with block constraint.
its unable to hook on the 2 last points.
Have a look inside my file: if you delete the block constraint, the line is released and hooked on the spline.
Is it a bug?
chrisb wrote:
Thu May 10, 2018 9:25 am
I can confirm the issue. It occurs in Abdullah's new Sketcher as well, which is not merged yet
The coincident constraints are not between the bspline and the line, but between the center of the circles at the pole position and the line. (I really have to do something so that it is easy for the user to know what a constraint is actually constraining, probably some extension of information in the constraint widget, or tip on hover...)

This was coded intentionally (another thing is that it can be improved). I have to study this. I remember I had another issue with block constraint, probably it is in the tracker, is not it would be good to put it there so that I dedicate some time to see if I come with an improvement.

This can be work-around easily, because what you actually want is to join the endpoints of the bspline and the line, and it was coded to allow that. If you use the geometry widget, hover the bspline and press 'z' you will iterate between the segment, the endpoint and the starting point. When you have the relevant point preselected, left click to select it, then select the endpoint of the line and make a coincident. Repeat for the other extreme.

You then come to this:
block_bspline.png
block_bspline.png (24.26 KiB) Viewed 458 times
The selection of bspline endpoints has to be improved too. It generates lots of confusion.
chrisb
Posts: 11436
Joined: Tue Mar 17, 2015 9:14 am

Re: Block Constraint

Postby chrisb » Thu May 10, 2018 11:00 am

abdullah wrote:
Thu May 10, 2018 10:51 am
The coincident constraints are not between the bspline and the line, but between the center of the circles at the pole position and the line. (I really have to do something so that it is easy for the user to know what a constraint is actually constraining, probably some extension of information in the constraint widget, or tip on hover...)
I still wonder why it is not fully constrained and why the line still can be moved. If the endpoints are connected to whatever and this whatever cannot move, then everything should be fixed.
(I really have to do something so that it is easy for the user to know what a constraint is actually constraining, probably some extension of information in the constraint widget, or tip on hover...)
I recently had something similar: I had a rectangle and wanted to attach to one of its corners a tangential line. It is not clear what happens if the points are selected and the tangent is applied. This will be improved as soon as your pull request is merged.
abdullah
Posts: 2599
Joined: Sun May 04, 2014 3:16 pm

Re: Block Constraint

Postby abdullah » Thu May 10, 2018 11:09 am

chrisb wrote:
Thu May 10, 2018 11:00 am
I still wonder why it is not fully constrained and why the line still can be moved. If the endpoints are connected to whatever and this whatever cannot move, then everything should be fixed.
You are forcing me to confess... ok... they day need to come... [drum music indicating suspense]... the block constraint... the block constraint... the block constraint is not really a constraint... [drum music again]...

The Block constraint is implemented as fixing solver parameters and ignoring other constraints, as the solver would become crazy if having to constraint fixed parameters. Of course this behaviour needs to be revised...
chrisb
Posts: 11436
Joined: Tue Mar 17, 2015 9:14 am

Re: Block Constraint

Postby chrisb » Thu May 10, 2018 12:47 pm

abdullah wrote:
Thu May 10, 2018 11:09 am
The Block constraint is implemented as fixing solver parameters and ignoring other constraints, as the solver would become crazy if having to constraint fixed parameters. Of course this behaviour needs to be revised...
It hasn't necessarily to be changed. If it is known how and why it works it's ok (drums off!).
abdullah
Posts: 2599
Joined: Sun May 04, 2014 3:16 pm

Re: Block Constraint

Postby abdullah » Thu May 10, 2018 1:28 pm

chrisb wrote:
Thu May 10, 2018 12:47 pm
It hasn't necessarily to be changed. If it is known how and why it works it's ok (drums off!).
We will try to improve it ;)
abdullah
Posts: 2599
Joined: Sun May 04, 2014 3:16 pm

Re: Block Constraint

Postby abdullah » Thu May 24, 2018 11:37 am

ulrich1a wrote:
Sat Apr 14, 2018 6:44 pm
I have used the block constraint, to fix an "artistic" b-spline. But I got later problems, when I tried to constrain another b-spline to the blocked one. It does just not work. Those constraints are just not added to the sketch. This is misleading, when you think you constrained it with an auto-constraint.

Is this the intended behavior, or is this a bug?

Ulrich
Could you check this AppImage and tell me your impressions?
https://forum.freecadweb.org/viewtopic. ... 96#p235315
GlouGlou wrote:
Thu May 10, 2018 8:50 am
I've got some difficults to hook on a freezed spline with block constraint.
If you feel like giving it a go to the AppImage above, let me know your feedback.
User avatar
Kunda1
Posts: 3247
Joined: Thu Jan 05, 2017 9:03 pm

Re: Block Constraint

Postby Kunda1 » Sun Oct 28, 2018 9:01 am

issue #3433 is fixed in master (0.18dev) not sure what git commit.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features