mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-18 22:42:37 +00:00
Rib: accept a Project feature as its sketch ref
Rib guarded with `sk.type != CadFeatureType::Sketch`, while every other sketch consumer — Extrude, SurfaceExtrude, SurfaceRevolve, the loft paths — tests `!= Sketch && != Project`. A Project feature carries a plane and Line entities, which is all a rib reads, so the guard blocked "project a body edge, then rib along it" for no stated reason. The picker in the Design tab offered Sketch features only, so it is widened to match: a kernel that accepts Project refs and a GUI that never lists them would have left the path unreachable anyway. Worth recording for whoever hits this next: Rib also needs a sketch carrying EXPLICIT entities. A parametric Rectangle sketch (add_sketch with width/height) has an empty entities vector — build_sketch_wire synthesises its profile on demand — so rib_entity 0 is out of range there and it fails with "rib: bad entity". That is why Rib could not be driven headlessly at all before this change; a Project feature is now the one programmatic way to produce a ribbable line. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
1cb80f7f9f
commit
b25335e1b3
@@ -596,7 +596,10 @@ DesignPanel::DesignPanel(wxWindow* parent)
|
||||
for (int i = 0; i < int(m_doc.features.size()); ++i) {
|
||||
// 3-arg Append: ComboBox's own Append(text, bitmap) hides
|
||||
// wxItemContainer's (text, void*) — see the Sweep picker.
|
||||
if (m_doc.features[i].type == CadFeatureType::Sketch)
|
||||
// Project features too: they carry Line entities the kernel ribs from
|
||||
// just like a drawn sketch, so a projected body edge is a valid path.
|
||||
if (m_doc.features[i].type == CadFeatureType::Sketch ||
|
||||
m_doc.features[i].type == CadFeatureType::Project)
|
||||
m_rib_sketch->Append(wxString::FromUTF8(m_doc.features[i].name), wxNullBitmap,
|
||||
reinterpret_cast<void*>(intptr_t(i)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user