Skip to content

Add 'correct_origin_bug' field to FaceIsPlanar #911

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions modeling-cmds/src/def_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,17 @@ define_modeling_cmd_enum! {
pub struct FaceIsPlanar {
/// Which face is being queried.
pub object_id: Uuid,
/// Whether to correct a bug around origin position for top/bottom faces.
/// You should really always set this. The only reason it's not a default is to allow
/// old clients who relied on the buggy behaviour to continue working.
///
/// Specifically, the bug is that for top and bottom faces (caps), the plane's origin is being set
/// to the origin of the plane that face is sketched on. But for side faces (walls), the origin
/// is being set to the center of that face. This means if you sketch a cube at (40, 40, 40), the
/// center of the side faces will be at 40, 40 in the scene's coordinate system,
/// but the center of the top/bottom faces will be at 0, 0.
#[serde(default)]
pub correct_origin_bug: bool,
}

/// Determines a position on a brep face evaluated by parameters u,v
Expand Down
Loading