Pipe with profile seems to be broken

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
simsiem
Posts: 46
Joined: Tue Feb 02, 2016 7:19 am

Pipe with profile seems to be broken

Post by simsiem »

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

Re: Pipe with profile seems to be broken

Post by NormandC »

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: 46
Joined: Tue Feb 02, 2016 7:19 am

Re: Pipe with profile seems to be broken

Post by simsiem »

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

Re: Pipe with profile seems to be broken

Post by NormandC »

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: 46
Joined: Tue Feb 02, 2016 7:19 am

Re: Pipe with profile seems to be broken

Post by simsiem »

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: 46
Joined: Tue Feb 02, 2016 7:19 am

Re: Pipe with profile seems to be broken

Post by simsiem »

Hi yorik,

any chance to get the linked patch integrated?

Best regards

Simon
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Pipe with profile seems to be broken

Post by kkremitzki »

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.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Pipe with profile seems to be broken

Post by Kunda1 »

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
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
simsiem
Posts: 46
Joined: Tue Feb 02, 2016 7:19 am

Re: Pipe with profile seems to be broken

Post by simsiem »

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
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Pipe with profile seems to be broken

Post by sgrogan »

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!
"fight the good fight"
Post Reply