Operations Constructors Functions

This function lets you manage the operations by defining the formulae using operation constructors.

This page discusses:

affinity

Returns the affinity of a given element.

Signature

affinity(totransform: Wireframe, axisorigin: Point, axisplane: Plane, axis1stdirection: Line, ratioX: Real, ratioY: Real, ratioZ: Real): Wireframe

Inputs

  • totransform(Wireframe): element to transform
  • axisorigin(Point): center of affinity
  • axisplane(Plane): plane whose normal will determine the z-direction
  • axis1stdirection(Line): line whose direction will determine the x-direction
  • ratioX(Real): ratio of scaling in the direction given by axis1stdirection's direction
  • ratioY(Real): ratio of scaling in the direction equal to the cross product of axisplane's normal by axis1stdirection's direction
  • ratioZ(Real): ratio of scaling in the direction given by axisplane's normal

Returned Value

  • Wireframe: totransform transformed by the affinity of center axisorigin, of ratio ratioX in axis1stdirection's direction, of ratio ratioZ in axisplane's normal and of ratio ratioY in the direction equal to the cross product of axisplane's normal by axis1stdirection's direction
Note: Geometry returned by Invert command or transformation capabilities (Translate, Rotate, Scaling, Affinity and Symmetry commands) cannot be affected to point, curve or surface variables. The Set element = function() syntax has to be used to valuate the result.

Sample

//The following example illustrates the last paragraph
//(here with the 'translate' function)

//Use this syntax with 'Set'
Set PartBody\Point.2 = translate(PartBody\Point.1 ,direction(`xy plane`),1mm)
//Do not use this syntax without 'Set'
PartBody\Point.2 = translate(PartBody\Point.1 ,direction(`xy plane`),1mm)

assemble

Joins several curves or surfaces.

assemble (curves)

Joins several curves.

Signature

assemble(Curve, ..): Curve

Inputs

  • (Curve): curves to be joined

Returned Value

  • Curve: curve consisting of the input curves joined together

assemble (surfaces)

Joins several surfaces.

Signature

assemble(Surface, ..): Surface

Inputs

Returned Value

  • Surface: surface consisting of the input surfaces joined together

boundary

Returns the boundary of a given surface.

Signature

boundary(element: Surface): Curve

Inputs

  • element(Surface): surface whose boundary is sought

Returned Value

  • Curve: element's boundary

disassemble

Disassembles a Body and creates a volatile list containing domains or cells of the Body.

Returned list is volatile, as it contains temporary objects that are deleted at the end of the evaluation of the expression. Therefore, the Disassemble constructor is unsuitable to be used in rules or formulas. It should be used only in more complex expressions.

Signature

