Pipe with profile seems to be broken

Post here for help on using FreeCAD's graphical user interface (GUI).
simsiem
Posts: 40
Joined: Tue Feb 02, 2016 7:19 am

Pipe with profile seems to be broken

Postby simsiem » Sat Mar 04, 2017 2:23 pm

Hi,

if I add a profile to a pipe, I get the error

Pipe: 'FeaturePython' object has no attribute 'Profile'


on the pipe object. This already worked in the past. Attached you find a minimal example file.

Do you observe the same?

Thanks for your support.

Simon

---

OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10356 (Git)
Build type: None
Branch: master
Hash: cd1f010fe75ee672b0afe684c95736d850c01c93
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Attachments
pipe_with_profile.fcstd
Minimal example of a pipe with a rectangular profile
(6.53 KiB) Downloaded 9 times
User avatar
NormandC
Posts: 12077
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Pipe with profile seems to be broken

Postby NormandC » Sat Mar 04, 2017 2:31 pm

Hello Simon,

Your pipe appears fine until I do a force recompute using the Macro ForceRecompute. Then I get a similar error, but there's more to it, here's the output of the Report view:

Traceback (most recent call last):
File "/usr/lib/freecad-daily/Mod/Arch/ArchPipe.py", line 209, in execute
p = self.getProfile(obj)
File "/usr/lib/freecad-daily/Mod/Arch/ArchPipe.py", line 261, in getProfile
if not obj.Base.Profile.Wires[0].isClosed():
<type 'exceptions.AttributeError'>: 'FeaturePython' object has no attribute 'Profile'


There have been changes to the code base to add compatibility to Python3, but the freecad-daily package from the PPA still runs on Python2. I think this may be a consequence of the py3 changes.
simsiem
Posts: 40
Joined: Tue Feb 02, 2016 7:19 am

Re: Pipe with profile seems to be broken

Postby simsiem » Sat Mar 04, 2017 7:02 pm

Hi NormandC,

yes, this error appears when I force recomputation. I do so, when I change the underlying dwire.

Switching to Python 3 is a good thing. Any idea, whether this is easy to fix and when? From reading the code, it looks reasonable without any dependency on Python 2 or 3. But I have no insights into the underlying FreeCAD code.

Best regards

Simon
User avatar
NormandC
Posts: 12077
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Pipe with profile seems to be broken

Postby NormandC » Sat Mar 04, 2017 7:09 pm

Hello Simon,

Unfortunately python might as well be Mandarin to me. The best person to answer that would be yorik, the Arch workbench developer. I'm hoping quoting his handle will bring him here. ;)

Cheers,

Norm
simsiem
Posts: 40
Joined: Tue Feb 02, 2016 7:19 am

Re: Pipe with profile seems to be broken

Postby simsiem » Tue Mar 07, 2017 5:18 pm

I created a bug report and attached a patch to it.

https://www.freecadweb.org/tracker/view.php?id=2954

Can someone please review the patch and merge it so it is in future daily builds?

Thanks a lot

Simon
simsiem
Posts: 40
Joined: Tue Feb 02, 2016 7:19 am

Re: Pipe with profile seems to be broken

Postby simsiem » Sun Mar 12, 2017 9:50 am

Hi yorik,

any chance to get the linked patch integrated?

Best regards

Simon
User avatar
kkremitzki
Posts: 326
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: Pipe with profile seems to be broken

Postby kkremitzki » Sun Mar 12, 2017 2:17 pm

simsiem wrote:Hi yorik,

any chance to get the linked patch integrated?

Best regards

Simon

Hi simsiem, are you familiar with git/github at all? We usually do our development through that rather than via patches in bug tracker. Also if you don't quote Yorik directly he's unlikely to see this thread. If you like I can submit your patch as a pull request in Github to get things moving along.
User avatar
Kunda1
Posts: 640
Joined: Thu Jan 05, 2017 9:03 pm

Re: Pipe with profile seems to be broken

Postby Kunda1 » Sun Mar 12, 2017 4:32 pm

kkremitzki wrote:
simsiem wrote:Hi yorik,

any chance to get the linked patch integrated?

Best regards

Simon

Hi simsiem, are you familiar with git/github at all? We usually do our development through that rather than via patches in bug tracker. Also if you don't quote Yorik directly he's unlikely to see this thread. If you like I can submit your patch as a pull request in Github to get things moving along.


I submit the patch for simsiem in https://github.com/FreeCAD/FreeCAD/pull/612
simsiem
Posts: 40
Joined: Tue Feb 02, 2016 7:19 am

Re: Pipe with profile seems to be broken

Postby simsiem » Tue Mar 14, 2017 8:29 am

Sorry I was not aware of your workflow guidelines. Actually I worked with Git a while in project and created the patch with it. But I did not work with GitHub and pull requests so far. Thanks kunda1 for starting the pull request.

What are the next steps now? How will things go on until the integration on master and in the next daily release?
User avatar
sgrogan
Posts: 3005
Joined: Wed Oct 22, 2014 5:02 pm

Re: Pipe with profile seems to be broken

Postby sgrogan » Tue Mar 14, 2017 1:11 pm

simsiem wrote:What are the next steps now? How will things go on until the integration on master and in the next daily release?

In the next days one of the main devs will review the pull request and merge if it's acceptable. Otherwise they will comment on the pull request. If you have a GitHub account you can subscribe to the pull request and get notifications when there is activity. Thanks for the patch!