Table of Contents

Class CAD

Namespace
CAD

Methods

configureFunctionLogger

cad.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)

Parameters

functionName String
enableFunction Boolean
enableParameters Boolean
enableExecutionTime Boolean

setPrecision

Set the CAD precision

cad.setPrecision(precision=0.01)

Parameters

precision Distance

CAD precision

solidIntersection

perform boolean operation intersection on two bodies (A ^ B)

cad.solidIntersection(A, B) -> cad.BodyList

Parameters

A Body

The first body

B Body

The second body

Returns

BodyList

List of resulting bodies

solidSubtraction

perform boolean operation subtraction on two bodies (A - B)

cad.solidSubtraction(A, B) -> cad.BodyList

Parameters

A Body

The first body

B Body

The second body

Returns

BodyList

List of resulting bodies

solidUnion

perform boolean operation union on two bodies (A + B)

cad.solidUnion(A, B) -> cad.BodyList

Parameters

A Body

The first body

B Body

The second body

Returns

BodyList

List of resulting bodies

createBezierCurve

Create a Bezier curve

cad.createBezierCurve(poles) -> cad.Curve

Parameters

poles Point3List

Poles list

Returns

Curve

Bezier curve

createCircleCurve

Create a new circle

cad.createCircleCurve(radius, matrix) -> cad.Curve

Parameters

radius Distance

Circle radius

matrix Matrix4

Transformation matrix

Returns

Curve

Generated circle curve

createCompositeCurve

Create a composite curve from a list of limited curves

cad.createCompositeCurve(CurveList) -> cad.Curve

Parameters

CurveList CurveList

List 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 Distance

Cosinus amplitude

Offset Distance

Cosinus offset

Period Distance

Cosinus period

matrix Matrix4

Transformation matrix

Returns

Curve

Cosinus curve

createEllipseCurve

Create an ellipse curve

cad.createEllipseCurve(URadius, VRadius, matrix) -> cad.Curve

Parameters

URadius Distance

Ellipse radius in u direction

VRadius Distance

Ellipse radius in v direction

matrix Matrix4

Transformation matrix

Returns

Curve

Ellipse curve

createHelixCurve

Create an helix curve

cad.createHelixCurve(radius, pitch, matrix, trigonometrixOrientation) -> cad.Curve

Parameters

radius Distance

Radius of the helix

pitch Distance

Height of one revolution

matrix Matrix4

Transformation matrix

trigonometrixOrientation Boolean

Orientation of the rotation

Returns

Curve

Helix curve

createHermiteCurve

Create a Hermite Curve

cad.createHermiteCurve(FirstPoint, FirstTangent, SecondPoint, SecondTangent) -> cad.Curve

Parameters

FirstPoint Point3

Starting point of the curve

FirstTangent Point3

Tangent of the starting point

SecondPoint Point3

Ending point of the curve

SecondTangent Point3

Tangent of the ending point

Returns

Curve

Hermite curve

createHyperbolaCurve

Create an hyperBola curve

cad.createHyperbolaCurve(URadius, VRadius, matrix) -> cad.Curve

Parameters

URadius Double

Hyperbola radius in u direction

VRadius Double

Hyperbola radius in v direction

matrix Matrix4

Transformation matrix

Returns

Curve

Hyperbola curve

createIntersectionCurve

Create a Intersection Curve

cad.createIntersectionCurve(firstSurface, secondSurface, chart, minBounds, maxBounds) -> cad.Curve

Parameters

firstSurface Surface

First surface of the intersection curve

secondSurface Surface

Second surface of the intersection curve

chart PolylineCurve

Direction curve of the intersection curve

minBounds Double

Minimum value of the bounds of the intersection curve

maxBounds Double

Maximum 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 Point3

Orinin point of the line curve

DirectionPt Point3

Direction vector of the line curve

Returns

Curve

Line curve

createNURBSCurve

Create a NURBS curve

cad.createNURBSCurve(degree, knots, poles, weights) -> cad.Curve

Parameters

degree Int

Degree of the curve

knots DoubleList

Knots of the curve

poles Point3List

Poles list

weights DoubleList

Weight list

Returns

Curve

NURBS curve

createParabolaCurve

Create an parabola curve

cad.createParabolaCurve(focalLength, matrix) -> cad.Curve

Parameters

focalLength Double

Focal lecngth of the parabola

matrix Matrix4

Transformation matrix

Returns

Curve

Parabola curve

createPolylineCurve

Create a Polyline curve

cad.createPolylineCurve(points) -> cad.Curve

