create, merge, split curves... More...
Functions | |
| def | addCnsCurve |
| DRAW. More... | |
| def | addCurve |
| Create a NurbsCurve with a single subcurve. More... | |
| def | addCurve2 |
| Create a NurbsCurve with multiple subcurve. More... | |
| def | addCurveFromPos |
| Create a NurbsCurve with a single subcurve from a list of position. More... | |
| def | mergeCurves |
| SUBCURVES. More... | |
| def | splitCurve |
| Split the sub curve of given curve. More... | |
| def | isClosed |
| Return true if the given nurbscurve is closed. More... | |
| def | applyCurveResamplerOp |
| OPERATOR. More... | |
| def | getGlobalPositionFromPercentage |
| EVAL CURVE. More... | |
| def | getClosestU |
| def | getClosestPercentage |
| def | getClosestGlobalTransform |
| def | getClosestGlobalPosition |
| def | getClosestGlobalTangent |
| def | getClosestGlobalNormal |
| def | getClosestGlobalBiNormal |
| def | getGlobalPointPosition |
create, merge, split curves...
This file is part of GEAR_mc.
GEAR_mc is a fork of Jeremie Passerin's GEAR project.
GEAR is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/lgpl.html>.
Author: Jeremie Passerin geerem@hotmail.com www.jeremiepasserin.com
Fork Author: Miquel Campos hello@miqueltd.com www.miqueltd.com
Date: 2013 / 08 / 16
| def gear.xsi.curve.addCnsCurve | ( | parent, | |
| name, | |||
| centers, | |||
close = False, |
|||
degree = 1 |
|||
| ) |
DRAW.
======================================================== Create a curve attached to given centers. One point per center.
Do to so we use a cluster center operator per point. We could use an envelope (method to do so is in the code), but there was a reason I can't remember why it was better to use clustercenter.
| parent | X3DObject - Parent object. |
| name | String - Name. |
| centers | List of X3DObject or Collection - Object that will drive the curve. |
| close | Boolean - True to close the fcurve. |
| degree | Integer - 1 for linear curve, 3 for Cubic. |
| def gear.xsi.curve.addCurve | ( | parent, | |
| name, | |||
| points, | |||
close = False, |
|||
degree = 1, |
|||
t = XSIMath.CreateTransform(), |
|||
color = [0 |
|||
| ) |
Create a NurbsCurve with a single subcurve.
| parent | X3DObject - Parent object. |
| name | String - Name. |
| points | List of Double - positions of the curve in a one dimension array [point0X, point0Y, point0Z, 1, point1X, point1Y, point1Z, 1, ...]. |
| close | Boolean - True to close the curve. |
| degree | Integer - 1 for linear curve, 3 for Cubic. |
| t | SITransformation - Global transform. |
| color | List of Double - The RGB color of the Null (ie. [1,0,0] for red). |
| def gear.xsi.curve.addCurve2 | ( | parent, | |
| name, | |||
| points, | |||
ncp = [], |
|||
kn = [], |
|||
nkn = [], |
|||
close = [], |
|||
degree = [], |
|||
t = XSIMath.CreateTransform(), |
|||
color = [0 |
|||
| ) |
Create a NurbsCurve with multiple subcurve.
| parent | X3DObject - Parent object. |
| name | String - Name. |
| points | List of Double - positions of the curve in a one dimension array [point0X, point0Y, point0Z, 1, point1X, point1Y, point1Z, 1, ...]. |
| ncp | List of Double - See XSI SDK Docv for AddNurbsCurveList2. |
| kn | List of Double - See XSI SDK Docv for AddNurbsCurveList2. |
| nkn | List of Double - See XSI SDK Docv for AddNurbsCurveList2. |
| close | List of Boolean - True to close the curve. |
| degree | List of Integer - 1 for linear curve, 3 for Cubic. |
| t | SITransformation - Global transform. |
| color | List of Double - The RGB color of the Null (ie. [1,0,0] for red). |
| def gear.xsi.curve.addCurveFromPos | ( | parent, | |
| name, | |||
| positions, | |||
close = False, |
|||
degree = 1, |
|||
knotsPara = c.siNonUniformParameterization, |
|||
t = XSIMath.CreateTransform(), |
|||
color = [0 |
|||
| ) |
Create a NurbsCurve with a single subcurve from a list of position.
| parent | X3DObject - Parent object. |
| name | String - Name. |
| positions | List of SIVector3 - positions of the curve points. |
| close | Boolean - True to close the curve. |
| degree | Integer - 1 for linear curve, 3 for Cubic. |
| knotsPara | - knots parametrization in the curve |
| t | SITransformation - Global transform. |
| color | List of Double - The RGB color of the object (ie. [1,0,0] for red). |
| def gear.xsi.curve.applyCurveResamplerOp | ( | curve | ) |
OPERATOR.
Apply Curve Resampler Op =============================== Resample the curve on itself, code of the operator is in the plugin sn_CurveTools
| curve | NurbsCurve - The curve to resample. |
| def gear.xsi.curve.getGlobalPositionFromPercentage | ( | percentage, | |
| crv, | |||
subcurve = 0 |
|||
| ) |
EVAL CURVE.
========================================================
| def gear.xsi.curve.isClosed | ( | nurbscrv | ) |
Return true if the given nurbscurve is closed.
| nurbscrv | NurbsCurve - The nurbs curves to check. |
| def gear.xsi.curve.mergeCurves | ( | curves | ) |
SUBCURVES.
Merge Curves =========================================== Merge given curve in one unique curve.
| curve | List of NurbsCurve - The curves to merge. |
| def gear.xsi.curve.splitCurve | ( | curve | ) |
Split the sub curve of given curve.
| curve | NurbsCurve - The curves to split. |
1.8.5