[SOLVED] "command not done" when doing Wiki tutorial

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
sdaau_ml
Posts: 35
Joined: Fri Dec 07, 2018 12:18 am

[SOLVED] "command not done" when doing Wiki tutorial

Post by sdaau_ml »

Hi all,

Code: Select all

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15379 (Git)
Build type: Release
Branch: master
Hash: 3290c36d28551875f02333c2e01af80e38b8ad02
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
In my FreeCAD, I'm trying to do this tutorial: https://www.freecadweb.org/wiki/Manual: ... g_geometry

I just copy/pasted the lines from the second part of the tutorial, so I literally have just this at the moment:

Code: Select all

V1 = FreeCAD.Vector(0,10,0)
V2 = FreeCAD.Vector(30,10,0)
V3 = FreeCAD.Vector(30,-10,0)
V4 = FreeCAD.Vector(0,-10,0)

L1 = Part.Line(V1,V2)
L2 = Part.Line(V4,V3)

VC1 = FreeCAD.Vector(-10,0,0)
C1 = Part.Arc(V1,VC1,V4)
VC2 = FreeCAD.Vector(40,0,0)
C2 = Part.Arc(V2,VC2,V3)

E1 = Part.Edge(L1)
E2 = Part.Edge(L2)
E3 = Part.Edge(C1)
E4 = Part.Edge(C2)

W = Part.Wire([E1,E4,E2,E3])
I try to run this code in FreeCAD Python console; I get:

Code: Select all

>>> execfile("/path/to/testUnion.FCMacro")
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/path/to/testUnion.FCMacro", line 52, in <module>
    W = Part.Wire([E1,E4,E2,E3])
Part.OCCError: BRep_API: command not done
As far as I can see from 0002110: BRep_API: command not done - FreeCAD Tracker, this is a message from OpenCascade if it cannot complete an operation - for instance, if it gets invalid objects as input.

Then again, I'm not trying to be creative here - I'm just copy pasting from a tutorial ?! So what am doing wrong - why won't this run?
Last edited by sdaau_ml on Sat Dec 22, 2018 5:03 pm, edited 1 time in total.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: "command not done" when doing Wiki tutorial

Post by Jee-Bee »

try

Code: Select all

V1 = FreeCAD.Vector(0,10,0)
V2 = FreeCAD.Vector(30,10,0)
V3 = FreeCAD.Vector(30,-10,0)
V4 = FreeCAD.Vector(0,-10,0)

L1 = Part.LineSegment(V1,V2)
L2 = Part.LineSegment(V4,V3)

VC1 = FreeCAD.Vector(-10,0,0)
C1 = Part.Arc(V1,VC1,V4)
VC2 = FreeCAD.Vector(40,0,0)
C2 = Part.Arc(V2,VC2,V3)

E1 = Part.Edge(L1)
E2 = Part.Edge(L2)
E3 = Part.Edge(C1)
E4 = Part.Edge(C2)

W = Part.Wire([E1,E4,E2,E3])
Part.Line is pre 0.16 code... I guess this was forgotten. Part.Line is now infinite line
sdaau_ml
Posts: 35
Joined: Fri Dec 07, 2018 12:18 am

Re: "command not done" when doing Wiki tutorial

Post by sdaau_ml »

Thanks a ton, @Jee-Bee:
Jee-Bee wrote: Sat Dec 22, 2018 4:49 pm

Code: Select all

L1 = Part.LineSegment(V1,V2)
L2 = Part.LineSegment(V4,V3)
Part.Line is pre 0.16 code... I guess this was forgotten. Part.Line is now infinite line
Yes, that works! Thanks again!
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: "command not done" when doing Wiki tutorial

Post by chrisb »

sdaau_ml wrote: Sat Dec 22, 2018 5:02 pm L2 = Part.LineSegment(V4,V3)
I changed the wiki without testing. Could you please verify that I found all relevant places and report back?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply