Студопедия
Случайная страница | ТОМ-1 | ТОМ-2 | ТОМ-3
АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатика
ИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханика
ОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторика
СоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансы
ХимияЧерчениеЭкологияЭкономикаЭлектроника

Relationships

Читайте также:
  1. Behaviour and Interrelationships
  2. Chapter 5 Special Relationships
  3. Competitive advantage through quality relationships
  4. F) Informal Relationships
  5. II. Conflict in Relationships
  6. Look at the family tree below to find out the relationships of the persons shown on it. Then answer the questions.
  7. Note relationships

При интерактивном размещении деталей в сборке, мы определяем связь между деталями для управления их относительного расположения. Для выполнения этой задачи есть полноценный набор сборочных связей: зафиксировать, совместить, выровнять, выровнять по оси, вставить, соединить, угол, касание, кулачок, параллельность, совместимость СК и передача.

Объект Relationships представлен двумя коллекциями: Relations3d для объекта AssemblyDocument и Relations3d для каждого объекта Part. Первая коллекция позволяет выполнить итерации по всем связям в документе (AssemblyDocument). Вторая – по связям, определенным для этой конкретной детали (Part).

Существует пять видов 3D связей:

1. AngularRelation3d – определяет угол между двумя объектами ("Угол").

Add (object Element1, object Element2,

bool ReverseElement1Derection,

bool ReverseElement2Derection,

object MeasureElement1,

object MeasureElement2,

double Angle,

bool MeasureToPositiveSide,

bool MeasureFromPositiveSide,

bool MeasureCCW).

Параметры:

- Element1 и Element2 определяют элементы, на которые будут наложены связи;

- ReverseElement1Derection

- ReverseElement2Derection

- MeasureElement1 определяет ребро или грань первой детали, от которой будет изменяться угол;

- MeasureElement1 определяет ребро или грань второй детали, до которой будет изменяться угол;

- Angle – угол;

- MeasureToPositiveSide

- MeasureFromPositiveSide

- MeasureCCW определяет, будет ли угол изменяться по часовой стрелке.

