Changes between Version 19 and Version 20 of salome_shaper


Ignore:
Timestamp:
Nov 14, 2019, 5:15:15 PM (5 years ago)
Author:
dpenko
Comment:

Add syntax example for getting volume of the model.

Legend:

Unmodified
Added
Removed
Modified
  • salome_shaper

    v19 v20  
    717717
    718718}}}
     719
     720=== Primer ukaza: izračun volumna modela ===
     721
     722Spodaj je prikazan primer sintakse za pridobitev volumna modela s pomočjo knjižnice {{{GeomAlgoAPI}}}.
     723
     724Definicija funkcije {{{GeomAlgoAPI_ShapeTools.volume()}}} je na voljo [https://docs.salome-platform.org/latest/tui/SHAPER/classGeomAlgoAPI__ShapeTools.html#a8b5fe26df4c020d492c1288a7eb7aff9 tukaj].
     725
     726{{{
     727#!python
     728
     729from GeomAlgoAPI import GeomAlgoAPI_ShapeTools  as ShapeTools
     730
     731result = koncni_model.defaultResult() # Vrne objekt tipa ModelAPI.ModelAPI_Result
     732volumen = ShapeTools.volume(result.shape()))
     733}}}