- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
iPart := ksPart(iDocument3D.GetPart( pNew_Part )); // новый компонент
if iPart <> nil then
begin
iSketchEntity := ksEntity( iPart.NewEntity( o3d_sketch ));
if iSketchEntity <> nil then
begin
// интерфейс свойств эскиза
iSketchDef := ksSketchDefinition(iSketchEntity.GetDefinition);
if iSketchDef <> nil then
begin
// интерфейс плоскости XOY
iPlaneEntity := ksEntity(iPart.GetDefaultEntity( o3d_planeXOY ));
if iPlaneEntity <> nil then
begin
iSketchDef.SetPlane( iPlaneEntity ); // установим плоскость XOY базовой для эскиза
iSketchEntity.Create; // создадим эскиз
// интерфейс редактора эскиза
iSketchDocument2D := ksDocument2D(iSketchDef.BeginEdit);
if iSketchDocument2D <> nil then
begin
... //сокращено для вашего благополучия
if iBossExtrusionDef <> nil then
begin
iExtrusionProperty := ksExtrusionPa-ram(iBossExtrusionDef.ExtrusionParam); // интерфейс структуры параметров выдавли-вания
iThinProperty := ksThinParam(iBossExtrusionDef.ThinParam); // интер-фейс структуры параметров тонкой стенки
if (iExtrusionProperty <> nil) and (iThinProperty <> nil ) then
begin
iBossExtrusionDef.SetSketch( iSketch2Entity ); // эскиз операции выдав-ливания
iExtrusionProperty.Direction := dtNormal; // направление выдавливания (прямое)
iExtrusionProperty.TypeNormal := etBlind; // тип выдавливания ( стро-го на глубину )
iExtrusionProperty.DepthNormal := 50; // глубина выдавливания
iThinProperty.Thin := false; // без тонкой стенки
iBossExtrusion.Create; // создадим операцию
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;
Form2.Close;
end;