Ticket #5995 - Show spiral length in the property editor (was: Length of a spiral)
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
-
- Posts: 102
- Joined: Sun May 05, 2019 3:08 am
Ticket #5995 - Show spiral length in the property editor (was: Length of a spiral)
Using the Part wb. I've created a spiral. Is there a quick way of finding the length of the spiral.
Last edited by Kunda1 on Wed Jul 06, 2022 5:14 pm, edited 2 times in total.
Reason: Added GH ticket number to thread title
Reason: Added GH ticket number to thread title
Re: Length of a spiral
I'm surprised that the length of the spiral object is not shown in the property editor. I think it should be.bzb.dev001 wrote: ↑Mon Oct 07, 2019 5:03 am Using the Part wb. I've created a spiral. Is there a quick way of finding the length of the spiral.
All topological shapes have certain properties. You can inspect them from the Python terminal.
Use the selection view to get the Python object in the terminal, then inspect the Shape.
Code: Select all
obj.Shape.Length
# or
App.ActiveDocument.Spiral.Shape.Length
Code: Select all
obj.Shape.Area # for faces
obj.Shape.Volume # for solids
obj.Shape.Vertexes # points in the shape
obj.Shape.Edges # lines that make the shape
# and others
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
- pl7i92LCNC
- Posts: 208
- Joined: Tue Mar 12, 2019 3:03 pm
- Location: RLP DE
Re: Length of a spiral
there shoudt be a general inspection tool in the workbenches
-
- Veteran
- Posts: 3158
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: Length of a spiral
It is...pl7i92LCNC wrote: ↑Mon Oct 07, 2019 8:59 am there shoudt be a general inspection tool in the workbenches
arch-wb, survey-tool
Re: Ticket #4159 - Show spiral length in the property editor (was: Length of a spiral)
issue #4159 was opened regarding this issue.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Ticket #4159 - Show spiral length in the property editor (was: Length of a spiral)
vocx wrote: ↑Mon Oct 07, 2019 6:15 am I'm surprised that the length of the spiral object is not shown in the property editor. I think it should be.
Is there precedent for this feature elsewhere in FreeCAD? I was looking into implementing it, but actually none of the primitives in Part display any sort of Read-Only calculated geometrical information in the property editor, as far as I can see. If Length makes sense for Spiral, it probably makes sense for Line, too (for example). I ask in part because I was hoping to borrow the code from someplace else: it's easy enough to add an Output property to the list, but I don't actually know how to get OCCT to tell me the length of the spiral.
Re: Ticket #5995 - Show spiral length in the property editor (was: Length of a spiral)
Ticket migrated to issue #5995
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
- adrianinsaval
- Veteran
- Posts: 5553
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Ticket #5995 - Show spiral length in the property editor (was: Length of a spiral)
@chennes what's your take on the matter now? IMO if it's gonna be implemented here it should be implemented everywhere including other shape properties like area and volume for surfaces and solids respectively, otherwise just close the issue and keep this as a property obtained trough python.
It could potentially be shown in the property view as children of the shape property of every object that has it, showing Length (sum of all edges), Area (sum of all faces) and Volume (sum of all solids). Not sure how to manage compounds.
It could potentially be shown in the property view as children of the shape property of every object that has it, showing Length (sum of all edges), Area (sum of all faces) and Volume (sum of all solids). Not sure how to manage compounds.
Re: Ticket #5995 - Show spiral length in the property editor (was: Length of a spiral)
Well, I personally would love an easy, GUI-based way to get basic stats about selected entities like this -- but my original question stands, about whether there is any precedent for this in FreeCAD. Of course we have read-only properties, but what about displaying calculated properties like this?
- adrianinsaval
- Veteran
- Posts: 5553
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Ticket #5995 - Show spiral length in the property editor (was: Length of a spiral)
At the very least I know there are properties calculated from other properties in an object in PD Helix (and which property is calculated changes depending on the Mode), don't know if there is any calculated from shapes.