disassemble(Input: Body, CellsMode: Boolean: List

Inputs

  • Input(Body): Body to disassemble
  • CellsMode(Boolean): if false, the list will contain the domains; if true, the list will contain the cells

Returned Value

  • List: list of Input's domains (if CellsMode is false) or list of Input's cells (if CellsMode is true)

extract

Extracts geometry from a given sub-element after propagating the selection according to the specified propagation (point, tangent, curvature or no propagation).

Important: The input sub-element and returned element have to be in the same document.

Signature

extract(cell: CATCell, propagationType (0: G0; 1: G1; 2: G2; other or no value: no propagation): Integer): Wireframe

Inputs

  • cell(CATCell): sub-element to extract, from which the propagation will start, if any
  • propagationType(Integer): point propagation if 0; tangent propagation if 1; curvature propagation if 2; no propagation if other or no value

Returned Value

  • Wireframe: geometry extracted starting from cell propagated according to propagationType
Note: Geometry returned by Invert command or transformation capabilities (Translate, Rotate, Scaling, Affinity and Symmetry commands) cannot be affected to point, curve or surface variables. The Set element = function() syntax has to be used to valuate the result.

far

Returns the most distant element to a given element.

far (curve)

Returns the most distant curve to a given element among a list of given curves.

Signature

far(crv: Curve, far: Wireframe): Curve

Inputs

  • crv(Curve): curves whose the most distant to far is to be returned
  • far(Wireframe): element the returned element is the most distant to

Returned Value

  • Curve: the most distant curve to far among the input ones

far (surface)

Returns the most distant surface to a given element among a list of given surfaces.

Signature

far(sur: Surface, far: Wireframe): Surface

Inputs

  • surf(Surface): surfaces whose the most distant to far is to be returned
  • far(Wireframe): element the returned element is the most distant to

Returned Value

  • Surface: the most distant surface to far among the input ones

far (point)

Returns the most distant point to a given element among a list of given points.

Signature

far(pt: Point, far: Wireframe): Point

Inputs

  • pt(Point): points whose the most distant to far is to be returned
  • far(Wireframe): element the returned element is the most distant to

Returned Value

  • Point: the most distant point to far among the input ones

invert

Inverts the orientation of a curve or surface.

Signature

invert(CurveOrSurfaceToInvert: Wireframe): Wireframe

Inputs

  • CurveOrSurfaceToInvert(Wireframe): element whose orientation is to be inverted

Returned Value

  • Wireframe: element geometrically identical to CurveOrSurfaceToInvert and whose orientation is the opposite
Note: Geometry returned by Invert command or transformation capabilities (Translate, Rotate, Scaling, Affinity and Symmetry commands) cannot be affected to point, curve or surface variables. The Set element = function() syntax has to be used to valuate the result.

Sample

//The following example illustrates the last paragraph
//(here with the 'translate' function)

//Use this syntax with 'Set'
Set PartBody\Point.2 = translate(PartBody\Point.1 ,direction(`xy plane`),1mm)
//Do not use this syntax without 'Set'
PartBody\Point.2 = translate(PartBody\Point.1 ,direction(`xy plane`),1mm)

near

Returns the nearest element to a given element.

near (curve)

Returns the nearest curve to a given element among a list of given curves.

Signature

near(crv: Curve, near: Wireframe): Curve

Inputs

  • crv(Curve): curves whose the nearest to near is to be returned
  • near(Wireframe): element the returned element is the nearest to

Returned Value

  • Curve: the nearest curve to near among the input ones

near (surface)

Returns the nearest surface to a given element among a list of given surfaces.

Signature

near(sur: Surface, near: Wireframe): Surface

Inputs

  • sur(Surface): surfaces whose the nearest to near is to be returned
  • near(Wireframe): element the returned element is the nearest to

Returned Value

  • Surface: the nearest surface to near among the input ones

near (point)

Returns the nearest point to a given element among a list of given points.

Signature

near(pt: Point, near: Wireframe): Point

Inputs

  • pt(Point): points whose the nearest to near is to be returned
  • near(Wireframe): element the returned element is the nearest to

Returned Value

  • Point: the nearest point to near among the input ones

rotate

Rotates an element.

Signature

rotate(totransform: Wireframe, axis: Line, angle: ANGLE): Wireframe

Inputs

  • axis(Line): rotation axis
  • angle(ANGLE): rotation angle

Returned Value

  • Wireframe: totransform rotated of an angle of angle about axis
Note: Geometry returned by Invert command or transformation capabilities (Translate, Rotate, Scaling, Affinity and Symmetry commands) cannot be affected to point, curve or surface variables. The Set element = function() syntax has to be used to valuate the result.

Sample

//The following example illustrates the last paragraph
//(here with the 'translate' function)

//Use this syntax with 'Set'
Set PartBody\Point.2 = translate(PartBody\Point.1 ,direction(`xy plane`),1mm)
//Do not use this syntax without 'Set'
PartBody\Point.2 = translate(PartBody\Point.1 ,direction(`xy plane`),1mm)

scaling

Creates a scaled element. The reference must be of type Point or Plane. Otherwise, an error occurs.

Signature

scaling(totransform: Wireframe, reference: Wireframe, ratio: Real): Wireframe

Inputs

  • reference(Wireframe): center of scaling (if it is a point) or plane whose origin will be the center of scaling (if it is a plane)
  • ratio(Real): scaling's ratio

Returned Value

  • Wireframe: totransform scaled with a ratio of ratio with respect to reference
Note: Geometry returned by Invert command or transformation capabilities (Translate, Rotate, Scaling, Affinity and Symmetry commands) cannot be affected to point, curve or surface variables. The Set element = function() syntax has to be used to valuate the result.

Sample

//The following example illustrates the last paragraph
//(here with the 'translate' function)

//Use this syntax with 'Set'
Set PartBody\Point.2 = translate(PartBody\Point.1 ,direction(`xy plane`),1mm)
//Do not use this syntax without 'Set'
PartBody\Point.2 = translate(PartBody\Point.1 ,direction(`xy plane`),1mm)

split

Splits elements.

split (curve)

Splits a curve by a given element and keeps the side determined by a boolean.

Signature

split(tosplit: Curve, splitting: Wireframe, orientation: Boolean): Curve

Inputs

  • tosplit(Curve): curve to split
  • splitting(Wireframe): element that will split tosplit
  • orientation(Boolean): boolean to determine which side of the curve is to be kept

Returned Value

  • Curve: part of tosplit delimited by splitting and determined by orientation

split (surface by surface)

Splits a surface by a surface intersecting the surface to split and keeps the side determined by a boolean.

Signature

split(tosplit: Surface, splitting: Surface, orientation: Boolean): Surface

Inputs

  • tosplit(Surface): surface to split
  • splitting(Surface): surface intersecting tosplit that will split it
  • orientation(Boolean): boolean to determine which side of the surface is to be kept

Returned Value

  • Surface: part of tosplit delimited by splitting and determined by orientation

split (surface by curve)

Splits a surface by a curve located on the surface and keeps the side determined by a boolean.

Signature

split(tosplit: Surface, splitting: Curve, orientation: Boolean): Surface

Inputs

  • tosplit(Surface): surface to split
  • splitting(Curve): curve located on the surface to split that will split the surface
  • orientation(Boolean): boolean to determine which side of the surface is to be kept

Returned Value

  • Surface: part of tosplit delimited by splitting and determined by orientation

symmetry

Returns the symmetrical element of a given element with respect to a given invariant (point, line or plane).

Signature

symmetry(totransform: Wireframe, invariant: Wireframe): Wireframe

Inputs

  • totransform(Wireframe): element whose symmetrical is to be created
  • invariant(Wireframe): element to define the symmetry (point, line or plane). If it is neither a point, nor a line, nor a plane, an error will occur.

Returned Value

  • Wireframe: symmetrical element of totransform with respect to invariant
Note: Geometry returned by Invert command or transformation capabilities (Translate, Rotate, Scaling, Affinity and Symmetry commands) cannot be affected to point, curve or surface variables. The Set element = function() syntax has to be used to valuate the result.

Sample

//The following example illustrates the last paragraph
//(here with the 'translate' function)

//Use this syntax with 'Set'
Set PartBody\Point.2 = translate(PartBody\Point.1 ,direction(`xy plane`),1mm)
//Do not use this syntax without 'Set'
PartBody\Point.2 = translate(PartBody\Point.1 ,direction(`xy plane`),1mm)

translate

Translates an element.

Signature

translate(totransform: Wireframe, dir: Direction, distance: Length): Wireframe

Inputs

  • totransform(Wireframe): element to translate
  • distance(LENGTH): distance between totransform and the returned result

Returned Value

  • Wireframe: translation of totransform directed by dir and of a distance of distance
Note: Geometry returned by Invert command or transformation capabilities (Translate, Rotate, Scaling, Affinity and Symmetry commands) cannot be affected to point, curve or surface variables. The Set element = function() syntax has to be used to valuate the result.

Sample

//The following example illustrates the last paragraph
//(here with the 'translate' function)

//Use this syntax with 'Set'
Set PartBody\Point.2 = translate(PartBody\Point.1 ,direction(`xy plane`),1mm)
//Do not use this syntax without 'Set'
PartBody\Point.2 = translate(PartBody\Point.1 ,direction(`xy plane`),1mm)

trim

Trims two intersecting curves or surfaces.

trim (curves)

Trims two intersecting curves.

Signature

trim(crv1: Curve, orientationCrv1: Boolean, crv2: Curve, orientationCrv2: Boolean): Curve

Inputs

  • crv1(Curve): first curve to trim with the second one
  • orientationCrv1(Boolean): boolean to determine which side of crv1 will be kept
  • crv2(Curve): second curve to trim with the first one
  • orientationCrv2(Boolean): boolean to determine which side of crv2 will be kept

Returned Value

Curve: curve consisting of a side of crv1 determined by orientationCrv1 prolonged by a side of crv2 determined by orientationCrv2. The point that has cut the two input curves is their intersecting point.

trim (surfaces

Trims two intersecting surfaces.

Signature

trim(sur1: Surface, orientationSur1: Boolean, sur2: Surface, orientationSur2: Boolean): Surface

Inputs

  • sur1(Surface): first surface to trim with the second one
  • orientationSur1(Boolean): boolean to determine which side of sur1 will be kept
  • sur2(Surface): second surface to trim with the first one
  • orientationSur2(Boolean): boolean to determine which side of sur2 will be kept

Returned Value

Surface: surface consisting of a side of sur1 determined by orientationSur1 prolonged by a side of sur2 determined by orientationSur2. The curve that has cut the two input surfaces is their intersecting curve.

GeometricFeature->GetNearSubElements()

Returns the sub-elements of a Feature that are the nearest to a point, curve or surface. Those points, curves or surfaces can be anywhere in the model. They are not necessary part of the Feature whose sub-elements are looked for.

Signature

Geometric feature->GetNearSubElements(dimension: Integer, geoFeature: Geometric feature): List

Inputs

  • dimension(Integer): dimension of the wanted sub-elements
  • geoFeature(GeometricFeature): reference element the sub-elements should be the closest to

Returned Value

  • List: the list of sub-elements of dimension equal to dimension that are closest to geoFeature

Sample

let subElements (List)
let pad (GeometricFeature)
let nearToFeature (GeometricFeature)

set pad=PartBody\Pad.1

set nearToFeature = PartBody\Point.1
subElements = pad->GetNearSubElements(1, nearToFeature) /* nearest edges of a pad to a point */

set nearToFeature = PartBody\Line.1
subElements = pad->GetNearSubElements(2, nearToFeature) /* nearest faces of a pad to a line */

set nearToFeature = PartBody\Plane.1
subElements = pad->GetNearSubElements(0, nearToFeature) /* nearest vertices of a pad to a plane */