[Solved] sketcher: reference mode length naming forces it into real constraint

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
RatonLaveur
Posts: 302
Joined: Wed Mar 27, 2019 10:45 am

[Solved] sketcher: reference mode length naming forces it into real constraint

Postby RatonLaveur » Fri Aug 23, 2019 10:09 am

Hi,

I'm trying to have a pad length in one of my bodies to be linked to a geometry in my master body.

One way to do it is to create a line in my master sketch and reference the edge length with Shape.Edge7.Length but the text is long and the edge is not named so its not very friendly for further usage or if I want to use this method for many other references.

Since the geometry of my master sketch is constrained and the needed distance is defined geometrically, creating a named length constraint is no go. i felt like I could create a reference length constraint and name it for further usage in the pad and other formulas.

However this does not seem to work well, as creating the reference geometry bumps into the already known (and being addressed) issue of redundancy checking. Fine. If you update the sketch the redundancy disappears and my reference constraint is there, bright and blue.

But if I try to name it, the constraint automatically reverts back to real constraint and redundancy appears...etc.

Basically, I cannot seem to be able to name a reference length constraint for further usage.


Further investigation of the behavior actually shows the following:
- If I create a simple line that is otherwise unconstrained, then create a reference constraint and name it, the reference constraint automatically becomes real constraint.
- If i then click on the constraint, and press the "reference" tool (switch everything to blue) then the constraint is correctly blue, named and constrained.
- If i double click the constraint for editing, it switches to real constraint: that is an issue in my book.
- If i try to constrain this line with the reference constraint already applied to existing geometry by coincidence, then there is a conflict between the two.

Shouldn't a reference constraint be adapted to the length of the object and not the other way around?

How to obtain a usable named length, that is dependent on existing and constrained geometry, for further usage in formulas?

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16093 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 690774c0effe4fd7b8d2b5e2fb2b8c8d145e21ce
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: French/Switzerland (fr_CH)
Last edited by RatonLaveur on Fri Aug 23, 2019 1:21 pm, edited 1 time in total.
chrisb
Posts: 17474
Joined: Tue Mar 17, 2015 9:14 am

Re: sketcher: reference mode length naming forces it into real constraint

Postby chrisb » Fri Aug 23, 2019 10:51 am

RatonLaveur wrote:
Fri Aug 23, 2019 10:09 am
How to obtain a usable named length, that is dependent on existing and constrained geometry, for further usage in formulas?
There is already a discussion about that. You have to rename these constraints in the constraints list to the left with the right mouse menu.
kisolre
Posts: 1234
Joined: Wed Nov 21, 2018 1:13 pm

Re: sketcher: reference mode length naming forces it into real constraint

Postby kisolre » Fri Aug 23, 2019 10:55 am

Rename them from the constraint list. There is small issue with mouse position while editing but it is manageable. Dont think about length. That is why autocomplete is there.
RatonLaveur
Posts: 302
Joined: Wed Mar 27, 2019 10:45 am

Re: sketcher: reference mode length naming forces it into real constraint

Postby RatonLaveur » Fri Aug 23, 2019 11:12 am

Thank you guys, if I can do it directly in sketcher with a right click in the list that's way good enough for me!
Sorry if I opened a duplicate Chris...I'll search forums harder next time.

Should I name this "solved" or..."being solved"... or something else?
User avatar
papyblaise
Posts: 431
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: sketcher: reference mode length naming forces it into real constraint

Postby papyblaise » Fri Aug 23, 2019 11:42 am

Sââlut :!:
Should I name this "solved" or..."being solved"... or something else?
Reopen your first threat and change the title
User avatar
DeepSOIC
Posts: 6844
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: sketcher: reference mode length naming forces it into real constraint

Postby DeepSOIC » Fri Aug 23, 2019 12:57 pm

papyblaise wrote:
Fri Aug 23, 2019 11:42 am
Reopen your first threat and change the title
That typo totally ceracked me up :lol: :lol: :D
RatonLaveur
Posts: 302
Joined: Wed Mar 27, 2019 10:45 am

Re: sketcher: reference mode length naming forces it into real constraint

Postby RatonLaveur » Fri Aug 23, 2019 1:20 pm

And here I thought I was being at least amiable...

I marked solved,

Should we still keep in mind the issue of double clicking the reference constraint and it being changed to non-reference, or the optional name input of the popup window not being saved is still there?
kisolre
Posts: 1234
Joined: Wed Nov 21, 2018 1:13 pm

Re: [Solved] sketcher: reference mode length naming forces it into real constraint

Postby kisolre » Fri Aug 23, 2019 4:16 pm

I think that changing to real without confirming a value (pressing Ok) is wrong. But I recently used a lot this auto changing to real dimension and think it is good automation. Just not applied at opening the constraint for editing.
RatonLaveur
Posts: 302
Joined: Wed Mar 27, 2019 10:45 am

Re: [Solved] sketcher: reference mode length naming forces it into real constraint

Postby RatonLaveur » Fri Aug 23, 2019 11:36 pm

So essentially, while there are already two solutions to achieve the intended result, the following points seem to pop out of our discussion:

1. Editing (double clicking) a reference constraint should not automatically revert it to real.
2. It should be possible to name a reference constraint in the dialog box.

Is that correct?
Is that already somewhere in a bug tracker?
chrisb
Posts: 17474
Joined: Tue Mar 17, 2015 9:14 am

Re: [Solved] sketcher: reference mode length naming forces it into real constraint

Postby chrisb » Sat Aug 24, 2019 12:33 am

RatonLaveur wrote:
Fri Aug 23, 2019 11:36 pm
1. Editing (double clicking) a reference constraint should not automatically revert it to real.
2. It should be possible to name a reference constraint in the dialog box.

Is that correct?
Is that already somewhere in a bug tracker?
1. is intended, but cancelling should revert to the previous state.

I think there is an issue in the tracker.