GO2cam Javascript API  6.11
GO2SSolid Class Reference

Class managing solid (BRep) geometry. More...

Inheritance diagram for GO2SSolid:
T_GO2SSolid< TShape, TExtrusion, TRevol, TBool, TFaceCompute > GO2SSolidGeometry GO2SGeometry

Public Member Functions

GO2SEnum::GO2SError ApplyChamfer (Array< GO2SEdge > edges, Number len, Boolean tg_propagate=false)
 
GO2SEnum::GO2SError ApplyFillet (Array< GO2SEdge > edges, Number radius, Boolean tg_propagate=false)
 
GO2SEnum::GO2SError CreateExtrusion (GO2SProfile profile, GO2SXYZ direction, Number height, Number taperAngle, Boolean surfacic)
 
GO2SEnum::GO2SError CreateLofting (Array< GO2SProfile > profiles, Boolean periodic, Boolean surfacic)
 
GO2SEnum::GO2SError CreateMultiExtrusion (Array< GO2SProfile > profiles, GO2SXYZ direction, Number height, Number taperAngle, Boolean surfacic)
 
GO2SEnum::GO2SError CreateOffsetFace (GO2SFace face, Number len)
 
GO2SGeometry ExtractEdge (GO2SEdge edge, Number tol=0.01) override
 Extract a curve from an edge of a solid.
 
GO2SEdge FindEdgeNear (GO2SXYZ pt, Number tol=0.01)
 
Array< GO2SEdgeGetEdges ()
 
Array< GO2SFaceGetFaces ()
 
GO2SEnum::GO2SError Intersection (GO2SSolid other)
 
GO2SEnum::GO2SError MultiIntersection (Array< GO2SSolid > others)
 
GO2SEnum::GO2SError MultiSubtract (Array< GO2SSolid > others)
 
GO2SEnum::GO2SError MultiSubtractHoles (Array< GO2SHole > holes)
 Subtract holes to the solid.
 
GO2SEnum::GO2SError MultiUnion (Array< GO2SSolid > others)
 
GO2SEnum::GO2SError Subtract (GO2SSolid other)
 
GO2SEnum::GO2SError SubtractHole (GO2SHole hole)
 Subtract a hole to the solid.
 
GO2SEnum::GO2SError ToFile (String dir, String name)
 
GO2SEnum::GO2SError ToFile (String filename)
 
GO2SMesh ToMesh (Number tol=0.1) override
 Convert a solid into a mesh according to a given tolerance.
 
GO2SEnum::GO2SError Union (GO2SSolid other)
 
- Public Member Functions inherited from T_GO2SSolid< TShape, TExtrusion, TRevol, TBool, TFaceCompute >
GO2SEnum::GO2SError CreateCone (GO2SXYZ center, Number radiusBase, Number radiusTop, Number height)
 
GO2SEnum::GO2SError CreateCuboid (GO2SXYZ Org, GO2SXYZ ptX, GO2SXYZ ptY, Number h)
 
GO2SEnum::GO2SError CreateCylinder (GO2SXYZ center, Number radius, Number height)
 
GO2SEnum::GO2SError CreateFace (GO2SProfile prf)
 
GO2SEnum::GO2SError CreateMultiRevolution (Array< GO2SProfile > profiles, GO2SXYZ axis, Number angle, Boolean surfacic)
 
GO2SEnum::GO2SError CreateRevolution (GO2SProfile profile, GO2SXYZ axis, Number angle, Boolean surfacic)
 
GO2SEnum::GO2SError CreateSphere (GO2SXYZ center, Number radius)
 
GO2SEnum::GO2SError CreateTorus (GO2SXYZ center, Number radius, Number height)
 
- Public Member Functions inherited from GO2SSolidGeometry
GO2SMultipleGeometry CreateSilhouette (GO2SXYZ direction, Number altitude, Number tolerance=0.01)
 
GO2SMultipleGeometry CreateSilhouetteRevolution (GO2SXYZ direction, GO2SEnum::GO2SSilhouetteType type, Number tolerance)
 Given a direction, creates a revolution silhouette from a Solid.
 
GO2SMultipleGeometry CreateSlice (GO2SXYZ direction, Number altitude, Number tolerance=0.01)
 Given a direction, creates a slice on the solid at a given altitude.
 
GO2SGeometry ExtractEdge (GO2SEdge edge, Number tol=0.01)
 Extract a curve from an edge of a solid.
 