2. AxialRelation3d – определяет связь между коническими гранями ("Выровнять по оси).

AddAxial (object Axis1, object Axis2,

bool NormalsAligned).

Параметры:

- Axis1 и Axis2 определяют объект Reference, содержащий цилиндрическую грань первой и второй детали соответственно.

- NormalsAligned определяет будут ли выровнены по нормали эти цилиндрические грани.

3. GroundRelation3d – фиксирует положение детали в пространстве ("Зафиксировать").

AddGround (SolidEdgeAssembly.Occurrence Occurrence)

4. PointRelation3d – применяется для соединения точек (вершин) с другими точками сборки ("Соединить").

AddPoint (object PointGeometry,

SolidEdgeAssembly.Relation3dGeometryConstants PointKeyPoint,

object ConnectGeometry,

[object ConnectKeyPoint = Type.Missing]).

Параметры:

- PointGeometry определяет объект Reference, содержащий геометрию, которая включает точки первого объекта;

- PointKeyPoint – постоянные из набора Relation3dGeometryConstants, которые определяют тип накладываемой связи;

- ConnectGeometry описывает объект Reference на основе геометрии, содержащей точку, до которой объект PointGeometry должен быть включен;

- ConnectKeyPoint – постоянные из набора Relation3dGeometryConstants, которые определяют тип накладываемой связи. Указывать ConnectKeyPoint не обязательно.

5. PlanarRelatoin3d – определяет связь между плоскими гранями ("Выровнять" или "Совместить").

AddPlanar (object Plane1, object Plane2,

bool NormalsAligned,

ref Array ConstrainingPoint1,

ref Array ConstrainingPoint2).

Параметры:

- Plane1 и Plane2 устанавливают объект Reference, содержащий грань или плоскость первой и второй деталей соответственно;

- NormalsAligned определяет, следует ли выровнять по нормали грани деталей. True – грани соединяются, False – выравниваются.

- ConstrainingPoint1 и ConstrainingPoint2 включают точки граней первой и второй деталей соответственно.

Эти пять методов определяют связи в сборке через автоматические интерфейсы: AddAngular, AddAxial, AddPlanar, AddGround, AddPoint. Это не совсем соответствует команде "Связи", которая доступна в интерактивном режиме. Тем не менее, они полностью с ними совпадают.

Например, метод AddPlanar может быть использован для создания или Mate (совместить) или Align (выровнять).

Для того чтобы программно создать связь, которая определяется интерактивной командой "Вставка", необходимо использовать методы AddAxial и AddPlanar. Указывая тем самым две цилиндрические грани, оси которых выровнены, и две плоские грани, которые совмещаются. Для удаления последней степени свободы нужно изменить осевую связь и установить в наборе FixedRotate значение true.

Связь "Соединить" идентична методу AddPoint. Первым вводимым параметром является ссылочный объект, соответствующий грани или ребру первой детали, второй параметр – константа, которая определяет, какая ключевая точка (key point) во входной геометрии определяет точку соединения (например, CenterPoint, EndPoint, MidPoint и т.д.), а третий и четвертый определяются аналогично первым двум только для второй детали.

В рамках этого общего описания есть несколько важных уточнений. В методах, описанных выше, происходит обращение к ссылочным объектам (object Reference), которые определяют геометрию детали. Каждая связь в сборке должна сохранять информацию о способе ее извлечения. Например, при использовании метода AddPlanar нам необходимо передать ссылки на две плоские грани или плоскости.

Так же для создания сборочной связи через автоматизированный интерфейс объект Occurrence должен быть расположен в документе Assembly (используем метод AddByFilename). При добавлении новой детали в сборку на нее автоматически накладывается связь Ground. Для добавляемой в сборку детали это означит, что начало координат детали совмещается с началом координат сборки и в этом положении деталь лишается всех степеней свободы.

Таким образом, прежде чем применять другие связи между Occurrence и другими сборками, отношение Ground должно быть удалено. Это уточнение актуально для всех добавляемых Occurrence, кроме первой детали. Размещение первой детали в сборке является важным моментом. Первая деталь служит основой, на которой будет строиться вся сборка. Поэтому первая деталь должна по возможности представлять собой основной компонент сборки. Если все-таки существует надобность в перемещении первой детали, сначала удаляется ее связь Ground. Затем к ней можно будет применить другие сборочные связи.

 

Рассмотрим на примере пневматического цилиндра процесс реализации сборки.

Создаем документ «Сблорка» и определяем необходимые переменные

 

SolidEdgeAssembly.AssemblyDocument assembly = null;

SolidEdgeAssembly.Occurrences occurrences = null;

SolidEdgeAssembly.Occurrence occurrence1 = null; //пуансон

SolidEdgeAssembly.Occurrence occurrence2 = null; //держатель пуансона

SolidEdgeAssembly.Occurrence occurrence3 = null; //плита верхняя

SolidEdgeAssembly.Occurrence occurrence4 = null; //упор

SolidEdgeAssembly.Occurrence occurrence5 = null; //матрица левая

SolidEdgeAssembly.Occurrence occurrence6 = null; //матрица левая

SolidEdgeAssembly.Occurrence occurrence7 = null; //матрица левая

SolidEdgeAssembly.Occurrence occurrence8 = null; //матрица левая

SolidEdgeAssembly.Occurrence occurrence9 = null; //матрица левая

SolidEdgePart.PartDocument part = null;

SolidEdgePart.Models models = null;

SolidEdgePart.Model model = null;

SolidEdgeGeometry.Faces faces = null;

 

SolidEdgeFramework.Documents documents = null;

SolidEdgeFramework.Application application = null;

Type type = null;

 

SolidEdgeGeometry.Face shtok_cyl = null;

SolidEdgeGeometry.Face por_hole_cyl = null;

SolidEdgeGeometry.Face por_plane = null;

SolidEdgeGeometry.Face shtok_plane = null;

SolidEdgeGeometry.Face niz_cone_cyl = null;

SolidEdgeGeometry.Face niz_plane_prot2 = null;

SolidEdgeGeometry.Face por_plane2 = null;

SolidEdgeGeometry.Face niz_plane_cut = null;

SolidEdgeGeometry.Face gil_plane = null;

SolidEdgeGeometry.Face gil_cyl = null;

SolidEdgeGeometry.Face niz_prot2_cyl = null;

SolidEdgeGeometry.Face verx_prot2_plane = null;

SolidEdgeGeometry.Face shtok_plane2 = null;

SolidEdgeGeometry.Face verx_cyl = null;

SolidEdgeGeometry.Face verx_hole3_cyl = null;

SolidEdgeGeometry.Face niz_hole2_cyl = null;

SolidEdgeGeometry.Face st1_cyl = null; //цилиндрическая грань первого стержня

SolidEdgeGeometry.Face st2_cyl = null; //цилиндрическая грань первого стержня

SolidEdgeGeometry.Face st3_cyl = null; //цилиндрическая грань первого стержня

SolidEdgeGeometry.Face st4_cyl = null; //цилиндрическая грань первого стержня

SolidEdgeGeometry.Face verx_hole1_cyl = null;

SolidEdgeGeometry.Face verx_hole2_cyl = null;

SolidEdgeGeometry.Face verx_hole4_cyl = null;

SolidEdgeGeometry.Face verx_prot3_plane = null;

SolidEdgeGeometry.Face st1_plane = null;

SolidEdgeGeometry.Face st2_plane = null;

SolidEdgeGeometry.Face st3_plane = null;

SolidEdgeGeometry.Face st4_plane = null;

 

SolidEdgeFramework.Reference refshtok_cyl = null;

SolidEdgeFramework.Reference refpor_hole_cyl = null;

SolidEdgeFramework.Reference refpor_plane = null;

SolidEdgeFramework.Reference refshtok_plane = null;

SolidEdgeFramework.Reference refniz_hole_cyl = null;

SolidEdgeFramework.Reference refniz_plane_prot2 = null;

SolidEdgeFramework.Reference refpor_plane2 = null;

SolidEdgeFramework.Reference refniz_plane_cut = null;

SolidEdgeFramework.Reference refgil_plane = null;

SolidEdgeFramework.Reference refgil_cyl = null;

SolidEdgeFramework.Reference refniz_prot2_cyl = null;

SolidEdgeFramework.Reference refverx_prot2_plane = null;

SolidEdgeFramework.Reference refshtok_plane2 = null;

SolidEdgeFramework.Reference refverx_cyl = null;

SolidEdgeFramework.Reference refverx_hole3_cyl = null;

SolidEdgeFramework.Reference refniz_hole2_cyl = null;

SolidEdgeFramework.Reference refst1_cyl = null;

SolidEdgeFramework.Reference refst2_cyl = null;

SolidEdgeFramework.Reference refst3_cyl = null;

SolidEdgeFramework.Reference refst4_cyl = null;

SolidEdgeFramework.Reference refverx_hole1_cyl = null;

SolidEdgeFramework.Reference refverx_hole2_cyl = null;

SolidEdgeFramework.Reference refverx_hole4_cyl = null;

SolidEdgeFramework.Reference refverx_prot3_plane = null;

SolidEdgeFramework.Reference refst1_plane = null;

SolidEdgeFramework.Reference refst2_plane = null;

SolidEdgeFramework.Reference refst3_plane = null;

SolidEdgeFramework.Reference refst4_plane = null;

 

SolidEdgeAssembly.Relations3d relations3d = null;

SolidEdgeAssembly.GroundRelation3d groundRelation3d = null;

SolidEdgeAssembly.AxialRelation3d relshtok_por_cyl = null; //связь штока и поршня по цилиндрам

SolidEdgeAssembly.PlanarRelation3d relshtok_por_plane = null; //связь штока и поршня по цилиндрам

SolidEdgeAssembly.AxialRelation3d relshtok_niz_cyl = null; //связь штока и нижней крышки по цилиндрам

SolidEdgeAssembly.PlanarRelation3d relniz_por_plane = null;

SolidEdgeAssembly.PlanarRelation3d relgil_niz_plane = null;

SolidEdgeAssembly.AxialRelation3d relgil_niz_cyl = null;

SolidEdgeAssembly.PlanarRelation3d relverx_shtok_plane = null;

SolidEdgeAssembly.AxialRelation3d relverx_shtok_cyl = null;

SolidEdgeAssembly.AxialRelation3d relverx_niz_cyl = null;

SolidEdgeAssembly.AxialRelation3d relverx_st_cyl1 = null;

SolidEdgeAssembly.AxialRelation3d relverx_st_cyl2 = null;

SolidEdgeAssembly.AxialRelation3d relverx_st_cyl3 = null;

SolidEdgeAssembly.AxialRelation3d relverx_st_cyl4 = null;

SolidEdgeAssembly.PlanarRelation3d relverx_st_plane1 = null;

SolidEdgeAssembly.PlanarRelation3d relverx_st_plane2 = null;

SolidEdgeAssembly.PlanarRelation3d relverx_st_plane3 = null;

SolidEdgeAssembly.PlanarRelation3d relverx_st_plane4 = null;

 

// Get the type from the Solid Edge ProgID

type = Type.GetTypeFromProgID("SolidEdge.Application");

 

// Start Solid Edge

application = (SolidEdgeFramework.Application)

Activator.CreateInstance(type);

 

// Make Solid Edge visible

application.Visible = true;

 

// Turn off alerts.Weldment environment will display a warning

application.DisplayAlerts = false;

 

Подгружаем в нашу сборку детали, построение которых организовано в подключаемых библиотеках. Построение деталей происходит на отдельных документах по выбранным параметрам.

 

Part1 myPart1 = new Part1();

myPart1.Create(); //строим первую деталь

myPart1.Save(s1);

 

Part2 myPart2 = new Part2();

myPart2.Create(); //строим первую деталь

myPart2.Save(s2);

 

Part3 myPart3 = new Part3();

myPart3.Create(); //строим первую деталь

myPart3.Save(s3);

 

Part4 myPart4 = new Part4();

myPart4.Create(); //строим первую деталь

myPart4.Save(s4);

 

Part5 myPart5 = new Part5();

myPart5.Create(); //строим первую деталь

myPart5.Save(s5);

 

Part6 myPart6 = new Part6();

myPart6.Create(); //строим первую деталь

myPart6.Save(s6);

 

// Connect to a running instance of Solid Edge

application = (SolidEdgeFramework.Application)

Marshal.GetActiveObject("SolidEdge.Application");

// Get a reference to the documents collection

documents = application.Documents;

 

assembly = (SolidEdgeAssembly.AssemblyDocument)

documents.Add("SolidEdge.AssemblyDocument", Missing.Value);

// коллекция деталей, входящих в сборку

occurrences = assembly.Occurrences;

occurrence1 = occurrences.AddByFilename(s5);

part = (SolidEdgePart.PartDocument)occurrence1.OccurrenceDocument;

 

Создаем коллекцию моделей

models = part.Models;

 

Выбираем одну модель из коллекции

model = models.Item(1);

faces = model.RevolvedProtrusions.Item(1).get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants. igQueryCylinder);

