Show / Hide Table of Contents

Class Make3D

A class with static methods to create and combine Solids, Shells or Faces.

Inheritance
System.Object
Make3D
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CADability.GeoObject
Assembly: CADability.dll
Syntax
public class Make3D

Methods

| Improve this Doc View Source

CloneFaceUserData(Solid[], Solid[])

Declaration
public static void CloneFaceUserData(Solid[] copyFrom, Solid[] addTo)
Parameters
Type Name Description
Solid[] copyFrom
Solid[] addTo
| Improve this Doc View Source

Curtail(Path, Shell)

Declaration
public static Shell Curtail(Path path, Shell shell)
Parameters
Type Name Description
Path path
Shell shell
Returns
Type Description
Shell
| Improve this Doc View Source

Difference(Face, Solid)

Returns the remains of a face when a solid is subtracted.

Declaration
public static Face[] Difference(Face fce, Solid sld)
Parameters
Type Name Description
Face fce

Face to be modified

Solid sld

Solid which is subtracted

Returns
Type Description
Face[]

One ore more faces

| Improve this Doc View Source

Difference(Shell, Solid)

Returns the remains of a shell when a solid is subtracted.

Declaration
public static Shell[] Difference(Shell shl, Solid sld)
Parameters
Type Name Description
Shell shl

Shell to be modified

Solid sld

Solid which is subtracted

Returns
Type Description
Shell[]

One ore more shells

| Improve this Doc View Source

Difference(Solid, Face)

Declaration
public static Solid[] Difference(Solid sld, Face fce)
Parameters
Type Name Description
Solid sld
Face fce
Returns
Type Description
Solid[]
| Improve this Doc View Source

Difference(Solid, Solid)

Returns the difference of the two given Solids. If the solids are disjunct, null will be returned. s2 will be subtracted from s1.

Declaration
public static Solid[] Difference(Solid s1, Solid s2)
Parameters
Type Name Description
Solid s1

first solid

Solid s2

second solid

Returns
Type Description
Solid[]

difference of the two solids or null

| Improve this Doc View Source

Extrude(IGeoObject, GeoVector, Project)

Extrudes the provided object faceShellPathCurve along the extension.

Declaration
public static IGeoObject Extrude(IGeoObject faceShellPathCurve, GeoVector extension, Project project)
Parameters
Type Name Description
IGeoObject faceShellPathCurve

Object to extrude, may be a Face, Shell, Path or ICurve object

GeoVector extension

Direction and length of extension

Project project

A project which is used to set default attributes to the result, may be null

Returns
Type Description
IGeoObject

The extruded face, shell or solid, null if extrusion not possible

| Improve this Doc View Source

ExtrudeCurveToFace(ICurve, ICurve)

Extrude a curve along another curve. E.g. if you extrude a circle along a line (which is perpendicular to the cirle plane) you will get a cylindrical face. If the curve along is planar, the curve toExtrude will be only rotated around the plane's normal (and moved of course), If the curve along is not planar, there is no well difined way how to rotate the curve toExtrude.

Declaration
public static Face ExtrudeCurveToFace(ICurve toExtrude, ICurve along)
Parameters
Type Name Description
ICurve toExtrude
ICurve along
Returns
Type Description
Face
| Improve this Doc View Source

GetDtkFileType(String)

Declaration
public static string GetDtkFileType(string filename)
Parameters
Type Name Description
System.String filename
Returns
Type Description
System.String
| Improve this Doc View Source

GetShape(Project)

Declaration
public IGeoObject GetShape(Project project)
Parameters
Type Name Description
Project project
Returns
Type Description
IGeoObject
| Improve this Doc View Source

GetShapes(Project)

Declaration
public IGeoObject[] GetShapes(Project project)
Parameters
Type Name Description
Project project
Returns
Type Description
IGeoObject[]
| Improve this Doc View Source

ImportDtk(String, Project, Boolean, Boolean)

Declaration
public static IGeoObject[] ImportDtk(string filename, Project pr, bool useProgress = false, bool makeCompounds = false)
Parameters
Type Name Description
System.String filename
Project pr
System.Boolean useProgress
System.Boolean makeCompounds
Returns
Type Description
IGeoObject[]
| Improve this Doc View Source

ImportSTL(String)

