Clipping planes on FreeCAD drawing sheets

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Clipping planes on FreeCAD drawing sheets

Post by yorik »

I added a new object type for the Drawing module. It is a clip plane object, it behaves like a group, you can place it inside a page (which happens by default when pressing the button), and add view objects to it by dragging them in the tree view. It has X, Y, Width and Height properties so you can define the viewport precisely, and a "show frame" property which can be used to see a red border around the frame, useful to place it correctly.

The clip object then simply clips all the view objects contained in it, without any further transformation.

Image

The top right window shows the current Qt-based Drawing viewer. Due to the internal limitations of the Qt svg engine, it cannot represent the svg clip object correctly. But the webkit viewer (left image) shows it correctly, as well as other svg applications.

Hope you'll like!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Clipping planes on FreeCAD drawing sheets

Post by jmaustpc »

that's impressive Yorik :)

Jim
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Clipping planes on FreeCAD drawing sheets

Post by NormandC »

Nice! Kind of like an AutoCAD viewport!
tetaberta
Posts: 4
Joined: Wed May 16, 2012 1:24 pm

Re: Clipping planes on FreeCAD drawing sheets

Post by tetaberta »

Looks like a great feature for making blueprints. I was not able to make it work though.
When I put this clip object on my drawing and drag a view object into it, I can see only the frame around the clip (when I make it visible).
I cannot see the actual object in the frame. I don't see the clipping plane in 3D view either. Am I missing something?

Version: 0.13.1035 (Git)
Branch: master
Hash: 54d4e2cab9b0b6080e2e79d06a3a7f7ff9d54211

Stepan
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Clipping planes on FreeCAD drawing sheets

Post by yorik »

the clipping plane doesn't appear in the 3D view, only in the drawing page. But indeed I see it lacks a recompute somewhere... To make it appear you must change one of the properties of the clip after you added the view to it (for example put the show frame to false, or raise a bit one of the values). I'll fix that ASAP. Also, it won't appear correctly in the Drawing viewer, only if you press the "open browser view" button.
tetaberta
Posts: 4
Joined: Wed May 16, 2012 1:24 pm

Re: Clipping planes on FreeCAD drawing sheets

Post by tetaberta »

Oh, thanks, I saw in you screenshot the semitransparent square in 3D view. I thought that it represents the clipping plane.
How do you adjust the position of the clipping plane in 3D then? I have experience with clipping planes from paraview, where you define it using a point and a normal vector, but I don't see anything like that in the interface.
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Clipping planes on FreeCAD drawing sheets

Post by yorik »

Ah, that's a Section Plane object, in the Arch workbench. You set it somewhere in the 3D scene, and it will create a related View object on the active page. Then, you can move the section plane around, and add objects to it (either with the Arch Add button or by double-clicking it in the tree view). If it cuts objects, they will appear cut in the view too.
tetaberta
Posts: 4
Joined: Wed May 16, 2012 1:24 pm

Re: Clipping planes on FreeCAD drawing sheets

Post by tetaberta »

OK, now I understand it :). The section plane is what I was looking for. Thanks for explanation.
Post Reply