Skip to content

Commit

Permalink
Move pipe scaling into edit with other scaling codes.
Browse files Browse the repository at this point in the history
  • Loading branch information
starseeker committed Dec 2, 2024
1 parent ba71287 commit ef276fb
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 59 deletions.
1 change: 0 additions & 1 deletion src/libged/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ set(
get_solid_kp.c
inside.c
path.c
pipe.c
pnts_util.c
points_eval.c
polyclip.cpp
Expand Down
1 change: 1 addition & 0 deletions src/libged/edit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ set(edit_srcs
scale_extrude.c
scale_hyp.c
scale_part.c
scale_pipe.c
scale_rhc.c
scale_rpc.c
scale_superell.c
Expand Down
49 changes: 49 additions & 0 deletions src/libged/edit/ged_edit.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,55 @@ extern int _ged_scale_hyp(struct ged *gedp,
fastf_t sf,
int rflag);

/* defined in scale_part.c */
GED_EXPORT extern int _ged_scale_part(struct ged *gedp,
struct rt_part_internal *part,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in edpipe.c */
GED_EXPORT extern int _ged_scale_pipe(struct ged *gedp,
struct rt_pipe_internal *pipe_internal,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in scale_rhc.c */
GED_EXPORT extern int _ged_scale_rhc(struct ged *gedp,
struct rt_rhc_internal *rhc,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in scale_rpc.c */
GED_EXPORT extern int _ged_scale_rpc(struct ged *gedp,
struct rt_rpc_internal *rpc,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in scale_superell.c */
GED_EXPORT extern int _ged_scale_superell(struct ged *gedp,
struct rt_superell_internal *superell,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in scale_tgc.c */
GED_EXPORT extern int _ged_scale_tgc(struct ged *gedp,
struct rt_tgc_internal *tgc,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in scale_tor.c */
GED_EXPORT extern int _ged_scale_tor(struct ged *gedp,
struct rt_tor_internal *tor,
const char *attribute,
fastf_t sf,
int rflag);


/* defined in translate_extrude.c */
GED_EXPORT extern int _ged_translate_extrude(struct ged *gedp,
Expand Down
19 changes: 10 additions & 9 deletions src/libged/pipe.c → src/libged/edit/scale_pipe.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* P I P E . C
/* S C A L E _ P I P E . C
* BRL-CAD
*
* Copyright (c) 1995-2024 United States Government as represented by
Expand All @@ -17,7 +17,7 @@
* License along with this file; see the file named COPYING for more
* information.
*/
/** @file libged/edpipe.c
/** @file libged/edit/scale_pipe.c
*
* Functions -
*
Expand All @@ -39,7 +39,8 @@
#include "ged.h"
#include "wdb.h"

#include "./ged_private.h"
#include "../ged_private.h"
#include "./ged_edit.h"

void
pipe_split_pnt(struct bu_list *UNUSED(pipe_hd), struct wdb_pipe_pnt *UNUSED(ps), fastf_t *UNUSED(new_pt))
Expand All @@ -61,7 +62,7 @@ edpipe_scale(fastf_t d, fastf_t scale)
}


void
static void
pipe_scale_od(struct rt_pipe_internal *pipeip, fastf_t scale)
{
struct wdb_pipe_pnt *ps;
Expand Down Expand Up @@ -90,7 +91,7 @@ pipe_scale_od(struct rt_pipe_internal *pipeip, fastf_t scale)
}


void
static void
pipe_scale_id(struct rt_pipe_internal *pipeip, fastf_t scale)
{
struct wdb_pipe_pnt *ps;
Expand Down Expand Up @@ -119,7 +120,7 @@ pipe_scale_id(struct rt_pipe_internal *pipeip, fastf_t scale)
}


void
static void
pipe_seg_scale_od(struct wdb_pipe_pnt *ps, fastf_t scale)
{
fastf_t tmp_od;
Expand All @@ -144,7 +145,7 @@ pipe_seg_scale_od(struct wdb_pipe_pnt *ps, fastf_t scale)
}


void
static void
pipe_seg_scale_id(struct wdb_pipe_pnt *ps, fastf_t scale)
{
fastf_t tmp_id;
Expand All @@ -167,7 +168,7 @@ pipe_seg_scale_id(struct wdb_pipe_pnt *ps, fastf_t scale)
}


void
static void
pipe_seg_scale_radius(struct wdb_pipe_pnt *ps, fastf_t scale)
{
fastf_t old_radius;
Expand Down Expand Up @@ -198,7 +199,7 @@ pipe_seg_scale_radius(struct wdb_pipe_pnt *ps, fastf_t scale)
}


void
static void
pipe_scale_radius(struct rt_pipe_internal *pipeip, fastf_t scale)
{
struct bu_list head;
Expand Down
49 changes: 0 additions & 49 deletions src/libged/ged_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,55 +372,6 @@ GED_EXPORT extern int _ged_set_metaball(struct ged *gedp,
GED_EXPORT extern struct wdb_metaball_pnt *
_ged_get_metaball_pt_i(struct rt_metaball_internal *mbip, int mbp_i);

/* defined in scale_part.c */
GED_EXPORT extern int _ged_scale_part(struct ged *gedp,
struct rt_part_internal *part,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in edpipe.c */
GED_EXPORT extern int _ged_scale_pipe(struct ged *gedp,
struct rt_pipe_internal *pipe_internal,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in scale_rhc.c */
GED_EXPORT extern int _ged_scale_rhc(struct ged *gedp,
struct rt_rhc_internal *rhc,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in scale_rpc.c */
GED_EXPORT extern int _ged_scale_rpc(struct ged *gedp,
struct rt_rpc_internal *rpc,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in scale_superell.c */
GED_EXPORT extern int _ged_scale_superell(struct ged *gedp,
struct rt_superell_internal *superell,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in scale_tgc.c */
GED_EXPORT extern int _ged_scale_tgc(struct ged *gedp,
struct rt_tgc_internal *tgc,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in scale_tor.c */
GED_EXPORT extern int _ged_scale_tor(struct ged *gedp,
struct rt_tor_internal *tor,
const char *attribute,
fastf_t sf,
int rflag);

/* defined in tops.c */
GED_EXPORT struct directory **
_ged_dir_getspace(struct db_i *dbip,
Expand Down

0 comments on commit ef276fb

Please sign in to comment.