New errors when using makePipeShell

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
jblugagne
Posts: 2
Joined: Fri Jan 11, 2019 1:10 am

New errors when using makePipeShell

Post by jblugagne »

Hi all,

I have a script that used to work before I updated to the latest version available on the Fedora repos. This script generates a rather complex part, and I run into errors when trying to use the makePipeShell function (I didn't have those problems before).
Below is the type of error I get:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/home/jeanbaptiste/bu/Senior Design Project/JB_proto/test.py", line 13, in <module>
wedge = W.makePipeShell([triangle],True,True)
Part.OCCError: BRep_Tool:: TopoDS_Vertex hasn't gp_Pnt
The following script is enough to re-create this error:

Code: Select all

from FreeCAD import Base
from FreeCAD import Vector as vec
import Part

trpts = [vec(0,0,0),vec(20.0,0,0),vec(0,0,10.0), vec(0,0,0)]
triangle= Part.makePolygon(trpts)

line = [Part.Line(vec(0,0,0), vec(0,30.0,0))]
S = Part.Shape(line)
W = Part.Wire(S.Edges)
wedge = W.makePipeShell([triangle],True,True)
Has there been a change in the makePipe / makePipeShell functions? (both return the same errors)
The new auto-generated documentation doesn't give a lot of useful information:
https://www.freecadweb.org/api/d1/de8/c ... 903b24d915

OS: "Fedora release 29 (Twenty Nine)"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.Unknown
Build type: Unknown
Python version: 2.7.15
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.9.1.oce-0.18
Locale: English/UnitedStates (en_US)
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: New errors when using makePipeShell

Post by chrisb »

Is this pretty old code? Perhaps even 0.16 or older? Then you should try Part.LineSegment instead of Part.Line.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
jblugagne
Posts: 2
Joined: Fri Jan 11, 2019 1:10 am

Re: New errors when using makePipeShell

Post by jblugagne »

Thank you, that solved my issue!

Yeah the code was pretty old and I hadn't updated FreeCAD in a while.
Post Reply