View Issue Details

IDProjectCategoryView StatusLast Update
0001703FreeCADFeaturepublic2014-08-23 13:02
Reportertriplus Assigned Towmayer  
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version14.04
Summary0001703: Spreadsheet PropertyController
DescriptionIt is now possible to modify values of sketch datum constraints directly from properties dialogue:

Therefore PropertyController should allow the user to modify it from Spreadsheet object but i tested this and it seems not to work.

Steps To Reproduce1.) Create sketch with datum constraint in it.
2.) Try to modify created datum constraint exposed to sketch properties with Spreadsheet PropertyController.
Additional InformationIt looks like the feature itself is still under active development and things could change in the near future:

If this will be fixed i am guessing Spreadsheet PropertyController could be simplified and the part dealing with sketch directly could be completely removed:

1.) Target Type could be completely removed from dialogue.
2.) Target Property could be renamed to Property Value.

If i remember correctly potential "infinite loop" when dealing with sketch directly using mentioned Spreadsheet PropertyController would not exist any more (i am guessing the new code that exposes datum constraints as sketch properties does not have this behaviour but if it does that is stuff for another in future bug report).
TagsNo tags attached.
FreeCAD Information



2014-08-21 01:21

developer   ~0004982

"2.) Target Property could be renamed to Property Value."

Small correction. Actually i was after proposing the term Property Name or simply Property and somehow wrote Property Value instead (Property Value is a different thing and the Property Value itself is written to spreadsheet cell).


2014-08-21 19:55

administrator   ~0004986

Sorry for my ignorance but I have never worked with the spreadsheet module. How is the supposed workflow to allow to alter values from within a sheet?


2014-08-22 01:47


Infographic.png (Attachment missing)


2014-08-22 01:48

developer   ~0004987

1.) Create sketch with datum constraint(s) in it.
2.) Crate feature like Pad (property Length).
3.) Add new Spreadsheet object.
4.) Add Spreadsheet PropertyController to the spreadsheet.

Added Spreadsheet PropertyController when set up correctly (Property view -> Data tab) allows the user to alter datum constraint (sketch) or feature property (for example pad Length) directly from spreadsheet cell (after the value is set in the cell and Compute button is pressed). Note that user needs to add and set up new PropertyController for each datum constraint or feature property it wants to control.

Because Sketch now exposes datum constraints as properties i do believe it makes sense to use that instead of directly tinkering with sketch but currently this does not work. Using property Length of a Pad does work but using individual exposed datum constraint as property of sketch does not seem to work and this what this bug report is about. To make that work.

I made simple example and i attached infographic of how one could build two simple objects and control them from spreadsheet. I added few simple relations between the two objects.


2014-08-22 13:45

administrator   ~0004988

Ok, thanks for the description.


> Because Sketch now exposes datum constraints as properties i do believe it

that's wrong. Datum constraints are no properties they are just strings which are used inside the property editor or the constraints widget in a special way.


2014-08-22 14:01

developer   ~0004989

Last edited: 2014-08-22 14:04

I see although datum constraints are listed in individual sketch property editor they are not actually "real properties".

Well i guess that explains why Spreadsheet PropertyController can't control them in the first place and i guess therefore stuff like inputting named datum constraint from individual sketch property editor to PropertyController (Target Property) is not possible this way ATM.

Too bad.

Well at least we still have working solution available in FreeCAD by inputting datum constrains numbers and i guess this "bug report" can be closed as "won't fix".


2014-08-22 22:01

administrator   ~0004990

Btw, if you set Target Type to Constraint and Target Property to 0 instead of 1 it works. This is because you count from 0 and not 1.


2014-08-23 00:21

developer   ~0004991

Yes the counting of sketch constraints starts from 0 and having larger set of constraints usually (from end user point of view) always involve some trial and error procedure to get the problem solved. When Yorik made this feature available it took me quite a while to figure out the datum constraint part. I got property part figured out quickly but for the sketch datum constraints part that was a bit harder. I don't know how other users deal with this.

That is why i thought the benefits of now having datum constraints exposed as sketch properties could be used for Spreadsheet PropertyController. From end user point of view that would simplify things and the Spreadsheet PropertyController dialogue could be simplified to only take Properties of selected object. Drop down menu of all object available properties could be provided that would further simplify things for end users.

But in the end it turned out i was wrong in assumptions and sketch doesn't really expose datum constraints as "real properties" and therefore not much else could be said about this ATM.

But on the bright side the feature is still there and it does the job and i am grateful for that.


2014-08-23 00:49

developer   ~0004992

I just checked and i don't know if it belongs in this ticket report but i guess no harm down if something gets mentioned twice:

Ulrich probably isn't FreeCAD novice user but has found himself in the situation where sketch datum constraint part set-up was not the task to figure out easily.

Original implementation did work "in sync" but Yorik changed that when he consulted other devs:

Something like "refresh" button would probably be cool to fetch existing data not only to be able to set it. Or ideally in the future to figure out the correct method for the spreadsheet and the solver to automatically stay "in sync" again and not to cause any potential issues to solver.

In my opinion spreadsheet is the correct place to do this but in the end i will use whatever tool will do the job and who knows maybe few methods will be available in the future to do the same task. And in my opinion current implementation does the job quite well but i do imagine it is a bit hard to grasp for first time users.


2014-08-23 02:10

developer   ~0004993

"Btw, if you set Target Type to Constraint and Target Property to 0 instead of 1 it works. This is because you count from 0 and not 1."

And just to clarify this you are probably referring to Target Property set to 1 in infographic example for circle in Sketch Shaft?

The reason Target Property is not set to 0 is because there is coincident constraint at position 0 and therefore Shaft radius datum constraint is set/located at position 1. If i would add Shaft radius datum constraint before i added coincident constraint then i would need to use 0 instead indeed.


2014-08-23 11:35

administrator   ~0004994

Actually there is a pretty easy way to support named properties in the spreadsheet. Two things therefore need to be extended:
1. The sketcher's setDatum() method must be changed to also accept a string (for the name)
2. needs to be extended to also support "TargetProperty" to be a string and use the above setDatum

These are two rather small changes and whether named constraints are properties or not is totally irrelevant in this context.

Related Changesets

FreeCAD: master 3c8a00df

2014-08-23 14:38:30


Details Diff
+ fixes 0001703: Spreadsheet PropertyController Affected Issues
mod - src/Mod/Sketcher/App/SketchObjectPyImp.cpp Diff File
mod - src/Mod/Spreadsheet/ Diff File

Issue History

Date Modified Username Field Change
2014-08-20 21:57 triplus New Issue
2014-08-21 01:21 triplus Note Added: 0004982
2014-08-21 19:55 wmayer Note Added: 0004986
2014-08-22 01:47 triplus File Added: Infographic.png
2014-08-22 01:48 triplus Note Added: 0004987
2014-08-22 13:45 wmayer Note Added: 0004988
2014-08-22 13:45 wmayer Category Bug => Feature
2014-08-22 14:01 triplus Note Added: 0004989
2014-08-22 14:04 triplus Note Edited: 0004989
2014-08-22 22:01 wmayer Note Added: 0004990
2014-08-23 00:21 triplus Note Added: 0004991
2014-08-23 00:49 triplus Note Added: 0004992
2014-08-23 02:10 triplus Note Added: 0004993
2014-08-23 11:35 wmayer Note Added: 0004994
2014-08-23 13:02 wmayer Changeset attached => FreeCAD Master master 3c8a00df
2014-08-23 13:02 wmayer Assigned To => wmayer
2014-08-23 13:02 wmayer Status new => closed
2014-08-23 13:02 wmayer Resolution open => fixed