GO2cam Javascript API  6.11
GO2SSolid Class Reference

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

Inheritance diagram for GO2SSolid:
T_GO2SSolid< TShape, TExtrusion, TRevol, TBool > 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 CreateCone (GO2SXYZ center, Number radiusBase, Number radiusTop, Number height)
 
GO2SEnum::GO2SError CreateFace (GO2SProfile prf)
 
GO2SEnum::GO2SError CreateLofting (Array< GO2SProfile > profiles, Boolean periodic, Boolean surfacic)
 
GO2SEnum::GO2SError CreateOffsetFace (GO2SFace face, Number len)
 
GO2SMultipleGeometry CreateSilhouette (GO2SXYZ direction, Number altitude, Number tolerance)
 Given a direction, creates a projection silhouette from the solid.
 
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)
 Given a direction, creates a slice on the solid at a given altitude.
 
GO2SEnum::GO2SError CreateSphere (GO2SXYZ center, Number radius)
 
GO2SEnum::GO2SError CreateTorus (GO2SXYZ center, Number radius, Number height)
 
GO2SGeometry ExtractEdge (GO2SEdge edge, Number tol=0.01)
 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 >
GO2SEnum::GO2SError CreateCuboid (GO2SXYZ Org, GO2SXYZ ptX, GO2SXYZ ptY, Number h)
 
GO2SEnum::GO2SError CreateCylinder (GO2SXYZ center, Number radius, Number height)
 
GO2SEnum::GO2SError CreateExtrusion (GO2SProfile profile, GO2SXYZ direction, Number height, Number taperAngle, Boolean surfacic)
 
GO2SEnum::GO2SError CreateMultiExtrusion (Array< GO2SProfile > profiles, GO2SXYZ direction, Number height, Number taperAngle, Boolean surfacic)
 
GO2SEnum::GO2SError CreateMultiRevolution (Array< GO2SProfile > profiles, GO2SXYZ axis, Number angle, Boolean surfacic)
 
GO2SEnum::GO2SError CreateRevolution (GO2SProfile profile, GO2SXYZ axis, Number angle, Boolean surfacic)
 
- Public Member Functions inherited from GO2SSolidGeometry
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 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

◆ CreateCone()

GO2SEnum::GO2SError GO2SSolid::CreateCone ( GO2SXYZ center,
Number radiusBase,
Number radiusTop,
Number height )

Create a cone shape

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]centerthe center of the basis of the cone (bottom face)
[in]radiusBaseradius of base circle
[in]radiusTopradius of top circle
[in]heightheight of the cone

◆ CreateFace()

GO2SEnum::GO2SError GO2SSolid::CreateFace ( GO2SProfile prf)

Create a face from a profile

Warning
will delete the profile after the operation
Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]prfthe edges of the face

◆ 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

◆ 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

◆ CreateSilhouette()

GO2SMultipleGeometry GO2SSolid::CreateSilhouette ( GO2SXYZ direction,
Number altitude,
Number tolerance )
inline

Given a direction, creates a projection silhouette from the solid.

Parameters
[in]directionDirection of the silhouette generated from the object
[in]altitudeChange position of the silhouette generated in the given direction.
[in]tolerance

◆ CreateSilhouetteRevolution()

GO2SMultipleGeometry GO2SSolid::CreateSilhouetteRevolution ( GO2SXYZ direction,
GO2SEnum::GO2SSilhouetteType type,
Number tolerance )

Given a direction, creates a revolution silhouette from a Solid.

Parameters
[in]directionDirection of the silhouette generated from the object
[in]typeRevoution type. See GO2SEnum::GO2SSilhouetteType
[in]tolerance

◆ CreateSlice()

GO2SMultipleGeometry GO2SSolid::CreateSlice ( GO2SXYZ direction,
Number altitude,
Number tolerance )
inline

Given a direction, creates a slice on the solid at a given altitude.

Parameters
[in]directionDirection of the silhouette generated from the object
[in]altitudeChange position of the silhouette generated in the given direction.
[in]tolerance

◆ CreateSphere()

GO2SEnum::GO2SError GO2SSolid::CreateSphere ( GO2SXYZ center,
Number radius )

Create a sphere shape

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]centerthe center of the basis of the cylinder (bottom face)
[in]radiusthe radius of the sphere

◆ CreateTorus()

GO2SEnum::GO2SError GO2SSolid::CreateTorus ( GO2SXYZ center,
Number radius,
Number height )

Create a torus shape

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]centerthe center of the basis of the cylinder (bottom face)
[in]radiusdiameter of the torus
[in]heightheight of the torus

◆ ExtractEdge()

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

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