For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Technical Information IV

Sandor_ Racz's picture
Forums: 

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 >>>