forked from 1b-agent/opencadstudio-upstream
Complete cylinder workflow and history properties
This commit is contained in:
1 parent
3e45cff72f
commit
e4cfd4c142
9 files changed
+1100
-18
No files matched your search
@@ -957,7 +957,13 @@ impl OpenCADStudio {
|
||||
}
|
||||
|
||||
// ── Model commands (3D primitives) ─────────────────────────────
|
||||
"BOX" | "WEDGE" | "CYLINDER" | "CONE" | "SPHERE" | "PYRAMID" | "PYR"
|
||||
"CYLINDER" => {
|
||||
use crate::modules::model::cylinder_cmd::CylinderCommand;
|
||||
let new_cmd = CylinderCommand::new();
|
||||
self.command_line.push_info(&new_cmd.prompt());
|
||||
self.tabs[i].active_cmd = Some(Box::new(new_cmd));
|
||||
}
|
||||
"BOX" | "WEDGE" | "CONE" | "SPHERE" | "PYRAMID" | "PYR"
|
||||
| "TORUS" => {
|
||||
use crate::modules::model::primitive_cmd::PrimitiveCommand;
|
||||
let new_cmd = PrimitiveCommand::new(cmd);
|
||||
|
||||
@@ -441,14 +441,14 @@ impl OpenCADStudio {
|
||||
let display_entity = dispatch::entity_in_working_plane(contextual.as_ref(), plane);
|
||||
let entity = &display_entity;
|
||||
let group_names = self.tabs[i].scene.group_names_for_entity(handle);
|
||||
let box_primitive =
|
||||
crate::scene::model::solid_history::is_box_primitive(
|
||||
let specialized_primitive =
|
||||
crate::scene::model::solid_history::has_specialized_primitive_properties(
|
||||
&self.tabs[i].scene.document,
|
||||
handle,
|
||||
);
|
||||
let mut sections =
|
||||
dispatch::properties_sectioned(handle, entity, &text_style_names);
|
||||
if box_primitive {
|
||||
if specialized_primitive {
|
||||
sections.retain(|section| {
|
||||
!section.props.iter().any(|property| {
|
||||
property.field.starts_with("acis_")
|
||||
@@ -620,7 +620,7 @@ impl OpenCADStudio {
|
||||
}
|
||||
}
|
||||
|
||||
if !box_primitive && matches!(
|
||||
if !specialized_primitive && matches!(
|
||||
entity,
|
||||
acadrust::EntityType::Solid3D(_)
|
||||
| acadrust::EntityType::Region(_)
|
||||
@@ -694,7 +694,7 @@ impl OpenCADStudio {
|
||||
}
|
||||
}
|
||||
|
||||
if !box_primitive {
|
||||
if !specialized_primitive {
|
||||
sections.extend(crate::entities::object_data::sections(
|
||||
&self.tabs[i].scene.document,
|
||||
&self.tabs[i].scene.object_data_cache,
|
||||
@@ -2386,7 +2386,7 @@ impl OpenCADStudio {
|
||||
annotation_scale_handle,
|
||||
);
|
||||
let mut entity_grips = dispatch::grips(contextual.as_ref());
|
||||
if crate::scene::model::solid_history::is_box_primitive(
|
||||
if crate::scene::model::solid_history::has_specialized_primitive_properties(
|
||||
&self.tabs[i].scene.document,
|
||||
handle,
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user