LarryO Posted June 10, 2022 Share Posted June 10, 2022 Is level of detail (LOD) implementation a subsystem operation or are there settings and flags that we can utilize to indicate or check upon for objects that need not be shown? Some of the older fasteners have a user selection box to show or not show threads but that doesn't allow for displaying different scaled views with different LOD settings of a singular 3D assembly. Any leads on implementing LOD within plugin object scripts? Quote Link to comment
Pat Stanford Posted June 10, 2022 Share Posted June 10, 2022 Take a look at these threads (not a pun) that talk about scripting LOD. Quote Link to comment
LarryO Posted June 10, 2022 Author Share Posted June 10, 2022 (edited) Thanks Pat, Where do you find all these variables? Even knowing the number I cannot find them in the appendix listings delivered with VW2022 nor the developer section of vectorworks.net I noted that they were listed as read only in that screen shot but in the other thread Julian and yourself were indicating that the values can be set. So I am trying to determine if I need to read this value as a global setting and implement the degree of LOD or set the LOD to the items and the system displays them, or not, based upon LOD settings attached to each object created. <edit: I assume it is the latter.> Edited June 10, 2022 by LarryO Quote Link to comment
Pat Stanford Posted June 10, 2022 Share Posted June 10, 2022 They are in my version of the Vectorscript Appendix that shipped with VW2022. Look about the middle of the Object Variables, in the Miscellaneous section. I got the info from an earlier version of the Appendix since I posted information back in 2019. Or not, because all that is there is exactly what I screen shotted into the previous thread. I have a bug filed to try and get the information in the shipped version of the appendix to match the Developer site version and for both version to have ALL of the information. 1 Quote Link to comment
LarryO Posted June 20, 2022 Author Share Posted June 20, 2022 Thanks Pat, Upon a slower examination I did eventually notice them. By bad. While I was able to implement LOD upon a completed object, I was not able to do so upon a subordinate object. The solids operation continues regardless of these variables. The following operation completes the chamfer in all three settings. After the step shown the washer flange is added via AddSolid. Looks like I may have to produce all three head variations and label them separately. Don't suppose that there is an alternative approach that would permit the use of an IF statement to simply not do the chamfer before adding the washer flange? Quote {construct bolt head} BeginXtrd(0,ConstructionData.hh); RegularPolygon(0,0, ConstructionData.hd/2, 6,2); DelVertex(LNewObj,7); SetPolyClosed(LNewObj,boolResult); SetObjectVariableBoolean(LNewObj, 1160, FALSE); boolResult:= SetEntityMatrix(LNewObj,0,0,0,0,0,0); EndXtrd; ResetOrientation3D; Rotate3D(#0.000000d,#-90.000000d,#0.000000d); hObjHandle1:= LNewObj; {chamfer bolthead} BeginSweep(#0.000000d,#360.000000d,#10.000000d,0); ClosePoly; Poly(0,0, 0,ConstructionData.hh, ConstructionData.hd/2,ConstructionData.hh, (ConstructionData.hd/2/Cos(Deg2Rad(30.000000))), ConstructionData.hh-(((ConstructionData.hd/2/Cos(Deg2Rad(30.000000)))-ConstructionData.hd/2+0.5mm)*Tan(Deg2Rad(30.000000))), (ConstructionData.hd/2/Cos(Deg2Rad(30.000000))),0); SetObjectVariableBoolean(LNewObj, 1160, FALSE); boolResult:= SetEntityMatrix(LNewObj,0,0,0,0,-0,0); EndSweep; ResetOrientation3D; Rotate3D(#90.000000d,#-90.000000d,#0.000000d); SetZVals(0,0);SetObjectVariableBoolean(LNewObj,752,FALSE); {LOD: LOW setting, LOD variables (750,751,752) seem to default to TRUE} SetObjectVariableBoolean(LNewObj,751,FALSE); {LOD: MEDIUM setting} SetObjectVariableBoolean(LNewObj,750,TRUE); {LOD: HIGH setting} iResult:=IntersectSolid(LNewObj,hObjHandle1,hObjHandle2); {add washer flange to bolt head} BeginSweep(#0.000000d,#360.000000d,#10.000000d,0); ClosePoly; Poly(0,ConstructionData.fht+Tan(Deg2Rad(#16.8d))*ConstructionData.fd/2, ConstructionData.fd/2,ConstructionData.fht, ConstructionData.fd/2,0, 0,0); SetObjectVariableBoolean(LNewObj, 1160, FALSE); boolResult:= SetEntityMatrix(LNewObj,0,0,0,0,0,0); EndSweep; ResetOrientation3D; Rotate3D(#90.000000d,#-90.000000d,#0.000000d); iResult:=AddSolid(LNewObj,hObjHandle2,hObjHandle1); Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.