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

Search the Forums
See All Topics
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
Forums
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 / Forums / pythonCascade / Technical Information IV

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.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!

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