ViewProvider specific clip plane, yes or no?

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
abdullah
Posts: 2315
Joined: Sun May 04, 2014 3:16 pm

Re: ViewProvider specific clip plane, yes or no?

Postby abdullah » Tue May 15, 2018 5:36 pm

BTW, new Appimage with last DeepSOIC's fixes:
https://forum.freecadweb.org/viewtopic. ... 87#p233987
looo
Posts: 1707
Joined: Mon Nov 11, 2013 5:29 pm

Re: ViewProvider specific clip plane, yes or no?

Postby looo » Wed May 16, 2018 4:48 pm

abdullah wrote:What makes it easier to manipulate?
for 1 I think it should be possible to add the capping algorithm. For 2 I don't know. Thats why I think 1 is easier to work with.
But I give up the capping-plane stuff for now. The really useful thing is the clipping in sketch mode. So go ahead. 1 or 2 what ever works best for you ;)
abdullah
Posts: 2315
Joined: Sun May 04, 2014 3:16 pm

Re: ViewProvider specific clip plane, yes or no?

Postby abdullah » Thu May 17, 2018 12:31 pm

DeepSOIC wrote:...
TempoVis is loaded when entering Sketcher edit mode or is it loaded when starting FreeCAD? I mean your clipplane is added to the ViewProviders when exactly? What happens when a new viewprovider is created (for example of creation of a new object)? Is the clip node inserted when exactly?

I am trying to evaluate any advantage that my code might have over yours, because if there is none, then I ditch my code and ask for a PR of your commits :lol:
DeepSOIC
Posts: 5525
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: ViewProvider specific clip plane, yes or no?

Postby DeepSOIC » Thu May 17, 2018 7:09 pm

abdullah wrote:
Thu May 17, 2018 12:31 pm
TempoVis is loaded when entering Sketcher edit mode or is it loaded when starting FreeCAD? I mean your clipplane is added to the ViewProviders when exactly?
It is injected only when the clipping for an object is requested the first time.
abdullah
Posts: 2315
Joined: Sun May 04, 2014 3:16 pm

Re: ViewProvider specific clip plane, yes or no?

Postby abdullah » Fri May 18, 2018 12:06 pm

DeepSOIC wrote:
Thu May 17, 2018 7:09 pm
abdullah wrote:
Thu May 17, 2018 12:31 pm
TempoVis is loaded when entering Sketcher edit mode or is it loaded when starting FreeCAD? I mean your clipplane is added to the ViewProviders when exactly?
It is injected only when the clipping for an object is requested the first time.
It works for me. Then I ditch my code and PR yours ;)
abdullah
Posts: 2315
Joined: Sun May 04, 2014 3:16 pm

Re: ViewProvider specific clip plane, yes or no?

Postby abdullah » Fri May 18, 2018 12:40 pm

DeepSOIC wrote:
Thu May 17, 2018 7:09 pm
abdullah wrote:
Thu May 17, 2018 12:31 pm
TempoVis is loaded when entering Sketcher edit mode or is it loaded when starting FreeCAD? I mean your clipplane is added to the ViewProviders when exactly?
It is injected only when the clipping for an object is requested the first time.
I have removed my code:
https://github.com/abdullahtahiriyo/Fre ... lipplane_5

But now it segfaults when touching the visibility property. Do you need my code at all for yours to work?
DeepSOIC
Posts: 5525
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: ViewProvider specific clip plane, yes or no?

Postby DeepSOIC » Fri May 18, 2018 12:48 pm

abdullah wrote:
Fri May 18, 2018 12:40 pm
Do you need my code at all for yours to work?
Nope... that's strange.
DeepSOIC
Posts: 5525
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: ViewProvider specific clip plane, yes or no?

Postby DeepSOIC » Fri May 18, 2018 12:54 pm

I've just checked, I don't have any trouble hiding/showing an object with spacebar when clipping plane is active.

I'm testing with this quite old version...
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13509 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 0258808ccb6ba3bd5ea9312f79cd023f1a8671b7
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Russian/RussianFederation (ru_RU)
...where I replaced the Show module with a symlink to one in my coding place. This way, I avoid building FreeCAD. Sometimes I can even reload python stuff on the fly, without closing FreeCAD.
abdullah
Posts: 2315
Joined: Sun May 04, 2014 3:16 pm

Re: ViewProvider specific clip plane, yes or no?

Postby abdullah » Fri May 18, 2018 2:21 pm

DeepSOIC wrote:
Fri May 18, 2018 12:54 pm
...where I replaced the Show module with a symlink to one in my coding place. This way, I avoid building FreeCAD. Sometimes I can even reload python stuff on the fly, without closing FreeCAD.
Here the poor old c++ guy did have to "make clean", as just compiling over was the reason for the segfault.

https://github.com/FreeCAD/FreeCAD/pull/1461

At the end was great that you managed to convince me to convince you to make this feature ;)
DeepSOIC
Posts: 5525
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: ViewProvider specific clip plane, yes or no?

Postby DeepSOIC » Fri May 18, 2018 2:56 pm

abdullah wrote:
Fri May 18, 2018 2:21 pm
you managed to convince me to convince you to make this feature
:lol: :lol: