mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 10:10:34 +05:00
EDF 2281 : Dump correction
This commit is contained in:
parent
75d091c0e2
commit
377b28e6c4
@ -216,6 +216,7 @@ TopoDS_Shell GEOMImpl_DividedDiskDriver::MakeDiskHexagon(double R, double Ratio)
|
||||
for (int i=1;i<=6;i++)
|
||||
{
|
||||
// Edges
|
||||
|
||||
// for Face1
|
||||
E2 = BRepBuilderAPI_MakeEdge(aCircle, V2, TopoDS::Vertex(V3.Reversed()));
|
||||
E3 = BRepBuilderAPI_MakeEdge(V3,TopoDS::Vertex(V4.Reversed()));
|
||||
@ -239,6 +240,7 @@ TopoDS_Shell GEOMImpl_DividedDiskDriver::MakeDiskHexagon(double R, double Ratio)
|
||||
|
||||
|
||||
// Wires
|
||||
|
||||
//Wire1
|
||||
aBuilder.MakeWire(W1);
|
||||
if (i==1)
|
||||
|
@ -2285,9 +2285,21 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDisk (double theR,
|
||||
SetErrorCode(aFail->GetMessageString());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
std::string aPatternStr;
|
||||
|
||||
switch(thePattern)
|
||||
{
|
||||
case 0:
|
||||
aPatternStr = "GEOM.SQUARE";
|
||||
break;
|
||||
case 1:
|
||||
aPatternStr = "GEOM.HEXAGON";
|
||||
break;
|
||||
}
|
||||
|
||||
//Make a Python command
|
||||
GEOM::TPythonDump(aFunction) << aShape << " = geompy.MakeDividedDisk(" << theR << ", " << theOrientation << ")";
|
||||
GEOM::TPythonDump(aFunction) << aShape << " = geompy.MakeDividedDisk(" << theR << ", " << theOrientation << ", " << aPatternStr.c_str() << ")";
|
||||
|
||||
SetErrorCode(OK);
|
||||
|
||||
@ -2350,9 +2362,22 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDiskPntVecR (Handle
|
||||
SetErrorCode(aFail->GetMessageString());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
std::string aPatternStr;
|
||||
|
||||
switch(thePattern)
|
||||
{
|
||||
case 0:
|
||||
aPatternStr = "GEOM.SQUARE";
|
||||
break;
|
||||
case 1:
|
||||
aPatternStr = "GEOM.HEXAGON";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//Make a Python command
|
||||
GEOM::TPythonDump(aFunction) << aShape << " = geompy.MakeDividedDiskPntVecR(" << thePnt << ", " << theVec << ", " << theR << ")";
|
||||
GEOM::TPythonDump(aFunction) << aShape << " = geompy.MakeDividedDiskPntVecR(" << thePnt << ", " << theVec << ", " << theR << ", " << aPatternStr.c_str() << ")";
|
||||
|
||||
SetErrorCode(OK);
|
||||
|
||||
@ -2385,8 +2410,20 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedCylinder (double th
|
||||
aFunction->SetDescription(""); // Erase dump of MakePrismDXDYDZ
|
||||
aShape->SetType(GEOM_DIVIDEDCYLINDER);
|
||||
|
||||
std::string aPatternStr;
|
||||
|
||||
switch(thePattern)
|
||||
{
|
||||
case 0:
|
||||
aPatternStr = "GEOM.SQUARE";
|
||||
break;
|
||||
case 1:
|
||||
aPatternStr = "GEOM.HEXAGON";
|
||||
break;
|
||||
}
|
||||
|
||||
//Make a Python command
|
||||
GEOM::TPythonDump(aFunction) << aShape << " = geompy.MakeDividedCylinder(" << theR << ", " << theH << ")";
|
||||
GEOM::TPythonDump(aFunction) << aShape << " = geompy.MakeDividedCylinder(" << theR << ", " << theH << ", " << aPatternStr.c_str() << ")";
|
||||
|
||||
SetErrorCode(OK);
|
||||
|
||||
|
@ -8553,12 +8553,13 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
||||
# @param theR Radius of the disk
|
||||
# @param theOrientation Orientation of the plane on which the disk will be built
|
||||
# 1 = XOY, 2 = OYZ, 3 = OZX
|
||||
# @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
|
||||
# @return New GEOM_Object, containing the created shape.
|
||||
#
|
||||
# @ref tui_creation_divideddisk "Example"
|
||||
def MakeDividedDisk(self, theR, theOrientation):
|
||||
theR, theOrientation, Parameters = ParseParameters(theR, theOrientation)
|
||||
anObj = self.AdvOp.MakeDividedDisk(theR, 50.0, theOrientation)
|
||||
def MakeDividedDisk(self, theR, theOrientation, thePattern ):
|
||||
theR, Parameters = ParseParameters(theR)
|
||||
anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
|
||||
RaiseIfFailed("MakeDividedDisk", self.AdvOp)
|
||||
if Parameters: anObj.SetParameters(Parameters)
|
||||
return anObj
|
||||
@ -8568,12 +8569,13 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
||||
# @param theCenter Center of the disk
|
||||
# @param theVector Normal vector to the plane of the created disk
|
||||
# @param theRadius Radius of the disk
|
||||
# @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
|
||||
# @return New GEOM_Object, containing the created shape.
|
||||
#
|
||||
# @ref tui_creation_divideddisk "Example"
|
||||
def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius):
|
||||
def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern):
|
||||
theRadius, Parameters = ParseParameters(theRadius)
|
||||
anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 50.0)
|
||||
anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
|
||||
RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
|
||||
if Parameters: anObj.SetParameters(Parameters)
|
||||
return anObj
|
||||
@ -8581,12 +8583,13 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
||||
## Builds a cylinder prepared for hexa meshes
|
||||
# @param theR Radius of the cylinder
|
||||
# @param theH Height of the cylinder
|
||||
# @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
|
||||
# @return New GEOM_Object, containing the created shape.
|
||||
#
|
||||
# @ref tui_creation_dividedcylinder "Example"
|
||||
def MakeDividedCylinder(self, theR, theH):
|
||||
def MakeDividedCylinder(self, theR, theH, thePattern):
|
||||
theR, theH, Parameters = ParseParameters(theR, theH)
|
||||
anObj = self.AdvOp.MakeDividedCylinder(theR, theH)
|
||||
anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
|
||||
RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
|
||||
if Parameters: anObj.SetParameters(Parameters)
|
||||
return anObj
|
||||
|
Loading…
Reference in New Issue
Block a user