Bug report: Sketch constraints not allowed after padding or revolving.

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
jruiz
Posts: 95
Joined: Tue Oct 28, 2014 1:07 pm

Bug report: Sketch constraints not allowed after padding or revolving.

Postby jruiz » Sun Sep 08, 2019 3:37 pm

  1. Create a new document.
  2. Use Spreadsheet WB for creating a spreadsheet.
  3. Use Part-Design WB for creating a body.
  4. Create a (fully constrained) sketch.
  5. (Optional: toggle the toolbar to reference mode and create a named reference constraint: NCR)
  6. Pad or revolve the sketch
  7. Go to spreadsheet
  8. On any cell type "s" and complete Sketch.Constraints.NCR (or any other constraint you used in the sketch)
  9. You'll get an error message from spreadsheet: "failed to parse expresion".
The error does not arise if pad (or revolve) is not done.
If another body and sketch are created but not padded or revolved the constraints dimensions are accessible from spreadsheet.


OS: Ubuntu 18.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.3.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Attachments
sketchConstraintsNotAllowedAfterOperation.FCStd
(10.21 KiB) Downloaded 3 times
kisolre
Posts: 1359
Joined: Wed Nov 21, 2018 1:13 pm

Re: Bug report: Sketch constraints not allowed after padding or revolving.

Postby kisolre » Sun Sep 08, 2019 4:45 pm

If I rename the constraint to something different from "h" it works as expected. Could this be some special variable/value/...? Probably expression engine interprets it as unit HOUR (h) Check wiki Expressions units.
jruiz
Posts: 95
Joined: Tue Oct 28, 2014 1:07 pm

Re: Bug report: Sketch constraints not allowed after padding or revolving.

Postby jruiz » Sun Sep 08, 2019 4:54 pm

kisolre wrote:
Sun Sep 08, 2019 4:45 pm
If I rename the constraint to something different from "h" it works as expected. Could this be some special variable/value/...? Probably expression engine interprets it as unit HOUR (h) Check wiki Expressions units.
It happens when long names are used too. In some cases after typing the "s" (from Sketch) the word "Sketch" does not appears for auto completing...
jruiz
Posts: 95
Joined: Tue Oct 28, 2014 1:07 pm

Re: Bug report: Sketch constraints not allowed after padding or revolving.

Postby jruiz » Sun Sep 08, 2019 5:07 pm

...please try accessing "Stekch.Constraints.rodamientoRadioExtendido" (whose value is 45 mm) from the spreadsheet "data" in the attached file "rodamientoW.FCStd"
Attachments
rodamientoW.FCStd
(14.3 KiB) Downloaded 1 time
chrisb
Posts: 18098
Joined: Tue Mar 17, 2015 9:14 am

Re: Bug report: Sketch constraints not allowed after padding or revolving.

Postby chrisb » Mon Sep 09, 2019 12:23 am

You cannot use spreadsheets for reading from a sketch and writing to it at the same time. I recommend to organize your model so that all values are defined in the spreadsheet where you do the calculations as well and then read these values from the sketch(es).