[merged] PR #4118 The section cut feature
Posted: Mon Nov 23, 2020 12:43 am
(This is a longer description that I must split to several posts (to show more than 4 files).)
Motivation
I had to present my work in an assembly. During the meeting the project partners requested to have a cut section view of my assembly in order to understand and discuss design details. So I used the clipping tool: But with these views nobody could understand what my construction is doing. Then I had to explain why I don't use proper software...
After the meeting I was pissed because despite how they stated it, they were in fact right: FreeCAD misses a proper cut feature to explain designs, to take these cut views for marketing brochures, to extract out technical drawings providing additional dimensions etc.
Since the motto is, don't start complaining, start coding, I started to implement this and after just 3 weeks of coding , here it is: https://github.com/FreeCAD/FreeCAD/pull/4118
Idea
- we need a cut feature giving you real cuts, no hollow structures
- there should be sliders for some animation
- the cut result should be persistent to do something with it later on
So the main idea is:
- take the currently visible and cutable objects and create each a link for them
- create a box with the size of the scene
- move it to the cut position and perform a cut operation with a compound of the links.
This has some limitations but also advantages I will discuss in a further post.
Implementation
I decided to take the existing Clipping feature and add the cutting functionality to it. The reason is that sometimes one wants the clipping as quick method and for comparison.
I designed the dialog so that it appears at the right side to keep the tree visible. Because only the visible objects should be cut and in practice you need to switch visibilities around while cutting.
You can cut in X, Y and Z direction like for clipping. The cut position ranges are automatically adjusted according to what is geometrically possible.
The following objects can be cut:
- PartDesign bodies
- Part primitives
- Part operation results that are shapes
- Assembly 4 models
- A2plus models
Examples
A: a typical use case is to inspect the depth an position of holes. Lets do this with the standard clipping and then switch to cutting: As you can see when clipping you cannot see the second hole that is right besides the hole you see. First with cutting it becomes visible.
B: cutting is super useful for assemblies. Take for example an Assembly 4 file:
Do you get what is shown here? No? OK, then let's cut it at the same position:
C: Here is a test with Part and PartDesign objects and cuts in all 3 directions: You can see that cutting becomes of course more time-consuming but it is possible to make animations if you like.
Motivation
I had to present my work in an assembly. During the meeting the project partners requested to have a cut section view of my assembly in order to understand and discuss design details. So I used the clipping tool: But with these views nobody could understand what my construction is doing. Then I had to explain why I don't use proper software...
After the meeting I was pissed because despite how they stated it, they were in fact right: FreeCAD misses a proper cut feature to explain designs, to take these cut views for marketing brochures, to extract out technical drawings providing additional dimensions etc.
Since the motto is, don't start complaining, start coding, I started to implement this and after just 3 weeks of coding , here it is: https://github.com/FreeCAD/FreeCAD/pull/4118
Idea
- we need a cut feature giving you real cuts, no hollow structures
- there should be sliders for some animation
- the cut result should be persistent to do something with it later on
So the main idea is:
- take the currently visible and cutable objects and create each a link for them
- create a box with the size of the scene
- move it to the cut position and perform a cut operation with a compound of the links.
This has some limitations but also advantages I will discuss in a further post.
Implementation
I decided to take the existing Clipping feature and add the cutting functionality to it. The reason is that sometimes one wants the clipping as quick method and for comparison.
I designed the dialog so that it appears at the right side to keep the tree visible. Because only the visible objects should be cut and in practice you need to switch visibilities around while cutting.
You can cut in X, Y and Z direction like for clipping. The cut position ranges are automatically adjusted according to what is geometrically possible.
The following objects can be cut:
- PartDesign bodies
- Part primitives
- Part operation results that are shapes
- Assembly 4 models
- A2plus models
Examples
A: a typical use case is to inspect the depth an position of holes. Lets do this with the standard clipping and then switch to cutting: As you can see when clipping you cannot see the second hole that is right besides the hole you see. First with cutting it becomes visible.
B: cutting is super useful for assemblies. Take for example an Assembly 4 file:
Do you get what is shown here? No? OK, then let's cut it at the same position:
C: Here is a test with Part and PartDesign objects and cuts in all 3 directions: You can see that cutting becomes of course more time-consuming but it is possible to make animations if you like.