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

Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forum
Open Source community
Training and e-learning
A la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forum / Technical Information IV

Forum

Technical Information IV
Sandor_ Racz2002/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
  • FAQ section updated
  • OPEN CASCADE Uses Intel ® Parallel Studio XE to Introduce Parallelism into SALOME SMESH Module
  • Open CASCADE Technology 6.5.2 is available for download!

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