Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

Technical Information IV

Technical Information IV
Sandor_ Racz 2002/06/02 01:36
Argument that are collections are handled as lists:

>>> from gp_Torus import *
>>> t=gp_Torus()
>>> t.SetMinorRadius(1)
>>> t.SetMajorRadius(12.4)
>>> coeffs = [0]*31
>>> coeffs
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
, 0, 0, 0, 0]
>>> t.Coefficients(coeffs)
>>> coeffs
[1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 2.0, 2.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, -309.52000000000004, -309.52000000000004, 305.52000000
000004, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -307.52000000000004]
>>>
Here the user is responsible to define the size of the argument that will contain the returned data (the size of the list was 31 in this case)


Modules communicate with each other in the usual python way:

>>> from gp_VectorWithNullMagnitude import *
>>> from Standard_Type import *
>>> vector = gp_VectorWithNullMagnitude()
>>> type = vector.DynamicType()
>>> type.Name()
'gp_VectorWithNullMagnitude'
>>> type_test = Standard_Type('integer')
>>> vector.IsKind(type)
1
>>> vector.IsKind(type_test)
0
>>>
 
 
Latest news
  • Open CASCADE Technology 6.8.0 is available for download!
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map