shtok_cyl = faces.Item(3);

refshtok_cyl = (SolidEdgeFramework.Reference)assembly.CreateReference(

occurrence1, shtok_cyl);

 

faces = model.RevolvedProtrusions.Item(1).get_Faces(

SolidEdgeGeometry.FeatureTopologyQueryTypeConstants. igQueryPlane);

shtok_plane = faces.Item(3);

shtok_plane2 = faces.Item(2);

refshtok_plane = (SolidEdgeFramework.Reference)assembly.CreateReference(

occurrence1, shtok_plane);

refshtok_plane2 = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence1, shtok_plane2);

occurrence2 = occurrences.AddByFilename(s4);

// Get a reference to the occurrence document

part = (SolidEdgePart.PartDocument)occurrence2. OccurrenceDocument;

// Get a reference to the models collection

models = part.Models;

model = models.Item(1);

 

faces = model.Holes.Item(1).get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryCylinder);

por_hole_cyl = faces.Item(1);

refpor_hole_cyl = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence2, por_hole_cyl);

 

faces = model.RevolvedProtrusions.Item(1).get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane);

por_plane = faces.Item(1);

por_plane2 = faces.Item(8);

refpor_plane = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence2, por_plane);

refpor_plane2 = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence2, por_plane2);

 

