SH3DImporter: Miscellaneous improvements (#19178)
* Fixed documentation and confusing variable name * Prepare for joined wall fix * Fixed invalid Part::Sweep on certain joined walls * Calculate the Length in case of a curved segment * Adding Arch::Space for each room, and group furnitures in these spaces * Fixed baseboard import * Add baseboard to Space and wall to Space.Boundaries * Fixed space attribution when importing furniture as Arch::Equipment * Adding site properties * Allow creation of reference ground mesh * Make sure get_space takes level into account * Added sh3dCreateGroundMesh preferences * Sensible ordering for import preferences * Move furniture at least up to the floor upper facewq * Avoid gap between floors. Adjusted wall height and furniture placement * Preparing to allow model_rotation attribute in furniture * Fixed tipo in model_rotation * Make space upper face does exists * Use Facebinder to paint walls. do not offset by floor thickness. * Use Draft.make_facebinder() * Workaround for issue #19172. Refreshing the list of Faces and removing the extra '?' character
This commit is contained in:
@@ -182,13 +182,13 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args)
|
||||
|
||||
PyObject* BRepOffsetAPI_MakePipeShellPy::add(PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *prof, *curv=Py_False, *keep=Py_False;
|
||||
PyObject *profile, *withContact=Py_False, *withCorrection=Py_False;
|
||||
static const std::array<const char *, 4> keywords_pro{"Profile", "WithContact", "WithCorrection", nullptr};
|
||||
if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O!|O!O!", keywords_pro, &Part::TopoShapePy::Type, &prof,
|
||||
&PyBool_Type, &curv, &PyBool_Type, &keep)) {
|
||||
if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O!|O!O!", keywords_pro, &Part::TopoShapePy::Type, &profile,
|
||||
&PyBool_Type, &withContact, &PyBool_Type, &withCorrection)) {
|
||||
try {
|
||||
const TopoDS_Shape& s = static_cast<Part::TopoShapePy*>(prof)->getTopoShapePtr()->getShape();
|
||||
this->getBRepOffsetAPI_MakePipeShellPtr()->Add(s, Base::asBoolean(curv), Base::asBoolean(keep));
|
||||
const TopoDS_Shape& s = static_cast<Part::TopoShapePy*>(profile)->getTopoShapePtr()->getShape();
|
||||
this->getBRepOffsetAPI_MakePipeShellPtr()->Add(s, Base::asBoolean(withContact), Base::asBoolean(withCorrection));
|
||||
Py_Return;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
@@ -198,16 +198,16 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::add(PyObject *args, PyObject *kwds)
|
||||
}
|
||||
|
||||
PyErr_Clear();
|
||||
PyObject *loc;
|
||||
PyObject *location;
|
||||
static const std::array<const char *, 5> keywords_loc{"Profile", "Location", "WithContact", "WithCorrection",
|
||||
nullptr};
|
||||
if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O!O!|O!O!", keywords_loc, &Part::TopoShapePy::Type, &prof,
|
||||
&Part::TopoShapeVertexPy::Type, &loc, &PyBool_Type, &curv, &PyBool_Type,
|
||||
&keep)) {
|
||||
if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O!O!|O!O!", keywords_loc, &Part::TopoShapePy::Type, &profile,
|
||||
&Part::TopoShapeVertexPy::Type, &location, &PyBool_Type, &withContact, &PyBool_Type,
|
||||
&withCorrection)) {
|
||||
try {
|
||||
const TopoDS_Shape& s = static_cast<Part::TopoShapePy*>(prof)->getTopoShapePtr()->getShape();
|
||||
const TopoDS_Vertex& v = TopoDS::Vertex(static_cast<Part::TopoShapePy*>(loc)->getTopoShapePtr()->getShape());
|
||||
this->getBRepOffsetAPI_MakePipeShellPtr()->Add(s, v, Base::asBoolean(curv), Base::asBoolean(keep));
|
||||
const TopoDS_Shape& s = static_cast<Part::TopoShapePy*>(profile)->getTopoShapePtr()->getShape();
|
||||
const TopoDS_Vertex& v = TopoDS::Vertex(static_cast<Part::TopoShapePy*>(location)->getTopoShapePtr()->getShape());
|
||||
this->getBRepOffsetAPI_MakePipeShellPtr()->Add(s, v, Base::asBoolean(withContact), Base::asBoolean(withCorrection));
|
||||
Py_Return;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
Reference in New Issue
Block a user