Declaration
public static Solid[] ImportSTL(string fileName)
Parameters
Type Name Description
System.String fileName
Returns
Type Description
Solid[]
| Improve this Doc View Source

Intersection(Face, Face)

Declaration
public static IGeoObject[] Intersection(Face face1, Face face2)
Parameters
Type Name Description
Face face1
Face face2
Returns
Type Description
IGeoObject[]
| Improve this Doc View Source

Intersection(Shell, Solid)

Declaration
public static Shell[] Intersection(Shell shell1, Solid solid2)
Parameters
Type Name Description
Shell shell1
Solid solid2
Returns
Type Description
Shell[]
| Improve this Doc View Source

Intersection(Solid, Solid)

Returns the intersection of the two given Solids. If the solids are disjunct, null will be returned. s1 and s2 will be intersected, the common solid is returned, which may consist of several solids

Declaration
public static Solid[] Intersection(Solid solid1, Solid solid2)
Parameters
Type Name Description
Solid solid1
Solid solid2
Returns
Type Description
Solid[]

intersection of the two solids or null

| Improve this Doc View Source

MakeBox(GeoPoint, GeoVector, GeoVector, GeoVector)

Declaration
public static Solid MakeBox(GeoPoint location, GeoVector directionX, GeoVector directionY, GeoVector directionZ)
Parameters
Type Name Description
GeoPoint location
GeoVector directionX
GeoVector directionY
GeoVector directionZ
Returns
Type Description
Solid
| Improve this Doc View Source

MakeChamfer(Face, Edge[], Double, Double, out IGeoObject[])

Declaration
public static IGeoObject[] MakeChamfer(Face primaryFace, Edge[] edges, double primaryDist, double secondaryDist, out IGeoObject[] affectedShellsOrSolids)
Parameters
Type Name Description
Face primaryFace
Edge[] edges
System.Double primaryDist
System.Double secondaryDist
IGeoObject[] affectedShellsOrSolids
Returns
Type Description
IGeoObject[]
| Improve this Doc View Source

MakeCone(GeoPoint, GeoVector, GeoVector, Double, Double)

Creates a cone. The cone is defined by two parallel discs with two different radii. The first disc is centered at location, the second at location + directionZ. directionZ is also the normal vector of both discs. directionX must be perpendicular to directionZ and specifies the startpoint of the circular edge.

Declaration
public static Solid MakeCone(GeoPoint location, GeoVector directionX, GeoVector directionZ, double radius1, double radius2)
Parameters
Type Name Description
GeoPoint location

location of the cone

GeoVector directionX

startpoint of edge

GeoVector directionZ

axis of the cone

System.Double radius1

radius at location

System.Double radius2

radius at location + directionZ

Returns
Type Description
Solid
| Improve this Doc View Source

MakeCylinder(GeoPoint, GeoVector, GeoVector)

Declaration
public static Solid MakeCylinder(GeoPoint location, GeoVector directionX, GeoVector directionZ)
Parameters
Type Name Description
GeoPoint location
GeoVector directionX
GeoVector directionZ
Returns
Type Description
Solid
| Improve this Doc View Source

MakeCylinderShell(GeoPoint, GeoVector, GeoVector)

Declaration
public static Shell MakeCylinderShell(GeoPoint location, GeoVector directionX, GeoVector directionZ)
Parameters
Type Name Description
GeoPoint location
GeoVector directionX
GeoVector directionZ
Returns
Type Description
Shell
| Improve this Doc View Source

MakeFace(Path, Project)

Declaration
public static Face MakeFace(Path path, Project project)
Parameters
Type Name Description
Path path
Project project
Returns
Type Description
Face
| Improve this Doc View Source

MakeFillet(Edge[], Double, out IGeoObject[])

Declaration
public static IGeoObject[] MakeFillet(Edge[] edges, double radius, out IGeoObject[] affectedShellsOrSolids)
Parameters
Type Name Description
Edge[] edges
System.Double radius
IGeoObject[] affectedShellsOrSolids
Returns
Type Description
IGeoObject[]
| Improve this Doc View Source

MakeOffset(Shell, Double)

Declaration
public static IGeoObject MakeOffset(Shell shell, double offset)
Parameters
Type Name Description
Shell shell
System.Double offset
Returns
Type Description
IGeoObject
| Improve this Doc View Source

