973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | //:k8 abv 6 Jan 99: unique names for PRODUCT_DEFINITION_FORMATIONs |
15 | //:k9 abv 6 Jan 99: TR10: eliminating duplicated APPLICATION_CONTEXT entities |
16 | //:j4 gka 16.03.99 S4134 |
17 | // abv 20.11.99 renamed from StepPDR_SDRtool |
7fd59977 |
18 | |
42cf5bc1 |
19 | #include <Interface_Static.hxx> |
20 | #include <StepBasic_ApplicationContext.hxx> |
21 | #include <StepBasic_DesignContext.hxx> |
22 | #include <StepBasic_HArray1OfProduct.hxx> |
23 | #include <StepBasic_HArray1OfProductContext.hxx> |
24 | #include <StepBasic_MechanicalContext.hxx> |
25 | #include <StepBasic_Product.hxx> |
26 | #include <StepBasic_ProductContext.hxx> |
7fd59977 |
27 | #include <StepBasic_ProductDefinition.hxx> |
28 | #include <StepBasic_ProductDefinitionContext.hxx> |
29 | #include <StepBasic_ProductDefinitionFormation.hxx> |
30 | #include <StepBasic_ProductDefinitionFormationWithSpecifiedSource.hxx> |
42cf5bc1 |
31 | #include <StepBasic_ProductRelatedProductCategory.hxx> |
7fd59977 |
32 | #include <StepBasic_ProductType.hxx> |
42cf5bc1 |
33 | #include <STEPConstruct_Part.hxx> |
7fd59977 |
34 | #include <StepRepr_ProductDefinitionShape.hxx> |
7fd59977 |
35 | #include <StepShape_ShapeDefinitionRepresentation.hxx> |
42cf5bc1 |
36 | #include <StepShape_ShapeRepresentation.hxx> |
37 | #include <TCollection_HAsciiString.hxx> |
7fd59977 |
38 | |
39 | // ------------------------------ |
40 | // Modification a faire : |
41 | // ApplicationProtocolDefinition status |
42 | // ApplicationProtocolDefinition year |
43 | // ApplicationProtocolDefinition schema_name |
44 | // ces information ne sont plus accessibles en parcourant le graphe a partir |
45 | // du ShapeDefinitionRepresentation. |
46 | // Elles se trouvent dans Cc1 au niveau d`une entite racine ! |
47 | // ------------------------------ |
7fd59977 |
48 | //======================================================================= |
49 | //function : STEPConstruct_Part |
50 | //purpose : |
51 | //======================================================================= |
7fd59977 |
52 | STEPConstruct_Part::STEPConstruct_Part() |
53 | { |
54 | myDone = Standard_False; |
55 | } |
56 | |
57 | //======================================================================= |
58 | //function : MakeSDR |
59 | //purpose : |
60 | //======================================================================= |
61 | |
62 | void STEPConstruct_Part::MakeSDR(const Handle(StepShape_ShapeRepresentation)& SR, |
63 | const Handle(TCollection_HAsciiString)& aName, |
64 | const Handle(StepBasic_ApplicationContext)& AC) |
65 | { |
66 | // get current schema |
67 | Standard_Integer schema = Interface_Static::IVal("write.step.schema"); |
68 | |
69 | // create PC |
70 | Handle(StepBasic_ProductContext) PC; |
71 | switch (schema) { |
72 | default : |
73 | case 1: PC = new StepBasic_MechanicalContext; |
74 | break; |
75 | case 4: |
d658f275 |
76 | case 5: |
7fd59977 |
77 | case 2: PC = new StepBasic_ProductContext; |
78 | break; |
79 | case 3: PC = new StepBasic_MechanicalContext; |
80 | break; |
81 | } |
82 | Handle(TCollection_HAsciiString) PCname = new TCollection_HAsciiString(""); |
83 | Handle(TCollection_HAsciiString) PCdisciplineType = |
84 | new TCollection_HAsciiString("mechanical"); |
85 | PC->Init(PCname, AC, PCdisciplineType); |
86 | |
87 | // create product |
88 | Handle(StepBasic_Product) P = new StepBasic_Product; |
89 | Handle(StepBasic_HArray1OfProductContext) PCs = new StepBasic_HArray1OfProductContext(1,1); |
90 | PCs->SetValue(1,PC); |
91 | Handle(TCollection_HAsciiString) Pdescription = new TCollection_HAsciiString(""); |
92 | P->Init(aName, aName, Pdescription, PCs); |
93 | |
94 | // create PDF |
95 | Handle(StepBasic_ProductDefinitionFormation) PDF; |
96 | switch (schema) { |
97 | default: |
98 | case 1: |
d658f275 |
99 | case 2: |
100 | case 5: PDF = new StepBasic_ProductDefinitionFormation; |
7fd59977 |
101 | break; |
102 | case 3: PDF = new StepBasic_ProductDefinitionFormationWithSpecifiedSource; |
103 | Handle(StepBasic_ProductDefinitionFormationWithSpecifiedSource)::DownCast(PDF)-> |
104 | SetMakeOrBuy(StepBasic_sNotKnown); |
105 | break; |
106 | } |
107 | Handle(TCollection_HAsciiString) PDFName = new TCollection_HAsciiString(""); |
108 | Handle(TCollection_HAsciiString) PDFdescription = new TCollection_HAsciiString(""); |
109 | PDF->Init(PDFName, PDFdescription, P); |
110 | |
111 | // create PDC, depending on current schema |
112 | Handle(StepBasic_ProductDefinitionContext) PDC; |
113 | Handle(TCollection_HAsciiString) PDCname; |
114 | switch (schema) { |
115 | default: |
116 | case 1: |
d658f275 |
117 | case 2: |
118 | case 5: PDC = new StepBasic_ProductDefinitionContext; |
7fd59977 |
119 | PDCname = new TCollection_HAsciiString ("part definition"); |
120 | break; |
121 | case 3: PDC = new StepBasic_DesignContext; |
122 | PDCname = new TCollection_HAsciiString(""); |
123 | break; |
124 | } |
125 | Handle(TCollection_HAsciiString) PDClifeCycleStage = new TCollection_HAsciiString("design"); |
126 | PDC->Init(PDCname, AC, PDClifeCycleStage); |
127 | |
128 | // create PD |
129 | Handle(StepBasic_ProductDefinition) PD = new StepBasic_ProductDefinition; |
130 | Handle(TCollection_HAsciiString) PDId = new TCollection_HAsciiString("design"); |
131 | Handle(TCollection_HAsciiString) PDdescription = new TCollection_HAsciiString(""); |
132 | PD->Init(PDId, PDdescription, PDF, PDC); |
133 | |
134 | // create PDS |
135 | Handle(StepRepr_ProductDefinitionShape) PDS = new StepRepr_ProductDefinitionShape; |
136 | Handle(TCollection_HAsciiString) PDSname = new TCollection_HAsciiString(""); |
137 | Handle(TCollection_HAsciiString) PDSdescription = new TCollection_HAsciiString(""); |
138 | StepRepr_CharacterizedDefinition CD; |
139 | CD.SetValue(PD); |
140 | PDS->Init(PDSname, Standard_True, PDSdescription, CD); |
141 | |
142 | // finally, create SDR |
143 | mySDR = new StepShape_ShapeDefinitionRepresentation; |
144 | StepRepr_RepresentedDefinition RD; |
145 | RD.SetValue ( PDS ); |
146 | mySDR->Init(RD, SR); |
147 | |
148 | // and an associated PRPC |
149 | Handle(TCollection_HAsciiString) PRPCName; |
150 | switch (Interface_Static::IVal("write.step.schema")) { |
151 | default: |
152 | case 1: |
153 | myPRPC = new StepBasic_ProductType; |
154 | PRPCName = new TCollection_HAsciiString("part") ; |
155 | break; |
156 | case 4: |
d658f275 |
157 | case 2: |
158 | case 5: |
7fd59977 |
159 | myPRPC = new StepBasic_ProductRelatedProductCategory; |
160 | PRPCName = new TCollection_HAsciiString("part"); |
161 | break; |
162 | case 3: |
163 | myPRPC = new StepBasic_ProductRelatedProductCategory; |
164 | PRPCName = new TCollection_HAsciiString("detail"); // !!!!! or "assembly" |
165 | break; |
166 | } |
167 | Handle(StepBasic_HArray1OfProduct) PRPCproducts = new StepBasic_HArray1OfProduct(1,1); |
168 | PRPCproducts->SetValue(1,P); |
169 | myPRPC->Init ( PRPCName, Standard_False, 0, PRPCproducts ); |
170 | |
171 | myDone = Standard_True; |
172 | } |
173 | |
174 | //======================================================================= |
175 | //function : ReadSDR |
176 | //purpose : |
177 | //======================================================================= |
178 | |
179 | void STEPConstruct_Part::ReadSDR(const Handle(StepShape_ShapeDefinitionRepresentation)& aShape) |
180 | { |
181 | mySDR = aShape; |
182 | myDone = ( ! mySDR.IsNull() ); |
183 | } |
184 | |
185 | //======================================================================= |
186 | //function : IsDone |
187 | //purpose : |
188 | //======================================================================= |
189 | |
190 | Standard_Boolean STEPConstruct_Part::IsDone() const |
191 | { |
192 | return myDone; |
193 | } |
194 | |
195 | //======================================================================= |
196 | //function : SDRValue |
197 | //purpose : |
198 | //======================================================================= |
199 | |
200 | Handle(StepShape_ShapeDefinitionRepresentation) STEPConstruct_Part::SDRValue() const |
201 | { |
202 | return mySDR; |
203 | } |
204 | |
205 | //======================================================================= |
206 | //function : SRValue |
207 | //purpose : |
208 | //======================================================================= |
209 | |
210 | Handle(StepShape_ShapeRepresentation) STEPConstruct_Part::SRValue() const |
211 | { |
212 | if ( ! myDone ) return 0; |
213 | return Handle(StepShape_ShapeRepresentation)::DownCast(mySDR->UsedRepresentation()); |
214 | } |
215 | |
216 | //======================================================================= |
217 | //function : PCname |
218 | //purpose : |
219 | //======================================================================= |
220 | |
221 | Handle(TCollection_HAsciiString) STEPConstruct_Part::PCname() const |
222 | { |
223 | return mySDR->Definition().PropertyDefinition() |
224 | ->Definition().ProductDefinition() |
225 | ->Formation() |
226 | ->OfProduct() |
227 | ->FrameOfReferenceValue(1) |
228 | ->Name(); |
229 | } |
230 | |
231 | //======================================================================= |
232 | //function : PC |
233 | //purpose : |
234 | //======================================================================= |
235 | |
236 | Handle(StepBasic_ProductContext) STEPConstruct_Part::PC() const |
237 | { |
238 | return mySDR->Definition().PropertyDefinition() |
239 | ->Definition().ProductDefinition() |
240 | ->Formation() |
241 | ->OfProduct() |
242 | ->FrameOfReferenceValue(1); |
243 | } |
244 | |
245 | //======================================================================= |
246 | //function : PCdisciplineType |
247 | //purpose : |
248 | //======================================================================= |
249 | |
250 | Handle(TCollection_HAsciiString) STEPConstruct_Part::PCdisciplineType() const |
251 | { |
252 | return mySDR->Definition().PropertyDefinition() |
253 | ->Definition().ProductDefinition() |
254 | ->Formation() |
255 | ->OfProduct() |
256 | ->FrameOfReferenceValue(1) |
257 | ->DisciplineType(); |
258 | |
259 | } |
260 | |
261 | //======================================================================= |
262 | //function : SetPCname |
263 | //purpose : |
264 | //======================================================================= |
265 | |
266 | void STEPConstruct_Part::SetPCname(const Handle(TCollection_HAsciiString)& name) |
267 | { |
268 | mySDR->Definition().PropertyDefinition() |
269 | ->Definition().ProductDefinition() |
270 | ->Formation() |
271 | ->OfProduct() |
272 | ->FrameOfReferenceValue(1) |
273 | ->SetName(name); |
274 | } |
275 | |
276 | //======================================================================= |
277 | //function : SetPCdisciplineType |
278 | //purpose : |
279 | //======================================================================= |
280 | |
281 | void STEPConstruct_Part::SetPCdisciplineType(const Handle(TCollection_HAsciiString)& label) |
282 | { |
283 | mySDR->Definition().PropertyDefinition() |
284 | ->Definition().ProductDefinition() |
285 | ->Formation() |
286 | ->OfProduct() |
287 | ->FrameOfReferenceValue(1) |
288 | ->SetDisciplineType(label); |
289 | } |
290 | |
291 | //======================================================================= |
292 | //function : AC |
293 | //purpose : |
294 | //======================================================================= |
295 | |
296 | Handle(StepBasic_ApplicationContext) STEPConstruct_Part::AC() const |
297 | { |
298 | return mySDR->Definition().PropertyDefinition() |
299 | ->Definition().ProductDefinition() |
300 | ->Formation() |
301 | ->OfProduct() |
302 | ->FrameOfReferenceValue(1) |
303 | ->FrameOfReference(); |
304 | } |
305 | |
306 | //======================================================================= |
307 | //function : ACapplication |
308 | //purpose : |
309 | //======================================================================= |
310 | |
311 | Handle(TCollection_HAsciiString) STEPConstruct_Part::ACapplication() const |
312 | { |
313 | return mySDR->Definition().PropertyDefinition() |
314 | ->Definition().ProductDefinition() |
315 | ->Formation() |
316 | ->OfProduct() |
317 | ->FrameOfReferenceValue(1) |
318 | ->FrameOfReference() |
319 | ->Application(); |
320 | } |
321 | |
322 | //======================================================================= |
323 | //function : SetACapplication |
324 | //purpose : |
325 | //======================================================================= |
326 | |
327 | void STEPConstruct_Part::SetACapplication(const Handle(TCollection_HAsciiString)& text) |
328 | { |
329 | mySDR->Definition().PropertyDefinition() |
330 | ->Definition().ProductDefinition() |
331 | ->Formation() |
332 | ->OfProduct() |
333 | ->FrameOfReferenceValue(1) |
334 | ->FrameOfReference() |
335 | ->SetApplication(text); |
336 | |
337 | } |
338 | |
339 | //======================================================================= |
340 | //function : PDC |
341 | //purpose : |
342 | //======================================================================= |
343 | |
344 | Handle(StepBasic_ProductDefinitionContext) STEPConstruct_Part::PDC() const |
345 | { |
346 | return mySDR->Definition().PropertyDefinition() |
347 | ->Definition().ProductDefinition() |
348 | ->FrameOfReference(); |
349 | } |
350 | |
351 | //======================================================================= |
352 | //function : PDCname |
353 | //purpose : |
354 | //======================================================================= |
355 | |
356 | Handle(TCollection_HAsciiString) STEPConstruct_Part::PDCname() const |
357 | { |
358 | return mySDR->Definition().PropertyDefinition() |
359 | ->Definition().ProductDefinition() |
360 | ->FrameOfReference() |
361 | ->Name(); |
362 | } |
363 | |
364 | //======================================================================= |
365 | //function : PDCstage |
366 | //purpose : |
367 | //======================================================================= |
368 | |
369 | Handle(TCollection_HAsciiString) STEPConstruct_Part::PDCstage() const |
370 | { |
371 | return mySDR->Definition().PropertyDefinition() |
372 | ->Definition().ProductDefinition() |
373 | ->FrameOfReference() |
374 | ->LifeCycleStage(); |
375 | |
376 | } |
377 | |
378 | //======================================================================= |
379 | //function : SetPDCname |
380 | //purpose : |
381 | //======================================================================= |
382 | |
383 | void STEPConstruct_Part::SetPDCname(const Handle(TCollection_HAsciiString)& label) |
384 | { |
385 | mySDR->Definition().PropertyDefinition() |
386 | ->Definition().ProductDefinition() |
387 | ->FrameOfReference() |
388 | ->SetName(label); |
389 | } |
390 | |
391 | //======================================================================= |
392 | //function : SetPDCstage |
393 | //purpose : |
394 | //======================================================================= |
395 | |
396 | void STEPConstruct_Part::SetPDCstage(const Handle(TCollection_HAsciiString)& label) |
397 | { |
398 | mySDR->Definition().PropertyDefinition() |
399 | ->Definition().ProductDefinition() |
400 | ->FrameOfReference() |
401 | ->SetLifeCycleStage(label); |
402 | } |
403 | |
404 | //======================================================================= |
405 | //function : Product |
406 | //purpose : |
407 | //======================================================================= |
408 | |
409 | Handle(StepBasic_Product) STEPConstruct_Part::Product() const |
410 | { |
411 | return mySDR->Definition().PropertyDefinition() |
412 | ->Definition().ProductDefinition() |
413 | ->Formation() |
414 | ->OfProduct(); |
415 | } |
416 | |
417 | //======================================================================= |
418 | //function : Pid |
419 | //purpose : |
420 | //======================================================================= |
421 | |
422 | Handle(TCollection_HAsciiString) STEPConstruct_Part::Pid() const |
423 | { |
424 | return mySDR->Definition().PropertyDefinition() |
425 | ->Definition().ProductDefinition() |
426 | ->Formation() |
427 | ->OfProduct() |
428 | ->Id(); |
429 | } |
430 | |
431 | //======================================================================= |
432 | //function : Pname |
433 | //purpose : |
434 | //======================================================================= |
435 | |
436 | Handle(TCollection_HAsciiString) STEPConstruct_Part::Pname() const |
437 | { |
438 | return mySDR->Definition().PropertyDefinition() |
439 | ->Definition().ProductDefinition() |
440 | ->Formation() |
441 | ->OfProduct() |
442 | ->Name(); |
443 | } |
444 | |
445 | //======================================================================= |
446 | //function : Pdescription |
447 | //purpose : |
448 | //======================================================================= |
449 | |
450 | Handle(TCollection_HAsciiString) STEPConstruct_Part::Pdescription() const |
451 | { |
452 | return mySDR->Definition().PropertyDefinition() |
453 | ->Definition().ProductDefinition() |
454 | ->Formation() |
455 | ->OfProduct() |
456 | ->Description(); |
457 | } |
458 | |
459 | //======================================================================= |
460 | //function : SetPid |
461 | //purpose : |
462 | //======================================================================= |
463 | |
464 | void STEPConstruct_Part::SetPid(const Handle(TCollection_HAsciiString)& id) |
465 | { |
466 | mySDR->Definition().PropertyDefinition() |
467 | ->Definition().ProductDefinition() |
468 | ->Formation() |
469 | ->OfProduct() |
470 | ->SetId(id); |
471 | } |
472 | |
473 | //======================================================================= |
474 | //function : SetPname |
475 | //purpose : |
476 | //======================================================================= |
477 | |
478 | void STEPConstruct_Part::SetPname(const Handle(TCollection_HAsciiString)& label) |
479 | { |
480 | mySDR->Definition().PropertyDefinition() |
481 | ->Definition().ProductDefinition() |
482 | ->Formation() |
483 | ->OfProduct() |
484 | ->SetName(label); |
485 | } |
486 | |
487 | //======================================================================= |
488 | //function : SetPdescription |
489 | //purpose : |
490 | //======================================================================= |
491 | |
492 | void STEPConstruct_Part::SetPdescription(const Handle(TCollection_HAsciiString)& text) |
493 | { |
494 | mySDR->Definition().PropertyDefinition() |
495 | ->Definition().ProductDefinition() |
496 | ->Formation() |
497 | ->OfProduct() |
498 | ->SetDescription(text); |
499 | |
500 | } |
501 | |
502 | //======================================================================= |
503 | //function : PDF |
504 | //purpose : |
505 | //======================================================================= |
506 | |
507 | Handle(StepBasic_ProductDefinitionFormation) STEPConstruct_Part::PDF() const |
508 | { |
509 | return mySDR->Definition().PropertyDefinition() |
510 | ->Definition().ProductDefinition() |
511 | ->Formation(); |
512 | } |
513 | |
514 | //======================================================================= |
515 | //function : PDFid |
516 | //purpose : |
517 | //======================================================================= |
518 | |
519 | Handle(TCollection_HAsciiString) STEPConstruct_Part::PDFid() const |
520 | { |
521 | return mySDR->Definition().PropertyDefinition() |
522 | ->Definition().ProductDefinition() |
523 | ->Formation() |
524 | ->Id(); |
525 | } |
526 | |
527 | //======================================================================= |
528 | //function : PDFdescription |
529 | //purpose : |
530 | //======================================================================= |
531 | |
532 | Handle(TCollection_HAsciiString) STEPConstruct_Part::PDFdescription() const |
533 | { |
534 | return mySDR->Definition().PropertyDefinition() |
535 | ->Definition().ProductDefinition() |
536 | ->Formation() |
537 | ->Description(); |
538 | } |
539 | |
540 | //======================================================================= |
541 | //function : SetPDFid |
542 | //purpose : |
543 | //======================================================================= |
544 | |
545 | void STEPConstruct_Part::SetPDFid(const Handle(TCollection_HAsciiString)& id) |
546 | { |
547 | mySDR->Definition().PropertyDefinition() |
548 | ->Definition().ProductDefinition() |
549 | ->Formation() |
550 | ->SetId(id); |
551 | } |
552 | |
553 | //======================================================================= |
554 | //function : SetPDFdescription |
555 | //purpose : |
556 | //======================================================================= |
557 | |
558 | void STEPConstruct_Part::SetPDFdescription(const Handle(TCollection_HAsciiString)& text) |
559 | { |
560 | mySDR->Definition().PropertyDefinition() |
561 | ->Definition().ProductDefinition() |
562 | ->Formation() |
563 | ->SetDescription(text); |
564 | } |
565 | |
566 | //======================================================================= |
567 | //function : PDS |
568 | //purpose : |
569 | //======================================================================= |
570 | |
571 | Handle(StepRepr_ProductDefinitionShape) STEPConstruct_Part::PDS() const |
572 | { |
573 | return Handle(StepRepr_ProductDefinitionShape)::DownCast ( mySDR->Definition().PropertyDefinition() ); |
574 | } |
575 | |
576 | //======================================================================= |
577 | //function : PDSname |
578 | //purpose : |
579 | //======================================================================= |
580 | |
581 | Handle(TCollection_HAsciiString) STEPConstruct_Part::PDSname() const |
582 | { |
583 | return mySDR->Definition().PropertyDefinition()->Name(); |
584 | } |
585 | |
586 | //======================================================================= |
587 | //function : PDSdescription |
588 | //purpose : |
589 | //======================================================================= |
590 | |
591 | Handle(TCollection_HAsciiString) STEPConstruct_Part::PDSdescription() const |
592 | { |
593 | return mySDR->Definition().PropertyDefinition()->Description(); |
594 | } |
595 | |
596 | //======================================================================= |
597 | //function : SetPDSname |
598 | //purpose : |
599 | //======================================================================= |
600 | |
601 | void STEPConstruct_Part::SetPDSname(const Handle(TCollection_HAsciiString)& label) |
602 | { |
603 | mySDR->Definition().PropertyDefinition()->SetName(label); |
604 | } |
605 | |
606 | //======================================================================= |
607 | //function : SetPDSdescription |
608 | //purpose : |
609 | //======================================================================= |
610 | |
611 | void STEPConstruct_Part::SetPDSdescription(const Handle(TCollection_HAsciiString)& text) |
612 | { |
613 | mySDR->Definition().PropertyDefinition()->SetDescription(text); |
614 | } |
615 | |
616 | //======================================================================= |
617 | //function : PD |
618 | //purpose : |
619 | //======================================================================= |
620 | |
621 | Handle(StepBasic_ProductDefinition) STEPConstruct_Part::PD() const |
622 | { |
623 | return mySDR->Definition().PropertyDefinition()->Definition().ProductDefinition(); |
624 | } |
625 | |
626 | //======================================================================= |
627 | //function : PDdescription |
628 | //purpose : |
629 | //======================================================================= |
630 | |
631 | Handle(TCollection_HAsciiString) STEPConstruct_Part::PDdescription() const |
632 | { |
633 | return mySDR->Definition().PropertyDefinition() |
634 | ->Definition().ProductDefinition() |
635 | ->Description(); |
636 | } |
637 | |
638 | //======================================================================= |
639 | //function : SetPDdescription |
640 | //purpose : |
641 | //======================================================================= |
642 | |
643 | // a modifier |
644 | void STEPConstruct_Part::SetPDdescription(const Handle(TCollection_HAsciiString) &text) |
645 | { |
646 | mySDR->Definition().PropertyDefinition() |
647 | ->Definition().ProductDefinition() |
648 | ->SetDescription(text); |
649 | } |
650 | |
651 | //======================================================================= |
652 | //function : PRPC |
653 | //purpose : |
654 | //======================================================================= |
655 | |
656 | Handle(StepBasic_ProductRelatedProductCategory) STEPConstruct_Part::PRPC () const |
657 | { |
658 | return myPRPC; |
659 | } |
660 | |
661 | //======================================================================= |
662 | //function : PRPCname |
663 | //purpose : |
664 | //======================================================================= |
665 | |
666 | Handle(TCollection_HAsciiString) STEPConstruct_Part::PRPCname () const |
667 | { |
668 | return myPRPC->Name(); |
669 | } |
670 | |
671 | //======================================================================= |
672 | //function : PRPCdescription |
673 | //purpose : |
674 | //======================================================================= |
675 | |
676 | Handle(TCollection_HAsciiString) STEPConstruct_Part::PRPCdescription () const |
677 | { |
678 | return myPRPC->Description(); |
679 | } |
680 | |
681 | //======================================================================= |
682 | //function : SetPRPCname |
683 | //purpose : |
684 | //======================================================================= |
685 | |
686 | void STEPConstruct_Part::SetPRPCname (const Handle(TCollection_HAsciiString) &text) |
687 | { |
688 | myPRPC->SetName ( text ); |
689 | } |
690 | |
691 | //======================================================================= |
692 | //function : SetPRPCdescription |
693 | //purpose : |
694 | //======================================================================= |
695 | |
696 | void STEPConstruct_Part::SetPRPCdescription (const Handle(TCollection_HAsciiString) &text) |
697 | { |
698 | myPRPC->SetDescription ( text ); |
699 | } |
700 | |