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!
Post Reply
User avatar
jruiz
Posts: 479
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

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

Post by jruiz »

  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 22 times
I have uploaded many FreeCAD video tutorials to my YouTube channel
kisolre
Veteran
Posts: 4164
Joined: Wed Nov 21, 2018 1:13 pm

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

Post by kisolre »

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.
User avatar
jruiz
Posts: 479
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

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

Post by jruiz »

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...
I have uploaded many FreeCAD video tutorials to my YouTube channel
User avatar
jruiz
Posts: 479
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

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

Post by jruiz »

...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 17 times
I have uploaded many FreeCAD video tutorials to my YouTube channel
chrisb
Veteran
Posts: 53938
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

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).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply