Skip to main content

Motion Standalone Preprocessor C# library 2024 R2

Class ImprintUtil

Last update: 16.07.2025

Namespace: VM.Managed.DAFUL.Operation
Assembly: VMOP.dll

Impint Utility class

public class ImprintUtil

Inheritance

object ← ImprintUtil

Extension Methods

LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType), LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType), LinkPropertyItemCache.GetLinkedObjects<T>(object, LinkPropertyType)

Constructors

ImprintUtil()

public ImprintUtil()

Methods

CreateFacesetByIndex(Document3D, SolidBody, List<int>, string)

Create faceset by index

public static SetFace CreateFacesetByIndex(Document3D activeDocument, SolidBody parentSolidBody, List<int> lstFaceIndex, string strPrefixName)

Parameters

activeDocument Document3D

The active document

parentSolidBody SolidBody

The parent solid body

lstFaceIndex List<int>

The face indexes

strPrefixName string

The pre-fix name

Returns

SetFace

faceset

CreateFacesetByIndex(Document3D, Body, List<int>, string)

Create faceset by index

public static SetFace CreateFacesetByIndex(Document3D activeDocument, Body body, List<int> lstFaceIndex, string strPrefixName)

Parameters

activeDocument Document3D

The active document

body Body

The body

lstFaceIndex List<int>

The face indexes

strPrefixName string

The pre-fix name

Returns

SetFace

faceset

CreatePartFacesetByIndex(Document3D, Body, List<int>, string)

Create faceset by index in part

public static PartSetFace CreatePartFacesetByIndex(Document3D activeDocument, Body body, List<int> lstFaceIndex, string strPrefixName)

Parameters

activeDocument Document3D

The active document

body Body

The body

lstFaceIndex List<int>

The face indexes

strPrefixName string

The pre-fix name

Returns

PartSetFace

faceset

FindNearestPoints(Document3D, Body, List<List<VectorBase>>, ref List<List<VectorBase>>)

Find nearest points

public static bool FindNearestPoints(Document3D doc, Body target, List<List<VectorBase>> seedPoints, ref List<List<VectorBase>> results)

Parameters

doc Document3D

The document

target Body

The target body

seedPoints List<List<VectorBase>>

The seed points

results List<List<VectorBase>>

The result

Returns

bool

FindNearestPoints(Document3D, Body, VectorBase[], ref VectorBase[])

Find nearest points

public static bool FindNearestPoints(Document3D doc, Body target, VectorBase[] seedPoints, ref VectorBase[] results)

Parameters

doc Document3D

The document

target Body

The target body

seedPoints VectorBase[]

The seed points

results VectorBase[]

The result

Returns

bool

FindNearestPointsWithDirection(Document3D, Body, List<List<VectorBase>>, VectorBase, ref List<List<VectorBase>>)

Find nearest points

public static bool FindNearestPointsWithDirection(Document3D doc, Body target, List<List<VectorBase>> seedPoints, VectorBase direction, ref List<List<VectorBase>> results)

Parameters

doc Document3D

The document

target Body

The target body

seedPoints List<List<VectorBase>>

The seed points

direction VectorBase

The direction

results List<List<VectorBase>>

The result

Returns

bool

FindNearestPointsWithDirection(Document3D, Body, VectorBase[], VectorBase, ref VectorBase[])

Find nearest points

public static bool FindNearestPointsWithDirection(Document3D doc, Body target, VectorBase[] seedPoints, VectorBase direction, ref VectorBase[] results)

Parameters

doc Document3D

The document

target Body

The target body

seedPoints VectorBase[]

The seed points

direction VectorBase

The direction

results VectorBase[]

The result

Returns

bool

FindNearestTopologyIndex(Document3D, Body, VectorBase, ref List<int>, ref VectorBase)

Find nearest topology index

public static bool FindNearestTopologyIndex(Document3D doc, Body target, VectorBase vecSeed, ref List<int> lstIndex, ref VectorBase vecResult)

Parameters

doc Document3D

The document

target Body

The target

vecSeed VectorBase

The seed vector

lstIndex List<int>

The index array

vecResult VectorBase

The result vector

Returns

bool

FindNearestTopologyIndex(Document3D, Body, double, double, double, ref List<int>, ref double, ref double, ref double)

Find nearest topology index

public static bool FindNearestTopologyIndex(Document3D doc, Body target, double dSeedX, double dSeedY, double dSeedZ, ref List<int> lstIndex, ref double dResX, ref double dResY, ref double dResZ)

Parameters

doc Document3D

The document

target Body

The target

dSeedX double

The x of seed position

dSeedY double

The y of seed position

dSeedZ double

The z of seed position

lstIndex List<int>

The index array

dResX double

The x of result position

dResY double

The y of result position

dResZ double

The z of result position

Returns

bool

FindNearestTopologyIndexAdding4Point(Document3D, Body, VectorBase, TransformBase, double, bool, ref List<int>, ref VectorBase)

Find nearest topology index adding 4 point

