spreadheet usage

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
TheNo1Odor
Posts: 7
Joined: Thu Jun 25, 2015 7:02 am

spreadheet usage

Post by TheNo1Odor »

What parameters can be obtained with the spreadsheet?
So far I found out the following:
  • xyz.Shape.Area
  • xyz.Shape.Volume
  • xyz.Shape.Length
  • xyz.Label
where xyz is the name of the object.
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: spreadheet usage

Post by eivindkvedalen »

TheNo1Odor wrote:What parameters can be obtained with the spreadsheet?
So far I found out the following:
  • xyz.Shape.Area
  • xyz.Shape.Volume
  • xyz.Shape.Length
  • xyz.Label
where xyz is the name of the object.
You can use any properties of an object that is either a double (floating point) value, quantity value, or a string (you can find these in the object's data properties tab). E.g to query for position, you can use xyz.Placement.Base.x, or to query a pad's length, you can use xyz.Length.

Eivind
TheNo1Odor
Posts: 7
Joined: Thu Jun 25, 2015 7:02 am

Re: spreadheet usage

Post by TheNo1Odor »

Thank you.

But how is the angle of an object stored and accessed? Against the x, y and z axes?
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: spreadheet usage

Post by eivindkvedalen »

TheNo1Odor wrote:Thank you.

But how is the angle of an object stored and accessed? Against the x, y and z axes?
Rotation can be accessed as

xyz.Placement.Rotation.Axis.Angle/x/y/z

There is currently no way to access the euler angles in the object placement from the spreadsheet (you can compute them, but that is tedious).

Eivind
TheNo1Odor
Posts: 7
Joined: Thu Jun 25, 2015 7:02 am

Re: spreadheet usage

Post by TheNo1Odor »

eivindkvedalen wrote:
TheNo1Odor wrote:Thank you.
There is currently no way to access the euler angles in the object placement from the spreadsheet (you can compute them, but that is tedious).
Eivind
But sometimes could be useful. It will be hard to program such code?
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: spreadheet usage

Post by eivindkvedalen »

TheNo1Odor wrote:
eivindkvedalen wrote:
TheNo1Odor wrote:Thank you.
There is currently no way to access the euler angles in the object placement from the spreadsheet (you can compute them, but that is tedious).
Eivind
But sometimes could be useful. It will be hard to program such code?
I might consider adding it for 0.16, if my expression branch gets merged.

Eivind
wmayer
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: spreadheet usage

Post by wmayer »

But sometimes could be useful. It will be hard to program such code?
The main problem is that Euler angles are not Euler angles. There exist a lot of notations and one has to exactly know which notation is used.
I might consider adding it for 0.16, if my expression branch gets merged.
Not if but when. AFAIK you still want to finish some work first before it's ready for merge?
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: spreadheet usage

Post by eivindkvedalen »

wmayer wrote:Not if but when. AFAIK you still want to finish some work first before it's ready for merge?
Yes, almost there, but it's not done before it's done! :-)

Eivind
Post Reply