cPy.PrimAPI module#
- class SpiralProfile(value)[source]#
Bases:
EnumThe profile type of the spiral.- CIRCLE = 0#
- RECTANGLE = 1#
- class FontStyle(value)[source]#
Bases:
EnumEnumeration of the string drawing styles.- Regular = 0#
- Italic = 1#
- Underline = 2#
- StrikeThrough = 4#
- class FontWeight(value)[source]#
Bases:
Enum- Dont = 0#
- Thin = 100#
- ExtraLight = 200#
- Light = 300#
- Normal = 400#
- Medium = 500#
- DemiBold = 600#
- Bold = 700#
- ExtraBold = 800#
- Black = 900#
- class ThreadProfile(value)[source]#
Bases:
Enumthread profile types- ThreadNone = -1#
- ThreadTriangle = 0#
- ThreadTrapeze = 1#
- ThreadRectangular = 2#
- ThreadRound = 3#
- ThreadPersistent = 4#
- class ThreadStudBodyType(value)[source]#
Bases:
Enumthread body type- StudCylinder = 0#
- StudCone = 1#
- class SlitType(value)[source]#
Bases:
Enumenumeration the slit types- none = -1#
- Slot = 0#
- Phillipse = 1#
- Pozidriv = 2#
- Robertson = 3#
- HexSocket = 4#
- SecurityHexSocket = 5#
- Torx = 6#
- SecurityTorx = 7#
- TriWing = 8#
- TorqSet = 9#
- TripleSquare = 10#
- Polydrive = 11#
- DoubleSquare = 12#
- SplineDrive = 13#
- DoubleHex = 14#
- Bristol = 15#
- Pentalobular = 16#
- Frearson = 17#
- SnakeEyes = 18#
- TA = 19#
- TP3 = 20#
- MorTorq = 21#
- ClutCHG = 22#
- ClutCHA = 23#
- GroupEyes = 24#
- class BoltHeadType(value)[source]#
Bases:
Enumenumeration the types of the bolt head- BoltNone = -1#
- BoltHexa = 0#
- Countersunk = 1#
- BoltRound = 2#
- Pan = 3#
- Dome = 4#
- Oval = 5#
- Square = 6#
- TShaped = 7#
- Cylinder = 8#
- Lamb = 9#
- Rim = 10#
- Eye = 11#
- Bugle = 12#
- Clop = 13#
- class NutType(value)[source]#
Bases:
Enumenumeration the types of the nut- NutNone = -1#
- NutHexa = 0#
- Quard = 1#
- Acorn = 2#
- Lowacorn = 3#
- NutFlange = 4#
- Slits = 5#
- Radial = 6#
- NutLamb = 7#
- NutRim = 8#
- Selflock = 9#
- NutTShaped = 10#
- Clamplever = 11#
- NtCount = 12#
- class prim[source]#
Bases:
objectThe abstract prim class.- subtract(v: Volume)[source]#
- subtract the prim from scene
- Parameters:
v (Volume) – the scene volume reference
- intersect(v: Volume)[source]#
- intersect the prim into scene
- Parameters:
v (Volume) – the scene volume reference
- merge(v: Volume, op: BoolOpType)[source]#
- merge the prim into scene
- Parameters:
v (Volume) – the scene volume reference
op (BoolOpType) – the type of the merge
- color(colorid: str) prim[source]#
- assign the color to the primitive (in voxels)
- Parameters:
colorid (str) – the color in any suitable form: “RGB”, “ARGB”, “RRGGBB”, “AARRGGBB”, “#RGB”, “#ARGB”, “#RRGGBB”, “#AARRGGBB”,
any web-color common name as “red”, “green”, “purple”, google “webcolors”- Returns:
the reference
- Return type:
- gloss(value: float) prim[source]#
- assign the gloss for the voxel primitive, it will work only if the color already assigned
- Parameters:
value (float) – the [0..1] value of the gloss
- Returns:
the reference
- Return type:
- roughness(value: float) prim[source]#
- assign the roughness for the voxel primitive, it will work only if the color already assigned
- Parameters:
value (float) – the [0..1] value of the roughness
- Returns:
the reference
- Return type:
- metal(value: float) prim[source]#
- the metalliclty value for the voxel primitive, it will work only if the color already assigned
- Parameters:
value (float) – the [0..1] metal value
- Returns:
the reference
- Return type:
- opacity(value: float) prim[source]#
- assign the opacity of the color over the voxel primitive. The color should be assigned before you assign the opacity,for example p.color(“red”).opacity(0.5)
- Parameters:
value (float) – the opacity value [0..1]
- Returns:
the reference
- Return type:
- translate(x: float, y: float, z: float) prim[source]#
- Set the primitive translation
- Parameters:
x (float) – the new x primitive position
y (float) – the new y primitive position
z (float) – the new z primitive position
- Returns:
this primitive reference
- Return type:
- x(x: float) prim[source]#
- shift the primitive along the x - axis
- Parameters:
x (float) – the x value
- Returns:
this primitive reference
- Return type:
- y(y: float) prim[source]#
- shift the primitive along the y - axis
- Parameters:
y (float) – the y value
- Returns:
this primitive reference
- Return type:
- z(z: float) prim[source]#
- shift the primitive along the z - axis
- Parameters:
z (float) – the z value
- Returns:
this primitive reference
- Return type:
- auto_divide(average_div: float) prim[source]#
- set the auto devide
- Parameters:
average_div (float) – the average divide factor
- Returns:
this prim reference
- Return type:
- step_divide(step: float) prim[source]#
- set the step devide
- Parameters:
step (float) – the step divide factor
- Returns:
primitive reference
- Return type:
- fillet(radius: float) prim[source]#
- set the fillet
- Parameters:
radius (float) – the fillet radius
- Returns:
this primitive reference
- Return type:
- static debug_on(isOn: bool = True)[source]#
- indicates whether to turn on or off the debug mode.
- Parameters:
isOn (bool) – if this parameter is true, the debug mode is on, otherwise the debug mode is off.
- static push_transform(t: any)[source]#
- set the global transform matrix to all primitives
- Parameters:
t – the matrix
- static push_translate(d: any)[source]#
- Set the translation to all primitivesNot implemented yet
- Parameters:
d – the new position of the primitives
- class box(pos: any, size: any, fillet: float)[source]#
Bases:
primThe box.- static dynamic_cast(pObject: prim) box[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a box class or its descendant, and if so, returns the specified object, but of the box type.
- axis(directionX: any, directionY: any, directionZ: any) box[source]#
- set the x, y and z direction
- Parameters:
directionX – the x-direction
directionY – the y-direction
directionZ – the z-direction
- Returns:
box reference
- Return type:
- class torus(pos: any, ringRadius: float, crossSectionRadius: float)[source]#
Bases:
boxThe torus.- static dynamic_cast(pObject: prim) torus[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a torus class or its descendant, and if so, returns the specified object, but of the torus type.
- slices() int[source]#
- get the number of slices in the mesh.
- Returns:
number of slices
- Return type:
int
- section_radius() float[source]#
- get the cross section radius.
- Returns:
cross section radius
- Return type:
float
- section_diameter() float[source]#
- get the cross section diameter.
- Returns:
cross section diameter
- Return type:
float
- sector_on() bool[source]#
- get the flag of creating a portion of torus. Default = false.
- Returns:
the sector switch
- Return type:
bool
- class sphere(pos: any, radius: float)[source]#
Bases:
primThe sphere.- static dynamic_cast(pObject: prim) sphere[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a sphere class or its descendant, and if so, returns the specified object, but of the sphere type.
- diameter() float[source]#
- get the diameter of the sphere.
- Returns:
diameter value
- Return type:
float
- sub_division() int[source]#
- get the degree of subdivision triangular or cubic division of the sphere.
- Returns:
subdivision degree.
- Return type:
int
- sub_div_mode() any[source]#
- get the division mode for the mesh.
- Returns:
mode of the mesh division
- Return type:
any
- slices() int[source]#
- get the number of slices in the mesh.
- Returns:
number of slices
- Return type:
int
- sector_on() bool[source]#
- get the flag of creating a portion of sphere. Default = false.
- Returns:
the sector switch
- Return type:
bool
- slice_from() float[source]#
- get the angle where the sphere slice begins.
- Returns:
the slice begin angle
- Return type:
float
- slice_to() float[source]#
- get the angle where the sphere slice ends.
- Returns:
the slice end angle
- Return type:
float
- class ellipse(size: any)[source]#
Bases:
sphereThe ellipse.- static dynamic_cast(pObject: prim) ellipse[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a ellipse class or its descendant, and if so, returns the specified object, but of the ellipse type.
- axis(directionX: any, directionY: any = 3, directionZ: any = 3) ellipse[source]#
- set the axis x, y and z direction
- Parameters:
directionX – the x-direction
directionY – the y-direction
directionZ – the z-direction
- Returns:
ellipse reference
- Return type:
- class cylinder(posTop: any, posBottom: any, radiusTop: float, radiusBottom: float, fillet: float = 0.0)[source]#
Bases:
primThe cylinder.- static dynamic_cast(pObject: prim) cylinder[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a cylinder class or its descendant, and if so, returns the specified object, but of the cylinder type.
- bottomCapScale() float[source]#
- get the bottom cap scale.
- Returns:
the scale value
- Return type:
float
- slices() int[source]#
- get the number of slices in the mesh.
- Returns:
number of slices.
- Return type:
int
- class cone(posTop: any, posBottom: any, radiusBottom: float, fillet: float = 0.0)[source]#
Bases:
cylinderThe cone.
- class tube(posTop: any, posBottom: any, radiusTop: float, radiusBottom: float, relativeHoleRadius: float, fillet: float)[source]#
Bases:
cylinderThe tube.- static dynamic_cast(pObject: prim) tube[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a tube class or its descendant, and if so, returns the specified object, but of the tube type.
- relativeHoleRadius() float[source]#
- get the relative value of the hole radius.
- Returns:
relative value (0..1)
- Return type:
float
- class gear(posTop: any, posBottom: any, radiusTop: float, radiusBottom: float, depth: float = 0.1, sharpness: float = 0.5, order: int = 16)[source]#
Bases:
tubeThe gear.
- class ngon(posTop: any, posBottom: any, radiusTop: float, radiusBottom: float, order: int)[source]#
Bases:
gearThe ngon.
- class capsule(posTop: any, posBottom: any, radiusTop: float, radiusBottom: float)[source]#
Bases:
cylinderThe capsule.
- class spiral(out_radius: float, in_radius: float, _2: float, nturns: float)[source]#
Bases:
primThe spiral.- static dynamic_cast(pObject: prim) spiral[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a spiral class or its descendant, and if so, returns the specified object, but of the spiral type.
- profile_diameter() float[source]#
- get the profile diameter.
- Returns:
profile diameter
- Return type:
float
- profile_type(type: SpiralProfile) spiral[source]#
- set the type of profile (circle or rectangle).
- Parameters:
type (SpiralProfile) – profile type
- Returns:
spiral reference
- Return type:
- profile_rect(width: float, height: float) spiral[source]#
- set the dimensions for the rectangle profile.
- Parameters:
width (float) – the width value
height (float) – the height value
- Returns:
spiral reference
- Return type:
- clock_wise() bool[source]#
- get the clokwise direction of the spiral.
- Returns:
the clokwise direction( true or false)
- Return type:
bool
- profile_height() float[source]#
- get the profile height for rectangle profile.
- Returns:
the profile height
- Return type:
float
- profile_width() float[source]#
- get the profile width for rectangle profile.
- Returns:
the profile width
- Return type:
float
- class FontInfo[source]#
Bases:
objectHolds the general information about font- size: int#
- weight: int#
- style: int#
- fname: str#
- class text(s: str)[source]#
Bases:
primtext primitive- static dynamic_cast(pObject: prim) text[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a text class or its descendant, and if so, returns the specified object, but of the text type.
- bendRadius() float[source]#
- get the bend radius.
- Returns:
the bend radius of the text
- Return type:
float
- class lathe[source]#
Bases:
boxlathe primitive- static dynamic_cast(pObject: prim) lathe[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a lathe class or its descendant, and if so, returns the specified object, but of the lathe type.
- class image[source]#
Bases:
textimage primitive- static dynamic_cast(pObject: prim) image[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a image class or its descendant, and if so, returns the specified object, but of the image type.
- topTexture() any[source]#
- get the top texture
- Returns:
the string of the image file name
- Return type:
any
- topBumpTexture() any[source]#
- get the top bump texture
- Returns:
the string of the image file name
- Return type:
any
- bottomTexture() any[source]#
- get the bottom texture
- Returns:
the string of the image file name
- Return type:
any
- bottomBumpTexture() any[source]#
- get the bottom bump texture
- Returns:
the string of the image file name
- Return type:
any
- strencilTexture() any[source]#
- get the strencil texture
- Returns:
the string of the image file name
- Return type:
any
- bottomStrencilTexture() any[source]#
- get the bottom strencil texture
- Returns:
the string of the image file name
- Return type:
any
- basicThickness() float[source]#
- get the basic thickness of image
- Returns:
the thickness value
- Return type:
float
- bumpThickness() float[source]#
- get the bump thickness of image
- Returns:
the thickness value
- Return type:
float
- taperAngle() float[source]#
- get the angle of tapering of image
- Returns:
the taper angle value
- Return type:
float
- class thread[source]#
Bases:
primthread primitive- static dynamic_cast(pObject: prim) thread[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a thread class or its descendant, and if so, returns the specified object, but of the thread type.
- diameter() float[source]#
- get the diameter of the thread.
- Returns:
thread diameter
- Return type:
float
- stub() float[source]#
- get the stub length of the thread.
- Returns:
stub length value
- Return type:
float
- clockwise() bool[source]#
- get the clockwise of the thread.
- Returns:
clockwise flag
- Return type:
bool
- profile() ThreadProfile[source]#
- get the thread profile type.
- Returns:
profile type
- Return type:
- class threadStud[source]#
Bases:
threadthread stud primitive- static dynamic_cast(pObject: prim) threadStud[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a threadStud class or its descendant, and if so, returns the specified object, but of the threadStud type.
- diameter() float[source]#
- get the diameter of the thread.
- Returns:
diameter value
- Return type:
float
- diameterTop() float[source]#
- get the top diameter of the thread.
- Returns:
diameter value
- Return type:
float
- diameterBottom() float[source]#
- get the bottom diameter of the thread.
- Returns:
diameter value
- Return type:
float
- threadLength() float[source]#
- get the length of the thread.
- Returns:
length value
- Return type:
float
- enableThread() bool[source]#
- get the indicator of the enabled thread.
- Returns:
enabled/disabled value
- Return type:
bool
- bodyType() ThreadStudBodyType[source]#
- get the body type.
- Returns:
type value
- Return type:
- class HeadParams[source]#
Bases:
objectclass HeadParams- setData(_0: int, param: any) HeadParams[source]#
- set the parameters data with specified type.
- Parameters:
_type (int) – head type
- copy(h: HeadParams)[source]#
- copies the HeadParams object
- class HeadBaseParams(_0: float, _1: float)[source]#
Bases:
objectHeadBaseParams struct of the head data- diameter(_0: float) HeadBaseParams[source]#
- set the diameter.
- Parameters:
_d (float) – diameter
- Returns:
HeadBaseParams reference
- Return type:
- height(_0: float) HeadBaseParams[source]#
- set the height.
- Parameters:
_h (float) – height
- Returns:
HeadBaseParams reference
- Return type:
- class TShapedParams(_0: float, _1: float, _2: float)[source]#
Bases:
objectstruct of the TShapedParams data- diameter(_0: float) TShapedParams[source]#
- set the diameter.
- Parameters:
_d (float) – diameter
- Returns:
TShapedParams reference
- Return type:
- height(_0: float) TShapedParams[source]#
- set the height.
- Parameters:
_h (float) – height
- Returns:
TShapedParams reference
- Return type:
- width(_0: float) TShapedParams[source]#
- set the width.
- Parameters:
_w (float) – width
- Returns:
TShapedParams reference
- Return type:
- class LambParams(_0: float, _1: float, _2: float, _3: float, _4: float, _5: float)[source]#
Bases:
objectstruct of the LambParams data- length(_0: float) LambParams[source]#
- set the length.
- Parameters:
_l (float) – length
- Returns:
LambParams reference
- Return type:
- diameterTop(_0: float) LambParams[source]#
- set the top diameter.
- Parameters:
_d (float) – top diameter
- Returns:
LambParams reference
- Return type:
- diameterBottom(_0: float) LambParams[source]#
- set the bottom diameter.
- Parameters:
_d (float) – bottom diameter
- Returns:
LambParams reference
- Return type:
- height(_0: float) LambParams[source]#
- set the height.
- Parameters:
_h (float) – height
- Returns:
LambParams reference
- Return type:
- headHeight(_0: float) LambParams[source]#
- set the head height.
- Parameters:
_h (float) – height
- Returns:
LambParams reference
- Return type:
- thickness(_0: float) LambParams[source]#
- set the thickness.
- Parameters:
_t (float) – thickness
- Returns:
LambParams reference
- Return type:
- class RimParams(_0: float, _1: float, _2: float, _3: float)[source]#
Bases:
objectstruct of the RimParams data
- class EyeParams(_0: float, _1: float, _2: float)[source]#
Bases:
objectstruct of the EyeParams data
- class boltHead[source]#
Bases:
primbolt head primitive
- class NutHeadBaseParams(t: NutType, d: float, h: float)[source]#
Bases:
object- copy(p: NutHeadBaseParams = None) NutHeadBaseParams[source]#
- copies the object.
- Parameters:
p (NutHeadBaseParams) – pointer to the object to copy. If the pointer equals to null then the object is duplicated
- Returns:
the pointer to a copy of an object.
- Return type:
- class NutHexaParams(d: float, h: float)[source]#
Bases:
NutHeadBaseParams- static dynamic_cast(pObject: NutHeadBaseParams) NutHexaParams[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a NutHexaParams class or its descendant, and if so, returns the specified object, but of the NutHexaParams type.
- class NutAcornParams(d: float, h: float, h1: float)[source]#
Bases:
NutHeadBaseParams- static dynamic_cast(pObject: NutHeadBaseParams) NutAcornParams[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a NutAcornParams class or its descendant, and if so, returns the specified object, but of the NutAcornParams type.
- copy(p: NutHeadBaseParams = None) NutHeadBaseParams[source]#
- copies the NutAcornParams object.
- Parameters:
p (NutHeadBaseParams) – pointer to the NutAcornParams object to copy. If the pointer equals to null then the object is duplicated
- Returns:
the pointer to a copy of an NutAcornParams object.
- Return type:
- class NutLowAcornParams(d: float, h: float, h1: float)[source]#
Bases:
NutAcornParams- static dynamic_cast(pObject: NutHeadBaseParams) NutLowAcornParams[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a NutLowAcornParams class or its descendant, and if so, returns the specified object, but of the NutLowAcornParams type.
- class NutSelfLockParams(d: float, h: float, h1: float)[source]#
Bases:
NutAcornParams- static dynamic_cast(pObject: NutHeadBaseParams) NutSelfLockParams[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a NutSelfLockParams class or its descendant, and if so, returns the specified object, but of the NutSelfLockParams type.
- class NutTShapedParams(d: float, h: float, h1: float)[source]#
Bases:
NutAcornParams- static dynamic_cast(pObject: NutHeadBaseParams) NutTShapedParams[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a NutTShapedParams class or its descendant, and if so, returns the specified object, but of the NutTShapedParams type.
- class NutFlangeParams(d: float, h: float, fw: float, fh: float)[source]#
Bases:
NutHeadBaseParams- static dynamic_cast(pObject: NutHeadBaseParams) NutFlangeParams[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a NutFlangeParams class or its descendant, and if so, returns the specified object, but of the NutFlangeParams type.
- copy(p: NutHeadBaseParams = None) NutHeadBaseParams[source]#
- copies the NutFlangeParams object.
- Parameters:
p (NutHeadBaseParams) – pointer to the NutFlangeParams object to copy. If the pointer equals to null then the object is duplicated
- Returns:
the pointer to a copy of an NutFlangeParams object.
- Return type:
- class NutRadialParams(d: float, h: float, d1: float, d2: float)[source]#
Bases:
NutHeadBaseParams- static dynamic_cast(pObject: NutHeadBaseParams) NutRadialParams[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a NutRadialParams class or its descendant, and if so, returns the specified object, but of the NutRadialParams type.
- holeDepth() float[source]#
- get the hole depth.
- Returns:
NutRadialParams hole depth
- Return type:
float
- holePlace() int[source]#
- get the hole place.
- Returns:
place flag 0 - face, 1 - side
- Return type:
int
- copy(p: NutHeadBaseParams = None) NutHeadBaseParams[source]#
- copies the radial object.
- Parameters:
p (NutHeadBaseParams) – pointer to the radial object to copy. If the pointer equals to null then the object is duplicated
- Returns:
the pointer to a copy of an radial object.
- Return type:
- class NutLambParams(d: float, h: float)[source]#
Bases:
NutHeadBaseParams- static dynamic_cast(pObject: NutHeadBaseParams) NutLambParams[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a NutLambParams class or its descendant, and if so, returns the specified object, but of the NutLambParams type.
- diameterBottom() float[source]#
- get the bottom diameter.
- Returns:
bottom diameter
- Return type:
float
- copy(p: NutHeadBaseParams = None) NutHeadBaseParams[source]#
- copies the NutLambParams object.
- Parameters:
p (NutHeadBaseParams) – pointer to the NutLambParams object to copy. If the pointer equals to null then the object is duplicated
- Returns:
the pointer to a copy of an NutLambParams object.
- Return type:
- class NutSlitsParams(d: float, h: float)[source]#
Bases:
NutHeadBaseParams- static dynamic_cast(pObject: NutHeadBaseParams) NutSlitsParams[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a NutSlitsParams class or its descendant, and if so, returns the specified object, but of the NutSlitsParams type.
- count() int[source]#
- get the count of NutSlitsParams.
- Returns:
count value.
- Return type:
int
- copy(p: NutHeadBaseParams = None) NutHeadBaseParams[source]#
- copies the NutSlitsParams object.
- Parameters:
p (NutHeadBaseParams) – pointer to the NutSlitsParams object to copy. If the pointer equals to null then the object is duplicated
- Returns:
the pointer to a copy of an NutSlitsParams object.
- Return type:
- class NutRimParams(d: float, h: float)[source]#
Bases:
NutHeadBaseParams- static dynamic_cast(pObject: NutHeadBaseParams) NutRimParams[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a NutRimParams class or its descendant, and if so, returns the specified object, but of the NutRimParams type.
- inRingDiameter() float[source]#
- get the inner ring diameter.
- Returns:
inner diameter
- Return type:
float
- outRingDiameter() float[source]#
- get the outer ring diameter.
- Returns:
outer diameter
- Return type:
float
- copy(p: NutHeadBaseParams = None) NutHeadBaseParams[source]#
- copies the NutRimParams object.
- Parameters:
p (NutHeadBaseParams) – pointer to the NutRimParams object to copy. If the pointer equals to null then the object is duplicated
- Returns:
the pointer to a copy of an NutRimParams object.
- Return type:
- class NutClampLever(d: float, h: float)[source]#
Bases:
NutHeadBaseParams- static dynamic_cast(pObject: NutHeadBaseParams) NutClampLever[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a NutClampLever class or its descendant, and if so, returns the specified object, but of the NutClampLever type.
- holderDiameter() float[source]#
- get the diameter of the holder.
- Returns:
holder diameter
- Return type:
float
- copy(p: NutHeadBaseParams = None) NutHeadBaseParams[source]#
- copies the NutClampLever object.
- Parameters:
p (NutHeadBaseParams) – pointer to the NutClampLever object to copy. If the pointer equals to null then the object is duplicated
- Returns:
the pointer to a copy of an NutClampLever object.
- Return type:
- class nut[source]#
Bases:
primnut primitive- static dynamic_cast(pObject: prim) nut[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a nut class or its descendant, and if so, returns the specified object, but of the nut type.
- class bolt[source]#
Bases:
primbolt primitive- static dynamic_cast(pObject: prim) bolt[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a bolt class or its descendant, and if so, returns the specified object, but of the bolt type.
- threadType() int[source]#
- get the screw thread profile.
- Returns:
thread type value.
- Return type:
int
- class screw[source]#
Bases:
primscrew primitive- static dynamic_cast(pObject: prim) screw[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a screw class or its descendant, and if so, returns the specified object, but of the screw type.
- class washer[source]#
Bases:
primwasher primitive- static dynamic_cast(pObject: prim) washer[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a washer class or its descendant, and if so, returns the specified object, but of the washer type.
- class freeform[source]#
Bases:
primfreeform primitive- static dynamic_cast(pObject: prim) freeform[source]#
- An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a freeform class or its descendant, and if so, returns the specified object, but of the freeform type.
- symx(x: bool) freeform[source]#
- Enable the XYZ-mirror symmetry
- Parameters:
x (bool) – true to enable x-symmetry, false to disable
- Returns:
freeform reference
- Return type:
- symy(y: bool) freeform[source]#
- Enable the XYZ-mirror symmetry
- Parameters:
y (bool) – true to enable y-symmetry, false to disable
- Returns:
freeform reference
- Return type:
- symz(z: bool) freeform[source]#
- Enable the XYZ-mirror symmetry
- Parameters:
z (bool) – true to enable z-symmetry, false to disable
- Returns:
freeform reference
- Return type:
- size(v: any) freeform[source]#
- set the free form size
- Parameters:
v – vector size
- Returns:
freeform reference
- Return type:
- SetPoint(i: int, point: any) freeform[source]#
- set the knot point of the primitive.
- Parameters:
i (int) – point index
point – the coordinates of the point
- Returns:
the freeform reference
- Return type: