TopoShape API/fr: Difference between revisions

From FreeCAD Documentation
(Created page with "Category:API/fr")
(Updating to match new version of source page)
Line 1: Line 1:
L'objet TopoShape est l'objet principal du Module Part. Tous les types de formes (fil, face, solide, etc...) du module part sont des TopoShapes, et, partagent les attributs, et, méthodes suivantes.
The TopoShape is the mother object of the Part Module. All shape types (wire, face, solid, etc...) of the Part module are TopoShapes, and share the following attributes and methods. Example:
{{Code|code=
import Part
sh = Part.makeBox(10,10,10)
print sh.Faces
for f in sh.Faces:
print f.Edges
}}


Exemple:
<syntaxhighlight>
import Part
sh = Part.makeBox(10,10,10)
print sh.Faces
for f in sh.Faces:
print f.Edges
</syntaxhighlight>


{{APIProperty|Area|The total area of the faces of the shape.}}
{{APIProperty|BoundBox|The BoundBox of the object}}
{{APIProperty|CenterOfMass|The center of mass of the current system. If the gravitational field is uniform, it is the center of gravity. The coordinates returned for the center of mass are expressed in the absolute Cartesian coordinate system.}}
{{APIProperty|CompSolids|Lists the subsequent shapes in this shape.}}
{{APIProperty|Compounds|Lists the coumpounds in this shape.}}
{{APIProperty|Edges|Lists the Edges in this shape.}}
{{APIProperty|Faces|Lists the faces in this shape.}}
{{APIProperty|Length|Total length of the edges of the shape.}}
{{APIProperty|Matrix|The current transformation of the object as matrix}}
{{APIProperty|Orientation|the orientation of the shape.}}
{{APIProperty|Placement|The current transformation of the object as placement}}
{{APIProperty|ShapeType|The type of the shape.}}
{{APIProperty|Shells|Lists the subsequent shapes in this shape.}}
{{APIProperty|Solids|List of subsequent shapes in this shape.}}
{{APIProperty|Vertexes|List of vertexes in this shape.}}
{{APIProperty|Volume|Total volume of the solids of the shape.}}
{{APIProperty|Wires|List of wires in this shape.}}
{{APIFunction|approximate| |Approximates a B-Spline-curve from this wire|a BSplineCurve object}}
{{APIFunction|check| |Checks the shape and report errors in the shape structure. This is a more detailed check as done in isValid().| }}
{{APIFunction|common|TopoShape|Intersection of this and a given topo shape.|a TopoShape}}
{{APIFunction|complement| |Computes the complement of the orientation of this shape, i.e. reverses the interior/exterior status of boundaries of this shape.|a TopoShape}}
{{APIFunction|copy| |Creates a copy of this shape|a TopoShape}}
{{APIFunction|cut|TopoShape|Difference of this and a given topo shape.|a TopoShape}}
{{APIFunction|distToShape| TopoShape |Calculates the minimum distance between this and a given TopoShape.|float<minimum distance>,list<nearest points>,list<nearest subshapes & parameters> }}
{{APIFunction|exportBrep| string |Exports the content of this shape to an BREP file. BREP is a CasCade native format.| }}
{{APIFunction|exportIges| string |Exports the content of this shape to an IGES file.| }}
{{APIFunction|exportStep| string |Exports the content of this shape to an STEP file.| }}
{{APIFunction|exportStl| string |Exports the content of this shape to an STL mesh file.| }}
{{APIFunction|extrude|Vector|Extrudes the shape along a direction.|a TopoShape}}
{{APIFunction|fuse|TopoShape|Union of this and a given topo shape.|a TopoShape}}
{{APIFunction|getAllDerivedFrom| |Returns all descentences of this object type|a list}}
{{APIFunction|hashCode| |This value is computed from the value of the underlying shape reference and the location. Orientation is not taken into account.|a string}}
{{APIFunction|isClosed| |Checks if the shape is closed.|a boolean}}
{{APIFunction|isDerivedFrom|string|Returns true if given type is a father|boolean}}
{{APIFunction|isEqual|TopoShape|Checks if both shapes are equal.|a boolean}}
{{APIFunction|isInside|Vector,float,Boolean|Checks if a point is inside a solid with a certain tolerance. If the 3rd parameter is True a point on a face is considered as inside|a boolean}}
{{APIFunction|isNull| |Checks if the shape is null.|a boolean}}
{{APIFunction|isSame|TopoShape|Checks if both shapes share the same geometry.|a boolean}}
{{APIFunction|isValid| |Checks if the shape is valid, i.e. neither null, nor empty nor corrupted.|a boolean}}
{{APIFunction|makeFillet|float,TopoShape|Returns a new object based on TopoShape, but with a fillet of radius 'float' applied to each edge.|a TopoShape}}
{{APIFunction|makeHomogenousWires|wire|Makes this and the given wire homogenous to have the same number of edges| a wire}}
{{APIFunction|makeOffset|float|Offsets the shape by a given ammount|a TopoShape}}
{{APIFunction|makePipe|wire|Makes a pipe by sweeping along a wire.|a TopoShape}}
{{APIFunction|makePipeShell|wire|Makes a loft defined by profiles along a wire.|a TopoShape}}
{{APIFunction|makeShapeFromMesh|mesh|Makes a compound shape out of mesh data. Note: This should be used for rather small meshes only.|a TopoShape}}
{{APIFunction|makeThickness|list,float,float|A hollowed solid is built from an initial solid and a set of faces on this solid, which are to be removed. The remaining faces of the solid become the walls of the hollowed solid, their thickness defined at the time of construction. The arguments to be passed are a list of faces to be skipped, the thickness of the walls and a tolerance value.|a TopoShape}}
{{APIFunction|nullify| |Destroys the reference to the underlying shape stored in this shape. As a result, this shape becomes null.|}}
{{APIFunction|project|TopoShape|Project a shape on this shape|a TopoShape}}
{{APIFunction|read|string|Reads in an IGES, STEP or BREP file.|a TopoShape}}
{{APIFunction|reverse| |Reverses the orientation of this shape.| }}
{{APIFunction|revolve|Vector, Vector, float|Revolves the shape around a Axis to a given degree. ex: Part.revolve(Vector(0,0,0),Vector(0,0,1),360) revolves the shape around the Z Axis 360 degree.|a TopoShape}}
{{APIFunction|rotate|Vector<position>, Vector<direction>, float<angle>|Rotates this shape by angle degrees around an axis specified by position and direction. ex: Shp.rotate(Vector(0,0,0),Vector(0,0,1),180) rotate the shape around the Z Axis 180 degrees.| }}
{{APIFunction|scale|float<factor>, [Vector<centre>]|Uniformly scales this shape by factor. Optionally specify centre of scaling transformation.| }}
{{APIFunction|section|TopoShape|Section of this with a given topo shape.|a TopoShape}}
{{APIFunction|sewShape| |Sews the shape if there is a gap.| }}
{{APIFunction|tessellate|float|Tessellate the the shape and return a list of vertices and face indices. The given float is the tolerance.|a list}}
{{APIFunction|toNurbs| |Conversion of the complete geometry of a shape into NURBS geometry. For example, all curves supporting edges of the basis shape are converted into BSpline curves, and all surfaces supporting its faces are converted into BSpline surfaces.|a NURBS curve}}
{{APIFunction|transformGeometry|matrix|Applies geometric transformation on a copy of the shape. The transformation to be applied is defined as a 4x4 matrix. The underlying geometry of the following shapes may change to a curve which supports an edge of the shape, or a surface which supports a face of the shape. For example, a circle may be transformed into an ellipse when applying an affinity transformation. It may also happen that the circle then is represented as a b-spline curve. The transformation is applied to all the curves which support edges of the shape, and all the surfaces which support faces of the shape. Note: If you want to transform a shape without changing the underlying geometry then use the methods translate or rotate.|a TopoShape}}
{{APIFunction|transformShape|matrix|Applies transformation on a shape without changing the underlying geometry.| }}
{{APIFunction|translate|Vector|Applies the translation to the current location of this shape.| }}
{{APIFunction|writeInventor| |Writes the mesh in OpenInventor format to a string.|a string}}


Some attributes and methods apply only to certain TopoShapes. These items apply to Edges (TopoShapeEdge).
{{APIProperty/fr|Area|La superficie totale des faces de la forme.}}
{{APIProperty/fr|CompSolids|Répertorie les formes ultérieures dans cette forme.}}
{{APIProperty/fr|Compounds|Répertorie les composantes de cette forme.}}
{{APIProperty/fr|Edges|Répertorie les contours de cette forme.}}
{{APIProperty/fr|Faces|Répertorie les visages de cette forme.}}
{{APIProperty/fr|Length|Longueur totale des bords de la forme.}}
{{APIProperty/fr|Orientation|l'orientation de la forme.}}
{{APIProperty/fr|ShapeType|Le type de la forme.}}
{{APIProperty/fr|Shells|Répertorie les formes ultérieures dans cette forme.}}
{{APIProperty/fr|Solids|Liste des formes ultérieures dans cette forme.}}
{{APIProperty/fr|Vertexes|Liste des sommets de cette forme.}}
{{APIProperty/fr|Volume|Volume total des solides de la forme.}}
{{APIProperty/fr|Wires|Liste des fils de cette forme.}}
{{APIProperty/fr|BoundBox|Les dimensions hors tout de l'objet}}
{{APIProperty/fr|Matrix|Donne une matrice de la transformation actuelle de l'objet}}
{{APIProperty/fr|Placement|Donne la transformation actuelle de l'objet comme placement}}
{{APIFunction/fr|getAllDerivedFrom| |Retourne toute la descendance de ce type d'objet|une liste}}
{{APIFunction/fr|isDerivedFrom|string|Retourne la valeur true si le type donné est le père (maître)|boolean}}
{{APIFunction/fr|approximate| |Se rapproche d'une courbe B-Spline|a BSplineCurve object}}
{{APIFunction/fr|makeHomogenousWires|wire|Construit un fil homogène avec le même nombre d'arêtes| a wire}}
{{APIFunction/fr|makeOffset|float|Décale la forme selon une distance donnée|un TopoShape}}
{{APIProperty/fr|CenterOfMass|Donne le centre de la masse de la forme actuelle. Si le champ de gravitation est uniforme, c'est le centre de gravité. Les coordonnées retournées pour le centre de masse sont exprimées dans le système de coordonnées cartésiennes absolu.}}
{{APIFunction/fr|check| |Vérifie les erreurs de forme et les rapporte dans la structure de la forme. Il s'agit d'une vérification plus détaillée comme celà se fait dans isValid().| }}
{{APIFunction/fr|common|TopoShape|Intersection de la forme et une forme donnée.|un TopoShape}}
{{APIFunction/fr|complement| |Calcule le complément de l'orientation de cette forme, c'est-à-dire inverse l'état intérieur/extérieur des limites de cette forme.|un TopoShape}}
{{APIFunction/fr|copy| |Crée une copie de cette forme|un TopoShape}}
{{APIFunction/fr|cut|TopoShape|Différence entre la forme et une forme donnée.|un TopoShape}}
{{APIFunction/fr|distToShape| TopoShape |Calcule la distance minimale entre ceci et une donnée TopoShape. |float <distance minimum>, list < le point le plus proche >, list < la forme secondaire la plus proche & ces paramètres > }}
{{APIFunction/fr|exportBrep| string |Exporte le contenu de cette la forme dans un fichier BREP. BREP est le format natif de CasCade.| }}
{{APIFunction/fr|exportIges| string |Exporte le contenu de la forme dans un fichier IGES.| }}
{{APIFunction/fr|exportStep| string |Exporte le contenu de la forme dans un fichier STEP.| }}
{{APIFunction/fr|exportStl| string |Exporte le contenu de la forme dans un fichier de maillage STL.| }}
{{APIFunction/fr|extrude|Vector|Extrude la forme le long d'une direction.|un TopoShape}}
{{APIFunction/fr|fuse|TopoShape|Union de la forme et une forme donnée.|un TopoShape}}
{{APIFunction/fr|hashCode| |Cette valeur est calculée à partir de la valeur de la référence sous-jacente de la forme et l'emplacement. L'orientation n'est pas prise en compte.|a string}}
{{APIFunction/fr|isClosed| |Vérifie si la forme est fermée.|un booléen}}
{{APIFunction/fr|isEqual|TopoShape|Vérifie si les deux formes sont égales.|un booléen}}
{{APIFunction/fr|isInside|Vector,float,Boolean|Vérifie si un point est à l'intérieur d'un solide, avec une certaine tolérance. Si le troisième paramètre est '''true''' un point sur une face est considéré comme inside|un booléen}}
{{APIFunction/fr|isNull| |Vérifie si la forme est nulle.|un booléen}}
{{APIFunction/fr|isSame|TopoShape|Vérifie si les deux formes partagent la même géométrie.|un booléen}}
{{APIFunction/fr|isValid| |Vérifie si la forme est valide, c'est à dire ni nulle, ni vide ni endommagée.|un booléen}}
{{APIFunction|makeFillet|float,TopoShape|Retourne un nouvel objet basé sur un TopoShape, mais avec un rayon de courbure "float" appliqué à chaque arête.|un TopoShape}}
{{APIFunction/fr|makePipe|wire|Fait un tube en suivant une ligne.|un TopoShape}}
{{APIFunction/fr|makePipeShell|wire|Rend un loft défini par son profil le long d'une ligne.|un TopoShape}}
{{APIFunction/fr|makeShapeFromMesh|mesh|Fait une forme composée de données de maillage. Remarque : Cela devrait être utilisé plutôt pour de petites mailles.|un TopoShape}}
{{APIFunction/fr|makeThickness|list,float,float|Un solide évidé est construit à partir d'un solide initial, et, un ensemble de faces sur ce solide, qui doivent être éliminés. Les faces restantes du solide deviennent les murs du solide évidé, leur épaisseur est définie au moment de la construction. Les arguments à transmettre sont une liste des faces à ignorer, l'épaisseur des murs, et, une valeur de tolérance.|un TopoShape}}
{{APIFunction/fr|nullify| |Détruit la référence à la forme sous-jacente stockée sous cette forme. En conséquence, cette forme devient nulle.| }}
{{APIFunction/fr|project|TopoShape|Projete une forme sur votre forme|un TopoShape}}
{{APIFunction/fr|read|string|Lit un fichier IGES, STEP ou BREP.|un TopoShape}}
{{APIFunction/fr|reverse| |Inverse l'orientation de cette forme.| }}
{{APIFunction/fr|revolve|Vector, Vector, float|S'articule autour d'un axe à un degré donné. ex : Part.revolve(Vector(0,0,0),Vector(0,0,1),360) tourne la forme autour d'un axe Z de 360 degrés.|un TopoShape}}
{{APIFunction/fr|rotate|Vector, Vector, float|Applique la rotation (en degré) à l'emplacement actuel de cette forme. ex : Shp.rotate(Vector(0,0,0),Vector(0,0,1),180) fait pivoter la forme autour de l'axe Z de 180 degrés.|un TopoShape}}
{{APIFunction/fr|scale| |S'applique à l'échelle avec le point et le facteur de cette forme.|un TopoShape}}
{{APIFunction/fr|section|TopoShape|Section de la forme avec une forme toposhape.|un TopoShape}}
{{APIFunction/fr|sewShape| |La machine raccorde la forme s'il y a un écart.| }}
{{APIFunction/fr|tessellate|float|Tessellate (Paver) la forme et retourne une liste des sommets et indices de la faces. Le float donnée est la tolérance.|a list}}
{{APIFunction/fr|toNurbs| |Transformation de la géométrie complète d'une forme en géométrie NURBS. Par exemple, toutes les courbes soutenant les bords de la forme de base, sont convertis en courbes de BSP, et toutes les surfaces soutenant ses faces sont converties en surfaces de BSP.|a NURBS curve}}
{{APIFunction/fr|transformGeometry|matrix|Applique la transformation géométrique sur une copie de la forme. La transformation à appliquer, est définie comme une matrice 4x4. La géométrie sous-jacente des formes suivantes peuvent être changées en courbes qui prennent en charge les extrémités de la forme, ou une surface qui prend en charge une face de la forme. Par exemple, un cercle peut être transformé en une ellipse lorsque vous appliquez une transformation d'affinité. Il peut également arriver que le cercle est alors représenté comme une courbe b-spline. La transformation s'applique à toutes les courbes qui supportent les bords de la forme et toutes les surfaces qui prennent en charge les faces de la forme. Remarque : Si vous voulez transformer une forme sans changer la géométrie sous-jacente, puis utilisez les méthodes traduites ou les faire pivoter.|un TopoShape}}
{{APIFunction/fr|transformShape|matrix|Applique la transformation d'une forme sans changer la géométrie sous-jacente.| }}
{{APIFunction/fr|translate|Vector|Applique la conversion à l'emplacement actuel de cette forme.| }}
{{APIFunction/fr|writeInventor| |Écrit le maillage au format OpenInventor dans une chaîne.|a string}}


Certains attributs et méthodes s'appliquent uniquement à certains TopoShapes.


{{APIProperty|FirstParameter|The parameter value at one end of the Edge. Not necessarily at Vertex[0]. [http://en.wikipedia.org/wiki/Parametric_equations See Parametric Equations]}}
Ces points s'appliquent aux bords (TopoShapeEdge).
{{APIProperty|LastParameter|The parameter value at the other end of the Edge. Not necessarily at Vertex[1].}}
{{APIFunction|getParameterByLength|Float|Maps the interval [0,Length] to the interval [FirstParameter,LastParameter]|Float }}
{{APIFunction|valueAt|Float|Returns the 3D vector corresponding to a parameter value.|Vector}}
{{APIFunction|parameterAt|Vertex,[Face]|Returns the parameter value corresponding to a Vertex (3D point).|Float}}
{{APIFunction|tangentAt|Float|Returns the direction vector of the tangent to the edge at a parameter value (if it exists).|Vector}}
{{APIFunction|normalAt|Float|Returns the direction vector of the normal to the edge at a parameter value (if it exists uniquely).|Vector}}
{{APIFunction|curvatureAt|Float|Returns the curvature of the edge at a parameter value.|Float}}
{{APIFunction|centerOfCurvatureAt|Float|Returns the center (3D point) of the osculating circle at a parameter value.|Vector}}




[[Category:API]]
{{APIProperty/fr|FirstParameter|La valeur du paramètre du bord à une extrémité. Pas nécessairement le Vertex[0]. [http://fr.wikipedia.org/wiki/%C3%89quation_param%C3%A9trique Voir équations paramétriques]}}
{{APIProperty/fr|LastParameter|La valeur du paramètre du bord à l'autre extrémité. Pas nécessairement le Vertex[1].}}

{{APIFunction/fr|getParameterByLength|Float|Retourne l’intervalle [0,Length] jusqu'au prochain intervalle [Premier Paramètre,dernier Paramètre]|Float }}
{{APIFunction/fr|valueAt|Float|Retourne la valeur du vecteur correspondant au paramètre 3D.|Vector}}
{{APIFunction/fr|parameterAt|Vertex,[Face]|Retourne la valeur correspondante au Vertex (points 3D).|Float}}
{{APIFunction/fr|tangentAt|Float|Retourne la valeur des paramètres de la direction du vecteur de la tangente du bord (s'il existe).|Vector}}
{{APIFunction/fr|normalAt|Float|Retourne la valeur des paramètres de la normale du bord (uniquement s'il existe).|Vector}}
{{APIFunction/fr|curvatureAt|Float|Retourne la valeur des paramètres de la courbe du bord.|Float}}
{{APIFunction/fr|centerOfCurvatureAt|Float|Retourne le centre (points 3D) ou la valeur des paramètres du cercle.|Vector}}


[[Category:API/fr]]


{{clear}}
{{clear}}

Revision as of 23:03, 23 December 2014

The TopoShape is the mother object of the Part Module. All shape types (wire, face, solid, etc...) of the Part module are TopoShapes, and share the following attributes and methods. Example:

import Part
sh = Part.makeBox(10,10,10)
print sh.Faces
for f in sh.Faces:
   print f.Edges


Area

Returns: The total area of the faces of the shape.

BoundBox

Returns: The BoundBox of the object

CenterOfMass

Returns: The center of mass of the current system. If the gravitational field is uniform, it is the center of gravity. The coordinates returned for the center of mass are expressed in the absolute Cartesian coordinate system.

CompSolids

Returns: Lists the subsequent shapes in this shape.

Compounds

Returns: Lists the coumpounds in this shape.

Edges

Returns: Lists the Edges in this shape.

Faces

Returns: Lists the faces in this shape.

Length

Returns: Total length of the edges of the shape.

Matrix

Returns: The current transformation of the object as matrix

Orientation

Returns: the orientation of the shape.

Placement

Returns: The current transformation of the object as placement

ShapeType

Returns: The type of the shape.

Shells

Returns: Lists the subsequent shapes in this shape.

Solids

Returns: List of subsequent shapes in this shape.

Vertexes

Returns: List of vertexes in this shape.

Volume

Returns: Total volume of the solids of the shape.

Wires

Returns: List of wires in this shape.

approximate( )

Description: Approximates a B-Spline-curve from this wire

Returns: a BSplineCurve object

check( )

Description: Checks the shape and report errors in the shape structure. This is a more detailed check as done in isValid().

Returns:

common(TopoShape)

Description: Intersection of this and a given topo shape.

Returns: a TopoShape

complement( )

Description: Computes the complement of the orientation of this shape, i.e. reverses the interior/exterior status of boundaries of this shape.

Returns: a TopoShape

copy( )

Description: Creates a copy of this shape

Returns: a TopoShape

cut(TopoShape)

Description: Difference of this and a given topo shape.

Returns: a TopoShape

distToShape( TopoShape )

Description: Calculates the minimum distance between this and a given TopoShape.

Returns: float<minimum distance>,list<nearest points>,list<nearest subshapes & parameters>

exportBrep( string )

Description: Exports the content of this shape to an BREP file. BREP is a CasCade native format.

Returns:

exportIges( string )

Description: Exports the content of this shape to an IGES file.

Returns:

exportStep( string )

Description: Exports the content of this shape to an STEP file.

Returns:

exportStl( string )

Description: Exports the content of this shape to an STL mesh file.

Returns:

extrude(Vector)

Description: Extrudes the shape along a direction.

Returns: a TopoShape

fuse(TopoShape)

Description: Union of this and a given topo shape.

Returns: a TopoShape

getAllDerivedFrom( )

Description: Returns all descentences of this object type

Returns: a list

hashCode( )

Description: This value is computed from the value of the underlying shape reference and the location. Orientation is not taken into account.

Returns: a string

isClosed( )

Description: Checks if the shape is closed.

Returns: a boolean

isDerivedFrom(string)

Description: Returns true if given type is a father

Returns: boolean

isEqual(TopoShape)

Description: Checks if both shapes are equal.

Returns: a boolean

isInside(Vector,float,Boolean)

Description: Checks if a point is inside a solid with a certain tolerance. If the 3rd parameter is True a point on a face is considered as inside

Returns: a boolean

isNull( )

Description: Checks if the shape is null.

Returns: a boolean

isSame(TopoShape)

Description: Checks if both shapes share the same geometry.

Returns: a boolean

isValid( )

Description: Checks if the shape is valid, i.e. neither null, nor empty nor corrupted.

Returns: a boolean

makeFillet(float,TopoShape)

Description: Returns a new object based on TopoShape, but with a fillet of radius 'float' applied to each edge.

Returns: a TopoShape

makeHomogenousWires(wire)

Description: Makes this and the given wire homogenous to have the same number of edges

Returns: a wire

makeOffset(float)

Description: Offsets the shape by a given ammount

Returns: a TopoShape

makePipe(wire)

Description: Makes a pipe by sweeping along a wire.

Returns: a TopoShape

makePipeShell(wire)

Description: Makes a loft defined by profiles along a wire.

Returns: a TopoShape

makeShapeFromMesh(mesh)

Description: Makes a compound shape out of mesh data. Note: This should be used for rather small meshes only.

Returns: a TopoShape

makeThickness(list,float,float)

Description: A hollowed solid is built from an initial solid and a set of faces on this solid, which are to be removed. The remaining faces of the solid become the walls of the hollowed solid, their thickness defined at the time of construction. The arguments to be passed are a list of faces to be skipped, the thickness of the walls and a tolerance value.

Returns: a TopoShape

nullify( )

Description: Destroys the reference to the underlying shape stored in this shape. As a result, this shape becomes null.

Returns:

project(TopoShape)

Description: Project a shape on this shape

Returns: a TopoShape

read(string)

Description: Reads in an IGES, STEP or BREP file.

Returns: a TopoShape

reverse( )

Description: Reverses the orientation of this shape.

Returns:

revolve(Vector, Vector, float)

Description: Revolves the shape around a Axis to a given degree. ex: Part.revolve(Vector(0,0,0),Vector(0,0,1),360) revolves the shape around the Z Axis 360 degree.

Returns: a TopoShape

rotate(Vector<position>, Vector<direction>, float<angle>)

Description: Rotates this shape by angle degrees around an axis specified by position and direction. ex: Shp.rotate(Vector(0,0,0),Vector(0,0,1),180) rotate the shape around the Z Axis 180 degrees.

Returns:

scale(float<factor>, [Vector<centre>])

Description: Uniformly scales this shape by factor. Optionally specify centre of scaling transformation.

Returns:

section(TopoShape)

Description: Section of this with a given topo shape.

Returns: a TopoShape

sewShape( )

Description: Sews the shape if there is a gap.

Returns:

tessellate(float)

Description: Tessellate the the shape and return a list of vertices and face indices. The given float is the tolerance.

Returns: a list

toNurbs( )

Description: Conversion of the complete geometry of a shape into NURBS geometry. For example, all curves supporting edges of the basis shape are converted into BSpline curves, and all surfaces supporting its faces are converted into BSpline surfaces.

Returns: a NURBS curve

transformGeometry(matrix)

Description: Applies geometric transformation on a copy of the shape. The transformation to be applied is defined as a 4x4 matrix. The underlying geometry of the following shapes may change to a curve which supports an edge of the shape, or a surface which supports a face of the shape. For example, a circle may be transformed into an ellipse when applying an affinity transformation. It may also happen that the circle then is represented as a b-spline curve. The transformation is applied to all the curves which support edges of the shape, and all the surfaces which support faces of the shape. Note: If you want to transform a shape without changing the underlying geometry then use the methods translate or rotate.

Returns: a TopoShape

transformShape(matrix)

Description: Applies transformation on a shape without changing the underlying geometry.

Returns:

translate(Vector)

Description: Applies the translation to the current location of this shape.

Returns:

writeInventor( )

Description: Writes the mesh in OpenInventor format to a string.

Returns: a string

Some attributes and methods apply only to certain TopoShapes. These items apply to Edges (TopoShapeEdge).


FirstParameter

Returns: The parameter value at one end of the Edge. Not necessarily at Vertex[0]. See Parametric Equations

LastParameter

Returns: The parameter value at the other end of the Edge. Not necessarily at Vertex[1].

getParameterByLength(Float)

Description: Maps the interval [0,Length] to the interval [FirstParameter,LastParameter]

Returns: Float

valueAt(Float)

Description: Returns the 3D vector corresponding to a parameter value.

Returns: Vector

parameterAt(Vertex,[Face])

Description: Returns the parameter value corresponding to a Vertex (3D point).

Returns: Float

tangentAt(Float)

Description: Returns the direction vector of the tangent to the edge at a parameter value (if it exists).

Returns: Vector

normalAt(Float)

Description: Returns the direction vector of the normal to the edge at a parameter value (if it exists uniquely).

Returns: Vector

curvatureAt(Float)

Description: Returns the curvature of the edge at a parameter value.

Returns: Float

centerOfCurvatureAt(Float)

Description: Returns the center (3D point) of the osculating circle at a parameter value.

Returns: Vector

Other languages: