MIBA/cs

From FreeCAD Documentation
Revision as of 16:46, 11 February 2014 by Honza32 (talk | contribs) (Created page with "== Úvod == Miba je způsob jak vložit informace o 3D prostoru do 2D obrázku. Často se to realizuje použitím 2D obrázků místo 3D prohlížeče. Pomocí Miba informací...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Úvod

Miba je způsob jak vložit informace o 3D prostoru do 2D obrázku. Často se to realizuje použitím 2D obrázků místo 3D prohlížeče. Pomocí Miba informací jste schopni vypočítat pozici 3D umístění ve 2D obrazu. To Vám umožňuje později doladit obraz libovolnými 3D informacemi. Můžete vzít obraz v ranném stádiu (plán) a použít jej později (např. výroba). Nemusíte znát druh 3D dat nebo pozici, když berete obraz. Takže obraz je kompletně oddělen od dat.

A detailed specification you can find here: http://miba.juergen-riegel.net/

Miba in FreeCAD

If you choose a file format which has an comment ability ( JPG and PNG) you can choose to write a comment or insert the MIBA information in the comment fileds (default):

Making Miba pictures by script

 import Part,PartGui
 # loading test part
 Part.open("C:/Documents and Settings/jriegel/My Documents/Projects/FreeCAD/data/Blade.stp")
 OutDir = 'c:/temp/'
 Gui.ActiveDocument.ActiveView.setAnimationEnabled(False)
 
 # creating images with different Views, Cameras and sizes
 for p in ["PerspectiveCamera","OrthographicCamera"]:
   Gui.SendMsgToActiveView(p)
   for f in ["ViewAxo","ViewFront","ViewTop"]:
     Gui.SendMsgToActiveView(f)
     for x,y in [[500,500],[1000,3000],[3000,1000],[3000,3000],[8000,8000]]:
       Gui.ActiveDocument.ActiveView.saveImage(OutDir + "Blade_" + p +"_" + f + "_" + `x` + "_" + `y` + ".jpg",x,y,"White")
       Gui.ActiveDocument.ActiveView.saveImage(OutDir + "Blade_" + p +"_" + f + "_" + `x` + "_" + `y` + ".png",x,y,"Transparent")
 
 # close active document
 App.closeDocument(App.ActiveDocument.Name)
Other languages: