Skip to content

Commit

Permalink
Version 5.17
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-lipman committed Aug 21, 2024
1 parent a9ac766 commit 83be457
Show file tree
Hide file tree
Showing 10 changed files with 130 additions and 98 deletions.
20 changes: 19 additions & 1 deletion source/sfa-data.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,34 @@ set badAttributes(IfcTriangulatedIrregularNetwork) {CoordIndex Normals NormalInd
# in AP2.., not all but a few commonly used, all would be any entity with a name attribute, basic geometry is not included
# complex entities require special exceptions in proc unicodeStrings
set unicodeAttributes(advanced_brep_shape_representation) {name}
set unicodeAttributes(angular_size_and_dimensional_size_with_datum_feature) {name}
set unicodeAttributes(annotation_curve_occurrence) {name}
set unicodeAttributes(annotation_placeholder_occurrence) {name}
set unicodeAttributes(annotation_placeholder_occurrence_with_leader_line) {name}
set unicodeAttributes(annotation_plane) {name}
set unicodeAttributes(annotation_to_annotation_leader_line) {name}
set unicodeAttributes(annotation_to_model_leader_line) {name}
set unicodeAttributes(auxiliary_leader_line) {name}
set unicodeAttributes(brep_with_voids) {name}
set unicodeAttributes(camera_model_d3) {name}
set unicodeAttributes(camera_model_d3_multi_clipping) {name}
set unicodeAttributes(centre_of_symmetry) {name}
set unicodeAttributes(characterized_representation_and_draughting_model_and_tessellated_shape_representation) {name}
set unicodeAttributes(component_path_shape_aspect) {name}
set unicodeAttributes(composite_group_shape_aspect) {name}
set unicodeAttributes(composite_shape_aspect) {name}
set unicodeAttributes(composite_shape_aspect_and_datum_feature) {name}
set unicodeAttributes(datum_feature) {name}
set unicodeAttributes(descriptive_representation_item) {name description}
set unicodeAttributes(dimensional_size_with_datum_feature) {name}
set unicodeAttributes(draughting_callout) {name}
set unicodeAttributes(draughting_model) {name}
set unicodeAttributes(draughting_model_and_tessellated_shape_representation) {name}
set unicodeAttributes(general_property) {name description}
set unicodeAttributes(geometric_alignment) {name}
set unicodeAttributes(geometric_curve_set) {name}
set unicodeAttributes(geometric_item_specific_usage) {name}
set unicodeAttributes(group) {name}
set unicodeAttributes(item_identified_representation_usage) {name}
set unicodeAttributes(item_defined_transformation) {name description}
set unicodeAttributes(machining_tool_usage) {name}
Expand All @@ -234,6 +251,7 @@ set unicodeAttributes(product_definition) {id description}
set unicodeAttributes(product_definition_shape) {name description}
set unicodeAttributes(product_related_product_category) {name description}
set unicodeAttributes(property_definition) {name}
set unicodeAttributes(representation) {name}
set unicodeAttributes(representation_context) {context_identifier context_type}
set unicodeAttributes(representation_relationship) {name description}
set unicodeAttributes(shape_aspect) {name}
Expand All @@ -254,7 +272,7 @@ set cadApps {3D_Evolution 3DEXPERIENCE 3DTransVidia Alibre "Anark CORE" Area21 "
set cadApps [sortlength2 $cadApps]

# CAx-IF vendor codes (General Guidelines for the MBx Interoperability Forum)
set pairs [list {3de "3D Evolution"} {c3e "3D Experience"} {c5 "CATIA V5"} {cr "Creo"} {ct5 "3D Evolution (V5)"} {cto "3D Evolution (Creo)"} {ctx "3D Evolution (NX)"} {d5 "Datakit (V5)"} {dc "Datakit"} {di "Datakit (Inventor)"} {do "Datakit (Creo)"} {dw "Datakit (SolidWorks)"} {dx "Datakit (NX)"} {e5 "Elysium (V5)"} {ec "Elysium CadDoctor"} {eo "Elysium (Creo)"} {ex "Elysium (NX)"} {in "Autodesk Inventor"} {k3d "Kubotek (3D Framework)"} {k5 "Kubotek (V5)"} {ko "Kubotek (Creo)"} {kx "Kubotek (NX)"} {nx "Siemens NX"} {oc "Datakit (OpenCascade)"} {osv "ODA Open STEP Viewer"} {pdm "prostep ivip PDM-IF"} {sw "SolidWorks"} \
set pairs [list {3de "3D Evolution"} {c3e "3D Experience"} {c5 "CATIA V5"} {cr "Creo"} {ct5 "3D Evolution (V5)"} {cto "3D Evolution (Creo)"} {ctx "3D Evolution (NX)"} {d3e "Datakit (3DX)"} {d5 "Datakit (V5)"} {dc "Datakit"} {di "Datakit (Inventor)"} {do "Datakit (Creo)"} {dw "Datakit (SolidWorks)"} {dx "Datakit (NX)"} {e5 "Elysium (V5)"} {ec "Elysium CadDoctor"} {eo "Elysium (Creo)"} {ex "Elysium (NX)"} {in "Autodesk Inventor"} {k3d "Kubotek (3D Framework)"} {k5 "Kubotek (V5)"} {ko "Kubotek (Creo)"} {kx "Kubotek (NX)"} {nx "Siemens NX"} {oc "Datakit (OpenCascade)"} {osv "ODA Open STEP Viewer"} {pdm "prostep ivip PDM-IF"} {sw "SolidWorks"} \
{a3 "Acrobat 3D"} {a5 "Acrobat_3D (V5)"} {ac "AutoCAD"} {al "Autodesk AliasStudio"} {au "Acrobat_3D (NX)"} {c4 "CATIA V4"} {cm "PTC CoCreate Modeling"} {fs "Vistagy FiberSim"} {h3 "HOOPS 3D Exchange"} {h5 "HOOPS 3D (V5)"} {hc "HOOPS 3D (Creo)"} {hx "HOOPS 3D (NX)"} {i5 "ITI CADfix (V5)"} {ew "Elysium (SolidWorks)"} {ic "ITI CADfix (Creo)"} {id "Siemens NX I-DEAS"} {if "ITI CADfix"} {ii "ITI CADfix (Inventor)"} {iw "ITI CADfix (SolidWorks)"} {ix "ITI CADfix (NX)"} {jn "Jotne EPM NASTRAN"} {jo "Jotne EPM openSimDM"} {kc "Kubotek KeyCreator"} {kr "Kubotek REALyze"} {kw "Kubotek (SolidWorks)"} {lk "LKSoft IDA-STEP"} {mm "Mitutoyo MiCAT Planner"} {mp "MSC Patran"} {nas "MSC NASTRAN"} {oc "Datakit (OpenCascade)"} {pc "PTC CADDS"} {pe "PTC Pro/E"} {s4 "T-Systems COM/STEP (V4)"} {s5 "T-Systems COM/FOX (V5)"} {se "Siemens SolidEdge"} {sp "Spatial ACIS"} {stp "ISO 10303 STEP"} {t3d "TechSoft3D"} {t4 "Theorem Cadverter (V4)"} {tc "Theorem Cadverter (CADDS)"} {tp "Theorem Cadverter (Pro/E)"} {tx "Theorem Cadverter (NX)"} {ug "Unigraphics"}]
foreach pair $pairs {set allVendor([lindex $pair 0]) [lindex $pair 1]}

Expand Down
4 changes: 3 additions & 1 deletion source/sfa-gen.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ proc genExcel {{numFile 0}} {
global nistName nistPMIexpected nistPMImaster noFontFile nprogBarEnts opt pf32 p21e3Section pmiCol resetRound row rowmax savedViewButtons
global savedViewName savedViewNames scriptName sheetLast skipEntities skipFileName spmiEntity spmiSumName spmiSumRow spmiTypesPerFile
global startrow statsOnly stepAP stepAPreport sumHeaderRow syntaxErr tessColor tessEnts tessSolid thisEntType timeStamp tlast tolNames tolStandard tolStandards
global totalEntity unicodeActual unicodeAttributes unicodeEnts unicodeInFile unicodeNumEnts unicodeString userEntityFile userEntityList
global totalEntity unicodeActual unicodeAttributes unicodeEnts unicodeInFile unicodeNumEnts unicodeString unicodeStringCM userEntityFile userEntityList
global userWriteDir useXL uuid uuidEnts valRounded viz wdir workbook workbooks worksheet worksheet1 worksheets writeDir wsCount wsNames x3dAxes
global x3dColor x3dColorFile x3dColors x3dFileName x3dIndex x3dMax x3dMin x3dMsg x3dMsgColor x3dStartFile x3dViewOK xlFileName xlFileNames xlInstalled
global objDesign
Expand Down Expand Up @@ -820,6 +820,7 @@ proc genExcel {{numFile 0}} {
if {$opt(PMISEM) && [string first "AP242" $stepAP] == 0 && $opt(xlFormat) != "None"} {

# NIST test case
if {![info exists nistName]} {set nistName ""}
if {$nistName != ""} {
set tols [concat $tolNames [list dimensional_characteristic_representation datum datum_feature datum_reference_compartment datum_reference_element datum_system placed_datum_target_feature]]
foreach tol $tols {if {[info exists entCount($tol)]} {set ok 1; break}}
Expand Down Expand Up @@ -1037,6 +1038,7 @@ proc genExcel {{numFile 0}} {

# check for entities in unicodeAttributes that might have Unicode strings, complex entities require special exceptions in proc unicodeStrings
catch {unset unicodeString}
catch {unset unicodeStringCM}
set unicodeEnts {}
if {$opt(xlUnicode) && $opt(xlFormat) != "None" && $useXL} {
set unicodeNumEnts 0
Expand Down
8 changes: 4 additions & 4 deletions source/sfa-geotol.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -2118,8 +2118,8 @@ proc spmiProjectedToleranceZone {objGuiEntity} {

# composite shape aspects
} elseif {[$tsa Type] == "composite_group_shape_aspect" || [$tsa Type] == "composite_shape_aspect" || \
[$tsa Type] == "composite_shape_aspect_and_datum_feature" || [$tsa Type] == "centre_of_symmetry" || \
[$tsa Type] == "dimensional_size_with_datum_feature"} {
[$tsa Type] == "composite_shape_aspect_and_datum_feature" || [$tsa Type] == "composite_group_shape_aspect_and_datum_feature" || \
[$tsa Type] == "centre_of_symmetry" || [$tsa Type] == "dimensional_size_with_datum_feature"} {
set e1s {}
::tcom::foreach e1 [$tsa GetUsedIn [string trim shape_aspect_relationship] [string trim relating_shape_aspect]] {lappend e1s $e1}
foreach e1 $e1s {
Expand Down Expand Up @@ -2147,13 +2147,13 @@ proc spmiProjectedToleranceZone {objGuiEntity} {
}
}
} else {
errorMsg "For projected tolerance zone, shape_aspect '[$e2 Type]' is not supported."
errorMsg "For projected tolerance zone, shape_aspect '[formatComplexEnt [$e2 Type]]' is not supported."
}
}

# toleranced_shape_aspect not supported
} else {
errorMsg "For projected tolerance zone, toleranced_shape_aspect '[$tsa Type]' is not supported."
errorMsg "For projected tolerance zone, toleranced_shape_aspect '[formatComplexEnt [$tsa Type]]' is not supported."
}

# get the edge_curve that are shared between the shape aspects from (1) toleranced_shape_aspect and (2) projection_end
Expand Down
14 changes: 10 additions & 4 deletions source/sfa-grafpmi.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,11 @@ proc gpmiAnnotationReport {objEntity} {
foreach e0 $objValue {if {[$e0 Type] == "apll_point_with_surface"} {set surfacePoint 1}}
set msg ""
if {[llength $objValue] == 1} {
set msg "Syntax Error: Leader line has only one 'point'."
set msg "Syntax Error: Leader line has only one 'point' on '[lindex $ent1 0]'."
} elseif {([string first "to_model" $ent1] != -1 || [string first "auxiliary" $ent1] != -1) && $surfacePoint == 0} {
set msg "Syntax Error: Missing an 'apll_point_with_surface' for model leader line. Or use 'annotation_to_annotation_leader_line' if the line does not end on a surface."
set msg "Syntax Error: Missing an 'apll_point_with_surface' for model leader line on '[lindex $ent1 0]'. Or use 'annotation_to_annotation_leader_line' if the line does not end on a surface."
} elseif {[string first "to_annotation" $ent1] != -1 && $surfacePoint == 1} {
set msg "Syntax Error: Leader line should not include 'apll_point_with_surface'. Or use 'annotation_to_model_leader_line' if the line does end on a surface."
set msg "Syntax Error: Leader line should not include 'apll_point_with_surface' on '[lindex $ent1 0]'. Or use 'annotation_to_model_leader_line' if the line does end on a surface."
}
if {$msg != ""} {
append msg "$spaces\($recPracNames(pmi242), Sec. 7.2.4)"
Expand Down Expand Up @@ -1458,7 +1458,7 @@ proc pmiGetCameras {} {
global objDesign
global cameraModels cmNameID draughtingModels draftModelCameraNames draftModelCameras dupViewpoint entCount gen mytemp opt
global recPracNames savedViewFile savedViewDMName savedViewFileName savedViewItems savedViewName savedViewNames savedViewpoint
global spaces spmiTypesPerFile syntaxErr viewsWithPMI
global spaces spmiTypesPerFile syntaxErr unicodeString unicodeStringCM viewsWithPMI

outputMsg " Processing viewpoints (camera_model_d3)" green
catch {unset draftModelCameras}
Expand All @@ -1479,6 +1479,8 @@ proc pmiGetCameras {} {
regsub -all {\[} $cmname "" cmname
regsub -all {\]} $cmname "" cmname
set cmname [string trim $cmname]
set idx "$cm,[$e0 P21ID]"
if {[info exists unicodeStringCM($idx)]} {set cmname $unicodeStringCM($idx)}
set cmNameID([$e0 P21ID]) $cmname
lappend cmnames $cmname
}
Expand Down Expand Up @@ -1527,6 +1529,10 @@ proc pmiGetCameras {} {
set nameDraughtingModel [$attrDraughtingModel Name]
if {$nameDraughtingModel == "name" && $nattr == $iattr} {
set dmname [$attrDraughtingModel Value]
if {$dmname == ""} {
set idx "$dm,name,[$entDraughtingModel P21ID]"
if {[info exists unicodeString($idx)]} {set dmname $unicodeString($idx)}
}
if {$dmname == ""} {
set msg "Syntax Error: For viewpoints, missing required 'name' attribute on [formatComplexEnt $dm]$spaces"
append msg "($recPracNames(pmi242), Sec. 9.4.2)"
Expand Down
14 changes: 10 additions & 4 deletions source/sfa-grafx3d.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,6 @@ proc x3dFileEnd {} {
puts $x3dFile "\n<!-- Part geometry checkbox -->\n<input type='checkbox' checked onclick='togPRT(this.value)'/>$str\Part Geometry"
if {[info exists nsketch]} {
if {$nsketch > -1} {puts $x3dFile "<!-- Sketch geometry checkbox -->\n<br><input type='checkbox' checked onclick='togSKH(this.value)'/>Sketch Geometry"}
if {$nsketch > 1000} {errorMsg " Sketch geometry ([expr {$nsketch+1}]) might take too long to view. Turn off Sketch and regenerate the View."}
}
if {$opt(partEdges) && $viz(EDGE)} {puts $x3dFile "<!-- Edges checkbox -->\n<br><input type='checkbox' checked onclick='togEDG(this.value)' id='swEDG'/>Edges"}
}
Expand Down Expand Up @@ -844,7 +843,10 @@ proc x3dFileEnd {} {

# draughting model name not the same as the camera model name
if {[info exists savedViewDMName($svn)]} {
if {$savedViewDMName($svn) != $svn && [string first "\[" $savedViewDMName($svn)] == -1 && [string first "\]" $savedViewDMName($svn)] == -1} {set svname "$savedViewDMName($svn) / $svn"}
if {$savedViewDMName($svn) != $svn && [string first "\[" $savedViewDMName($svn)] == -1 && \
[string first "\]" $savedViewDMName($svn)] == -1 && [string first "&\#x" $svn] == -1} {
set svname "$savedViewDMName($svn) / $svn"
}
}
append str "<input type='checkbox' id='cbView$id' checked onclick='togView$id\(this.value)'/>$svname"
puts $x3dFile $str
Expand Down Expand Up @@ -1057,7 +1059,9 @@ proc x3dFileEnd {} {
if {!$viz(PMI) || [llength $savedViewButtons] == 0} {set svb [array names savedViewpoint]}

foreach svn $svb {
lappend onload "\n var view$id = document.getElementById('$svn');\n view$id.addEventListener('outputchange', function(event) \{"
set svn1 $svn
if {[string first "\;" $svn1] != -1} {regsub -all "&" $svn1 "" svn1; regsub -all "\#" $svn1 "" svn1; regsub -all "\;" $svn1 "" svn1;}
lappend onload "\n var view$id = document.getElementById('$svn1');\n view$id.addEventListener('outputchange', function(event) \{"
lappend onload " document.getElementById('clickedView').innerHTML = '$svn';"
incr id
if {$viz(PMI)} {
Expand Down Expand Up @@ -1207,7 +1211,9 @@ proc x3dSavedViewpoint {name} {
if {$parallel} {
lappend savedViewVP "<OrthoViewpoint id='$name' position='[lindex $savedViewpoint($name) 0]' centerOfRotation='$xyzcen(x) $xyzcen(y) $xyzcen(z)' orientation='$rotation' fieldOfView='\[-$fov,-$fov,$fov,$fov\]'></OrthoViewpoint>"
} else {
lappend savedViewVP "<Transform translation='[lindex $savedViewpoint($name) 0]' rotation='$rotation'><Viewpoint id='$name' position='0 0 0' orientation='0 1 0 3.14156'/></Transform>"
set name1 $name
if {[string first "\;" $name1] != -1} {regsub -all "&" $name1 "" name1; regsub -all "\#" $name1 "" name1; regsub -all "\;" $name1 "" name1;}
lappend savedViewVP "<Transform translation='[lindex $savedViewpoint($name) 0]' rotation='$rotation'><Viewpoint id='$name1' position='0 0 0' orientation='0 1 0 3.14156'/></Transform>"
}
}

Expand Down
Loading

0 comments on commit 83be457

Please sign in to comment.