-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from AliHaider93/sketchExtrude_devel_k-g
SketchClass: beam elements with integrable cross sections
- Loading branch information
Showing
15 changed files
with
1,708 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* E X T R U D E . C P P | ||
* BRL-CAD | ||
* | ||
* Copyright (c) 2024 United States Government as represented by | ||
* the U.S. Army Research Laboratory. | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public License | ||
* version 2.1 as published by the Free Software Foundation. | ||
* | ||
* This library is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this file; see the file named COPYING for more | ||
* information. | ||
*/ | ||
/** @file extrude.cpp | ||
* | ||
* LS Dyna keyword file to BRL-CAD converter: | ||
* intermediate extrude implementation | ||
*/ | ||
|
||
#include "extrude.h" | ||
|
||
|
||
|
||
|
||
Extrude::Extrude(void) | ||
{ | ||
BU_GET(m_extrude, rt_extrude_internal); | ||
m_extrude->magic = RT_EXTRUDE_INTERNAL_MAGIC; | ||
} | ||
|
||
|
||
void Extrude::setName | ||
( | ||
const char* value | ||
) { | ||
if (value != nullptr) | ||
name = value; | ||
else | ||
name = ""; | ||
} | ||
|
||
|
||
void Extrude::extrudeSection(std::string sectionName,const point_t& V, vect_t h, vect_t u_vec, vect_t v_vec) | ||
{ | ||
m_extrude->magic = RT_EXTRUDE_INTERNAL_MAGIC; | ||
VMOVE(m_extrude->V, V); | ||
VMOVE(m_extrude->h, h); | ||
VMOVE(m_extrude->u_vec, u_vec); | ||
VMOVE(m_extrude->v_vec, v_vec); | ||
m_extrude->sketch_name = bu_strdup(sectionName.c_str()); | ||
m_extrude->skt = (struct rt_sketch_internal*)NULL; | ||
} | ||
|
||
|
||
std::string Extrude::write(rt_wdb* wdbp) | ||
{ | ||
std::string ret; | ||
|
||
rt_extrude_internal* extrude_wdb; | ||
BU_GET(extrude_wdb, rt_extrude_internal); | ||
extrude_wdb->magic = RT_EXTRUDE_INTERNAL_MAGIC; | ||
extrude_wdb = m_extrude; | ||
|
||
if ((extrude_wdb->sketch_name != nullptr) && (strlen(extrude_wdb->sketch_name) > 0 )) { | ||
wdb_export(wdbp, name.c_str(), extrude_wdb, ID_EXTRUDE, 1); | ||
ret = name; | ||
} | ||
|
||
return ret; | ||
} | ||
|
||
|
||
// Local Variables: | ||
// tab-width: 8 | ||
// mode: C++ | ||
// c-basic-offset: 4 | ||
// indent-tabs-mode: t | ||
// c-file-style: "stroustrup" | ||
// End: | ||
// ex: shiftwidth=4 tabstop=8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* E X T R U D E . H | ||
* BRL-CAD | ||
* | ||
* Copyright (c) 2024 United States Government as represented by | ||
* the U.S. Army Research Laboratory. | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public License | ||
* version 2.1 as published by the Free Software Foundation. | ||
* | ||
* This library is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this file; see the file named COPYING for more | ||
* information. | ||
*/ | ||
/** @file extrude.h | ||
* | ||
* LS Dyna keyword file to BRL-CAD converter: | ||
* intermediate extrude implementation | ||
*/ | ||
#ifndef EXTRUDE_INCLUDED | ||
#define EXTRUDE_INCLUDED | ||
|
||
#include "common.h" | ||
#include "wdb.h" | ||
|
||
|
||
|
||
class Extrude { | ||
public: | ||
Extrude(void); | ||
|
||
void setName(const char* value); | ||
|
||
void extrudeSection(std::string sectionName,const point_t& V, vect_t h, vect_t u_vec, vect_t v_vec); | ||
|
||
std::string write(rt_wdb* wdbp); | ||
private: | ||
std::string name; | ||
rt_extrude_internal* m_extrude; | ||
}; | ||
|
||
|
||
#endif // !EXTRUDE_INCLUDED | ||
|
||
|
||
// Local Variables: | ||
// tab-width: 8 | ||
// mode: C++ | ||
// c-basic-offset: 4 | ||
// indent-tabs-mode: t | ||
// c-file-style: "stroustrup" | ||
// End: | ||
// ex: shiftwidth=4 tabstop=8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.