Scaling of Arcs and Elipses

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
PheasantCoucal
Posts: 18
Joined: Tue Feb 08, 2022 2:40 am

Scaling of Arcs and Elipses

Post by PheasantCoucal »

Since version 0.18 I have been frustrated by the inability to Scale Arcs and Elipses.
The workaround is apparently to create a clone but this doesn't suit me at all. I want to be able to proceed to modify the rescaled object itself, not the source of the clone. If I am rescaling a complex set of primitive objects organised into Groups, then that whole structure is lost in the Clone. The clone doesn't preserve the curves but transforms them into straight line segments.
Am I missing something or do I just have to continue using version 0.18?
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Scaling of Arcs and Elipses

Post by Roy_043 »

I can't get scaling of arcs and ellipses to work properly in V0.18. Can you give by step-by-step instructions?

PheasantCoucal wrote: Tue Feb 08, 2022 2:50 am The clone doesn't preserve the curves but transforms them into straight line segments.
That is not the case. But because all curves are tessellated on the screen you may get that impression. You can lower the Deviation (on the View tab in the Properties editor) to get a finer tessellation. You can also change this value in the preferences.
PheasantCoucal
Posts: 18
Joined: Tue Feb 08, 2022 2:40 am

Re: Scaling of Arcs and Elipses

Post by PheasantCoucal »

Thank you Roy_043
I don't understand. Are you asking *me* to explain how to rescale in 0.18? I somehow don't think so. I have no problem with 0.18, it is versions since 0.18 that I have trouble with.

My post described the appearance of the rescled clones, without attempting to understand why that is the case, but digging a little deeper I find that :

If I use >0.18 (eg 0.20) I am told that elipses and arcs can't be rescaled without making a clone. Ok so I do that.
But I don't want a clone, I want rescaled elipses and/or arcs, so I proceed as follows :
Clone | Objects (select) | ellipses (... 'Change the Linked Object') | Clear | Ok
Delete the parent object since I don't need it any more
Downgrade the Clone and I get a Face
Downgrade each Face and I get a Wire
Downgrade the Wire and I get an Edge.

That is as far as I can go.

How can I get a rescaled elipse back? Is there another way of restoring a cloned elipse back to a real elipse that will appear on my display as an elipse and not a polyline? I note that if my source object is a circle, the tedious method described above returns a rescaled circle (and that it appears on my screen as a circle, not a polyline representation of a circle).
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Scaling of Arcs and Elipses

Post by Roy_043 »

AFAICT arcs and ellipses can only be scaled in V0.18 if the clone option is selected. I must be missing something. Maybe somebody else is willing to explain?
PheasantCoucal
Posts: 18
Joined: Tue Feb 08, 2022 2:40 am

Re: Scaling of Arcs and Elipses

Post by PheasantCoucal »

I have no problem scaling lines, arcs, circles, elipses without using the clone option, with this install.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4 (GitTag)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Scaling of Arcs and Elipses

Post by Roy_043 »

Maybe we are talking about different things.

If I create a Draft_Arc in V0.18 and then Draft_Scale it, I see this in the Python console:

Code: Select all

Draft.scale([FreeCAD.ActiveDocument.Arc],delta=FreeCAD.Vector(2.0,2.0,2.0),center=FreeCAD.Vector(0.0,0.0,0.0),copy=False,legacy=True)
FreeCAD.ActiveDocument.recompute()
And the arc is not modified. Well actually it is modified, but the modified shape is not parametric, so the recompute undoes the modification.
PheasantCoucal
Posts: 18
Joined: Tue Feb 08, 2022 2:40 am

Re: Scaling of Arcs and Elipses

Post by PheasantCoucal »

Roy_043 you are of course correct, and I am even more confused.
I drew a Draft line, an arc, and a circle. I Scaled and as you said, only the line was scaled. The Python console returned the message you quoted.
So what are the Arc etc objects that I have been successfully rescaling with 0.18 ?? I attach "ADoubleSink.FCstd" I note, for the first time, that they carry a different icon than those generated natively with Draft. What are they? Their Data Properties appear to be the same as those generated by Draft.
They originate from an imported .dxf file that resulted in a collection of Shapes, that I Upgraded to Wires, then Downgraded to Edges, and then Upgraded to said Arcs etc. Tedious, but I don't know of any other way to get basic geometric shapes that I can work with. They seem to behave like native Draft objects, except it would seem when it comes to Scaling.
You might note that the dimensions of the Sink have ended up being in metres, which is inappropriate, hence the need to Scale, which occurs successfully in 0.18, but not in 0.19 or 0.20, without Cloning, which opens another frustratingly confusing can of worms that I don't know how to deal with.
"ADoubleSink" is just a simple example. I have other more complex, but similar, source models that I am trying to work with.
I look forward to your insights.
Attachments
ADoubleSink.FCStd
(64.5 KiB) Downloaded 20 times
PheasantCoucal
Posts: 18
Joined: Tue Feb 08, 2022 2:40 am

Re: Scaling of Arcs and Elipses

Post by PheasantCoucal »

Further to my prior post.
I see no material difference in the Python Console when successfully scaling Arcs with 0.18, and when the scaling fails.
After "successfully" scaling "ADoubleSink.FCstd" with 0.18, I note that the Data Property of Line elements shows the Length to be unchanged, but a Dimension or a new reference line added confirms that the scaling did successfully occur.

I am finding it frustrating that an operation as fundamental as Scale either doesn't work consistently and reliably, or if using a recent FreeCad version generates an entirely different data structure than that with which I started. Neither alternative is encouraging.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Scaling of Arcs and Elipses

Post by Roy_043 »

Your example is a very peculiar case. I do not fully understand how this was created. But I have managed to find a way to convert the example to proper Draft objects:

Workflow:
  • Move everything closer to the origin. In the file objects are more than 10km from the origin.
  • Create 2 Part Compound objects. One for all the arcs, the other for the lines and circles. These objects have to be kept separate for some reason.
  • Create a Draft Clone from each compound.
  • Change the Scale of each clone in the Property editor.
  • Use Draft Draft2Sketch to create a sketch from each clone
  • Use Draft Draft2Sketch again to create Draft objects from each sketch.
Note that you can specify a scale factor when importing DXF files. And there is also an option to covert to Draft objects. See Import_Export_Preferences#DXF.
Attachments
ADoubleSink-converted.FCStd
(147.95 KiB) Downloaded 21 times
PheasantCoucal
Posts: 18
Joined: Tue Feb 08, 2022 2:40 am

Re: Scaling of Arcs and Elipses

Post by PheasantCoucal »

Thank you Roy for your assistance. I will play around myself following your suggestions, and with some other models.
I note that the file you attached was still unscaled, but that despite earlier agreement that 0.18 scaling was broken for arcs and circles it nevertheless scaled its display well, even though the Properties of the various elements still show their parameters in unscaled quantities which I find confusing.
I found your advice to combine similar elements into a Container to be very useful, as after cloning the Scale factor(s) only have to be provided once and not separately for every element.
I also appreciated your suggestion to passage a clone through a Sketch to convert it to Draft primitives. Sketcher also provides a convenient place to correct the inevitable drafting errors in objects imported from external sources.
I was aware that the model was offset from the origin by a ridiculous amount. Then again its dimensions were equally ridiculous. It was downloaded from freecads.com. I expect that these are artefacts of the import process.
I am aware of the option to scale when importing, but that means that whenever I wish to rescale I must import again.
I am also aware of the option to import as Draft primitives, and indeed I thought I had tried that unsuccessfully, but I may be wrong and will try again.
Thank you again for your help. I have learned quite a few new things that will be beneficial.
Post Reply