[Feature Request] Object Split enhancement

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
DeepSOIC
Posts: 7810
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: [Feature Request] Object Split enhancement

Postby DeepSOIC » Mon Dec 10, 2018 7:40 am

Most of the code is already done in Lattice2:
https://github.com/DeepSOIC/Lattice2/bl ... Filter2.py
So it can be just transferred to FC, replacing a few Lattice2-specific things, and adding the commands to toolbars and menu (adding the commands for Part WB is in C++).
freedman
Posts: 1617
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: [Feature Request] Object Split enhancement

Postby freedman » Mon Dec 10, 2018 8:06 am

It seems like the "slice" should be a new Body and hold all the features of the slice. How about the analogy of a car wheel made up of, metal wheel, lug holes, valve stem, tire. If you take a slice of the wheel assy, that should be a new Body with all those features. I presume you will want to modify it afterwards so it has to include all the sketches and features of it's original body. The "Obslice" object slice is a Body copy with a Pocket to everything else.
chrisb
Posts: 28098
Joined: Tue Mar 17, 2015 9:14 am

Re: [Feature Request] Object Split enhancement

Postby chrisb » Mon Dec 10, 2018 3:24 pm

The notion of "Body" is associated with PartDesign constructs, while slice is a pure Part thing.
Jee-Bee
Posts: 2130
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: [Feature Request] Object Split enhancement

Postby Jee-Bee » Mon Dec 10, 2018 6:53 pm

one body is a single shape. it can't split. see https://freecadweb.org/wiki/PartDesign_Body .

The only change you can do is that slice make multiple bodies.
PlaneAnimal
Posts: 13
Joined: Tue Oct 30, 2018 2:52 am

Re: [Feature Request] Object Split enhancement

Postby PlaneAnimal » Tue Dec 11, 2018 12:13 am

freedman wrote:
Mon Dec 10, 2018 8:06 am
It seems like the "slice" should be a new Body and hold all the features of the slice. How about the analogy of a car wheel made up of, metal wheel, lug holes, valve stem, tire. If you take a slice of the wheel assy, that should be a new Body with all those features. I presume you will want to modify it afterwards so it has to include all the sketches and features of it's original body. The "Obslice" object slice is a Body copy with a Pocket to everything else.
Not what i was asking. A "slice" should cut the Body into 2 (or more) bodies, each containing the features needed to construct (parametrically if applicable ) the individual bodies. Not exactly, if you slice a wheel only that portion which has a valve stem will contain one, the other part of the slice may not. The slice is not a clone operation. A cylinder can be a body, sliced in half along the radial direction, creates two bodies. Each of which are still cylinders. However sliced to remove an arc will result in 2 bodies neither of which is necessarily a cylinder.
PlaneAnimal
Posts: 13
Joined: Tue Oct 30, 2018 2:52 am

Re: [Feature Request] Object Split enhancement

Postby PlaneAnimal » Tue Dec 11, 2018 12:22 am

Jee-Bee wrote:
Mon Dec 10, 2018 6:53 pm
one body is a single shape. it can't split. see https://freecadweb.org/wiki/PartDesign_Body .

The only change you can do is that slice make multiple bodies.

That page makes no restriction whether a body can split or not. Having said that you did remark that a slice makes multiple bodies, so the end result is the node of the body you slice should be replaced by 2 nodes in the tree. I would suggest the original body would become hidden and 2 bodies would appear and be visible (also individually select-able).

Not sure precisely what the tree configuration should be.
chrisb
Posts: 28098
Joined: Tue Mar 17, 2015 9:14 am

Re: [Feature Request] Object Split enhancement

Postby chrisb » Tue Dec 11, 2018 12:42 am

@freedman, @PlaneAnimal: either you are not familiar with the notion of a Body or you are talking about something completely different from the current Part slice operation.

What you want is different from everything we have now: new bodies are created which have generated features. Before thinking about that I would rather have the part slice-and-explode command implemented. With the work done by DeepSOIC it is within near reach as opposed to a PartDesign extension. Even more so, as there is currently hardly a developer pushing PartDesign anyway.
PlaneAnimal
Posts: 13
Joined: Tue Oct 30, 2018 2:52 am

Re: [Feature Request] Object Split enhancement

Postby PlaneAnimal » Tue Dec 11, 2018 1:12 am

@chrisb

You may be right. My lack of understanding may stem from not understanding the logic/usefulness of the current body slice functionality. Has anyone checked out my video on YT? Certainly I do not what to interrupt any work already mostly accomplished. The folks programming the software are surely mostly busy resolving bugs. What I was trying to convey is, don't need a new feature, only an enhancement to an existing feature.

The current feature already produces new bodies, they are hidden and copied and identified in the tree using the additional steps Compound->Compound Filter.... My suggestion is to remove the Compound Filter and and replace the sliced body with the resulting body slices.

Again, my post is not intended to distract the work being done.
PlaneAnimal
Posts: 13
Joined: Tue Oct 30, 2018 2:52 am

Re: [Feature Request] Object Split enhancement

Postby PlaneAnimal » Tue Dec 11, 2018 1:22 am

DeepSOIC wrote:
Mon Dec 10, 2018 7:40 am
Most of the code is already done in Lattice2:
https://github.com/DeepSOIC/Lattice2/bl ... Filter2.py
So it can be just transferred to FC, replacing a few Lattice2-specific things, and adding the commands to toolbars and menu (adding the commands for Part WB is in C++).
At best perhaps, perhaps, I can carve that into a macro. Would be a first for me.
chrisb
Posts: 28098
Joined: Tue Mar 17, 2015 9:14 am

Re: [Feature Request] Object Split enhancement

Postby chrisb » Tue Dec 11, 2018 7:30 am

PlaneAnimal wrote:
Tue Dec 11, 2018 1:12 am
You may be right. My lack of understanding may stem from not understanding the logic/usefulness of the current bodyOBJECT slice functionality. ...

The current feature already produces new bodiesOBJECTs, they are hidden and copied and identified in the tree using the additional steps Compound->Compound Filter.... My suggestion is to remove the Compound Filter and and replace the sliced bodyOBJECT with the resulting bodyOBJECT slices.
Don't call things bodies which aren't. Please follow the explanations and links above on what a body is in FreeCAD.