IGeometryFactory
best fit arc through points
IArcEntity ArcByCenterPointRadiusAngle(IPointEntity center, double radius, double startAngle, double endAngle, IVectorEntity normal)
Create an arc by providing it's center point, radius, angle sweep, and normal vector
IArcEntity ArcByCenterPointStartPointEndPoint(IPointEntity centerPoint, IPointEntity startPoint, IPointEntity endPoint)
Create an arc by providing it's center point, start point, and end point
IArcEntity ArcByCenterPointStartPointSweepAngle(IPointEntity centerPoint, IPointEntity startPoint, double sweepAngle, IVectorEntity normal)
Create an arc by providing it's center point, start point, sweep point, and normal
Create an arc by filleting twp curves with given radius
IArcEntity ArcByFilletTangentToCurve(ICurveEntity curve1, ICurveEntity curveTangentTo, ICurveEntity curve2)
Create an arc by filleting two curves tangent to given curve at internal point
IArcEntity[] ArcByStartEndAndTangencies(IPointEntity point1, IVectorEntity vector1, IPointEntity point2, IVectorEntity vector2)
Create an arc or tangent bi arc by start and end points and tangencies at start and end
IArcEntity ArcByStartPointEndPointStartTangent(IPointEntity startPoint, IPointEntity endPoint, IVectorEntity startTangent)
Create an Arc from start Point to end Point with start tangent to Vector
IArcEntity ArcByThreePoints(IPointEntity firstPoint, IPointEntity secondPoint, IPointEntity thirdPoint)
Create an arc by providing three sequential points along its circumference.
Creates the an axis-aligned BoundingBox spanning between the minimum Point and the maximum Point.
IBoundingBoxEntity BoundingBoxByCornersCoordinateSystem(IPointEntity min, IPointEntity max, ICoordinateSystemEntity cs)
Constructs a BoundingBox from minimum coordinates (lower-left-rear corner of the box),
to maximum coordinates (upper-right-front corner of the box). CoordinateSystem
is the transform FROM the coordinate space of the box TO the model space.
This method is designed to match Revit's API, allowing you to extract out the parameters
from a Revit BoundingBox without any conversions.
Create an axis-aligned BoundingBox around input Geometry.
Create an axis-aligned BoundingBox around input Geometries.
IBoundingBoxEntity BoundingBoxByGeometryCoordinateSystem(IGeometryEntity geom, ICoordinateSystemEntity cs)
Create a non-axis-aligned BoundingBox around input Geometry, oriented
in the X, Y, and Z axis of the CoordinateSystem.
IBoundingBoxEntity BoundingBoxByGeometryCoordinateSystem(IGeometryEntity[] geom, ICoordinateSystemEntity cs)
Create a non-axis-aligned BoundingBox around input Geometries, oriented
in the X, Y, and Z axis of the CoordinateSystem.
Best fit Circle through Points
Creates a Circle with input center Point and radius in the world XY
plane, with world Z as normal.
ICircleEntity CircleByCenterPointRadiusNormal(IPointEntity centerPoint, double radius, IVectorEntity normal)
Creates a Circle with specified center Point, radius, and normal direction.
Create a Circle centered at the input Plane origin (root), lying in
the input Plane, with given radius.
Create a Circle passing through three input Points.
IConeEntity ConeByCoordinateSystemHeightRadii(ICoordinateSystemEntity cs, double height = 1, double startRadius = 1, double endRadius = 1)
Creates a Cone with base Point at CoordinateSystem origin, extending
in the CoordinateSystem Z axis deriction length amount, with a
circular bases in the CoordinateSystem XY Plane.
IConeEntity ConeByCoordinateSystemHeightRadius(ICoordinateSystemEntity cs, double height = 1, double startRadius = 1)
Creates a Cone with base Point at CoordinateSystem origin, extending
in the CoordinateSystem Z axis deriction length amount, with a
circular base in the CoordinateSystem XY Plane.
IConeEntity ConeByPointsRadii(IPointEntity startPoint, IPointEntity endPoint, double startRadius = 1, double endRadius = 1)
Create a Cone with axis from start Point to end Point, with given
radiuses at start and end. This object does not have an apex, and
can be thought of as a trimmed Cone.
IConeEntity ConeByPointsRadius(IPointEntity startPoint, IPointEntity endPoint, double startRadius = 1)
Create a Cone with given base radius at start Point, extending to a
apex at end Point.
ICoordinateSystemEntity CoordinateSystemByCylindricalCoordinates(ICoordinateSystemEntity cs, double radius = 0, double theta = 0, double height = 0)
Creates a CoordinateSystem at the specified cylindrical coordinate parameters with respect to the specified coordinate system.
Deprecated -- DO NOT USE
Create a CoordinateSystem with origin at X and Y locations, with
X and Y Axes set as WCS X and Y Axes. Z defaults to 0.
Create a CoordinateSystem with origin at X, Y, and Z locations, with
X and Y Axes set as WCS X and Y Axes.
Create a CoordinateSystem with origin at input Point, with X and Y Axes
set as WCS X and Y Axes.
ICoordinateSystemEntity CoordinateSystemByOriginVectors(IPointEntity origin, IVectorEntity xAxis, IVectorEntity yAxis)
Create a CoordinateSystem at the origin with X and Y axis.
Input Vectors are normalized before creating the CoordinateSystem.
ICoordinateSystemEntity CoordinateSystemByOriginVectors(IPointEntity origin, IVectorEntity xAxis, IVectorEntity yAxis, IVectorEntity zAxis)
Create a CoordinateSystem at the origin with X and Y axis, with Z
axis ignored completely. Input Vectors are normalized before creating
the CoordinateSystem.
Create a CoordinateSystem with origin equal to input Plane origin, and
X and Y axes lying in the Plane, aligned with Plane X and Y axes.
ICoordinateSystemEntity CoordinateSystemBySphericalCoordinates(ICoordinateSystemEntity cs, double radius = 0, double theta = 0, double phi = 0)
Creates a CoordinateSystem at the specified spherical coordinate parameters with respect to the specified coordinate system.
Creates a CoordinateSystem as the World Coordinate System: origin at
0, 0, 0; x axis at 1, 0, 0; y axis at 0, 1, 0; z axis at 0, 0, 1
Create an Cuboid spanning from low Point to high Point.
Create a Cuboid centered at WCS origin, with width, length, and height.
ICuboidEntity CuboidByLengths(IPointEntity origin, double width = 1, double length = 1, double height = 1)
Create a Cuboid centered at input Point, with specified width, length,
and height.
ICuboidEntity CuboidByLengths(ICoordinateSystemEntity cs, double width = 1, double length = 1, double height = 1)
Create a Cuboid centered and oriented to input CoordinateSystem, with
specified width, length, and height.
ICurveEntity CurveByBlendBetweenCurves(ICurveEntity curve1, ICurveEntity curve2, bool endOrStart1 = true, bool endOrStart2 = false)
Create a curve that blends between two curves
ICurveEntity CurveByIsoCurveOnSurface(ISurfaceEntity baseSurface, int direction = 0, double parameter = 0)
Create a curve by isoline of surface
ICurveEntity CurveByParameterLineOnSurface(ISurfaceEntity baseSurface, IUVEntity startParams, IUVEntity endParams)
Create a curve by line of surface in uv space
ICylinderEntity CylinderByPointsRadius(IPointEntity startPoint, IPointEntity endPoint, double radius = 1)
Construct a Solid Cylinder given the bottom and top center point of the Cylinder.
ICylinderEntity CylinderByRadiusHeight(ICoordinateSystemEntity cs, double radius = 1, double height = 1)
Construct a Solid Cylinder defined by a parent CoordinateSystem, the radius, and the height of the cylinder
Takes a SAB file as input, and deserializes the ASM geometry into
a LibG object
IEllipseArcEntity EllipseArcByPlaneRadiiStartAngleSweepAngle(IPlaneEntity plane, double xRadius = 1, double yRadius = 1, double startAngle = 0, double sweepAngle = 180)
Create an EllipseArc in a plane with the given the radii along the X and Y axes and the angles to sweep through
IEllipseEntity EllipseByCoordinateSystemRadii(ICoordinateSystemEntity origin, double xAxisRadius = 1, double yAxisRadius = 1)
Create an Ellipse centered and aligned with input CoordinateSystem,
with a x_radius radius in the CS X direction, and y_radius radius in the
CS Y direction.
IEllipseEntity EllipseByOriginRadii(IPointEntity origin, double xAxisRadius = 1, double yAxisRadius = 1)
Create an Ellipse centered at input Point, aligned with WCS XY Plane,
with specified X and Y axis radii.
IEllipseEntity EllipseByOriginVectors(IPointEntity origin, IVectorEntity xAxisRadius, IVectorEntity yAxisRadius)
Create an Ellipse centered at input Point, with two specified axes.
Axes should be be at 90 degrees to each other.
IEllipseEntity EllipseByPlaneRadii(IPlaneEntity plane, double xAxisRadius = 1, double yAxisRadius = 1)
Create an Ellipse centered and aligned with input Plane, with a x_radius
radius in the Plane X axis direction, and y_radius radius in the
Plane Y axis direction.
IHelixEntity HelixByAxis(IPointEntity axisPoint, IVectorEntity axisDirection, IPointEntity startPoint, double pitch = 1, double angleTurns = 360)
Create a Helix. The helix always rotates clockwise about the supplied
axis direction. If viewing along the axis direction, the viewer will see
the point turning clockwise around the axis as it moves along the curve
in the direction of increasing parameter. Pitch is Distance the helix
moves in the axis direction per turn. This can be positive or negative.
Create an IndexGroup storing four indices
Create an IndexGroup storing three indices
Creates a Line best approximating a scatter plot of Points.
ILineEntity LineByStartPointDirectionLength(IPointEntity startPoint, IVectorEntity direction, double length = 1)
Create a straight Line starting at start Point, extending in Vector
direction by specified length.
Creates a straight Line between two input Points.
Create a Line tangent to the input Curve, positioned at the parameter
Point of the input Curve.
Parses a ".sat" or ".smt" file for Curve, Surface, and Solid objects,
and returns newly created objects.
Create a mesh from a collection of Points and a collection of IndexGroups referencing the Point collection
Create a BSplineCurve by using explicit control points.
NOTE 1: BSplineCurves with deg=1 have G1 discontinuities, which cause problems
for extrusion, sweep, and other operations. They should be avoided. Use
a PolyCurve instead.
NOTE 2: If the curve is periodic (closed), then the first and last
points MUST be the same.
Create a BSplineCurve by using explicit control points.
NOTE 1: BSplineCurves with deg=1 have G1 discontinuities, which cause problems
for extrusion, sweep, and other operations. They should be avoided. Use
a PolyCurve instead.
NOTE 2: If the curve is periodic (closed), then the first and last
points MUST be the same.
INurbsCurveEntity NurbsCurveByControlPoints(IPointEntity[] points, int degree = 3, bool closeCurve = false)
Create a BSplineCurve by using explicit control points.
NOTE 1: BSplineCurves with deg=1 have G1 discontinuities, which cause problems
for extrusion, sweep, and other operations. They should be avoided. Use
a PolyCurve instead.
NOTE 2: If the curve is periodic (closed), then the first and last
points MUST be the same.
INurbsCurveEntity NurbsCurveByControlPointsWeightsKnots(IPointEntity[] points, double[] weights, double[] knots, int degree = 3)
Create a BSplineCurve by from control vertices, weights, and knots.
FROM ASM DOCS:
Degree: Should be greater than 1 (piecewise-linear spline) and less than 26 (the maximum
B-spline basis degree supported by ASM).
Weights: All weight values (if supplied) should be strictly positive.
Weights smaller than 1e-11 will be rejected and the function will fail.
Knots: The knot vector should be a non-decreasing sequence. Interior knot
multiplicity should be no larger than degree + 1 at the start/end knot and
degree at an internal knot (this allows curves with G1 discontinuities to be
represented). Note that non-clamped knot vectors are supported, but will be
converted to clamped ones, with the corresponding changes applied to the
control point/weight data.
knot array: the array size must be num_control_points + degree + 1
Create a BSplineCurve by interpolating between points.
Create a BSplineCurve by interpolating between points.
NOTE 2: If the curve is periodic (closed), then the first and last
points MUST be the same.
Create a BSplineCurve by interpolating between points with specified degree.
INurbsCurveEntity NurbsCurveByPointsTangents(IPointEntity[] points, IVectorEntity startTangent, IVectorEntity endTangent)
Returns a BSplineCurve through the points, with tangent directions.
INurbsSurfaceEntity NurbsSurfaceByControlPoints(IPointEntity[][] controlVertices, int uDegree = 3, int vDegree = 3)
Create a NurbsSurface by using explicit control Points, with specified U and V degrees.
INurbsSurfaceEntity NurbsSurfaceByControlPointsWeightsKnots(IPointEntity[][] controlVertices, double[][] weights, double[] knotsU, double[] knotsV, int uDegree = 3, int vDegree = 3)
Creates a NurbsSurface with specified control vertices, knots, weights,
and U V degrees.
There are several restrictions on the data which, if
broken, will cause the function to fail and will throw an exception.
Degree: Both u- and v- degree should be >= 1 (piecewise-linear spline)
and less than 26 (the maximum B-spline basis degree supported by ASM).
Weights: All weight values (if supplied) should be strictly positive.
Weights smaller than 1e-11 will be rejected and the function will fail.
Knots: Both knot vectors should be non-decreasing sequences. Interior knot
multiplicity should be no larger than degree + 1 at the start/end knot and
degree at an internal knot (this allows surfaces with G1 discontinuities to
be represented). Note that non-clamped knot vectors are supported, but will
be converted to clamped ones, with the corresponding changes applied to the
control point/weight data.
Creates a NurbsSurface with specified interpolated points and
U and V degrees. The resultant surface will pass through all
of the points.
INurbsSurfaceEntity NurbsSurfaceByPointsTangents(IPointEntity[][] points, IVectorEntity[] startUTangents, IVectorEntity[] endUTangents, IVectorEntity[] startVTangents, IVectorEntity[] endVTangents)
Creates a NurbsSurface with specified interpolated points and
U and V degrees. The resultant surface will pass through all
of the points. The number of tangents must match the number of
points in the corresponding direction. The resultant surface
will be degree 3 in both the U and V direction.
INurbsSurfaceEntity NurbsSurfaceByPointsTangentsKnotsDerivatives(IPointEntity[][] points, IVectorEntity[] startUTangents, IVectorEntity[] endUTangents, IVectorEntity[] startVTangents, IVectorEntity[] endVTangents, double[] uKnots, double[] vKnots, IVectorEntity[] cornerTwistDerivatives)
Creates a NurbsSurface satisfying a collection of different surface characteristics.
This is the most advanced surface fitting method. The resultant surface
will pass through all of the points. The number of tangents must match
the number of points in the corresponding direction. The resultant surface
will be degree 3 in both the U and V direction. The corner derivatives should be
second order (dP/dUdV) and should be supplied in this order [ lowU, lowV ], [ highU, lowV ],
[ lowU, highV ], [ highU, highV ].
Fits a Plane to the input Points; basically a 3D scatterplot fit.
Create the Plane containing the input Line and external Point. Point
cannot lie on the Line or in the Line axis.
Create a Plane centered at root Point, with input normal Vector.
IPlaneEntity PlaneByOriginNormalXAxis(IPointEntity origin, IVectorEntity normal, IVectorEntity xAxis)
Create an "oriented" Plane, positioned at Point origin with Vector
normal, but with a specific X axis orientation. This has no impact
to splitting, intersect, project, etc oporations, it only specifies
the orientation of the input CoordinateSystem.
The X and Y axis lie in the plane. The Z axis is the cross product of the two Vectors.
Create a the Plane containing the three input Points.
Creates a plane in the world XY
Creates a plane in the world XZ plane
Creates a plane in the world YZ
IPointEntity PointByCartesianCoordinates(ICoordinateSystemEntity cs, double x = 0, double y = 0, double z = 0)
Form a Point in the given coordinate system with 3 cartesian coordinates
Form a Point in the XY plane given two 2 cartesian coordinates. The Z component is 0.
Form a Point given 3 cartesian coordinates
IPointEntity PointByCylindricalCoordinates(ICoordinateSystemEntity cs, double angle = 0, double elevation = 0, double radius = 1)
Form a Point in the given coordinate system given its position in cylindrical coordinates.
IPointEntity PointBySphericalCoordinates(ICoordinateSystemEntity cs, double phi = 0, double theta = 0, double radius = 1)
Form a Point in the given coordinate system given its position in spherical coordinates.
Get the Origin point (0,0,0)
Prune points to exclude duplicates within tolerance of included points
Make PolyCurve by joining curves. Flips curve as needed for connectivity
Make PolyCurve from sequence of lines connecting points. For closed curve last point should be in same location as start point.
IPolyCurveEntity PolyCurveByThickeningCurve(ICurveEntity curve, double thickness, IVectorEntity nor)
Make PolyCurve by thickening a curve.
Construct a Polygon Curve by connecting Points.
Construct a Polygon Curve by connecting Points.
Make Polysurface by joining surfaces.
Makes PolySurface by Loft through Curves.
Makes PolySurface by Loft through PolyCurves.
IPolySurfaceEntity PolySurfaceByLoftGuides(ICurveEntity[] crossSections, ICurveEntity[] guideCurves)
Makes PolySurface by Loft through PolyCurves.
Make Polysurface by surfaces of Solid.
Make Polysurface by sweeping curves along rail.
Make Polysurface by sweeping a curve along rail.
Create a Rectangle by four corner Points.
IRectangleEntity RectangleByCornerPoints(IPointEntity p1, IPointEntity p2, IPointEntity p3, IPointEntity p4)
Create a Rectangle by four corner Points.
Create a Rectangle centered at the WCS origin in the WCS XY Plane, with
specified width (X Axis length), and length (Y Axis length).
Create a Rectangle centered at input Plane root, with input width
(Plane X axis length), and length (Plane Y axis length).
IRectangleEntity RectangleByWidthLength(ICoordinateSystemEntity cs, double width = 1, double length = 1)
Create a Rectangle centered at the input origin in the CoordinateSystem
XY Plane, with specified width (X Axis length), and length
(Y Axis length).
Exports list of objects to a file, exported as a ACIS 7 SAT file,
and returns the path to the exported file, throwing an exception
on failure.
Exports list of objects to a file, exported as a ACIS 7 SAT file,
and returns the path to the exported file, throwing an exception
on failure. unitsMM specifies the modeling units expressed as mm
Serializes the object as an ACIS 7 binary stream
Create a solid by specifying it's component faces as Surfaces.
Create a Solid by lofting between input cross section closed Curves.
Create a Solid by lofting between input cross section closed Curves,
with guide Curve to assist. Guide Curve must intersect all cross section
Curves.
Create a Solid by lofting between input cross section closed Curves,
with guide Curves to assist. Guide Curves must intersect all cross
section Curves.
ISolidEntity SolidByRevolve(ICurveEntity profile, IPointEntity axisOrigin, IVectorEntity axisDirection, double startAngle = 0, double sweepAngle = 180)
Create a Surface of revolution, sweeping the profile Curve around the
axis Ray formed by the origin and the axis Vector, from the start
angle in degrees to the sweep angle in degrees.
Sweep a closed Curve along a path.
Sweep a closed profile Curve along two rail Curves.
Union a collection of solids into one solid
Fit a Sphere as close as possible to the input Points.
Create a Solid Sphere cetered at the input Point, with given radius.
Create a Solid Sphere containing four input Points on the surface.
Create a Surface by lofting between input cross section Curves.
Loft a Surface through the cross sections with a specified guide curve
(aka a rail). Guide curve must intersect all of the cross section
curves.
Loft a Surface through the cross sections with a specified guide curves
(aka a rails). Guide curves must intersect all of the cross section
curves.
Create a Surface by filling in the interior of a closed boundary
defined by input Curves.
Create a Polygon Surface connecting input Points in a closed Polygon and
patching it.
ISurfaceEntity SurfaceByRevolve(ICurveEntity profile, IPointEntity axisOrigin, IVectorEntity axisDirection, double startAngle = 0, double sweepAngle = 180)
Create a Surface by sweeping the profile Curve around the axis ray formed
by origin Point in the direction of the axis Vector, starting
at start_angle in degrees, sweeping sweep_angle in degrees.
Create a Surface by lofting between input cross section Lines. This is slightly faster
and produces a less smooth result than Surface.ByLoft.
Create a Surface by sweeping a cross section Curve along a path.
Sweep the cross section curve along a path guided by a two rails
Create a UV from two doubles.
Form a Vector by 3 Euclidean coordinates
IVectorEntity VectorByCoordinates(double x = 0, double y = 0, double z = 0, bool normalized = false)
Form a Vector by 3 Euclidean coordinates and normalize the Vector
Form a Vector by two end points. The result is a vector from the start to the end point.
Get the canonical X axis Vector (1,0,0)
Get the canonical Y axis Vector (0,1,0)
Get the canonical Z axis Vector (0,0,1)