Python module for parametric CAD

前端 未结 5 1970
小鲜肉
小鲜肉 2021-01-30 14:26

I am looking for a CAD module for python. This is what i\'ve found, correct me if I\'m wrong:

  • PythonCAD:
    • file types: DWG,DXF,SVG
    • oriented: click
5条回答
  •  故里飘歌
    2021-01-30 14:54

    I found that Freecad is the best solution. The python bindings lets you design parts in a comprehensive way.

    myShape = Part.makeBox(2,2,2)
    myShape.translate(Base.Vector(2,0,0))
    

    From simple geometries you can use boolean operations:

    cylinder1 = Part.makeCylinder(3,10,Base.Vector(0,0,0),Base.Vector(1,0,0))
    cylinder2 = Part.makeCylinder(3,10,Base.Vector(5,0,-5),Base.Vector(0,0,1))
    common = cylinder1.common(cylinder2)
    

    The only downpoint is the installation with mac os, I could not compile it on snow leaopard (because too much dependencies on unsustained libraries).

    But pythonocc has the same problem and what i don't like is the minimal documentation and the synthax which is too much opencascade like and not to much pythonistic.

提交回复
热议问题