Skip to content

Commit

Permalink
remove BND_Text to see if this has anything to do with the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
fraguada committed Jul 15, 2024
1 parent 5fe12db commit 4315187
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bindings/bnd_annotationbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void BND_TextDot::SetTrackedPointer(ON_TextDot* dot, const ON_ModelComponentRefe
}

/*********/

/*
BND_Text::BND_Text(ON_Text* text, const ON_ModelComponentReference* compref)
{
SetTrackedPointer(text, compref);
Expand All @@ -141,7 +141,7 @@ void BND_Text::SetTrackedPointer(ON_Text* text, const ON_ModelComponentReference
m_text = text;
BND_AnnotationBase::SetTrackedPointer(text, compref);
}

*/
/*********/

BND_Leader::BND_Leader(ON_Leader* leader, const ON_ModelComponentReference* compref)
Expand Down Expand Up @@ -636,10 +636,10 @@ void initAnnotationBaseBindings(pybind11::module& m)
.def_property("TextIsWrapped", &BND_AnnotationBase::TextIsWrapped, &BND_AnnotationBase::SetTextIsWrapped)
.def_property_readonly("Plane", &BND_AnnotationBase::Plane)
;

/*
py::class_<BND_Text, BND_AnnotationBase>(m, "Text")
;

*/
py::class_<BND_Leader, BND_AnnotationBase>(m, "Leader")
.def_property_readonly("Points", &BND_Leader::GetPoints)
.def("GetTextPoint2d", &BND_Leader::GetTextPoint2d, py::arg("dimstyle"), py::arg("leaderscale"))
Expand Down
3 changes: 3 additions & 0 deletions src/bindings/bnd_annotationbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class BND_TextDot : public BND_GeometryBase
void SetFontFace(const std::wstring& face) { m_dot->SetFontFace(face.c_str()); }
};

/*
class BND_Text : public BND_AnnotationBase
{
ON_Text* m_text = nullptr;
Expand All @@ -110,6 +111,8 @@ class BND_Text : public BND_AnnotationBase
BND_Text(ON_Text* text, const ON_ModelComponentReference* compref);
};
*/

class BND_Leader : public BND_AnnotationBase
{
ON_Leader* m_leader = nullptr;
Expand Down
3 changes: 3 additions & 0 deletions src/bindings/bnd_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,13 @@ BND_CommonObject* BND_CommonObject::CreateWrapper(ON_Object* obj, const ON_Model
ON_Annotation* annotation = ON_Annotation::Cast(obj);
if (annotation)
{
/*
ON_Text* text = ON_Text::Cast(obj);
if (text)
return new BND_Text(text, compref);
*/

ON_Leader* leader = ON_Leader::Cast(obj);
if(leader)
return new BND_Leader(leader, compref);
Expand Down

0 comments on commit 4315187

Please sign in to comment.