forked from 1b-agent/opencadstudio-upstream
Restore sweep construction grips
This commit is contained in:
1 parent
bde9cc2715
commit
e2472c68b8
3 files changed
+194
-34
No files matched your search
@@ -3623,13 +3623,20 @@ impl OpenCADStudio {
|
||||
.get_entity(profile_handle)
|
||||
.cloned();
|
||||
let path_ent = self.tabs[i].scene.document.get_entity(path_handle).cloned();
|
||||
let result = profile_ent
|
||||
.zip(path_ent)
|
||||
.and_then(|(profile, path)| sweep_model::swept(&profile, &path));
|
||||
let result = profile_ent.zip(path_ent).and_then(|(profile, path)| {
|
||||
let reference_point = sweep_model::profile_of(&profile)?.plane.origin;
|
||||
let solid = sweep_model::swept(&profile, &path)?;
|
||||
let history = sweep_model::sweep_history(
|
||||
&profile,
|
||||
&path,
|
||||
reference_point,
|
||||
)
|
||||
.unwrap_or_else(|| solid_history::brep_op(&solid));
|
||||
Some((solid, history))
|
||||
});
|
||||
|
||||
if let Some(solid) = result {
|
||||
if let Some((solid, history)) = result {
|
||||
let pending = self.begin_undo(i, "SWEEP", 1, true);
|
||||
let history = solid_history::brep_op(&solid);
|
||||
let created = self.add_solid_model(empty_solid3d(), solid, history);
|
||||
if !created.is_null() {
|
||||
self.tabs[i].dirty = true;
|
||||
|
||||
Reference in new issue
Block a user