MakeOffset(Solid, Double)

PRELIMINARY: Creates a solid as an offset to the provided solid. Positiv values for offset expand the solid, negative values contract it. Might be changed in future, especially the result will be an array, because contracting might produce several solids.

Declaration
public static Solid MakeOffset(Solid solid, double offset)
Parameters
Type Name Description
Solid solid

Solid to expand or contract

System.Double offset

Offset for the operation

Returns
Type Description
Solid

The resulting solid

| Improve this Doc View Source

MakePipe(IGeoObject, Path, Project)

Declaration
public static IGeoObject MakePipe(IGeoObject faceShellOrPath, Path along, Project project)
Parameters
Type Name Description
IGeoObject faceShellOrPath
Path along
Project project
Returns
Type Description
IGeoObject
| Improve this Doc View Source

MakePrism(IGeoObject, GeoVector, Project, Boolean)

Creates a Solid, a Shell or a Face by moving a Path, a Face or a Shell along a given vector. Moving a path yields a face or a shell, moving a face or a shell returns a Solid. Moving a different type of IGeoObject returns null.

Declaration
public static IGeoObject MakePrism(IGeoObject faceShellOrPath, GeoVector extrusion, Project project, bool pathToShell = true)
Parameters
Type Name Description
IGeoObject faceShellOrPath

object to move

GeoVector extrusion
Project project

the Project to set default styles for the result

System.Boolean pathToShell
Returns
Type Description
IGeoObject

the created solid, face or shell

| Improve this Doc View Source

MakePrismMiter(SimpleShape, GeoPoint, GeoVector, GeoVector, GeoVector, GeoVector)

Creates a prism or profile as an extrusion of the provided shape. The position of the prism is defined by location and mainDirection. The shape is a 2D object. The 2d origin is moved along the axis defined by location and main direction. The topDirection vector corresponds to the 2d y-axis of the shape. The beginning and ending of the extrusion is a miter cut that allows the same profile be connected to the starting or ending point where mainDirection and startMiter are exchanged and topDirection is kept.

Declaration
public static Solid MakePrismMiter(SimpleShape shape, GeoPoint location, GeoVector topDirection, GeoVector mainDirection, GeoVector startMiter, GeoVector endMiter)
Parameters
Type Name Description
SimpleShape shape

2d shape to be extruded, the 2d origin is moved along mainDirection

GeoPoint location

Starting point of the resulting profile, corresponds to the 2d origin

GeoVector topDirection

The "up" direction for the resulting profile, corresponds to the y-axis of the 2d shape

GeoVector mainDirection

Direction of the prism, the length of this vector defines the length of the prism

GeoVector startMiter

Direction of the connecting profile at the starting point

GeoVector endMiter

Direction of the connecting profile at the ending point

Returns
Type Description
Solid

The resulting solid

| Improve this Doc View Source

MakePrismMiter(SimpleShape, GeoPoint[], GeoVector, GeoVector, GeoVector, GeoVector)

Declaration
public static Solid MakePrismMiter(SimpleShape outline, GeoPoint[] path, GeoVector topDirection, GeoVector mainDirection, GeoVector startMiter, GeoVector endMiter)
Parameters
Type Name Description
SimpleShape outline
GeoPoint[] path
GeoVector topDirection
GeoVector mainDirection
GeoVector startMiter
GeoVector endMiter
Returns
Type Description
Solid
| Improve this Doc View Source

MakeRevolution(IGeoObject, GeoPoint, GeoVector, Double, Project)

Creates a Solid, a Shell or a Face by rotating a Path, a Face or a Shell around a given axis. Rotating a path yields a shell, rotating a face or a shell returns a Solid. Rotating a different type of IGeoObject returns null.

Declaration
public static IGeoObject MakeRevolution(IGeoObject faceShellOrPath, GeoPoint location, GeoVector direction, double sweep, Project project)
Parameters
Type Name Description
IGeoObject faceShellOrPath

object to rotate

GeoPoint location

a point on the axis

GeoVector direction

direction of the axis

System.Double sweep

amount to rotate (2*Math.PI is a full rotation)

Project project

the Project to set default styles for the result

Returns
Type Description
IGeoObject

the created solid or shell

| Improve this Doc View Source

