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:
@@ -65,6 +65,23 @@
|
||||
<string>Import options</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBox_9">
|
||||
<property name="toolTip">
|
||||
<string>Merge imported element with existing FC object</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Merge into existing document</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>sh3dMerge</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Arch</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBox_3">
|
||||
<property name="toolTip">
|
||||
@@ -163,21 +180,22 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBox_9">
|
||||
<widget class="Gui::PrefCheckBox" name="checkBox_10">
|
||||
<property name="toolTip">
|
||||
<string>Merge imported element with existing FC object</string>
|
||||
<string>Create a default Render project with the newly created Site</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Merge into existing document</string>
|
||||
<string>Create Render Project (requires Render)</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>sh3dMerge</cstring>
|
||||
<cstring>sh3dCreateRenderProject</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Arch</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<layout class="QGridLayout" columnstretch="2,1,0">
|
||||
<item row="0" column="0">
|
||||
@@ -259,21 +277,117 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBox_10">
|
||||
<widget class="Gui::PrefCheckBox" name="checkBox_12">
|
||||
<property name="toolTip">
|
||||
<string>Create a default Render project with the newly created Site</string>
|
||||
<string>Create a default IFC project with the newly created Site.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Create Render Project (requires Render)</string>
|
||||
<string>Create IFC Project</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>sh3dCreateRenderProject</cstring>
|
||||
<cstring>sh3dCreateIFCProject</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Arch</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBox_13">
|
||||
<property name="toolTip">
|
||||
<string>Create a Mesh to represent the default ground level.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Create ground level Mesh</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>sh3dCreateGroundMesh</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Arch</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" columnstretch="2,1,0">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label1">
|
||||
<property name="text">
|
||||
<string>Default ground Color</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>sh3dDefaultGroundColor</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="ArchSH3DDefaultGroundColor">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>This color might be used when the environment does not define a color for the ground.</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>168</red>
|
||||
<green>168</green>
|
||||
<blue>168</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>sh3dDefaultGroundColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Arch</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" columnstretch="2,1,0">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label1">
|
||||
<property name="text">
|
||||
<string>Default sky Color</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>sh3dDefaultSkyColor</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="ArchSH3DDefaultSkyColor">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>This color might be used when the environment does not define a color for the sky.</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>204</red>
|
||||
<green>228</green>
|
||||
<blue>252</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>sh3dDefaultSkyColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Arch</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBox_11">
|
||||
<property name="toolTip">
|
||||
@@ -290,22 +404,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkBox_12">
|
||||
<property name="toolTip">
|
||||
<string>Create a default IFC project with the newly created Site.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Create IFC Project</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>sh3dCreateIFCProject</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Arch</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,10 @@
|
||||
Delete="true">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer[at]users.sourceforge.net"/>
|
||||
<UserDocu>Describes a portion of a circle</UserDocu>
|
||||
<UserDocu>Low level API to create a PipeShell using OCC API
|
||||
|
||||
Ref: https://dev.opencascade.org/doc/refman/html/class_b_rep_offset_a_p_i___make_pipe_shell.html
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="setFrenetMode">
|
||||
<Documentation>
|
||||
|
||||
@@ -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