├── App.config ├── EXPRESS_Schema.cs ├── LICENSE ├── Program.cs ├── README.md ├── STEP Parser.csproj ├── STEP Parser.sln ├── StepFile.cs ├── StepUtilities.cs └── data └── sample02.step /App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /EXPRESS_Schema.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.IO; 6 | 7 | namespace STEP_Parser 8 | { 9 | public class EXPRESS_Schema 10 | { 11 | public EXPRESS_Schema(string filename ) 12 | { 13 | //initialize: 14 | entityDefinitionList = new Dictionary(); 15 | typeAliasesReal = new List(); 16 | typeAliasesInt = new List(); 17 | 18 | var watch = System.Diagnostics.Stopwatch.StartNew(); 19 | schemaFileName = filename; 20 | 21 | ParseSchema(); 22 | ParseType(); 23 | watch.Stop(); 24 | var elapsedMs = watch.ElapsedMilliseconds; 25 | Console.WriteLine("Schema Parsed in " + elapsedMs.ToString() + " ms"); 26 | } 27 | 28 | public EXPRESS_Schema(string[] filenames) 29 | { 30 | //initialize: 31 | entityDefinitionList = new Dictionary(); 32 | typeAliasesReal = new List(); 33 | typeAliasesInt = new List(); 34 | 35 | 36 | var watch = System.Diagnostics.Stopwatch.StartNew(); 37 | 38 | 39 | foreach (string filename in filenames) 40 | { 41 | schemaFileName = filename; 42 | ParseSchema(); 43 | ParseType(); 44 | } 45 | watch.Stop(); 46 | var elapsedMs = watch.ElapsedMilliseconds; 47 | Console.WriteLine("Schema Parsed in " + elapsedMs.ToString() + " ms"); 48 | } 49 | 50 | 51 | 52 | 53 | string schemaFileName; 54 | Dictionary entityDefinitionList; 55 | 56 | 57 | List typeAliasesReal = new List(); 58 | List typeAliasesInt = new List(); 59 | 60 | public void ParseType() 61 | { 62 | TextReader tr = new StreamReader(schemaFileName); 63 | string stepstring; 64 | string line; 65 | string datastring; 66 | string[] stringarray; 67 | string[] str; 68 | stepstring = tr.ReadToEnd(); 69 | 70 | while ((line = tr.ReadLine()) != null) 71 | { 72 | stepstring += line; 73 | } 74 | 75 | stringarray = stepstring.Split('\r'); 76 | 77 | string value; 78 | string typename; 79 | int idx; 80 | 81 | for (int i = 0; i < stringarray.Length; i++) 82 | { 83 | stringarray[i] = stringarray[i].Trim(); 84 | if (stringarray[i].StartsWith("TYPE") && stringarray[i].Contains('=')) 85 | { 86 | stringarray[i] = stringarray[i].Replace(';', ' '); 87 | idx = stringarray[i].IndexOf("="); 88 | typename=stringarray[i].Substring(4,idx-4).Trim(); 89 | value = stringarray[i].Substring(idx+1, stringarray[i].Length-idx-1 ).Trim(); 90 | 91 | if (value == "REAL") typeAliasesReal.Add(typename); 92 | if (value == "INTEGER") typeAliasesInt.Add(typename); 93 | } 94 | } 95 | 96 | for (int i = 0; i < stringarray.Length; i++) 97 | { 98 | stringarray[i] = stringarray[i].Trim(); 99 | if (stringarray[i].StartsWith("TYPE") && stringarray[i].Contains('=')) 100 | { 101 | stringarray[i] = stringarray[i].Replace(';', ' '); 102 | idx = stringarray[i].IndexOf("="); 103 | typename = stringarray[i].Substring(4, idx - 4).Trim(); 104 | value = stringarray[i].Substring(idx + 1, stringarray[i].Length - idx - 1).Trim(); 105 | 106 | if (typeAliasesReal.Contains(value)) typeAliasesReal.Add(typename); 107 | if (typeAliasesInt.Contains(value)) typeAliasesInt.Add(typename); 108 | } 109 | } 110 | 111 | for (int i = 0; i < typeAliasesReal.Count(); i++) 112 | { 113 | typeAliasesReal[i] = typeAliasesReal[i].ToUpper(); 114 | } 115 | for (int i = 0; i < typeAliasesInt.Count(); i++) 116 | { 117 | typeAliasesInt[i] = typeAliasesInt[i].ToUpper(); 118 | } 119 | 120 | } 121 | 122 | 123 | 124 | 125 | public void ParseSchema() 126 | { 127 | TextReader tr = new StreamReader(schemaFileName); 128 | string infile_string; 129 | infile_string = tr.ReadToEnd(); 130 | 131 | List indexesStart = AllIndexesOf(infile_string, "ENTITY"); 132 | List indexesEnd = AllIndexesOf(infile_string, "END_ENTITY"); 133 | 134 | List entries = new List(); 135 | for (int i = 0; i sections = new List(new string[] { "SUBTYPE OF", "SUPERTYPE OF", "ABSTRACT SUPERTYPE", "WHERE", "DERIVE", "UNIQUE", ";" }); 143 | 144 | 145 | for (int i = 0; i indexesSplit = AllIndexesOf(entries[i], sections); 148 | indexesSplit.Insert(0,0); 149 | indexesSplit.Add(entries[i].Length); 150 | List subsections = new List(); 151 | for (int j = 1; j < indexesSplit.Count(); j++) 152 | { 153 | string subsection = entries[i].Substring(indexesSplit[j - 1], indexesSplit[j] - indexesSplit[j - 1]).Replace(';', ' ').Trim(); 154 | if (subsection.Length > 0) subsections.Add(subsection); 155 | } 156 | 157 | string name = subsections[0].Substring(7, subsections[0].Length - 7).Trim(); 158 | string supertypes=""; 159 | string subtypes=""; 160 | 161 | int endOfAttributes; 162 | for (endOfAttributes = 1; endOfAttributes < subsections.Count(); endOfAttributes++) 163 | { 164 | if (subsections[endOfAttributes].Contains("WHERE")) break; 165 | if (subsections[endOfAttributes].Contains("DERIVE")) break; 166 | if (subsections[endOfAttributes].Contains("UNIQUE")) break; 167 | if (subsections[endOfAttributes].Contains("INVERSE")) break; 168 | 169 | } 170 | endOfAttributes--; 171 | 172 | 173 | List attributeList = new List(); 174 | List supertypesList = new List(); 175 | List subtypesList = new List(); 176 | 177 | for (int j = 1; j <= endOfAttributes; j++) 178 | { 179 | 180 | if (subsections[j].Contains("SUBTYPE OF")) 181 | { 182 | supertypes = subsections[j].Substring(11,subsections[j].Length-11) ; 183 | } 184 | else if (subsections[j].Contains("SUPERTYPE OF")) 185 | { 186 | subtypes = subsections[j].Substring(12, subsections[j].Length - 12); 187 | } 188 | else if (subsections[j].Contains("ABSTRACT SUPERTYPE")) 189 | { 190 | //TODO 191 | } 192 | else //assume its an atribute 193 | { 194 | int indexof = subsections[j].IndexOf(':'); 195 | if (indexof >1) 196 | { 197 | string str1 = subsections[j].Substring(0, indexof).Trim(); 198 | string str2 = subsections[j].Substring(indexof+1, subsections[j].Length-indexof-1).Trim(); 199 | 200 | if (str1.StartsWith("OPTIONAL")) 201 | { 202 | str1 = str1.Replace("OPTIONAL", "").Trim(); 203 | } 204 | 205 | AttributeDefinition at = new AttributeDefinition(str1, str2); 206 | attributeList.Add(at); 207 | } 208 | } 209 | 210 | subtypesList = new List(); 211 | supertypesList = new List(); 212 | 213 | if (subtypes.Length > 1) 214 | { 215 | subtypes = subtypes.Replace("\r\n", ""); 216 | subtypes = subtypes.Replace("ONEOF", ""); 217 | subtypes = subtypes.Replace("ANDOR", ""); 218 | subtypes = subtypes.Replace("AND", ""); 219 | subtypes = subtypes.Replace("OR", ""); 220 | 221 | List parts = subtypes.Split(new Char[] { ',', '(', ')' }).ToList(); 222 | for (int k = parts.Count()-1; k >=0 ; k--) 223 | { 224 | parts[k] = parts[k].Trim(); 225 | if (parts[k].Length < 1) parts.RemoveAt(k); 226 | } 227 | 228 | subtypesList=parts; 229 | } 230 | 231 | if (supertypes.Length > 1) 232 | { 233 | supertypes = supertypes.Replace("\r\n", ""); 234 | supertypes = supertypes.Replace("ONEOF", ""); 235 | supertypes = supertypes.Replace("ANDOR", ""); 236 | supertypes = supertypes.Replace("AND", ""); 237 | supertypes = supertypes.Replace("OR", ""); 238 | 239 | List parts = supertypes.Split(new Char[] { ',', '(', ')' }).ToList(); 240 | for (int k = parts.Count() - 1; k >= 0; k--) 241 | { 242 | parts[k] = parts[k].Trim(); 243 | if (parts[k].Length < 1) parts.RemoveAt(k); 244 | } 245 | 246 | supertypesList=parts; 247 | } 248 | } 249 | 250 | EntityDefinition e1 = new EntityDefinition(); 251 | e1.name = name; 252 | e1.attributeDefinitions = attributeList; 253 | e1.subtypes = subtypesList; 254 | e1.supertypes = supertypesList; 255 | 256 | entityDefinitionList.Add(name, e1); 257 | } 258 | 259 | foreach (var item in entityDefinitionList) 260 | { 261 | EntityDefinition definition = item.Value; 262 | List parents = definition.supertypes; 263 | if (parents.Count == 0) //nothing to inherit 264 | { 265 | definition.attributeDefinitionsFullTree = definition.attributeDefinitions; 266 | } 267 | else //traverse tree 268 | { 269 | List allParents = GetAllParents(definition.name); 270 | definition.attributeDefinitionsFullTree = new List(); 271 | for (int j = allParents.Count - 1; j >= 0; j--) 272 | { 273 | EntityDefinition e1 = GetEntityByName(allParents[j]); 274 | if (e1 != null) 275 | { 276 | definition.attributeDefinitionsFullTree.AddRange(e1.attributeDefinitions); //parents' attibutes 277 | } 278 | } 279 | definition.attributeDefinitionsFullTree.AddRange(definition.attributeDefinitions); //this entity's attibutes 280 | } 281 | } 282 | 283 | } 284 | 285 | 286 | public static List StringToListRec(string data) 287 | { 288 | data = data.Trim(); 289 | string buffer = ""; 290 | int bufferLength = 0; 291 | int startidx = 0; 292 | List DL = new List(); 293 | int index = 0; 294 | bool escaping=false; 295 | 296 | //check for string with one open bracket and one close bracket only 297 | int count1 = data.Split('(').Length - 1; 298 | int count2 = data.Split(')').Length - 1; 299 | int count3 = data.Split(',').Length - 1; 300 | if (count1 == 1 && count2 == 1 && count3 == 0) 301 | { 302 | buffer = ""; 303 | int start = data.IndexOf('('); 304 | int end = data.IndexOf(')'); 305 | if (start < end) 306 | { 307 | buffer = data.Substring(start+1, end - start -1).Trim(); 308 | } 309 | DL.Add(buffer); 310 | return DL; 311 | } 312 | 313 | while (index < data.Length) 314 | { 315 | if (data[index] == '\'') 316 | { 317 | if (escaping == false) escaping = true; 318 | else 319 | { 320 | escaping = false; 321 | } 322 | } 323 | 324 | switch (data[index]) 325 | { 326 | case '(': 327 | if (escaping) break; 328 | int level = 0; 329 | startidx = index + 1; 330 | while ((data[index] != ')' || level != 0) && index < data.Length - 1) 331 | { 332 | if (data[index] == '(') level++; 333 | if (data[index + 1] == ')') level--; 334 | index++; 335 | } 336 | 337 | buffer = data.Substring(startidx, index - startidx); 338 | startidx = index + 1; 339 | 340 | if ((!buffer.Contains('(')) && (!buffer.Contains(','))) 341 | { 342 | 343 | DL.Add(buffer.Trim()); 344 | } 345 | else 346 | { 347 | DL.Add(StringToListRec(buffer)); 348 | } 349 | 350 | buffer = ""; 351 | bufferLength = 0; 352 | break; 353 | case ')': 354 | if (escaping) break; 355 | startidx = index + 1; 356 | bufferLength = 0; 357 | break; 358 | case ',': 359 | if (escaping) break; 360 | if (bufferLength > 0) 361 | { 362 | buffer = data.Substring(startidx, bufferLength); 363 | DL.Add(buffer); 364 | } 365 | startidx = index + 1; 366 | buffer = ""; 367 | bufferLength = 0; 368 | break; 369 | default: 370 | bufferLength++; 371 | break; 372 | } 373 | 374 | if (index == data.Length - 1 && bufferLength > 0) 375 | //if (bufferLength > 1) 376 | { 377 | int testlen = data.Length; 378 | if (startidx + bufferLength > data.Length) bufferLength = data.Length - startidx - 1; 379 | if (bufferLength > 0) 380 | { 381 | buffer = data.Substring(startidx, bufferLength); 382 | DL.Add(buffer); 383 | } 384 | } 385 | index++; 386 | } 387 | return DL; 388 | } 389 | 390 | 391 | 392 | public List GetAllParents(string name) 393 | { 394 | var entity = GetEntityByName(name); 395 | if (entity == null) return new List(); 396 | 397 | List superTypeList = entity.supertypes; 398 | List allParents = new List(superTypeList); 399 | 400 | for (int i = 0; i < superTypeList.Count(); i++) 401 | { 402 | List superTypeList2 = GetAllParents(superTypeList[i]); 403 | allParents.AddRange(superTypeList2); 404 | } 405 | 406 | //remove duplicates 407 | List unique = allParents.Distinct().ToList(); 408 | return unique; 409 | } 410 | 411 | 412 | public List GetAllChildren(string name) 413 | { 414 | name = name.ToLower(); 415 | List subTypeList = new List(); 416 | foreach (var item in entityDefinitionList) 417 | { 418 | EntityDefinition ed = item.Value; 419 | if (ed.supertypes.Contains(name)) 420 | { 421 | subTypeList.Add(ed.name); 422 | } 423 | } 424 | subTypeList.AddRange(GetEntityByName(name).subtypes); 425 | subTypeList = subTypeList.Distinct().ToList(); 426 | 427 | List allChildren = new List(subTypeList); 428 | 429 | for (int i = 0; i < subTypeList.Count(); i++) 430 | { 431 | List subTypeList2 = GetAllChildren(subTypeList[i]); 432 | allChildren.AddRange(subTypeList2); 433 | 434 | } 435 | //remove duplicates 436 | List unique = allChildren.Distinct().ToList(); 437 | return unique; 438 | } 439 | 440 | 441 | 442 | 443 | 444 | public EntityDefinition GetEntityByName(string name) 445 | { 446 | name = name.ToLower(); 447 | try 448 | { 449 | return entityDefinitionList[name]; 450 | } 451 | catch 452 | { 453 | return null; 454 | } 455 | } 456 | 457 | 458 | 459 | public List AllIndexesOf(string haystack, string needle) 460 | { 461 | int index1, index2; 462 | 463 | if (String.IsNullOrEmpty(needle)) 464 | throw new ArgumentException("the string to find is empty", "needle"); 465 | List indexes = new List(); 466 | for (int index = 0; ; index += needle.Length) 467 | { 468 | index1 = haystack.IndexOf(" " + needle, index); 469 | index2 = haystack.IndexOf("\n" + needle, index); 470 | if (index1 != -1) index = index1; 471 | else if (index2 != -1) index = index2; 472 | else index = -1; 473 | if (index == -1) 474 | break; 475 | indexes.Add(index); 476 | } 477 | return indexes; 478 | } 479 | 480 | public List AllIndexesOf(string haystack, List needles) 481 | { 482 | List indexes = new List(); 483 | string needle = ""; 484 | for (int j = 0; j < needles.Count(); j++) 485 | { 486 | needle = needles[j]; 487 | for (int index = 0; ; index += needle.Length) 488 | { 489 | index = haystack.IndexOf(needle, index); 490 | if (index == -1) 491 | break; 492 | 493 | indexes.Add(index); 494 | } 495 | } 496 | 497 | indexes.Sort(); 498 | return indexes; 499 | } 500 | 501 | 502 | 503 | 504 | public dynamic StringToMappedType(dynamic attributeValue, string attributeType, EXPRESS_Schema AP203 ) 505 | { 506 | attributeType=attributeType.ToUpper(); 507 | if (attributeValue.GetType() == typeof(string)) 508 | { 509 | string s = (string)attributeValue.Trim(); 510 | if (s.StartsWith("#")) 511 | { 512 | s = s.Substring(1, s.Length - 1); 513 | int result; 514 | try 515 | { 516 | result = Convert.ToInt32(s); 517 | return new RefID(result); 518 | } 519 | catch 520 | { 521 | return new RefID(-1); 522 | } 523 | } 524 | else if (attributeType == "LABEL") 525 | { 526 | s = s.Replace("\"", ""); 527 | s = s.Replace("\'", ""); 528 | return s; 529 | } 530 | else if (AP203.typeAliasesReal.Contains(attributeType) || (attributeType == "REAL")) 531 | { 532 | double result; 533 | try 534 | { 535 | result = Convert.ToDouble(attributeValue); 536 | } 537 | catch 538 | { 539 | return "parse error"; 540 | } 541 | return result; 542 | } 543 | else if (AP203.typeAliasesInt.Contains(attributeType) || (attributeType == "INTEGER")) 544 | { 545 | int result; 546 | try 547 | { 548 | result = Convert.ToInt32(attributeValue); 549 | 550 | } 551 | catch 552 | { 553 | return "parse error"; 554 | } 555 | 556 | return result; 557 | } 558 | else if ((attributeType == "BOOLEAN") || (attributeType == "LOGICAL")) 559 | { 560 | if (s.Contains('T')) return true; 561 | if (s.Contains('F')) return false; 562 | return null; 563 | } 564 | else 565 | { 566 | return attributeValue; 567 | } 568 | } 569 | 570 | if (attributeValue.GetType() == typeof(List)) 571 | { 572 | if (attributeType.StartsWith("LIST") || attributeType.StartsWith("SET") ) 573 | { 574 | List newList = new List(); 575 | int idx = attributeType.IndexOf("OF"); 576 | string type = attributeType.Substring(idx + 2, attributeType.Length - idx - 2).Trim().ToLower(); 577 | for (int i = 0; i < attributeValue.Count; i++) 578 | { 579 | newList.Add(StringToMappedType(attributeValue[i], type, AP203)); 580 | } 581 | return newList; 582 | } 583 | } 584 | return ""; 585 | } 586 | } 587 | 588 | 589 | struct RefID 590 | { 591 | public RefID(int id) 592 | { 593 | this.id = id; 594 | } 595 | public int id; 596 | } 597 | 598 | public class AttributeDefinition 599 | { 600 | public string name; 601 | public string type; 602 | public int id; //? 603 | public AttributeDefinition(string name, string dataType) 604 | { 605 | this.name = name; 606 | this.type = dataType; 607 | } 608 | public AttributeDefinition() 609 | { 610 | } 611 | } 612 | 613 | 614 | public class Attribute 615 | { 616 | public Attribute(AttributeDefinition attributeDefinition, dynamic value) 617 | { 618 | this.value = value; 619 | this.name = attributeDefinition.name; 620 | this.type = attributeDefinition.type; 621 | } 622 | public string name; 623 | public string type; 624 | dynamic value; 625 | } 626 | 627 | 628 | public class EntityDefinition 629 | { 630 | public string name; 631 | public List attributeDefinitions; 632 | public List attributeDefinitionsFullTree; 633 | public List subtypes; 634 | public List supertypes; 635 | } 636 | 637 | 638 | public class Entity 639 | { 640 | public int entityID; 641 | public string type; 642 | public List attributesConverted; 643 | public int status; 644 | public bool isComplex; 645 | 646 | public Entity() 647 | { 648 | 649 | } 650 | 651 | public Entity(int id, string type, string attributeString, EXPRESS_Schema AP203) 652 | { 653 | this.entityID = id; 654 | this.type = type; 655 | this.isComplex = false; 656 | 657 | if (id==131) 658 | { 659 | 660 | } 661 | 662 | EntityDefinition ed = AP203.GetEntityByName(type); 663 | 664 | if (ed==null) 665 | { 666 | Console.WriteLine("entity definition not found in schema: id=" + id + " type: " + type); 667 | this.status = -1; 668 | return; 669 | } 670 | 671 | //TEST 672 | EXPRESS_Schema.StringToListRec("'1','2','3'"); 673 | EXPRESS_Schema.StringToListRec("'part',$"); 674 | 675 | List attributes = EXPRESS_Schema.StringToListRec(attributeString); 676 | 677 | if (attributes.Count != ed.attributeDefinitionsFullTree.Count) 678 | { 679 | Console.WriteLine("parsing error on entity #" + id); 680 | this.status=-1; 681 | return; 682 | } 683 | attributesConverted = new List(); 684 | for (int i = 0; i < attributes.Count; i++) 685 | { 686 | dynamic a = AP203.StringToMappedType(attributes[i], ed.attributeDefinitionsFullTree[i].type,AP203); 687 | attributesConverted.Add(a); 688 | } 689 | } 690 | 691 | } 692 | 693 | 694 | 695 | public class EntityComplex:Entity 696 | { 697 | public List types; 698 | public List attributeValues; 699 | public List attributeDefinitions; 700 | 701 | public EntityComplex(int id, List types, List attributeStrings, EXPRESS_Schema AP203) 702 | { 703 | this.entityID = id; 704 | this.types = types; 705 | this.isComplex = true; 706 | this.type = "COMPLEX"; 707 | attributeValues = new List(); 708 | attributeDefinitions = new List(); 709 | attributesConverted = new List(); 710 | 711 | if (id==76) 712 | { 713 | 714 | } 715 | 716 | 717 | for (int i = 0; i < types.Count; i++) 718 | { 719 | EntityDefinition ed = AP203.GetEntityByName(types[i]); 720 | attributeDefinitions.AddRange(ed.attributeDefinitions); 721 | List values = EXPRESS_Schema.StringToListRec(attributeStrings[i]); 722 | if (values[0].GetType() == typeof(List)) 723 | { 724 | attributeValues.AddRange(values[0]); 725 | } 726 | else if (values[0].GetType() == typeof(string)) 727 | if (values[0].Length > 0) 728 | { 729 | attributeValues.Add(values[0]); 730 | } 731 | } 732 | 733 | if (attributeValues.Count != attributeDefinitions.Count) 734 | { 735 | //TODO 736 | } 737 | 738 | 739 | for (int i = 0; i < attributeDefinitions.Count; i++) 740 | { 741 | dynamic a = AP203.StringToMappedType(attributeValues[i], attributeDefinitions[i].type, AP203); 742 | attributesConverted.Add(a); 743 | } 744 | 745 | } 746 | } 747 | 748 | } 749 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to deal 3 | in the Software without restriction, including without limitation the rights 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 5 | copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all 9 | copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 12 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 14 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 17 | OR OTHER DEALINGS IN THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace STEP_Parser 6 | { 7 | class Program 8 | { 9 | static void Main(string[] args) 10 | { 11 | //various schemas avaliable at https://github.com/stepcode/stepcode/tree/develop/data 12 | string[] schemas = new string[] { @"..\..\data\ap203e2_mim_lf.exp" }; 13 | 14 | EXPRESS_Schema AP203 = new EXPRESS_Schema(schemas); //load and parse schema(s) 15 | 16 | StepFile step1 = new StepFile(@"..\..\data\sample02.STEP", AP203); //parse STEP file 17 | 18 | StepPrinter printer = new StepPrinter(step1); 19 | 20 | List tree = printer.TreeToString(); 21 | 22 | for (int y = 0; y < tree.Count; y++) 23 | { 24 | Console.WriteLine(tree[y]); 25 | } 26 | 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Parser for reading ISO 10303-21 STEP files. 2 | 3 | I needed to extract certain geometric elements from STEP files, so I put together this very basic module to handle the parsing phase of the process. 4 | This can be easily extended to other ISO 10303 formats by swapping the EXPRESS schema 5 | 6 | Various express schemas are avaliable here: https://github.com/stepcode/stepcode/tree/develop/data 7 | 8 | 9 | Sample output of tree after parsing: 10 | 11 |
12 | 1 APPLICATION_PROTOCOL_DEFINITION
13 | └──2 APPLICATION_CONTEXT
14 | 3 SHAPE_DEFINITION_REPRESENTATION
15 | ├──4 PRODUCT_DEFINITION_SHAPE
16 | │  └──5 PRODUCT_DEFINITION
17 | │     ├──6 PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE
18 | │     │  └──7 PRODUCT
19 | │     │     └──8 MECHANICAL_CONTEXT
20 | │     │        └──2 APPLICATION_CONTEXT
21 | │     └──9 DESIGN_CONTEXT
22 | │        └──2 APPLICATION_CONTEXT
23 | └──10 ADVANCED_BREP_SHAPE_REPRESENTATION
24 |    ├──11 AXIS2_PLACEMENT_3D
25 |    │  ├──12 CARTESIAN_POINT
26 |    │  ├──13 DIRECTION
27 |    │  └──14 DIRECTION
28 |    ├──15 MANIFOLD_SOLID_BREP
29 |    │  └──16 CLOSED_SHELL
30 |    │     ├──17 ADVANCED_FACE
31 |    │     │  ├──18 FACE_BOUND
32 |    │     │  │  └──19 EDGE_LOOP
33 |    │     │  │     ├──20 ORIENTED_EDGE
34 |    │     │  │     │  └──21 EDGE_CURVE
35 |    │     │  │     │     ├──22 VERTEX_POINT
36 |    │     │  │     │     │  └──23 CARTESIAN_POINT
37 |    │     │  │     │     ├──24 VERTEX_POINT
38 |    │     │  │     │     │  └──25 CARTESIAN_POINT
39 |    │     │  │     │     └──26 SURFACE_CURVE
40 |    │     │  │     │        ├──27 LINE
41 |    │     │  │     │        │  ├──28 CARTESIAN_POINT
42 |    │     │  │     │        │  └──29 VECTOR
43 |    │     │  │     │        │     └──30 DIRECTION
44 |    │     │  │     │        ├──31 PCURVE
45 |    │     │  │     │        │  ├──32 PLANE
46 |    │     │  │     │        │  │  └──33 AXIS2_PLACEMENT_3D
47 |    │     │  │     │        │  │     ├──34 CARTESIAN_POINT
48 |    │     │  │     │        │  │     ├──35 DIRECTION
49 |    │     │  │     │        │  │     └──36 DIRECTION
50 |    │     │  │     │        │  └──37 DEFINITIONAL_REPRESENTATION
51 |    │     │  │     │        │     ├──38 LINE
52 |    │     │  │     │        │     │  ├──39 CARTESIAN_POINT
53 |    │     │  │     │        │     │  └──40 VECTOR
54 |    │     │  │     │        │     │     └──41 DIRECTION
55 |    │     │  │     │        │     └──42 COMPLEX
56 |    
57 | -------------------------------------------------------------------------------- /STEP Parser.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {9E8856DE-0720-4614-BE31-EED9274CF46C} 8 | Exe 9 | STEP_Parser 10 | STEP Parser 11 | v4.6.2 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /STEP Parser.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31019.35 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "STEP Parser", "STEP Parser.csproj", "{9E8856DE-0720-4614-BE31-EED9274CF46C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {9E8856DE-0720-4614-BE31-EED9274CF46C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {9E8856DE-0720-4614-BE31-EED9274CF46C}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {9E8856DE-0720-4614-BE31-EED9274CF46C}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {9E8856DE-0720-4614-BE31-EED9274CF46C}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {ABA53055-6295-4758-8903-E3FFEDB6B09B} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /StepFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.IO; 5 | using System.Text.RegularExpressions; 6 | using System.Linq; 7 | 8 | 9 | 10 | namespace STEP_Parser 11 | { 12 | public class StepFile 13 | { 14 | public StepFile(string fn, EXPRESS_Schema schema) 15 | { 16 | var watch = System.Diagnostics.Stopwatch.StartNew(); 17 | this.filename = fn; 18 | this.AP203 = schema; 19 | 20 | EntityParse(fn); 21 | 22 | watch.Stop(); 23 | var elapsedMs = watch.ElapsedMilliseconds; 24 | Console.WriteLine("Step File Parsed in " + elapsedMs.ToString() + " ms"); 25 | } 26 | 27 | public string filename; 28 | public Dictionary Entitys; 29 | public EXPRESS_Schema AP203; 30 | 31 | private Dictionary> parentData = new Dictionary>(); 32 | 33 | 34 | 35 | public void EntityParse(string fn) 36 | { 37 | TextReader tr = new StreamReader(fn); 38 | string stepstring; 39 | string line; 40 | string datastring; 41 | string[] stringarray; 42 | stepstring = tr.ReadToEnd(); 43 | 44 | while ((line = tr.ReadLine()) != null) 45 | { 46 | stepstring += line; 47 | } 48 | 49 | int i1 = stepstring.IndexOf("DATA;"); 50 | datastring = stepstring.Substring(i1 + 7); 51 | int i2 = datastring.IndexOf("ENDSEC;"); 52 | datastring = datastring.Substring(0, i2 - 1); 53 | datastring = datastring.Replace("\r", ""); 54 | datastring = datastring.Replace("\n", ""); 55 | stringarray = datastring.Split(';'); 56 | 57 | string[] str; 58 | string[] identifier = new string[stringarray.Length]; 59 | int[] id_array = new int[stringarray.Length]; 60 | Match m1; 61 | Match m2; 62 | Match m_complex; 63 | Regex g = new Regex(@"(?<=(\= ))[^\(]*(?=(\())"); 64 | 65 | 66 | //Regex gData = new Regex(@"(?<=\()[^\(].*"); 67 | 68 | //Regex gData = new Regex(@"(\((?>[^()]+|(?1))*\))"); 69 | Regex gData = new Regex(@"\(((?>[^()]+|\((?)|\)(?<-n>))+(?(n)(?!)))\)"); 70 | 71 | 72 | 73 | Regex complexmatch = new Regex(@"[\=]\s*[\(].*[\) ;]"); 74 | 75 | string[] datastr = new string[stringarray.Length]; 76 | 77 | List entityList = new List(); 78 | Entitys = new Dictionary(); 79 | 80 | string str_name; 81 | string str_dat; 82 | 83 | for (int i = 0; i < stringarray.Length; i++) 84 | { 85 | if ((!stringarray[i].Contains("#")) || (!stringarray[i].Contains("="))) continue; 86 | 87 | try 88 | { 89 | str = stringarray[i].Split('='); 90 | str[0] = str[0].Replace("#", ""); 91 | int id = Convert.ToInt32(str[0]); 92 | id_array[i] = id; 93 | m1 = g.Match(stringarray[i]); 94 | m_complex = complexmatch.Match(stringarray[i]); 95 | 96 | if (m1.Success & m1.Length>0 & m_complex.Length<1) 97 | { 98 | str_name = m1.Groups[0].Value.Trim(); //name 99 | m2 = gData.Match(stringarray[i]); 100 | if (m1.Success) 101 | { 102 | //str_dat = m2.Groups[0].Value.Trim().TrimEnd(')'); 103 | str_dat = m2.Groups[1].Value.Trim(); 104 | Entity ent = new Entity(id, str_name, str_dat, AP203); 105 | Entitys[id] = ent; 106 | } 107 | } 108 | 109 | if (m_complex.Success && m_complex.Length > 0) 110 | { 111 | // int t = 0; 112 | str_dat = m_complex.Groups[0].Value.Trim(); //data 113 | str_dat = str_dat.TrimStart('=', '('); 114 | str_dat = str_dat.TrimEnd(';'); 115 | str_dat = str_dat.TrimEnd(')'); 116 | 117 | List splitLocations = new List(); 118 | splitLocations.Add(0); 119 | int level = 0; 120 | for (int j = 0; j < str_dat.Length; j++) 121 | { 122 | if (str_dat[j] == '(') level++; 123 | if (str_dat[j] == ')') level--; 124 | if (str_dat[j] == ')' && level == 0) 125 | { 126 | splitLocations.Add(j + 1); 127 | } 128 | } 129 | List entList = new List(); 130 | for (int j = 1; j < splitLocations.Count; j++) 131 | { 132 | entList.Add(str_dat.Substring(splitLocations[j - 1], splitLocations[j] - splitLocations[j - 1]).Trim()); 133 | } 134 | 135 | List types = new List(); 136 | 137 | for (int j = 0; j < entList.Count; j++) 138 | { 139 | int location1 = entList[j].IndexOf(' '); 140 | int location2 = entList[j].IndexOf('('); 141 | int location; 142 | 143 | if (location1 > 0) location = Math.Min(location1, location2); 144 | else location = location2; 145 | 146 | string type = entList[j].Substring(0, location); 147 | types.Add(type); 148 | } 149 | EntityComplex EntC = new EntityComplex(id, types, entList, this.AP203); 150 | Entitys.Add(id, EntC); 151 | } 152 | } 153 | catch (Exception ex) 154 | { 155 | Console.WriteLine("Exception while parsing entity " + ex.ToString()); 156 | } 157 | } 158 | 159 | 160 | 161 | foreach (KeyValuePair entry in Entitys) 162 | { 163 | List flattenedAttributeList = GetFlattenedAttributes(entry.Value.attributesConverted); 164 | 165 | foreach (dynamic item in flattenedAttributeList) 166 | { 167 | if (item.GetType() == typeof(RefID)) 168 | { 169 | List existingList; 170 | 171 | if (parentData.TryGetValue(item.id, out existingList)) //if key exists add to the existing parent list 172 | { 173 | parentData[item.id].Add(entry.Value.entityID); 174 | } 175 | else //otherwise create a key and new list 176 | { 177 | parentData[item.id] = new List { entry.Value.entityID }; 178 | } 179 | } 180 | } 181 | } 182 | } 183 | 184 | 185 | //get flattened list of all attributes including those in sub-lists 186 | public List GetFlattenedAttributes(List inputList) 187 | { 188 | if (inputList == null) return new List(); 189 | 190 | List flattenedList = new List(); 191 | foreach (dynamic listItem in inputList) 192 | { 193 | if (listItem is System.Collections.IList) 194 | { 195 | flattenedList.AddRange(GetFlattenedAttributes(listItem)); 196 | } 197 | else 198 | { 199 | flattenedList.Add(listItem); 200 | } 201 | } 202 | return flattenedList; 203 | } 204 | 205 | 206 | public List GetAllParents(int id) 207 | { 208 | try 209 | { 210 | var test = parentData[id]; 211 | return parentData[id]; 212 | } 213 | catch 214 | { 215 | return new List(); 216 | } 217 | } 218 | 219 | 220 | public List GetChildren(int id) 221 | { 222 | if (id==-1) 223 | { 224 | return new List(); 225 | } 226 | 227 | Entity e1 = Entitys[id]; 228 | List childIDs = new List(); 229 | 230 | if (e1.attributesConverted==null) return new List(); 231 | 232 | foreach (dynamic item in e1.attributesConverted) 233 | { 234 | if (item.GetType() == typeof(RefID)) 235 | { 236 | childIDs.Add(item.id); 237 | } 238 | if (item.GetType() == typeof(List)) 239 | { 240 | foreach (dynamic element in item) 241 | { 242 | if (element.GetType() == typeof(RefID)) 243 | { 244 | childIDs.Add(element.id); 245 | } 246 | } 247 | } 248 | } 249 | return childIDs; 250 | } 251 | 252 | 253 | public List GetAllChildren(int id) 254 | { 255 | Entity e1 = Entitys[id]; 256 | List childIDs = new List(); 257 | 258 | foreach (dynamic item in e1.attributesConverted) 259 | { 260 | if (item.GetType() == typeof(RefID)) 261 | { 262 | childIDs.Add(item.id); 263 | childIDs.AddRange(GetAllChildren(item.id)); 264 | } 265 | if (item.GetType() == typeof(List)) 266 | { 267 | foreach (dynamic element in item) 268 | { 269 | if (element.GetType() == typeof(RefID)) 270 | { 271 | childIDs.Add(element.id); 272 | childIDs.AddRange(GetAllChildren(element.id)); 273 | } 274 | } 275 | } 276 | } 277 | return childIDs; 278 | } 279 | 280 | 281 | public string GetTypeOfEnt(int id) 282 | { 283 | return Entitys[id].type; 284 | } 285 | 286 | 287 | //search by type and subtypes 288 | public List searchTreeByType(int id, string type) 289 | { 290 | List typesToSearchFor = AP203.GetAllChildren(type); 291 | typesToSearchFor.Add(type.ToLower()); 292 | List children = GetAllChildren(id); 293 | List found = new List(); 294 | foreach (int cid in children) 295 | { 296 | foreach (string subtype in typesToSearchFor) 297 | { 298 | if (Entitys[cid].type.ToLower() == subtype) found.Add(cid); 299 | } 300 | } 301 | return found; 302 | } 303 | 304 | 305 | public List GetFirstParent(int id) 306 | { 307 | List parents = GetAllParents(id); 308 | 309 | if (parents.Count == 0) 310 | { 311 | return new List { id }; 312 | } 313 | else 314 | { 315 | List firstParents = new List(); 316 | 317 | foreach (int p in parents) 318 | { 319 | firstParents.AddRange(GetFirstParent(p)); 320 | 321 | } 322 | return firstParents; 323 | } 324 | } 325 | 326 | 327 | public dynamic GetAttributeValueByName(int id, string attributeName) 328 | { 329 | if (id < 1) return null; 330 | 331 | attributeName = attributeName.ToLower(); 332 | List ADList = new List(); 333 | ADList = AP203.GetEntityByName(Entitys[id].type).attributeDefinitionsFullTree; 334 | 335 | int foundID = -1; 336 | for (int i = 0; i < ADList.Count; i++) 337 | { 338 | if (ADList[i].name == attributeName) foundID = i; 339 | } 340 | 341 | Entity test = Entitys[id]; 342 | 343 | if (foundID > -1) 344 | { 345 | return Entitys[id].attributesConverted[foundID]; 346 | } 347 | else 348 | { 349 | return null; 350 | } 351 | } 352 | 353 | 354 | public dynamic GetAttributeValueByNameComplex(EntityComplex cpe, string attributeName) 355 | { 356 | for (int i = 0; i < cpe.attributeDefinitions.Count; i++) 357 | { 358 | if (cpe.attributeDefinitions[i].name == attributeName) 359 | { 360 | return cpe.attributesConverted[i]; 361 | } 362 | } 363 | return null; 364 | } 365 | 366 | 367 | public List GetTopLevelEntities() 368 | { 369 | List topLevelIDs = new List(); 370 | 371 | HashSet topLevel = new HashSet(); 372 | HashSet hasParents = new HashSet(); 373 | 374 | foreach (KeyValuePair e in Entitys) 375 | { 376 | topLevel.Add(e.Key); 377 | } 378 | 379 | foreach (KeyValuePair> entry in parentData) 380 | { 381 | hasParents.Add(entry.Key); 382 | } 383 | 384 | topLevel.ExceptWith(hasParents); 385 | topLevelIDs = topLevel.ToList(); 386 | 387 | return topLevelIDs; 388 | } 389 | 390 | 391 | } 392 | 393 | } 394 | 395 | 396 | -------------------------------------------------------------------------------- /StepUtilities.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace STEP_Parser 8 | { 9 | public class StepPrinter 10 | { 11 | public StepPrinter(StepFile stepFile) 12 | { 13 | this.stepFile = stepFile; 14 | indentStringTerminator = "└──"; 15 | indentStringSpaces = new string(' ', indentStringTerminator.Length); 16 | } 17 | 18 | private StepFile stepFile; 19 | private string indentStringTerminator; 20 | private string indentStringSpaces; 21 | private List treeStrings; 22 | private StringBuilder currentLine; 23 | 24 | public List tree; 25 | 26 | //build a string representation of the tree 27 | public List TreeToString() 28 | { 29 | treeStrings = new List(); 30 | 31 | var topLevelIDs = stepFile.GetTopLevelEntities(); 32 | 33 | foreach (int id in topLevelIDs) 34 | { 35 | PrintChildrenRecursive(id, 0); 36 | } 37 | 38 | for (int y = 1; y < treeStrings.Count; y++) 39 | { 40 | for (int x = 0; x < treeStrings[y].Length; x++) 41 | { 42 | FillLineRecursive(y, x); 43 | } 44 | } 45 | 46 | tree = new List(); 47 | for (int y = 0; y < treeStrings.Count; y++) 48 | { 49 | tree.Add(treeStrings[y].ToString()); 50 | } 51 | 52 | return tree; 53 | } 54 | 55 | 56 | public void FillLineRecursive(int y, int x) 57 | { 58 | if (treeStrings[y][x] == '└' && treeStrings[y - 1][x] == ' ') 59 | { 60 | treeStrings[y - 1][x] = '│'; 61 | FillLineRecursive(y - 1, x); 62 | } 63 | else if (treeStrings[y][x] == '└' && treeStrings[y - 1][x] == '└') 64 | { 65 | treeStrings[y - 1][x] = '├'; 66 | FillLineRecursive(y - 1, x); 67 | } 68 | else if (treeStrings[y][x] == '│' && treeStrings[y - 1][x] == '└') 69 | { 70 | treeStrings[y - 1][x] = '├'; 71 | FillLineRecursive(y - 1, x); 72 | } 73 | else if (treeStrings[y][x] == '│' && treeStrings[y - 1][x] == ' ') 74 | { 75 | treeStrings[y - 1][x] = '│'; 76 | FillLineRecursive(y - 1, x); 77 | } 78 | } 79 | 80 | 81 | public void PrintChildrenRecursive(int id, int depth) 82 | { 83 | if (id == -1) return; 84 | 85 | List children = stepFile.GetChildren(id); 86 | currentLine = new StringBuilder(); 87 | 88 | for (int i = 0; i < depth - 1; i++) 89 | { 90 | currentLine.Append(indentStringSpaces); 91 | } 92 | 93 | if (depth > 0) 94 | { 95 | currentLine.Append(indentStringTerminator); 96 | } 97 | 98 | currentLine.Append(stepFile.Entitys[id].entityID.ToString() + " " + stepFile.Entitys[id].type); 99 | treeStrings.Add(currentLine); 100 | 101 | foreach (int cid in children) 102 | { 103 | PrintChildrenRecursive(cid, depth + 1); 104 | } 105 | } 106 | 107 | 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /data/sample02.step: -------------------------------------------------------------------------------- 1 | ISO-10303-21; 2 | HEADER; 3 | FILE_DESCRIPTION(('FreeCAD Model'),'2;1'); 4 | FILE_NAME('Open CASCADE Shape Model','2022-10-04T20:36:24',(''),(''), 5 | 'Open CASCADE STEP processor 7.6','FreeCAD','Unknown'); 6 | FILE_SCHEMA(('CONFIG_CONTROL_DESIGN','SHAPE_APPEARANCE_LAYER_MIM')); 7 | ENDSEC; 8 | DATA; 9 | #1 = APPLICATION_PROTOCOL_DEFINITION('international standard', 10 | 'config_control_design',1994,#2); 11 | #2 = APPLICATION_CONTEXT( 12 | 'configuration controlled 3D designs of mechanical parts and assemblies' 13 | ); 14 | #3 = SHAPE_DEFINITION_REPRESENTATION(#4,#10); 15 | #4 = PRODUCT_DEFINITION_SHAPE('','',#5); 16 | #5 = PRODUCT_DEFINITION('design','',#6,#9); 17 | #6 = PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE('','',#7, 18 | .NOT_KNOWN.); 19 | #7 = PRODUCT('sample01','sample01','',(#8)); 20 | #8 = MECHANICAL_CONTEXT('',#2,'mechanical'); 21 | #9 = DESIGN_CONTEXT('',#2,'design'); 22 | #10 = ADVANCED_BREP_SHAPE_REPRESENTATION('',(#11,#15),#345); 23 | #11 = AXIS2_PLACEMENT_3D('',#12,#13,#14); 24 | #12 = CARTESIAN_POINT('',(0.,0.,0.)); 25 | #13 = DIRECTION('',(0.,0.,1.)); 26 | #14 = DIRECTION('',(1.,0.,-0.)); 27 | #15 = MANIFOLD_SOLID_BREP('',#16); 28 | #16 = CLOSED_SHELL('',(#17,#137,#213,#284,#331,#338)); 29 | #17 = ADVANCED_FACE('',(#18),#32,.F.); 30 | #18 = FACE_BOUND('',#19,.T.); 31 | #19 = EDGE_LOOP('',(#20,#55,#83,#111)); 32 | #20 = ORIENTED_EDGE('',*,*,#21,.T.); 33 | #21 = EDGE_CURVE('',#22,#24,#26,.T.); 34 | #22 = VERTEX_POINT('',#23); 35 | #23 = CARTESIAN_POINT('',(25.4,-25.4,25.4)); 36 | #24 = VERTEX_POINT('',#25); 37 | #25 = CARTESIAN_POINT('',(25.4,-25.4,-25.4)); 38 | #26 = SURFACE_CURVE('',#27,(#31,#43),.PCURVE_S1.); 39 | #27 = LINE('',#28,#29); 40 | #28 = CARTESIAN_POINT('',(25.4,-25.4,25.4)); 41 | #29 = VECTOR('',#30,1.); 42 | #30 = DIRECTION('',(0.,0.,-1.)); 43 | #31 = PCURVE('',#32,#37); 44 | #32 = PLANE('',#33); 45 | #33 = AXIS2_PLACEMENT_3D('',#34,#35,#36); 46 | #34 = CARTESIAN_POINT('',(25.4,25.4,25.4)); 47 | #35 = DIRECTION('',(-1.,0.,0.)); 48 | #36 = DIRECTION('',(0.,0.,1.)); 49 | #37 = DEFINITIONAL_REPRESENTATION('',(#38),#42); 50 | #38 = LINE('',#39,#40); 51 | #39 = CARTESIAN_POINT('',(0.,-50.8)); 52 | #40 = VECTOR('',#41,1.); 53 | #41 = DIRECTION('',(-1.,0.)); 54 | #42 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 55 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 56 | ) ); 57 | #43 = PCURVE('',#44,#49); 58 | #44 = PLANE('',#45); 59 | #45 = AXIS2_PLACEMENT_3D('',#46,#47,#48); 60 | #46 = CARTESIAN_POINT('',(0.,-25.4,0.)); 61 | #47 = DIRECTION('',(0.,-1.,0.)); 62 | #48 = DIRECTION('',(0.,-0.,-1.)); 63 | #49 = DEFINITIONAL_REPRESENTATION('',(#50),#54); 64 | #50 = LINE('',#51,#52); 65 | #51 = CARTESIAN_POINT('',(-25.4,25.4)); 66 | #52 = VECTOR('',#53,1.); 67 | #53 = DIRECTION('',(1.,0.)); 68 | #54 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 69 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 70 | ) ); 71 | #55 = ORIENTED_EDGE('',*,*,#56,.F.); 72 | #56 = EDGE_CURVE('',#57,#24,#59,.T.); 73 | #57 = VERTEX_POINT('',#58); 74 | #58 = CARTESIAN_POINT('',(25.4,25.4,-25.4)); 75 | #59 = SURFACE_CURVE('',#60,(#64,#71),.PCURVE_S1.); 76 | #60 = LINE('',#61,#62); 77 | #61 = CARTESIAN_POINT('',(25.4,25.4,-25.4)); 78 | #62 = VECTOR('',#63,1.); 79 | #63 = DIRECTION('',(-0.,-1.,-0.)); 80 | #64 = PCURVE('',#32,#65); 81 | #65 = DEFINITIONAL_REPRESENTATION('',(#66),#70); 82 | #66 = LINE('',#67,#68); 83 | #67 = CARTESIAN_POINT('',(-50.8,0.)); 84 | #68 = VECTOR('',#69,1.); 85 | #69 = DIRECTION('',(0.,-1.)); 86 | #70 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 87 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 88 | ) ); 89 | #71 = PCURVE('',#72,#77); 90 | #72 = PLANE('',#73); 91 | #73 = AXIS2_PLACEMENT_3D('',#74,#75,#76); 92 | #74 = CARTESIAN_POINT('',(-25.4,25.4,-25.4)); 93 | #75 = DIRECTION('',(0.,0.,1.)); 94 | #76 = DIRECTION('',(1.,0.,-0.)); 95 | #77 = DEFINITIONAL_REPRESENTATION('',(#78),#82); 96 | #78 = LINE('',#79,#80); 97 | #79 = CARTESIAN_POINT('',(50.8,0.)); 98 | #80 = VECTOR('',#81,1.); 99 | #81 = DIRECTION('',(0.,-1.)); 100 | #82 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 101 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 102 | ) ); 103 | #83 = ORIENTED_EDGE('',*,*,#84,.F.); 104 | #84 = EDGE_CURVE('',#85,#57,#87,.T.); 105 | #85 = VERTEX_POINT('',#86); 106 | #86 = CARTESIAN_POINT('',(25.4,25.4,25.4)); 107 | #87 = SURFACE_CURVE('',#88,(#92,#99),.PCURVE_S1.); 108 | #88 = LINE('',#89,#90); 109 | #89 = CARTESIAN_POINT('',(25.4,25.4,25.4)); 110 | #90 = VECTOR('',#91,1.); 111 | #91 = DIRECTION('',(0.,0.,-1.)); 112 | #92 = PCURVE('',#32,#93); 113 | #93 = DEFINITIONAL_REPRESENTATION('',(#94),#98); 114 | #94 = LINE('',#95,#96); 115 | #95 = CARTESIAN_POINT('',(0.,0.)); 116 | #96 = VECTOR('',#97,1.); 117 | #97 = DIRECTION('',(-1.,0.)); 118 | #98 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 119 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 120 | ) ); 121 | #99 = PCURVE('',#100,#105); 122 | #100 = PLANE('',#101); 123 | #101 = AXIS2_PLACEMENT_3D('',#102,#103,#104); 124 | #102 = CARTESIAN_POINT('',(0.,25.4,0.)); 125 | #103 = DIRECTION('',(0.,-1.,0.)); 126 | #104 = DIRECTION('',(0.,-0.,-1.)); 127 | #105 = DEFINITIONAL_REPRESENTATION('',(#106),#110); 128 | #106 = LINE('',#107,#108); 129 | #107 = CARTESIAN_POINT('',(-25.4,25.4)); 130 | #108 = VECTOR('',#109,1.); 131 | #109 = DIRECTION('',(1.,0.)); 132 | #110 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 133 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 134 | ) ); 135 | #111 = ORIENTED_EDGE('',*,*,#112,.T.); 136 | #112 = EDGE_CURVE('',#85,#22,#113,.T.); 137 | #113 = SURFACE_CURVE('',#114,(#118,#125),.PCURVE_S1.); 138 | #114 = LINE('',#115,#116); 139 | #115 = CARTESIAN_POINT('',(25.4,25.4,25.4)); 140 | #116 = VECTOR('',#117,1.); 141 | #117 = DIRECTION('',(-0.,-1.,-0.)); 142 | #118 = PCURVE('',#32,#119); 143 | #119 = DEFINITIONAL_REPRESENTATION('',(#120),#124); 144 | #120 = LINE('',#121,#122); 145 | #121 = CARTESIAN_POINT('',(0.,0.)); 146 | #122 = VECTOR('',#123,1.); 147 | #123 = DIRECTION('',(0.,-1.)); 148 | #124 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 149 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 150 | ) ); 151 | #125 = PCURVE('',#126,#131); 152 | #126 = PLANE('',#127); 153 | #127 = AXIS2_PLACEMENT_3D('',#128,#129,#130); 154 | #128 = CARTESIAN_POINT('',(-25.4,25.4,25.4)); 155 | #129 = DIRECTION('',(0.,0.,-1.)); 156 | #130 = DIRECTION('',(-1.,0.,-0.)); 157 | #131 = DEFINITIONAL_REPRESENTATION('',(#132),#136); 158 | #132 = LINE('',#133,#134); 159 | #133 = CARTESIAN_POINT('',(-50.8,0.)); 160 | #134 = VECTOR('',#135,1.); 161 | #135 = DIRECTION('',(0.,-1.)); 162 | #136 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 163 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 164 | ) ); 165 | #137 = ADVANCED_FACE('',(#138),#72,.F.); 166 | #138 = FACE_BOUND('',#139,.T.); 167 | #139 = EDGE_LOOP('',(#140,#163,#191,#212)); 168 | #140 = ORIENTED_EDGE('',*,*,#141,.T.); 169 | #141 = EDGE_CURVE('',#24,#142,#144,.T.); 170 | #142 = VERTEX_POINT('',#143); 171 | #143 = CARTESIAN_POINT('',(-25.4,-25.4,-25.4)); 172 | #144 = SURFACE_CURVE('',#145,(#149,#156),.PCURVE_S1.); 173 | #145 = LINE('',#146,#147); 174 | #146 = CARTESIAN_POINT('',(-25.4,-25.4,-25.4)); 175 | #147 = VECTOR('',#148,1.); 176 | #148 = DIRECTION('',(-1.,-0.,-0.)); 177 | #149 = PCURVE('',#72,#150); 178 | #150 = DEFINITIONAL_REPRESENTATION('',(#151),#155); 179 | #151 = LINE('',#152,#153); 180 | #152 = CARTESIAN_POINT('',(0.,-50.8)); 181 | #153 = VECTOR('',#154,1.); 182 | #154 = DIRECTION('',(-1.,0.)); 183 | #155 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 184 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 185 | ) ); 186 | #156 = PCURVE('',#44,#157); 187 | #157 = DEFINITIONAL_REPRESENTATION('',(#158),#162); 188 | #158 = LINE('',#159,#160); 189 | #159 = CARTESIAN_POINT('',(25.4,-25.4)); 190 | #160 = VECTOR('',#161,1.); 191 | #161 = DIRECTION('',(0.,-1.)); 192 | #162 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 193 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 194 | ) ); 195 | #163 = ORIENTED_EDGE('',*,*,#164,.F.); 196 | #164 = EDGE_CURVE('',#165,#142,#167,.T.); 197 | #165 = VERTEX_POINT('',#166); 198 | #166 = CARTESIAN_POINT('',(-25.4,25.4,-25.4)); 199 | #167 = SURFACE_CURVE('',#168,(#172,#179),.PCURVE_S1.); 200 | #168 = LINE('',#169,#170); 201 | #169 = CARTESIAN_POINT('',(-25.4,25.4,-25.4)); 202 | #170 = VECTOR('',#171,1.); 203 | #171 = DIRECTION('',(-0.,-1.,-0.)); 204 | #172 = PCURVE('',#72,#173); 205 | #173 = DEFINITIONAL_REPRESENTATION('',(#174),#178); 206 | #174 = LINE('',#175,#176); 207 | #175 = CARTESIAN_POINT('',(0.,0.)); 208 | #176 = VECTOR('',#177,1.); 209 | #177 = DIRECTION('',(0.,-1.)); 210 | #178 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 211 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 212 | ) ); 213 | #179 = PCURVE('',#180,#185); 214 | #180 = PLANE('',#181); 215 | #181 = AXIS2_PLACEMENT_3D('',#182,#183,#184); 216 | #182 = CARTESIAN_POINT('',(-25.4,25.4,25.4)); 217 | #183 = DIRECTION('',(1.,-0.,0.)); 218 | #184 = DIRECTION('',(0.,0.,-1.)); 219 | #185 = DEFINITIONAL_REPRESENTATION('',(#186),#190); 220 | #186 = LINE('',#187,#188); 221 | #187 = CARTESIAN_POINT('',(50.8,0.)); 222 | #188 = VECTOR('',#189,1.); 223 | #189 = DIRECTION('',(0.,-1.)); 224 | #190 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 225 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 226 | ) ); 227 | #191 = ORIENTED_EDGE('',*,*,#192,.F.); 228 | #192 = EDGE_CURVE('',#57,#165,#193,.T.); 229 | #193 = SURFACE_CURVE('',#194,(#198,#205),.PCURVE_S1.); 230 | #194 = LINE('',#195,#196); 231 | #195 = CARTESIAN_POINT('',(-25.4,25.4,-25.4)); 232 | #196 = VECTOR('',#197,1.); 233 | #197 = DIRECTION('',(-1.,-0.,-0.)); 234 | #198 = PCURVE('',#72,#199); 235 | #199 = DEFINITIONAL_REPRESENTATION('',(#200),#204); 236 | #200 = LINE('',#201,#202); 237 | #201 = CARTESIAN_POINT('',(0.,0.)); 238 | #202 = VECTOR('',#203,1.); 239 | #203 = DIRECTION('',(-1.,0.)); 240 | #204 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 241 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 242 | ) ); 243 | #205 = PCURVE('',#100,#206); 244 | #206 = DEFINITIONAL_REPRESENTATION('',(#207),#211); 245 | #207 = LINE('',#208,#209); 246 | #208 = CARTESIAN_POINT('',(25.4,-25.4)); 247 | #209 = VECTOR('',#210,1.); 248 | #210 = DIRECTION('',(0.,-1.)); 249 | #211 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 250 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 251 | ) ); 252 | #212 = ORIENTED_EDGE('',*,*,#56,.T.); 253 | #213 = ADVANCED_FACE('',(#214),#180,.F.); 254 | #214 = FACE_BOUND('',#215,.T.); 255 | #215 = EDGE_LOOP('',(#216,#239,#262,#283)); 256 | #216 = ORIENTED_EDGE('',*,*,#217,.T.); 257 | #217 = EDGE_CURVE('',#142,#218,#220,.T.); 258 | #218 = VERTEX_POINT('',#219); 259 | #219 = CARTESIAN_POINT('',(-25.4,-25.4,25.4)); 260 | #220 = SURFACE_CURVE('',#221,(#225,#232),.PCURVE_S1.); 261 | #221 = LINE('',#222,#223); 262 | #222 = CARTESIAN_POINT('',(-25.4,-25.4,25.4)); 263 | #223 = VECTOR('',#224,1.); 264 | #224 = DIRECTION('',(-0.,-0.,1.)); 265 | #225 = PCURVE('',#180,#226); 266 | #226 = DEFINITIONAL_REPRESENTATION('',(#227),#231); 267 | #227 = LINE('',#228,#229); 268 | #228 = CARTESIAN_POINT('',(0.,-50.8)); 269 | #229 = VECTOR('',#230,1.); 270 | #230 = DIRECTION('',(-1.,0.)); 271 | #231 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 272 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 273 | ) ); 274 | #232 = PCURVE('',#44,#233); 275 | #233 = DEFINITIONAL_REPRESENTATION('',(#234),#238); 276 | #234 = LINE('',#235,#236); 277 | #235 = CARTESIAN_POINT('',(-25.4,-25.4)); 278 | #236 = VECTOR('',#237,1.); 279 | #237 = DIRECTION('',(-1.,0.)); 280 | #238 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 281 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 282 | ) ); 283 | #239 = ORIENTED_EDGE('',*,*,#240,.F.); 284 | #240 = EDGE_CURVE('',#241,#218,#243,.T.); 285 | #241 = VERTEX_POINT('',#242); 286 | #242 = CARTESIAN_POINT('',(-25.4,25.4,25.4)); 287 | #243 = SURFACE_CURVE('',#244,(#248,#255),.PCURVE_S1.); 288 | #244 = LINE('',#245,#246); 289 | #245 = CARTESIAN_POINT('',(-25.4,25.4,25.4)); 290 | #246 = VECTOR('',#247,1.); 291 | #247 = DIRECTION('',(-0.,-1.,-0.)); 292 | #248 = PCURVE('',#180,#249); 293 | #249 = DEFINITIONAL_REPRESENTATION('',(#250),#254); 294 | #250 = LINE('',#251,#252); 295 | #251 = CARTESIAN_POINT('',(0.,0.)); 296 | #252 = VECTOR('',#253,1.); 297 | #253 = DIRECTION('',(0.,-1.)); 298 | #254 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 299 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 300 | ) ); 301 | #255 = PCURVE('',#126,#256); 302 | #256 = DEFINITIONAL_REPRESENTATION('',(#257),#261); 303 | #257 = LINE('',#258,#259); 304 | #258 = CARTESIAN_POINT('',(0.,0.)); 305 | #259 = VECTOR('',#260,1.); 306 | #260 = DIRECTION('',(0.,-1.)); 307 | #261 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 308 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 309 | ) ); 310 | #262 = ORIENTED_EDGE('',*,*,#263,.F.); 311 | #263 = EDGE_CURVE('',#165,#241,#264,.T.); 312 | #264 = SURFACE_CURVE('',#265,(#269,#276),.PCURVE_S1.); 313 | #265 = LINE('',#266,#267); 314 | #266 = CARTESIAN_POINT('',(-25.4,25.4,25.4)); 315 | #267 = VECTOR('',#268,1.); 316 | #268 = DIRECTION('',(-0.,-0.,1.)); 317 | #269 = PCURVE('',#180,#270); 318 | #270 = DEFINITIONAL_REPRESENTATION('',(#271),#275); 319 | #271 = LINE('',#272,#273); 320 | #272 = CARTESIAN_POINT('',(0.,0.)); 321 | #273 = VECTOR('',#274,1.); 322 | #274 = DIRECTION('',(-1.,0.)); 323 | #275 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 324 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 325 | ) ); 326 | #276 = PCURVE('',#100,#277); 327 | #277 = DEFINITIONAL_REPRESENTATION('',(#278),#282); 328 | #278 = LINE('',#279,#280); 329 | #279 = CARTESIAN_POINT('',(-25.4,-25.4)); 330 | #280 = VECTOR('',#281,1.); 331 | #281 = DIRECTION('',(-1.,0.)); 332 | #282 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 333 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 334 | ) ); 335 | #283 = ORIENTED_EDGE('',*,*,#164,.T.); 336 | #284 = ADVANCED_FACE('',(#285),#126,.F.); 337 | #285 = FACE_BOUND('',#286,.T.); 338 | #286 = EDGE_LOOP('',(#287,#308,#309,#330)); 339 | #287 = ORIENTED_EDGE('',*,*,#288,.T.); 340 | #288 = EDGE_CURVE('',#218,#22,#289,.T.); 341 | #289 = SURFACE_CURVE('',#290,(#294,#301),.PCURVE_S1.); 342 | #290 = LINE('',#291,#292); 343 | #291 = CARTESIAN_POINT('',(-25.4,-25.4,25.4)); 344 | #292 = VECTOR('',#293,1.); 345 | #293 = DIRECTION('',(1.,0.,0.)); 346 | #294 = PCURVE('',#126,#295); 347 | #295 = DEFINITIONAL_REPRESENTATION('',(#296),#300); 348 | #296 = LINE('',#297,#298); 349 | #297 = CARTESIAN_POINT('',(-0.,-50.8)); 350 | #298 = VECTOR('',#299,1.); 351 | #299 = DIRECTION('',(-1.,0.)); 352 | #300 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 353 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 354 | ) ); 355 | #301 = PCURVE('',#44,#302); 356 | #302 = DEFINITIONAL_REPRESENTATION('',(#303),#307); 357 | #303 = LINE('',#304,#305); 358 | #304 = CARTESIAN_POINT('',(-25.4,-25.4)); 359 | #305 = VECTOR('',#306,1.); 360 | #306 = DIRECTION('',(0.,1.)); 361 | #307 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 362 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 363 | ) ); 364 | #308 = ORIENTED_EDGE('',*,*,#112,.F.); 365 | #309 = ORIENTED_EDGE('',*,*,#310,.F.); 366 | #310 = EDGE_CURVE('',#241,#85,#311,.T.); 367 | #311 = SURFACE_CURVE('',#312,(#316,#323),.PCURVE_S1.); 368 | #312 = LINE('',#313,#314); 369 | #313 = CARTESIAN_POINT('',(-25.4,25.4,25.4)); 370 | #314 = VECTOR('',#315,1.); 371 | #315 = DIRECTION('',(1.,0.,0.)); 372 | #316 = PCURVE('',#126,#317); 373 | #317 = DEFINITIONAL_REPRESENTATION('',(#318),#322); 374 | #318 = LINE('',#319,#320); 375 | #319 = CARTESIAN_POINT('',(0.,0.)); 376 | #320 = VECTOR('',#321,1.); 377 | #321 = DIRECTION('',(-1.,0.)); 378 | #322 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 379 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 380 | ) ); 381 | #323 = PCURVE('',#100,#324); 382 | #324 = DEFINITIONAL_REPRESENTATION('',(#325),#329); 383 | #325 = LINE('',#326,#327); 384 | #326 = CARTESIAN_POINT('',(-25.4,-25.4)); 385 | #327 = VECTOR('',#328,1.); 386 | #328 = DIRECTION('',(0.,1.)); 387 | #329 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 388 | PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' 389 | ) ); 390 | #330 = ORIENTED_EDGE('',*,*,#240,.T.); 391 | #331 = ADVANCED_FACE('',(#332),#100,.F.); 392 | #332 = FACE_BOUND('',#333,.T.); 393 | #333 = EDGE_LOOP('',(#334,#335,#336,#337)); 394 | #334 = ORIENTED_EDGE('',*,*,#84,.T.); 395 | #335 = ORIENTED_EDGE('',*,*,#192,.T.); 396 | #336 = ORIENTED_EDGE('',*,*,#263,.T.); 397 | #337 = ORIENTED_EDGE('',*,*,#310,.T.); 398 | #338 = ADVANCED_FACE('',(#339),#44,.T.); 399 | #339 = FACE_BOUND('',#340,.T.); 400 | #340 = EDGE_LOOP('',(#341,#342,#343,#344)); 401 | #341 = ORIENTED_EDGE('',*,*,#21,.F.); 402 | #342 = ORIENTED_EDGE('',*,*,#288,.F.); 403 | #343 = ORIENTED_EDGE('',*,*,#217,.F.); 404 | #344 = ORIENTED_EDGE('',*,*,#141,.F.); 405 | #345 = ( GEOMETRIC_REPRESENTATION_CONTEXT(3) 406 | GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#349)) GLOBAL_UNIT_ASSIGNED_CONTEXT 407 | ((#346,#347,#348)) REPRESENTATION_CONTEXT('Context #1', 408 | '3D Context with UNIT and UNCERTAINTY') ); 409 | #346 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) ); 410 | #347 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) ); 411 | #348 = ( NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT() ); 412 | #349 = UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-07),#346, 413 | 'distance_accuracy_value','confusion accuracy'); 414 | #350 = PRODUCT_RELATED_PRODUCT_CATEGORY('detail',$,(#7)); 415 | #351 = PRODUCT_CATEGORY_RELATIONSHIP('','',#352,#350); 416 | #352 = PRODUCT_CATEGORY('part',$); 417 | #353 = CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#354,#357,(#6,#5)); 418 | #354 = PERSON_AND_ORGANIZATION(#355,#356); 419 | #355 = PERSON('IP192.168.80,Eng','','Eng',$,$,$); 420 | #356 = ORGANIZATION('IP192.168.80','Unspecified',''); 421 | #357 = PERSON_AND_ORGANIZATION_ROLE('creator'); 422 | #358 = CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#354,#359,(#7)); 423 | #359 = PERSON_AND_ORGANIZATION_ROLE('design_owner'); 424 | #360 = CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#354,#361,(#6)); 425 | #361 = PERSON_AND_ORGANIZATION_ROLE('design_supplier'); 426 | #362 = CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#354,#363,(#364)); 427 | #363 = PERSON_AND_ORGANIZATION_ROLE('classification_officer'); 428 | #364 = SECURITY_CLASSIFICATION('','',#365); 429 | #365 = SECURITY_CLASSIFICATION_LEVEL('unclassified'); 430 | #366 = CC_DESIGN_SECURITY_CLASSIFICATION(#364,(#6)); 431 | #367 = CC_DESIGN_DATE_AND_TIME_ASSIGNMENT(#368,#372,(#5)); 432 | #368 = DATE_AND_TIME(#369,#370); 433 | #369 = CALENDAR_DATE(2022,4,10); 434 | #370 = LOCAL_TIME(20,36,$,#371); 435 | #371 = COORDINATED_UNIVERSAL_TIME_OFFSET(5,$,.BEHIND.); 436 | #372 = DATE_TIME_ROLE('creation_date'); 437 | #373 = CC_DESIGN_DATE_AND_TIME_ASSIGNMENT(#368,#374,(#364)); 438 | #374 = DATE_TIME_ROLE('classification_date'); 439 | #375 = CC_DESIGN_APPROVAL(#376,(#6,#5,#364)); 440 | #376 = APPROVAL(#377,''); 441 | #377 = APPROVAL_STATUS('not_yet_approved'); 442 | #378 = APPROVAL_PERSON_ORGANIZATION(#354,#376,#379); 443 | #379 = APPROVAL_ROLE('approver'); 444 | #380 = APPROVAL_DATE_TIME(#368,#376); 445 | #381 = MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION('',(#382) 446 | ,#345); 447 | #382 = STYLED_ITEM('color',(#383),#15); 448 | #383 = PRESENTATION_STYLE_ASSIGNMENT((#384,#390)); 449 | #384 = SURFACE_STYLE_USAGE(.BOTH.,#385); 450 | #385 = SURFACE_SIDE_STYLE('',(#386)); 451 | #386 = SURFACE_STYLE_FILL_AREA(#387); 452 | #387 = FILL_AREA_STYLE('',(#388)); 453 | #388 = FILL_AREA_STYLE_COLOUR('',#389); 454 | #389 = COLOUR_RGB('',0.800000010877,0.800000010877,0.800000010877); 455 | #390 = CURVE_STYLE('',#391,POSITIVE_LENGTH_MEASURE(0.1),#392); 456 | #391 = DRAUGHTING_PRE_DEFINED_CURVE_FONT('continuous'); 457 | #392 = COLOUR_RGB('',9.803921802644E-02,9.803921802644E-02, 458 | 9.803921802644E-02); 459 | ENDSEC; 460 | END-ISO-10303-21; 461 | --------------------------------------------------------------------------------