Changes between Version 52 and Version 53 of PythonOcc


Ignore:
Timestamp:
Oct 31, 2015, 5:21:47 PM (8 years ago)
Author:
dpenko
Comment:

Dopolnil "Uvod v modeliranje PythonOCC s 3D primitivi" in uredil nekaj teksta.

Legend:

Unmodified
Added
Removed
Modified
  • PythonOcc

    v52 v53  
    5555}}}
    5656
    57 The next step is to init the display functions:
    5857V naslednjem koraku inicializiramo funkcije za display:
    5958{{{
     
    6261}}}
    6362[[Image(3Dprimitives.png, width=480px, right)]]
    64 Let’s now define the two functions that create and display a box and a cylinder:
    6563Nato definiramo dve funkciji, ki izdelata kocko in cilinder:
    6664{{{
     
    129127aEdge4 = BRepBuilderAPI_MakeEdge(aSegment4.Value())
    130128
     129'''
     130#Robove se lahko določi tudi direktno s točkami:
     131aEdge1 = BRepBuilderAPI_MakeEdge(aPnt1, aPnt2)
     132aEdge2 = BRepBuilderAPI_MakeEdge(aPnt2, aPnt3)
     133aEdge3 = BRepBuilderAPI_MakeEdge(aPnt3, aPnt4)
     134aEdge4 = BRepBuilderAPI_MakeEdge(aPnt4, aPnt1)
     135'''
    131136#Povezovanje robov v mrežo
    132137aWire  = BRepBuilderAPI_MakeWire(aEdge1.Edge() , aEdge2.Edge() ,\
     
    140145myBody = BRepPrimAPI_MakePrism(myFaceProfile.Face() , aPrismVec).Shape()
    141146
     147#Spodaj so zakomentirani ukazi za prikazovanje posameznih delov.
     148'''
     149#Prikaz točk
     150display.DisplayShape(aPnt1)
     151display.DisplayShape(aPnt2)
     152display.DisplayShape(aPnt3)
     153display.DisplayShape(aPnt4)
     154'''
     155'''
     156#Prikaz robov
     157display.DisplayShape(aEdge1.Shape())
     158display.DisplayShape(aEdge2.Shape())
     159display.DisplayShape(aEdge3.Shape())
     160display.DisplayShape(aEdge4.Shape())
     161'''
     162'''
     163#Prikaz mreže
     164display.DisplayShape(aWire.Shape())
     165'''
     166'''
     167#Prikaz profila
     168display.DisplayShape(myFaceProfile.Shape())
     169'''
     170#Prikaz telesa
    142171display.DisplayShape(myBody)
     172
    143173start_display()
    144174}}}