PartDesign Hole feature

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!
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: PartDesign Hole feature

Post by NormandC »

eivindkvedalen wrote:I'm rebasing regularily on my computer, so it's still in good shape
Awesome. :)
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: PartDesign Hole feature

Post by wmayer »

Since there are further requests to finally add this to master I gave it a try yesterday evening. However, due to the latest changes some things have been broken and in the that stage it doesn't work any more. So, I found and fixed a couple of issues but it still has some problems.

I have pushed the rebased and fixed branch to my github repo: https://github.com/wwmayer/FreeCAD/commits/hole
  • The FeatureHole replaced Length with Depth but in the command still Length was used
  • When canceling the command abortCommand() is invoked to revert all pending changes of the document. Therefore the member variable vp is set to nullptr which wasn't handled.
  • The boost connection wasn't disconnected in the destructor which then caused crashes when using the command more than once
  • pass double values instead of quantities to doCommand
At the moment things basically work again but there is a nasty issue I wasn't able to figure out: when double-clicking the hole feature after creation it correctly shows the values. But when pressing OK then diameter and hole cut type always changes their values.

Nevertheless, I think it's again in a state that it can be merged to master now. This way we also get a wider audience that may report more bugs.
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: PartDesign Hole feature

Post by eivindkvedalen »

wmayer wrote:Since there are further requests to finally add this to master I gave it a try yesterday evening. However, due to the latest changes some things have been broken and in the that stage it doesn't work any more. So, I found and fixed a couple of issues but it still has some problems.

I have pushed the rebased and fixed branch to my github repo: https://github.com/wwmayer/FreeCAD/commits/hole
  • The FeatureHole replaced Length with Depth but in the command still Length was used
  • When canceling the command abortCommand() is invoked to revert all pending changes of the document. Therefore the member variable vp is set to nullptr which wasn't handled.
  • The boost connection wasn't disconnected in the destructor which then caused crashes when using the command more than once
  • pass double values instead of quantities to doCommand
At the moment things basically work again but there is a nasty issue I wasn't able to figure out: when double-clicking the hole feature after creation it correctly shows the values. But when pressing OK then diameter and hole cut type always changes their values.

Nevertheless, I think it's again in a state that it can be merged to master now. This way we also get a wider audience that may report more bugs.
Thank you for working on this. I've also done lots of changes locally, and I'll try to incorporate your changes when necessary. Please don't merge the current version, I'd like to get some more functionality in first... I'll push my changes to github during the next days, so more people can test.

Eivind
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: PartDesign Hole feature

Post by wmayer »

Thank you for working on this. I've also done lots of changes locally, and I'll try to incorporate your changes when necessary. Please don't merge the current version, I'd like to get some more functionality in first... I'll push my changes to github during the next days, so more people can test.
OK. Please note that since posting on this thread I pushed a few more changes to fix a build error with older OCC versions and a couple of warnings.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: PartDesign Hole feature

Post by chrisb »

eivindkvedalen wrote: Wed Apr 12, 2017 2:53 pm Thank you for working on this. I've also done lots of changes locally, and I'll try to incorporate your changes when necessary. Please don't merge the current version, I'd like to get some more functionality in first... I'll push my changes to github during the next days, so more people can test.
Eivind
May I gently ask for the state of the hole feature? We talked about it and could fairly well use it in the Path Workbench.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: PartDesign Hole feature

Post by HoWil »

chrisb wrote: Mon Jul 03, 2017 5:53 pm May I gently ask for the state of the hole feature? We talked about it and could fairly well use it in the Path Workbench.
+1... very interested.
BR Howil
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: PartDesign Hole feature

Post by eivindkvedalen »

chrisb wrote: Mon Jul 03, 2017 5:53 pm May I gently ask for the state of the hole feature? We talked about it and could fairly well use it in the Path Workbench.
I've had too much other work lately to finish this. I also wanted to add actual threads to it (I've got a 3D printer at work), and that has been more difficult than I anticipated. Additionally, I have had trouble running FreeCAD in a debugger here (Ubuntu 17), as it takes ages to both start and step through code. That makes development very tedious and time consuming. Now it is almost vacation time, so I might get some more time. I might also end up with splitting this into two phases, with real threads postponed.

Eivind
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: PartDesign Hole feature

Post by chrisb »

Looking forward for it. It's done when it's done.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: PartDesign Hole feature

Post by NormandC »

eivindkvedalen wrote: Wed Jul 05, 2017 8:20 pm I might also end up with splitting this into two phases, with real threads postponed.
That would be a reasonable course of action IMHO. :)

Have a nice vacation!
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: PartDesign Hole feature

Post by peterl94 »

eivindkvedalen wrote: Wed Jul 05, 2017 8:20 pm I might also end up with splitting this into two phases, with real threads postponed
Seems like the use cases for modeled threads are fairly limited anyway. In the CAD software I'm familiar with, modeled threads (internal and external) are created with a separate thread feature.
Post Reply