public static bool FindNearestTopologyIndexAdding4Point(Document3D doc, Body target, VectorBase vecSeed, TransformBase transform, double dOffset, bool bSkipCenter, ref List<int> lstIndex, ref VectorBase vecResult)

Parameters

doc Document3D

The document

target Body

The target

vecSeed VectorBase

The seed vector

transform TransformBase

The transform

dOffset double

The offset

bSkipCenter bool

The center skip flag

lstIndex List<int>

The index array

vecResult VectorBase

The result

Returns

bool

GetFacesWithCylinderRange(Document3D, Body, TMatrix, double, ref List<int>)

Gets faces with cylinder range

public static bool GetFacesWithCylinderRange(Document3D doc3D, Body body, TMatrix matT, double dRadius, ref List<int> lstIndex)

Parameters

doc3D Document3D

The document

body Body

The body

matT TMatrix

The transform

dRadius double

The radius

lstIndex List<int>

The index list

Returns

bool

GetGearFacesWithCylinderRange(Document3D, Body, TMatrix, double, ref List<int>)

Gets touched faces with cylinder range

public static bool GetGearFacesWithCylinderRange(Document3D doc3D, Body body, TMatrix matT, double dRadius, ref List<int> lstIndex)

Parameters

doc3D Document3D

The document

body Body

The body

matT TMatrix

The transform

dRadius double

The radius

lstIndex List<int>

The index list

Returns

bool

ImprintCore(Document3D, Body, List<int>, TransformBase, double, double)

ImprintCore

public static void ImprintCore(Document3D doc, Body target, List<int> lstFaceIndex, TransformBase transf, double dHeight, double dWidth)

Parameters

doc Document3D

The document

target Body

The target

lstFaceIndex List<int>

The face indexes

transf TransformBase

The transform

dHeight double

The height

dWidth double

The width

ImprintCore(Document3D, Body, List<int>, TransformBase, double)

ImprintCore

public static void ImprintCore(Document3D doc, Body target, List<int> lstFaceIndex, TransformBase transf, double dRadius)

Parameters

doc Document3D

The document

target Body

The target

lstFaceIndex List<int>

The face indexes

transf TransformBase

The transform

dRadius double

The radius

ImprintWithCircle(Document3D, SolidBody, double, VectorBase, DirectionBase, double)

Imprint with circle

public static bool ImprintWithCircle(Document3D doc, SolidBody solidBody, double dTestRadius, VectorBase vecSeed, DirectionBase dirZ, double dRadius)

Parameters

doc Document3D

The document

solidBody SolidBody

The solid body

dTestRadius double

The radius

vecSeed VectorBase

The seed position

dirZ DirectionBase

The z direction

dRadius double

The radius

Returns

bool

ImprintWithCircle(Document3D, Body, double, VectorBase, DirectionBase, double)

Imprint with circle

public static bool ImprintWithCircle(Document3D doc, Body body, double dTestRadius, VectorBase vecSeed, DirectionBase dirZ, double dRadius)

Parameters

doc Document3D

The document

body Body

The body

dTestRadius double

The radius

vecSeed VectorBase

The seed vector

dirZ DirectionBase

The z direction

dRadius double

The radius

Returns

bool

ImprintWithCylinder(Document3D, Body, VectorBase, VectorBase, double)

Imprint with cylinder

public static bool ImprintWithCylinder(Document3D doc, Body body, VectorBase vecBottom, VectorBase vecTop, double dRadius)

Parameters

doc Document3D

The document

body Body

The body

vecBottom VectorBase

The bottom

vecTop VectorBase

The top

dRadius double

The radius

Returns

bool

ImprintWithCylinderUsingKernelOperation(Document3D, Body, VectorBase, VectorBase, double)

Imprint with cylinder

public static bool ImprintWithCylinderUsingKernelOperation(Document3D doc, Body body, VectorBase vecBottom, VectorBase vecTop, double dRadius)

Parameters

doc Document3D

The document

body Body

The body

vecBottom VectorBase

The bottom

vecTop VectorBase

The top

dRadius double

The radius

Returns

bool

ImprintWithRectangle(Document3D, SolidBody, double, double, double, double, double, double)

Imprint with rectangle

public static bool ImprintWithRectangle(Document3D doc, SolidBody solidBody, double dTestRadius, double dSeedX, double dSeedY, double dSeedZ, double dHeight, double dWidth)

Parameters

doc Document3D

The document

solidBody SolidBody

The solid body

dTestRadius double

The radius

dSeedX double

The x of seed position

dSeedY double

The y of seed position

dSeedZ double

The z of seed position

dHeight double

The height

dWidth double

The width

Returns

bool

ImprintWithRectangle(Document3D, Body, double, double, double, double, double, double)

Imprint with rectangle

public static bool ImprintWithRectangle(Document3D doc, Body body, double dTestRadius, double dSeedX, double dSeedY, double dSeedZ, double dHeight, double dWidth)

Parameters

doc Document3D

The document

body Body

The body

dTestRadius double

The radius

dSeedX double

The x of seed position

dSeedY double

The y of seed position

dSeedZ double

The z of seed position

dHeight double

The height

dWidth double

The width

Returns

bool

Connect with Ansys