Start by measuring and reporting Datum circle diameter. Note this tolerance will be used to calculate Bonus tolerance. Then Report Cloud to CAD Deviation with Profile option selected as shown below. Note - Please set the 3D tolerance to represent the blueprint Profile tolerance - do not need to check 3D... just need the tolerance specified.
Now we add a long VBScript... Don't worry you only need to paste into your Program and edit 4 parameters. Line 1-4... edit values in "quotations" to reflect the Datum Circle Feature Name, Datum Feature Type (ID or OD), Cloud to CAD Deviation Report Name, and Cloud Name. You'll see these names in Feature and Report Database Window.
Code: Select all
featName = "Datum_C_" 'enter Datum name in "quotations" featType = "ID" 'set to ID or OD profNm = "Cloud-to-CAD Deviation" 'name of Cloud 2 CAD Profile cldNm = "CLOUD1" 'name of Cloud used for Profile actDIA = GetReportInfo(featName, "DIA", 2 ) nomDIA = GetReportInfo(featName, "DIA", 1 ) LMC = nomDIA + GetReportInfo(featName, "DIA", 4 ) MMC = nomDIA + GetReportInfo(featName, "DIA", 5 ) If featType = "ID" Then Bonus = Round(actDIA - LMC,4) Else Bonus = Round(MMC - actDIA,4) End If If Bonus < 0 Then Bonus = 0 End If If Bonus > Abs(MMC-LMC) Then Bonus = Abs(MMC-LMC) End If numPts = GetFeaturePropertyAct(cldNm,1) CldPtNm = cldNm & ":P1:3D" lowProf = GetReportInfo(profNm, CldPtNm, 4 ) - (Bonus/2) uppProf = GetReportInfo(profNm, CldPtNm, 5 ) + (Bonus/2) maxProf = 0 for i = 1 to numPts CldPtNm = cldNm & ":P" & i & ":3D" actProf = GetReportInfo(profNm, CldPtNm, 3 ) If abs(actProf) > abs(maxProf) Then maxProf = actProf End If next
Finally add a User Defined Report and specify Variable name for Actual, Lower and Upper Tolerance as shown below. When the program runs the VBScript calculates new tolerance zone and then populates values in User Defined Report to reflect the Tolerance Zone plus Bonus.
Non modified and modified Profile will both be displayed in Default Report. You could make a copy of Default Report and Remove the first Profile as needed.