Block Constraint

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Block Constraint

Post by Vincent B »

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 137 times
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Block Constraint

Post by chrisb »

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
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Block Constraint

Post by abdullah »

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 4206 times
The selection of bspline endpoints has to be improved too. It generates lots of confusion.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Block Constraint

Post by chrisb »

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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Block Constraint

Post by abdullah »

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
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Block Constraint

Post by chrisb »

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!).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Block Constraint

Post by abdullah »

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
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Block Constraint

Post by abdullah »

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
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Block Constraint

Post by Kunda1 »

issue #3433 is fixed in master (0.18dev) not sure what git commit.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
paullee
Veteran
Posts: 5097
Joined: Wed May 04, 2016 3:58 pm

Re: Block Constraint

Post by paullee »

abdullah wrote:
Hi, it seems Block Constraint does not work on a point.

So, can only use Lock Constraint as alternative?

Thanks!
Post Reply