Your Ad Here

Go to: Synopsis. Flags. Return value. MEL examples.

Synopsis

curveIntersect [-constructionHistory boolean] [-curveOnSurface boolean] [-direction float float float] [-name string] [-object boolean] [-polygon int] [-range boolean] [-rebuild boolean] [-replaceOriginal boolean] [-tolerance float] [-useDirection boolean] string string

curveIntersect is undoable, queryable, and editable.

You must specify two curves to intersect. This command either returns the parameter values at which the given pair of curves intersect, or returns a dependency node that provides the intersection information. If you want to find the intersection of the curves in a specific direction you must use BOTH the "-useDirection" flag and the "direction" flag.

Flags

constructionHistory, curveOnSurface, direction, name, object, polygon, range, rebuild, replaceOriginal, tolerance, useDirection
Long name (short name) [argument types] Properties
-name(-n) string create
Name the resulting object
-constructionHistory(-ch) boolean create
Turn the construction history on or off (not available in all commands)
-object(-o) boolean create
Create the result, or just the dependency node (not available in all commands)
-replaceOriginal(-rpo) boolean create
Create "in place" (i.e., replace) (not available in all commands)
-curveOnSurface(-cos) boolean create
If possible, create 2D curve as a result (not available in all commands)
-polygon(-po) int create
The value of this argument controls the type of the object created by this operation (not available in all commands)
  • 0: nurbs surface
  • 1: polygon (use nurbsToPolygonsPref to set the parameters for the conversion)
  • 2: subdivision surface (use nurbsToSubdivPref to set the parameters for the conversion)
  • 3: Bezier surface
  • 4: subdivision surface solid (use nurbsToSubdivPref to set the parameters for the conversion)
-range(-rn) boolean create
Force a curve range on complete input curve (not available in all commands)
-rebuild(-rb) boolean create
Rebuild the input curve(s) before using them in the operation. Use nurbsCurveRebuildPref to set the parameters for the conversion. (not available in all commands)
-useDirection(-ud) boolean queryedit
If true, use direction flag. The input curves are first projected in a specified direction and then intersected. If false, this command will only find true 3D intersections.
Default: (Tboolean)false

In query mode, this flag needs a value.

-direction(-d) float float float queryedit
The direction that the input curves are projected in before intersecting. This vector is only used if "useDirection" flag is true.

In query mode, this flag needs a value.

-tolerance(-tol) float queryedit
The tolerance that the intersection is calculated with. For example, given two curves end-to-end, the ends must be within tolerance for an intersection to be returned.
Default: (Tdouble)0.001

In query mode, this flag needs a value.


Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command

Return value


[string]

MEL examples

curveIntersect curve1 curve2;
// Returns the parameter values that the curves intersect at.
// eg. if 6 parameter values are returned, the first 3 are
// on curve1 and the last 3 are on curve2.

curveIntersect -useDirection true -direction 0 1 0 curve1 curve2;
// Returns the parameter values that the curves intersect at
// when projected along vector (0, 1, 0).  This is useful
// for example when you are viewing the two curves in an orthographic
// view and the curves appear to intersect, even though
// they do not intersect in 3D.

string $node = `curveIntersect -ch on curve1 curve2`;
float $p1[] = `getAttr ($node + ".parameter1")`;    // or use ".p1"
float $p2[] = `getAttr ($node + ".parameter2")`;    // or use ".p2"
// Returns a string which is the name of a new curveIntersect
// dependency node.
// The "getAttr" commands return the parameter values at
// which the curves intersect each other.

  

Return to Autodesk Index


Your Ad Here