Where is the source code of clipping plane tool?

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
helenharry
Posts: 1
Joined: Wed Jan 23, 2019 5:01 am

Where is the source code of clipping plane tool?

Post by helenharry »

Hello everyone,

I have a question. Where is the source code of clipping plane tool?

I want to create a new one (modifying the actual) but I dont know how to start....

best regards,
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Where is the source code of clipping plane tool?

Post by Jee-Bee »

I guess we have serval... at least one in FEM and one in sketcher. Probably one in Part or PartDesign... so could you be a bit more specific??
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Where is the source code of clipping plane tool?

Post by PrzemoF »

Your best shot is to start with src/Gui/CommandView.cpp

-i - ignore case
-I - ignore binary files
-v \.ts - do not show .ts files
-v \.qm - do not show .qm files

Code: Select all

$ git grep -iI "clipping plane" | grep -v \.ts | grep -v \.qm
ChangeLog.txt:  * Clipping plane should have more controls
ChangeLog.txt:  * command for toggling clipping plane
src/Gui/CommandView.cpp:    sMenuText     = QT_TR_NOOP("Clipping plane");
src/Gui/CommandView.cpp:    sToolTipText  = QT_TR_NOOP("Toggles clipping plane for active view");
src/Gui/CommandView.cpp:    sStatusTip    = QT_TR_NOOP("Toggles clipping plane for active view");
src/Gui/View3DInventorViewer.cpp:    // get the normal of the front clipping plane
src/Gui/View3DInventorViewer.cpp:    // get the normal of the back clipping plane
src/Gui/View3DInventorViewer.h:    /** @name Clipping plane, near and far plane */
src/Gui/View3DInventorViewer.h:    /** Checks whether a clipping plane is set or not. */
src/Mod/Fem/femcommands/commands.py:                          'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_ClippingPlaneAdd", "Clipping plane on face"),
src/Mod/Fem/femcommands/commands.py:                          'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_ClippingPlaneAdd", "Add a clipping plane on a selected face")}
src/Mod/Fem/femcommands/commands.py:                          'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_ClippingPlaneRemoveAll", "Remove all clipping planes"),
src/Mod/Fem/femcommands/commands.py:                          'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_ClippingPlaneRemoveAll", "Remove all clipping planes")}
src/Mod/Mesh/App/FeatureMeshSegmentByMesh.cpp:    // the clipping plane
src/Mod/Mesh/App/FeatureMeshSegmentByMesh.cpp:        // so we need the nearest facet to the front clipping plane
src/Mod/Mesh/App/FeatureMeshSegmentByMesh.cpp:        // get the nearest facet to the user (front clipping plane)
src/Mod/Mesh/Gui/ViewProvider.cpp:    // get the normal of the front clipping plane
src/Mod/Mesh/Gui/ViewProvider.cpp:    // get the normal of the front clipping plane
src/Mod/Mesh/Gui/ViewProviderMeshNode.cpp:    // get the normal of the front clipping plane
src/Mod/Show/TempoVis.py:        self.sketch_clipplane_on = False #True if some clipping planes are active
src/Mod/Show/TempoVis.py:        '''clipPlane(doc_obj_or_list, enable, placement, offset): slices off the object with a clipping plane.
src/Mod/Show/TempoVis.py:        placement: XY plane of local coordinates of the placement is the clipping plane. The placement must be in document's global coordinate system.
src/Mod/Show/TempoVis.py:        If enable argument is omitted, calling the routine repeatedly will toggle clipping plane."""
Post Reply