relations3d = assembly.Relations3d;

groundRelation3d = (SolidEdgeAssembly.GroundRelation3d)

relations3d.Item(relations3d.Count);

groundRelation3d.Delete();

 

relshtok_por_cyl = relations3d.AddAxial(

refpor_hole_cyl, refshtok_cyl, true);

relshtok_por_plane = relations3d.AddPlanar(

refshtok_plane, refpor_plane, true, A, B);

 

occurrence3 = occurrences.AddByFilename(s2);

// Get a reference to the occurrence document

part = (SolidEdgePart.PartDocument)occurrence3. OccurrenceDocument;

// Get a reference to the models collection

models = part.Models;

model = models.Item(1);

 

faces = model.Holes.Item(5).get_Faces(

SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryCone);

niz_cone_cyl = faces.Item(1);

refniz_hole_cyl = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence3, niz_cone_cyl);

 

faces = model.ExtrudedProtrusions.Item(2).get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane);

niz_plane_prot2 = faces.Item(1);

refniz_plane_prot2 = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence3, niz_plane_prot2);

 

faces = model.ExtrudedCutouts.Item(1).get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane);

niz_plane_cut = faces.Item(1);

refniz_plane_cut = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence3, niz_plane_cut);

 

faces = model.ExtrudedProtrusions.Item(2).get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryCylinder);

