Freecad memorandum (for myself)

It is a memorandum for myself.

Create a primitive sphere and export it with iges (specify radius and position)

Sphere.py


import FreeCAD as APP
import Part
freecad = APP.newDocument("model")
comp_1 = Part.Sphere()
comp_1.Radius=10
myPart = freecad.addObject("Part::Feature","comp_1")
myPart.Shape= comp_1.toShape()
myPart.Placement = App.Placement(App.Vector(100,0,0),App.Rotation(App.Vector(0,0,1),0))
freecad.recompute()
myPart.Shape.MatrixOfInertia
freecad.saveAs("comp_1.FCStd")
Part.export([freecad.Objects[0]],"comp_1.iges")

Recommended Posts

Freecad memorandum (for myself)
python [for myself]
Python memo (for myself): Array
Python Tkinter notes (for myself)
Pipenv usage summary (for myself)
Linux command memorandum [for beginners]
[Note] [For myself] Django command
(For myself) Flask_7 (Open database from Flask)
(For myself) Flask_ex (templates and static)
(For myself) Flask_5 (Add to txt file)
Jupyter Notebook extension, nbextensions settings for myself
(For myself) Put Flask in VS Code
AtCoder cheat sheet in python (for myself)
(For myself) Django_1 (Basic / Hello World / Template)
Frequently used syntax memorandum for each language
(For myself) Flask_3 (form, POST and GET)
[Competitive programming] [Python3] Required knowledge, for myself