I want to create FreeCad extension for own purposes. I assumed it would be ok to find some similar command as I need and accomodate it to my needs. Now I'm facing import problem (I use Linux Debian). Seems that I don't understand the border between C++ and python world.
I picked _CommandWall from ArchWall.py. With such a code:
Code: Select all
import Part
trace = Part.LineSegment(start_point, end_point)
Code: Select all
AttributeError: 'module' object has no attribute 'LineSegment'
Seems that ArchWall has no problem with equivalent statement in getPoint() method.
So I can import Part module, but seems it's different one that ArchWall is importing.
When I print path of the imported module just after importing it - I get:
Code: Select all
/usr/lib/freecad/lib/Part.so
As I debugged so far dir(Part) also returns the same list of defined symbols.
What do I do wrong?
Thanks in advance.
Michal