niz_prot2_cyl = faces.Item(1);

refniz_prot2_cyl = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence3, niz_prot2_cyl);

 

faces = model.Holes.Item(2).get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryCylinder);

niz_hole2_cyl = faces.Item(1);

refniz_hole2_cyl = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence3, niz_hole2_cyl);

 

relations3d = assembly.Relations3d;

groundRelation3d = (SolidEdgeAssembly.GroundRelation3d)

relations3d.Item(relations3d.Count);

groundRelation3d.Delete();

relshtok_niz_cyl = relations3d.AddAxial(refniz_hole_cyl, refshtok_cyl, true);

relniz_por_plane = relations3d.AddPlanar(refniz_plane_prot2, refpor_plane2, true, A, B);

 

occurrence4 = occurrences.AddByFilename(s1);

// Get a reference to the occurrence document

part = (SolidEdgePart.PartDocument)occurrence4. OccurrenceDocument;

// Get a reference to the models collection

models = part.Models;

model = models.Item(1);

 

faces = model.ExtrudedProtrusions.Item(1). get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane);

gil_plane = faces.Item(1);

refgil_plane = (SolidEdgeFramework.Reference)assembly. CreateReference(occurrence4, gil_plane);

 

faces = model.ExtrudedProtrusions.Item(1).get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryCylinder);

gil_cyl = faces.Item(1);

refgil_cyl = (SolidEdgeFramework.Reference)assembly. CreateReference(occurrence4, gil_cyl);

 

relations3d = assembly.Relations3d;

groundRelation3d = (SolidEdgeAssembly.GroundRelation3d)

relations3d.Item(relations3d.Count);