Parameters

points Point3List

Points of polyline curve

Returns

Curve

Polyline curve

createSegmentCurve

Create a segment curve from two given points

cad.createSegmentCurve(firstPoint, secondPoint) -> cad.Curve

Parameters

firstPoint Point3

First point

secondPoint Point3

Second point

Returns

Curve

Segment curve created from the two given points

createSurfacicCurve

Create a curve from a surface

cad.createSurfacicCurve(surface, curve2D) -> cad.Curve

Parameters

surface Surface

Surface to bound

curve2D Curve

Curve to project

Returns

Curve

Curve projected on given surface

createTransformedCurve

Create a curve from a surface

cad.createTransformedCurve(curve, matrix) -> cad.Curve

Parameters

curve Curve

Curve to transform

matrix Matrix4

Matrix of the transformation

Returns

Curve

Curve transformed by the given matrix

invertCurve

Invert a curve parametricaly

cad.invertCurve(curve, precision) -> cad.Curve

Parameters

curve Curve

The curve to invert

precision Double

The precision used to invert the curve

Returns

Curve

The inverted curve

getFaceMaterial

get the material on a face

cad.getFaceMaterial(face) -> material.Material

Parameters

face Face

The face

Returns

Material

The material

setFaceMaterial

set the material on a face

cad.setFaceMaterial(face, material)

Parameters

face Face

The face

material Material

The material

addBodyToModel

Add a body to the model

cad.addBodyToModel(body, model)

Parameters

body Body

Body added to the model

model Model

Model

addEdgeToModel

Add an edge to the model

cad.addEdgeToModel(edge, model)

Parameters

edge Edge

Edge added to the model

model Model

Model

addOpenShellToModel

Add an open shell to the model

cad.addOpenShellToModel(shell, model)

Parameters

shell OpenShell

Open shell added to the model

model Model

Model

addVertexToModel

Add a vertex to the model

cad.addVertexToModel(vtx, model)

Parameters

vtx Vertex

Vertex added to the model

model Model

Model

buildFaces

Build faces from a surface and a set of loop

cad.buildFaces(surface, loopList) -> cad.FaceList, cad.SplittedEdgeList

Parameters

surface Surface

Surface used to build the faces

loopList LoopList

List 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 Model

Model

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 Model

Model

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 Model

Model

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 Model

Model

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 Model

Model

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 Model

Model

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 CADEntity

CAD 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

radius Double

Cone radius

height Double

Cone height

matrix Matrix4

Positionning matrix of the Cone

Returns

Body

The created Body

createBRepCube

Creates a BRep Cube

cad.createBRepCube(size, matrix) -> cad.Body

Parameters

size Double

Side length

matrix Matrix4

Positionning matrix of the Cube

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 Double

Cylinder radius

length Double

Cylinder length

matrix Matrix4

Positionning 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 Double

Plane length (X axis)

width Double

Plane width (Y axis)

matrix Matrix4

Positionning 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

radius Double

Sphere radius

matrix Matrix4

Positionning matrix of the Sphere

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 Double

Major radius

minorRadius Double

Minor radius

matrix Matrix4

Positionning matrix of the Torus

Returns

Body

The created Body

createLegoBrick

Creates a BRep Lego brick

cad.createLegoBrick(brickDefinition) -> cad.Body

Parameters

brickDefinition LegoBrickDefinition

The definition of the wanted lego brick

Returns

Body

The created Body

evalCurvatureOnCurve

evaluate curvature on a curve

cad.evalCurvatureOnCurve(curve, parameter) -> core.Double

Parameters

curve Curve

The curve

parameter Double

Parameter to evaluate

Returns

Double

Curvature on curve at parameter

evalCurvatureOnSurface

evaluate main curvatures on a surface

cad.evalCurvatureOnSurface(surface, parameter) -> geom.Curvatures

Parameters

surface Surface

The surface

parameter Point2

Parameter to evaluate

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 Curve

The curve

parameter Double

Parameter to evaluate

derivation Int

Derivation 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 Surface

The surface

parameter Point2

Parameter to evaluate

derivation Int

Derivation level (0,1,2)

Returns

Point3

D0

getBodyClosedShells

get all closedShells contain in the body

cad.getBodyClosedShells(body) -> cad.ClosedShellList

Parameters

body Body

The 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 CircleCurve

The circleCurve

Returns

Double

The radius of the circle

getClosedShellOrientedFaces

get all orienteFaces contain in the closedShell