GO2SXYZ GetExtrema (GO2SXYZ dir1, GO2SXYZ dir2, GO2SXYZ dir3)
 
GO2SMatrix GetPrincipalAxes ()
 
Number GetSurface ()
 
Number GetVolume ()
 
GO2SMesh ToMesh (Number tol=0.1)
 
- Public Member Functions inherited from GO2SGeometry
GO2SEnum::GO2SError ChangePlane (Number plane)
 
GO2SGeometry Copy ()
 
GO2SEnum::GO2SError Delete ()
 
Array< GO2SXYZDiscretize (Number accuracy=0.01)
 
Boolean Equals (GO2SGeometry other)
 
Array< GO2SXYZGetBoundingBox ()
 
Number GetColor ()
 
Array< GO2SEnum::GO2SParamGetEditableParams ()
 
Number GetLayer ()
 
Number GetLineType ()
 
Number GetLineWidth ()
 
String GetName ()
 
Number GetParam (GO2SEnum::GO2SParam param)
 
GO2SGeometry GetParent ()
 
Number GetPlane ()
 
GO2SXYZ GetPosition ()
 
Boolean IsCircular ()
 
Boolean IsLinear ()
 
Boolean IsMesh ()
 
Boolean IsParamEditable (GO2SEnum::GO2SParam param)
 
Boolean IsPoint ()
 
Boolean IsPositionEditable ()
 
Boolean IsSolid ()
 
Boolean IsValid ()
 
Boolean IsVisible ()
 
Boolean IsWireframe ()
 
GO2SGeometry Rotated (GO2SXYZ xyz, Number angle, Boolean xyzDir)
 
GO2SEnum::GO2SError SetColor (Number color)
 
GO2SEnum::GO2SError SetLayer (Number layer)
 
GO2SEnum::GO2SError SetLineType (ELineType type)
 
GO2SEnum::GO2SError SetLineWidth (Number width)
 
GO2SEnum::GO2SError SetName (String p1)
 
GO2SEnum::GO2SError SetParam (GO2SEnum::GO2SParam param, Number value)
 
GO2SEnum::GO2SError SetPlane (Number plane)
 
GO2SEnum::GO2SError SetPolarPosition (Number radius, Number angle, Number altitude=0)
 
GO2SEnum::GO2SError SetPosition (GO2SXYZpos)
 
GO2SEnum::GO2SError SetPosition (Number x, Number y, Number z)
 
GO2SEnum::GO2SError SetVisible (Boolean visibility)
 
String toString ()
 
GO2SEnum::GO2SError Transform (GO2SMatrix matrix)
 
GO2SGeometry Transformed (GO2SMatrix matrix)
 
GO2SGeometry Translated (GO2SXYZ origin, GO2SXYZ p)
 

Detailed Description

Class managing solid (BRep) geometry.

Member Function Documentation

◆ ApplyChamfer()

GO2SEnum::GO2SError GO2SSolid::ApplyChamfer ( Array< GO2SEdge > edges,
Number len,
Boolean tg_propagate = false )

Create chamfers on the solid.

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Version
6.11.204
Parameters
[in]edgesthe edges on which we apply the chamfer
[in]lensymetrical distance of the chamfer
[in]tg_propagateif true, propagate the fillet creation in tangency

◆ ApplyFillet()

GO2SEnum::GO2SError GO2SSolid::ApplyFillet ( Array< GO2SEdge > edges,
Number radius,
Boolean tg_propagate = false )

Create fillets on the solid.

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Version
6.11.204
Parameters
[in]edgesthe edges on which we apply the fillet
[in]radiusradius of the fillet
[in]tg_propagateif true, propagate the fillet creation in tangency

◆ CreateExtrusion()

GO2SEnum::GO2SError GO2SSolid::CreateExtrusion ( GO2SProfile profile,
GO2SXYZ direction,
Number height,
Number taperAngle,
Boolean surfacic )
inline

Create an extrusion from a profile

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]profilethe profile to extrude
[in]directionthe extrusion direction
[in]heightthe height of the cylinder
[in]taperAngletaper angle in degree
[in]surfacicif the extrusion is surfacic

◆ CreateLofting()

GO2SEnum::GO2SError GO2SSolid::CreateLofting ( Array< GO2SProfile > profiles,
Boolean periodic,
Boolean surfacic )

