TSplineSurface
Returns True if a given T-spline is closed
Returns True if a given T-spline is extractable (could be displayed in smooth mode)
Returns True if a given T-spline is in box mode
Returns True if a given T-spline is standard (all T-points are separated from star points by at least two isocurves)
Returns True if a given T-spline is watertight. All closed surfaces are watertight, but some watertight surfaces are open.
Returns a list of reflections applied to a given T-spline
public static TSplineSurface BuildFromLines(IEnumerable<Curve> lines, int maxFaceValence = 4, double snappingTolerance = 1E-05, bool creaseOuterVertices = true, bool inSmoothMode = false)
Creates a T-spline surface from a list of lines.
Accepts curves, but takes only start and end points from them.
public static TSplineSurface BuildPipes(IEnumerable<Curve> curves, double defaultRadius, double snappingTolerance, IEnumerable<int> segmentsCount, IEnumerable<double> endRotations, IEnumerable<double> endRadii, IEnumerable<double> endPercentage, bool inSmoothMode)
Creates a T-spline piped surface using a network of curves or lines.
A smooth joint is created at each curve intersection.
Some parameters take a single value or a list, two values per curve.
public static TSplineSurface BuildPipes(IEnumerable<Curve> curves, double defaultRadius, double snappingTolerance, IEnumerable<int> segmentsCount, bool autoHandleStart, bool autoHandleEnd, IEnumerable<double> startRotations, IEnumerable<double> endRotations, IEnumerable<double> startRadii, IEnumerable<double> endRadii, IEnumerable<double> startPositions, IEnumerable<double> endPositions, bool inSmoothMode)
Creates a T-spline piped surface using a network of curves or lines.
A smooth joint is created at each curve intersection.
Some parameters take a single value or a list, one value per curve.
public static TSplineSurface ByBoxCorners(Point lowPoint, Point highPoint, int xSpans, int ySpans, int zSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline box spanning from low point to high point
public static TSplineSurface ByBoxLengths(double width, double length, double height, int xSpans, int ySpans, int zSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline box centered around the World Coordinate System origin, with a given width, length, and height
public static TSplineSurface ByBoxLengths(Point origin, double width, double length, double height, int xSpans, int ySpans, int zSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline box centered around an input point, with a given width, length, and height
public static TSplineSurface ByBoxLengths(CoordinateSystem cs, double width, double length, double height, int xSpans, int ySpans, int zSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline box centered and oriented to the input Coordinate System, with a given width, length, and height
Combines given T-spline surfaces into a single one.
Surfaces can be disjoint.
If at least one surface is in box mode, the output surface will be in box mode as well.
Note: All input surfaces must have the same version in order to be combined successfully. For this reason, one or more surfaces may be cloned internally and their versions either upgraded or downgraded to match the version currently used in Dynamo. The resulting surface may therefore have subtle differences from what might be the expected result. The input surfaces themselves will remain unchanged.
public static TSplineSurface ByConeCoordinateSystemHeightRadii(CoordinateSystem cs, double height, double startRadius, double endRadius, int radiusSpans, int heightSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline cone with a base point at the Coordinate System origin, extending in the direction of the Coordinate System Z-axis,
with its circular base in the Coordinate System XY plane
public static TSplineSurface ByConeCoordinateSystemHeightRadius(CoordinateSystem cs, double height, double radius, int radiusSpans, int heightSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline cone with a base point at the Coordinate System origin, extending in the direction of the Coordinate System Z-axis,
with its circular base in the Coordinate System XY plane
public static TSplineSurface ByConePointsRadii(Point startPoint, Point endPoint, double startRadius, double endRadius, int radiusSpans, int heightSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline cone surface with axis from start point to end point, with given radii at start and end.
This object does not have an apex and is in the shape of a frustum.
public static TSplineSurface ByConePointsRadius(Point startPoint, Point endPoint, double radius, int radiusSpans, int heightSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline cone surface with a given base radius at the start point,
extending to an apex at the end point
public static TSplineSurface ByCylinderPointsRadius(Point startPoint, Point endPoint, double radius, int radiusSpans, int heightSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Constructs a T-spline cylinder surface given the bottom and top center point of the cylinder
public static TSplineSurface ByCylinderRadiusHeight(CoordinateSystem cs, double radius, double height, int radiusSpans, int heightSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Constructs a T-spline cylinder surface defined by a given Coordinate System, radius, and height
public static TSplineSurface ByExtrude(Curve curve, Vector direction, double frontDistance = 1, double backDistance = 1, int frontSpans = 1, int backSpans = 0, int profileSpans = 0, bool uniform = true, bool inSmoothMode = false)
Constructs a T-spline by extruding a curve along the given vector
public static TSplineSurface ByNurbsSurfaceCurvature(NurbsSurface nurbsSurface, bool inSmoothMode = false)
Constructs a T-spline surface from a NURBS surface using curvature subdivision strategy
Input NURBS surface is rebuilt to degree 3. Output T-spline has span counts and
positions in each direction detected automatically depending on curvature.
public static TSplineSurface ByNurbsSurfaceUniform(NurbsSurface nurbsSurface, int uSpans, int vSpans, bool uUseArcLen, bool vUseArcLen, bool inSmoothMode)
Constructs a T-spline surface from a NURBS surface using uniform strategy.
Input NURBS surface is rebuilt with uniform knots placed at equal parametric or
arc length intervals depending on corresponding useArcLen flag, and approximated by
degree 3 NURBS surface. Output T-Spline is divided by given span counts
in u and v directions.
public static TSplineSurface ByPlaneBestFitThroughPoints(IEnumerable<Point> points, Point minCorner, Point maxCorner, int xSpans, int ySpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Generates a T-spline primitive plane surface from a list of points
public static TSplineSurface ByPlaneLineAndPoint(Line line, Point point, Point minCorner, Point maxCorner, int xSpans, int ySpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Generates a T-spline primitive plane surface from a line and a point. The point cannot lie on the line or anywhere on the line's axis.
public static TSplineSurface ByPlaneOriginNormal(Point origin, Vector normal, Point minCorner, Point maxCorner, int xSpans, int ySpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Generates a T-spline primitive plane surface using an origin point and normal vector
public static TSplineSurface ByPlaneOriginNormalXAxis(Point origin, Vector normal, Vector xAxis, Point minCorner, Point maxCorner, int xSpans, int ySpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates an "oriented" T-spline plane, positioned at Point origin with Vector normal, but with a specific X-axis orientation.
This has no impact on splitting, intersect, project, etc. operations; it only specifies the orientation of the input CoordinateSystem.
public static TSplineSurface ByPlaneOriginXAxisYAxis(Point origin, Vector xAxis, Vector yAxis, Point minCorner, Point maxCorner, int xSpans, int ySpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline primitive plane surface by origin and X and Y axes.
The Z-axis is the cross product of the two vectors.
public static TSplineSurface ByPlaneThreePoints(Point p1, Point p2, Point p3, Point minCorner, Point maxCorner, int xSpans, int ySpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Generates a T-spline primitive plane surface using three points as input. The points cannot lie on a straight line.
public static TSplineSurface ByQuadballCenterRadius(Point center, double radius, int spans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline quadball with a given center and radius, aligned with the default world XY plane
public static TSplineSurface ByQuadballCoordinateSystemRadius(CoordinateSystem cs, double radius, int spans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline quadball centered at Coordinate System origin, with a given radius
public static TSplineSurface ByRevolve(Curve profile, Point axisOrigin, Vector axisDirection, double startAngle, double sweepAngle, int radialSpans, int axialSpans, bool uniform, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline surface by sweeping the profile curve around the axis formed
by the axis origin and axis direction, starting at start_angle in degrees,
and sweeping by sweep_angle in degrees
public static TSplineSurface BySphereBestFit(IEnumerable<Point> points, int radiusSpans, int heightSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline sphere that fits as closely as possible to the input points
public static TSplineSurface BySphereCenterPointRadius(Point centerPoint, double radius, int radiusSpans, int heightSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline sphere centered at the input point, with a given radius
public static TSplineSurface BySphereFourPoints(IEnumerable<Point> points, int radiusSpans, int heightSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline sphere from four input points
public static TSplineSurface BySweep(Curve profile, Curve path, bool parallel = true, int pathSpans = 1, int profileSpans = 0, bool pathUniform = true, bool profileUniform = true, bool inSmoothMode = false)
Constructs a T-spline by sweeping a cross section curve along a path
public static TSplineSurface ByTorusCenterRadii(Point center, double innerRadius, double outerRadius, int innerRadiusSpans, int outerRadiusSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline torus with a given center and radii, aligned with the default world XY plane
public static TSplineSurface ByTorusCoordinateSystemRadii(CoordinateSystem cs, double innerRadius, double outerRadius, int innerRadiusSpans, int outerRadiusSpans, TSplineInitialSymmetry symmetry, bool inSmoothMode)
Creates a T-spline torus centered at Coordinate System origin, with given radii
Creates a T-spline surface from a given string in T-spline mesh (TSM) format
Exports a given T-spline surface to a T-spline mesh file
Exports a given set of T-spline surfaces to a T-spline scene file
Loads a T-spline surface from the given T-spline mesh file path
Loads a T-spline surface from the given T-spline mesh file
Loads a set of a T-spline surfaces from the given T-spline scene file path
Loads a set of a T-spline surfaces from the given T-spline scene file
Translates the given T-spline surface into a string in T-spline mesh (TSM) format
public TSplineSurface AddReflections(IEnumerable<TSplineReflection> reflections, bool weldSymmetricPortions = false, double weldTolerance = 1E-05)
Appends the given list of reflections to a T-Spline
public TSplineSurface BevelEdges(IEnumerable<TSplineEdge> edges, double percentage = 0.5, int segments = 3, bool keepOnFace = false, double roundness = 0)
Replaces given edges with a channel of faces
public TSplineSurface BridgeEdgesToEdges(IEnumerable<TSplineEdge> firstGroup, IEnumerable<TSplineEdge> secondGroup, IEnumerable<Curve> followCurves, IEnumerable<int> frameRotations, IEnumerable<int> spansCounts, bool cleanBorderBridges, bool keepSubdCreases, IEnumerable<TSplineVertex> firstAlignVertices, IEnumerable<TSplineVertex> secondAlignVertices, IEnumerable<bool> flipAlignmentFlags)
Builds a bridge between two sets of edges. Items of the
first group are considered children of this surface. Items of
the second group can either be children of this surface or belong
to a different surface. Topology within each group might not be
adjacent but should create the same count of distinct loops.
public TSplineSurface BridgeEdgesToFaces(IEnumerable<TSplineEdge> firstGroup, IEnumerable<TSplineFace> secondGroup, IEnumerable<Curve> followCurves, IEnumerable<int> frameRotations, IEnumerable<int> spansCounts, bool cleanBorderBridges, bool keepSubdCreases, IEnumerable<TSplineVertex> firstAlignVertices, IEnumerable<TSplineVertex> secondAlignVertices, IEnumerable<bool> flipAlignmentFlags)
Builds a bridge between a set of edges and a set of faces. Items of the
first group are considered children of this surface. Items of
the second group can be either children of this surface or belong
to a different surface. Topology within each group might not be
adjacent but should create the same count of distinct loops.
public TSplineSurface BridgeFacesToEdges(IEnumerable<TSplineFace> firstGroup, IEnumerable<TSplineEdge> secondGroup, IEnumerable<Curve> followCurves, IEnumerable<int> frameRotations, IEnumerable<int> spansCounts, bool cleanBorderBridges, bool keepSubdCreases, IEnumerable<TSplineVertex> firstAlignVertices, IEnumerable<TSplineVertex> secondAlignVertices, IEnumerable<bool> flipAlignmentFlags)
Builds a bridge between a set of faces and a set of edges. Items of the
first group are considered children of this surface. Items of
the second group can be either children of this surface or belong
to a different surface. Topology within each group might not be
adjacent but should create the same count of distinct loops.
public TSplineSurface BridgeFacesToFaces(IEnumerable<TSplineFace> firstGroup, IEnumerable<TSplineFace> secondGroup, IEnumerable<Curve> followCurves, IEnumerable<int> frameRotations, IEnumerable<int> spansCounts, bool cleanBorderBridges, bool keepSubdCreases, IEnumerable<TSplineVertex> firstAlignVertices, IEnumerable<TSplineVertex> secondAlignVertices, IEnumerable<bool> flipAlignmentFlags)
Builds a bridge between two sets of faces. Items of the first group
are considered children of this surface. Items of the second
group can be either children of this surface or belong to
a different surface. Topology within each group might not be adjacent
but should create the same count of distinct loops.
Compresses all topology on an input surface and makes the indices contiguous. This function maintains the relative order of the indices.
Adds a crease to the given edge on a T-spline surface
Adds a crease to the given set of vertices on a T-spline surface
public TSplineSurface CreateMatch(IEnumerable<TSplineEdge> tsEdges, IEnumerable<Curve> curves, int continuity, bool useArclength, bool useRefinement, int numRefinementSteps, double refinementTolerance, bool usePropagation, double widthOfPropagation, double tangentScale, double curvParamWeight, bool flipSourceTargetAlignment)
Creates a match with a T-spline and a closed loop of curves
public TSplineSurface CreateMatch(IEnumerable<TSplineEdge> tsEdges, IEnumerable<Curve> curves, int continuity, bool useArclength, bool useRefinement, int numRefinementSteps, double refinementTolerance, bool usePropagation, double widthOfPropagation, double scale, bool flipSourceTargetAlignment)
Creates a match with a T-spline and a closed loop of curves
public TSplineSurface CreateMatch(IEnumerable<TSplineEdge> tsEdges, IEnumerable<Edge> brepEdges, int continuity, bool useArclength, bool useRefinement, int numRefinementSteps, double refinementTolerance, bool usePropagation, double widthOfPropagation, double tangentScale, double curvParamWeight, bool flipSourceTargetAlignment)
Creates a match with a T-spline and a closed loop of BRep edges. First,
the edge loop is converted to a curve loop and then the match is performed.
public TSplineSurface CreateMatch(IEnumerable<TSplineEdge> tsEdges, IEnumerable<Edge> brepEdges, int continuity, bool useArclength, bool useRefinement, int numRefinementSteps, double refinementTolerance, bool usePropagation, double widthOfPropagation, double scale, bool flipSourceTargetAlignment)
Creates a match with a T-spline and a closed loop of BRep edges. First,
the edge loop is converted to a curve loop and then the match is performed.
Removes edges from T-spline topology
Removes faces from T-spline topology
Removes vertices from T-spline topology
Copies given faces to a new T-spline surface with no symmetry
Changes visualization style of a T-spline:
smooth visualization if True is passed, box otherwise
Performs a single or multiple symmetric extrudes on a set of edges and moves new edges by the given vector
public TSplineSurface ExtrudeEdgesAlongCurve(IEnumerable<TSplineEdge> edges, Curve curve, int spans = 1)
Performs a single or multiple symmetric extrudes on a set of edges and moves new edges by the path of the given curve
Performs a single or multiple symmetric extrudes on a set of faces and moves new edges by the given vector
public TSplineSurface ExtrudeFacesAlongCurve(IEnumerable<TSplineFace> faces, Curve curve, int spans = 1)
Performs a single or multiple symmetric extrudes on a set of faces and moves new edges by the path of the given curve
public TSplineSurface FillHole(IEnumerable<TSplineEdge> edges, int fillMethod = 0, bool keepSubdCreases = false)
Fills holes in a T-spline
Flattens control points of given vertices to a single plane.
Requires input of at least four vertices.
Flattens control points of given vertices to a single plane
that will be parallel with the given plane.
Requires input of at least four vertices.
Inverts the normals of all faces in the mesh
Interpolates a given T-spline surface. Forward interpolation moves control points to their parametric locations on the surface. Reverse interpolation generates a point on the surface for each original control point and moves this control point to its corresponding surface point.
Makes all knot intervals on a T-spline surface uniform
public TSplineSurface MergeEdges(IEnumerable<TSplineEdge> firstGroup, IEnumerable<TSplineEdge> secondGroup, bool insertCreases = false)
Merges the given edges. Edges in each group should create equal counts
of continuous sets. Edges from the first group are considered
edges of this surface. Edges from the second group can be either
from this surface or any other surface. In case of different
surfaces, combine is performed before merge.
public TSplineSurface MoveVertices(IEnumerable<TSplineVertex> vertices, Vector vector, bool onSurface = false)
Moves the given vertices along the given vector
public TSplineSurface PullVertices(IEnumerable<TSplineVertex> vertices, IEnumerable<Geometry> geometries, bool surfacePoints = true)
Takes every given T-spline vertex and pulls it towards the closest point
point on the target geometries. If 'surfacePoints' is True, the surface point
of the vertex is pulled. If False, the control grip is pulled.
Removes all reflections from the given T-spline
public TSplineSurface SlideEdges(IEnumerable<TSplineEdge> edges, double amount = 0.5, double roundness = 0)
Slides the given edges along neighboring edges
Standardizes the given T-spline to the point where exact insertion
can be performed. If it cannot be standardized, a warning is shown
explaining the reason.
Subdivides the given faces into four faces each in exact or simple mode
depending on the 'exact' input
Thickens the given T-spline surface by the given distance in the direction of its face normals
Thickens the given T-spline surface by the given vector
Converts the given T-spline surface to solid or surface depending on shape.
Note: There could be subtle unexpected changes in the resulting BRep surface if the input surface is created in a higher T-spline version than the version loaded in Dynamo. In this case, a copy of the surface will be downgraded to the Dynamo version and used in the conversion.
Converts the given T-spline surface to a mesh. The mesh can have both triangles and quads.
Removes the crease from the given set of edges
Removes the crease from the given set of vertices
Unwelds all the given edges. Each vertex on all the edges will be unwelded.
Unwelds all the given vertices. All edges on every vertex will be unwelded.
Finds all coincident vertices and welds them together
public TSplineSurface WeldVertices(IEnumerable<TSplineVertex> vertices, Point newPosition, bool keepSubdCreases)
Welds the given list of vertices into a single vertex
public TSplineSurface WeldVertices(IEnumerable<TSplineVertex> firstGroup, IEnumerable<TSplineVertex> secondGroup, bool keepSubdCreases = false)
Weld vertices of first and second groups pairwise.
The first group is considered vertices of this T-spline.
The second group's vertices can be either from this surface or from any other.
In case of different T-splines, combine is performed before the weld operation.