centerofgravity
Gets the center of gravity.
Body->centerofgravity
Gets the center of gravity by valuating its three coordinates as output arguments.
Constructs the center of gravity of a solid (i. e. a PartBody type
feature).
In case of a face, the center of gravity of the equivalent volume is
computed with a unit thickness. Whereas, for a profile, it is computed
with a unit section swept along the boundary.
Signature
Body->centerofgravity (x: out Length, y: out Length, z: out Length): VoidType
Inputs
x(LENGTH): abscissa of
the Body's center of gravity, as an output argument y(LENGTH): ordinate of
the Body's center of gravity, as an output argument - z(LENGTH): applicate of
the Body's center of gravity, as an output argument
centerofgravity
Returns the center of gravity as a point.
Inputs
- (Body): solid or face or profile whose center of gravity is sought
Returned Value
- Point: center of gravity of the input solid, face or profile
Sample
Geometrical Set.1\Point.12 = centerofgravity (PartBody)
curvaturecenter
Constructs the curvature center of a curve at a given point.
Inputs
- crv(Curve): curve whose
curvature center is sought at some point
- pt(Point): point located on
crv
crv's curvature center is sought at
Returned Value
- Point: crv's curvature center at pt
Sample
Geometrical Set.1\Point.13 = curvaturecenter
(Geometrical Set.1\Circle.1, Geometrical Set.1\Point.6)
pointoncurveRatio
Creates a point on a curve.
Inputs
- crv(Curve): curve where the
point is to be created
- pt(Point): curve's "origin"
(does not have to belong to crv; if not, it is projected
onto it)
- ratio(Real): ratio =
distance(point to be created, pt) / distance(point to be
created, crv's extremity)
- orientation(Boolean):
boolean to choose crv's extremity to be considered in the ratio's
formula
Returned Value
- Point: point on crv whose location is given by ratio (and ratio is given by pt and orientation)
Sample
PartBody\Point.1 = point(2mm,3mm,5mm)
PartBody\Point.2 = point(7mm,11mm,13mm)
PartBody\Point.3 = point(17mm,19mm,23mm)
PartBody\Curve.1 = spline(PartBody\Point.1 ,PartBody\Point.2 ,PartBody\Point.3 )
PartBody\Point.4 = pointoncurveRatio(PartBody\Curve.1 ,PartBody\Point.2 ,0.5,true)/Point.4 and Point.7 are different
PartBody\Point.5 = pointoncurveRatio(PartBody\Curve.1 ,PartBody\Point.2 ,-0.5,true)/Point.5 and Point.6 are different
PartBody\Point.6 = pointoncurveRatio(PartBody\Curve.1 ,PartBody\Point.2 ,0.5,false)/Point.5 and Point.6 are different
PartBody\Point.7 = pointoncurveRatio(PartBody\Curve.1 ,PartBody\Point.2 ,-0.5,false)/Point.4 and Point.7 are different
pointtangent
Returns the input curve's point at which the tangent is directed by the input direction.
Inputs
- (Curve): curve containing the
sought point
- (Direction): direction that should
be the input curve's tangent's direction at the returned
point
Returned Value
- Point: the input curve's point at which the tangent is directed by the input direction
Sample
PartBody\Point.1 = point(2mm,3mm,5mm)
PartBody\Point.2 = point(7mm,11mm,13mm)
PartBody\Point.3 = point(17mm,19mm,23mm)
PartBody\Curve.1 = spline(PartBody\Point.1 ,PartBody\Point.2 ,PartBody\Point.3 )
PartBody\Point.4 = pointtangent(PartBody\Curve.1 ,direction(`xy plane` ))
extremum
computes the set of points as a subset of the input set of points (a curve, surface or solid) that meet given extremum criteria (e. g. they are the points that have got the smallest x-coordinate given the x-axis is directed by the following direction...; they are the points that have got the biggest x-coordinate given the x-axis is directed by the following direction... among the set of points that have got the smallest y-coordinate given the y-axis is directed by the following direction...).
Signature
extremum(Curve, Direction, Boolean, Direction, Boolean, Direction, Boolean): Point extremum(Surface, Direction, Boolean, Direction, Boolean, Direction, Boolean): Point extremum(Solid, Direction, Boolean, Direction, Boolean, Direction, Boolean): Point
Inputs
-
(Curve, Surface or Solid): initial set of points from
which the extremum will be computed
- (Direction): direction that defines
the x-axis
- (Boolean): boolean that defines
whether the points of the first subset of points (computed from the
initial set of points) should have got the smallest (when
false) or biggest (when true) x-coordinate
- (Direction): direction that defines
the y-axis (please note that the x- and y-axes do not have to be
orthogonal or even different)
- (Boolean): boolean that defines
whether the points of the second subset of points (computed from
the first set of points) should have got the smallest (when
false) or biggest (when true) y-coordinate
- (Direction): direction that defines
the z-axis (please note that the x-, y- and z-axes do not have to
be orthogonal or even different)
- (Boolean): boolean that defines
whether the points of the third subset of points (computed from the
second set of points) should have got the smallest (when
false) or biggest (when true) z-coordinate
Returned Value
- Point: first of all, the returned value is a set of points. If it contains one point, then it is a point. Otherwise, it may be a curve or even a surface. But it can valuate only a parameter of type "Point", what does not necessarily mean that the result will be a point.
The returned set of points is computed as follows: - the first extremum criterion (first direction, first boolean) enables to compute a first set of points containing the points that belong to the initial set of points (first argument of the function) and that meet the first criterion;
- the second extremum criterion enables to compute a second set of points containing the points that belong to the first set of points and that meet the second criterion (please note that the second criterion can and may be identical to the first criterion if only one criterion is requested);
- the third extremum criterion enables to compute a third set of points containing the points that belong to the second set of points and that meet the third extremum criterion (please note that the third extremum criterion can and may be identical to the second criterion);
- the returned set of points is the third set of points (and the third set of points is a subset of the second set of points, the second set of points is a subset of the first set of points, and the first set of points is a subset of the initial set of points).
Sample
PartBody\Line.1 = line(point(0mm,0mm,0mm),point(1mm,0mm,0mm))
PartBody\Line.2 = line(point(0mm,0mm,0mm),point(0mm,-1mm,0mm))
PartBody\Curve.1 = assemble(PartBody\Line.1 ,PartBody\Line.2 ) //In the following Sample, the element is an "L" contained in the XY
/plane and there is only one direction and one boolean (the three
//directions and booleans are idendical) and the direction is the XY
/plane. As a result, the result is Curve.1, so it is monodimensional.
PartBody\Point.1 = extremum(PartBody\Curve.1 ,direction(`xy plane` ),false,direction(`xy plane` ),false,direction(`xy plane` ),false) //Now, the only direction is the YZ plane, so the result is the set of
/points that have got the smallest x-coordinate if the boolean is false,
//and the set of points that have got the biggest x-coordinate if the
//boolean is true.
//When it is false, the result is Line.2, so it is monodimensional.
PartBody\Point.2 = extremum(PartBody\Curve.2 ,direction(`yz plane` ),false,direction(`yz plane` ),false,direction(`yz plane` ),false)
//When it is true, the result is a point.
PartBody\Point.3 = extremum(PartBody\Curve.2 ,direction(`yz plane` ),true,direction(`yz plane` ),true,direction(`yz plane` ),true) //Now, the only direction is the ZX plane, so the result is the set of
/points that have got the smallest y-coordinate if the boolean is false,
//and the set of points that have got the biggest y-coordinate if the
//boolean is true.
//When it is false, the result is a point.
PartBody\Point.4 = extremum(PartBody\Curve.2 ,direction(`zx plane` ),false,direction(`zx plane` ),false,direction(`zx plane` ),false)
//When it is true, the result is Line.1, so it is monodimensional.
PartBody\Point.5 = extremum(PartBody\Curve.2 ,direction(`zx plane` ),true,direction(`zx plane` ),true,direction(`zx plane` ),true) PartBody\Surface.1 = extrude(PartBody\Line.1 ,direction(`xy plane` ),0mm,1mm,true)
//In the following Sample, the element is a filled square and there is only
//one direction and one boolean (the three directions and booleans are
//idendical) and the direction is perpendicular to two sides and parallel to
//two sides. As a result, the result is an edge.
PartBody\Point.1 = extremum(PartBody\Surface.1 ,direction(`xy plane` ),false,direction(`xy plane` ),false,direction(`xy plane` ),false)
PartBody\Point.2 = extremum(PartBody\Surface.1 ,direction(`xy plane` ),true,direction(`xy plane` ),true,direction(`xy plane` ),true)
pointoncurve
Creates a point on a curve.
The point is to be created at a given curvilinear distance from a reference point specified in the second argument. The boolean specified in the fourth argument allows you to reverse the direction in which the point is to be created. If the point specified in the second argument is not on the curve, the projection of this point onto the curve becomes the actual reference point.
Inputs
- crv(Curve): curve the point
is to be created on
- pt(Point): crv's
"origin" (does not have to belong to crv; if not, it is
projected onto it)
- distance(LENGTH):
curvilinear distance on crv between pt and the point
to be created
- orientation(Boolean):
boolean to specify where, starting from pt, the positive
algebraic distances are and where the negative ones are
Returned Value
- Point: point on crv at a curvilinear distance from pt of distance and located on a side of crv determined by orientation
Sample
PartBody\Point.1 = point(2mm,3mm,5mm)
PartBody\Point.2 = point(7mm,11mm,13mm)
PartBody\Point.3 = point(17mm,19mm,23mm)
PartBody\Curve.1 = spline(PartBody\Point.1 ,PartBody\Point.2 ,PartBody\Point.3 ) PartBody\Point.4 = pointoncurve(PartBody\Curve.1 , PartBody\Point.2, 5mm, true)/Point.4 and Point.5 are identical
PartBody\Point.5 = pointoncurve(PartBody\Curve.1 , PartBody\Point.2, -5mm, false)/Point.4 and Point.5 are identical
point
Creates a point from its three coordinates. Values or parameter names can be used to pass the Inputs.
Signature
point(x: LENGTH, y: LENGTH, z: LENGTH): Point
Inputs
- x(LENGTH): abscissa of the
point to be created
- y(LENGTH): ordinate of the
point to be created
- z(LENGTH): applicate of the
point to be created
Returned Value
- Point: point whose coordinates are (x, y, z)
Sample
Specifying values:
Geometrical Set.1\Point.1 = point(10mm,10mm,10mm)
Specifying parameter names:
Geometrical Set.1\Point.4 = point(0mm,L3,L1)
pointbetween
Creates a point between (or not) two given points.
Inputs
- pt1(Point): first
point
- pt2(Point): second
point
- ratio(Real): number
specifying how close or far the result point is from pt1 or
pt2. If ratio = 0, the result point is pt1 if
orientation's value is true andpt2 if its
value is false. If ratio = 1, the result point is
pt2 if orientation's value is true and
pt1 if its value is false. If ratio = 0.5, the
result point is in the middle of the input points, whatever
orientation's value. If ratio < 0 or ratio
> 1, the result point is outside the pt1-pt2
line, that is to say not between pt1 and
pt2.
- orientation(Boolean): let
pt3 be the result point. If orientation is
true, then pt3 = (1 - ratio) pt1 + ratio pt2. If
orientation is false, then pt3 = ratio pt1 + (1 -
ratio) pt2.
Returned Value
- Point: point equal to the mean of pt1 and pt2 weighted by ratio and 1-ratio or 1-ratio and ratio, depending on orientation's value
Sample
PartBody\Point.1 = point(2mm,3mm,5mm)
PartBody\Point.2 = point(7mm,11mm,13mm)
PartBody\Point.3 = pointbetween(PartBody\Point.1, PartBody\Point.2, -0.1, true)
PartBody\Point.4 = pointbetween(PartBody\Point.1, PartBody\Point.2, 0.1, true)
PartBody\Point.5 = pointbetween(PartBody\Point.1, PartBody\Point.2, 0.9, true)
PartBody\Point.6 = pointbetween(PartBody\Point.1, PartBody\Point.2, 1.1, true)
center
Returns the center of a given circle of any type.
Inputs
- (Circle): circle whose center is to be returned. The circle can be of any type (created within the Generative Shape Design workbench or using the Sketch command).
Returned Value
- Point: the input circle's center
Sample
Geometrical Set.1\Point.10 = circle (Geometrical Set.1\Circle.1)
pointonsurface
Creates a point on a surface determined by its distance to a reference point along a direction.
Inputs
- sur(Surface): surface the
returned point is to be created on
- pt(Point): reference point
to locate the returned point at a certain distance from
it
- dir(Direction): direction to
specify where the returned point is to be located given its
distance to the reference point
- dist(LENGTH): distance
between the returned point and pt
Returned Value
- Point: point on sur located at a distance of dist from pt along dir
Sample
PartBody\Line.1 = line(point(0mm,0mm,0mm),point(1mm,0mm,0mm))
PartBody\Surface.1 = extrude(PartBody\Line.1 ,direction(`xy plane` ),0mm,1mm,true)
PartBody\Point.1 = point(0.5mm,0mm,0.5mm)
PartBody\Point.2 = pointonsurface(PartBody\Surface.1 ,PartBody\Point.1 ,direction(1mm,1mm,1mm),0.5mm)
point2dto3d
Converts a 2D point (i. e. a point in a 2D sketch) into a 3D point by valuating the parameters. You can valuate a 2D point which can be an existing datum point or a volatile point. The constructor computes the new 3D point at the same coordinates as those of the 2D point.
Returned Value
- Point: the 3D point corresponding to 2DPoint
Sample
In this Sample, two points were created within a sketch (PartBody\Sketch.1)
Let L1 (List)
L1 = PartBody\Sketch.1.Query("2DPoint", "") PartBody\Point.1 = point2dto3d(L1.GetItem(1))
PartBody\Point.2 = point2dto3d(L1.GetItem(2))
pointonplane
Creates a point on a given plane.
Signature
pointonplane(pln: Plane, pt: Point, dx: LENGTH, dy: LENGTH): Point
Inputs
- pln(Plane): plane the result
point is to be created on
- pt(Point): pln's "origin"
-
dx (LEN GTH): abscissa of
the result point within pln's axis system (pt,
pln's first direction, pln's second
direction)
- dy(LENGTH): ordinate of the
result point within pln's axis system (pt,
pln's first direction, pln's second
direction)
Returned Value
- Point: point belonging to pln with the (dx, dy) coordinates within pln's axis system (pt, pln's first direction, pln's second direction)
Sample
PartBody\Point.1 = point(0.5mm,0mm,0.5mm)
PartBody\Point.2 = pointonplane(`zx plane`, PartBody\Point.1, 0.5mm, 0mm)
|