Changes between Version 29 and Version 30 of PythonOcc


Ignore:
Timestamp:
Jan 7, 2013, 11:43:37 AM (11 years ago)
Author:
Leon Kos
Comment:

Transfrormacije

Legend:

Unmodified
Added
Removed
Modified
  • PythonOcc

    v29 v30  
    894894}}}
    895895
     896Q: Kako postavimo model v drugi položaj?
     897
     898A: Okoli osi v prostoru lahko rotirate:
     899
     900{{{
     901#!python
     902    LokacijaOsi1 = gp_Pnt(8, 45, -100)
     903    RotacijaOs1 = gp_Ax1(LokacijaOsi1, gp_Dir(0,0,1)) #Os rotacije
     904    TransfRot1 = gp_Trsf()
     905    TransfRot1.SetRotation(RotacijaOs1, t1)
     906    J19 = BRepBuilderAPI_Transform(J18, TransfRot1).Shape()
     907}}}
     908Translacija je še lažja:
     909{{{
     910#!python
     911    Premik = gp_Vec(-130, -870, -2530)
     912    Translacija = gp_Trsf()
     913    Translacija.SetTranslation(Premik)
     914    rezultat = BRepBuilderAPI_Transform(J17, Translacija).Shape()
     915}}}
     916
     917Ostale funkcije so opisane v http://api.pythonocc.org/OCC.gp.gp_Trsf-class.html
    896918
    897919= Povezave =