Working with length on bend surface - or query of radius?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
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!
alex::freecad
Posts: 115
Joined: Fri Aug 29, 2014 1:25 pm

Re: Working with length on bend surface - or query of radius

Post by alex::freecad »

...straight line to link it to... but you have picked a somwhat difficult example
Indeed. Its not only a toy example, but something real and seems like real cases get difficult ;)

I played a bit with drawings. They are so to say a snapshot at a given time as far as i have seen. -> changing the 3d structure, the drawings will not follow.
It would be cool to have the process of drawing stored as process (project this object seen from there to 2D), which could later automatically be re-executed. If one would have then drawing internal linked dimensioning, everything could be really parametric...

Is there a way to project a body including the dimensions into a drawing?
I did not yet get my nonlinked linear dimension together with the body into the drawing...
alex::freecad
Posts: 115
Joined: Fri Aug 29, 2014 1:25 pm

Re: Working with length on bend surface - or query of radius

Post by alex::freecad »

Another approach:
is it possible to parametrize draft objects and possibly dimensions from a spreadsheet?
Are there constrution lines like in the sketcher?
I could then:
- set everything in a spreadsheet for the 2D draft and the necessary extrusions etc. for -> 3D just like i did it in the sketcher
- add dimensions (linked as far as possible) on the already present 2D drawings

would this have disadvantages?
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Working with length on bend surface - or query of radius

Post by jmaustpc »

alex::freecad wrote: ...straight line to link it to... but you have picked a somwhat difficult example


Indeed. Its not only a toy example, but something real and seems like real cases get difficult ;)
No, I mean the radius you are trying to measure...causes complications in that the radius and diameter dimensions are designed around typical holes, rounded corners and the like ...hence it draws from the centre point...where as in your drawing that looks awkward ...something more like an annotation might look neater.

alex::freecad wrote:I played a bit with drawings. They are so to say a snapshot at a given time as far as i have seen. -> changing the 3d structure, the drawings will not follow.
No, you are wrong here, the drawings do update, you just have to force a recompute...for example toggle a parameter of something, if the blue recompute icon lights up then click it or press.
alex::freecad wrote:Is there a way to project a body including the dimensions into a drawing?
I did not yet get my nonlinked linear dimension together with the body into the drawing...


Yes, just go to the Draft work bench and use the Draft "place in drawing tool" its the eighth blue icon in the draft wb tool bar.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Working with length on bend surface - or query of radius

Post by jmaustpc »

alex::freecad wrote: is it possible to parametrize draft objects and possibly dimensions from a spreadsheet?
Yes, ...here is a simple few examples of the property controller working on part objects and a Draft Dimension end point x value.

The trick is to know what to call the property and to know that you use a dot when nesting a property e.g. the x vale of position of Placement is written like this

Code: Select all

Placement.Position.x
here is the demo file....for anyone interested in using the Spreadsheet "propertycontroller" have a look at this file. This shows how to set a value in the spreadsheet and then push that value into objects in your project. Its very powerful but not all that intuitive for a GUI user...the Python proficient user will find more obvious I suspect.
spreadsheetupdatetests2.fcstd
(13.79 KiB) Downloaded 26 times
alex::freecad
Posts: 115
Joined: Fri Aug 29, 2014 1:25 pm

Re: Working with length on bend surface - or query of radius

Post by alex::freecad »

I mean the radius you are trying to measure
ok, understood.
the drawings do update ... "place in drawing tool"
Thaks for the advice, I will test it.

Together with the spreadsheet property controller (thank you for the examples!) and the cell controller, it should in principle be possible to get everything parametric. I still need to get my head around the exact procedure...

I found another 'challenge' in context with the bend surface:
suppose the surface would not be bend (flat). I could (in top view) add some shape (lets say alternating arcs). It can easily be described and cut from the surface. (see the crude example appended, on the lower part of the figure is a side view)
BUT: when the thing is bend the unbended cutting of the form needs to be bended accordingly, which is not trivial...

I guess it should in principle be possible when matching a sketch to a bend surface (which is not possible at least in my version). one would then work in a local 2D curved coordinate system, in which the (unbeded) length would compare to arclengths...
Know what I mean?
Attachments
example.png
example.png (3.51 KiB) Viewed 1934 times
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Working with length on bend surface - or query of radius

Post by jmaustpc »

By the way you can use a cell controller to read data from your model and put it into the spreadsheet.

so you can do the following to fix two problem you had in displaying the radius of that curve. 1) the display was awkward looking with the line going to centre for radius and twice that for diameter 2) you could only get diameter to work but you wanted radius.

well you can do this...
1) put a linked (auto updating) Draft dimension diameter on the curved edge
2) set its visibility to hidden
3)read its data into a spreadsheet cell
4) insert a Draft Annotation
5)use a property controller to read back the data from that cell (from the diameter) and put it into the text of the Draft annotation

you will then have a label stating the diameter....of course if you wanted radius you would just set a formula in another cell to halve the diameter and then read back that other cell.
alex::freecad
Posts: 115
Joined: Fri Aug 29, 2014 1:25 pm

Re: Working with length on bend surface - or query of radius

Post by alex::freecad »

hmm. using the gui is typically much slower than coding -> why not opt for python scripted approach instead of using a spreadsheet and lot's of clicking?
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Working with length on bend surface - or query of radius

Post by jmaustpc »

alex::freecad wrote:hmm. using the gui is typically much slower than coding -> why not opt for python scripted approach instead of using a spreadsheet and lot's of clicking?
That may or may not be true, depending one the case. One answer to that is simply a case of diminishing returns, for every 100 users who can use the GUI perhaps 10 could or would write Python.

My point is that it can be done. Not that you necessarily should do it. I was demonstrating the power of FreeCAD and the spreadsheet system. As in most things in FreeCAD, you will find that there are often many ways to achieve the same thing.

Another really good reason to use the spreadsheet rather than a Python script is that the spreadsheet will be embedded in the project file where as the Python macro would have to be distributed separately. So if you wanted to share you project the spreadsheet can be more convenient. It can sometimes also be more user friendly for a none expert to make minor changes in a spreadsheet where as they may be intimidated by needing to change something in a simple macro.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Working with length on bend surface - or query of radius

Post by NormandC »

alex::freecad wrote:hmm. using the gui is typically much slower than coding
You're a programmer, aren't you?

I'm not. I've been using CAD software in my day job for the past 16 years. Automating repetitive processes through scripting? Okay, it's logical. But design is NOT done by coding.
alex::freecad
Posts: 115
Joined: Fri Aug 29, 2014 1:25 pm

Re: Working with length on bend surface - or query of radius

Post by alex::freecad »

You're a programmer, aren't you?
More or less... my daytime job is modellig and simulation, I derive and code the models myself (mostly in matlab).

You are right: design is not done in code, e.g. where should be a radius for a smoot edge;
But when the design is mature, one could treat the properties of the design elements, e.g. the radius for the smoothed edge as parameter.
I would expect that someone later comes and says 'oh, make that edge a bit smoother'. I don't want to reconstruct everything...

But as you said: depends on your background; for me everything should be as parametrized as possible ;)

Alex
Post Reply