cad.getClosedShellOrientedFaces(closedShell) -> cad.OrientedFaceList

Parameters

closedShell ClosedShell

The 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 CoEdge

The 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 CompositeCurve

The 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 ConeSurface

The 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 CurveExtrusionSurface

The 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 Curve

The curve

Returns

Bounds1D

Curve limits

getCylinderSurfaceDefinition

get all parameters contained in the cylinderSurface

cad.getCylinderSurfaceDefinition(cylinderSurface) -> core.Double, geom.Matrix4

Parameters

cylinderSurface CylinderSurface

The 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 Edge

The 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 EllipseCurve

The 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 EllipticConeSurface

The 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 Face

The face

Returns

Surface

The surface contain within the face

getFaceParametricBoundaries

get parametric definition of each face loop

cad.getFaceParametricBoundaries(face) -> geom.Point2ListList

Parameters

face Face

The 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 HelixCurve

The 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 HermiteCurve

The 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 HyperbolaCurve

The 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 IntersectionCurve

The 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 LineCurve

The lineCurve

Returns

Point3

The origin of the lineCurve

getLoopCoEdges

get all coEdges contain in the loop

cad.getLoopCoEdges(loop) -> cad.CoEdgeList

Parameters

loop Loop

The 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 NURBSCurve

The 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 NURBSSurface

The 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 OffsetCurve

The 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 OffsetSurface

The offsetSurface

Returns

Surface

The initial surface

getOpenShellOrientedFaces

get all orienteFaces contain in the openShell

cad.getOpenShellOrientedFaces(openShell) -> cad.OrientedFaceList

Parameters

openShell OpenShell

The 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 ParabolaCurve

The parabolaCurve

Returns

Double

The radius of the hyperbola

getPlaneSurfaceDefinition

get all parameters contained in the planeSurface

cad.getPlaneSurfaceDefinition(planeSurface) -> geom.Matrix4

Parameters

planeSurface PlaneSurface

The 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 PolylineCurve

The 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 RevolutionSurface

The 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 RuledSurface

The 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 SegmentCurve

The 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 SphereSurface

The sphereSurface

Returns

Double

The radius of the sphereSurface

getSurfaceLimits

get the parametric space limits of a surface

cad.getSurfaceLimits(surface) -> cad.Bounds2D

Parameters

surface Surface

The surface

Returns

Bounds2D

Surface limits

getSurfacicCurveDefinition

get all parameters contained in the surfacicCurve

cad.getSurfacicCurveDefinition(surfacicCurve) -> cad.Surface, cad.Curve

Parameters

surfacicCurve SurfacicCurve

The 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 TabulatedCylinderSurface

The 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 TorusSurface

The 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 TransformedCurve

The transformedCurve

Returns

Curve

The initial curve

getVertexPosition

get the position of the vertex

cad.getVertexPosition(vertex) -> geom.Point3

Parameters

vertex Vertex

The vertex

Returns

Point3

The position of the vertex

invertOnCurve

invert a point to a curve

cad.invertOnCurve(curve, point, precision) -> core.Double

Parameters

curve Curve

The curve

point Point3

The point to invert

precision Double

Inversion precision

Returns

Double

The inversion parameter on the curve

invertOnSurface

invert a point to a surface

cad.invertOnSurface(surface, point, precision) -> geom.Point2

Parameters

surface Surface

The surface

point Point3

The point to invert

precision Double

Inversion precision

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 Curve

The curve

Returns

Boolean

The value

isCurveFinite

if the curve is finite return true, return false otherwise

cad.isCurveFinite(curve) -> core.Boolean

Parameters

curve Curve

The 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 Curve

The 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 Surface

The 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 Surface

The surface

Returns

Boolean

The value on U

projectOnCurve

project a point to a curve

cad.projectOnCurve(curve, point, precision) -> core.Double

Parameters

curve Curve

The curve

point Point3

The point to project

precision Double

Projection precision

Returns

Double

The projection parameter on the curve

projectOnSurface

project a point to a surface

cad.projectOnSurface(surface, point, precision) -> geom.Point2

Parameters

surface Surface

The surface

point Point3

The point to project

precision Double

Projection precision

Returns

Point2

The projection parameter on the surface

setCoEdgeCurve2D

Set the curve 2D value of a coEdge

cad.setCoEdgeCurve2D(coEdge, curve2D)

Parameters

coEdge CoEdge

The coEdge

curve2D Curve

The new curve 2D

setCoEdgeSurface

Set the surface value of a coEdge

cad.setCoEdgeSurface(coEdge, surface)

