break;
}
case AIS_Shaded:
+ case 3: // texture mapping on triangulation
{
Standard_Real prevangle;
Standard_Real newangle;
Standard_Real prevcoeff;
Standard_Real newcoeff;
- Standard_Boolean isOwnDeviationAngle = OwnDeviationAngle(newangle,prevangle);
+ Standard_Boolean isOwnDeviationAngle = OwnDeviationAngle(newangle,prevangle);
Standard_Boolean isOwnDeviationCoefficient = OwnDeviationCoefficient(newcoeff,prevcoeff);
if (((Abs (newangle - prevangle) > Precision::Angular()) && isOwnDeviationAngle) ||
((Abs (newcoeff - prevcoeff) > Precision::Confusion()) && isOwnDeviationCoefficient)) {
BRepTools::Clean (myshape);
}
+
if (myshape.ShapeType() > TopAbs_FACE)
{
StdPrs_WFDeflectionShape::Add (thePrs, myshape, myDrawer);
break;
}
+
myDrawer->SetShadingAspectGlobal (Standard_False);
if (IsInfinite())
{
try
{
OCC_CATCH_SIGNALS
- StdPrs_ShadedShape::Add (thePrs, myshape, myDrawer);
+ if (theMode == AIS_Shaded)
+ {
+ StdPrs_ShadedShape::Add (thePrs, myshape, myDrawer);
+ }
+ else
+ {
+ StdPrs_ShadedShape::Add (thePrs, myshape, myDrawer,
+ Standard_True,
+ myIsCustomOrigin ? myUVOrigin : gp_Pnt2d (0.0, 0.0),
+ myUVRepeat,
+ myToScale ? myUVScale : gp_Pnt2d (1.0, 1.0));
+ updateAttributes (thePrs);
+ }
}
catch (Standard_Failure)
{
}
break;
}
- case 3: // texture mapping on triangulation
- {
- BRepTools::Clean (myshape);
- BRepTools::Update (myshape);
- try
- {
- OCC_CATCH_SIGNALS
- StdPrs_ShadedShape::Add (thePrs, myshape, myDrawer,
- Standard_True,
- myIsCustomOrigin ? myUVOrigin : gp_Pnt2d (0.0, 0.0),
- myUVRepeat,
- myToScale ? myUVScale : gp_Pnt2d (1.0, 1.0));
-
- updateAttributes (thePrs);
- }
- catch (Standard_Failure)
- {
- std::cout << "AIS_TexturedShape::Compute() in ShadingMode failed\n";
- StdPrs_WFShape::Add (thePrs, myshape, myDrawer);
- }
- break;
- }
}
}
--- /dev/null
+puts "============"
+puts "CR25142"
+puts "============"
+puts ""
+###################################################################################
+# Visualization breaks triangulation on shared solids in composite solid model
+###################################################################################
+
+# make two adjacent boxes share their common face
+box b1 20 10 10
+box b2 10 10 10
+
+bclear
+baddobjects b1 b2
+bfillds
+bbuild r
+explode r
+
+nbshapes r
+
+# do all possible checks of validity
+tolerance r
+checkshape r
+bopargcheck r #F
+bopargcheck r_1 r_2 -F #F
+
+# mesh one-by-one
+incmesh r_1 0.1
+tricheck r_1
+
+# note it will be Ok if we use the same deflection here, and bad otherwise...
+incmesh r_2 0.1
+tricheck r_2
+
+# now check again mesh on r_1
+tricheck r_1
+
+# now vdisplay solids separately causing their automatic re-mesh
+tclean r
+vinit View1
+vsetdispmode 1
+vdisplay r_1
+vdisplay r_2
+tricheck r_1
+
+vfit
+set only_screen 1