[SOLVED] How to create a Sphere from a Sketch in Part Design?

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!
Post Reply
alovicious72
Posts: 16
Joined: Thu Sep 12, 2019 3:47 am

[SOLVED] How to create a Sphere from a Sketch in Part Design?

Post by alovicious72 »

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16131 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 3129ae4296e40ed20e7b3d460b86e6969acbe1c3
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

I am a newcomer to FreeCAD. So far I enjoy using it very much.

I have a very simple question that I am hoping can be answered on this forum.

How is it possible to produce a spherical solid in the Part Design workbench using a Sketch?

I know that there is a tool in the Part Design workbench for directly creating a spherical primitive without use of a Sketch - but I am curious if the same result can be achieved using a Sketch.

I have attempted this by first creating a fully-constrained Sketch in the XY-plane whose center lies at the origin of the coordinate system.
CircleSketch.PNG
CircleSketch.PNG (149.17 KiB) Viewed 3161 times
As a sphere can be produced by revolving a circle 360 degrees around a line passing through that circle's center - I immediately attempted to use the "Revolution" tool to produce a sphere using my sketch.

Using that tool, I made sequential attempts to produce the sphere by selecting each of the available "Axis" choices - all of which pass through my Circle sketch's center and would therefore seem to support creation of a sphere using the geometric principle I cited earlier. All such attempts failed, however, with the same "Revolve axis intersects the sketch" error depicted below
RevolveAxisIntersectsSketch.PNG
RevolveAxisIntersectsSketch.PNG (143.25 KiB) Viewed 3161 times
It is not entirely clear to me why this results in an error (this particular error *is* mentioned in the description of the "Revolve" tool here: https://www.freecadweb.org/wiki/PartDesign_Revolution) - but the error occurs even when values much smaller than 360 degrees are selected for the "Angle" parameter.

Is there some other way of creating a Sphere directly from a Sketch in the Part Design workbench?

Thank you in advance for humoring a simple question from a novice :-)
Attachments
SphereFromCircleSketch.FCStd
(4.78 KiB) Downloaded 36 times
Last edited by alovicious72 on Fri Oct 18, 2019 11:02 pm, edited 1 time in total.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: How to create a Sphere from a Sketch in Part Design?

Post by vocx »

alovicious72 wrote: Fri Oct 18, 2019 1:58 am ...
Is there some other way of creating a Sphere directly from a Sketch in the Part Design workbench?
Draw half circle and revolve that.

Or use PartDesign AdditiveSphere inside a PartDesign Body.
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.
alovicious72
Posts: 16
Joined: Thu Sep 12, 2019 3:47 am

Re: How to create a Sphere from a Sketch in Part Design?

Post by alovicious72 »

Thanks - that does work if I produce a half circle sketch like that depicted here
HalfCircleSketch.PNG
HalfCircleSketch.PNG (107.28 KiB) Viewed 3152 times
...and then perform the revolution about the sketch's horizontal axis.

I am a bit unclear about why doing so does not produce the same self-intersection error as my previous attempts as the segment at the base of my half-circular arc lies on the horizontal sketch axis. Is there a resource that explains this self-intersection concept in some detail?

Thanks again!
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: How to create a Sphere from a Sketch in Part Design?

Post by vocx »

alovicious72 wrote: Fri Oct 18, 2019 2:57 am ...Is there a resource that explains this self-intersection concept in some detail?
No. It's magic. If you really want to know, you have to look at the extensive source code of the OpenCASCADE Technology kernel, which is what FreeCAD uses internally to produce the shapes. As a simple rule, OCCT doesn't like co-planar faces and self intersections, the simpler the wires the better.
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.
alovicious72
Posts: 16
Joined: Thu Sep 12, 2019 3:47 am

[SOLVED] Re: How to create a Sphere from a Sketch in Part Design?

Post by alovicious72 »

vocx wrote: Fri Oct 18, 2019 3:07 am No. It's magic. If you really want to know, you have to look at the extensive source code of the OpenCASCADE Technology kernel, which is what FreeCAD uses internally to produce the shapes. As a simple rule, OCCT doesn't like co-planar faces and self intersections, the simpler the wires the better.
Thanks, vocx. Even that "Simple Rule" expands my understanding a bit in a useful way because I was unaware of the co-planar faces consideration. And "self-intersection" seems much easier to learn to visually recognize than to rigorously explain to somebody else...unless the two parties in the conversation happen to have a University-level course in Mathematical topology in their curriculum vitae ;)

Thank you again - marking as SOLVED.
Post Reply