-
Notifications
You must be signed in to change notification settings - Fork 3
Non-destructive, partial surface extrudes/revolves/sweeps etc #1130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
fbd5b34
3004b11
509f673
fcd78f3
28b3371
60805c3
f819511
5c73e60
ac2e1ad
f993f00
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -126,8 +126,17 @@ define_modeling_cmd_enum! { | |||||||||||||||||||||||||||||||||||||||||||
| #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)] | ||||||||||||||||||||||||||||||||||||||||||||
| pub struct Extrude { | ||||||||||||||||||||||||||||||||||||||||||||
| /// Which sketch to extrude. | ||||||||||||||||||||||||||||||||||||||||||||
| /// Must be a closed 2D solid. | ||||||||||||||||||||||||||||||||||||||||||||
| /// Must be a 2D sketch. | ||||||||||||||||||||||||||||||||||||||||||||
| pub target: ModelingCmdId, | ||||||||||||||||||||||||||||||||||||||||||||
| /// If given, extrude each of these segments into a separate body with the given ID. | ||||||||||||||||||||||||||||||||||||||||||||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||||||||||||||||||||||||||||||||||||||||||||
| pub segments: Option<Vec<Uuid>>, | ||||||||||||||||||||||||||||||||||||||||||||
| /// When two collinear segments are extruded, what should happen? | ||||||||||||||||||||||||||||||||||||||||||||
| /// If true, creates a body with two separate surfaces. | ||||||||||||||||||||||||||||||||||||||||||||
| /// If false, creates a body with one surface, spanning both collinear segments. | ||||||||||||||||||||||||||||||||||||||||||||
| #[serde(default)] | ||||||||||||||||||||||||||||||||||||||||||||
| #[builder(default)] | ||||||||||||||||||||||||||||||||||||||||||||
| pub keep_seams: bool, | ||||||||||||||||||||||||||||||||||||||||||||
| /// How far off the plane to extrude | ||||||||||||||||||||||||||||||||||||||||||||
| pub distance: LengthUnit, | ||||||||||||||||||||||||||||||||||||||||||||
| /// Which IDs should the new faces have? | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -167,6 +176,15 @@ define_modeling_cmd_enum! { | |||||||||||||||||||||||||||||||||||||||||||
| /// Which sketch to extrude. | ||||||||||||||||||||||||||||||||||||||||||||
| /// Must be a closed 2D solid. | ||||||||||||||||||||||||||||||||||||||||||||
| pub target: ModelingCmdId, | ||||||||||||||||||||||||||||||||||||||||||||
| /// If given, extrude each of these segments into a separate body with the given ID. | ||||||||||||||||||||||||||||||||||||||||||||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||||||||||||||||||||||||||||||||||||||||||||
| pub segments: Option<Vec<Uuid>>, | ||||||||||||||||||||||||||||||||||||||||||||
| /// When two collinear segments are extruded, what should happen? | ||||||||||||||||||||||||||||||||||||||||||||
| /// If true, creates a body with two surfaces. | ||||||||||||||||||||||||||||||||||||||||||||
| /// If false, creates a body with one surface, spanning both collinear segments. | ||||||||||||||||||||||||||||||||||||||||||||
| #[serde(default)] | ||||||||||||||||||||||||||||||||||||||||||||
| #[builder(default)] | ||||||||||||||||||||||||||||||||||||||||||||
| pub keep_seams: bool, | ||||||||||||||||||||||||||||||||||||||||||||
| /// Reference to extrude to. | ||||||||||||||||||||||||||||||||||||||||||||
| /// Extrusion occurs along the target's normal until it is as close to the reference as possible. | ||||||||||||||||||||||||||||||||||||||||||||
| pub reference: ExtrudeReference, | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -200,6 +218,15 @@ define_modeling_cmd_enum! { | |||||||||||||||||||||||||||||||||||||||||||
| /// Which sketch to extrude. | ||||||||||||||||||||||||||||||||||||||||||||
| /// Must be a closed 2D solid. | ||||||||||||||||||||||||||||||||||||||||||||
| pub target: ModelingCmdId, | ||||||||||||||||||||||||||||||||||||||||||||
| /// If given, extrude each of these segments into a separate body with the given ID. | ||||||||||||||||||||||||||||||||||||||||||||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||||||||||||||||||||||||||||||||||||||||||||
| pub segments: Option<Vec<Uuid>>, | ||||||||||||||||||||||||||||||||||||||||||||
| /// When two collinear segments are extruded, what should happen? | ||||||||||||||||||||||||||||||||||||||||||||
| /// If true, creates a body with two surfaces. | ||||||||||||||||||||||||||||||||||||||||||||
| /// If false, creates a body with one surface, spanning both collinear segments. | ||||||||||||||||||||||||||||||||||||||||||||
| #[serde(default)] | ||||||||||||||||||||||||||||||||||||||||||||
| #[builder(default)] | ||||||||||||||||||||||||||||||||||||||||||||
| pub keep_seams: bool, | ||||||||||||||||||||||||||||||||||||||||||||
| /// How far off the plane to extrude | ||||||||||||||||||||||||||||||||||||||||||||
| pub distance: LengthUnit, | ||||||||||||||||||||||||||||||||||||||||||||
| /// Which IDs should the new faces have? | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -237,6 +264,15 @@ define_modeling_cmd_enum! { | |||||||||||||||||||||||||||||||||||||||||||
| /// Which sketch to sweep. | ||||||||||||||||||||||||||||||||||||||||||||
| /// Must be a closed 2D solid. | ||||||||||||||||||||||||||||||||||||||||||||
| pub target: ModelingCmdId, | ||||||||||||||||||||||||||||||||||||||||||||
| /// If given, extrude each of these segments into a separate body with the given ID. | ||||||||||||||||||||||||||||||||||||||||||||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||||||||||||||||||||||||||||||||||||||||||||
| pub segments: Option<Vec<Uuid>>, | ||||||||||||||||||||||||||||||||||||||||||||
| /// When two collinear segments are extruded, what should happen? | ||||||||||||||||||||||||||||||||||||||||||||
| /// If true, creates a body with two surfaces. | ||||||||||||||||||||||||||||||||||||||||||||
| /// If false, creates a body with one surface, spanning both collinear segments. | ||||||||||||||||||||||||||||||||||||||||||||
| #[serde(default)] | ||||||||||||||||||||||||||||||||||||||||||||
| #[builder(default)] | ||||||||||||||||||||||||||||||||||||||||||||
| pub keep_seams: bool, | ||||||||||||||||||||||||||||||||||||||||||||
| /// Path along which to sweep. | ||||||||||||||||||||||||||||||||||||||||||||
| pub trajectory: ModelingCmdId, | ||||||||||||||||||||||||||||||||||||||||||||
| /// If true, the sweep will be broken up into sub-sweeps (extrusions, revolves, sweeps) based on the trajectory path components. | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -269,6 +305,15 @@ define_modeling_cmd_enum! { | |||||||||||||||||||||||||||||||||||||||||||
| /// Which sketch to revolve. | ||||||||||||||||||||||||||||||||||||||||||||
| /// Must be a closed 2D solid. | ||||||||||||||||||||||||||||||||||||||||||||
| pub target: ModelingCmdId, | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
264
to
307
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Documentation inconsistency:
Suggested change
Spotted by Graphite |
||||||||||||||||||||||||||||||||||||||||||||
| /// If given, extrude each of these segments into a separate body with the given ID. | ||||||||||||||||||||||||||||||||||||||||||||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||||||||||||||||||||||||||||||||||||||||||||
| pub segments: Option<Vec<Uuid>>, | ||||||||||||||||||||||||||||||||||||||||||||
| /// When two collinear segments are extruded, what should happen? | ||||||||||||||||||||||||||||||||||||||||||||
| /// If true, creates a body with two surfaces. | ||||||||||||||||||||||||||||||||||||||||||||
| /// If false, creates a body with one surface, spanning both collinear segments. | ||||||||||||||||||||||||||||||||||||||||||||
| #[serde(default)] | ||||||||||||||||||||||||||||||||||||||||||||
| #[builder(default)] | ||||||||||||||||||||||||||||||||||||||||||||
| pub keep_seams: bool, | ||||||||||||||||||||||||||||||||||||||||||||
| /// The origin of the extrusion axis | ||||||||||||||||||||||||||||||||||||||||||||
| pub origin: Point3d<LengthUnit>, | ||||||||||||||||||||||||||||||||||||||||||||
| /// The axis of the extrusion (taken from the origin) | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -420,6 +465,15 @@ define_modeling_cmd_enum! { | |||||||||||||||||||||||||||||||||||||||||||
| /// Which sketch to revolve. | ||||||||||||||||||||||||||||||||||||||||||||
| /// Must be a closed 2D solid. | ||||||||||||||||||||||||||||||||||||||||||||
| pub target: ModelingCmdId, | ||||||||||||||||||||||||||||||||||||||||||||
| /// If given, extrude each of these segments into a separate body with the given ID. | ||||||||||||||||||||||||||||||||||||||||||||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||||||||||||||||||||||||||||||||||||||||||||
| pub segments: Option<Vec<Uuid>>, | ||||||||||||||||||||||||||||||||||||||||||||
| /// When two collinear segments are extruded, what should happen? | ||||||||||||||||||||||||||||||||||||||||||||
| /// If true, creates a body with two surfaces. | ||||||||||||||||||||||||||||||||||||||||||||
| /// If false, creates a body with one surface, spanning both collinear segments. | ||||||||||||||||||||||||||||||||||||||||||||
| #[serde(default)] | ||||||||||||||||||||||||||||||||||||||||||||
| #[builder(default)] | ||||||||||||||||||||||||||||||||||||||||||||
| pub keep_seams: bool, | ||||||||||||||||||||||||||||||||||||||||||||
| /// The edge to use as the axis of revolution, must be linear and lie in the plane of the solid | ||||||||||||||||||||||||||||||||||||||||||||
| pub edge_id: Uuid, | ||||||||||||||||||||||||||||||||||||||||||||
| /// The signed angle of revolution (in degrees, must be <= 360 in either direction) | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misleading description: states "extrude each of these segments into a separate body with the given ID" but the array contains segment IDs to be extruded, not body IDs to assign. The wording "with the given ID" incorrectly suggests these UUIDs are for the resulting bodies. Should clarify:
This same incorrect description appears in all operation types (lines 2061, 2151, 2230, 2340, 2598).
Spotted by Graphite

Is this helpful? React 👍 or 👎 to let us know.