Parameters

coEdge CoEdge

The coEdge

surface Surface

The new surface

setCurveLimits

set the parametric space limits of a curve

cad.setCurveLimits(curve, limits)

Parameters

curve Curve

The curve

limits Bounds1D

Curve limits

createBody

Create a body from a surface

cad.createBody(outerShell, innerShells) -> cad.Body

Parameters

outerShell ClosedShell

ClosedShell used to create the body

innerShells ClosedShellList

List 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 FaceList

List of faces composing the closedShell

orientations OrientationList

List 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 Edge

Edge used to create the coEdge

orientation Orientation

Orientation of the edge regarding the loop

surface Surface

The surface trimmed by the edge

curve2D Curve

Surfacic 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 Curve

Curve used to create the edge

startVertex Vertex

The start vertex

endVertex Vertex

The end vertex

Returns

Edge

The created edge

createEdgeFromCurve

Create an edge from a limited curve

cad.createEdgeFromCurve(curve) -> cad.Edge

Parameters

curve Curve

Limited 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 Surface

Surface used to create the face

loopList LoopList

List of Loops used to create the face

useSurfaceOrientation Boolean

If 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 CoEdgeList

List of coEdges composing the loop

check Boolean

If 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 FaceList

List of faces composing the openShell

orientations OrientationList

List of orientations for each face

Returns

OpenShell

The created openShell

createVertex

Create a vertex from a position

cad.createVertex(position) -> cad.Vertex

Parameters

position Point3

Vertex position

Returns

Vertex

The created vertex

createBezierSurface

Create a new bezier surface

cad.createBezierSurface(degreeU, degreeV, poles) -> cad.Surface

Parameters

degreeU Int

U degree

degreeV Int

V degree

poles Point3List

Poles list

Returns

Surface

The new Bezier surface

createConeSurface

Create a new cone surface

cad.createConeSurface(radius, semiAngle, matrix) -> cad.Surface

Parameters

radius Distance

Radius of the cone at origin

semiAngle Angle

Semi-angle of the cone

matrix Matrix4

Positionning 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 Curve

The generatrix curve

directrixCurve Curve

The directrix curve

refSurface Surface

The reference surface

precision Double

The 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

radius Distance

Radius of the cylinder

matrix Matrix4

Positionning matrix of the cylinder

Returns

Surface

The new cylinder surface

createEllipticConeSurface

Create a new elliptic cone surface

cad.createEllipticConeSurface(radius1, radius2, semiAngle, matrix) -> cad.Surface

Parameters

radius1 Distance

Radius of the cone at origin on the X axis

radius2 Distance

Radius of the cone at origin on the Y axis

semiAngle Angle

Semi-angle of the cone

matrix Matrix4

Positionning 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 Int

U degree

degreeV Int

V degree

knotsU DoubleList

Knots on U

knotsV DoubleList

Knots on V

poles Point3List

Poles list

weights DoubleList

Weights list

Returns

Surface

The new NURBS surface

createOffsetSurface

Create a new offset surface

cad.createOffsetSurface(baseSurface, distance) -> cad.Surface

Parameters

baseSurface Surface

The base surface

distance Double

The offset distance

Returns

Surface

The new offset surface

createPlaneSurface

Create a new plane surface

cad.createPlaneSurface(matrix) -> cad.Surface

Parameters

matrix Matrix4

Positionning 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 Curve

Generatrix curve rotated to create the revolution surface

axisOrigin Point3

Axis origin point

axisDirection Vector3

Axis direction vector

startAngle Angle

Start angle of the revolution surface

endAngle Angle

End 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

firstCurve Curve

First Curve

secondCurve Curve

Seconde Curve

Returns

Surface

The new ruled surface

createSphereSurface

Create a new sphere surface

cad.createSphereSurface(radius, matrix) -> cad.Surface

Parameters

radius Distance

Radius of the sphere

matrix Matrix4

Positionning matrix of the sphere

Returns

Surface

The new sphere surface

createTabulatedCylinderSurface

Create a new tabulated cylinder surface

cad.createTabulatedCylinderSurface(directrixCurve, GeneratixLine, minRange, maxRange) -> cad.Surface

Parameters

directrixCurve Curve

Directrix Curve

GeneratixLine Point3

Generatrix Line

minRange Distance

Minimimum value of the range

maxRange Distance

Maximum 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 Distance

Major radius

radiusMin Distance

Minor radius

matrix Matrix4

Positionning matrix of the sphere

Returns

Surface

The new torus surface