Geometry
A geometry object. All derived geometry objects share a set of common properties and methods that are listed here.
Example
application = cf.Application.getInstance() project = application:NewProject() -- Create various geometry objects cuboid = project.Contents.Geometry:AddCuboid(cf.Point(1,0,0),1,1,1) line = project.Contents.Geometry:AddLine(cf.Point(0,0,0),cf.Point(1,1,1)) sphere = project.Contents.Geometry:AddSphere(cf.Point(0,0,0),1) union = project.Contents.Geometry:Union({sphere, cuboid}) -- Modify various properties of the union union:ReverseFaceNormals() union.Label = "LockedGeometry" union.Locked = true -- Duplicate the sphere and convert it to primitive geometry geometry = sphere:Duplicate():ConvertToPrimitive()
Inheritance
The Geometry object is derived from the Object object.
The following objects are derived (specialisations) from the Geometry object:
- AbstractSurfaceCurve
- AnalyticalCurve
- BezierCurve
- Cone
- ConstrainedSurface
- Cuboid
- Cylinder
- Ellipse
- EllipticArc
- FittedSpline
- Flare
- Helix
- HyperbolicArc
- ImprintPoints
- Intersect
- Line
- Loft
- NurbsSurface
- ParabolicArc
- Paraboloid
- PathSweep
- Polygon
- Polyline
- Primitive
- ProjectGeometry
- Rectangle
- RepairAndSewFaces
- RepairPart
- Simplify
- Sphere
- Spin
- Split
- Stitch
- Subtract
- Sweep
- Union
Usage locations
The Geometry object can be accessed from the following locations:
- Properties
- GeometryCollection collection has property FaultyParts.
- Geometry object has property Parent.
- AnalyticalCurve object has property Parent.
- BezierCurve object has property Parent.
- Cone object has property Parent.
- ConstrainedSurface object has property Parent.
- Cuboid object has property Parent.
- Cylinder object has property Parent.
- Ellipse object has property Parent.
- EllipticArc object has property Parent.
- FittedSpline object has property Parent.
- Flare object has property Parent.
- Helix object has property Parent.
- HyperbolicArc object has property Parent.
- ImprintPoints object has property Parent.
- Intersect object has property Parent.
- Loft object has property Parent.
- PathSweep object has property Parent.
- ProjectGeometry object has property Parent.
- RepairAndSewFaces object has property Parent.
- RepairPart object has property Parent.
- Spin object has property Parent.
- Split object has property Parent.
- Stitch object has property Parent.
- Subtract object has property Parent.
- Sweep object has property Parent.
- Union object has property Parent.
- Simplify object has property Parent.
- Line object has property Parent.
- NurbsSurface object has property Parent.
- ParabolicArc object has property Parent.
- Paraboloid object has property Parent.
- Polygon object has property Parent.
- Polyline object has property Parent.
- Primitive object has property Parent.
- Rectangle object has property Parent.
- Sphere object has property Parent.
- AbstractSurfaceCurve object has property Parent.
- SurfaceBezierCurve object has property Parent.
- SurfaceLine object has property Parent.
- SurfaceRegularLines object has property Parent.
- TopologyEntity object has property Geometry.
- Edge object has property Geometry.
- Face object has property Geometry.
- Region object has property Geometry.
- Methods
- OperatorCollection collection has method Item(number).
- OperatorCollection collection has method Item(string).
- GeometryCollection collection has method Item(number).
- GeometryCollection collection has method Item(string).
- GeometryGroup collection has method Item(number).
- GeometryGroup collection has method Item(string).
- Geometry object has method Explode().
- Geometry object has method ConvertToPrimitive().
- AnalyticalCurve object has method Explode().
- AnalyticalCurve object has method ConvertToPrimitive().
- BezierCurve object has method Explode().
- BezierCurve object has method ConvertToPrimitive().
- Cone object has method Explode().
- Cone object has method ConvertToPrimitive().
- ConstrainedSurface object has method Explode().
- ConstrainedSurface object has method ConvertToPrimitive().
- Cuboid object has method Explode().
- Cuboid object has method ConvertToPrimitive().
- Cylinder object has method Explode().
- Cylinder object has method ConvertToPrimitive().
- Ellipse object has method Explode().
- Ellipse object has method ConvertToPrimitive().
- EllipticArc object has method Explode().
- EllipticArc object has method ConvertToPrimitive().
- FittedSpline object has method Explode().
- FittedSpline object has method ConvertToPrimitive().
- Flare object has method Explode().
- Flare object has method ConvertToPrimitive().
- Helix object has method Explode().
- Helix object has method ConvertToPrimitive().
- HyperbolicArc object has method Explode().
- HyperbolicArc object has method ConvertToPrimitive().
- ImprintPoints object has method Explode().
- ImprintPoints object has method ConvertToPrimitive().
- Intersect object has method Explode().
- Intersect object has method ConvertToPrimitive().
- Loft object has method Explode().
- Loft object has method ConvertToPrimitive().
- PathSweep object has method Explode().
- PathSweep object has method ConvertToPrimitive().
- ProjectGeometry object has method Explode().
- ProjectGeometry object has method ConvertToPrimitive().
- RepairAndSewFaces object has method Explode().
- RepairAndSewFaces object has method ConvertToPrimitive().
- RepairPart object has method Explode().
- RepairPart object has method ConvertToPrimitive().
- Spin object has method Explode().
- Spin object has method ConvertToPrimitive().
- Split object has method Explode().
- Split object has method ConvertToPrimitive().
- Stitch object has method Explode().
- Stitch object has method ConvertToPrimitive().
- Subtract object has method Explode().
- Subtract object has method ConvertToPrimitive().
- Sweep object has method Explode().
- Sweep object has method ConvertToPrimitive().
- Union object has method Explode().
- Union object has method ConvertToPrimitive().
- Simplify object has method Explode().
- Simplify object has method ConvertToPrimitive().
- Line object has method Explode().
- Line object has method ConvertToPrimitive().
- NurbsSurface object has method Explode().
- NurbsSurface object has method ConvertToPrimitive().
- ParabolicArc object has method Explode().
- ParabolicArc object has method ConvertToPrimitive().
- Paraboloid object has method Explode().
- Paraboloid object has method ConvertToPrimitive().
- Polygon object has method Explode().
- Polygon object has method ConvertToPrimitive().
- Polyline object has method Explode().
- Polyline object has method ConvertToPrimitive().
- Primitive object has method Explode().
- Primitive object has method ConvertToPrimitive().
- Rectangle object has method Explode().
- Rectangle object has method ConvertToPrimitive().
- Sphere object has method Explode().
- Sphere object has method ConvertToPrimitive().
- AbstractSurfaceCurve object has method Explode().
- AbstractSurfaceCurve object has method ConvertToPrimitive().
- SurfaceBezierCurve object has method Explode().
- SurfaceBezierCurve object has method ConvertToPrimitive().
- SurfaceLine object has method Explode().
- SurfaceLine object has method ConvertToPrimitive().
- SurfaceRegularLines object has method Explode().
- SurfaceRegularLines object has method ConvertToPrimitive().
- Find object has method GetClashingGeometry().
- Find object has method GetClashingGeometry(List of Geometry).
Property List
- BoundingBox
- A box indicating the bounding box of this entity. (Read only Box). (Read only Box)
- Faulty
- Indicates whether the geometry has faults. (Read only boolean)
- Label
- The object label. (Read/Write string)
- LocalMeshSettingsEnabled
- Control if the locally defined mesh settings should be used for the entity. (Read/Write boolean)
- LocalWorkplane
- The source workplane. (Read/Write LocalWorkplane)
- MeshSettings
- The locally defined mesh setting to use. (Read/Write MeshSettings)
- Parent
- The parent part of this geometry. If this is a top level part nil will be returned. (Read only Geometry)
- Type
- The object type string. (Read only string)
- Visible
- Specifies whether the geometry must be shown or hidden. (Read/Write boolean)
Collection List
- Edges
- The collection of edges of the operator. (EdgeCollection of Edge.)
- Faces
- The collection of faces of the operator. (FaceCollection of Face.)
- Regions
- The collection of regions of the operator. (RegionCollection of Region.)
- Transforms
- The collection of transforms on the operator. (TransformCollection of Transform.)
- Wires
- The collection of wires of the operator. (WireCollection of Edge.)
Method List
- ConvertToPrimitive ()
- Convert the geometry into its primitive base form, returning a new part without the concrete type properties. The reference to the original part will become invalid. (Returns a Geometry object.)
- CopyAndMirror (properties table)
- Apply a copy and mirror using a table defining the properties. (Returns a List of Object object.)
- CopyAndRotate (properties table, count number)
- Apply a copy and rotate using a table defining the properties. (Returns a List of Object object.)
- CopyAndRotate (origin Point, rotationaxis Vector, angle number, count number)
- Copy and rotate the geometry. (Returns a List of Object object.)
- CopyAndTranslate (properties table, count number)
- Apply a copy and translate using a table defining the properties. (Returns a List of Object object.)
- CopyAndTranslate (from Point, to Point, count number)
- Copy and translate the geometry. (Returns a List of Object object.)
- Delete ()
- Deletes the entity.
- Duplicate ()
- Duplicates the entity. (Returns a Object object.)
- Explode ()
- Explode the geometry into separate surface and edge parts. The new parts represent a snapshot of the geometry at the time it was exploded. (Returns a List of Geometry object.)
- GetProperties ()
- Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step. (Returns a table object.)
- ReverseFaceNormals ()
- Reverse the geometry face normals.
- ReverseFaceNormals (faces List of Face)
- Reverse the geometry face normals.
- SetProperties (properties Object)
- Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
- UnlinkMesh (unlinkoption UnlinkMeshOptionEnum)
- Unlinks the geometry's associated simulation mesh. (Returns a Mesh object.)
Static Function List
- GetDefaultProperties ()
- Creates a table containing the default settings to create an object. (Returns a table object.)
Property Details
- BoundingBox
- A box indicating the bounding box of this entity. (Read only Box).
- Type
- Box
- Access
- Read only
- Faulty
- Indicates whether the geometry has faults.
- Type
- boolean
- Access
- Read only
- Label
- The object label.
- Type
- string
- Access
- Read/Write
- LocalMeshSettingsEnabled
- Control if the locally defined mesh settings should be used for the entity.
- Type
- boolean
- Access
- Read/Write
- LocalWorkplane
- The source workplane.
- Type
- LocalWorkplane
- Access
- Read/Write
- MeshSettings
- The locally defined mesh setting to use.
- Type
- MeshSettings
- Access
- Read/Write
- Parent
- The parent part of this geometry. If this is a top level part nil will be returned.
- Type
- Geometry
- Access
- Read only
- Type
- The object type string.
- Type
- string
- Access
- Read only
- Visible
- Specifies whether the geometry must be shown or hidden.
- Type
- boolean
- Access
- Read/Write
Collection Details
- Edges
- The collection of edges of the operator.
- Type
- EdgeCollection
- Faces
- The collection of faces of the operator.
- Type
- FaceCollection
- Regions
- The collection of regions of the operator.
- Type
- RegionCollection
- Transforms
- The collection of transforms on the operator.
- Type
- TransformCollection
- Wires
- The collection of wires of the operator.
- Type
- WireCollection
Method Details
- ConvertToPrimitive ()
- Convert the geometry into its primitive base form, returning a new part without the concrete type properties. The reference to the original part will become invalid.
- Return
- Geometry
- The new primitive geometry base.
- CopyAndMirror (properties table)
- Apply a copy and mirror using a table defining the properties.
- CopyAndRotate (properties table, count number)
- Apply a copy and rotate using a table defining the properties.
- CopyAndRotate (origin Point, rotationaxis Vector, angle number, count number)
- Copy and rotate the geometry.
- CopyAndTranslate (properties table, count number)
- Apply a copy and translate using a table defining the properties.
- CopyAndTranslate (from Point, to Point, count number)
- Copy and translate the geometry.
- Delete ()
- Deletes the entity.
- Duplicate ()
- Duplicates the entity.
- Return
- Object
- The new (duplicated) entity.
- Explode ()
- Explode the geometry into separate surface and edge parts. The new parts represent a snapshot of the geometry at the time it was exploded.
- GetProperties ()
- Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step.
- Return
- table
- A table defining the properties.
- ReverseFaceNormals ()
- Reverse the geometry face normals.
- ReverseFaceNormals (faces List of Face)
- Reverse the geometry face normals.
- SetProperties (properties Object)
- Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
- Input Parameters
- properties(Object)
- A table of properties defining the new state of the object.
- UnlinkMesh (unlinkoption UnlinkMeshOptionEnum)
- Unlinks the geometry's associated simulation mesh.
- Input Parameters
- unlinkoption(UnlinkMeshOptionEnum)
- Mesh ports are created. Solution entities are either keep with their original assignment or reassigned to the new port.
- Return
- Mesh
- The unlinked mesh.
Static Function Details
- GetDefaultProperties ()
- Creates a table containing the default settings to create an object.
- Return
- table
- A table containing the default properties.