IObjectGenerator_DG Interface
- Create(string)
- Create(string, object)
- Create(string, IDictionary_DG)
The returned object is an interface. Its name is the type string. For an examle, a call to Create("IArray_DG", ..) returns IArray_DG interface.
Not all interfaces can be obtained this way. For an example, IBRepShape_DG is an abstract base interface. The object, which implements it, must be constructed as BRepSolid_DG, etc. concrete type.
The table below may be out of date after updates, so it is recomended to try name of the required interface
Implemented type string values
I2DPointArray_DG |
ICircle_DG |
ILine_DG |
IAppearance_DG |
IConICone_DG |
IMaterial_DG>
|
IArc_DG |
IConstraint_DG |
IMapUnkn_DG |
IArcSpline3DCurve_DG |
IContext_DG |
IMapUint64_DG |
IArray_DG |
ICurveFreeForm_DG |
IMatrix_DG |
IArrayInt_DG |
ICurveGeometry_DG |
IMeasurement_DG |
IArrayDouble_DG
| ICutEffect_DG |
IMesh_DG |
IBitmap_DG |
ICylinder_DG |
IMeshGeometry_DG |
IBlob_DG |
IDictionary_DG |
IModel_DG |
IBox_DG |
IDataContext_DG |
IMove_DG |
IBRepBuilder_DG |
IDiffSurface_DG |
IPathCollisionDetector_DG |
IBRepBuilderEx_DG |
IDynamicScreenItem_DG |
IPlane_DG |
IBRepChamfer_DG |
IDynamicScreenItemManager_DG |
IPointArray_DG |
IBRepCompositeSolid_DG |
IEllipse_DG |
IPointMatrix_DG |
IBRepCompound_DG |
IEntity_DG |
IPointSetGeometry_DG |
IBRepDraftAngle_DG |
IEntity2d_DG |
IPolygon3D_DG |
IBRepEdge_DG
| IEntityArray_DG |
IShapeArray_DG |
IBRepFace_DG |
IError_DG |
ISegmentStripGeometry_DG |
IBRepFeaturePrism_DG |
IEuclideanShortestPath_DG |
ISphere_DG |
IBRepFillet_DG |
IFont_DG |
IStdShape_DG |
IBRepGeometry_DG |
IFrame_DG |
IStdShapeRef_DG |
IBRepShell_DG |
IFrame2d_DG |
ISticky_DG |
IBRepSolid_DG |
IFrameArray_DG |
IStripArcLine_DG |
IBRepBRepVertex_DG |
IGeometry_DG* |
ISurfacePoint_DG |
IBRepBRepWire_DG |
IKO_BRepExtrema_DistShapeShape |
ISurfacePointArray_DG |
IBSplineCurve2d_DG |
ILabel_DG |
ITexture_DG |
IBSplineCurve_DG |
ILabelGeometry_DG |
ITorus_DG |
IBSplineCurveInterpolator_DG |
ILightSource_DG |
IVirtualView_DG |
IBSplineSurface_DG |
IList_DG |
IWireArrayToSurfaceBuilder_DG |
ICircCircle2d_DG |
ILine2d_DG |
|
*) By default (Create method) IGeometry_DG is constructed as BRep type. To construct other types of geometry use Create() method with params containing string item named "Type"
and value one of geometry types: "IBRep", "Mesh", etc.
See IEntity_DG.SetGeometryType(). See an example below.
IUnk Create(string type)
See the comments above
There is a convenient extension for this method, which also includes a cast to the specific target type. Example:
void f(IObjectGenerator_DG gen)
{
IFrame_DG frame = gen.Create<IFrame_DG>();
}
IUnk Create(string type, IUnk iParam)
iParam - a parameter specific for the requested type.
See the comments above for the other parameters
Example:
void f(IObjectGenerator_DG gen, IUnk iParam)
{
IBRepEdge_DG edge = gen.Create("IBRepEdge_DG", iParam) as IBRepEdge_DG;
//Or
IBRepEdge_DG edge2 = gen.Create<IBRepEdge_DG>(iParam);
}
IUnk Create(string type, IDictionary_DG params)
The method allows specifying additional parameters for the construction. Use call similar to:
Dictionary_DG params = iObjectGenerator_DG.Create<IDictionary_DG>();
to create the dictionary.The first imeplemented case is: type="IGeometry_DG" and params contains "Type" string with value one of geometry types: "BRep", "Mesh", etc.
See IEntity_DG.SetGeometryType().
Example:
void f(IObjectGenerator_DG gen, IDictionary_DG params)
{
params.SetString("Type", "Mesh");
IGeometry_DG geom = gen.Create("IGeometry_DG", params) as IGeometry_DG;
//Or
IGeometry_DG geom2 = gen.Create<IGeometry_DG>(params);
}
|