MakeRuledShell(Path, Path, Project)

Connects the two wires with a ruled surface. The two wires must have the same number of segments. Each segment of the first path is connected with the segment with the same index of the second path. The pathes may be open or closed. the ruled surfaces will be returned as a shell. If there is an error null will be returned

Declaration
public static IGeoObject MakeRuledShell(Path firstPath, Path secondPath, Project project)
Parameters
Type Name Description
Path firstPath

the first path

Path secondPath

teh second path

Project project

the project to find attributes

Returns
Type Description
IGeoObject

the generated shell or null

| Improve this Doc View Source

MakeRuledSolid(Path, Path, Project)

Connects the two wires with a ruled surface. The two wires must have the same number of segments. Each segment of the first path is connected with the segment with the same index of the second path. Both pathes must be closed. A solid is returned bound by the faces of the two pathes and the ruled surfaces. If there is an error null will be returned

Declaration
public static Solid MakeRuledSolid(Path firstPath, Path secondPath, Project project)
Parameters
Type Name Description
Path firstPath

the first path

Path secondPath

teh second path

Project project

the project to find attributes

Returns
Type Description
Solid

the generated solid or null

| Improve this Doc View Source

MakeSphere(GeoPoint, Double)

Declaration
public static Solid MakeSphere(GeoPoint location, double radius)
Parameters
Type Name Description
GeoPoint location
System.Double radius
Returns
Type Description
Solid
| Improve this Doc View Source

MakeTorus(GeoPoint, GeoVector, Double, Double)

Declaration
public static Solid MakeTorus(GeoPoint location, GeoVector normal, double radius1, double radius2)
Parameters
Type Name Description
GeoPoint location
GeoVector normal
System.Double radius1
System.Double radius2
Returns
Type Description
Solid
| Improve this Doc View Source

PlaneIntersection(Face[], Plane)

Declaration
public static Make3D PlaneIntersection(Face[] faces, Plane plane)
Parameters
Type Name Description
Face[] faces
Plane plane
Returns
Type Description
Make3D
| Improve this Doc View Source

Rotate(IGeoObject, Axis, SweepAngle, SweepAngle, Project)

Declaration
public static IGeoObject Rotate(IGeoObject faceShellPathCurve, Axis axis, SweepAngle rotation, SweepAngle offset, Project project)
Parameters
Type Name Description
IGeoObject faceShellPathCurve
Axis axis
SweepAngle rotation
SweepAngle offset
Project project
Returns
Type Description
IGeoObject
| Improve this Doc View Source

SewFaces(Face[], Boolean)

Declaration
public static Shell[] SewFaces(Face[] faces, bool edgesArUnambiguous = false)
Parameters
Type Name Description
Face[] faces
System.Boolean edgesArUnambiguous
Returns
Type Description
Shell[]
| Improve this Doc View Source

SewFacesAndShells(GeoObjectList)

Takes all faces and shells from the given list and tries to sew them together. When two or more faces have common edges they are connected to shells. Shells with no free edges are converted to solids.

Declaration
public static GeoObjectList SewFacesAndShells(GeoObjectList select)
Parameters
Type Name Description
GeoObjectList select

faces and shells to sew

Returns
Type Description
GeoObjectList

resulting objects

| Improve this Doc View Source

SplitCommonFace(Solid, Solid, out Face[], out Face[])

Checks whether the two provided solids have overlapping faces. If this is the case, one of the two faces or both faces are split in a way that the modified solids have common, identical faces which have the same outlines

Declaration
public static bool SplitCommonFace(Solid s1, Solid s2, out Face[] splittedOnS1, out Face[] splittedOnS2)
Parameters
Type Name Description
Solid s1

The first solid

Solid s2

The second solid

Face[] splittedOnS1

Splitted faces on s1

Face[] splittedOnS2

Splitted faces on s2

Returns
Type Description
System.Boolean

Returns true if common overlapping faces were found.

| Improve this Doc View Source

Union(Solid, Solid)

Returns the union of the two given Solids. If the solids are disjunct, null will be returned

Declaration
public static Solid Union(Solid s1, Solid s2)
Parameters
Type Name Description
Solid s1

first solid

Solid s2

second solid

Returns
Type Description
Solid

union of the two solids or null

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX