Class CAD
- Namespace
Methods
configureFunctionLogger
cad.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)
Parameters
setPrecision
Set the CAD precision
cad.setPrecision(precision=0.01)
Parameters
precision
DistanceCAD precision
solidIntersection
perform boolean operation intersection on two bodies (A ^ B)
cad.solidIntersection(A, B) -> cad.BodyList
Parameters
Returns
- BodyList
List of resulting bodies
solidSubtraction
perform boolean operation subtraction on two bodies (A - B)
cad.solidSubtraction(A, B) -> cad.BodyList
Parameters
Returns
- BodyList
List of resulting bodies
solidUnion
perform boolean operation union on two bodies (A + B)
cad.solidUnion(A, B) -> cad.BodyList
Parameters
Returns
- BodyList
List of resulting bodies
createBezierCurve
Create a Bezier curve
cad.createBezierCurve(poles) -> cad.Curve
Parameters
poles
Point3ListPoles list
Returns
- Curve
Bezier curve
createCircleCurve
Create a new circle
cad.createCircleCurve(radius, matrix) -> cad.Curve
Parameters
Returns
- Curve
Generated circle curve
createCompositeCurve
Create a composite curve from a list of limited curves
cad.createCompositeCurve(CurveList) -> cad.Curve
Parameters
CurveList
CurveListList of limited curves
Returns
- Curve
Composite curve created from the list of limited curves
createCosinusCurve
Create a cosinus curve
cad.createCosinusCurve(Amplitude, Offset, Period, matrix) -> cad.Curve
Parameters
Amplitude
DistanceCosinus amplitude
Offset
DistanceCosinus offset
Period
DistanceCosinus period
matrix
Matrix4Transformation matrix
Returns
- Curve
Cosinus curve
createEllipseCurve
Create an ellipse curve
cad.createEllipseCurve(URadius, VRadius, matrix) -> cad.Curve
Parameters
URadius
DistanceEllipse radius in u direction
VRadius
DistanceEllipse radius in v direction
matrix
Matrix4Transformation matrix
Returns
- Curve
Ellipse curve
createHelixCurve
Create an helix curve
cad.createHelixCurve(radius, pitch, matrix, trigonometrixOrientation) -> cad.Curve
Parameters
radius
DistanceRadius of the helix
pitch
DistanceHeight of one revolution
matrix
Matrix4Transformation matrix
trigonometrixOrientation
BooleanOrientation of the rotation
Returns
- Curve
Helix curve
createHermiteCurve
Create a Hermite Curve
cad.createHermiteCurve(FirstPoint, FirstTangent, SecondPoint, SecondTangent) -> cad.Curve
Parameters
FirstPoint
Point3Starting point of the curve
FirstTangent
Point3Tangent of the starting point
SecondPoint
Point3Ending point of the curve
SecondTangent
Point3Tangent of the ending point
Returns
- Curve
Hermite curve
createHyperbolaCurve
Create an hyperBola curve
cad.createHyperbolaCurve(URadius, VRadius, matrix) -> cad.Curve
Parameters
URadius
DoubleHyperbola radius in u direction
VRadius
DoubleHyperbola radius in v direction
matrix
Matrix4Transformation matrix
Returns
- Curve
Hyperbola curve
createIntersectionCurve
Create a Intersection Curve
cad.createIntersectionCurve(firstSurface, secondSurface, chart, minBounds, maxBounds) -> cad.Curve
Parameters
firstSurface
SurfaceFirst surface of the intersection curve
secondSurface
SurfaceSecond surface of the intersection curve
chart
PolylineCurveDirection curve of the intersection curve
minBounds
DoubleMinimum value of the bounds of the intersection curve
maxBounds
DoubleMaximum value of the bounds of the intersection curve
Returns
- Curve
Intersection curve
createLineCurve
Create a Line Curve
cad.createLineCurve(OriginPt, DirectionPt) -> cad.Curve
Parameters
OriginPt
Point3Orinin point of the line curve
DirectionPt
Point3Direction vector of the line curve
Returns
- Curve
Line curve
createNURBSCurve
Create a NURBS curve
cad.createNURBSCurve(degree, knots, poles, weights) -> cad.Curve
Parameters
degree
IntDegree of the curve
knots
DoubleListKnots of the curve
poles
Point3ListPoles list
weights
DoubleListWeight list
Returns
- Curve
NURBS curve
createParabolaCurve
Create an parabola curve
cad.createParabolaCurve(focalLength, matrix) -> cad.Curve
Parameters
Returns
- Curve
Parabola curve
createPolylineCurve
Create a Polyline curve
cad.createPolylineCurve(points) -> cad.Curve
Parameters
points
Point3ListPoints of polyline curve
Returns
- Curve
Polyline curve
createSegmentCurve
Create a segment curve from two given points
cad.createSegmentCurve(firstPoint, secondPoint) -> cad.Curve
Parameters
Returns
- Curve
Segment curve created from the two given points
createSurfacicCurve
Create a curve from a surface
cad.createSurfacicCurve(surface, curve2D) -> cad.Curve
Parameters
Returns
- Curve
Curve projected on given surface
createTransformedCurve
Create a curve from a surface
cad.createTransformedCurve(curve, matrix) -> cad.Curve
Parameters
Returns
- Curve
Curve transformed by the given matrix
invertCurve
Invert a curve parametricaly
cad.invertCurve(curve, precision) -> cad.Curve
Parameters
Returns
- Curve
The inverted curve
getFaceMaterial
get the material on a face
cad.getFaceMaterial(face) -> material.Material
Parameters
face
FaceThe face
Returns
- Material
The material
setFaceMaterial
set the material on a face
cad.setFaceMaterial(face, material)
Parameters
addBodyToModel
Add a body to the model
cad.addBodyToModel(body, model)
Parameters
addEdgeToModel
Add an edge to the model
cad.addEdgeToModel(edge, model)
Parameters
addOpenShellToModel
Add an open shell to the model
cad.addOpenShellToModel(shell, model)
Parameters
addVertexToModel
Add a vertex to the model
cad.addVertexToModel(vtx, model)
Parameters
buildFaces
Build faces from a surface and a set of loop
cad.buildFaces(surface, loopList) -> cad.FaceList, cad.SplittedEdgeList
Parameters
surface
SurfaceSurface used to build the faces
loopList
LoopListList of Loops used to build the faces
Returns
- FaceList
The created faces
createModel
Create a new model
cad.createModel() -> cad.Model
Returns
- Model
The created model
getAllModelFaces
Get all the face of a model recursively
cad.getAllModelFaces(model) -> cad.FaceList
Parameters
model
ModelModel
Returns
- FaceList
List of faces in the given model
getModelBodies
Get the list of bodies contained in a model
cad.getModelBodies(model) -> cad.BodyList
Parameters
model
ModelModel
Returns
- BodyList
List of bodies contained in the given model
getModelBoundaries
Get boundary edges of a model grouped by cycles
cad.getModelBoundaries(model) -> cad.EdgeListList
Parameters
model
ModelModel
Returns
- EdgeListList
List of boundary edges grouped by cycles in the given model
getModelEdges
Get the list of free edges contained in a model
cad.getModelEdges(model) -> cad.EdgeList
Parameters
model
ModelModel
Returns
- EdgeList
List of edges contained in the given model
getModelOpenShells
Get the list of open shells contained in a model
cad.getModelOpenShells(model) -> cad.OpenShellList
Parameters
model
ModelModel
Returns
- OpenShellList
List of open shells contained in the given model
getModelVertices
Get the list of free vertices contained in a model
cad.getModelVertices(model) -> cad.VertexList
Parameters
model
ModelModel
Returns
- VertexList
List of vertices contained in the given model
getReferencers
Returns the entities referencing a given CAD entity
cad.getReferencers(entity) -> core.EntityList
Parameters
entity
CADEntityCAD entity to get the referencers
Returns
- EntityList
List of CAD entities referencing the given entity
createBRepCone
Creates a BRep Cone whose axis is the Z axis centered on O
cad.createBRepCone(radius, height, matrix) -> cad.Body
Parameters
Returns
- Body
The created Body
createBRepCube
Creates a BRep Cube
cad.createBRepCube(size, matrix) -> cad.Body
Parameters
Returns
- Body
The created Body
createBRepCylinder
Creates a BRep Cylinder aligned on the Z axis centered on O
cad.createBRepCylinder(radius, length, matrix) -> cad.Body
Parameters
radius
DoubleCylinder radius
length
DoubleCylinder length
matrix
Matrix4Positionning matrix of the Cylinder
Returns
- Body
The created Body
createBRepPlane
Creates a BRep Plane whose normal is the Z axis centered on O
cad.createBRepPlane(length, width, matrix) -> cad.Body
Parameters
length
DoublePlane length (X axis)
width
DoublePlane width (Y axis)
matrix
Matrix4Positionning matrix of the Plane
Returns
- Body
The created Body
createBRepSphere
Creates a BRep Sphere centered on O and whose singularities are on the Z axis
cad.createBRepSphere(radius, matrix) -> cad.Body
Parameters
Returns
- Body
The created Body
createBRepTorus
Creates a BRep Torus whose axis is the Z axis centered on O
cad.createBRepTorus(majorRadius, minorRadius, matrix) -> cad.Body
Parameters
majorRadius
DoubleMajor radius
minorRadius
DoubleMinor radius
matrix
Matrix4Positionning matrix of the Torus
Returns
- Body
The created Body
createLegoBrick
Creates a BRep Lego brick
cad.createLegoBrick(brickDefinition) -> cad.Body
Parameters
brickDefinition
LegoBrickDefinitionThe definition of the wanted lego brick
Returns
- Body
The created Body
evalCurvatureOnCurve
evaluate curvature on a curve
cad.evalCurvatureOnCurve(curve, parameter) -> core.Double
Parameters
Returns
- Double
Curvature on curve at parameter
evalCurvatureOnSurface
evaluate main curvatures on a surface
cad.evalCurvatureOnSurface(surface, parameter) -> geom.Curvatures
Parameters
Returns
- Curvatures
Main curvatures on surface at parameter
evalOnCurve
evaluate a point and derivatives on a curve
cad.evalOnCurve(curve, parameter, derivation) -> geom.Point3, geom.Point3, geom.Point3
Parameters
curve
CurveThe curve
parameter
DoubleParameter to evaluate
derivation
IntDerivation level (0,1,2)
Returns
- Point3
D0
evalOnSurface
evaluate a point and derivatives on a surface
cad.evalOnSurface(surface, parameter, derivation) -> geom.Point3, geom.Point3, geom.Point3, geom.Point3, geom.Point3, geom.Point3
Parameters
surface
SurfaceThe surface
parameter
Point2Parameter to evaluate
derivation
IntDerivation level (0,1,2)
Returns
- Point3
D0
getBodyClosedShells
get all closedShells contain in the body
cad.getBodyClosedShells(body) -> cad.ClosedShellList
Parameters
body
BodyThe body
Returns
- ClosedShellList
The closedShells contain within the body
getCircleCurveDefinition
get all parameters contained in the circleCurve
cad.getCircleCurveDefinition(circleCurve) -> core.Double, geom.Matrix4
Parameters
circleCurve
CircleCurveThe circleCurve
Returns
- Double
The radius of the circle
getClosedShellOrientedFaces
get all orienteFaces contain in the closedShell
cad.getClosedShellOrientedFaces(closedShell) -> cad.OrientedFaceList
Parameters
closedShell
ClosedShellThe closedShell
Returns
- OrientedFaceList
The orientedFaces contain within the closedShell
getCoEdgeDefinition
get all parameters contained in the coEdge
cad.getCoEdgeDefinition(coEdge) -> cad.Edge, geom.Orientation, cad.Loop, cad.Surface, cad.Curve
Parameters
coEdge
CoEdgeThe coEdge
Returns
- Edge
The edge of the coEdge
getCompositeCurveDefinition
get all parameters contained in the compositeCurve
cad.getCompositeCurveDefinition(compositeCurve) -> cad.CurveList, core.DoubleList
Parameters
compositeCurve
CompositeCurveThe compositeCurve
Returns
- CurveList
The curves of the compositeCurve
getConeSurfaceDefinition
get all parameters contained in the coneSurface
cad.getConeSurfaceDefinition(coneSurface) -> core.Double, core.Double, geom.Matrix4
Parameters
coneSurface
ConeSurfaceThe coneSurface
Returns
- Double
The radius of the coneSurface
getCurveExtrusionSurfaceDefinition
get all parameters contained in the curveExtrusionSurface
cad.getCurveExtrusionSurfaceDefinition(curveExtrusionSurface) -> cad.Curve, cad.Curve, cad.Surface
Parameters
curveExtrusionSurface
CurveExtrusionSurfaceThe curveExtrusionSurface
Returns
- Curve
The generatrix curve of the curveExtrusionSurface
getCurveLimits
get the parametric space limits of a curve
cad.getCurveLimits(curve) -> cad.Bounds1D
Parameters
curve
CurveThe curve
Returns
- Bounds1D
Curve limits
getCylinderSurfaceDefinition
get all parameters contained in the cylinderSurface
cad.getCylinderSurfaceDefinition(cylinderSurface) -> core.Double, geom.Matrix4
Parameters
cylinderSurface
CylinderSurfaceThe cylinderSurface
Returns
- Double
The radius of the cylinderSurface
getEdgeDefinition
get all parameters contained in the edge
cad.getEdgeDefinition(edge) -> cad.Vertex, cad.Vertex, cad.Curve, cad.Bounds1D
Parameters
edge
EdgeThe edge
Returns
- Vertex
The first vertex of the edge
getEllipseCurveDefinition
get all parameters contained in the ellipseCurve
cad.getEllipseCurveDefinition(ellipseCurve) -> core.Double, core.Double, geom.Matrix4
Parameters
ellipseCurve
EllipseCurveThe ellipseCurve
Returns
- Double
The radius on x of the ellipse
getEllipticConeSurfaceDefinition
get all parameters contained in the ellipticConeSurface
cad.getEllipticConeSurfaceDefinition(ellipticConeSurface) -> core.Double, core.Double, core.Double, geom.Matrix4
Parameters
ellipticConeSurface
EllipticConeSurfaceThe EllipticConeSurface
Returns
- Double
The radius on X of the coneSurface
getFaceDefinition
get all parameters contain in the face
cad.getFaceDefinition(face) -> cad.Surface, cad.LoopList, geom.Orientation, cad.Bounds2D
Parameters
face
FaceThe face
Returns
- Surface
The surface contain within the face
getFaceParametricBoundaries
get parametric definition of each face loop
cad.getFaceParametricBoundaries(face) -> geom.Point2ListList
Parameters
face
FaceThe face
Returns
- Point2ListList
The parametric boundaries
getHelixCurveDefinition
get all parameters contained in the helixCurve
cad.getHelixCurveDefinition(helixCurve) -> core.Double, geom.Matrix4, core.Boolean
Parameters
helixCurve
HelixCurveThe helixCurve
Returns
- Double
The radius of the helixCurve
getHermiteCurveDefinition
get all parameters contained in the hermiteCurve
cad.getHermiteCurveDefinition(hermiteCurve) -> geom.Point3, geom.Point3, geom.Point3, geom.Point3
Parameters
hermiteCurve
HermiteCurveThe HermiteCurve
Returns
- Point3
The first point of the hermiteCurve
getHyperbolaCurveDefinition
get all parameters contained in the hyperbolaCurve
cad.getHyperbolaCurveDefinition(hyperbolaCurve) -> core.Double, core.Double, geom.Matrix4
Parameters
hyperbolaCurve
HyperbolaCurveThe hyperbolaCurve
Returns
- Double
The radius on x of the hyperbola
getIntersectionCurveDefinition
get all parameters contained in the intersectionCurve
cad.getIntersectionCurveDefinition(intersectionCurve) -> cad.Surface, cad.Surface, cad.PolylineCurve, cad.Bounds1D
Parameters
intersectionCurve
IntersectionCurveThe intersectionCurve
Returns
- Surface
The first surface of the intersectionCurve
getLineCurveDefinition
get all parameters contain in the lineCurve
cad.getLineCurveDefinition(lineCurve) -> geom.Point3, geom.Point3
Parameters
lineCurve
LineCurveThe lineCurve
Returns
- Point3
The origin of the lineCurve
getLoopCoEdges
get all coEdges contain in the loop
cad.getLoopCoEdges(loop) -> cad.CoEdgeList
Parameters
loop
LoopThe loop
Returns
- CoEdgeList
The coEdges contain within the loop
getNURBSCurveDefinition
get all parameters contained in the nurbsCurve
cad.getNURBSCurveDefinition(nurbsCurve) -> core.Int, core.DoubleList, geom.Point3List, core.DoubleList
Parameters
nurbsCurve
NURBSCurveThe nurbsCurve
Returns
- Int
The degree of the nurbsCurve
getNURBSSurfaceDefinition
get all parameters contained in the nurbsSurface
cad.getNURBSSurfaceDefinition(nurbsSurface) -> core.Int, core.Int, core.DoubleList, core.DoubleList, geom.Point3ListList, core.DoubleListList
Parameters
nurbsSurface
NURBSSurfaceThe nurbsSurface
Returns
- Int
The degree on U of the nurbsSurface
getOffsetCurveDefinition
get all parameters contained in the offsetCurve
cad.getOffsetCurveDefinition(offsetCurve) -> cad.Curve, geom.Point3, core.Double, cad.Surface
Parameters
offsetCurve
OffsetCurveThe offsetCurve
Returns
- Curve
The curve of the offsetCurve
getOffsetSurfaceDefinition
get all parameters contained in the offsetSurface
cad.getOffsetSurfaceDefinition(offsetSurface) -> cad.Surface, core.Double
Parameters
offsetSurface
OffsetSurfaceThe offsetSurface
Returns
- Surface
The initial surface
getOpenShellOrientedFaces
get all orienteFaces contain in the openShell
cad.getOpenShellOrientedFaces(openShell) -> cad.OrientedFaceList
Parameters
openShell
OpenShellThe openShell
Returns
- OrientedFaceList
The orientedFaces contain within the openShell
getParabolaCurveDefinition
get all parameters contained in the parabolaCurve
cad.getParabolaCurveDefinition(parabolaCurve) -> core.Double, geom.Matrix4
Parameters
parabolaCurve
ParabolaCurveThe parabolaCurve
Returns
- Double
The radius of the hyperbola
getPlaneSurfaceDefinition
get all parameters contained in the planeSurface
cad.getPlaneSurfaceDefinition(planeSurface) -> geom.Matrix4
Parameters
planeSurface
PlaneSurfaceThe planeSurface
Returns
- Matrix4
The transformation matrix of planeSurface
getPolylineCurveDefinition
get all parameters contained in the polylinCurve
cad.getPolylineCurveDefinition(polylineCurve) -> geom.Point3List, core.DoubleList
Parameters
polylineCurve
PolylineCurveThe polylineCurve
Returns
- Point3List
The points of the polylineCurve
getRevolutionSurfaceDefinition
get all parameters contained in the revolutionSurface
cad.getRevolutionSurfaceDefinition(revolutionSurface) -> cad.Curve, geom.Point3, geom.Point3, core.Double, core.Double
Parameters
revolutionSurface
RevolutionSurfaceThe revolutionSurface
Returns
- Curve
Thegeneratrix curve of the revolutionSurface
getRuledSurfaceDefinition
get all parameters contained in the ruledSurface
cad.getRuledSurfaceDefinition(ruledSurface) -> cad.Curve, cad.Curve
Parameters
ruledSurface
RuledSurfaceThe ruledSurface
Returns
- Curve
The first curve of the ruledSurface
getSegmentCurveDefinition
get all parameters contained in the segmentCurve
cad.getSegmentCurveDefinition(segmentCurve) -> geom.Point3, geom.Point3
Parameters
segmentCurve
SegmentCurveThe segmentCurve
Returns
- Point3
The first point of the segmentCurve
getSphereSurfaceDefinition
get all parameters contained in the sphereSurface
cad.getSphereSurfaceDefinition(sphereSurface) -> core.Double, geom.Matrix4
Parameters
sphereSurface
SphereSurfaceThe sphereSurface
Returns
- Double
The radius of the sphereSurface
getSurfaceLimits
get the parametric space limits of a surface
cad.getSurfaceLimits(surface) -> cad.Bounds2D
Parameters
surface
SurfaceThe surface
Returns
- Bounds2D
Surface limits
getSurfacicCurveDefinition
get all parameters contained in the surfacicCurve
cad.getSurfacicCurveDefinition(surfacicCurve) -> cad.Surface, cad.Curve
Parameters
surfacicCurve
SurfacicCurveThe surfacicCurve
Returns
- Surface
The surface of the surfacicCurve
getTabulatedCylinderSurfaceDefinition
get all parameters contained in the TabulatedCylinderSurface
cad.getTabulatedCylinderSurfaceDefinition(tabulatedCylinderSurface) -> cad.Curve, geom.Point3, cad.Bounds1D
Parameters
tabulatedCylinderSurface
TabulatedCylinderSurfaceThe tabulatedCylinderSurface
Returns
- Curve
The directrix curve of the tabulatedCylinderSurface
getTorusSurfaceDefinition
get all parameters contained in the torusSurface
cad.getTorusSurfaceDefinition(torusSurface) -> core.Double, core.Double, geom.Matrix4
Parameters
torusSurface
TorusSurfaceThe torusSurface
Returns
- Double
The major radius of the torusSurface
getTransformedCurveDefinition
get all parameters contained in the transformedCurve
cad.getTransformedCurveDefinition(transformedCurve) -> cad.Curve, geom.Matrix4
Parameters
transformedCurve
TransformedCurveThe transformedCurve
Returns
- Curve
The initial curve
getVertexPosition
get the position of the vertex
cad.getVertexPosition(vertex) -> geom.Point3
Parameters
vertex
VertexThe vertex
Returns
- Point3
The position of the vertex
invertOnCurve
invert a point to a curve
cad.invertOnCurve(curve, point, precision) -> core.Double
Parameters
Returns
- Double
The inversion parameter on the curve
invertOnSurface
invert a point to a surface
cad.invertOnSurface(surface, point, precision) -> geom.Point2
Parameters
Returns
- Point2
The inversion parameter on the surface
isCurveClosed
if the curve is closed, return true, return false otherwise
cad.isCurveClosed(curve) -> core.Boolean
Parameters
curve
CurveThe curve
Returns
- Boolean
The value
isCurveFinite
if the curve is finite return true, return false otherwise
cad.isCurveFinite(curve) -> core.Boolean
Parameters
curve
CurveThe curve
Returns
- Boolean
The value
isCurvePeriodic
if the curve is periodic return true, return false otherwise
cad.isCurvePeriodic(curve) -> core.Boolean, core.Double
Parameters
curve
CurveThe curve
Returns
- Boolean
The value
isSurfaceClosed
return if the surface is closed on U or on V
cad.isSurfaceClosed(surface) -> core.Boolean, core.Boolean
Parameters
surface
SurfaceThe surface
Returns
- Boolean
The value on U
isSurfacePeriodic
return if the surface is periodic on U or on V
cad.isSurfacePeriodic(surface) -> core.Boolean, core.Boolean, core.Double, core.Double
Parameters
surface
SurfaceThe surface
Returns
- Boolean
The value on U
projectOnCurve
project a point to a curve
cad.projectOnCurve(curve, point, precision) -> core.Double
Parameters
Returns
- Double
The projection parameter on the curve
projectOnSurface
project a point to a surface
cad.projectOnSurface(surface, point, precision) -> geom.Point2
Parameters
Returns
- Point2
The projection parameter on the surface
setCoEdgeCurve2D
Set the curve 2D value of a coEdge
cad.setCoEdgeCurve2D(coEdge, curve2D)
Parameters
setCoEdgeSurface
Set the surface value of a coEdge
cad.setCoEdgeSurface(coEdge, surface)
Parameters
setCurveLimits
set the parametric space limits of a curve
cad.setCurveLimits(curve, limits)
Parameters
createBody
Create a body from a surface
cad.createBody(outerShell, innerShells) -> cad.Body
Parameters
outerShell
ClosedShellClosedShell used to create the body
innerShells
ClosedShellListList of closedShell used to create the body
Returns
- Body
The created body
createClosedShell
Create a closedShell from a set of faces of a set of orientations
cad.createClosedShell(faces, orientations) -> cad.ClosedShell
Parameters
faces
FaceListList of faces composing the closedShell
orientations
OrientationListList of orientations for each face
Returns
- ClosedShell
The created closedShell
createCoEdge
Create an coEdge with a edge and an orientation
cad.createCoEdge(edge, orientation, surface, curve2D) -> cad.CoEdge
Parameters
edge
EdgeEdge used to create the coEdge
orientation
OrientationOrientation of the edge regarding the loop
surface
SurfaceThe surface trimmed by the edge
curve2D
CurveSurfacic curve of the edge on the surface trimmed
Returns
- CoEdge
The created edge
createEdge
Create an edge with a curve an extremity vertices
cad.createEdge(curve, startVertex, endVertex) -> cad.Edge
Parameters
curve
CurveCurve used to create the edge
startVertex
VertexThe start vertex
endVertex
VertexThe end vertex
Returns
- Edge
The created edge
createEdgeFromCurve
Create an edge from a limited curve
cad.createEdgeFromCurve(curve) -> cad.Edge
Parameters
curve
CurveLimited curve used to create the edge
Returns
- Edge
The created edge
createFace
Create a face from a surface
cad.createFace(surface, loopList, useSurfaceOrientation) -> cad.Face
Parameters
surface
SurfaceSurface used to create the face
loopList
LoopListList of Loops used to create the face
useSurfaceOrientation
BooleanIf True, the face will have the same orientation than the surface and loops will be inverted if they are inconsistent
Returns
- Face
The created face
createLoop
Create a loop from a set of edges of a set of orientations
cad.createLoop(coEdges, check) -> cad.Loop
Parameters
coEdges
CoEdgeListList of coEdges composing the loop
check
BooleanIf true, the loop check if edges are well connected or not
Returns
- Loop
The created loop
createOpenShell
Create a openShell from a set of faces of a set of orientations and set of loops
cad.createOpenShell(faces, orientations) -> cad.OpenShell
Parameters
faces
FaceListList of faces composing the openShell
orientations
OrientationListList of orientations for each face
Returns
- OpenShell
The created openShell
createVertex
Create a vertex from a position
cad.createVertex(position) -> cad.Vertex
Parameters
position
Point3Vertex position
Returns
- Vertex
The created vertex
createBezierSurface
Create a new bezier surface
cad.createBezierSurface(degreeU, degreeV, poles) -> cad.Surface
Parameters
degreeU
IntU degree
degreeV
IntV degree
poles
Point3ListPoles list
Returns
- Surface
The new Bezier surface
createConeSurface
Create a new cone surface
cad.createConeSurface(radius, semiAngle, matrix) -> cad.Surface
Parameters
radius
DistanceRadius of the cone at origin
semiAngle
AngleSemi-angle of the cone
matrix
Matrix4Positionning matrix of the cone
Returns
- Surface
The new cone surface
createCurveExtrusionSurface
Create a new curveExtrusion surface
cad.createCurveExtrusionSurface(generatrixCurve, directrixCurve, refSurface, precision) -> cad.Surface
Parameters
generatrixCurve
CurveThe generatrix curve
directrixCurve
CurveThe directrix curve
refSurface
SurfaceThe reference surface
precision
DoubleThe precision for the evaluation of points
Returns
- Surface
The new curveExtrusion surface
createCylinderSurface
Create a new cylinder surface
cad.createCylinderSurface(radius, matrix) -> cad.Surface
Parameters
Returns
- Surface
The new cylinder surface
createEllipticConeSurface
Create a new elliptic cone surface
cad.createEllipticConeSurface(radius1, radius2, semiAngle, matrix) -> cad.Surface
Parameters
radius1
DistanceRadius of the cone at origin on the X axis
radius2
DistanceRadius of the cone at origin on the Y axis
semiAngle
AngleSemi-angle of the cone
matrix
Matrix4Positionning matrix of the cone
Returns
- Surface
The new elliptic cone surface
createNURBSSurface
Create a new NURBS surface
cad.createNURBSSurface(degreeU, degreeV, knotsU, knotsV, poles, weights) -> cad.Surface
Parameters
degreeU
IntU degree
degreeV
IntV degree
knotsU
DoubleListKnots on U
knotsV
DoubleListKnots on V
poles
Point3ListPoles list
weights
DoubleListWeights list
Returns
- Surface
The new NURBS surface
createOffsetSurface
Create a new offset surface
cad.createOffsetSurface(baseSurface, distance) -> cad.Surface
Parameters
Returns
- Surface
The new offset surface
createPlaneSurface
Create a new plane surface
cad.createPlaneSurface(matrix) -> cad.Surface
Parameters
matrix
Matrix4Positionning matrix of the plane
Returns
- Surface
The new plane surface
createRevolutionSurface
Create a new revolution surface
cad.createRevolutionSurface(generatrixCurve, axisOrigin, axisDirection, startAngle, endAngle) -> cad.Surface
Parameters
generatrixCurve
CurveGeneratrix curve rotated to create the revolution surface
axisOrigin
Point3Axis origin point
axisDirection
Vector3Axis direction vector
startAngle
AngleStart angle of the revolution surface
endAngle
AngleEnd angle of the revolution surface
Returns
- Surface
Revolution surface generated by rotating the given curve around the axis
createRuledSurface
Create a new ruled surface
cad.createRuledSurface(firstCurve, secondCurve) -> cad.Surface
Parameters
Returns
- Surface
The new ruled surface
createSphereSurface
Create a new sphere surface
cad.createSphereSurface(radius, matrix) -> cad.Surface
Parameters
Returns
- Surface
The new sphere surface
createTabulatedCylinderSurface
Create a new tabulated cylinder surface
cad.createTabulatedCylinderSurface(directrixCurve, GeneratixLine, minRange, maxRange) -> cad.Surface
Parameters
directrixCurve
CurveDirectrix Curve
GeneratixLine
Point3Generatrix Line
minRange
DistanceMinimimum value of the range
maxRange
DistanceMaximum value of the range
Returns
- Surface
The new tabulated cylinder surface
createTorusSurface
Create a new torus surface
cad.createTorusSurface(radiusMax, radiusMin, matrix) -> cad.Surface
Parameters
radiusMax
DistanceMajor radius
radiusMin
DistanceMinor radius
matrix
Matrix4Positionning matrix of the sphere
Returns
- Surface
The new torus surface