LoginSignup
1
3

More than 1 year has passed since last update.

[Python] FreeCADのマクロで円柱を表示する

Last updated at Posted at 2018-04-07

(参考)[Python] VTKで円柱を表示する
https://qiita.com/itoru257/items/df0a7b2a2896573c5874

環境

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Python version: 2.7.8

円柱の表示


# -*- coding: utf-8 -*-
import FreeCAD
import Part
App.ActiveDocument.addObject("Part::Cylinder","Cylinder")
App.ActiveDocument.ActiveObject.Label = "円柱"
App.ActiveDocument.recompute()
FreeCAD.getDocument("MeishoMisette").getObject("Cylinder").Radius = '2.5 mm'
FreeCAD.getDocument("MeishoMisette").getObject("Cylinder").Height = '5 mm'
Gui.activeDocument().activeView().viewAxonometric()
Gui.SendMsgToActiveView("ViewFit")
1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3