groundRelation3d.Delete();

relgil_niz_plane = relations3d.AddPlanar(refgil_plane, refniz_plane_cut, true, A, B);

relgil_niz_cyl = relations3d.AddAxial(refgil_cyl, refniz_prot2_cyl, true);

 

occurrence5 = occurrences.AddByFilename(s3);

// Get a reference to the occurrence document

part = (SolidEdgePart.PartDocument)occurrence5. OccurrenceDocument;

// Get a reference to the models collection

models = part.Models;

model = models.Item(1);

 

faces = model.ExtrudedProtrusions.Item(2).get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane);

verx_prot2_plane = faces.Item(1);

refverx_prot2_plane = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence5, verx_prot2_plane);

 

faces = model.ExtrudedProtrusions.Item(3).get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane);

verx_prot3_plane = faces.Item(1);

refverx_prot3_plane = (SolidEdgeFramework.Reference)assembly. CreateReference(o ccurrence5, verx_prot3_plane);

 

faces = model.Holes.Item(5).get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryCylinder);

verx_cyl = faces.Item(1);

refverx_cyl = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence5, verx_cyl);

 

faces = model.Holes.Item(3).get_Faces(SolidEdgeGeometry. FeatureTopologyQueryTypeConstants.igQueryCylinder);

verx_hole3_cyl = faces.Item(1);

refverx_hole3_cyl = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence5, verx_hole3_cyl);

 

faces = model.Holes.Item(1).get_Faces(SolidEdgeGeometry. FeatureTopologyQueryTypeConstants.igQueryCylinder);

verx_hole1_cyl = faces.Item(1);

refverx_hole1_cyl = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence5, verx_hole1_cyl);

 

faces = model.Holes.Item(2).get_Faces(SolidEdgeGeometry. FeatureTopologyQueryTypeConstants.igQueryCylinder);

verx_hole2_cyl = faces.Item(1);

refverx_hole2_cyl = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence5, verx_hole2_cyl);

 

faces = model.Holes.Item(4).get_Faces(SolidEdgeGeometry. FeatureTopologyQueryTypeConstants.igQueryCylinder);

verx_hole4_cyl = faces.Item(1);

refverx_hole4_cyl = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence5, verx_hole4_cyl);

 

relations3d = assembly.Relations3d;

groundRelation3d = (SolidEdgeAssembly.GroundRelation3d)

relations3d.Item(relations3d.Count);

groundRelation3d.Delete();

 

relverx_shtok_plane = relations3d.AddPlanar(refverx_prot2_plane, refshtok_plane2, true, A, B);

relverx_shtok_cyl = relations3d.AddAxial(refverx_cyl, refshtok_cyl, false);

relverx_niz_cyl = relations3d.AddAxial(refverx_hole3_cyl, refniz_hole2_cyl, true);

 

occurrence6 = occurrences.AddByFilename(s6);

// Get a reference to the occurrence document

part = (SolidEdgePart.PartDocument)occurrence6. OccurrenceDocument;

// Get a reference to the models collection

models = part.Models;

model = models.Item(1);

 

relations3d = assembly.Relations3d;

groundRelation3d = (SolidEdgeAssembly.GroundRelation3d)

relations3d.Item(relations3d.Count);

groundRelation3d.Delete();

 

faces = model.ExtrudedProtrusions.Item(1). get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryCylinder);

st1_cyl = faces.Item(1);

refst1_cyl = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence6, st1_cyl);

 

faces = model.ExtrudedProtrusions.Item(1). get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane);

st1_plane = faces.Item(2);

refst1_plane = (SolidEdgeFramework.Reference)assembly.CreateReference(occurrence6, st1_plane);

 

relverx_st_cyl1 = relations3d.AddAxial(refst1_cyl, refverx_hole1_cyl, true);

relverx_st_plane1 = relations3d.AddPlanar(refst1_plane, refverx_prot3_plane, false, A, B);

 

