Seeking advice for creating a cross section view

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
grandcross
Posts: 362
Joined: Sun Oct 11, 2015 3:08 pm
Contact:

Seeking advice for creating a cross section view

Post by grandcross »

Hello,

This is intended for the Rocket Workbench but I'm sure it can apply elsewhere, such as the part design workbench.

An assembled rocket has a number of parts hidden from view. For example, centering rings, motor mounts, couplers, etc. What I want is to be able to work on the design with a cutaway view. This is typically how it's done in dedicated software such as OpenRocket or Rocksim. It's easy enough to draw this, but It's not something that belongs in the part shape object rather a view of it.

At a minimum, I'd like the user to be able to select one of the origin planes (XY, XZ, YZ) but ideally I'd also like to be able to select a datum plane or similar. Anything to one side of the plane would be hidden allowing you to see the cross section.

Thoughts?
User avatar
Roy_043
Veteran
Posts: 8580
Joined: Thu Dec 27, 2018 12:28 pm

Re: Seeking advice for creating a cross section view

Post by Roy_043 »

Something like: Part_SectionCut?
User avatar
grandcross
Posts: 362
Joined: Sun Oct 11, 2015 3:08 pm
Contact:

Re: Seeking advice for creating a cross section view

Post by grandcross »

Roy_043 wrote: Thu Apr 28, 2022 4:18 pm Something like: Part_SectionCut?
Ooooh! I'll check that out. Thanks!
User avatar
grandcross
Posts: 362
Joined: Sun Oct 11, 2015 3:08 pm
Contact:

Re: Seeking advice for creating a cross section view

Post by grandcross »

Well, that's both what I want and what I don't want.

I don't want to create artifacts in the model tree. I don't want the existing shapes modified in any way. What I want is purely a view. When enabled it displays the cutaway view, and when disabled the view returns to normal. No parts are created or modified.
User avatar
adrianinsaval
Veteran
Posts: 5553
Joined: Thu Apr 05, 2018 5:15 pm

Re: Seeking advice for creating a cross section view

Post by adrianinsaval »

there is a clip plane command but sadly it doesn't fill the cut faces of solids and displays them as hollow. In realthunder's fork it does fill those faces. See Std_ToggleClipPlane you may also try the workaround mentioned in the notes section to tint the inside faces.
User avatar
grandcross
Posts: 362
Joined: Sun Oct 11, 2015 3:08 pm
Contact:

Re: Seeking advice for creating a cross section view

Post by grandcross »

adrianinsaval wrote: Thu Apr 28, 2022 7:31 pm there is a clip plane command but sadly it doesn't fill the cut faces of solids and displays them as hollow. In realthunder's fork it does fill those faces. See Std_ToggleClipPlane you may also try the workaround mentioned in the notes section to tint the inside faces.
That's more like it. I need the cut faces to show though, so maybe I'll checkout realthunder's fork to see how he managed it. It looks like what I need should be handled in the core product so this could be interesting. Maybe I can manage it in Python but I'm not optimistic. I've no problem working in C++ but it has issues with external addons.
User avatar
adrianinsaval
Veteran
Posts: 5553
Joined: Thu Apr 05, 2018 5:15 pm

Re: Seeking advice for creating a cross section view

Post by adrianinsaval »

with a macro it could be possible to generate the face via boolean intersection with the cutting plane
user1234
Veteran
Posts: 3512
Joined: Mon Jul 11, 2016 5:08 pm

Re: Seeking advice for creating a cross section view

Post by user1234 »

grandcross wrote: Thu Apr 28, 2022 2:45 pm Thoughts?
Menu --> View --> Clipping plane

maybe? This is atm the nearest without booleans.

Greetings
user1234
Post Reply