Create a lofting from several profiles.

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]profilesthe profiles to loft
[in]periodicif the loft is periodic
[in]surfacicif the loft is surfacic

◆ CreateMultiExtrusion()

GO2SEnum::GO2SError GO2SSolid::CreateMultiExtrusion ( Array< GO2SProfile > profiles,
GO2SXYZ direction,
Number height,
Number taperAngle,
Boolean surfacic )
inline

Create an extrusion from several profiles. The profiles are automatically ordered in pockets and Islands so that profiles inside another profile are considered as islands and will create holes

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]profilesthe profiles to extrude
[in]directionthe extrusion direction
[in]heightthe height of the cylinder
[in]taperAngletaper angle in degree
[in]surfacicif the extrusion is surfacic

◆ CreateOffsetFace()

GO2SEnum::GO2SError GO2SSolid::CreateOffsetFace ( GO2SFace face,
Number len )

Create a face. The function creates a new solid (1 face solid)

Version
6.11.204
Parameters
[in]facethe face to offset
[in]lenthe offset distance

◆ ExtractEdge()

GO2SGeometry GO2SSolid::ExtractEdge ( GO2SEdge edge,
Number tol = 0.01 )
override

Extract a curve from an edge of a solid.

Parameters
[in]edge
[in]tolmaximum deviation between edge and created curve

◆ FindEdgeNear()

GO2SEdge GO2SSolid::FindEdgeNear ( GO2SXYZ pt,
Number tol = 0.01 )

Get an edge of a solid

Version
6.11.204
Parameters
[in]ptpoint (x,y,z) close to the wanted edge
[in]tolmaximum deviation between edge and created curve

◆ GetEdges()

Array< GO2SEdge > GO2SSolid::GetEdges ( )

Get all solid edges

Version
6.11.204

◆ GetFaces()

Array< GO2SFace > GO2SSolid::GetFaces ( )

Get all solid faces

Version
6.11.204

◆ Intersection()

GO2SEnum::GO2SError GO2SSolid::Intersection ( GO2SSolid other)
inline

Compute the intersection between 2 solid entities

Warning
operands will be deleted
Returns
GO2SError.success (0) if success, see GO2SError otherwise

◆ MultiIntersection()

GO2SEnum::GO2SError GO2SSolid::MultiIntersection ( Array< GO2SSolid > others)
inline

Compute the intersection between several solids

Warning
operands will be deleted
Returns
GO2SError.success (0) if success, see GO2SError otherwise

◆ MultiSubtract()

GO2SEnum::GO2SError GO2SSolid::MultiSubtract ( Array< GO2SSolid > others)
inline

Compute the subtraction between several solids

Warning
operands will be deleted
Returns
GO2SError.success (0) if success, see GO2SError otherwise

◆ MultiSubtractHoles()

GO2SEnum::GO2SError GO2SSolid::MultiSubtractHoles ( Array< GO2SHole > holes)

Subtract holes to the solid.

Parameters
holesan array containing holes to be removed

◆ MultiUnion()

GO2SEnum::GO2SError GO2SSolid::MultiUnion ( Array< GO2SSolid > others)
inline

Compute the union between several solids

Warning
operands will be deleted
Returns
GO2SError.success (0) if success, see GO2SError otherwise

◆ Subtract()

GO2SEnum::GO2SError GO2SSolid::Subtract ( GO2SSolid other)
inline

Compute the subtraction between 2 solid entities

Warning
operands will be deleted
Returns
GO2SError.success (0) if success, see GO2SError otherwise

◆ SubtractHole()

GO2SEnum::GO2SError GO2SSolid::SubtractHole ( GO2SHole hole)

Subtract a hole to the solid.

Parameters
holethe hole to be removed

◆ ToFile() [1/2]

GO2SEnum::GO2SError GO2SSolid::ToFile ( String dir,
String name )

Save the solid to a file

Remarks
Supported format(s): X_T
Parameters
[in]dirdirectory
[in]namefilename, must end with '.X_T'

◆ ToFile() [2/2]

GO2SEnum::GO2SError GO2SSolid::ToFile ( String filename)

Save the solid to a file

Remarks
Supported format(s): X_T
Parameters
[in]filenameabsolute filename, must end with '.X_T'

◆ Union()

GO2SEnum::GO2SError GO2SSolid::Union ( GO2SSolid other)
inline

Compute the union between 2 solid entities

Warning
operands will be deleted
Returns
GO2SError.success (0) if success, see GO2SError otherwise