occurrence7 = occurrences.AddByFilename(s6);

// Get a reference to the occurrence document

part = (SolidEdgePart.PartDocument)occurrence7. OccurrenceDocument;

// Get a reference to the models collection

models = part.Models;

model = models.Item(1);

 

relations3d = assembly.Relations3d;

groundRelation3d = (SolidEdgeAssembly.GroundRelation3d)

relations3d.Item(relations3d.Count);

groundRelation3d.Delete();

 

faces = model.ExtrudedProtrusions.Item(1). get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryCylinder);

st2_cyl = faces.Item(1);

refst2_cyl = (SolidEdgeFramework.Reference)assembly. CreateReference(occurrence7, st2_cyl);

 

faces = model.ExtrudedProtrusions.Item(1). get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane);

st2_plane = faces.Item(2);

refst2_plane = (SolidEdgeFramework.Reference)assembly. CreateReference(occurrence7, st2_plane);

 

relverx_st_cyl2 = relations3d.AddAxial(refst2_cyl, refverx_hole2_cyl, true);

relverx_st_plane2 = relations3d.AddPlanar(refst2_plane, refverx_prot3_plane, false, A, B);

 

occurrence8 = occurrences.AddByFilename(s6);

// Get a reference to the occurrence document

part = (SolidEdgePart.PartDocument)occurrence8. OccurrenceDocument;

// Get a reference to the models collection

models = part.Models;

model = models.Item(1);

 

relations3d = assembly.Relations3d;

groundRelation3d = (SolidEdgeAssembly.GroundRelation3d)

relations3d.Item(relations3d.Count);

groundRelation3d.Delete();

 

faces = model.ExtrudedProtrusions.Item(1). get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryCylinder);

st3_cyl = faces.Item(1);

refst3_cyl = (SolidEdgeFramework.Reference)assembly. CreateReference(occurrence8, st3_cyl);

 

faces = model.ExtrudedProtrusions.Item(1). get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane);

st3_plane = faces.Item(2);

refst3_plane = (SolidEdgeFramework.Reference)assembly. CreateReference(occurrence8, st3_plane);

 

relverx_st_cyl3 = relations3d.AddAxial(refst3_cyl, refverx_hole3_cyl, true);

relverx_st_plane3 = relations3d.AddPlanar(refst3_plane, refverx_prot3_plane, false, A, B);

 

occurrence9 = occurrences.AddByFilename(s6);

// Get a reference to the occurrence document

part = (SolidEdgePart.PartDocument)occurrence9. OccurrenceDocument;

// Get a reference to the models collection

models = part.Models;

model = models.Item(1);

 

relations3d = assembly.Relations3d;

groundRelation3d = (SolidEdgeAssembly.GroundRelation3d)

relations3d.Item(relations3d.Count);

groundRelation3d.Delete();

 

faces = model.ExtrudedProtrusions.Item(1). get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryCylinder);

st4_cyl = faces.Item(1);

refst4_cyl = (SolidEdgeFramework.Reference)assembly. CreateReference(occurrence9, st4_cyl);

 

faces = model.ExtrudedProtrusions.Item(1). get_Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane);

st4_plane = faces.Item(2);

refst4_plane = (SolidEdgeFramework.Reference)assembly. CreateReference(occurrence9, st4_plane);

 

relverx_st_cyl4 = relations3d.AddAxial(refst4_cyl, refverx_hole4_cyl, true);

relverx_st_plane4 = relations3d.AddPlanar(refst4_plane, refverx_prot3_plane, false, A, B);

 

В результате построения получим сборку для наглядности которой разнесем ее элементы

 

Рисунок 12 – Разнесенная сборка


Дата добавления: 2015-10-29; просмотров: 75 | Нарушение авторских прав


<== предыдущая страница | следующая страница ==>
Коллекция параметров отверстия| Система подачи топлива (CB400N)

mybiblioteka.su - 2015-2024 год. (0.069 сек.)